1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-21 02:38:05 +11:00
collapseos/blk/290
Virgil Dupras 7359717000 z80: add missing chkPS, calls
chkPS, used to be only for words that pushed back to PS, but I've
recently removed underflow checks from next and I forgot to add
missing chkPS, calls that go with this change.
2020-08-23 08:43:51 -04:00

16 lines
483 B
Plaintext

lblchkPS BSET ( chkPS )
( thread carefully in there: sometimes, we're in the
middle of a EXX to protect BC. BC must never be touched
here. )
EXX,
( We have the return address for this very call on the stack
and protected registers. 2- is to compensate that. )
HL PS_ADDR 2- LDdi,
SP SUBHLd,
EXX,
CNC RETc, ( PS_ADDR >= SP? good )
( continue to uflw )
lbluflw BSET ( abortUnderflow )
DE BIN( @ 0x06 ( uflw ) + LDd(i),
JR, lblexec BWR