A86: Re: sprites


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

A86: Re: sprites




Oops actually hit send, SpriteLocation should be 8 bytes like

SpriteLocation:
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000
.db %00000000

>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
>
>