I'm trying to use this SafeCopy routine with port $2A when port $20 is set to 1. However, I get problems that normally occur when one doesn't delay long enough for the LCD. In other words, the delay port doesn't seem to be working. Any suggestions?
safecopy2:
ld a, $87
out ($2A), a
ld c,$10
ld a,$80
setrow:
nop
nop
nop
nop
nop
;in b,(c)
;rl b
;jp c,setrow
out ($10),a
ld de,12
ld a,$20
col:
;in b,(c)
;rl b
;jp c,col
nop
nop
nop
nop
out ($10),a
push af
inc c
ld b,64
row:
rowwait:
;in a,($10)
;rla
;jp c,rowwait
ld a, (hl)
out (c), a
add hl,de
djnz rowwait
pop af
dec h
dec h
dec h
dec c
inc hl
inc a
cp $2c
jp nz,col
ret