A86: Moving_(MemoryLocations)
[Prev][Next][Index][Thread]
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
Follow-Ups:
References: