From 68262f925ba9658e17842f894895d358bb94891c Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 14 May 2020 09:58:48 -0400 Subject: [PATCH] Almost done De-XPACKing! --- blk/001 | 1 - blk/420 | 2 +- blk/438 | 22 +++++++++++++--------- blk/439 | 10 ++++++++++ blk/442 | 11 ----------- blk/443 | 8 -------- emul/forth.bin | Bin 5875 -> 5875 bytes 7 files changed, 24 insertions(+), 30 deletions(-) create mode 100644 blk/439 delete mode 100644 blk/442 delete mode 100644 blk/443 diff --git a/blk/001 b/blk/001 index a754069..427c812 100644 --- a/blk/001 +++ b/blk/001 @@ -6,7 +6,6 @@ MASTER INDEX 150 Extra words 200 Z80 assembler 260 Cross compilation 280 Z80 boot code 390 Cross-compiled core -439 XPACKed core 490 TRS-80 Recipe 520 Fonts 550 TI-84+ Recipe 580 RC2014 Recipe diff --git a/blk/420 b/blk/420 index 5572acc..1cc934d 100644 --- a/blk/420 +++ b/blk/420 @@ -1 +1 @@ -1 18 LOADR+ ( xcomp core high ) +1 19 LOADR+ ( xcomp core high ) diff --git a/blk/438 b/blk/438 index 1296f6f..77d6f42 100644 --- a/blk/438 +++ b/blk/438 @@ -1,10 +1,14 @@ -( ';' can't have its name right away because, when created, it - is not an IMMEDIATE yet and will not be treated properly by - xcomp. ) -: _ - ['] EXIT , - R> DROP ( exit : ) +: IF ( -- a | a: br cell addr ) + COMPILE (?br) H@ 2 ALLOT ( br cell allot ) ; IMMEDIATE -';' XCURRENT @ 4 - C! -':' X' _ 4 - C! ( give : its name ) -'(' X' _ 4 - C! +: THEN ( a -- | a: br cell addr ) + DUP H@ -^ SWAP ( a-H a ) ! +; IMMEDIATE +: ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell ) + COMPILE (br) + 2 ALLOT + DUP H@ -^ SWAP ( a-H a ) + ! + H@ 2- ( push a. -2 for allot offset ) +; IMMEDIATE + diff --git a/blk/439 b/blk/439 new file mode 100644 index 0000000..1296f6f --- /dev/null +++ b/blk/439 @@ -0,0 +1,10 @@ +( ';' can't have its name right away because, when created, it + is not an IMMEDIATE yet and will not be treated properly by + xcomp. ) +: _ + ['] EXIT , + R> DROP ( exit : ) +; IMMEDIATE +';' XCURRENT @ 4 - C! +':' X' _ 4 - C! ( give : its name ) +'(' X' _ 4 - C! diff --git a/blk/442 b/blk/442 deleted file mode 100644 index cea17a8..0000000 --- a/blk/442 +++ /dev/null @@ -1,11 +0,0 @@ -: IF ( -- a | a: br cell addr ) - COMPILE (?br) - H@ ( push a ) - 2 ALLOT ( br cell allot ) -; IMMEDIATE - -: THEN ( a -- | a: br cell addr ) - DUP H@ -^ SWAP ( a-H a ) - ! -; IMMEDIATE - diff --git a/blk/443 b/blk/443 deleted file mode 100644 index 5d02510..0000000 --- a/blk/443 +++ /dev/null @@ -1,8 +0,0 @@ -: ELSE ( a1 -- a2 | a1: IF cell a2: ELSE cell ) - COMPILE (br) - 2 ALLOT - DUP H@ -^ SWAP ( a-H a ) - ! - H@ 2- ( push a. -2 for allot offset ) -; IMMEDIATE - diff --git a/emul/forth.bin b/emul/forth.bin index 13e1e922490460a7117d498e79a5ebd6af66ee01..167c0ff94cc4ae5936cc13b728ec638e4f823b53 100644 GIT binary patch delta 59 zcmeyY`&oB`mMF8Qo8jb7qTWo_a+7sLql6BKIx#r=`v!RWxbiWy^JQ=!m^?!?oYmDW P*g<%5g_!K*c(Ew}GcOVl delta 59 zcmeyY`&oB`mMD|8!Q?8@D4`-zCkAJK-vCb^S3ZVzz6|c7$