A86: Re: Moving_(MemoryLocations)
[Prev][Next][Index][Thread]
A86: Re: Moving_(MemoryLocations)
ld h,d
ld l,e
just pretend that's the two-byte opcode for ld hl,de =)
depending on what you're doing, it might make more sense to use the stack to
push and pop hl, or use ex de,hl...
----- Original Message -----
From: Ivan J. Becica <ijbecica@erols.com>
To: <assembly-86@lists.ticalc.org>
Sent: Thursday, May 18, 2000 9:19 PM
Subject: A86: Moving_(MemoryLocations)
>
> I am currently writing a small program (my first in asm) which has a
routine which
> places a whole line of strings on the screen... they look somewhat like
this:
> .db "A",0
> .db "B",0 ;and so on
> Of course I use _puts and it seems to automatically go down the line of
strings as there
> is a loop involved. What I want to do is move display "B" for example
where "A" was
> previously. I figured out how to do this- load the memory location of the
"B" string
> with the memory location of the "A" string. My problem is: this process
ruins the
> process of displaying the strings (because now the B string is out of
place). So is
> there any way to _in effect_ to do this:
> ld hl,de ; for example when de points to "B" and hl points to
"A"
> Although what I have just proposed is impossible, perhaps there a
slightlier lengthier
> way to do the same thing WITHOUT having to mess with labels. Relying on
labels will, in
> the long run, force me to write a lengthy bit of code in another
routine...
>
>
> Thanks
>
>
References: