A86: Byte order
[Prev][Next][Index][Thread]
A86: Byte order
Sorry if this is another stupid beginners question, but I really want to make this clear for myself.
I want to add $10 to hl. Because of swapped LSB/MSB, I thought this was the way to du it:
ld de,$1000 ;$10->e, $00->d
add hl,de ;hl=hl+$10
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???
Regards,
Martin
Stud. tech. Martin Blix Grydeland, Computer Science NTNU
E-mail: grydelan@stud.ntnu.no
Web: http://www.stud.ntnu.no/~grydelan
Follow-Ups: