![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
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
8086 program to determine product of corresponding elements of two array elements
Here we will see how to find product of two array elements and store result into memory.
Problem Statement
Write 8086 Assembly language program to find product of two arrays stored at 501 onwards and 601 onwards. The size of array is stored at location 500. After calculating product store result at 501 onwards.
Discussion
To solve this problem, we are taking elements from first array using source register SI, and second array using destination register DI. Repeatedly take elements from SI to AL, then multiply with the content of DI, and store again into SI address. Thus it is solved.
Input
Address | Data |
---|---|
… | … |
500 | 05 |
501 | 2C |
502 | 0B |
503 | 7D |
504 | 25 |
505 | 21 |
… | … |
601 | 04 |
602 | 12 |
603 | 02 |
604 | 04 |
605 | 05 |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
501 | B0 |
502 | C6 |
503 | FA |
504 | B9 |
505 | A5 |
… | … |
Advertisements