Monday, September 30, 2024

Addressing Modes of 8080 / 8085 MicroProcessor

Hi,
 
In this post I am going to talk about different addressing modes of 8080/8085...without much talking let us get into the topic.
 
There are five different addressing modes in 8080/8085...namely
 
Addressing modes of 8080/8085

Immediate Addressing Mode

Register Addressing Mode

Direct Addressing Mode

Indirect Addressing Mode

Implied/Implicit Addressing Mode
 
Well before we proceed further...let us ask a question to ourself, what do you mean by Addressing Mode in the first place?
 
To put in simple terms, the word Addressing Mode refers to the way in which one of the operands is referred in 8080/8085 instruction(s).

The following discussion would detail more about each of the addressing modes...

Immediate Addressing Mode
     
In this addressing mode, the data that is referred in the instruction is directly transfered to the register...

Eg :- MVI C, 50H
Consider the instruction above, in this the value 50H is mentioned as the source which has to be copied directly to the register C and this copy is not through other available register or from a specified memory location.

Consider an other instruction of loading data like the one given below....

LXI B, 1000H
the above instruction loads the BC register pair with the value 1000H, since the value 1000H is a 16-bit value, it requires 16-bit place holder to resider. Picking up BC register pair is up to us...the same can be done done using DE register pair as well...

Register Addressing Mode
     
In this addressing mode, the data is transferred/copied from one register to another register. i.e the source and destination should both be of type registers

Eg :- MOV B, C
From the above instruction, both the operands of type registers(8-bit),the value of the source i.e C is moved to the destination i.e B

Consider an other instruction of transferring data between registers...

INR D
the above instruction does a simple operation of incrementing the value of D by one and stores the result in the same register...

Direct Addressing Mode
     
In this addressing mode, the address of the memory location is used directly to store and retrive the value into a register...

Eg :- LDA 1000H
the above instruction would load the value resides at the memory location 1000H into the register A i.e the accumulator

Consider an other instruction which stores the register value into the memory location at the specified memory address

STA 1000H
the above instruction does store the value accumulated/contained in the accumulator or register A into the memory location at the address 1000H

Indirect Addressing Mode
     
In this addressing mode, the address of the memory location is used indirectly via a register pair to retrive and store the value into a register...

Eg :- STAX B
the above instruction would store the accumulater value into the memory address contained in the register pair B and C

Consider an other instruction which stores the register value into the memory location at the specified memory address

INR M
the above instruction increment the value which is residing at the memory location whose address is contained in register pair H and L

Implicit/Implied Addressing Mode
      In this addressing mode, the operand is implied in the instruction itself...

Eg :- STC
In the above instruction the register C is implied/implicit in the instruction itself and would set the carry flag to '1' irrespective of the current value of the carry flag

Consider an other instruction...

CMC
the above instruction would complement the value of the carry flag...i.e if the present value of the carry flag is '1' the instruction would complements it to '0' and vice versa.

No comments:

Post a Comment

Addressing Modes of 8080 / 8085 MicroProcessor

Hi,   In this post I am going to talk about different addressing modes of 8080/8085...without much talking let us get into the topic.   Ther...