summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkitty <nepeta@canaglie.net>2026-03-23 13:37:15 +1100
committerkitty <nepeta@canaglie.net>2026-03-23 13:37:15 +1100
commit570984416d92bb3d355b59a5292b8d392aad93b4 (patch)
tree0ae19ee4bf87ceddcb4feb86e2b77b82c1a71189
parent3d319290a949768b312e8464b0e5cc0c9a32ae50 (diff)
boolean words
-rw-r--r--readme.md6
-rw-r--r--sanctuary.fs3
2 files changed, 9 insertions, 0 deletions
diff --git a/readme.md b/readme.md
index 07cb0b6..23460bc 100644
--- a/readme.md
+++ b/readme.md
@@ -311,6 +311,9 @@ which is used as the user memory space.
### `execute ( xt -- )`
call the word xt.
+### `false ( -- u )`
+a cell with no bits set.
+
### `find ( a u -- a u 0 | a -1 )`
look in the dictionary for the word a (of u characters).
a zero is returned along with the original given string
@@ -432,6 +435,9 @@ conclude an if statement.
### `tib ( -- a )`
a variable containing the address of the current input buffer.
+### `true ( -- u )`
+a cell with all bits set.
+
### `type ( a u -- )`
write u characters at a to output.
diff --git a/sanctuary.fs b/sanctuary.fs
index f73f052..d006985 100644
--- a/sanctuary.fs
+++ b/sanctuary.fs
@@ -43,4 +43,7 @@
( by a create does> made word )
: constant create , does> @ ;
: variable create 1 cells allot ;
+
+0 constant false
+-1 constant true
bye