8085 Microprocessor – Assembly Language Programming (Part II)

Instruction Formats

An instruction is a binary pattern designed inside an MP to perform a specific function.

Each instruction has two parts:

  • The task to be performed called the operation code (opcode).
  • Data to be operated on, called the operand.

Instruction Formats Types

The instruction format is divided into three types:

  • One Byte Instruction
  • Two Byte Instruction
  • Three Byte Instruction

One Byte Instruction

  • Includes the opcode and operand in the same byte
  • Operand(s) are internal register and are coded into the instruction.
  • Requires one memory location.

Example of One Byte Instruction

InstructionOpcodeOperandHEX CodeTask
MOV C, AMOVC, A4F HCopy the content of the accumulator in register C
ADD BADDB80 HAdd the contents of registers B to the contents of the accumulator
CMACMA2F HInvert (compliment) each bit in the accumulator

Two Byte Instruction

  • The first byte specifies the opcode and the second byte specifies the operand.
  • The source operand is a data byte immediately following the opcode.
  • The instruction would require two memory locations to store in memory.

Example of Two Byte Instruction

InstructionOpcodeOperandHEX CodeTask
MVI A, DATAMVIA, DATA3EFirst ByteLoad an 8-bit data byte in the accumulator
DATASecond Byte

Three Byte Instruction

  • The first byte specifies the opcode, and the following two bytes specify the 16-bit address.
  • The instruction would require three memory locations to store in memory.
  • NOTE: The second byte is the low-order address & the third byte is the higher-order address.
  • Opcode + Data Byte (LO) + Data Byte (HO)

Example of Three Byte Instruction

InstructionOpcodeOperandHEX CodeTask
JMP 2000 HJMP2000 HC3First ByteTransfer the program sequence to the memory location 2000 H.
00Second Byte
20Third Byte
LDA D000 HLDADOOO H3AFirst ByteLoad Accumulator with the contents from memory specify with address
00Second Byte
D0Third Byte

Table of contents