1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-23 22:30:20 +10: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