summaryrefslogtreecommitdiff
path: root/sanctuary.fs
diff options
context:
space:
mode:
Diffstat (limited to 'sanctuary.fs')
-rw-r--r--sanctuary.fs6
1 files changed, 5 insertions, 1 deletions
diff --git a/sanctuary.fs b/sanctuary.fs
index eea702f..f73f052 100644
--- a/sanctuary.fs
+++ b/sanctuary.fs
@@ -22,7 +22,7 @@
: ?dup dup 0<> if dup then ;
-: allot here swap dp +! ;
+: allot dp +! ;
: ?find ?dup if find 0= if 2drop abort then else abort then ;
: 'h parse-name ?find ;
@@ -32,6 +32,9 @@
: postpone 'h ( word ) dup immediate? if >body compile,
else >body [compile] literal ['] compile, compile, then ; immediate
+: cells 8 * ;
+: cell+ 8 + ;
+: cell- 8 - ;
: create parse-name (header) latest ! ['] (create) compile, 0 , ;
: does> latest @ >body 2 + ['] (does>) over ! \ replace call loc
( replace destination ) 11 + r> swap ! ;
@@ -39,4 +42,5 @@
( but it is actually compiled into the definition and is jumped to )
( by a create does> made word )
: constant create , does> @ ;
+: variable create 1 cells allot ;
bye