diff --git a/blk/393 b/blk/393 index 98d16d9..1168ed6 100644 --- a/blk/393 +++ b/blk/393 @@ -12,4 +12,4 @@ 0 0x08 RAM+ ! ( 08 == C<* override ) LIT< INTERPRET (find) DROP EXECUTE ; -1 21 LOADR+ +1 22 LOADR+ diff --git a/blk/413 b/blk/413 index 2e22895..6e8981c 100644 --- a/blk/413 +++ b/blk/413 @@ -1,11 +1,13 @@ +: '? WORD (find) ; +: ' + '? (?br) [ 4 , ] EXIT + LIT< (wnf) (find) DROP EXECUTE +; : ROLL DUP NOT IF EXIT THEN 1+ DUP PICK ( n val ) SWAP 2 * (roll) ( val ) SWAP DROP ; - : 2OVER 3 PICK 3 PICK ; : 2SWAP 3 ROLL 3 ROLL ; - - diff --git a/blk/438 b/blk/415 similarity index 100% rename from blk/438 rename to blk/415 diff --git a/blk/422 b/blk/422 index 5e19ff6..8f7dde3 100644 --- a/blk/422 +++ b/blk/422 @@ -9,5 +9,7 @@ 34 , ( 34 == litWord ) ," 0 C, COMPILE (print) ; IMMEDIATE - : ABORT" [COMPILE] ." COMPILE ABORT ; IMMEDIATE +: BS 8 EMIT ; : LF 10 EMIT ; : CR 13 EMIT ; +: CRLF CR LF ; : SPC 32 EMIT ; +: NL 0x0a RAM+ @ ( NLPTR ) DUP IF EXECUTE ELSE DROP CRLF THEN ; diff --git a/blk/430 b/blk/430 index 8fa4553..8fea4c3 100644 --- a/blk/430 +++ b/blk/430 @@ -2,11 +2,6 @@ : ] R> DROP ; : LIT< WORD 34 , SCPY 0 C, ; IMMEDIATE : LITA 36 , , ; -: '? WORD (find) ; -: ' - '? (?br) [ 4 , ] EXIT - LIT< (wnf) (find) DROP EXECUTE -; : ['] ' LITA ; IMMEDIATE : COMPILE ' LITA ['] , , ; IMMEDIATE : [COMPILE] ' , ; IMMEDIATE diff --git a/blk/439 b/blk/439 index 8ea4b45..c2c4955 100644 --- a/blk/439 +++ b/blk/439 @@ -7,4 +7,6 @@ = UNTIL DROP ; - +: (ok) SPC ." ok" NL ; +: (uflw) ABORT" stack underflow" ; +: (wnf) (print) SPC ABORT" word not found" ; diff --git a/blk/440 b/blk/440 index 1c9ce35..e69de29 100644 --- a/blk/440 +++ b/blk/440 @@ -1,11 +0,0 @@ -: (uflw) ABORT" stack underflow" ; -: BS 8 EMIT ; -: LF 10 EMIT ; -: CR 13 EMIT ; -: CRLF CR LF ; -: SPC 32 EMIT ; -: NL 0x0a RAM+ @ ( NLPTR ) DUP IF EXECUTE ELSE DROP CRLF THEN ; - -: (wnf) (print) SPC ABORT" word not found" ; -: (ok) SPC ." ok" NL ; - diff --git a/emul/forth.bin b/emul/forth.bin index ea123c9..dc6de17 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ