1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-13 09:08:08 +11:00
collapseos/blk/310
Virgil Dupras bf4ab0f1b4 z80: protect or avoid BC wherever it's used
For the IY->BC move, of course.
2020-07-05 23:12:17 -04:00

16 lines
294 B
Plaintext

CODE PICK EXX, ( protect BC )
HL POP,
( x2 )
L SLA, H RL,
SP ADDHLd,
C (HL) LDrr,
HL INCd,
B (HL) LDrr,
( check PS range before returning )
EXDEHL,
HL PS_ADDR LDdn,
DE SUBHLd,
IFC, EXX, lblofl @ JP, THEN,
BC PUSH,
EXX, ( unprotect BC ) ;CODE