Skip to main content

Instruction and data format, addressing modes

Short answer

8085 instructions are one-byte (opcode only), two-byte (opcode + 8-bit data), or three-byte (opcode + 16-bit address low/high). Data can be unsigned, signed 2's complement, BCD, ASCII, or 16-bit. Addressing modes are immediate, register, direct, register indirect, and implied.

Explain the instruction format and data format of 8085 microprocessor. Explain different addressing modes.

Instruction format

Every 8085 instruction has an opcode (operation code) and, optionally, an operand. Depending on length, there are three formats.

TypeBytesLayoutExample
One-byte1Opcode (operand implied or in opcode)MOV A,B (78H), ADD C, HLT
Two-byte2Opcode, 8-bit data/portMVI A,32H (3E 32), OUT 80H
Three-byte3Opcode, low-order byte, high-order byteLDA 2050H (3A 50 20), JMP 3000H

In 3-byte instructions the low-order byte of the address/data is stored first, then the high-order byte.

Data format

The 8085 is an 8-bit machine; a word is 8 bits (D7 ... D0). Data can be:

  • Unsigned binary: 00H to FFH (0 to 255).
  • Signed binary: 2's complement; D7 is the sign bit (-128 to +127).
  • BCD: packed BCD has two digits per byte (e.g. 47H = 47); DAA corrects BCD addition.
  • ASCII: 7-bit code stored in a byte, e.g. 'A' = 41H.
  • 16-bit data/address: stored in two memory locations, low byte at the lower address.

Addressing modes

The way the operand is specified in an instruction.

  1. Immediate: the data is part of the instruction. MVI B,45H, LXI H,2050H, ADI 0FH.
  2. Register (register direct): the operand is in a register. MOV A,B, ADD C.
  3. Direct: the address of the operand is given in the instruction (a 16-bit memory address, or an 8-bit port address for IN/OUT). LDA 2050H, STA 3000H, IN 80H, OUT 81H.
  4. Register indirect: a register pair holds the memory address of the operand. MOV A,M (address in HL), LDAX B, STAX D.
  5. Implied (implicit): the operand is implied by the opcode itself, usually the accumulator. CMA, RAL, DAA, STC.

✓ Answer checked by Claude Opus 5.5 (high effort)

All Microprocessor chapter 2 questions →