1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-23 22:28:06 +11:00
collapseos/blk/286
Virgil Dupras d041b91846 Optimize chkPS
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...
2020-05-22 23:12:03 -04:00

17 lines
383 B
Plaintext

CODE >R ( 0xa8 )
HL POPqq,
17 BCALL, ( 17 == pushRS )
;CODE NOP, NOP, NOP,
CODE 2>R ( 0xb9 )
DE POPqq, HL POPqq,
17 BCALL, ( 17 == pushRS ) EXDEHL, 17 BCALL,
;CODE NOP, NOP, NOP,
CODE R> ( 0xce )
20 BCALL, ( 20 == popRS )
HL PUSHqq,
;CODE
CODE 2R> ( 0xdc )
20 BCALL, ( 20 == popRS ) EXDEHL, 20 BCALL,
HL PUSHqq, DE PUSHqq,
;CODE ( END OF STABLE ABI )