Instruction Set of 8051
Instruction Set of 8051
• The Data Transfer Instructions are associated with transfer with data
between registers or external program memory or external data
memory. The Mnemonics associated with Data Transfer are given
below.
• MOV
• MOVC
• MOVX
• PUSH
• POP
• XCH
• XCHD
• The following table lists out all the possible
data transfer instruction along with other
details like addressing mode, size occupied
and number machine cycles it takes.
Arithmetic Instructions
• Using Arithmetic Instructions, you can perform addition, subtraction, multiplication and
division. The arithmetic instructions also include increment by one, decrement by one and
a special instruction called Decimal Adjust Accumulator.
• The Mnemonics associated with the Arithmetic Instructions of the 8051 Microcontroller
Instruction Set are:
• ADD
• ADDC
• SUBB
• INC
• DEC
• MUL
• DIV
• DA A
• All the possible Mnemonics associated with
Arithmetic Instructions are mentioned in the
following table.
Logical Instructions
• The next group of instructions are the Logical Instructions, which perform logical operations like
AND, OR, XOR, NOT, Rotate, Clear and Swap. Logical Instruction are performed on Bytes of data
on a bit-by-bit basis.
• ANL
• ORL
• XRL
• CLR
• CPL
• RL
• RLC
• RR
• RRC
• SWAP
Boolean or Bit Manipulation Instructions
• As the name suggests, Boolean or Bit Manipulation Instructions will deal with bit variables. We know
that there is a special bit-addressable area in the RAM and some of the Special Function Registers
(SFRs) are also bit addressable.
• CLR
• SETB
• MOV
• JC
• JNC
• JB
• JNB
• JBC
• ANL
• ORL
• CPL
Program Branching Instructions
• LJMP
• AJMP
• SJMP
• JZ
• JNZ
• CJNE
• DJNZ
• NOP
• LCALL
• ACALL
• RET
• RETI
• JMP