Introduction to the 8085 Instruction Set

The 8085 is an 8-bit microprocessor that was first introduced by Intel in 1976. It has a basic instruction set consisting of 246 instructions, which are divided into the following categories:

Data Transfer Instructions:

  • MOV: Move register/memory to register/memory
  • MVI: Move immediate data to register/memory
  • LXI: Load immediate data into register pair
  • LDA: Load accumulator with memory
  • STA: Store accumulator in memory
  • LHLD: Load HL pair direct
  • SHLD: Store HL pair direct
  • XCHG: Exchange H and L with D and E

Arithmetic Instructions:

  • ADD: Add register/memory to accumulator
  • ADC: Add register/memory and carry to accumulator
  • ADI: Add immediate data to accumulator
  • ACI: Add immediate data and carry to accumulator
  • SUB: Subtract register/memory from accumulator
  • SBB: Subtract register/memory and borrow from accumulator
  • SUI: Subtract immediate data from accumulator
  • SBI: Subtract immediate data and borrow from accumulator
  • INR: Increment register/memory
  • DCR: Decrement register/memory
  • INX: Increment register pair
  • DCX: Decrement register pair
  • DAD: Double register pair and add

Logical Instructions:

  • ANA: AND register/memory with accumulator
  • ANI: AND immediate data with accumulator
  • ORA: OR register/memory with accumulator
  • ORI: OR immediate data with accumulator
  • XRA: XOR register/memory with accumulator
  • XRI: XOR immediate data with accumulator
  • CMP: Compare register/memory with accumulator
  • CPI: Compare immediate data with accumulator
  • CMA: Complement accumulator
  • STC: Set carry flag
  • CMC: Complement carry flag

Branching Instructions:

  • JMP: Jump to memory address
  • JC: Jump on carry flag set
  • JNC: Jump on carry flag reset
  • JZ: Jump on zero flag set
  • JNZ: Jump on zero flag reset
  • JP: Jump on positive sign flag
  • JM: Jump on minus sign flag
  • JPE: Jump on parity flag set
  • JPO: Jump on parity flag reset
  • CALL: Call subroutine at memory address
  • CC: Call subroutine on carry flag set
  • CNC: Call subroutine on carry flag reset
  • CZ: Call subroutine on zero flag set
  • CNZ: Call subroutine on zero flag reset
  • CP: Call subroutine on positive sign flag
  • CM: Call subroutine on minus sign flag
  • CPE: Call subroutine on parity flag set
  • CPO: Call subroutine on parity flag reset
  • RET: Return from subroutine
  • RC: Return on carry flag set
  • RNC: Return on carry flag reset
  • RZ: Return on zero flag set
  • RNZ: Return on zero flag reset
  • RP: Return on positive sign flag
  • RM: Return on minus sign flag
  • RPE: Return on parity flag set
  • RPO: Return on parity flag reset

Stack, I/O, and Machine Control Instructions:

  • PUSH: Push register pair onto stack
  • POP: Pop register pair from stack
  • XTHL: Exchange stack top with H and L
  • SPHL: Load HL pair direct to stack pointer
  • EI: Enable interrupts
  • DI: Disable interrupts
  • IN: Input data from I/O port
  • OUT: Output data to I/O port
  • HLT: Halt the processor
  • NOP: No operation

Note that this is not an exhaustive list of all the instructions available in the 8085 instruction set, but it includes the most commonly