Re: Snake en assembleur
Posté: 08 Mar 2017, 22:32
Merci TheMachine02 et Epharius . Oui j'ai complètement oublié que le registre bc etais utilisés pour x . Donc sa aurais fonctionner que pour une ligne de pixel .
Why you inc b and you subtract to c 256 ?
PT_ a écrit:
- Code: Tout sélectionner
ld a, y
ld de, pointeur
ld hl, data
CopyLine:
ld bc, x
ldir
ex de, hl
(inc b)
ld c, 320-256-x
add hl, bc
ex de, hl
dec a
jr nz, CopyLine
Why you inc b and you subtract to c 256 ?