Re: A86: Byte order


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

Re: A86: Byte order



On Sun, 28 Sep 1997, Martin Blix Grydeland wrote:

> But this never worked, and for fun I tried the more common sense method:
> ld de,$0010		;$00->e, $10->d
> add hl,de		;hl=hl+$10
> 
> This works excellent. Could somebody please tell me why the second version does not add $0100 to hl???


Words in memory have swapped bytes; registers do not.  Your method above
is correct, but your comments are not right.

	ld de, $0010	; $00->d, $10->e

--------
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


References: