Instruction Set of 8085
Instruction Set of 8085
8085(UNIT-2)
SUB: Microprocessor &
Interfaces
Er. Mohit Mishra
Associate Professor
CS DEPARTMENT
ACEIT JAIPUR
Instruction Set of 8085
An instruction is a binary pattern designed inside a
microprocessor to perform a specific function.
The entire group of instructions that a
microprocessor supports is called Instruction Set.
8085 has 246 instructions.
Each instruction is represented by an 8-bit binary
value.
These 8-bits of binary value is called Op-Code or
Instruction Byte.
Classification of Instruction Set
Arithmetic Instructions
Logical Instructions
Branching Instructions
Control Instructions
Data Transfer Instructions
These instructions move data
between registers, or between
memory and registers.
These instructions copy data from
source to destination.
While copying, the contents of source
are not modified.
Data Transfer Instructions
Opcode Operand Description
MOV Rd, Rs Copy from source to destination.
M, Rs
Rd, M
Example: LDAX B
Data Transfer Instructions
Opcode Operand Description
LXI Reg. pair, 16- Load register pair immediate
bit data
Example: STAX B
Data Transfer Instructions
Opcode Operand Description
SHLD 16-bit Store H-L registers direct
address
Example: XCHG
Data Transfer Instructions
Opcode Operand Description
SPHL None Copy H-L pair to the Stack Pointer
(SP)
Example: SPHL
Data Transfer Instructions
Opcode Operand Description
XTHL None Exchange H–L with top of stack
Example: XTHL
Data Transfer Instructions
Opcode Operand Description
PCHL None Load program counter with H-L
contents
Example: PCHL
Data Transfer Instructions
Opcode Operand Description
PUSH Reg. pair Push register pair onto stack
Example: PUSH B
Data Transfer Instructions
Opcode Operand Description
POP Reg. pair Pop stack to register pair
Example: POP H
Data Transfer Instructions
Opcode Operand Description
OUT 8-bit port Copy data from accumulator to a port
address with 8-bit address
Example: OUT 78 H
Data Transfer Instructions
Opcode Operand Description
IN 8-bit port Copy data to accumulator from a port
address with 8-bit address
Example: IN 8C H
Arithmetic Instructions
These instructions perform the
operations like:
Addition
Subtract
Increment
Decrement
Addition
Any 8-bit number, or the contents of register,
or the contents of memory location can be
added to the contents of accumulator.
Example: ADI 45 H
Arithmetic Instructions
Opcode Operand Description
ACI 8-bit data Add immediate to accumulator with
carry
The 8-bit data and the Carry Flag (CY) are added
to the contents of accumulator.
Example: ACI 45 H
Arithmetic Instructions
Opcode Operand Description
DAD Reg. pair Add register pair to H-L pair
Example: DAD B
Arithmetic Instructions
Opcode Operand Description
SUB R Subtract register or memory from
M accumulator
Example: SUI 45 H
Arithmetic Instructions
Opcode Operand Description
SBI 8-bit data Subtract immediate from accumulator
with borrow
Example: SBI 45 H
Arithmetic Instructions
Opcode Operand Description
INR R Increment register or memory by 1
M
Example: INX H
Arithmetic Instructions
Opcode Operand Description
DCR R Decrement register or memory by 1
M
Example: DCX H
Logical Instructions
These instructions perform logical operations on
data stored in registers, memory and status flags.
OR operation
XOR operation
Greater Than
Less Than
if (A) > (reg/mem): carry and zero flags are reset.
if (A) > data: carry and zero flags are reset
The contents of the accumulator are logically ORed with the contents of the
register or memory.
RST 1 0008 H
RST 2 0010 H
RST 3 0018 H
RST 4 0020 H
RST 5 0028 H
RST 6 0030 H
RST 7 0038 H
Control Instructions
The control instructions control the
operation of microprocessor.
Control Instructions
Opcode Operand Description
NOP None No operation