2020-10-29 09:06:58 +11:00
|
|
|
: _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 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) 1 ( compiled ) C,
|
2020-05-16 12:44:49 +10:00
|
|
|
BEGIN
|
2020-10-29 09:06:58 +11:00
|
|
|
WORD DUP LIT" ;" S= IF DROP COMPILE EXIT EXIT THEN
|
|
|
|
FIND IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
|
|
|
|
ELSE ( maybe number ) (parse) LITN THEN
|
2020-05-16 12:44:49 +10:00
|
|
|
AGAIN ;
|