From 40a756cf1c20f748a5a9d754e084560f31e23697 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 14 May 2020 08:18:53 -0400 Subject: [PATCH] Move a bunch of words from XPACKed core to xcomp core --- blk/412 | 6 +++--- blk/434 | 4 ++++ blk/435 | 4 ---- blk/444 | 1 + blk/445 | 8 -------- emul/forth.bin | Bin 5888 -> 5888 bytes emul/xcomp.fs | 2 +- recipes/rc2014/xcomp.fs | 2 +- recipes/ti84/xcomp.fs | 2 +- recipes/trs80/xcomp.fs | 2 +- 10 files changed, 12 insertions(+), 19 deletions(-) delete mode 100644 blk/445 diff --git a/blk/412 b/blk/412 index 11f255d..abb2c23 100644 --- a/blk/412 +++ b/blk/412 @@ -4,13 +4,13 @@ : H@ HERE @ ; : IMMEDIATE CURRENT @ 1- - DUP C@ 128 OR SWAP C! -; + DUP C@ 128 OR SWAP C! ; +: IMMED? 1- C@ 0x80 AND ; : +! SWAP OVER @ + SWAP ! ; : -^ SWAP - ; : / /MOD SWAP DROP ; : MOD /MOD DROP ; - : ALLOT HERE +! ; : CREATE (entry) 11 ( 11 == cellWord ) C, ; +: VARIABLE CREATE 2 ALLOT ; : LEAVE R> R> DROP I 1- >R >R ; diff --git a/blk/434 b/blk/434 index db838a0..0819e39 100644 --- a/blk/434 +++ b/blk/434 @@ -2,3 +2,7 @@ ( b1 b2 -- ) : LOADR 1+ SWAP DO I DUP . NL LOAD LOOP ; : LOADR+ BLK> @ + SWAP BLK> @ + SWAP LOADR ; +( Now we have "as late as possible" stuff ) +: DO COMPILE 2>R H@ ; IMMEDIATE +: LOOP COMPILE (loop) H@ - , ; IMMEDIATE +( LEAVE is implemented in low xcomp ) diff --git a/blk/435 b/blk/435 index 60f0030..325af37 100644 --- a/blk/435 +++ b/blk/435 @@ -1,9 +1,5 @@ -( LITN has to be defined after the last immediate usage of - it to avoid bootstrapping issues ) : LITN 32 , , ( 32 == NUMBER ) ; -: IMMED? 1- C@ 0x80 AND ; - ( ';' can't have its name right away because, when created, it is not an IMMEDIATE yet and will not be treated properly by xcomp. ) diff --git a/blk/444 b/blk/444 index 4bd8e56..6bad060 100644 --- a/blk/444 +++ b/blk/444 @@ -11,4 +11,5 @@ ( We're done. Because we've popped RS, we'll exit parent definition ) ; +: CONSTANT CREATE , DOES> @ ; diff --git a/blk/445 b/blk/445 deleted file mode 100644 index 415ab82..0000000 --- a/blk/445 +++ /dev/null @@ -1,8 +0,0 @@ -: VARIABLE CREATE 2 ALLOT ; -: CONSTANT CREATE , DOES> @ ; - -( In addition to pushing H@ this compiles 2>R so that loop - variables are sent to PS at runtime ) -: DO COMPILE 2>R H@ ; IMMEDIATE -: LOOP COMPILE (loop) H@ - , ; IMMEDIATE -( LEAVE is implemented in xcomp ) diff --git a/emul/forth.bin b/emul/forth.bin index 26cbbc61564d140830c1e170a8aa631458236bbc..e71fa1959369c7b8b8322429734a1dc8659639da 100644 GIT binary patch delta 1398 zcmXw3U1%d!6h4`I`;$)Q&P@KgS*e};&?H-p7U_fS;3}&Ntt8 z&bi;Y_f}$+*caDjUt(e+K6;@GTG1jNgol~(116og!NQ2RS8b?K3<2RM=avhtX&}XmFTgonZNcZsFC=*4_ zo>C<{_#E3B|4kT6&Sb{VU<0=hUPI}>jjo1tq`MfEgyip*H7xGI)r)wStXnA>Y5hGY zzH3!8A;M$qylshZu%2X@W#IS(Ntqx>*nK;cnF+};*@`->Xk@w(Da|N3CRXw%J49w? za-;(Y3JoapUs?C-&k&3hH=^B0A!-1M8*spM6~Qa3`R%A1Jqkc+YjJtQxKdcjZLa2v z+sOE>1sU6g)#&rs=z*o&E^e+Eh2oa6T0|xs@Js3|!5eCg_SsE{1$20qeXfR3>%(~1 zOiyPKd!IevpQ&@vGJ8n-$sa0}40si6t*6$A^*+M&UWkE>RY^$WF|B{Tl6o4OIYEXJ|9k}oVr1JGvCw=8-GPOJkm zDEpTGqKCW1n#A}UyXa#qF3MH0++9p~z|T6n2KMxSbOT!8DVBS7a>#PJC}qO*XfkzP z3{D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@@ -14,7 +14,7 @@ ( Update LATEST ) PC ORG @ 8 + ! ," CURRENT @ HERE ! " -440 445 XPACKR +440 444 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 28c62cb..0e18143 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 445 XPACKR ( core ) +440 444 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 45a5ae4..b133a31 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 445 XPACKR ( core ) +440 444 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 cf82d63..338b405 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 445 XPACKR ( core ) +440 444 XPACKR ( core ) 499 500 XPACKR ( trs80.fs ) ( 0x0a == NLPTR. TRS-80 wants CR-only newlines ) ," : _ ['] CR 0x0a RAM+ ! BLK$ FD$ (ok) RDLN$ ; _ "