Addressing Modes :
In this lecture, we are going to learn about the addressing modes of 8085 microprocessors and details of all addressing modes.
The different methods to select (address) the operands are called the Addressing Modes for 8085 microprocessor are:
- Immediate Addressing
- Register Addressing
- Direct Addressing
- Indirect Addressing
- Implied Addressing
Now we will discuss each addressing mode of the 8085 Microprocessor in detail.
Also Read: Interrupts in 8085 Microprocessor
Immediate Addressing Mode:
- In immediate addressing mode, the data (8 / 16 bit) is specified in the instruction itself.
- The immediate addressing instructions are either 2 bytes or 3 bytes long.
- In 2 byte instruction, the first byte is OPCODE, and the second byte is the 8-bit data.
- In 3 byte instruction, the first byte is OPCODE, second and third bytes are 16-bit data.
- The instruction containing the letter “I” indicate immediate addressing mode.
Examples:
- MVI A, A0 H : This instruction transfers immediate data (A0 H ) to A register.
- LXI H, C200 H : This instruction transfer 16-bit immediate data C200 to HL register pair. Lower order data(00H) to L register and high order data (C2 H) to H register.
Register Addressing Mode:
- In register addressing mode the source and destination operands are general-purpose registers.
- The register addressing instructions are generally of 1 byte i.e OPCODE only.
- The OPCODE specifies the operation and registers to be used to perform the operation.
Examples:
- MOV D, B : This instruction copies the contents of register B to the D register. The source and destination operands are both registers.
- ADD B : This instruction adds the content of B register and A register, The data is present in both B and A registers. The result is stored in the accumulator.
- PCHL : This instruction will transfer the content of register pair HL to the PC ( Program Counter)
Direct Addressing Mode:
- In direct addressing mode, the 16-bit address of the operand is given within the instruction itself.
- The instruction in the direct addressing mode is 3-byte instructions. The first byte is OPCODE, the second slower order address mode and the third is the higher-order address mode.
- For I/O instruction that uses direct addressing mode are 2-byte as the address if I/O is one byte.
Examples:
- LDA C200 H : Load accumulator directly from the memory location. In this instruction, the contents of C200 memory location are transferred to the accumulator.
- STA C200 H : Store accumulator directly to memory location. In this instruction, the content of the accumulator are store at memory location C200 H.
Indirect Addressing Mode:
- In indirect addressing mode the instruction reference the memory through a register pair.
- i.e. the memory address where the operand is located is specified by the content of a register pair.
Examples:
- MOV A, M : In this case, M is a memory pointer specifying the HL register pair where the address is stored. The contents of the HL pair are used as addresses and the content of that memory location is transferred to the accumulator.
- LDAX B : In this case, the BC register pair is used as an address and the content of the memory location specified by the BC register pair is copied to the accumulator.
Implied Addressing or Implicit Addressing Mode:
- The implied mode of addressing does not require any operand.
- The data is specified within OPCODE itself.
- Generally, the implied addressing mode instruction is a 1-byte instruction.
- The data is supposed to be present generally in the accumulator.
Examples:
- RAL : Rotate accumulator left, it operates on the data in accumulator only. So whenever RAL is used it is implied that the data to be operated on is available in the accumulator only.
- CMC : Complement carry flag.
Frequently Asked Questions on Addressing Modes of 8085
-
How many addressing modes are there?
The most common types of addressing modes are immediate, indirect, direct, indexed, and register addressing modes. In the immediate addressing mode, the operand field contains the operand itself, which is usually the numerical value of the operand.
-
How do you identify addressing modes?
(1.) The starting address of the memory segment.
(2.) Effective address or Offset: An offset is determined by adding any combination of three address elements: displacement, base, and index. Displacement: It is an 8 bit or 16-bit immediate value given in the instruction. Base: Contents of base register, BX, or BP. -
What is the addressing mode in the microcontroller?
An Addressing Mode is a way to locate a target Data, which is also called an Operand.
Also Read:
- Instruction Set of 8085 Microprocessor
- Data Transfer Instructions In 8085
- Arithmetic Instructions of 8085
[…] Types of Instruction set of 8085 based on Addressing Modes: […]
[…] Register addressing mode […]
[…] Addressing Modes of 8085 Microprocessor […]