instruction set explanation of 8085 microprocessor

BNAWAZALIHASHMI 6 views 46 slides Mar 08, 2025
Slide 1
Slide 1 of 46
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37
Slide 38
38
Slide 39
39
Slide 40
40
Slide 41
41
Slide 42
42
Slide 43
43
Slide 44
44
Slide 45
45
Slide 46
46

About This Presentation

The **8085 microprocessor** is a fundamental component of early computing systems and embedded applications, known for its simplicity and efficiency. This presentation provides a **detailed study of the 8085 instruction set**, focusing on its classification, execution process, and impact on processo...


Slide Content

8085 Instruction Set Data Transfer, Arithmetic And Logical Instruction Subject:COA (4350701) Prepaid By: Guided By: Goswami Harshit(229920307020) Prof.Kalpit Chandpa Hadiya Kaushik(229920307023) Het Trivedi(229920307059) Computer Department GMB Polytechnic Rajula 1

Classification of Instructions Based on the parameters Data Transfer Instruction Arithmetic Instructions Logical Instructions Instruction Length 1 Byte instructions 2 Byte instructions 3 Byte instructions

Logical Instructions (NOT, AND, OR, EXOR)

The classification of 8085 Instructions based on length One Byte Instructions: in one byte only opcode no operand Example Opcode Operand CMA HLT NOP

8085 Instruction Types Two Byte Instructions: First byte specifies opcode and second byte specifies operand Example Opcode Operand MVI A, 07

8085 Instruction Types Three Byte Instructions: First byte specifies opcode and the following two bytes specifies address Example Note: Second byte is lower order address Third byte is higher order address Opcode Operand LDA 2085H

Data Transfer Instructions

Example Instruction: MOV A, B Register contents before Execution 9A h 89 h A B Register contents after Execution 89 h 89 h A B Note: No flags are modified during the execution of data transfer instruction.

Example Instruction: MOV C, M Register contents before Execution 9A h 8500 h C HL 84FF 7A h 8500 C2 h 8501 8502 45 h F4 h MEMORY Register contents after Execution C2 h C 8500 h HL 84FF 7A h 8500 C2 h 8501 8502 45 h F4 h MEMORY

Example Instruction: MVI B, 18 h Register contents before Execution 9A h B Register contents after Execution 18 h B

Example Instruction: LDA 2005 h Register contents before Execution 87 h A 2003 7A h 2004 C2 h 2005 2006 45 h F4 h MEMORY Register contents after Execution 45 h A 2003 7A h 2004 C2 h 2005 2006 45 h F4 h MEMORY

Example Instruction: STA 2005 h Register contents before Execution 87 h A 2003 7A h 2004 C2 h 2005 2006 45 h F4 h MEMORY Register contents after Execution 87 h A 2003 7A h 2004 C2 h 2005 2006 87 h F4 h MEMORY

Example Instruction: LDAX D 401F 7A h 4020 C2 h 4021 4022 45 h F4 h MEMORY Register contents before Execution 2B h A 4020 h DE Register contents after Execution C2 h A 401F 7A h 4020 C2 h 4021 4022 45 h F4 h MEMORY 4020 h DE

Example Instruction: STAX B 401F 7A h 4020 C2 h 4021 4022 45 h F4 h MEMORY Register contents before Execution A4 h A 4020 h BC Register contents after Execution A4 h A 401F 7A h 4020 A4 h 4021 4022 45 h F4 h MEMORY 4020 h BC

Example Instruction: LHLD 2005 h 2004 7A h 2005 C2 h 2006 2007 45 h F4 h MEMORY Register contents before Execution 74F1 h HL Register contents after Execution 2004 7A h 2005 C2 h 2006 2007 45 h F4 h MEMORY 45C2 h HL

Example Instruction: SHLD 2005 h 2004 7A h 2005 A4 h 2006 2007 45 h F4 h MEMORY Register contents before Execution 74F1 h HL Register contents after Execution 2004 7A h 2005 F1 h 2006 2007 74 h F4 h MEMORY 74F1 h HL

Example Instruction: LXI B, 1122 h Register contents before Execution 76DA h BC Register contents after Execution 1122 h BC

Example Instruction: XCHG Register contents before Execution 1234 h 5678 h HL DE Register contents after Execution 5678 h 1234 h HL DE

Arithmetic Instructions

Example Instruction: ADD B Register contents before Execution 9A h 89 h A B Register contents after Execution 23 h 89 h A B Note: All flags are affected during the execution of arithmetic instruction. 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 0 0 1 0 0 0 1 1 Flag: S=0, Z=0, AC=1 , P=0 and CY=1

Example Instruction: ADC B Register contents after Execution 24 h 89 h A B 0 0 1 0 0 1 0 0 Register contents before Execution 9A h 89 h A B Flag: S=0, Z=0, AC=0 , P=0 and C=1 1 0 0 1 1 0 1 0 1 0 0 0 1 0 0 1 1 Flag: S=0, Z=0, AC=1 , P=1 and CY=1 0 0 1 0 0 0 1 1

Example Instruction: ADI B2 h Register contents after Execution 76 h A 0 1 1 1 0 1 1 0 Register contents before Execution C4 h A Flag: S=0, Z=0, AC=0, P=0 and CY=0 1 1 0 0 0 1 0 0 1 0 1 1 0 0 1 0 Flag: S=0, Z=0, AC=0 , P=0 and CY=1

Example Instruction: ACI 15 h Register contents after Execution 4E h A 0 1 0 0 1 1 1 0 Register contents before Execution 38 h A Flag: S=0, Z=0, AC=0 , P=0 and C=1 0 0 1 1 1 0 0 0 0 0 0 1 0 1 0 1 1 Flag: S=0, Z=0, AC=0 , P=1 and CY=0 0 1 0 0 1 1 0 1

Example Instruction: DAD B Register contents before Execution 2233 h HL 1122 h BC Register contents after Execution 3355 h HL 1122 h BC Note: No flags are affected except Carry Flag.

Example Instruction: SUB M Register contents before Execution 20 h 8500 h A HL 84FF 7A h 8500 08 h 8501 8502 45 h F4 h MEMORY Register contents after Execution 18 h A 8500 h HL 84FF 7A h 8500 08 h 8501 8502 45 h F4 h MEMORY Flag: S=0, Z=0, AC=0 , P=0 and CY=1 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 0 0 0 Flag: S=0, Z=0, AC=1 , P=1 and CY=0

Example Instruction: SBB B Register contents after Execution 1F h 20 h A B 0 0 0 1 1 1 1 1 Register contents before instruction 40 h 20 h A B Flag: S=0, Z=0, AC=0 , P=0 and C=1 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 Flag: S=0, Z=0, AC=1, P=0 and CY=0

Example Instruction: SUI 13 h Register contents after Execution F2 h A 1 1 1 1 0 0 1 0 Register contents before Execution 05 h A Flag: S=0, Z=0, AC=0 , P=0 and CY=0 0 0 0 0 0 1 0 1 0 0 0 1 0 0 1 1 Flag: S=1, Z=0, AC=0, P=0 and CY=1

Example Instruction: SBI 13 h Register contents after Execution 04 h A 0 0 0 0 0 1 0 0 Register contents before Execution 18 h A Flag: S=0, Z=0, AC=0 , P=0 and C=1 0 0 0 1 1 0 0 0 0 0 0 1 0 0 1 1 1 Flag: S=0, Z=0, AC=0, P=0 and CY=0

Example Instruction: INR E Register contents before Execution 1C h E Register contents after Execution 1D h E Note: Except Carry Flag, all flags are affected depend upon the result.

Example Instruction: DCR M Register contents before Execution 8500 h HL 84FF 7A h 8500 08 h 8501 8502 45 h F4 h MEMORY Register contents after Execution 8500 h HL 84FF 7A h 8500 07 h 8501 8502 45 h F4 h MEMORY Note: Except Carry Flag, all flags are affected depend upon the result.

Example Instruction: INX D Register contents before Execution A103 h DE Register contents after Execution A104 h DE Note: No Flags are affected.

Example Instruction: DCX H Register contents before Execution FFFF h HL Register contents after Execution FFFE h HL Note: No Flags are affected.

Example Instruction: DAA Register contents before Execution 6C h A Register contents after Execution 72 h A Flag: S=0, Z=0, AC=0 , P=0 and CY=0 0 1 1 0 1 1 0 0 0 0 0 0 0 1 1 0 0 1 1 1 0 0 1 0 Flag: S=0, Z=0, AC=1 , P=1 and CY=0

Logical Instructions

Logical Instructions

Example Instruction: ANA C Note: S, Z, P flags are affected during the execution of AND instruction. CY=0 AC = 1 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 0 0 0 0 1 0 Register contents before Execution 62 h 4A h A C Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Register contents after Execution 42 h 4A h A C Flag: S=0, Z=0, AC=1 , P=1 and CY=0

Example Instruction: ANI 15 h 0 1 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 0 0 0 0 0 0 0 Register contents before Execution 62 h A Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Register contents after Execution 00 h A Flag: S=0, Z=1, AC=1 , P=1 and CY=0

Example Instruction: ORA C 0 1 1 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 1 0 Register contents before Execution 62 h 4A h A C Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Register contents after Execution 6A h 4A h A C Flag: S=0, Z=0, AC=0 , P=1 and CY=0 Note: S, Z, P flags are affected during the execution of OR instruction. CY=0 AC = 0

Example Instruction: ORI 15 h 0 1 1 0 0 0 1 0 0 0 0 1 0 1 0 1 0 1 1 1 0 1 1 1 Register contents before Execution 62 h A Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Register contents after Execution 77 h A Flag: S=0, Z=0, AC=0 , P=1 and CY=0

Example Instruction: XRA E 1 1 1 0 1 1 1 0 0 1 0 1 1 0 1 0 1 0 1 1 0 1 0 0 Note: S, Z, P flags are affected during the execution of XOR instruction. CY=0 AC = 0 Register contents before Execution EE h 5A h A E Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Register contents after Execution B4 h 5A h A E Flag: S=0, Z=0, AC=0 , P=1 and CY=0

Example Instruction: XRI 18 h Register contents before Execution C3 h A Register contents after Execution DB h A 1 1 0 0 0 0 1 1 0 0 0 1 1 0 0 0 1 1 0 1 1 0 1 1 Flag: S=0, Z=0, AC=0 , P=0 and CY=0 Flag: S=0, Z=0, AC=0 , P=1 and CY=0

Example Instruction: CMA Register contents before Execution 9A h A Register contents after Execution 65 h A 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 Note: No Flags are affected.

Example Instruction: RLC Register contents before Execution Register contents after Execution 1 1 1 1 1 1 A CY CY A 1 1 1 1 1

Example Instruction: RRC Register contents before Execution Register contents after Execution 1 1 1 1 1 1 A CY CY A 1 1 1 1 1 1 1 1 1 1

Example Instruction: RAL Register contents before Execution Register contents after Execution 1 1 1 1 A CY CY A 1 1 1 1

Example Instruction: RAR Register contents before Execution Register contents after Execution 1 1 1 1 A CY CY A 1 1 1 1