From 66dc621919205f963a30f4e41d9b8923c0951817 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 9 Apr 2020 09:43:48 -0400 Subject: [PATCH] xcomp: don't automatically shadow core words --- emul/forth/xcomp.fs | 4 ++++ forth/xcomp.fs | 10 +++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/emul/forth/xcomp.fs b/emul/forth/xcomp.fs index a901220..864ed4c 100644 --- a/emul/forth/xcomp.fs +++ b/emul/forth/xcomp.fs @@ -1,2 +1,6 @@ +: CODE XCODE ; +: IMMEDIATE XIMM ; +: : [ ' X: , ] ; + CURRENT @ XCURRENT ! H@ ' _bend - 4 + XOFF ! diff --git a/forth/xcomp.fs b/forth/xcomp.fs index 0004720..332e6ee 100644 --- a/forth/xcomp.fs +++ b/forth/xcomp.fs @@ -14,6 +14,10 @@ "'" and friends will *not* find words you're about to define. Only (xfind) will. + Words ":", "IMMEDIATE" and ":" are not automatically + shadowed to allow the harmless inclusion of this unit. This + shadowing has to take place in your xcomp configuration. + See example in /emul/forth/xcomp.fs ) @@ -49,16 +53,16 @@ VARIABLE XOFF CURRENT ! ( a f xa xf ) ; -: CODE +: XCODE (xentry) 23 , ; -: IMMEDIATE +: XIMM XCURRENT @ 1 - DUP C@ 128 OR SWAP C! ; -: : +: X: (xentry) ( 0e == compiledWord ) [ 0x0e LITN ] ,