summaryrefslogtreecommitdiff
path: root/readme.md
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-03-18 15:58:31 +1100
committerkitty <nepeta@canaglie.net>2026-03-18 15:58:31 +1100
commit9d2f471ed1cde0c6e448ab6af29e734b49abe972 (patch)
tree2402177c0a3ef8c244ff17240f1a664a5bd806cf /readme.md
parent45a7c61e63efef5edae68012b33bccca311ed62b (diff)
vaguely working interpretation
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md22
1 files changed, 18 insertions, 4 deletions
diff --git a/readme.md b/readme.md
index 6416c28..a9fa679 100644
--- a/readme.md
+++ b/readme.md
@@ -1,6 +1,6 @@
-# sanctuary forth (working title)
+# sanctuary (working title)
-sanctuary forth is a 64-bit subroutine threaded forth system
+sanctuary is a 64-bit subroutine threaded forth system
for amd64 linux systems.
## stack effect notation
@@ -21,12 +21,23 @@ the following is a list of words available in this forth.
### `#tib ( -- a )`
variable containing the amount of characters in the input buffer.
+### `(header) ( a u -- xt )`
+create a dictionary header for a word named the provided string.
+this word does not set the code field.
+this word returns an incompleted xt and does not update latest.
+
### `[ ( -- ) IMMEDIATE`
set the system to interpret mode.
### `] ( -- ) IMMEDIATE`
set the system to compiling mode.
+### `: ( "name" -- )`
+start compilation of the word 'name'.
+
+### `; ( -- ) IMMEDIATE`
+end compilation of the currently compiling word.
+
### `>body ( xt -- a )`
yield the code field of xt.
@@ -83,9 +94,9 @@ the most recently created word.
### `literal ( n -- ) IMMEDIATE COMPILE-ONLY`
compile a push of the literal value n into the currently compiling word.
-### `number ( a u -- n 0 | -1 )`
+### `number ( a u -- n -1 | 0 )`
convert given string into a number along with a flag.
-if parsing a number fails then -1 (false) is returned
+if parsing a number fails then 0 (false) is returned
and no number is provided.
### `parse ( "name<c>" c -- a u )`
@@ -99,6 +110,9 @@ and return as a string.
tabs (ascii 0x09), newlines (ascii 0x10), and spaces (ascii 0x20)
are considered whitespace.
+### `smudge ( -- )`
+toggles the smudge bit on the xt in latest.
+
### `state ( -- a )`
a variable containing a boolean value.
if 0 (false), the system is in interpreting mode,