In this lecture, we are going to learn about the addressing modes of 8085 microprocessors. We will cover the details of all addressing modes of 8085. So let’s start to know what type of addressing modes are available in the 8085 microprocessor.
Addressing Modes of 8085 Microprocessor
The different methods to select (address) the operands are called the Addressing Modes.
The types of Addressing modes of the 8085 microprocessor are:
Sr. No | Addressing modes of 8085 microprocessor |
---|---|
1. | Immediate Addressing Mode |
2. | Register Addressing Mode |
3. | Direct Addressing Mode |
4. | Indirect Addressing Mode |
5. | Implied Addressing Mode |
Before getting the knowledge of the addressing modes of 8085, you can also read the different types of interrupts available in the 8085 microprocessor. You can learn from the link.
Also Read: Interrupts in 8085 Microprocessor
Now we will discuss each addressing mode of the 8085 Microprocessor in detail.
1. 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” indicates immediate addressing mode.
Examples of Immediate Addressing Mode:
- MVI A, A0 H: This instruction transfers immediate data (A0 H ) to the A register.
- LXI H, C200 H: This instruction transfers 16-bit immediate data C200 to the HL register pair. Lower order data(00H) to L register and high order data (C2 H) to H register.
2. 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 of Register Addressing Mode:
- 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 the 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)
3. 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 is the slower-order address mode, and the third is the higher-order address mode.
- For I/O instruction that uses direct addressing mode is 2-byte as the address if I/O is one byte.
Examples of Direct Addressing Mode:
- LDA C200 H: Load accumulator directly from the memory location. In this instruction, the contents of the 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 is stored at memory location C200 H.
4. Indirect Addressing Mode
- In indirect addressing mode, the instruction references 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 of Indirect Addressing Mode:
- 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.
5. 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 of Implider Addressing Mode:
- RAL: Rotate the accumulator left, it operates on the data in the 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.
FAQs 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 target Data, which is also called an Operand.
What is the addressing mode in the microprocessor?
The way of specifying data to be operated by an instruction is known as addressing modes. This specifies that the given data is immediate data or an address. It also specifies whether the given operand is a register or register pair.
Also Read Important Instruction Sets of 8085