1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-24 00:28:05 +11:00
collapseos/blk/397
Virgil Dupras eefbf66e95 De-stabilize (br), (?br), (loop), (s)
When writing the xcomp documentation, I realized that with careful
threading and by accepting a bit of code duplication in the xcomp
toolset, I could de-stabilize a couple of words.

(n) and EXIT are a bit trickier, but I think it can be done. It
would be nice to get rid of stable wordrefs...
2020-09-19 13:54:01 -04:00

16 lines
598 B
Plaintext

( Now we have "as late as possible" stuff. See bootstrap doc. )
: _bchk DUP 0x7f + 0xff > IF LIT< br-ovfl (print) ABORT THEN ;
: DO COMPILE 2>R H@ ; IMMEDIATE
: LOOP COMPILE (loop) H@ - _bchk C, ; IMMEDIATE
( LEAVE is implemented in low xcomp )
: LITN 0x23 ( n ) , , ;
( gets its name at the very end. can't comment afterwards )
: _ BEGIN LIT< ) WORD S= UNTIL ; IMMEDIATE
: _ ( : will get its name almost at the very end )
(entry) 1 ( compiled ) C,
BEGIN
WORD FIND
IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
ELSE ( maybe number ) (parse) LITN THEN
AGAIN ;