From 51997533ff9dec3d218faf9526faa931738d4e5a Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 14 May 2020 07:58:55 -0400 Subject: [PATCH] Move a bunch of words from XPACKed core to xcomp core --- blk/421 | 12 +++++++----- blk/422 | 14 +++----------- blk/446 | 3 --- emul/forth.bin | Bin 5876 -> 5888 bytes emul/xcomp.fs | 2 +- recipes/rc2014/xcomp.fs | 2 +- recipes/ti84/xcomp.fs | 2 +- recipes/trs80/xcomp.fs | 2 +- 8 files changed, 14 insertions(+), 23 deletions(-) delete mode 100644 blk/446 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 f36dd202f8dae0f52f0816498d39cbbd4ec280ed..26cbbc61564d140830c1e170a8aa631458236bbc 100644 GIT binary patch delta 738 zcmX9+QAkr!82<0QXX4yE_ny1$#zN=aT(Z&9gc39hy{R~uI(HW($kY%;v<*zD9t4xf zhcbc_K@if51Y~?7a88Covq(Rovtf=$uXR(K!aFX2}4Ryp2V^(A_^by7g}V@ z&n$@dN2)+UMH!C6sJk3?K#2$-GL@Z}i8835dD6;=9AgX0f>Oq>-;DYYkFgb{mHl-H zbzBcdKZ#&%(^Vd2O+JD2mh)9$LKWD^d&Y0D^HX!EFBDf$@g3GYa)~jkL1Q(7CFKB?>g delta 711 zcmX9+T}TvB82x7M?B=e!_uiS=Sz1yXr`_14Tr*KBD{RzY!FA0sN`%BPmr&eriwfD0 zqIxov`x?E4AoS1=g)j9WK1DxR&zjJKL0Ew%*n@p{eYo6v&Ue1^ojY?U(;Ibxg-T^1 zsQ~Z`H@sXzedzlLZRpJfnReD5-+scfn6hD%yk6N4D6Olv7Zs zrrK}|Xi5h^UTukM>LM?Z5-IbSizy5FMLtEA_zzzmL%1N( ziY8SF_ESvj^_FB-%k?1G5Cji(N5xmYiHCI;Bg=Y;yv808Giq8k`32nuA8erE-<@r` z#HE=FJ?))cCu_i0p7)GsY92x$yB<|a$4@%;j~fZTiuyQN*WOod@;Lm~#jJ4AQSS3y5PS`>hi7Zm9&LbyXi$)$ZTIzb))uWTJw$sSOar3FVVu)|1<)2}V z43GazTe&ByB3|^1nTHDauE-d%fCqknO^%pJ+`ai 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$ ; _ "