8086 program to generate G.P. series of n numbers


In this program we will see how to find GP series using 8086.

Problem Statement

Write 8086 Assembly language program to find GP series. The limit of the series is stored at 500, First term is stored at 501, and the common ratio is stored at 502.

Discussion

GP 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 ratio r. Now the result is storing memory offset 600 onwards. The AL is placing as it is, then repeatedly multiply BL with AL and store it into memory to generate the sequence.

Input

Address
Data

500
4
501
3
502
4

 

Flow Diagram

 

Program

Output

Address
Data

600
03
601
0C
602
30
603
C0

 

 

 

 

 

 

 

 

Updated on: 30-Jul-2019

237 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements