Re: A82: Copying HL -- DE skipping bytes


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

Re: A82: Copying HL -- DE skipping bytes




>Firstly, I'm pretty sure what you actually want to do is copy a bunch 
of
>memory pointed to by hl to the address stored in de, not store h in d 
as
>your statement implies. Secondly, if you're trying to do something like
>this:
>hl-> 1,2,3,4,5
>de-> 1,x,2,x,3,x,4,x,5
>then your code (both versions, since they do the same thing... the 
second
>is better, though can be further optimized, slightly) works fine.
>
>Jeremy Wazny
>

I don't know why but my code(the first one) does this:

input:
   hl->1,2,3,4,5,6
output:
   de->1,x,1,x,1,x,1  (x=blank)

   It will copy the first byte of HL to every other byte of de.
 Sam

______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com