From: Tim Vaughan Date: Tue, 26 Apr 2016 20:30:12 +0000 (+1200) Subject: LOOP+ -> +LOOP, LEAVE? -> ?LEAVE X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=commitdiff_plain;h=f767595849002e0e49e1e6f6b0a0c401b09e5c05;p=forth.jl.git LOOP+ -> +LOOP, LEAVE? -> ?LEAVE --- diff --git a/src/lib.4th b/src/lib.4th index 1f97d20..781a966 100644 --- a/src/lib.4th +++ b/src/lib.4th @@ -116,7 +116,7 @@ : I RSP@ 3 - @ ; -: LEAVE? IMMEDIATE +: ?LEAVE IMMEDIATE ' 0BRANCH , 13 , ' R> , ' RDROP , ' RDROP , ' LIT , HERE @ 7 + , ' DUP , ' -ROT , ' - , ' SWAP , ' ! , @@ -126,10 +126,10 @@ : 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 , @@ -140,7 +140,7 @@ : LOOP IMMEDIATE ' LIT , 1 , - [COMPILE] LOOP+ + [COMPILE] +LOOP ; \ COMMENTS ----------------------------------------------------------------------