[A86] Re: Adding to HL register pair
[Prev][Index][Thread]
[A86] Re: Adding to HL register pair
hi,
ld e,d
ld d,0
add hl,de
I think this would be a better soluton.. but it destroy e
Xavier LaRue
On Wed, 19 Mar 2003 20:52:47 -0600
cws <cws@tds.net> wrote:
> If I want to add the contents of register d to the register pair, HL,
> would this work:
>
> ld a, l
> add d
> ld l, a
> jr nc, no_carry
> inc h
> no_carry:
>
> And, is there a better way to do this? HL points to a space in memory and I
> want to move the pointer ahead an amount equal to d. Thanks in advance.
> Alex
>
>
References: