Datasheet
15 12 11 8 7 6 5 4 0
Op-code Rsrc Ad B/W As Rdst
SourceorDestination15:0
Destination15:0
MSP430 and MSP430X Instructions
www.ti.com
4.5 MSP430 and MSP430X Instructions
MSP430 instructions are the 27 implemented instructions of the MSP430 CPU. These instructions are
used throughout the 1MB memory range unless their 16-bit capability is exceeded. The MSP430X
instructions are used when the addressing of the operands, or the data length exceeds the 16-bit
capability of the MSP430 instructions.
There are three possibilities when choosing between an MSP430 and MSP430X instruction:
• To use only the MSP430 instructions – The only exceptions are the CALLA and the RETA instruction.
This can be done if a few, simple rules are met:
– Placement of all constants, variables, arrays, tables, and data in the lower 64KB. This allows the
use of MSP430 instructions with 16-bit addressing for all data accesses. No pointers with 20-bit
addresses are needed.
– Placement of subroutine constants immediately after the subroutine code. This allows the use of
the symbolic addressing mode with its 16-bit index to reach addresses within the range of
PC + 32KB.
• To use only MSP430X instructions – The disadvantages of this method are the reduced speed due to
the additional CPU cycles and the increased program space due to the necessary extension word for
any double operand instruction.
• Use the best fitting instruction where needed.
The following sections list and describe the MSP430 and MSP430X instructions.
4.5.1 MSP430 Instructions
The MSP430 instructions can be used, regardless if the program resides in the lower 64KB or beyond it.
The only exceptions are the instructions CALL and RET, which are limited to the lower 64-KB address
range. CALLA and RETA instructions have been added to the MSP430X CPU to handle subroutines in the
entire address range with no code size overhead.
4.5.1.1 MSP430 Double-Operand (Format I) Instructions
Figure 4-21 shows the format of the MSP430 double-operand instructions. Source and destination words
are appended for the Indexed, Symbolic, Absolute, and Immediate modes. Table 4-4 lists the 12 MSP430
double-operand instructions.
Figure 4-21. MSP430 Double-Operand Instruction Format
142
CPUX SLAU144J–December 2004–Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated