diff --git a/blk/421 b/blk/421 index 4e4498b..f73d4ed 100644 --- a/blk/421 +++ b/blk/421 @@ -1,14 +1,16 @@ : EMIT ( 0x53==(emit) override ) 0x53 RAM+ @ DUP IF EXECUTE ELSE DROP (emit) THEN ; - : (print) BEGIN C@+ ( a+1 c ) ( exit if null or 0xd ) DUP 0xd = OVER NOT OR IF 2DROP EXIT THEN EMIT ( a ) - AGAIN -; - - + AGAIN ; +: 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 ; +: (ok) SPC LIT" ok" (print) NL ; +: (uflw) LIT" stack underflow" (print) ABORT ; +: (wnf) (print) SPC LIT" word not found" (print) ABORT ; diff --git a/blk/422 b/blk/422 index 8f7dde3..b397eee 100644 --- a/blk/422 +++ b/blk/422 @@ -1,15 +1,7 @@ : ," BEGIN - C< - ( 34 is ASCII for " ) - DUP 34 = IF DROP EXIT THEN C, + C< DUP 34 ( ASCII " ) = IF DROP EXIT THEN C, AGAIN ; - -: ." - 34 , ( 34 == litWord ) ," 0 C, - COMPILE (print) -; IMMEDIATE +: LIT" 34 , ( litWord ) ," 0 C, ; IMMEDIATE +: ." [COMPILE] LIT" 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/446 b/blk/446 deleted file mode 100644 index c6854e2..0000000 --- a/blk/446 +++ /dev/null @@ -1,3 +0,0 @@ -: (ok) SPC ." ok" NL ; -: (uflw) ABORT" stack underflow" ; -: (wnf) (print) SPC ABORT" word not found" ; diff --git a/emul/forth.bin b/emul/forth.bin index f36dd20..26cbbc6 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ diff --git a/emul/xcomp.fs b/emul/xcomp.fs index ddd05d3..4b0d727 100644 --- a/emul/xcomp.fs +++ b/emul/xcomp.fs @@ -14,7 +14,7 @@ ( Update LATEST ) PC ORG @ 8 + ! ," CURRENT @ HERE ! " -440 446 XPACKR +440 445 XPACKR ," ' (key) 12 RAM+ ! " ORG @ 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC! diff --git a/recipes/rc2014/xcomp.fs b/recipes/rc2014/xcomp.fs index 5660e5b..28c62cb 100644 --- a/recipes/rc2014/xcomp.fs +++ b/recipes/rc2014/xcomp.fs @@ -18,7 +18,7 @@ RAMSTART 0x70 + CONSTANT ACIA_MEM (entry) _ ( Update LATEST ) PC ORG @ 8 + ! -440 446 XPACKR ( core ) +440 445 XPACKR ( core ) 123 132 XPACKR ( linker ) ," : _ ACIA$ RDLN$ (ok) ; _ " ORG @ 256 /MOD 2 PC! 2 PC! diff --git a/recipes/ti84/xcomp.fs b/recipes/ti84/xcomp.fs index 977ceaf..45a5ae4 100644 --- a/recipes/ti84/xcomp.fs +++ b/recipes/ti84/xcomp.fs @@ -68,7 +68,7 @@ CREATE ~FNT CPFNT3x5 (entry) _ ( Update LATEST ) PC ORG @ 8 + ! -440 446 XPACKR ( core ) +440 445 XPACKR ( core ) ," : _ LCD$ KBD$ (ok) RDLN$ ; _ " ORG @ 0x100 - 256 /MOD 2 PC! 2 PC! H@ 256 /MOD 2 PC! 2 PC! diff --git a/recipes/trs80/xcomp.fs b/recipes/trs80/xcomp.fs index 176c243..cf82d63 100644 --- a/recipes/trs80/xcomp.fs +++ b/recipes/trs80/xcomp.fs @@ -14,7 +14,7 @@ RS_ADDR 0x80 - CONSTANT RAMSTART ( Update LATEST ) PC ORG @ 8 + ! ," CURRENT @ HERE ! " -440 446 XPACKR ( core ) +440 445 XPACKR ( core ) 499 500 XPACKR ( trs80.fs ) ( 0x0a == NLPTR. TRS-80 wants CR-only newlines ) ," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "