diff --git a/blk/263 b/blk/263 index bf2ad7b..b48b461 100644 --- a/blk/263 +++ b/blk/263 @@ -1,14 +1,13 @@ VARIABLE XCURRENT - : XCON XCURRENT CURRENT* ! ; : XCOFF 0x02 RAM+ CURRENT* ! ; - : (xentry) XCON (entry) XCOFF ; : XCREATE (xentry) 11 C, ; : XCODE XCON CODE XCOFF ; : XIMM XCON IMMEDIATE XCOFF ; : _xapply ( a -- a-off ) DUP ORG @ > IF ORG @ - BIN( @ + THEN ; +: X' XCON ' XCOFF ; : X['] XCON ' _xapply LITA XCOFF ; : XCOMPILE XCON ' _xapply LITA diff --git a/blk/437 b/blk/437 index 65a31d5..361aab2 100644 --- a/blk/437 +++ b/blk/437 @@ -3,11 +3,11 @@ : LOOP COMPILE (loop) H@ - , ; IMMEDIATE ( LEAVE is implemented in low xcomp ) : LITN 32 , , ( 32 == NUMBER ) ; - -( ';' 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 +: _ ( : will get its name at the very end ) + (entry) + [ 14 ( == compiledWord ) LITN ] C, + BEGIN + WORD (find) + IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN + ELSE ( maybe number ) (parse) LITN THEN + AGAIN ; diff --git a/blk/438 b/blk/438 index e109431..cb829de 100644 --- a/blk/438 +++ b/blk/438 @@ -1,16 +1,9 @@ -XCURRENT @ ( to PSP ) -: : - (entry) - ( We cannot use LITN as IMMEDIATE because of bootstrapping - issues. Same thing for ",". - 32 == NUMBER 14 == compiledWord ) - [ 32 H@ ! 2 ALLOT 14 H@ ! 2 ALLOT ] C, - BEGIN - WORD - (find) - ( is word ) - IF DUP IMMED? IF EXECUTE ELSE , THEN - ( maybe number ) - ELSE (parse) LITN THEN - AGAIN ; -( from PSP ) ';' SWAP 4 - C! +( ';' 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 ) diff --git a/emul/forth.bin b/emul/forth.bin index 5c34ad7..cdb3751 100644 Binary files a/emul/forth.bin and b/emul/forth.bin differ