mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-26 04:18:05 +11:00
17 lines
597 B
Plaintext
17 lines
597 B
Plaintext
( Now we have "as late as possible" stuff )
|
|
: _bchk DUP 0x7f + 0xff > IF LIT< br-ovfl (print) ABORT THEN ;
|
|
: DO COMPILE 2>R H@ ; IMMEDIATE
|
|
: LOOP COMPILE (loop) H@ - _bchk , ; IMMEDIATE
|
|
( LEAVE is implemented in low xcomp )
|
|
: LITN COMPILE (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)
|
|
[ 14 ( == compiledWord ) LITN ] C,
|
|
BEGIN
|
|
WORD FIND
|
|
IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
|
|
ELSE ( maybe number ) (parse) LITN THEN
|
|
AGAIN ;
|