Instruction Set
3-75
RISC 16−Bit CPU
Table 3−17.MSP430 Instruction Set
Mnemonic
Description
V
N
Z
C
ADC(.B)
†
dst
Add C to destination
dst + C
→
dst
*
*
*
*
ADD(.B)
src,dst
Add source to destination
src + dst
→
dst
*
*
*
*
ADDC(.B)
src,dst
Add source and C to destination
src + dst + C
→
dst
*
*
*
*
AND(.B)
src,dst
AND source and destination
src .and. dst
→
dst
0
*
*
*
BIC(.B)
src,dst
Clear bits in destination
.not.src .and. dst
→
dst
−
−
−
−
BIS(.B)
src,dst
Set bits in destination
src .or. dst
→
dst
−
−
−
−
BIT(.B)
src,dst
Test bits in destination
src .and. dst
0
*
*
*
BR
†
dst
Branch to destination
dst
→
PC
−
−
−
−
CALL
dst
Call destination
PC+2
→
stack, dst
→
PC
−
−
−
−
CLR(.B)
†
dst
Clear destination
0
→
dst
−
−
−
−
CLRC
†
Clear C
0
→
C
−
−
−
0
CLRN
†
Clear N
0
→
N
−
0
−
−
CLRZ
†
Clear Z
0
→
Z
−
−
0
−
CMP(.B)
src,dst
Compare source and destination
dst − src
*
*
*
*
DADC(.B)
†
dst
Add C decimally to destination
dst + C
→
dst (decimally)
*
*
*
*
DADD(.B)
src,dst
Add source and C decimally to dst.
src + dst + C
→
dst (decimally)
*
*
*
*
DEC(.B)
†
dst
Decrement destination
dst − 1
→
dst
*
*
*
*
DECD(.B)
†
dst
Double-decrement destination
dst − 2
→
dst
*
*
*
*
DINT
†
Disable interrupts
0
→
GIE
−
−
−
−
EINT
†
Enable interrupts
1
→
GIE
−
−
−
−
INC(.B)
†
dst
Increment destination
dst +1
→
dst
*
*
*
*
INCD(.B)
†
dst
Double-increment destination
dst+2
→
dst
*
*
*
*
INV(.B)
†
dst
Invert destination
.not.dst
→
dst
*
*
*
*
JC/JHS
label
Jump if C set/Jump if higher or same
−
−
−
−
JEQ/JZ
label
Jump if equal/Jump if Z set
−
−
−
−
JGE
label
Jump if greater or equal
−
−
−
−
JL
label
Jump if less
−
−
−
−
JMP
label
Jump
PC + 2 x offset
→
PC
−
−
−
−
JN
label
Jump if N set
−
−
−
−
JNC/JLO
label
Jump if C not set/Jump if lower
−
−
−
−
JNE/JNZ
label
Jump if not equal/Jump if Z not set
−
−
−
−
MOV(.B)
src,dst
Move source to destination
src
→
dst
−
−
−
−
NOP
†
No operation
−
−
−
−
POP(.B)
†
dst
Pop item from stack to destination
@SP
→
dst, SP+2
→
SP
−
−
−
−
PUSH(.B)
src
Push source onto stack
SP − 2
→
SP, src
→
@SP
−
−
−
−
RET
†
Return from subroutine
@SP
→
PC, SP + 2
→
SP
−
−
−
−
RETI
Return from interrupt
*
*
*
*
RLA(.B)
†
dst
Rotate left arithmetically
*
*
*
*
RLC(.B)
†
dst
Rotate left through C
*
*
*
*
RRA(.B)
dst
Rotate right arithmetically
0
*
*
*
RRC(.B)
dst
Rotate right through C
*
*
*
*
SBC(.B)
†
dst
Subtract not(C) from destination
dst + C
→
dst
*
*
*
*
SETC
†
Set C
1
→
C
−
−
−
1
SET
†
Set N
1
→
N
−
1
−
−
SETZ
†
Set Z
1
→
C
−
−
1
−
SUB(.B)
src,dst
Subtract source from destination
dst + .not.src + 1
→
dst
*
*
*
*
SUBC(.B)
src,dst
Subtract source and not(C) from dst.
dst + .not.src + C
→
dst
*
*
*
*
SWPB
dst
Swap bytes
−
−
−
−
SXT
dst
Extend sign
0
*
*
*
TST(.B)
†
dst
Test destination
dst + 1
0
*
*
1
XOR(.B)
src,dst
Exclusive OR source and destination
src .xor. dst
→
dst
*
*
*
*
† Emulated Instruction
Summary of Contents for MSP430x1xx
Page 1: ... 2005 Mixed Signal Products User s Guide SLAU049E ...
Page 6: ...vi ...
Page 18: ...1 6 Introduction ...
Page 36: ...2 18 System Resets Interrupts and Operating Modes ...
Page 112: ...3 76 ...
Page 130: ...4 18 Basic Clock Module ...
Page 152: ...5 22 Flash Memory Controller ...
Page 160: ...6 8 Supply Voltage Supervisor ...
Page 168: ...7 8 Hardware Multiplier ...
Page 192: ...8 24 ...
Page 200: ...9 8 Digital I O ...
Page 234: ...11 24 Timer_A ...
Page 260: ...12 26 Timer_B ...
Page 291: ...13 31 USART Peripheral Interface UART Mode ...
Page 314: ...14 23 USART Peripheral Interface SPI Mode ...
Page 346: ...15 32 USART Peripheral Interface I2C Mode ...
Page 358: ...16 12 Comparator_A ...
Page 386: ...17 28 ADC12 ...
Page 418: ...18 32 ADC10 ...
Page 432: ...19 14 DAC12 ...