Prerequiste – Addressing modes
The way of specifying data to be operated by an instruction is called addressing mode.
Types of addressing modes –
In 8085 microprocessor there are 5 types of addressing modes:
- Immediate Addressing Mode –
In immediate addressing mode the source operand is always data. If the data is 8-bit, then the instruction will be of 2 bytes, if the data is of 16-bit then the instruction will be of 3 bytes.
MVI B 45 (move the data 45H immediately to register B)
LXI H 3050 (load the H-L pair with the operand 3050H immediately)
JMP address (jump to the operand address immediately)
- Register Addressing Mode –
In register addressing mode, the data to be operated is available inside the register(s) and register(s) is(are) operands. Therefore the operation is performed within various registers of the microprocessor.
MOV A, B (move the contents of register B to register A)
ADD B (add contents of registers A and B and store the result in register A)
INR A (increment the contents of register A by one)
- Direct Addressing Mode –
In direct addressing mode, the data to be operated is available inside a memory location and that memory location is directly specified as an operand. The operand is directly available in the instruction itself.
LDA 2050 (load the contents of memory location into accumulator A)
LHLD address (load contents of 16-bit memory location into H-L register pair)
IN 35 (read the data from port whose address is 01)
- Register Indirect Addressing Mode –
In register indirect addressing mode, the data to be operated is available inside a memory location and that memory location is indirectly specified by a register pair.
MOV A, M (move the contents of the memory location pointed by the H-L pair to the accumulator)
LDAX B (move contents of B-C register to the accumulator)
LXIH 9570 (load immediate the H-L pair with the address of the location 9570)
- Implied/Implicit Addressing Mode –
In implied/implicit addressing mode the operand is hidden and the data to be operated is available in the instruction itself.
CMA (finds and stores the 1’s complement of the contains of accumulator A in A)
RRC (rotate accumulator A right by one bit)
RLC (rotate accumulator A left by one bit)
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.My Personal Notes arrow_drop_up
- Addressing modes in 8086 microprocessor
- Addressing Modes
- Difference between Indirect and Implied Addressing Modes
- Difference between Memory based and Register based Addressing Modes
- Difference between Direct and Indirect Addressing Modes
- Difference between Indirect and Immediate Addressing Modes
- Difference between Direct and Immediate Addressing Modes
- Difference between PC relative and Base register Addressing Modes
- Difference between Direct and Implied Addressing Modes
- 8255 microprocessor operating modes
- Difference between Implied addressing mode and Immediate addressing mode
- Difference between Relative Addressing Mode and Direct Addressing Mode
- 8085 program to swap two 16 bit numbers using Direct addressing mode
- 8085 program to swap two 8 bit numbers using Direct addressing mode
- Registers of 8085 microprocessor
- Flag register in 8085 microprocessor
- Instruction cycle in 8085 microprocessor
- Arithmetic instructions in 8085 microprocessor
- Logical instructions in 8085 microprocessor
- Data transfer instructions in 8085 microprocessor
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.