SlideShare a Scribd company logo
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.pdf
RahulMishra122561
 
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 switchingtheoryandlogicdesign1
jntuworld
 
Real Time Embedded System
Real Time Embedded SystemReal Time Embedded System
Real Time Embedded System
Vrushali Lanjewar
 
EE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab ManuelEE2356 Microprocessor and Microcontroller Lab Manuel
EE2356 Microprocessor and Microcontroller Lab Manuel
Velalar College of Engineering and Technology
 
Code Conversion in 8085 Microprocessor
Code Conversion in 8085 MicroprocessorCode Conversion in 8085 Microprocessor
Code Conversion in 8085 Microprocessor
MOHIT AGARWAL
 
8085 alp programs
8085 alp programs8085 alp programs
Microprocessor File
Microprocessor FileMicroprocessor File
Microprocessor File
Sourabh Bhattacharya
 
180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc180410227 ae2406-lab-manual-doc
180410227 ae2406-lab-manual-doc
homeworkping10
 
Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4Microprocessor Basics - 8085 Ch-4
Microprocessor Basics - 8085 Ch-4
Neelam Kapoor
 
MPMC LAB MANUAL EEE
MPMC LAB MANUAL EEEMPMC 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 copymkazree
 
CH06 (1).PPT
CH06 (1).PPTCH06 (1).PPT
CH06 (1).PPT
RaghadAbuJelban
 
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
 
8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf
FloraKara
 

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...
 
8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf8085_MicroelectronicAndMicroprocess.pdf
8085_MicroelectronicAndMicroprocess.pdf
 

Recently uploaded

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
Kari Kakkonen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 

Recently uploaded (20)

FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
DevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA ConnectDevOps and Testing slides at DASA Connect
DevOps and Testing slides at DASA Connect
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...How world-class product teams are winning in the AI era by CEO and Founder, P...
How world-class product teams are winning in the AI era by CEO and Founder, P...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 

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