A86: sprites


[Prev][Next][Index][Thread]

A86: sprites




What's wrong with this bit of code?


;copy 8x8 sprite at hl to de

copy_sprite:
 ld bc,8                   ;sprite size
 ld a,15
the_loop:
 ldi
 ret po                       ;return when bc is 0
 add a,e
 ld e,a                       ;make de point to next row
 jr nc,the_loop
 inc d                        ;add carry
 jr the_loop