mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-05 22:20:55 +11:00
2e9e7047bf
This should allow me to simplify LOAD's exit mechanism on block end.
17 lines
369 B
Plaintext
17 lines
369 B
Plaintext
: INTERPRET
|
|
BEGIN
|
|
WORD DUP C@ EOT? IF DROP EXIT THEN
|
|
(find)
|
|
NOT IF (parse) ELSE EXECUTE THEN
|
|
C<? NOT IF LIT< (ok) (find) IF EXECUTE THEN THEN
|
|
AGAIN ;
|
|
|
|
( Drop RSP until I-2 == INTERPRET. )
|
|
: EXIT!
|
|
['] INTERPRET ( I )
|
|
BEGIN ( I )
|
|
DUP ( I I )
|
|
R> DROP I 2- @ ( I I a )
|
|
= UNTIL
|
|
DROP ;
|