- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8085 Program to Multiply two 8 bits numbers
In this program, we will see how to multiply two 8-bit numbers using 8085 microprocessor.
Problem Statement
Write 8085 Assembly language program to multiply two 8-bit numbers stored in a memory location and store the 16-bit results into the memory.
Discussion
The 8085 has no multiplication operation. To get the result of multiplication, we should use the repetitive addition method.
After multiplying two8-bit numbers it may generate 1-byte or 2-byte numbers, so we are using two registers to hold the result.
We are saving the data at location 8000H and 8001H. The result is storing at location 8050H and 8051H.
Input
Address | Data |
---|---|
. . . | . . . |
8000 | DC |
8001 | AC |
. . . | . . . |
Flow Diagram
Program
Address | HEX Codes | Labels | Mnemonics | Comments |
---|---|---|---|---|
F000 | 21,00, 80 | LXIH,8000H | Load first operand address | |
F003 | 46 | MOVB, M | Store first operand to B | |
F004 | 23 | INX H | Increase HL pair | |
F005 | AF | XRA A | Clear Accumulator | |
F006 | 4F | MOVC, A | Store 00H at register C | |
F007 | 86 | LOOP | ADD M | Add memory element with Acc |
F008 | D2,0C, F0 | JNC SKIP | When Carry flag is 0, skip next task | |
F00B | 0C | INR C | Increase C when carry is 1 | |
F00C | 05 | SKIP | DCR B | DecreaseB register |
F00D | C2,07, F0 | JNZ LOOP | Jump to loop when Z flag is not 1 | |
F010 | 21,50, 80 | LXIH,8050H | Load Destination address | |
F013 | 71 | MOVM, C | Store C register content into memory | |
F014 | 23 | INX H | Increase HL Pair | |
F015 | 77 | MOVM, A | Store Acc content to memory | |
F016 | 76 | HLT | Terminate the program |
Output
Address | Data |
---|---|
. . . | . . . |
8050 | 93 |
8051 | D0 |
. . . | . . . |
- Related Articles
- 8085 Program to Multiply two numbers of size 8 bits
- 8085 program to multiply two 8 bit numbers
- 8085 program to multiply two 8 bit numbers using logical instructions
- 8085 Program to multiply two 8-bit numbers (shift and add method)
- 8085 Program to Add N numbers, of size 8 bits
- Program to multiply two 8-bit numbers (shift and add method) in 8085 Microprocessor
- 8085 Program to multiply two 2-digit BCD numbers
- 8085 Program to multiply two 16-bit binary numbers
- 8051 Program to Multiply two 8 Bit numbers
- 8086 program to multiply two 8-bit numbers
- 8085 Program to Add two 8 Bit numbers
- 8085 Program to Subtract two 8 Bit numbers
- 8085 Program to Divide two 8 Bit numbers
- 8085 program to swap two 8-bit numbers
- Program to multiply two 2-digit BCD numbers in 8085 Microprocessor

Advertisements