Addressing Modes in 8051

Addressing Modes in 8051

1. Immediate addressing mode: In this type, the operand is specified in the instruction along with the opcode. In simple way, it means data is provided in instruction itself.

Ex: MOV A,#05H – Where MOV stands for move, # represents immediate data. 05h is the data. It means the immediate date 05h provided in instruction is moved into A register.

2.Register addressing mode: Here the operand in contained in the specific register of microcontroller. The user must provide the name of register from where the operand/data need to be fetched. The permitted registers are A, R7-R0 of each register bank.

Ex: MOV A,R0-> content of R0 register is copied into Accumulator.


3. Direct addressing mode: In this mode the direct address of memory location is provided in instruction to fetch the operand. Only internal RAM and SFR’s address can be used in this type of instruction.
Ex: MOV A, 30H => Content of RAM address 30H is copied into Accumulator.

4. Register Indirect addressing mode: Here the address of memory location is indirectly provided by a register. The ‘@’ sign indicates that the register holds the address of memory location i.e. fetch the content of memory location whose address is provided in register.
Ex: MOV A,@R0 => Copy the content of memory location whose address is given in R0 register.

You may also like...

error: Content is protected !!