×

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

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.

Assembly Language Register

Assembly Language Register Assembly language was introduced during the late 1940s in the second generation. It is a low-level language that helps in communication between the user and the computer. It...

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

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.

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.

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.

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.

Microprocessor classification

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 known as the...

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

Addressing Modes

Introduction: Addressing Modes An instruction consists of two parts opcode and operands. Opcode tells the operation going to perform, and operand information is the address of the operand. The CPU interprets...

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

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.

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.

8085 Pin Configuration

Introduction: Intel 8085 is consist 40 pin IC. The pin name of 8085 is A8 – A15; AD0 – AD7; ALE; IO/M; S0, S1; RD; WR; READY; HOLD; HLDA; INTR; INTA;...

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

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.

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.

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.

8085 instructions set

Introduction: In the computer, the user sends the data. The computer can use data and it also process the data. After the processing, send the result to the user. The specific...

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