mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-14 18:48:06 +11:00
d041b91846
Use EXX instead of the stack for HL protection and remove all spurious uses of chkPS, I wanted to inline chkPS in next because of its "tight loop" status, but for reasons I don't understand, doing so breaks Collapse OS. Later...
14 lines
433 B
Plaintext
14 lines
433 B
Plaintext
PC ORG @ 0x1e + ! ( 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 )
|
|
|