2100h
Address
Space
2346h
55D6h
PC
21038h
21036h
21034h
23456h
45678h
R5
R6
45678h
+32100h
77778h
Register
Before:
Address
Space
Register
After:
PC
23456h
45678h
R5
R6
0001h
2345h
7777Ah
77778h
0007h
7777h
7777Ah
77778h
65432h
+12345h
77777h
src
dst
Sum
0006h
5432h
3579Eh
3579Ch
0006h
5432h
3579Eh
3579Ch
1883h
21032h
xxxxh
2103Ah
2100h
2346h
55D6h
21038h
21036h
21034h
1883h
21032h
xxxxh
2103Ah
23456h
+12346h
3579Ch
Addressing Modes
128
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
4.4.2.3
MSP430X Instruction With Indexed Mode
When using an MSP430X instruction with indexed mode, the operand can be located anywhere in the
range of Rn + 19 bits.
Length:
3 or 4 words
Operation:
The operand address is the sum of the 20-bit CPU register content and the 20-bit
index. The 4 MSBs of the index are contained in the extension word; the 16 LSBs
are contained in the word following the instruction. The CPU register is not modified
Comment:
Valid for source and destination. The assembler calculates the register index and
inserts it.
Example:
ADDX.A 12346h(R5),32100h(R6) ;
This instruction adds the 20-bit data contained in the source and the destination
addresses and places the result into the destination.
Source:
2 words pointed to by R5 + 12346h which results in address 12346h =
3579Ch.
Destination:
2 words pointed to by R6 + 32100h which results in address 32100h =
77778h.
The extension word contains the MSBs of the source index and of the destination index and the A/L bit for
20-bit data. The instruction word uses byte mode due to the 20-bit data length with bits A/L:B/W = 01.