Skip to main content

Addressing modes in given instructions

Short answer

LDA 2000H uses direct addressing (16-bit address in instruction). MVI B,32H uses immediate addressing (data in instruction). STAX D uses register indirect addressing (address in DE pair). MOV A,B uses register addressing (both operands registers).

The following instructions are given: i) LDA 2000H ii) MVI B, 32H iii) STAX D iv) MOV A, B. Which addressing modes are used in the above instructions? Explain briefly about them.

The 8085 finds the location of an operand using an addressing mode. The four instructions use:

InstructionAddressing mode
i) LDA 2000HDirect addressing
ii) MVI B, 32HImmediate addressing
iii) STAX DRegister indirect addressing
iv) MOV A, BRegister addressing

i) LDA 2000H: direct addressing

The 16-bit address of the operand is given in the instruction itself (3 bytes: the opcode, then the low and high address bytes). The content of memory location 2000H is loaded into the accumulator. If M[2000H] = 5AH, then A = 5AH.

ii) MVI B, 32H: immediate addressing

The data (32H) is part of the instruction (2 bytes: opcode and data). It is moved into register B with no memory access for the operand. B = 32H.

iii) STAX D: register indirect addressing

The register pair DE holds the memory address where the data is to be stored. The accumulator content is stored in the memory location pointed to by DE. If DE = 3000H and A = 7FH, then M[3000H] = 7FH. It is a 1-byte instruction.

iv) MOV A, B: register addressing

Both operands are CPU registers, and the data is copied from register B to register A. It is a 1-byte instruction and executes fastest because no memory is accessed. A = B.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Computer Organization and Architecture chapter 2 questions →