SlideShare a Scribd company logo
1 of 17
Unit-5:
8085 Assembly
Language Programs
Microprocessor and Interfacing
(MPI)
GTU # 3160712
 Looping
Topics to be covered
 Writing 8085 assembly language programs
 Decision making programs
 Looping using data transfer programs
 Arithmetic, logical and branch instructions programs
Program-1
Write an ALP to add two 8-bit numbers. Add the value of carry to final
result and display the result to I/O port.
Start
Load A and B
with immediate
value
AA+B
Carry?
Increment
Result by 1
Display result to
I/O port
End
YES
NO
1. MVI A,3A
2. MVI B,20
3. ADD B
4. JC L1
5. JNC DISP
6.L1: INR A
7.DISP: OUT 02
8.END: HLT
Program-2
Write an ALP to display reverse counter at port 02H.
1. MVI A,0A ;counter
2.L1: OUT 02
3. DCR A ;A=A-1
4. JNZ L1 ;Z=0
5. HLT
Start
Load & Display
Counter
Decrement A
Z=1?
End
YES
NO
Program-3
Write an ALP to find 2’s compliment of M[2001] and store result at M[2002].
1. LDA 2001
2. CMA
3. ADI 01
4. STA 2002
5. HLT
Load AM[2001]
2’scomplement=
1’s complement +01
Complement
Accumulator
Store result
END
Start
Program-4
Write an ALP to multiply two 8-bit numbers stored at 2050H & 2051H using repetitive
addition method.
1. LXI H,2050
2. MVI A,00
3. MOV C,M; OP1
4. INX H
5. MOV B,M; OP2
6. L1: ADD C
7. DCR B
8. JNZ L1
9. HLT
Z=1 ?
End
Load HL 2050
Load A  00
YES
Decrement B
B B-1
Load
C M[2050](OP1)
B M[2051](OP2)
A A+C
NO
HL HL+1
Exam Questions
No Questions
1. Write assembly language program to do multiplication of two numbers. Specify the memory location
of each and every instruction and also draw flowchart.
Program-4
Write an ALP to multiply two 8-bit numbers stored at 2050H & 2051H using repetitive
addition method.
Z=1 ?
End
Load HL 2050
Load A  00
YES
Decrement B
B B-1
Load
C M[2050](OP1)
B M[2051](OP2)
A A+C
NO
HL HL+1
Line Program PC Byte
0. - 0000 -
1. LXI H,2050 0003 3
2. MVI A,00 0005 2
3. MOV C,M 0006 1
4. INX H 0007 1
5. MOV B,M 0008 1
6. L1: ADD C 0009 1
7. DCR B 000A 1
8. JNZ L1 0009/000D 3
9. HLT 1
Program-5
Write an ALP to add 10 blocks starting from 3001H to 300AH.
1. MVI A,00
2. MVI C,0A
3. LXI H,3001
4. L1:ADC M
5. INX H
6. DCR C
7. JNZ L1
8. HLT
Z=1 ?
Load A00
Load C 0A
Load HL 3001
YES
A A+M
NO
Increment
HLHL+1
END
Decrement Counter
CC-1
Start
Program-6
Write a program to Set PSW (Accumulator & 8-bit Flag register)
1. LXI H, FFFF
2. PUSH H
3. POP PSW ;lower 8-bit to flags,higher 8-bit to Accumulator
4. HLT
Program-7
Write a program to Reset PSW (Accumulator & 8-bit Flag register)
1. LXI H, 0000
2. PUSH H
3. POP PSW
4. HLT
Program-8
Write an ALP to exchange block of 10 numbers with starting location
M[2001] & M[3001] respectively.
1. LXI H,2001
2. LXI D,3001
3. MVI C,0A
4. L1:MOV B,M
5. LDAX D
6. MOV M,A
7. XCHG
8. MOV M,B
9. INX H
10. INX D
11. DCR C
12. JNZ L1
13. HLT
Load HL 2001
Load DE 3001
Load Counter_C 0A
Load B M[HL]
Load A M[DE]
Load M[HL] A
Exchange HL ⇋ DE
Load M[HL] B
HL HL+1
DE DE+1
Decrement Counter C
Z=1 ?
YES
END
NO
C HL DE B A Z
0
M[2001] M[3001]
M[2002] M[3002]
M[2003] M[3003]
11 AA
BB
22
CC
33
03 2001 3001 11 AA
AA 11
3002 2002
02 BB 22
22
BB
2003 3003
01 33 CC
CC 33
2004
3004
00 1
Exercise
Sr. Program
1. Write an 8085 program to add two 16-bit nos stored in memory locations 2100H and 2200H respectively.
Exam Questions
No Questions
1. Write assembly language program to do multiplication of two numbers. Specify the memory location of
each and every instruction and also draw flowchart.
2. Write assembly language program to do division of two numbers. Specify the memory location of each
and every instruction and also draw flowchart.
3. Write assembly language program to do addition of two 8-bit numbers with carry. Specify the memory
location of each and every instruction.
4. Write assembly language program to count number of 1’s in given 8-bit number. Specify the memory
location of each and every instruction.
5. An array of Ten numbers is stored from memory location 2000H onwards. Write an 8085 assembly
language program to separate out and store the EVEN and ODD numbers on new arrays from 2100H and
2200H, respectively.
6. Write an 8085 assembly language program sort an array of twenty bytes stored on memory locations
2000H onwards in ascending/descending order.
References
Book: Microprocessor Architecture, Programming, and Applications with the 8085,
Ramesh S. Gaonkar Pub: Penram International
Mobile
Application
8085 and 8086 Microprocessor Opcodes app from Play Store:
http://tiny.cc/aopcodes
5.pptx

More Related Content

Similar to 5.pptx

Assemblylanguageprogrammingof8085 100523023329-phpapp02
Assemblylanguageprogrammingof8085 100523023329-phpapp02Assemblylanguageprogrammingof8085 100523023329-phpapp02
Assemblylanguageprogrammingof8085 100523023329-phpapp02Swati Watve-Phadke
 
8085 Assembly language programs.pdf
8085 Assembly language programs.pdf8085 Assembly language programs.pdf
8085 Assembly language programs.pdfRahulMishra122561
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingProgramming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingAmitabh Shukla
 
8085 instruction set and Programming
8085 instruction set and Programming 8085 instruction set and Programming
8085 instruction set and Programming pooja saini
 
A109211002 switchingtheoryandlogicdesign1
A109211002 switchingtheoryandlogicdesign1A109211002 switchingtheoryandlogicdesign1
A109211002 switchingtheoryandlogicdesign1jntuworld
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorMOHIT AGARWAL
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-dochomeworkping10
 
Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4Neelam Kapoor
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copymkazree
 
Computer Organization - Programming the basic computer : Machine Language, As...
Computer Organization - Programming the basic computer : Machine Language, As...Computer Organization - Programming the basic computer : Machine Language, As...
Computer Organization - Programming the basic computer : Machine Language, As...Maitri Thakkar
 

Similar to 5.pptx (20)

Assemblylanguageprogrammingof8085 100523023329-phpapp02
Assemblylanguageprogrammingof8085 100523023329-phpapp02Assemblylanguageprogrammingof8085 100523023329-phpapp02
Assemblylanguageprogrammingof8085 100523023329-phpapp02
 
8085 Assembly language programs.pdf
8085 Assembly language programs.pdf8085 Assembly language programs.pdf
8085 Assembly language programs.pdf
 
Microprocessor lab manual
Microprocessor lab manualMicroprocessor lab manual
Microprocessor lab manual
 
Programming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacingProgramming with 8085-Microprocessor and interfacing
Programming with 8085-Microprocessor and interfacing
 
8085 instruction set and Programming
8085 instruction set and Programming 8085 instruction set and Programming
8085 instruction set and Programming
 
A109211002 switchingtheoryandlogicdesign1
A109211002 switchingtheoryandlogicdesign1A109211002 switchingtheoryandlogicdesign1
A109211002 switchingtheoryandlogicdesign1
 
List of 8085 programs
List of 8085 programsList of 8085 programs
List of 8085 programs
 
Real Time Embedded System
Real Time Embedded SystemReal Time Embedded System
Real Time Embedded System
 
EE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab ManuelEE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab Manuel
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
 
8085 alp programs
8085 alp programs8085 alp programs
8085 alp programs
 
Microprocessor File
Microprocessor FileMicroprocessor File
Microprocessor File
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc
 
Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4
 
MPMC LAB MANUAL EEE
MPMC LAB MANUAL EEEMPMC LAB MANUAL EEE
MPMC LAB MANUAL EEE
 
Chp6 assembly language programming for pic copy
Chp6 assembly language programming for pic   copyChp6 assembly language programming for pic   copy
Chp6 assembly language programming for pic copy
 
CH06 (1).PPT
CH06 (1).PPTCH06 (1).PPT
CH06 (1).PPT
 
Av222 lab 1 st part
Av222 lab 1 st partAv222 lab 1 st part
Av222 lab 1 st part
 
Computer Organization - Programming the basic computer : Machine Language, As...
Computer Organization - Programming the basic computer : Machine Language, As...Computer Organization - Programming the basic computer : Machine Language, As...
Computer Organization - Programming the basic computer : Machine Language, As...
 
1.pdf
1.pdf1.pdf
1.pdf
 

Recently uploaded

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 

5.pptx

  • 1. Unit-5: 8085 Assembly Language Programs Microprocessor and Interfacing (MPI) GTU # 3160712
  • 2.  Looping Topics to be covered  Writing 8085 assembly language programs  Decision making programs  Looping using data transfer programs  Arithmetic, logical and branch instructions programs
  • 3.
  • 4. Program-1 Write an ALP to add two 8-bit numbers. Add the value of carry to final result and display the result to I/O port. Start Load A and B with immediate value AA+B Carry? Increment Result by 1 Display result to I/O port End YES NO 1. MVI A,3A 2. MVI B,20 3. ADD B 4. JC L1 5. JNC DISP 6.L1: INR A 7.DISP: OUT 02 8.END: HLT
  • 5. Program-2 Write an ALP to display reverse counter at port 02H. 1. MVI A,0A ;counter 2.L1: OUT 02 3. DCR A ;A=A-1 4. JNZ L1 ;Z=0 5. HLT Start Load & Display Counter Decrement A Z=1? End YES NO
  • 6. Program-3 Write an ALP to find 2’s compliment of M[2001] and store result at M[2002]. 1. LDA 2001 2. CMA 3. ADI 01 4. STA 2002 5. HLT Load AM[2001] 2’scomplement= 1’s complement +01 Complement Accumulator Store result END Start
  • 7. Program-4 Write an ALP to multiply two 8-bit numbers stored at 2050H & 2051H using repetitive addition method. 1. LXI H,2050 2. MVI A,00 3. MOV C,M; OP1 4. INX H 5. MOV B,M; OP2 6. L1: ADD C 7. DCR B 8. JNZ L1 9. HLT Z=1 ? End Load HL 2050 Load A  00 YES Decrement B B B-1 Load C M[2050](OP1) B M[2051](OP2) A A+C NO HL HL+1
  • 8. Exam Questions No Questions 1. Write assembly language program to do multiplication of two numbers. Specify the memory location of each and every instruction and also draw flowchart.
  • 9. Program-4 Write an ALP to multiply two 8-bit numbers stored at 2050H & 2051H using repetitive addition method. Z=1 ? End Load HL 2050 Load A  00 YES Decrement B B B-1 Load C M[2050](OP1) B M[2051](OP2) A A+C NO HL HL+1 Line Program PC Byte 0. - 0000 - 1. LXI H,2050 0003 3 2. MVI A,00 0005 2 3. MOV C,M 0006 1 4. INX H 0007 1 5. MOV B,M 0008 1 6. L1: ADD C 0009 1 7. DCR B 000A 1 8. JNZ L1 0009/000D 3 9. HLT 1
  • 10. Program-5 Write an ALP to add 10 blocks starting from 3001H to 300AH. 1. MVI A,00 2. MVI C,0A 3. LXI H,3001 4. L1:ADC M 5. INX H 6. DCR C 7. JNZ L1 8. HLT Z=1 ? Load A00 Load C 0A Load HL 3001 YES A A+M NO Increment HLHL+1 END Decrement Counter CC-1 Start
  • 11. Program-6 Write a program to Set PSW (Accumulator & 8-bit Flag register) 1. LXI H, FFFF 2. PUSH H 3. POP PSW ;lower 8-bit to flags,higher 8-bit to Accumulator 4. HLT
  • 12. Program-7 Write a program to Reset PSW (Accumulator & 8-bit Flag register) 1. LXI H, 0000 2. PUSH H 3. POP PSW 4. HLT
  • 13. Program-8 Write an ALP to exchange block of 10 numbers with starting location M[2001] & M[3001] respectively. 1. LXI H,2001 2. LXI D,3001 3. MVI C,0A 4. L1:MOV B,M 5. LDAX D 6. MOV M,A 7. XCHG 8. MOV M,B 9. INX H 10. INX D 11. DCR C 12. JNZ L1 13. HLT Load HL 2001 Load DE 3001 Load Counter_C 0A Load B M[HL] Load A M[DE] Load M[HL] A Exchange HL ⇋ DE Load M[HL] B HL HL+1 DE DE+1 Decrement Counter C Z=1 ? YES END NO C HL DE B A Z 0 M[2001] M[3001] M[2002] M[3002] M[2003] M[3003] 11 AA BB 22 CC 33 03 2001 3001 11 AA AA 11 3002 2002 02 BB 22 22 BB 2003 3003 01 33 CC CC 33 2004 3004 00 1
  • 14. Exercise Sr. Program 1. Write an 8085 program to add two 16-bit nos stored in memory locations 2100H and 2200H respectively.
  • 15. Exam Questions No Questions 1. Write assembly language program to do multiplication of two numbers. Specify the memory location of each and every instruction and also draw flowchart. 2. Write assembly language program to do division of two numbers. Specify the memory location of each and every instruction and also draw flowchart. 3. Write assembly language program to do addition of two 8-bit numbers with carry. Specify the memory location of each and every instruction. 4. Write assembly language program to count number of 1’s in given 8-bit number. Specify the memory location of each and every instruction. 5. An array of Ten numbers is stored from memory location 2000H onwards. Write an 8085 assembly language program to separate out and store the EVEN and ODD numbers on new arrays from 2100H and 2200H, respectively. 6. Write an 8085 assembly language program sort an array of twenty bytes stored on memory locations 2000H onwards in ascending/descending order.
  • 16. References Book: Microprocessor Architecture, Programming, and Applications with the 8085, Ramesh S. Gaonkar Pub: Penram International Mobile Application 8085 and 8086 Microprocessor Opcodes app from Play Store: http://tiny.cc/aopcodes