From e6d3638f4f71040b445d18b7daf3814e08f56023 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 9 Apr 2020 12:01:08 -0400 Subject: [PATCH] Add CURRENT* and simplify xcomp --- dictionary.txt | 2 ++ emul/forth/xcomp.fs | 5 +++++ emul/forth/z80c.bin | Bin 1702 -> 1731 bytes forth/icore.fs | 4 +++- forth/xcomp.fs | 30 ++++++++---------------------- forth/z80c.fs | 4 ---- notes.txt | 8 +++++++- 7 files changed, 25 insertions(+), 28 deletions(-) diff --git a/dictionary.txt b/dictionary.txt index 3c81f3c..d526565 100644 --- a/dictionary.txt +++ b/dictionary.txt @@ -98,6 +98,8 @@ J -- n Copy RS third item to PS C@ a -- c Set c to byte at address a C! c a -- Store byte c in address a CURRENT -- a Set a to wordref of last added entry. +CURRENT* -- a A pointer to active CURRENT*. Useful when we have + multiple active dicts. HERE -- a Push HERE's address H@ -- a HERE @ MOVE a1 a2 u -- Copy u bytes from a1 to a2, starting with a1, going diff --git a/emul/forth/xcomp.fs b/emul/forth/xcomp.fs index 864ed4c..73b3340 100644 --- a/emul/forth/xcomp.fs +++ b/emul/forth/xcomp.fs @@ -4,3 +4,8 @@ CURRENT @ XCURRENT ! H@ ' _bend - 4 + XOFF ! + +( dummy entry for dict hook ) +(xentry) _ +H@ 256 /MOD 2 PC! 2 PC! + diff --git a/emul/forth/z80c.bin b/emul/forth/z80c.bin index 66265d01c39d15266a5b52785d449f3d28de7b8e..8ffdb2ed32cd3ec50131d310dd2d31950082cd38 100644 GIT binary patch delta 474 zcmXw#%}QHQ6ouEl=O;<=o?t;yM<>OfC=Q$y+F)Ds7%drD^d)h6?o+?JaPY7p>LD45BM5tfcQ=Fa!6edFXv9gb(n%<-qrbm z_#&IZvHQpM)E}7-4eK&qRhi4%$)Nax(_|XNh|`(h659~R3LGBc5$2>0=LnU zIg*HWXxpekAiYv3d6Qr^!ZakW$!H|a1eQWDY!s*i18Mn4CcHC`p$+L)yobJv$^I1<#`v{