1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-27 12:58:09 +11:00
collapseos/blk/808
Virgil Dupras c4db9d4420 8086: implement stack overflow error condition
Also, remove RSP underflow check from next for the same reason as
in the previous commit in z80.
2020-08-08 10:18:43 -04:00

11 lines
332 B
Plaintext

lblnext BSET PC 0x1d - ORG @ 0x1b + ! ( next )
( ovfl check )
BP SP CMPxx,
IFNC, ( BP >= SP )
SP PS_ADDR MOVxI, BP RS_ADDR MOVxI,
DI 0x13 ( oflw ) MOVxm, JMPs, L1 FWRs ( execute )
THEN,
DI DX MOVxx, ( <-- IP ) DX INCx, DX INCx,
DI [DI] MOVx[], ( wordref )
( continue to execute ) L1 FSET