projects
/
rrq
/
jonasforth.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Define IF and THEN
[rrq/jonasforth.git]
/
sys.f
diff --git
a/sys.f
b/sys.f
index 23fed8781df27e3ee98bfff9a2bd8b12375d1968..df2d231a8266511b8dcfe5cc251f1be28bd4055f 100644
(file)
--- a/
sys.f
+++ b/
sys.f
@@
-13,3
+13,16
@@
EXIT [
: / /MOD DROP ;
: MOD /MOD SWAP DROP ;
: NEG 0 SWAP - ;
+
+: IF IMMEDIATE
+ ' 0BRANCH ,
+ HERE @
+ 0 ,
+;
+
+: THEN IMMEDIATE
+ DUP
+ HERE @ SWAP -
+ SWAP !
+;
+