×

Addressing mode in 8085 microprocessor

What is a Microprocessor?

Microprocessor is a unit which is able to perform arithmetic and logical operations and is built on a single chip.

The 8085 microprocessor is built by Intel which is an 8 bit microprocessor.

An 8-bit data bus is present on the 8-bit CPU.

There are a lot of operations in a microprocessor and generally each instruction has the source operand and destination operand. Addressing mode refers to how operands are specified for the instruction. The 8085 microprocessor supports the following categories of addressing modes:

  1. Immediate addressing mode
  2. Register addressing mode
  3. Direct addressing mode
  4. Indirect addressing mode
  5. Implied addressing mode

1. Immediate addressing mode

 In immediate addressing mode, data is always the source operand. When the data is 8 bits, the instruction will be 2 bytes long; when the data is 16 bits, it will be 3 bytes long.

In 8085 microprocessor instruction, if the instruction’s opcode is ending with letter ‘I’ then it is defined as immediate addressing mode.

Syntax:     

 MVI   destination_register   Data     [For move instruction]

There are general purpose registers which can be used as destination register and data can be of 8bit or 16 bit.

Example:   MVI A, 20H

It means transfer the data (20H) hexadecimal form into the accumulator. If the accumulator has any data before then it will be overridden by the data 20H.

Example:    LXI H 3225

It means Load the immediate data to HL register pair.

2. Register addressing mode

The data that has to be operated upon is present inside the register when using register addressing mode, as are the operands. Data is copied from one register to another in this manner.

Syntax: 

MOV destination_register   source_register

Example: MOV B, C

Here, register C is the source register, and register B is the destination register. Let suppose the register C has value 10H so, now this data will be copied into the register B.

So, after this operation Register C=10H and Register B=10H.

Example:  ADD B

Above instruction is an arithmetic operation, and in 8085 arithmetic operation, it is done by accumulator. So by default the destination and one operand is already register A (or accumulator) and another operand is register B.

Before this instruction:  Accumulator = 02H

                                        Register B=03H

Instruction: A=A+B

After this instruction:     Accumulator=05H

                                        Register=03H

Example: INR D

Above instruction has only one operand and that is register D. Above instruction is used to increment the value of any register contained.

Let’s suppose D has the data 02H before this instruction and after this D=02+1(03H).

3. Direct addressing mode

The data that has to be operated upon is present at a memory location, which is directly supplied as an operand in the direct addressing mode.

Syntax:               

LDA memory_location

For Example:              LDA 2134H

Above instruction will fetch the data from memory location 2134 and the data which is placed at location 2134 will be loaded into the accumulator.

For Example:                LHLD 3060H

Above instruction means the data which is placed at memory location at 3060 will be placed in HL register pair. It will definitely be 16 bit data (8bit for register H and 8 bit for register L).

4. Indirect addressing mode

 In this addressing mode, the data which we want to use will be available at any memory location and that memory location will be specified indirectly (by using the register's contents).

For Example: MOV A,M

Above instruction means the HL pair (16 bit) will have combined data of 16 bit so they will represent a memory location. The data at that memory location will be copied into accumulator.

Let suppose Register H=20H

                     Register L=30H

They combined represent the data 2030H, so the data which is placed at memory location 2030H will be copied into the accumulator.

For example:                  STAX B

Above instruction means that the memory location represented by the BC register pair, will be stored by the value present at the accumulator.

Let’s suppose accumulator has value 14H and register B has value 22H and register C has value 32H.

So, at memory location 2232H the data 14H will be stored. (register to memory transfer)

5. Implied addressing mode

In this mode, only opcode is present and no data or no operands are needed in this type of instruction.

For Example: RRC which means “rotate the bits of the accumulator right by 1 bit”, and RLC which means “rotate the bits of the accumulator left by 1 bit”.


Related Topics

8085 Arithmetic Instructions

Arithmetic instructions are a type of instruction in a computer's instruction set that perform arithmetic operations on data. These operations can include addition, subtraction, multiplication, and division. Arithmetic instructions can...

4 minutes read.

Bipartite Graph

A graph is said to be bipartite if and only if we can divide all the vertices of a graph into two sets such that these sets are mutually exclusive...

4 minutes read.

8255 Microprocessor Operating Modes

8255 microprocessor was invented by intel in the year 1980s. 8255 microprocessor is a general-purpose microprocessor that can be programmed. 8255 is mostly used as an interface between devices like...

3 minutes read.

Data Path, ALU and Control Unit

Data Path, ALU(Arithmetic Logic Unit) and Control Unit What is the Data path? Suppose any data processing operation should be performed in the CPU like transferring the content of register from one...

5 minutes read.

Machine Instructions

What is a Digital Computer? A computer that takes input in a binary form and produces output in binary form. The question arises of what kind of input the computer takes...

4 minutes read.

Computer Organization and Architecture Data Formats

Data Formats In the digital world, everything is based on digits. In every method, the calculation is processed on the digits, and most importantly, the computer only understands the binary language...

6 minutes read.

Micro-Operations

Micro-Operations If CPU wants to perform any operation, suppose execution of only one instruction or even break it down one particular execution phase (like fetch instruction, write back, decode, operand fetch...

9 minutes read.

CarryLook Ahead Adder

What is Adder? Adder is the combinational circuit that is used to add the bits in digital electronics. As we know, in the digital system, every number is represented in the...

4 minutes read.

Addressing mode in 8085 microprocessor

What is a Microprocessor? Microprocessor is a unit which is able to perform arithmetic and logical operations and is built on a single chip. The 8085 microprocessor is built by Intel which...

4 minutes read.

COA: Interrupt and its types

Introduction: In general terms, the word interrupt means to stop the progress of ongoing work in between or to break the continuation of the work. In early digital computing, the...

5 minutes read.

BCD to 7 Segment Decoder

What is BCD? BCD is called Binary Coded Decimal. As you know there are a lot of forms in which we can represent the number like Binary, decimal, hexadecimal, and octal...

3 minutes read.

74138 IC DECODER

74138 DECODER Decoder A combinational circuit called a decoder can have up to 2n output lines and 'n' input lines. When a decoder is enabled, depending on the mix of inputs,...

4 minutes read.

CPU Registers

CPU Registers Within the CPU, we have small- small storage units called registers. If we are executing a certain program within the CPU, there's a need to store that program content,...

11 minutes read.

Convert a number from base 2 to base 6

Base 2 Base 2 is the format where you can represent any number with just two values which are 0 and 1. With the help of 0s and 1s, we can...

4 minutes read.

Biconnectivity in a Graph

What is a Graph? A graph is a structure where values are stored at the vertex, and the relation between vertices is denoted by edges. In a graph, if there is only...

4 minutes read.

Control Unit Organization

Control Unit Organization The Control Unit is the unit in the CPU, which controls the various components like input  & output devices, logic unit and memory. The Control Unit is the...

7 minutes read.

Data Transfer and Manipulation

What is Data Transfer? In computer architecture, data transfer refers to the movement of data between different components within a computer system. These components can include the central processing unit (CPU),...

6 minutes read.

8086 Microprocessor Pin Configurations

8086 microprocessor is invented and developed by Intel in 1976. The 8086 Microprocessor is an enhanced version of the 8085 Microprocessor. There are 20 address lines and 16 data lines...

6 minutes read.

Interfacing DAC with the 8051 Microcontroller

A wide range of applications calls for microcontrollers, including measuring and controlling physical quantities like temperature, pressure, speed, and distance. In these systems, the microcontroller creates digital output, but the controlling...

2 minutes read.

Control Signals in 8155 Microprocessor

Intel designed the chip 8155 used to interface with I/O devices. Basically, the 8085 microprocessor is directly unable to deal with its peripheral input output devices for reading data or...

3 minutes read.