×

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

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.

Digital Number System

Digital Number System: The computer understands digital language only. Many number systems are used in digital technology. The most common are Decimal, Binary, Octal and Hexadecimal number systems. Types of the...

7 minutes read.

Types of Microprocessors

Introduction:Microprocessor is known as the computer processor. The IC or integrated Circuit makes the microprocessor. That is the brain of the computer machine.  The microprocessor is the Processor or CPU (Central...

3 minutes read.

Basic Terminologies Related to COA

Some Basic Terminologies Related to COA Computer organization and architecture is the detailed study of the internal components of the computer with their functionality. It describes how components arranged together and...

7 minutes read.

Computer Organization and Architecture Tutorial

Introduction to Computer Organization and Architecture In this modern era, or we can say computer era, Technology from all around surrounds us. Human is conserved, connected and absorbed by Technology. From...

4 minutes read.

Ethernet Frame Format

What is Ethernet? As we know in computer networking, LAN (Local Area Network) is used to connect devices in limited geographical areas like schools or a building.LAN uses different topologies (arrangement...

3 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.

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.

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.

Flag Register of 8086 Microprocessor

In this article, we are going to study about the one of the registers named flag registers of 8086 microprocessor. We are also going to know where and how to...

3 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.

Instruction Pipelining and Pipeline Hazards

Instruction Pipelining and Pipeline Hazards To apply pipeline, the prerequisite is to perform the same processing over multiple inputs, then pipelining is important. So instruction execution is the best example for...

10 minutes read.

Advantages and Disadvantages of Flash Memory

What is Flash Memory? Electrically Erasable Programmable Read-Only Memory (EEPROM) and Erasable Programmable Read-Only Memory (EPROM) are used for flash memory (EEPROM). Although technically the word flash is used in the industry...

3 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.

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.

Pipelining: Computer Organization and Architecture

Introduction to Pipelining Before learning pipeline, we have to understand about the Parallel processing. Parallel processing is the processing of data simultaneously. There are three techniques of parallel processing. Types of Processing: Vector ProcessingArray...

7 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.

Use Case Diagram for the online bank system

What is a Use Case Diagram? A tool is called a Use Case Diagram which is used to create, present, and comprehend the functional requirements for a system. The Use Case...

3 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.

Local Broadcast Address and loopback address

In computer networking, if you send the data from one source to another source or group of sources in the form of packets, then this is called casting. We can categorize...

3 minutes read.