CPU Registers
4-21
16-Bit MSP430X CPU
Length:
Two or three words
Operation:
The sign-extended 16-bit index in the next word after the
instruction is added to the 20 bits of the CPU register Rn. This
delivers a 20-bit address, which points to an address in the
range 0 to FFFFFh. 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.
Example:
ADD.W 8346h(R5),2100h(R6);
This instruction adds the 16-bit data contained in the source and the
destination addresses and places the 16-bit result into the destination. Source
and destination operand can be located in the entire address range.
Source:
The word pointed to by R5 + 8346h. The negative index
8346h is sign-extended, which results in address
F8346h = 1B79Ch.
Destination:
The word pointed to by R6 + 2100h results in address
2100h = 17778h.
Figure 4−18. Example for the Indexed Mode
xxxxh
Address
Space
2100h
8346h
PC
1103Ah
11038h
11036h
23456h
15678h
R5
R6
15678h
+02100h
17778h
Register
Before:
Address
Space
Register
After:
5596h
11034h
xxxxh
2100h
8346h
PC
1103Ah
11038h
11036h
23456h
15678h
R5
R6
5596h
11034h
xxxxh
2345h
1777Ah
17778h
xxxxh
7777h
1777Ah
17778h
05432h
+02345h
07777h
src
dst
Sum
23456h
+F8346h
1B79Ch
xxxxh
5432h
1B79Eh
1B79Ch
xxxxh
5432h
1B79Eh
1B79Ch
Содержание 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 ...