1. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 1
Instruction Set of 8085 microprocessor
a) Data Transfer Group
b) Arithmetic Group
c) Logical Group
d) Branching/Loop Group
e) Stack and Machine Control Group
Notation used in Instruction and opcode
Notations Meaning
M Memory location pointed by HL register pair
R 8-bit register
RP 16-bit register pair
RS Source register
RD Destination register
Addr 16-bit address
X 8-bit data
b) Arithmetic Operation Group
1. ADD R 2. ADD M 3. ADC R 4. ADC M
5. ADI data 6. ACI data 7. DAD RP 8. SUB R
9. SUB M 10. SBB R 11. SBB M 12. SUI data
13. SBI data 14. DAA 15. INR R 16. INR M
17. DCR R 18. DCR M 19. INX RP 20. DCX RP
1. ADD R
Description - Add content of register R to accumulator A and store the result in
accumulator A.
Operation - A + R ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of addition.
Example - ADD C
Before Execution After Execution
C = 45H C = 45H
A = 35H A = 7A H
2. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 2
2. ADD M
Description - Add content of memory location M to accumulator A and store
the result in accumulator A.
Operation - A + M ----> A OR A + (HL) ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of addition.
Example - ADD M
Before Execution After Execution
M = (HL) = (2030) = 30H M = (HL) = (2030) = 30H
A = 35H A = 65 H
3. ADC R
Description - Add content of register R and carry flag content to accumulator A
and store the result in accumulator A.
Operation - A + R + CY ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of addition.
Example - ADC B
Before Execution After Execution
B = 23H B = 23H
A = 35H A = 59 H
CY = 1 = Set CY = 0 = Reset
4. ADC M
Description - Add content of memory location M and carry flag content to
accumulator A and store the result in accumulator A.
Operation - A + M + CY ----> A OR A + (HL) + CY ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of addition.
Example - ADC M
Before Execution After Execution
M = (HL) = (1000) = 24H M = (HL) = (1000) = 24H
A = 32H A = 57 H
CY = 1 = Set CY = 0 = Reset
3. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 3
5. ADI data
Description - Add immediate data to accumulator A and store the result in
accumulator A.
Operation - A + data ----> A
No. of Bytes- 2
Flags - All flags are modified to reflect the result of addition.
Example - ADI 73 H
Before Execution After Execution
data = 73H data = 73H
A = 35H A = A8 H
6. ACI data
Description - Add immediate data and carry flag content to accumulator A and
store the result in accumulator A.
Operation - A + data + CY ----> A
No. of Bytes- 2
Flags - All flags are modified to reflect the result of addition.
Example - ACI 10H
Before Execution After Execution
data = 10H data = 10H
A = 35H A = 46 H
CY = 1 = Set CY = 0 = Reset
7. DAD RP
Description - Add content of specified register pair RP to HL pair and store the
result in HL pair.
Operation - HL + RP ----> HL
No. of Bytes- 1
Flags - Only carry flags is modified to reflect the result of addition.
Example - DAD B
Before Execution After Execution
BC = 1245H BC = 1245H
HL = 1035H HL = 227A H
4. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 4
8. SUB R
Description - Subtract content of register R from accumulator A and store the
result in accumulator A.
Operation - A - R ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - SUB C
Before Execution After Execution
(i) C = 35H C = 35H
A = 45H A = 10 H
A = 45 H 0100 0101
C = 35 H 0011 0101
2’s Complement of C ----> 1100 1011
A = 45 H 0100 0101
2’s Complement of C ----> + 1100 1011
1 0001 0000
Carry is generated so CY = set, microprocessor complement this carry so CY =
reset, which represent that the result is positive and is in normal form (0001
0000 = 10 H).
(ii) C = 45H C = 45H
A = 35H A = F0 H
A = 35 H 0011 0101
C = 45 H 0100 0101
2’s Complement of C ----> 1011 1011
A = 35 H 0011 0101
2’s Complement of C ----> + 1011 1011
1111 0000
No carry generated so CY = reset, microprocessor complement this carry so CY
= set, which represent that the result is negative and is in 2’s complement
form (1111 0000).
10H
F0H
5. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 5
9. SUB M
Description - Subtract content of memory location M from accumulator A and
store the result in accumulator A.
Operation - A - M ----> A OR A - (HL) ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - SUB M
Before Execution After Execution
M = (HL) = (2030) = 30H M = (HL) = (2030) = 30H
A = 35H A = 05 H
Note: Subtraction method is same as SUB R.
10. SBB R
Description - Subtract content of register R and borrow flag content from
accumulator A and store the result in accumulator A.
Operation - A - R – Borrow Flag ----> A OR A - R – CY ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - SBB B
Before Execution After Execution
B = 23H B = 23H
A = 35H A =11 H
CY = 1 = Set CY = 0 = Reset
Note: Subtraction method is same as SUB R.
6. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 6
11. SBB M
Description - Subtract content of memory location M and borrow flag content
from accumulator A and store the result in accumulator A.
Operation - A - M – Borrow Flag ----> A OR A - (HL) - CY ----> A
No. of Bytes- 1
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - SBB M
Before Execution After Execution
M = (HL) = (1000) = 24H M = (HL) = (1000) = 24H
A = 32H A = 07 H
CY = 1 = Set CY = 0 = Reset
Note: Subtraction method is same as SUB R.
12. SUI data
Description - Subtract immediate data from accumulator A and store the result
in accumulator A.
Operation - A - data ----> A
No. of Bytes- 2
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - ACI 10H
Before Execution After Execution
data = 10H data = 10H
A = 35H A = 25 H
Note: Subtraction method is same as SUB R.
7. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 7
13. SBI data
Description - Subtract immediate data and borrow flag content from
accumulator A and store the result in accumulator A.
Operation - A – data – Borrow Flag ----> A OR A – data – CY ----> A
No. of Bytes- 2
Flags - All flags are modified to reflect the result of subtraction.
If CY = set, result is negative and is in 2’s complement form.
If CY = reset, result is positive and is in normal form.
Example - ACI 10H
Before Execution After Execution
data = 10H data = 10H
A = 35H A = 24 H
CY = 1 = Set CY = 0 = Reset
Note: Subtraction method is same as SUB R.
14. DAA (Decimal Adjust Accumulator)
Description - The contents of the accumulator A are changed from a binary
value to its equivalent two, 4-bit BCD number. This instruction is
used just after addition instruction.
Operation - A reg. in Binary ----> A reg. in BCD
No. of Bytes- 1
Flags - All flags are modified to reflect the result of addition. This is the
only instruction that uses auxiliary carry flag to perform the
operation of binary to BCD conversion.
Example - MVI A, 24H
ADI, 48H
DAA
Before Execution After Execution
data = 48H data = 48H
A = 24H A = 6C H (without DAA)
A = 72 H (with DAA)
A = 24H 0010 0100
data = 48H + 0100 1000
0110 1100 ----> 6C H
C is an invalid number in BCD so add 6H (0110) to make it valid.
8. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 8
6C----> 0110 1100
+ 0110
0111 0010 ------> 72 H
Note: - DAA instruction checks the following:
(i) Is low order 4 bits D0-D3 greater than 9 or is AC flag is set. If any of the
above condition is satisfied then add 6 (0110) to low order 4 bits.
(ii) Is high order 4 bits D4-D7 greater than 9 or is CY flag is set. If any of the
above condition is satisfied then add 6 (0110) to high order 4 bits.
15. INR R
Description - Increment content of register R by one.
Operation - R + 1 ----> R
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - INR E
Before Execution After Execution
E = 45H E = 46H
16. INR M
Description - Increment content of memory location M by one.
Operation - M + 1 ----> M OR (HL) + 1 -----> (HL)
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - INR M
Before Execution After Execution
M = (HL) = (2000) = 45H M = (HL) = (2000) = 46H
9. Prashant Sharma, Lecturer, ET&T, MMGGP, Rajnandgaon (C.G.) Page 9
17. DCR R
Description - Decrement content of register R by one.
Operation - R - 1 ----> R
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - DCR E
Before Execution After Execution
E = 45H E = 44H
18. DCR M
Description - Decrement content of memory location M by one.
Operation - M - 1 ----> M OR (HL) - 1 -----> (HL)
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - DCR M
Before Execution After Execution
M = (HL) = (2000) = 45H M = (HL) = (2000) = 44H
19. INX RP
Description - Increment content of register pair RP by one.
Operation - RP + 1 ----> RP
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - INX H
Before Execution After Execution
HL = 1245H HL = 1246H
20. DCX RP
Description - Decrement content of register pair RP by one.
Operation - RP - 1 ----> RP
No. of Bytes- 1
Flags - Except carry flag, all other flags (S, Z, AC, and P) are modified to
reflect the result of operation.
Example - DCX H
Before Execution After Execution
HL = 1245H HL = 1244H