1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-11-13 10:38:06 +11:00
collapseos/blk/306
Virgil Dupras e4a4a9800d z80: Use BC as IP register instead of IY
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.
2020-07-06 23:31:00 -04:00

10 lines
304 B
Plaintext

CODE (n) ( number literal )
PC ORG @ 0x25 + ! ( stable ABI JP )
( Literal value to push to stack is next to (n) reference
in the atom list. That is where IP is currently pointing.
Read, push, then advance IP. )
LDA(BC), L A LDrr, BC INCd,
LDA(BC), H A LDrr, BC INCd,
HL PUSH,
;CODE