Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- __GetByteLoop:
- in a,(0)
- srl a
- jr z,__GetByteLoop ;31cc loop
- rl l
- jr nc,__GetByteLoop ;46cc loop
- __GetByteLoop:
- in a,(c)
- jr z,__GetByteLoop ;24cc loop
- rra
- rl l
- jp nc,__GetByteLoop ;41cc loop
- __GetByteLoop:
- in l,(c)
- jp (hl)
- .org $8500
- __GetByteJump:
- jr __GetByteLoop ;28cc loop
- ccf
- rla
- jp c,__GetByteLoop ;30/34cc loop
- __GetByteLoop:
- in l,(c)
- jp (hl)
- .org $8500
- __GetByteJump:
- jp (ix) ;24cc loop
- ccf
- rla
- jp c,__GetByteLoop ;30/34cc loop
- .org $8500
- __GetByteLoop:
- ccf
- rla
- ret c
- in l,(c)
- jp (hl) ;21/25/29cc loop
- SendByte:
- ld bc,$0302
- ld a,c
- out (0),a
- SendByteWait:
- ld a,h
- or l
- jr z,SendByteEnd
- dec hl
- in a,(0)
- and b
- jr nz,SendByteWait
- sla e
- sbc a,c
- out (0),a
- inc hl
- ld a,(hl)
- SendByteLoop:
- ld a,b
- out (0),a ;33cc
- sbc a,c
- out (0),a ;15cc
- sla e
- jp nz,SendByteLoop ;48cc loop
- sbc a,c
- out (0),a ;33cc
- xor a
- out (0),a ;15cc
- ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement