summaryrefslogtreecommitdiff
path: root/jefs.fs
diff options
context:
space:
mode:
Diffstat (limited to 'jefs.fs')
-rw-r--r--jefs.fs10
1 files changed, 7 insertions, 3 deletions
diff --git a/jefs.fs b/jefs.fs
index dbd6da5..309f118 100644
--- a/jefs.fs
+++ b/jefs.fs
@@ -1,12 +1,16 @@
+: [compile] parse find drop >cfa compile, ; immediate
+: ' parse find drop >cfa [compile] lit ; immediate \ note: no error handling (yet)
+
: begin here @ ; immediate
-: again branch here @ 4 + - d, ; immediate
+: again branch here @ 4 + - d, ; immediate \ add 4 to get to beginning of the next instruction
+\ : if 0branch here @ 0 d, ; immediate ( I: -- a )
+\ : then dup here @ 4 + swap - swap d! ; immediate
: / /mod swap drop ;
: mod /mod drop ;
: syswrite ( u c-addr fd -- n ) 1 syscall3 ;
: say ( c-addr u -- ) swap 1 syswrite drop ;
-\ : saying begin TESTSTR say again ;
-\ HEREDUMP
+\ : saying 0 if TESTSTR say then ;
\ saying bye
TESTSTR say bye