31-07-2012, 11:23 AM
8051 Instruction Set
8051_Instruction_Set.pdf (Size: 379.68 KB / Downloads: 60)
Introduction
A computer instruction is made up of an operation code
(op-code) followed by either zero, one or two bytes of
operands
The op-code identifies the type of operation to be performed
while the operands identify the source and destination of the
data
The operand can be:
The data value itself
A CPU register
A memory location
An I/O port
If the instruction is associated with more than one operand,
the format is always:
Register Addressing
The register addressing instruction involves information
transfer between registers
Example:
MOV R0, A
The instruction transfers the accumulator content into the R0
register. The register bank (Bank 0, 1, 2 or 3) must be
specified prior to this instruction.
Direct Addressing
This mode allows you to specify the operand by giving its actual memory
address (typically specified in hexadecimal format) or by giving its
abbreviated name (e.g. P3)
Used for SFR accesses
Immediate Constant Addressing
This mode of addressing uses either an 8- or 16-bit
constant value as the source operand
This constant is specified in the instruction, rather than in
a register or a memory location
The destination register should hold the same data size
which is specified by the source operand