mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-24 02:08:06 +11:00
816563e2e3
This is done by adding a "C<* override" layer that is reset to 0 on ABORT. The problem was that when ABORT happened during a LOAD, we had a resetted RSP and started from a clean INTERPRET, but LOAD didn't have the opportunity to restore C<*, which caused it to continue interpreting from the faulty BLK. With a C<* override, we don't need to *restore* C<*, we just need to clear the override.
17 lines
366 B
Plaintext
17 lines
366 B
Plaintext
( This is only the "early parser" in earlier stages. No need
|
|
for an abort message )
|
|
: (parse) (parsed) NOT IF ABORT THEN ;
|
|
|
|
: C<? 0x06 RAM+ @ DUP 2 > IF EXECUTE THEN ( 06 == C<?* ) ;
|
|
: C<
|
|
0x08 RAM+ @ ( 08 == C<* override )
|
|
DUP NOT IF DROP 0x0c RAM+ @ THEN ( 0c == C<* )
|
|
EXECUTE
|
|
;
|
|
|
|
: , HERE @ ! HERE @ 2+ HERE ! ;
|
|
|
|
: C, HERE @ C! HERE @ 1+ HERE ! ;
|
|
|
|
|