: I RSP@ 3 - @ ;
-: LEAVE? IMMEDIATE
+: ?LEAVE IMMEDIATE
' 0BRANCH , 13 ,
' R> , ' RDROP , ' RDROP ,
' LIT , HERE @ 7 + , ' DUP , ' -ROT , ' - , ' SWAP , ' ! ,
: LEAVE IMMEDIATE
' LIT , -1 ,
- [COMPILE] LEAVE?
+ [COMPILE] ?LEAVE
;
-: LOOP+ IMMEDIATE
+: +LOOP IMMEDIATE
' R> , ' SWAP , ' R> , ' SWAP , ' R> , ' SWAP , ' + , ' 2DUP , ' - ,
' SWAP , ' >R , ' SWAP , ' >R , ' SWAP , ' >R ,
' 0<= , ' 0BRANCH ,
: LOOP IMMEDIATE
' LIT , 1 ,
- [COMPILE] LOOP+
+ [COMPILE] +LOOP
;
\ COMMENTS ----------------------------------------------------------------------