Motorola HC12 Manuale Utente

Pagina di 328
User’s Manual
MCUez HC12 Assembler
142
Assembler Syntax
MOTOROLA
Assembler Syntax
7.4.3.14  Indexed, Accumulator Offset
This addressing mode adds the value in the specified accumulator to the base
index register to form the address, which is referenced in the instruction. The
base index register may be X, Y, SP, or PC. The accumulator may be A, B, or D.
Example:
main:
            LDAB #$20
            LDX  #$600
            LDAA B,X
            LDY #$1000
            STAA $140, Y
The value stored in B ($20) is added to the value of X ($600) to form a memory
address ($620). The value stored at $620 is loaded in accumulator A.