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.
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...