1
0
mirror of https://github.com/hsoft/collapseos.git synced 2024-12-26 06:28:08 +11:00
collapseos/blk/814
Virgil Dupras 6bc1738bfd pcat: implement (loop)
8086 asm is a lot terser than z80... Those indirect memory operations
are very handy.
2020-06-18 15:01:04 -04:00

16 lines
445 B
Plaintext

CODE (loop) ( 0x80 )
[BP] 0 INC[w]+, ( I++ )
( Jump if I <> I' )
AX [BP] 0 MOVx[]+, AX [BP] -2 CMPx[]+,
JNZ, L2 @ RPCs, ( branch )
( don't branch )
BP 4 SUBxi, JMPs, L1 @ RPCs,
ORG @ 0xa3 + HERE !
CODE 2>R ( 0xa9 )
[BP] 4 POP[w]+, [BP] 2 POP[w]+, BP 4 ADDxi,
;CODE NOP, NOP, NOP, NOP, NOP,
CODE (n) ( 0xbf, number literal )
DI DX MOVxx, DI [DI] MOVx[], DI PUSHx,
DX INCx, DX INCx,
;CODE ( END OF STABLE ABI )