Instruction Set of 8085
Instruction Set of 8085
Arithmetic Instructions
Logical Instructions
Branching Instructions
Control Instructions
4
In the world of microprocessors,
moving data is just as crucial as
processing it!
let’s unlock the power of data
transfer instructions
5
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.
6
Data Transfer Instructions
Opcode Operand Description
MOV Rd, Rs Copy from source to destination.
M, Rs
Rd, M
This instruction copies the contents of the source
register into the destination register.
The contents of the source register are not
altered.
If one of the operands is a memory location, its
location is specified by the contents of the HL
registers.
Example: MOV B, C or MOV B, M 7
Data Transfer Instructions
Opcode Operand Description
MVI Rd, Data Move immediate 8-bit
M, Data
9
Data Transfer Instructions
Opcode Operand Description
LDAX B/D Register Load accumulator indirect
Pair
Example: LDAX B
10
Data Transfer Instructions
Opcode Operand Description
LXI Reg. pair, 16- Load register pair immediate
bit data
11
Data Transfer Instructions
Opcode Operand Description
LHLD 16-bit address Load H-L registers direct
13
Data Transfer Instructions
Opcode Operand Description
STAX Reg. pair Store accumulator indirect
14
Data Transfer Instructions
Opcode Operand Description
SHLD 16-bit address Store H-L registers direct
16
Data Transfer Instructions
Opcode Operand Description
PCHL None Load program counter with H-L
contents
19
Opening Game of Unit 2nd
(Crossword
Generator)
20
Computers may be fast, but their
true power lies in how they
calculate and make decisions
21
Arithmetic Instructions
These instructions perform the operations
like:
Addition
Subtract
Increment
Decrement
22
Arithmetic Instructions
Opcode Operand Description
ADD R Add register or memory to
M accumulator
26
Arithmetic Instructions
Opcode Operand Description
ADC R Add register or memory to
M accumulator with carry
27
Arithmetic Instructions
Opcode Operand Description
ADI 8-bit data Add immediate to accumulator
The 8-bit data and the Carry Flag (CY) are added
to the contents of accumulator.
Example: ACI 45 H
29
Arithmetic Instructions
Opcode Operand Description
DAD Reg. pair Add register pair to H-L pair
Example: DAD B
30
Arithmetic Instructions
Opcode Operand Description
SUB R Subtract register or memory from
M accumulator
31
Arithmetic Instructions
Opcode Operand Description
SBB R Subtract register or memory from
M accumulator with borrow
Example: SUI 45 H
33
Arithmetic Instructions
Opcode Operand Description
SBI 8-bit data Subtract immediate from accumulator
with borrow
Example: SBI 45 H
34
Arithmetic Instructions
Opcode Operand Description
INR R Increment register or memory by 1
M
35
Arithmetic Instructions
Opcode Operand Description
INX R Increment register pair by 1
Example: INX H
36
Arithmetic Instructions
Opcode Operand Description
DCR R Decrement register or memory by 1
M
37
Arithmetic Instructions
Opcode Operand Description
DCX R Decrement register pair by 1
Example: DCX H
38
39
Logical Instructions
These instructions perform logical operations on
data stored in registers, memory and status flags.
40
AND, OR, XOR
Any 8-bit data, or the contents of register, or
memory location can logically have
AND operation
OR operation
XOR operation
42
Compare
Any 8-bit data, or the contents of register, or
memory location can be compares for:
Equality
Greater Than
Less Than
44
Logical Instructions
Opcode Operand Description
CMP R Compare register or memory with
M accumulator
46
Logical Instructions
Opcode Operand Description
CPI 8-bit data Compare immediate with accumulator
if (A) > data: carry and zero flags are reset
48
Logical Instructions
Opcode Operand Description
ANA R Logical AND register or memory with
M accumulator
49
Logical Instructions
Opcode Operand Description
ANI 8-bit data Logical AND immediate with
accumulator
50
Logical Instructions
Opcode Operand Description
ORA R Logical OR register or memory with
M accumulator
The contents of the accumulator are logically ORed with the contents of
the register or memory.
51
Logical Instructions
Opcode Operand Description
ORI 8-bit data Logical OR immediate with
accumulator
52
Logical Instructions
Opcode Operand Description
XRA R Logical XOR register or memory with
M accumulator
55
56
Logical Instructions
Opcode Operand Description
RRC None Rotate accumulator right
57
58
Logical Instructions
Opcode Operand Description
RAL None Rotate accumulator left through carry
59
60
Logical Instructions
Opcode Operand Description
RAR None Rotate accumulator right through
carry
61
62
63
Logical Instructions
Opcode Operand Description
CMA None Complement accumulator
64
Logical Instructions
Opcode Operand Description
CMC None Complement carry
65
Logical Instructions
Opcode Operand Description
STC None Set carry
66
Branching Instructions
The branching instruction alter the normal
sequential flow.
67
Branching Instructions
Opcode Operand Description
JMP 16-bit address Jump unconditionally
68
Branching Instructions
Opcode Operand Description
Jx 16-bit address Jump conditionally
69
Jump Conditionally
Opcode Description Status Flags
JC Jump if Carry CY = 1
70
Branching Instructions
Opcode Operand Description
CALL 16-bit address Call unconditionally
71
Branching Instructions
Opcode Operand Description
Cx 16-bit address Call conditionally
73
Branching Instructions
Opcode Operand Description
RET None Return unconditionally
76
Branching Instructions
Opcode Operand Description
RST 0–7 Restart (Software Interrupts)
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
78
Instruction Set (Stack,
I/O and Control Group)
79
Stack Instructions set
PUSH
POP
XTHL
SPHL
80
Stack Instructions set
Opcode Operand Description
PUSH Reg. pair Push register pair onto stack
86
Control Instructions
The control instructions control the operation
of microprocessor.
Used to perform the I/O operations and
machine control operations
87
Control Instructions
NOP
HLT
DI
EI
RIM
SIM
88
Control Instructions
Opcode Operand Description
NOP None No operation
89
Control Instructions
Opcode Operand Description
HLT None Halt
90
Control Instructions
Opcode Operand Description
DI None Disable interrupt
91
Control Instructions
Opcode Operand Description
EI None Enable interrupt
94
Control Instructions
Opcode Operand Description
SIM None Set Interrupt Mask
95
SIM Instruction
96
I/O Instructions
IN
OUT
97
I/O Instructions
Opcode Operand Description
IN 8-bit port Copy data to accumulator from a port
address with 8-bit address
98
I/O Instructions
Opcode Operand Description
OUT 8-bit port Copy data from accumulator to a port
address with 8-bit address
99
100
Programming with Stack:
101
Programming with Stack:
102
Programming with Stack:
103
Programming with Stack:
104
Programming with Subroutines:
105
Programming with Subroutines:
1. Multiple Call
Subroutines:
This is a subroutine called
from many locations in the
main program.
Eg. Delay subroutine.
106
Programming with Subroutines:
2. Nested Subroutine:
When a subroutine called another subroutine, it is
called a nested subroutine.
107
Programming with Subroutines:
3. Multiple Ending Subroutines:
When a subroutine can be terminated
at more than one place, it is called a
multiple ending subroutine.
108
109
Programming with Time-Delay Loops:
3. Multiple Ending Subroutines:
When a subroutine can be terminated at more than one
place, it is called a multiple ending subroutine.
110
111
Timing and Control Unit:
It co-ordinates and controls all internal units
(ALU/Reg’s) and external units (DMA).
112
Interface Unit:
HOLD->DMA Request
HLDA->DMA Grand
113