×

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

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.

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.

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.

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.

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.

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.

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.

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.

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.

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.

Instruction Cycle: Computer Organization and Architecture

What is an effective Address? “Effective address is the address of operand in a computation-type instruction.” Computation type instructions are like ADD, SUB, MOV, OR, AND, etc., which require operand to...

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

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.

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.

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.

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.

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.

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.

IEEE Standard 754 Floating Point Numbers

Floating Point Representation: IEEE- 754 There were many problems in the conventional representation of floating-point notation like we could not express 0(zero), infinity number. To solve this, scientists have given a...

8 minutes read.