
MSP430 and MSP430X Instructions
Table 4-7. Emulated Instructions (continued)
Status Bits
(1)
Instruction
Explanation
Emulation
V
N
Z
C
Invert dst
*
*
*
*
INV(.B) dst
XOR(.B) #–1,dst
No operation
–
–
–
–
NOP
MOV R3,R3
Pop operand from stack
–
–
–
–
POP dst
MOV @SP+,dst
Return from subroutine
–
–
–
–
RET
MOV @SP+,PC
Shift left dst arithmetically
*
*
*
*
RLA(.B) dst
ADD(.B) dst,dst
Shift left dst logically through Carry
*
*
*
*
RLC(.B) dst
ADDC(.B) dst,dst
Subtract Carry from dst
*
*
*
*
SBC(.B) dst
SUBC(.B) #0,dst
Set Carry bit
–
–
–
1
SETC
BIS #1,SR
Set Negative bit
–
1
–
–
SETN
BIS #4,SR
Set Zero bit
–
–
1
–
SETZ
BIS #2,SR
Test dst (compare with 0)
0
*
*
1
TST(.B) dst
CMP(.B) #0,dst
4.5.1.5
MSP430 Instruction Execution
The number of CPU clock cycles required for an instruction depends on the instruction format and the
addressing modes used – not the instruction itself. The number of clock cycles refers to MCLK.
4.5.1.5.1 Instruction Cycles and Length for Interrupt, Reset, and Subroutines
lists the length and the CPU cycles for reset, interrupts, and subroutines.
Table 4-8. Interrupt, Return, and Reset Cycles and Length
Execution Time
Length of Instruction
Action
(MCLK Cycles)
(Words)
Return from interrupt RETI
5
1
Return from subroutine RET
4
1
Interrupt request service (cycles needed before first
6
–
instruction)
WDT reset
4
–
Reset (RST/NMI)
4
–
4.5.1.5.2 Format II (Single-Operand) Instruction Cycles and Lengths
lists the length and the CPU cycles for all addressing modes of the MSP430 single-operand
instructions.
Table 4-9. MSP430 Format II Instruction Cycles and Length
No. of Cycles
Length of
Addressing Mode
Example
RRA, RRC
Instruction
PUSH
CALL
SWPB, SXT
Rn
1
3
4
1
SWPB R5
@Rn
3
3
4
1
RRC @R9
@Rn+
3
3
4
1
SWPB @R10+
#N
N/A
3
4
2
CALL #LABEL
X(Rn)
4
4
5
2
CALL 2(R7)
EDE
4
4
5
2
PUSH EDE
&EDE
4
4
6
2
SXT &EDE
117
SLAU272C – May 2011 – Revised November 2013
CPUX
Copyright © 2011–2013, Texas Instruments Incorporated