Skip to content
The Computer Science
TheCScience
  • Engineering Subjects
    • Human Values
    • Computer System Architecture
    • Digital Communication
    • Internet of Things
  • NCERT Solutions
    • Class 12
    • Class 11
  • HackerRank solutions
    • HackerRank Algorithms Problems Solutions
    • HackerRank C solutions
    • HackerRank C++ problems solutions
    • HackerRank Java problems solutions
    • HackerRank Python problems solutions
The Computer Science
TheCScience

Addressing Modes of 8051 Microcontroller

YASH PAL, April 15, 2026April 15, 2026

Addressing Modes of 8051 Microcontroller – Before learning the Addressing modes of 8051, we need to study the instruction set of the 8051 microcontroller. Like the microprocessors, the 8051 microcontroller has its own instruction set.

All the Assembly language programs are written as a sequence of text lines. Each line is an instruction to the microprocessor or the microcontroller, a directive to the assembler, or a combination of the two. The syntax of a line of 8051 microcontroller program code is shown in the figure below.

Syntax of a program code line
Syntax of a program code line

As shown in the figure above, the syntax of an 8051 line contains a label, an instruction, and comments. A label is a name given to a memory location. A label is a name given to the memory location. Comments are included by the programmer to explain the instruction’s operation. Instruction is the coded set containing the opcode and the operand.

Instruction Syntax – An 8051 microcontroller has its own instruction set. The instruction is the coded information. This contains the opcode and operand. It is defined by the manufacturers of the 8051 microcontroller. When a program is executed by an 8051 microcontroller, every instruction is converted into a unique machine language binary code. This code operates the 8051 internal circuitry. There are two distinct parts of the 8051 microcontroller instructions: Opcode and Operand. Operand field is again classified into two parts: source and destination. An 8051 Microcontroller instruction syntax is shown in the figure below.

8051 microcontroller instruction syntax
8051 instruction syntax

Addressing Modes of the 8051 Microcontroller

The way the data source of destination addresses is given in an instruction determines the addressing mode. There are four addressing modes of the 8051 microcontroller.

  1. Immediate Addressing Mode
  2. Register Addressing Mode
  3. Direct Addressing Mode
  4. Indirect Addressing Mode

Immediate Addressing Mode

In this addressing mode, the 8-bit or 16-bit data is specified in the instruction itself as its one operand (source). Examples of this addressing mode are as follows:

MOVA, #02H; Copy the immediate data 02H to register A.
MOVDPTR, 03050H; copy the immediate data 3050H to the DPTR register.

Register Addressing Mode

Certain register names may be used as part of the opcode as the source or destination of data. Examples of this addressing mode are as follows:

MOVA, R5; copy data from register R5 to register A.
MOVR0, A; copy data from register A to register R0.

Direct Addressing Mode

Direct addressing mode is so named because the value to be stored in memory is obtained by directly retrieving it from another memory location. The SFRs and all 128 bytes of internal RAM may be addressed directly using a single byte address. Examples are as follows:

MOVA, 30H; copy data from RAM address 30H to register A.
MOVR0, 12H; copy data from RAM address 12H to register R0.
MOV8CH, R7; copy data from register R7 to Timer 0 high byte

Indirect Addressing Mode

Indirect addressing mode is a very powerful addressing mode. It provides an exceptional level of flexibility. It uses a register to hold the final address, known as the pointing register. The instruction for indirect addressing mode is the ‘at’ sign @. Examples are as follows.

MOVA, @ R0; copy the data of the address in R0 to register A.
MOV@ R1, 35H; copy the data 35H to the address in register R1.

engineering subjects Microprocessor microprocessor

Post navigation

Previous post
Next post

Select your Subject

TheCScience

We at TheCScience.com are working towards the goal to give free education to every person by publishing in dept article about Secondary, Senior-Secondary, and Graduation level subjects.

Pages

About US

Contact US

Privacy Policy

DMCA

Our Tools

Hosting - get 20% off

Engineering Subjects

Internet of Things

Human Values

Digital Communication

Computer System Architecture

Programming Tutorials

Data Structure and Algorithm

C

Java

NCERT

Class 12th

©2026 TheCScience | WordPress Theme by SuperbThemes