xxxxh
Address
Space
0778h
3456h
PC
2103Ah
21038h
21036h
Before:
Address
Space
After:
50B2h
21034h
xxxxh
0778h
3456h
PC
2103Ah
21038h
21036h
50B2h
21034h
xxxxh
2345h
0077Ah
00778h
xxxxh
579Bh
0077Ah
00778h
3456h
+2345h
579Bh
src
dst
Sum
Addressing Modes
139
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
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 2 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:
2 or 3 words. 1 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
Example:
ADD #3456h,&TONI
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