A SERVICE OF

logo

Mnemonic
ADD
A,R
ADD
A,@R
ADD
A.#data
ADDC
A,R
ADDC
A,@R
ADDC
A,#data
ANL
A,R
ANL
A,@R
ANL
A,
#data
ORL
A,R
~
ORL
A,@R
ORL
A,#data
:;
XRL
A,R
E
~
XRL
A,@R
u
u
XRL
A,#dat8
«
INC
A
DEC
A
CLR
A
CPL A
DA
A
SWAP A
RL
A
RLC
A
RR A
RRC A
',;
IN
A,P
.'l-
OUTL
P,A
~
0
MOVD
A,P
..,
~
MOVD
P,A
Co
ANLD
P,A
!;
ORLD
P,A
~
~
INC R
....
INC
@R
~
a:
8021
INSTRUCTION
SET
SUMMARY
Description
Bytes
Cycle
Mnemonic
Description
Bytes
Add
register
to
A
1
JMP
addr
Jump
unconditional
2
Add
data
memory
to
A
1
JMPP
@A
Jump
indirect
1
Add
immediate
to
A 2
DJNZ
R,addr
Decrement
register
and
Jump
2
Add
with
carry
1
on R
not
zero
Add
with
carry
1
.<:
JC
addr
Jump
on
Carry
= 1
2
Add
with
carry
u
JNC
addr
Jump
on
Carry""
a
2
2 2
c
And
register
to
A 1 1
E
JZ
addr
Jump
on
A
Zero
2
'"
And
data
memory
to
A 1
JNZ
addr
Jump
on
A
not
Zero
2
And
immediate
to
A 2
JT1
addr
Jump
on
Tl
'"
1 2
Or register
to
A 1
JNT1
addr
Jump
on
Tl
=-
0
2
Or
data
memory
to
A 1
1
~
JTF
addr
Jump
on
timer
flag
2
Or
immediate
to
A 2
.g
Exclusive
Or
register
to
A
~
CALL
addr
Jump
to
subroutine
2
e
Exclusive
or
data
memory
to
A
.c
RET
Return
1
~
Exclusive
or
immediate
to
A
en
Increment
A
CLR
C
Clear
Carry
Decrement
A
ri'
CPL
C
Complement
Carry
ii:
Clear
A
Complement
A
MOV
A,R
Move
register
to
A
Decimal
Adjust
A
MOV
A,@R
Move
data
memory
to
A
Swap
nibbles
of
A
MOV
A,#data
Move
immediate
to
A
Rotate
A
left
~
MOV
R,A
Move
A
to
register
>
MOV
@R,A
Move
A
to
data
memory
Rotate
A
left
through
carry
0
Rotate
A
right
:;
MOV
R,#data
Move
immediate
to
register
Rotate
A
right
through
carry
!!
MOV
@R,#data
Move
immediate
to
data
memory
0
XCH
A,R
Exchange A
and
register
XCH
A,@R
Exchange A
and
data
memory
I
nput
port
to
A
XCHD
A,@R
Exchange
nibble
of
A
and
register 1
Output
A
to
port
MOVP
A,@A
Move
to
A
from
cu
rrent
page
Input
Expander
port
to
A 2
Output
A
to
Expander
port
2
~
MOV
A,T
c
Read
Timer/Counter
And
A
to
Expander
port
2
~
MOV
T,A
Load
Timer/Counter
0
Or
A
to
Expander
port
2
~
STRT
T
Start
Timer
~
STRT
CNT
Start
Counter
Increment
register
E
STOP
TCNT
Stop
Timer/Counter
Increment
data
memory
;:
NOP
No
Operation
Instruction
Set -
The
following
instructions,
which
are
found
in the 8748, have been deleted
from
the
8021
instruction set.
Data Moves
MOV
A,PSW
MOV
PSW,A
MOVX
A,@R
MOVX
@R,A
MOVP3
A,@A
Registers Branch
Timer
Control
Input/Output
DEC R
JTO
addr
EN
TCNTI
EN
I
ANL
P,#data
I---
JNTO
addr
DIS TCNTI DIS I
ORL
P,#data
Flags
JFO
addr
SEL
RBO
INS
A,BUS *
~
JFl
addr
Subroutine
SEL
RBl
OUTl
BUS,A *
CPl
FO
JNI
addr
RETR
SEL
MBa
ANL
BUS,#data
CLR
Fl
JBb
addr
SEL
MBl
ORL
BUS,#data
CPL
Fl
ENTO
ClK
"These
Instructions
have
been
replaced
in
the
8021
by
IN
A,PO
and
OUTL
PO,A
respectively.
4-6
1
Cycle
2
2
2
2
2
2
2
2
2
2
2
2
2
1
1
2
2
,
2
1
2