1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-07-27 11:30:20 +10:00
collapseos/blk/305
Virgil Dupras 40f92b9bab z80: optimize chkPS
Inline it in next and make chkPS, call a newly reserved label for
it directly, removing a layer of indirection. This frees a spot in
the stable ABI.
2020-06-14 09:48:10 -04:00

17 lines
426 B
Plaintext

L4 BSET ( chkPS )
( Note that you only need to call this in words that push
back to PSP. If they don't, calling chkPS is redundant with
check in next )
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 - LDddnn,
SP SUBHLss,
EXX,
CNC RETcc, ( PS_ADDR >= SP? good )
JR, L2 BWR ( abortUnderflow-B298 )