MSP430 and MSP430X Instructions
4-40
16-Bit MSP430X CPU
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 Table 4−7.
Table 4−7. Emulated Instructions
Instruction
Explanation
Emulation
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
*
*
*
*
INV(.B) dst
Invert dst
XOR(.B) #-1,dst
*
*
*
*
NOP
No operation
MOV R3,R3
-
-
-
-
POP dst
Pop operand from stack
MOV @SP+,dst
-
-
-
-
RET
Return from subroutine
MOV @SP+,PC
-
-
-
-
RLA(.B) dst
Shift left dst arithmetically
ADD(.B) dst,dst
*
*
*
*
RLC(.B) dst
Shift left dst
logically through Carry
ADDC(.B) dst,dst
*
*
*
*
SBC(.B) dst
Subtract Carry from dst
SUBC(.B) #0,dst
*
*
*
*
SETC
Set Carry bit
BIS #1,SR
-
-
-
1
SETN
Set Negative bit
BIS #4,SR
-
1
-
-
SETZ
Set Zero bit
BIS #2,SR
-
-
1
-
TST(.B) dst
Test dst
(compare with 0)
CMP(.B) #0,dst
0
*
*
1
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...