- Trending Categories
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 generate AP series of n numbers
In this program we will see how to find AP series using 8086.
Problem Statement
Write 8086 Assembly language program to find AP series. The limit of the series is stored at 500, First term is stored at 501, and the common difference is stored at 502.
Discussion
AP generation is simple task. We are taking the limit as counter value, the first term is loaded into AL first, then the BL is holding the common difference d. Now the result is storing memory offset 600 onwards. The AL is placing as it is, then repeatedly add BL with AL and store it into memory to generate the sequence.
Input
Address | Data |
---|---|
… | … |
500 | 4 |
501 | 3 |
502 | 5 |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
600 | 3 |
601 | 8 |
602 | D |
603 | 12 |
… | … |
Advertisements