Next: st and sts
Up: Analogy for Addressing Modes
Previous: lds
Contents
The ld instruction pieces two post-its together, then read
them as an address (recall how an address or page number requires
two bytes). The instruction then reads from the location
specified by this address and
copies the value to a post-it.
It is more difficult to illustrate this instruction. Let us assume
r26 has a value of 0x4d, while r27
has a vlaue of 0x01. This is necessary because r26
and r27 combine to become X.
The instruction ld r14,X does the following:
- combine r26 and r27 for a 16-bit
value of 0x014d.
- read from location 0x014d
- copy the value to register r14
Tak Auyeung
2003-11-10