15
Op-Code
13
12
10
9
8
0
Condition
S
10-Bit Signed PC Offset
MSP430 and MSP430X Instructions
143
SLAU367P – October 2012 – Revised April 2020
Copyright © 2012–2020, Texas Instruments Incorporated
CPUX
4.5.1.3
Jump Instructions
shows the format for MSP430 and MSP430X jump instructions. The signed 10-bit word offset
of the jump instruction is multiplied by 2, sign-extended to a 20-bit address, and added to the 20-bit PC.
This allows jumps in a range of –511 to +512 words relative to the PC in the full 20-bit address space.
Jumps do not affect the status bits.
lists and describes the 8 jump instructions.
Figure 4-24. Format of Conditional Jump Instructions
Table 4-6. Conditional Jump Instructions
Mnemonic
S-Reg,
D-Reg
Operation
JEQ, JZ
Label
Jump to label if zero bit is set
JNE, JNZ
Label
Jump to label if zero bit is reset
JC
Label
Jump to label if carry bit is set
JNC
Label
Jump to label if carry bit is reset
JN
Label
Jump to label if negative bit is set
JGE
Label
Jump to label if (N .XOR. V) = 0
JL
Label
Jump to label if (N .XOR. V) = 1
JMP
Label
Jump to label unconditionally
4.5.1.4
Emulated Instructions
In addition to the MSP430 and MSP430X instructions, emulated instructions are instructions that make
code easier to write and read, but do not have op-codes themselves. Instead, they are replaced
automatically by the assembler with a core instruction. There is no code or performance penalty for using
emulated instructions. The emulated instructions are listed in
(1)
* = Status bit is affected
– = Status bit is not affected
0 = Status bit is cleared
1 = Status bit is set
Table 4-7. Emulated Instructions
Instruction
Explanation
Emulation
Status Bits
(1)
V
N
Z
C
ADC(.B) dst
Add Carry to dst
ADDC(.B) #0,dst
*
*
*
*
BR dst
Branch indirectly dst
MOV dst,PC
–
–
–
–
CLR(.B) dst
Clear dst
MOV(.B) #0,dst
–
–
–
–
CLRC
Clear Carry bit
BIC #1,SR
–
–
–
0
CLRN
Clear Negative bit
BIC #4,SR
–
0
–
–
CLRZ
Clear Zero bit
BIC #2,SR
–
–
0
–
DADC(.B) dst
Add Carry to dst decimally
DADD(.B) #0,dst
*
*
*
*
DEC(.B) dst
Decrement dst by 1
SUB(.B) #1,dst
*
*
*
*
DECD(.B) dst
Decrement dst by 2
SUB(.B) #2,dst
*
*
*
*
DINT
Disable interrupt
BIC #8,SR
–
–
–
–
EINT
Enable interrupt
BIS #8,SR
–
–
–
–
INC(.B) dst
Increment dst by 1
ADD(.B) #1,dst
*
*
*
*
INCD(.B) dst
Increment dst by 2
ADD(.B) #2,dst
*
*
*
*