mirror of
https://github.com/hsoft/collapseos.git
synced 2024-11-06 01:40:56 +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...
16 lines
529 B
Plaintext
16 lines
529 B
Plaintext
CODE (?br) ( 0x67 )
|
|
HL POPqq,
|
|
HLZ,
|
|
JRZ, L2 BWR ( BR + 2. False, branch )
|
|
L1 BSET ( loop will jump here )
|
|
( True, skip next 2 bytes and don't branch )
|
|
IY INCss, IY INCss,
|
|
JPNEXT, NOP, NOP, NOP,
|
|
CODE (loop) ( 0x77 )
|
|
0 IX+ INC(IXY+), IFZ, 1 IX+ INC(IXY+), THEN, ( I++ )
|
|
( Jump if I <> I' )
|
|
A 0 IX+ LDrIXY, 2 IX- CP(IXY+), JRNZ, L2 BWR ( branch )
|
|
A 1 IX+ LDrIXY, 1 IX- CP(IXY+), JRNZ, L2 BWR ( branch )
|
|
( don't branch )
|
|
IX DECss, IX DECss, IX DECss, IX DECss, JR, L1 BWR
|