Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- axe=1
- #define bcall(x) rst 28h \ .dw x
- .db $BB,$6D
- .org $9D95
- bcall(4AD7h)
- bcall(4AEFh)
- di
- xor a
- out (8),a
- ld a,e
- ; call sendb
- ; ld a,d
- jp sendb
- sendb:
- ;;sends A, preserves regs except flags: returns c if good, nc if fail
- push bc
- ld c,0
- ld b,a
- ld a,$FD
- out (1),a
- cpl
- out (0),a ;Indicate we are ready to send
- _:
- in a,(1)
- and 40h
- jr z,__SendByteDone
- in a,(c) ;Loop is 58cc min before next write
- jp pe,-_ ;Keep looping till we get it
- out (0),a
- ld c,55h
- _:
- rrc b
- ccf
- rla
- sla c
- ccf
- rla
- out (0),a
- ex (sp),hl
- ex (sp),hl
- ld a,c
- jr nz,-_
- ;need 33cc
- push hl
- add hl,hl
- pop hl
- scf
- __SendByteDone
- out (0),a
- ld a,b
- pop bc
- ret
- .echo "Size:",$-9D95h
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement