MCS-51 Instructions Set
MCS-51 Instructions Set
This appendix contains two tables: the first identifies all of the 8051 's instructions in
alphabetical order; the second table lists the instructions according to theirhexadecimal opcodes and lists the assembly language instructions that produced that
opcode.
.
The alphabetical listing also includes documentation of the bit pattern, flags
affected, number of machine cycles per execution and a description of the instructions operation and function. The list below defines the conventions used to identify
operation and bit patterns.
Abbreviations and Notations Used
A
AB
B
bit address
page address
relative offset
C
code address
data
data address
DPTR
PC
Rr
SP
high
low
i-j
.n
aaa aaaaaaaa
bbbbbbbb
dddddddd
""'"'
mmmmmmmm
00000000
r orrrr
AND
NOT
OR
XOR
(X)
X))
<>
<
>
Accumulator
Register Pair
Multiplication Register
8051 bit address
11-bit code address within 2K page
S-bit 2' s complement offset
Carry Flag
Absolute code address
Immediate data
On-chip 8-bit RAM address
Data pointer
Program Counter
Register (r=0-7)
Stack pointer
High order byte
Low order byte
Bits i through j
Bit n
Absolute page address encoded in instruction and operand byte
Bit address encoded in operand byte
Immediate data encoded in operand byte
One byte of a 16-bit address encoded in operand byte
Data address encoded in operand byte
Relative offset encoded in operand byte
Register identifier encoded in operand byte
Logical AND
Logical complement
Logical OR
Logical exclusive OR
Plus
Minus
Divide
Multiply
The contents of X
The memory location addressed by (Xl (The contents of X)
Is equal to
Is not equal to
Is less than
Is greater than
Is replaced by
B-1
MeS-51
B-2
Cycles
Binary
Code
Flags
P OV AC C
Function
aaa10001
aaaaaaaa
ADD A,ldata
(A) <- (A) + data
00100100
dddddddd
P OV AC C Add immediate
data to A
ADD A,@Rr
(A) <- (A) + Rr
0010011r
P OV AC C Add contents of
indirect address to
A
ADD A,Rr
(A) <- (A) + (Rr)
00101rrr
P OV AC C Add register to A
00100101
mmmmmmmm
P OV AC C Add contents of
data address to A
ADDC A,ldata
(A) <- (A) + (C) + data
00110100
dddddddd
P OV AC C Add Cand
immediate data to
A
ADDC A,@Rr
(A) <- (A) + (C) + Rr
0011011r
ADDC A,Rr
(A) <- (A) + (C) + (Rr)
00111rrr
00110101
mmmmmmmm
AJMP codeaddr
(PC) 0-10 <- code address
aaaOOO01
aaaaaaaa
ANL A,ldata
(A) <- (A) AND data
01010100
dddddddd
Logical AND
immediate data to
A
ANL A,@Rr
(A) <- (A) AND Rr
0101011r
Logical AND
contents of indirect
address to A
ANL A,Rr
(A) <- (A) AND (Rr)
01011rrr
Logical AND
register to A
01010101
mmmmmmmm
Logical AND
contents of data
address to A
ANL C,bitaddr
(C) <- (C) AND (bit address)
10000010
bbbbbbbb
ANL C,lbitaddr
(C) - (C) AND NOT (bit address)
10110000
bbbbbbbb
C Logical AND
complement of bit
toC
01010011
mmmmmmmm
dddddddd
Logical AND
immediate data to
contents of data
address
ANL dataaddr,A
(data address) <(data address) AN D A
01010010
mmmmmmmm
Logical AND A to
contents of data
address
Push PC on stack,
and replace low
order 11 bits with
low order 11 bits of
code address.
MCS-Sl
Cycles
Binary
Code
Flags
P OV AC C
Function
C If immediate data
and contents of
indirect address
are not equal, jump
to code address
CJNE @Ar,ldata,codeaddr
(PC) - (PC) + 3
IF Ar)) < >data
THEN
(PC) - (PC) + relative offset
IF Ar)) <data
THEN(C)-l
ELSE(C)-O
CJNE A,ldata,codeaddr
(PC) - (PC) + 3
IF (A) < >data
THEN
(PC) - (PC) + relative offset
IF (A) <data
THEN (C)-l
ELSE(C)-O
CJNE A,dataaddr,codeaddr
(PC) - (PC) + 3
IF (A) < > (data address)
THEN
(PC) - (PC) + relative offset
IF (A) < (data address)
THEN(C)-l
ELSE(C)-O
CJNE Ar,lIdata,codeaddr
(PC) - (PC) + 3
IF (Ar) < >data
THEN
(PC) - (PC) + relative offset
IF (Ar) <data
THEN(C)-l
ELSE(C)-O
CLR A
11100100
11000011
CLR bitaddr
(bit address) - 0
11000010
bbbbbbbb
CPL A
11110100
10110011
10110010
bbbbbbbb
11010100
DEC @Ar
Ar))- Ar)) -1
00010111
DEC A
00010100
DEC Ar
(Ar) - (Ar) -1
00011rrr
Decrement register
00010101
mmmmmmmm
Decrement
contents of data
address
DIV AB
(AB) - (A) I (B)
10000100
1011011r
dddddddd
00000000
C If immediate data
and Aare not
equal, jump to code
address
10110100
dddddddd
00000000
10110101
mmmmmmmm
C If contents of data
address and A are
not equal, jump to
code address
00000000
10111rrr
dddddddd
C If immediate data
and register are not
equal, jump to code
address
00000000
(A)-O
CLR C
(C)-O
Set bit to zero (0)
Complements each
bit in A
(A)-NOT(A)
CPL C
C Complement C
(C)-NOT(C)
CPL bltaddr
(bIt address) -
Complement bit
C Adjust A aiter a
BCD add
Decrement
contents of indirect
address
P
Decrement A
(A)-(A)-l
OV
C Divide A by B
(multiplication
register)
B-3
MeS-51
Cycles
Binary
Code
Flags
P OV AC C
DJNZ Ar,codeaddr
(PC) - (PC) + 2
(Ar) - (Rr)1
IF (Rr) < >0
THEN
(PC) - (PC) + relative offset
1 1011rrr
INC @Rr
Rr - Rr + 1
0000011r
INC A
000-00100
INC DPTR
(DPTR) - (DPTR) + 1
10100011
Increment 16-bit
data pointer
INC Rr
00001rrr
Increment register
00000101
mmmmmmmm
Increment contents
of data address
00100000
bbbbbbbb
JC codeaddr
(PC) - (PC) + 2
IF (C) = 1
THEN
(PC) - (PC) + relative offset
JMP @A+DPTR
(PC) - (A)
01110011
Add A to data
pOinter and jump to
that code address
00110000
bbbbbbbb
JNC codeaddr
(PC) + (PC) + 2
IF(C)=O
THEN
(PC) - (PC) + relative offset
JNZ codeaddr
(PC) - (PC) + 2
IF(A) < >0
THEN
(PC) - (PC) + relative offset
Function
Decrement
register, if not zero
(0), then jump to
code address
00000000
11010101
mmmmmmmm
Decrement data
address, if zero (0),
then jump to code
address
00000000
Increment contents
of indirect address
P
Increment A
(A) -(A) +1
R) - (Rr)
8-4
+1
00000000
00010000
bbbbbbbb
00000000
01000000
00000000
+ (DPTR)
If C is one, then
jump to code
address
00000000
01010000
00000000
01110000
00000000
If C is zero (0), n
jump to code
address
MCS-Sl
Binary
Code
JZ codeaddr
(PC) - (PC) + 2
IF(A)=O
THEN
(PC) - (PC) + relative offset
01100000
00010010
I I I I I I I It
I I I I I I I It
Push PC on stack
and replace entire
PC value with code
address
LJMP codeaddr
(PC) - code address
00000010
I I I I I I I It
I I I I I I I It
Jumpto code
address
MOV @Rr,#data
Rr)) -data
0111011r
dddddddd
Move immediate
data to indirect
address
MOV @Rr,A
Rr))-(A)
1111011r
Move A to indirect
address
MOV @Rr,dataaddr
Rr)) - (data address)
1010011r
mmmmmmmm
Move contents of
data address to
indirect address
MOV A,#data
(A) -data
01110100
dddddddd
Move immediate
data to A
MOV A,@Rr
(A)-Rr))
1110011r
Move contents of
indirect address to
A
MOV A,Rr
(A)-(Rr)
11101rrr
Move register to A
11100101
mmmmmmmm
Move contents of
data add ress to A
10100010
bbbbbbbb
MOV DPTR,#data
(DPTR) - data
10010000
d d d d d d d dt
d d d d d d d dt
MOV Rr,#data
(Rr)-data
01111rrr
dddddddd
Move immediate
data to register
MOV Rr,A
(Rr)-(A)
1 1 1 1 1 r r r
Move A to register
MOV Rr,dataaddr
(Rr) - (data address)
10 1 01 r r r
mmmmmmmm
Move contents of
data address to
register
MOV bitaddr,C
(bftaddress) - (C)
10010010
bbbbbbbb
01110101
mmmmmmmm
dddddddd
Move immediate
data to data
address
1000011r
mmmmmmmm
Move contents of
indirect address to
data address
MOV dataaddr,A
(data address) - (A)
11110101
mmmmmmmm
Move A to data
address
Mnemonic
Operation
Flags
P OV AC C
Function
00000000
The high order byte of the 16-bit operand is in the first byte following the opcode. The low order byte is
in the second byte following the opcode.
B-S
MeS-51
Binary
Code
Flags
P OV AC C
Function
10001rrr
mmmmmmmm
Move register to
data address
100D0101
mmmmmmmm*
mmmmmmmm*
Move contents of
second data
address to first
data address
MOVC A,@A+DPTR
(A) - A) + (DPTR
10010011
MOVC A,@A+PC
(A) - A) + (PC
10000011
Add A to PC and
move contents of
that code address
with A
MOVX @DPTR,A
DPTR)) - (A)
11110000
Move A to external
data location
addressed by
DPTR
MOVX @Rr,A
Rr)) - (A)
1111001r
Move A to external
data location
addressed by
register
MOVX A,@DPTR
(A) - DPTR
11100000
Move contents of
external data location addressed by
DPTR to A
MOVX A,@Ar
(A) - Rr))
1110001r
Move contents of
external data loca"
tion addressed by
register to A
MUL AB
(AB) - (A) '(B)
10100100
NOP
00000000
ORL A,ldata
(A) - (A) OR data
01000100
dddddddd
Logical OR
immediate data to
A
ORL A,@Ar
(A) - (A) OR Rr))
0100011r
Logical OR
contents of indirect
address to A
ORL A,Rr
(A) - (A) OR (Ar)
01001rrr
Logical OR register
toA
\
01000101
mmmmmmmm
Logical OR
contents of data
address to A
01110010
bbbbbbbb
C Logical OR bit to C
ORL C,lbitaddr
(C) -(C) OR NOT (bit address)
10100000
bbbbbbbb
C Logical OR
complement of bit
toC
01000011
mmmmmmmm
dddddddd
Logical OR
immediate data to
data address
ORL dataaddr ,A
(data address) (data address) OR A
01000010
mmmmmmmm
Logical OR A to
data address
B-6
Cycles
P OV
C Multiply A by B
(multiplication
register)
Do nothing
The source data address (second data address) is encoded In the first byte following the opcode. The
destination data address is encoded in the second byte following the opcode.
\,
MeS-51
Cycles
Binary
Code
Flags
P OV AC C
Function
11010000
mmmmmmmm
11000000
mmmmmmmm
Increment SP and
place contents of
data address at top
of stack
RET
00100010
Return from
subroutine call
00110010
Return from
interrupt routine
00100011
00110011
00000011
00010011
11010011
11010010
bbbbbbbb
SJMP codeaddr
(PC) .... (PC) + relative offset
10000000
Jumptocode
address
SUSS A,lkiata
(A)"" (A) - (C) -data
10010100
dddddddd
P OV AC C Subtract immediate
data from A
SUSS A,@Ar
(A) - (A) - (C) - Ar))
1001011r
P OV AC C Subtract contents
of indirect address
from A
SUSS A,Ar
(A) - (A) - (C) - (Ar)
10011rrr
P OV AC C Subtract register
from A
10010101
mmmmmmmm
P OV AC C Subtract contents
of data address
from A
SWAP A
(See description in Chapter 3)
11000100
XCH A,@Ar
temp - Ar))
Ar))-(A)
(A)-temp
1100011r
Move A to indirect
address and vice
versa
XCH A,Ar
temp -(Ar)
(Rr)-(A)
(A)-temp
11001rrr
Move A to register
and vice versa
11000101
mmmmmmmm
Move A to data
address and vice
versa
C Rotate A through C
left one position
C Rotate A through C
right one position
C SetC to one (1)
00000000
Exchange low
order nibble with
high order nibble in
A
B-7
MeS-51
B-8
Cycles
Binary
Code
Flags
P OV AC C
XCHD A,@Rr
temp - Rr)) 0-3
Rr)) 0-3 - (A) 0-3
(A) 0-3 - temp
1 1 01011r
XRL A,lIdata
(A) - (A) XOR data
01100100
dddddddd
Logical exclusive
OR immediate data
toA
XRL A,@Rr
(A) - (A) XOR Rr))
0110011r
Logical exclusive
OR contents of
indirect address to
A
XRL A,Rr
(A) - (A) XOR (Rr)
01101rrr
Logical exclusive
OR register to A
01100101
mmmmmmmm
Logical exclusive
OR contents of data
address to A
01100011
mmmmmmmm
dddddddd
Logical exclusive
OR immediate data
to data address
01100010
mmmmmmmm
Logical exclusive
OR A to data
address
Function
MeS-51
00
01
02
03
04
05
06
07
08
09
OA
OB
OC
00
OE
OF
10
11
12
13
14
15
16
17
18
19
1A
1B
1C
10
1E
1F
20
21
22
23
24
25
26
27
28
29
2A
2B
2C
20
2E
2F
30
31
32
33
34
35
36
37
38
39
3A
38
Number
of Bytes
1
2
3
1
1
2
1
1
1
1
1
1
1
1
1
1
3
2
3
1
1
2
1
1
1
1
1
1
1
1
1
1
3
2
1
1
2
2
1
1
1
1
1
1
1
1
1
1
3
2
1
1
2
2
1
1
1
1
1
1
Mnemonic
NOP
AJMP
LJMP
RR
INC
INC
INC
INC
INC
INC
INC
INC
INC
INC
INC
INC
JBC
ACALL
LCALL
RRC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
DEC
JB
AJMP
RET
RL
ADD
ADD
ADD
ADD
ADD
ADD
ADD
ADD
ADD
ADD
ADD
ADD
JNB
ACALL
RETI
RLC
ADDC
ADDC
ADDC
AD DC
ADDC
ADDC
ADDC
ADDC
Operands
codeaddr
codeaddr
A
A
dataaddr
@RO
@R1
RO
R1
R2
R3
R4
R5
R6
R7
bit addr ,code addr
codeaddr
codeaddr
A
A
dataaddr
@RO
@R1
RO
R1
R2
R3
R4
R5
R6
R7
bit addr ,code addr
codeaddr
A
A,#data
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
bit addr ,code addr
codeaddr
A
A,ldata
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
B-9
MeS-51
3C
3D
3E
3F
40
41
42
43
44
45
46
47
48
49
4A
48
4C
40
4E
4F
50
51
52
53
54
55
56
57
58
59
5A
58
5C
50
5E
5F
60
61
62
63
64
65
66
67
68
69
6A
68
6C
60
6E
6F
70
71
72
73
74
75
76
77
B-I0
Number
of Bytes
1
1
1
1
2
2
2
3
2
2
1
1
1
1
1
1
1
1
1
1
2
2
2
3
2
2
1
1
1
1
1
1
1
1
1
1
2
2
2
3
2
2
1
1
1
1
1
1
1
1
1
1
2
2
2
1
2
3
2
2
Operands
Mnemonic
ADDC
ADDC
ADDC
ADDC
.,IC
AJMP
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
ORL
JNC
ACALL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
ANL
JZ
AJMP
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
XRL
JNZ
ACALL
ORL
JMP
MOV
MOV
MOV
MOV
A,R4
A,R5
A,R7
A,R7
codeaddr
codeaddr
data addr, A
data addr,#data
A,tldata
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
codeaddr
codeaddr
data addr, A
data addr,tldata
A,lIdata
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
codeaddr
codeaddr
dataaddr,A
data addr,lIdata
A,lIdata
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
codeaddr
codeaddr
C,bitaddr
@A+DPTR
A,#da ta
data addr ,lIdata
@RO,lIdata
@R1,#data
MeS-51
Number
of Bytes
Mnemonic
2
2
2
2
2
2
2
2
2
2
2
1
1
3
2
2
2
2
2
2
2
2
2
2
3
2
2
1
2
2
1
1
1
1
1
1
1
1
1
1
2
2
2
1
1
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
SJMP
AJMP
ANL
MOVC
OIV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
ACALL
MOV
MOVC
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
SUBB
ORL
AJMP
MOV
INC
MUL
2
2
2
2
2
2
2
2
2
2
2
2
2
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
ANL
ACALL
CPL
CPL
Operands
RD,itdata
R1,itdata
R2,itdata
R3,itdata
R4,itdata
R5,itdata
R6,itdata
R7,itdata
codeaddr
codeaddr
C,bitaddr
A,@A+PC
AB
codeaddr
bitaddr,C
A,@A+OPTR
A ,itdata
A,dataaddr
A,@RO
A,@R1
A,RD
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
C,lbitaddr
codeaddr
C,bitaddr
OPTR
AB
reserved
@RD,dataaddr
@R1 ,data addr
RD,data addr
R1 ,data addr
R2,data addr
R3,data addr
R4,data addr
R5,data addr
R6,data addr
R7,data addr
C,lbitaddr
codeaddr
bitaddr
C
B-l1
MeS-51
B-12
Number
of Bytes
3
3
3
3
3
3
3
3
3
3
3
3
2
2
2
1
1
2
1
1
1
1
1
1
1
1
1
1
2
2
2
1
1
3
1
1
2
2
2
2
2
2
2
2
1
2
1
1
1
2
1
1
1
1
1
1
1
1
1
1
Mnemonic
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
CJNE
PUSH
AJMP
CLR
CLR
SWAP
XCH
XCH
XCH
XCH
XCH
XCH
XCH
XCH
XCH
XCH
XCH
POP
ACALL
SETB
SETB
OA
OJNZ
XCHO
XCHO
OJNZ
OJNZ
OJNZ
OJNZ
OJNZ
OJNZ
OJNZ
OJNZ
MOVX
AJMP
MOVX
MOVX
CLR
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
Operands
A,#data ,code addr
A,data addr ,code addr
@RO,#data,codeaddr
@R1 ,#data ,code addr
RO,#data ,code addr
R1 ,#data ,code addr
R2,#data ,code addr
R3,#data ,code addr
R4,#data ,code addr
R5,#data ,code addr
R6,#data ,code addr
R7,#data ,code addr
dataaddr
codeaddr
bitaddr
C
A
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
dataaddr
codeaddr
bitaddr
C
A
data addr ,code addr
A,@RO
A,@R1
RO,code addr
R1 ,code addr
R2,code addr
R3,code addr
R4,codeaddr
R5,code addr
R6,code addr
R7,codeaddr
A,@OPTR
codeaddr
A,@RO
A,@R1
A
A,dataaddr
A,@RO
A,@R1
A,RO
A,R1
A,R2
A,R3
A,R4
A,R5
A,R6
A,R7
MeS-51
Number
of Bytes
1
2
1
1
1
2
1
1
1
1
1
1
1
1
1
1
Mnemonic
MOVX
ACALL
MOVX
MOVX
CPL
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
Operands
@DPTR,A
codeaddr
@RO,A
@R1,A
A
dataaddr,A
@RO,A
@R1,A
RO,A
R1,A
R2,A
R3,A
R4,A
R5,A
R6,A
R7,A
B-13
ADD
ADDC
SUBB
MUL
FLAG
COY AC
X X X
X X X
X X X
o X
DIY
DA
RRC
RLC
SETB C
X
X
X
INSTRUCTION
CLR C
CPL C
ANL C,bit
ANL C,/bit
ORL C,bit
ORL C,bit
MOY C,bit
CJNE
FLAG
COY AC
X
X
X
X
X
X
'Note that operations on SFR byte address 208 or bit addresses 209-215 (i.e. the PSW or bits in the PSW) will also
affect flag settings.
ARITHMETIC OPERATIONS
ADD
Mnemonic
A,Rn
ADD
A,direct
ADD
A,@Ri
ADD
A,#data
ADDC
A,Rn
ADDC
A,direct
ADDC
ADDC
SUBB
A,@Ri
A,#data
A,Rn
Byte
Description
Add register to
I
Accumulator
Add direct
2
byte to
Accumulator
Add indirect
Ram to
Accumulator
Add immediate 2
data to
Accumulator
Add register to
Accumulator
with Carry
Add direct
2
byte to
Accumulator
with Carry
Add indirect
RAM to
Accumulator
with Carry
Add immediate 2
data to Acc
with Carry
Subtract
register from
Accwith
borrow
Oscillator
Period
12
Byte
Description
Subtract direct
2
byte from Acc
with borrow
Subtract
indirect RAM
from Acc with
borrow
Subtract
2
immediate data
from Acc with
borrow
Increment
Accumulator
Increment
register
2
Increment
direct byte
Increme.nt
indirect RAM
Decrement
Accumulator
Decrement
Register
Decrement
2
direct byte
Decrement
indirect RAM
Mnemonic
SUBB
A,direct
12
SUBB
A,@Ri
SUBB
A,#data
INC
INC
Rn
INC
direct
INC
@Ri
DEC
DEC
Rn
DEC
direct
DEC
@Ri
12
12
12
12
12
12
12
3-6
,<
Oscillator
Period
12
12
12
12
12
12
12
12
12
12
12
AFN-01739A
DATA TRANSFER
Description Byte
Move register
1
to
Accumulator
A,direct
Move direct
2
byte to
Accumulator
A,@Ri
Move indirect
RAM to
Accumulator
A,#data
Move
2
immediate data
to
Accumulator
Rn,A
Move
Accumulator
to register
Rn,direct
Move direct
2
byte to register
Rn,#data
Move
2
immediate data
to register
direct,A
Move
2
Accumulator
to direct byte
Move register
2
direct,Rn
to direct byte
direct,direct
Move direct
byte to direct
direct,@Ri
Move indirect
2
RAM to direct
byte
direct,#data
Move
immediate data
to direct byte
@Ri,A
Move
Accumulator
to indirect
RAM
@Ri,direct
Move direct
2
byte to indirect
RAM
@Ri,#data
Move
2
immediate data
to indirect
RAM
DPTR,#dataI6 Load Data
Pointer with a
16-bit constant
A,@A+DPTR Move Code
byte relative to
DPTR to Acc
A,@A+PC
Move Code
byte relative to
PC and Acc
A,@Ri
Move External
RAM (8-bit
addr) to Acc
A,@DPTR
Move External
RAM (16-bit
addr) to Acc
Mnemonic
MOV
A,Rn
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOV
MOVC
MOVe
MOVX
MOVX
Oscillator
Period
12
Mnemonic
MOVX @Ri,A
12
MOVX
@DPTR,A
12
PUSH
direct
POP
direct
XCH
A,Rn
XCH
A,direct
XCH
A,@Ri
XCHD
A,@Ri
12
12
24
12
12
24
Description Byte
Move Acc to
1
External RAM
(8-bit addr)
Move Acc to
External Ram
(l6-bit addr)
Push direct
2
byte onto stack
Pop direct byte 2
from stack
Exchange
register with
Accumulator
Exchange
2
direct byte
with
Accumulator
Exchange
indirect RAM
with
Accumulator
Exchange loworder Digit
indirect RAM
with Acc
Oscillator
Period
24
24
24
24
12
12
12
12
24
24
24
12
24
12
24
24
24
24
24
All mnemonics copyrighted Intel Corporation 1980
3-8
AFN-01739A
Mnemonic
CLR
C
CLR
bit
SETB
C
SETB
bit
CPL
C
CPL
bit
ANL
C,bit
ANL
C,/bit
ORL
C,bit
ORL
C,/bit
MOY
C,bit
MOY
bit,C
JC
rei
JNC
rei
JB
bit,rel
JNB
bit,rel
JBC
bit,rel
Oscillator
Description Byte Period
12
Clear Carry
1
12
Clear direct bit
2
12
Set Carry
1
12
Set direct bit
2
12
Complement
1
Carry
12
Complement
2
direct bit
AND direct bit
24
2
to Carry
AND
24
2
complement of
direct bit to
Carry
OR direct bit
24
2
to Carry
OR
2
24
complement of
direct bit to
Carry
Move direct bit 2
12
to Carry
24
Move Carry to
2
direct bit
Jump if Carry
2
is set
Jump if Carry
24
2
not set
Jump if direct
24
Bit is set
Jump if direct
24
Bit is Not set
Jump if direct
24
3
Bit is set &
clear bit
JNZ
Mnemonic
rei
CJNE
A,direct,rel
CJNE
A,#data,rel
CJNE
RN ,#data,rel
CJNE
@Ri,#data,rel
DJNZ
Rn,rel
DJNZ
direct,rel
NOP
Description Byte
Jump if
2
Accumulator is
Not Zero
Compare direct
byte to Acc
and Jump if
Not Equal
Comare
3
immediate to
Acc and Jump
if Not Equal
Compare
immediate to
register and
Jump if Not
Equal
Compare
immediate to
indirect and
Jump if Not
Equal
Decrement
3
register and
Jump if Not
Zero
Decrement
3
direct byte and
Jump if Not
Zero
No Operation
Oscillator
Period
24
24
24
24
24
24
24
12
PROGRAMING BRANCHING
Mnemonic
ACALL addrll
LCALL addr16
RET
RETI
AJMP
LJMP
SJMP
addrl1
addr16
rel
JMP
@A+DPTR
JZ
rel
Description Byte
Absolute
2
Subroutine
Call
Long
Subroutine
Call
Return for
Subroutine
Return for
interrupt
Absolute Jump 2
Long Jump
3
Short Jump
2
(relative addr)
Jump indirect
relative to the
DPTR
Jump if
2
Accumulator is
Zero
Oscillator
Period
24
24
24
24
24
24
24
24
24
All mnemonics copyrighted Intel Corporation 1980
3-9
AFN-01739A