Texas Instruments MSP430x1xx Computer Hardware User Manual


 
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 + 0FFFFh + 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 + 0FFFFh + 1 0 * * 1
XOR(.B) src,dst Exclusive OR source and destination src .xor. dst dst * * * *
† Emulated Instruction