PadhaikoAll subjects

Past exam question: 2081 Chaitra (Regular), Q2(b)

Microprocessors · 5 marks

Open in the Padhaiko app

Topic: Instruction & Data Formats, Addressing Modes

Question

Explain briefly about different types of addressing mode used in 8085 with suitable example.

Solution

The Five Addressing Modes of Intel 8085:

  1. Immediate Addressing Mode: The data operand is specified directly within the instruction bytes following the opcode (2-byte or 3-byte instructions).
    • Example: MVI A, 45H (Loads immediate byte 45H into accumulator).
    • Example: LXI H, 2050H (Loads 16-bit address 2050H into HL register pair).
  2. Register Addressing Mode: The operands reside entirely within the internal general-purpose registers (A, B, C, D, E, H, L). No memory bus access is required.
    • Example: MOV A, B (Copies contents of register B into accumulator A).
    • Example: ADD C (Adds contents of register C to accumulator).
  3. Direct Addressing Mode: The 16-bit physical memory address of the operand is explicitly provided as the second and third bytes of the instruction.
    • Example: LDA 2050H (Loads data byte from memory location 2050H into accumulator).
    • Example: STA 3000H (Stores accumulator byte at memory location 3000H).
    • Example: IN 01H (Reads 8-bit port address 01H directly).

Indirect and Implied Addressing Modes:

  1. Register Indirect Addressing Mode: The 16-bit memory address where the operand is stored is held inside a register pair (primarily the HL pair, designated as memory pointer M, or BC/DE with STAX/LDAX).
    • Example: MOV A, M (Copies byte from memory address pointed to by HL into accumulator).
    • Example: ADD M (Adds byte from memory address [HL] to accumulator).
    • Example: STAX B (Stores accumulator at memory address pointed to by BC pair).
  2. Implied / Implicit Addressing Mode: The opcode itself implicitly specifies the operand(s); no explicit operand is mentioned in the instruction mnemonics.
    • Example: CMA (Complements the accumulator; operand is implicitly A).
    • Example: RLC (Rotates accumulator left by 1 bit; operand is implicitly A).
    • Example: STC (Sets the carry flag; operand is implicitly CY).

Summary Table:

Addressing ModeOperand LocationExample InstructionByte Length
ImmediateIn instruction bytesMVI A, 32H2 bytes
RegisterIn CPU registersMOV A, B1 byte
DirectSpecified 16-bit addressLDA 2050H3 bytes
Register IndirectAddress in register pair (HL)MOV A, M1 byte
ImpliedImplicit in opcodeCMA1 byte
Answer:

8085 supports 5 addressing modes: Immediate (MVI A, 45H), Register (MOV A, B), Direct (LDA 2050H), Register Indirect (MOV A, M), and Implied/Implicit (CMA).

All past exam questions for Microprocessors