25 The following is a list of the 8051 registers used by AS8051:
27 a,b - 8-bit accumulators
28 r0,r1,r2,r3 - 8-bit registers
34 c - carry (bit in status word)
37 K.2 8051 INSTRUCTION SET
40 The following tables list all 8051 mnemonics recognized
41 by the AS8051 assembler. The following list specifies the
42 format for each addressing mode supported by AS8051:
47 r,r1,r2 register r0,r1,r2,r3,r4,r5,r6, or r7
49 @r indirect on register r0 or r1
50 @dptr indirect on data pointer
51 @a+dptr indirect on accumulator plus data pointer
52 @a+pc indirect on accumulator plus program counter
54 addr direct memory address
58 label call or jump label
60 The terms data, addr, bitaddr, and label may all be expressions.
62 Note that not all addressing modes are valid with every in-
63 struction. Refer to the 8051 technical data for valid
67 K.2.1 Inherent Instructions
72 K.2.6 Move Instructions
74 mov a,#data mov a,addr
77 mov r,#data mov r,addr
80 mov addr,a mov addr,#data
81 mov addr,r mov addr,@r
82 mov addr1,addr2 mov bitaddr,c
84 mov @r,#data mov @r,addr
90 movc a,@a+dptr movc a,@a+pc
91 movx a,@dptr movx a,@r
92 movx @dptr,a movx @r,a
95 K.2.8 Single Operand Instructions
118 K.2.8 Two Operand Instructions
120 add a,#data add a,addr
122 addc a,#data addc a,addr
124 subb a,#data subb a,addr
126 orl a,#data orl a,addr
128 orl addr,a orl addr,#data
129 orl c,bitaddr orl c,/bitaddr
130 anl a,#data anl a,addr
132 anl addr,a anl addr,#data
133 anl c,bitaddr anl c,/bitaddr
134 xrl a,#data xrl a,addr
136 xrl addr,a xrl addr,#data
137 xrl c,bitaddr xrl c,/bitaddr
142 K.2.3 Call and Return Instructions
144 acall label lcall label
147 K.2.4 Jump Instructions
150 cjne a,#data,label cjne a,addr,label
151 cjne r,#data,label cjne @r,#data,label
152 djnz r,label djnz addr,label
154 jb bitadr,label jnb bitadr,label
158 ljmp label sjmp label