1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-09-07 02:08:45 +10:00
collapseos/blk/308
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

17 lines
320 B
Plaintext

CODE ROT ( a b c -- b c a )
HL POP, ( C ) DE POP, ( B ) IY POP, ( A ) chkPS,
DE PUSH, ( B ) HL PUSH, ( C ) IY PUSH, ( A )
;CODE
CODE DUP ( a -- a a )
HL POP, chkPS,
HL PUSH, HL PUSH,
;CODE
CODE ?DUP
HL POP, chkPS,
HL PUSH,
HLZ, IFNZ, HL PUSH, THEN,
;CODE
CODE DROP ( a -- )
HL POP,
;CODE