A83: Re: Can't get this routine to work


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

A83: Re: Can't get this routine to work




Well, your counting method is all screwed up. Check this out. Instead of

dec c
jr nz,SwapApd2
dec b
jr nz,SwapApd2

use

ld a,b
or c
jr nz,SwapApd2

Because ldi does this, in ASM-speak (cause some of these aren't real
commands)

ld (de),(hl)
inc hl
inc de
dec bc

So bc is already decremented for you.

--
Stephen Compall
http://ti.arc.hey.to





Follow-Ups: