Re: A86: Re: copying BDE to AHL


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

Re: A86: Re: copying BDE to AHL




I think I see a problem not sure thouigh?
doesn't the ld command update the Accumulater

so should we go:
ld h,d
ld l,e
ld a,b ;Now accumulater (a) should be right

-----Original Message-----
From: Dan Eble <eble@cis.ohio-state.edu>
To: assembly-86@lists.ticalc.org <assembly-86@lists.ticalc.org>
Date: Saturday, December 20, 1997 1:13 PM
Subject: Re: A86: Re: copying BDE to AHL


>
>On Sat, 20 Dec 1997, Garcia wrote:
>
>> ld a,b
>> push hl
>> ex de,hl
>> pop hl
>
>
>OUCH!  Never, ever, EVER use the stack when it can easily be avoided.  The
>following is smaller and much faster:
>
> ld a,b
> ld h,d
> ld l,e
>
>(BTW, didn't you mean to push/pop DE instead of HL?)
>
>--------
>Dan Eble <eble@cis.ohio-state.edu>
>         (http://www.cis.ohio-state.edu/~eble)
>
>"Behold, how great a matter a little fire kindleth!" - James 3:5
>
>