2020-08-30 16:53:27 -04:00
|
|
|
( Now we have "as late as possible" stuff. See bootstrap doc. )
|
2020-09-19 18:51:29 -04:00
|
|
|
: _bchk DUP 0x7f + 0xff > IF LIT" br ovfl" (print) ABORT THEN ;
|
2020-09-19 13:54:01 -04:00
|
|
|
: DO COMPILE 2>R H@ ; IMMEDIATE
|
|
|
|
: LOOP COMPILE (loop) H@ - _bchk C, ; IMMEDIATE
|
2020-05-15 22:44:49 -04:00
|
|
|
( LEAVE is implemented in low xcomp )
|
2020-09-19 19:44:15 -04:00
|
|
|
: LITN COMPILE (n) , ;
|
2020-05-15 22:44:49 -04:00
|
|
|
( gets its name at the very end. can't comment afterwards )
|
2020-09-19 18:51:29 -04:00
|
|
|
: _ BEGIN LIT" )" WORD S= UNTIL ; IMMEDIATE
|
2020-05-15 22:44:49 -04:00
|
|
|
: _ ( : will get its name almost at the very end )
|
2020-06-17 21:41:01 -04:00
|
|
|
(entry) 1 ( compiled ) C,
|
2020-05-15 22:44:49 -04:00
|
|
|
BEGIN
|
2020-09-19 20:35:35 -04:00
|
|
|
WORD DUP LIT" ;" S= IF DROP COMPILE EXIT EXIT THEN
|
2020-09-19 20:19:23 -04:00
|
|
|
FIND IF ( is word ) DUP IMMED? IF EXECUTE ELSE , THEN
|
2020-05-15 22:44:49 -04:00
|
|
|
ELSE ( maybe number ) (parse) LITN THEN
|
|
|
|
AGAIN ;
|