e4a4a9800d
It's a bit more inconvenient in terms of register protection (BC is much more generally useful than IY), but it makes tight spots such as next and execute much faster, so I think it's worth it.
13 lines
331 B
Plaintext
13 lines
331 B
Plaintext
CODE (loop)
|
|
PC ORG @ 0x45 + ! ( stable ABI JP )
|
|
0 IX+ INC(IXY+), IFZ, 1 IX+ INC(IXY+), THEN, ( I++ )
|
|
( Jump if I <> I' )
|
|
A 0 IX+ LDrIXY, 2 IX- CP(IXY+), JRNZ, L1 BWR ( branch )
|
|
A 1 IX+ LDrIXY, 1 IX- CP(IXY+), JRNZ, L1 BWR ( branch )
|
|
( don't branch )
|
|
IX DECd, IX DECd, IX DECd, IX DECd,
|
|
BC INCd,
|
|
;CODE
|
|
|
|
|