CPU Registers
4-18
16-Bit MSP430X CPU
4.4.2
Indexed Mode
The Indexed mode calculates the address of the operand by adding the signed
index to a CPU register. The Indexed mode has three addressing possibilities:
-
Indexed mode in lower 64-KB memory
-
MSP430 instruction with Indexed mode addressing memory above the
lower 64-KB memory.
-
MSP430X instruction with Indexed mode
Indexed Mode in Lower 64 KB Memory
If the CPU register Rn points to an address in the lower 64 KB of the memory
range, the calculated memory address bits 19:16 are cleared after the addition
of the CPU register Rn and the signed 16-bit index. This means, the calculated
memory address is always located in the lower 64 KB and does not overflow
or underflow out of the lower 64-KB memory space. The RAM and the
peripheral registers can be accessed this way and existing MSP430 software
is usable without modifications as shown in Figure 4−15.
Figure 4−15. Indexed Mode in Lower 64 KB
16-bit
signed index
CPU Register
Rn
16-bit signed add
0
Memory address
ÇÇÇÇÇ
ÇÇÇÇÇ
ÇÇÇÇÇ
ÇÇÇÇÇ
ÇÇÇÇÇ
FFFFF
00000
Lower 64KB
0FFFF
10000
Rn.19:0
Lower 64 KB.
Rn.19:16 = 0
16-bit byte index
0
19 16 15
0
S
Length:
Two or three words
Operation:
The signed 16-bit index is located in the next word after the
instruction and is added to the CPU register Rn. The resulting
bits 19:16 are cleared giving a truncated 16-bit memory
address, which points to an operand address in the range
00000h to 0FFFFh. The operand is the content of the
addressed memory location.
Comment:
Valid for source and destination. The assembler calculates
the register index and inserts it.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...