mirror of
https://github.com/hsoft/collapseos.git
synced 2024-12-29 00:38:05 +11:00
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.
16 lines
356 B
Plaintext
16 lines
356 B
Plaintext
CODE (br)
|
|
L1 BSET ( used in ?br and loop )
|
|
PC ORG @ 0x3d + ! ( stable ABI JP )
|
|
LDA(BC), H 0 LDri, L A LDrr,
|
|
RLA, IFC, H DECr, THEN,
|
|
BC ADDHLd, B H LDrr, C L LDrr,
|
|
;CODE
|
|
CODE (?br)
|
|
PC ORG @ 0x41 + ! ( stable ABI JP )
|
|
HL POP,
|
|
HLZ,
|
|
JRZ, L1 BWR ( br + 1. False, branch )
|
|
( True, skip next byte and don't branch )
|
|
BC INCd,
|
|
;CODE
|