
xxxxh
Address
Space
0000h
55F6h
PC
21038h
21036h
21034h
3579Ch
00778h
R5
R6
00778h
+0000h
00778h
Register
Before:
Address
Space
Register
After:
xxxxh
0000h
55F6h
PC
21038h
21036h
21034h
3579Dh
00778h
R5
R6
xxxxh
xx45h
0077Ah
00778h
xxxxh
xx77h
0077Ah
00778h
32h
+45h
77h
src
dst
Sum
xxh
32h
3579Dh
3579Ch
xxh
xx32h
3579Dh
3579Ch
R5
R5
Addressing Modes
4.4.7 Immediate Mode
The Immediate mode allows accessing constants as operands by including the constant in the memory
location following the instruction. The PC is used with the Indirect Autoincrement mode. The PC points to
the immediate value contained in the next word. After the fetching of the immediate operand, the PC is
incremented by 2 for byte, word, or address-word instructions. The Immediate mode has two addressing
possibilities:
•
8-bit or 16-bit constants with MSP430 instructions
•
20-bit constants with MSP430X instruction
4.4.7.1
MSP430 Instructions With Immediate Mode
If an MSP430 instruction is used with Immediate addressing mode, the constant is an 8- or 16-bit value
and is stored in the word following the instruction.
Length:
Two or three words. One word less if a constant of the constant generator can be
used for the immediate operand.
Operation:
The 16-bit immediate source operand is used together with the 16-bit destination
operand.
Comment:
Valid only for the source operand
ADD #3456h,&TONI
Example:
This instruction adds the 16-bit immediate operand 3456h to the data in the
destination address TONI.
Source:
16-bit immediate value 3456h
Destination:
Word at address TONI
112
CPUX
SLAU272C – May 2011 – Revised November 2013
Copyright © 2011–2013, Texas Instruments Incorporated