Monday, August 30, 2010

Instruction Set Summary

Data Transfer Instructions

Instruction
Description
Byte Cycle
MOV A, Rn
Move register to accumulator
1 1
MOV A, direct
Move direct byte to accumulator
2 1
MOV A, @Ri
Move indirect RAM to accumulator
1 1
MOV A, #data
Move immediate data to accumulator
2 1
MOV Rn, A
Move accumulator to register
1 1
MOV Rn, direct
Move direct byte to register
2 2
MOV Rn, #data
Move immediate data to register
2 1
MOV direct, A
Move accumulator to direct byte
2 1
MOV direct, Rn
Move register to direct byte
2 2
MOV direct, direct
Move direct byte to direct byte
3 2
MOV direct, @Ri
Move indirect RAM to direct byte
2 2
MOV direct, #data
Move immediate data to direct byte
3 2
MOV @Ri, A
Move accumulator to indirect RAM
1 1
MOV @Ri, direct
Move direct byte to indirect RAM
2 2
MOV @Ri, #data
Move immediate data to indirect RAM
2 1
MOV DPTR, #data16
Load data pointer with a 16-bit constant
3 2
MOVC A, @A+DPTR
Move code byte relative to DPTR to accumulator
1 2
MOVC A, @A+PC
Move code byte relative to PC to accumulator
1 2
MOVX A, @Ri
Move external RAM (8-bit addr.) to A
1 2
MOVX A, @DPTR
Move external RAM (16-bit addr.) to A
1 2
MOVX @Ri, A
Move A to external RAM (8-bit addr.)
1 2
MOVX @DPTR, A
Move A to external RAM (16-bit addr.)
1 2
PUSH direct
Push direct byte onto stack
2 2
POP direct
Pop direct byte from stack
2 2
XCH A, Rn
Exchange register with accumulator
1 1
XCH A, direct
Exchange direct byte with accumulator
2 1
XCH A, @Ri
Exchange indirect RAM with accumulator
1 1
XCHD A, @Ri
Exchange low-order nibble indir. RAM with A 1 1
Boolean Instructions

Instruction
Description
Byte Cycle
CLR C
Clear carry flag
1 1
CLR bit
Clear direct bit
2 1
SETB C
Set carry flag
1 1
SETB bit
Set direct bit
2 1
CPL C
Complement carry flag
1 1
CPL bit
Complement direct bit
2 1
ANL C, bit
AND direct bit to carry flag
2 2
ANL C, /bit
AND complement of direct bit to carry
2 2
ORL C, bit
OR direct bit to carry flag
2 2
ORL C, /bit
OR complement of direct bit to carry
2 2
MOV C, bit
Move direct bit to carry flag
2 1
MOV bit, C
Move carry flag to direct bit 2 2
Program Control Instructions

Instruction
Description
Byte Cycle
ACALL addr11
Absolute subroutine call
2 2
LCALL addr16
Long subroutine call
3 2
RET
Return from subroutine
1 2
RETI
Return from interrupt
1 2
AJMP addr11
Absolute jump
2 2
LJMP addr16
Long iump
3 2
SJMP rel
Short jump (relative addr.)
2 2
JMP @A+DPTR
Jump indirect relative to the DPTR
1 2
JZ rel
Jump if accumulator is zero
2 2
JNZ rel
Jump if accumulator is not zero
2 2
JC rel
Jump if carry flag is set
2 2
JNC rel
Jump if carry flag is not set
2 2
JB bit, rel
Jump if direct bit is set
3 2
JNB bit, rel
Jump if direct bit is not set
3 2
JBC bit, rel
Jump if direct bit is set and clear bit
3 2
CJNE A, direct, rel
Compare direct byte to A and jump if not equal 3 2
CJNE A, #data, rel
Compare immediate to A and jump if not equal
3 2
CJNE Rn, #data, rel
Compare immed. to reg. and jump if not equal
3 2
CJNE @Ri, #data, rel
Compare immed. to ind. and jump if not equal
3 2
DJNZ Rn, rel
Decrement register and jump if not zero
2 2
DJNZ direct, rel
Decrement direct byte and jump if not zero
3 2
NOP
No operation 1 1

No comments:

Post a Comment