Re: A82: argh.. really dumb question


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

Re: A82: argh.. really dumb question




> 
> "ld (hl),hl" is a silly instruction if you think about it.  all it
> would do is store the address of itself.  i'm not sure the best way,
> but you could do:
> 
> Code:
>  ....
>  ld hl,Array
>  ld de,50		; replace 10 with 50
>  ld (hl),d
>  inc hl
>  ld (hl),e

I think this should be ld(hl),e \ inc hl \ ld (hl),d instead. Words are stored 
backwards, remember?

>  ....
> 
> Array:
>  .dw 10,20,30,40

Wouter Demuynck  |  kadem@online.be
ICQ#4538550 | http://come.to/knurft


References: