8086 program to determine sum of corresponding elements of two arrays

MicroprocessorMicrocontroller8086

Here we will see how to find sum of two array elements and store result into memory.

Problem Statement

Write 8086 Assembly language program to find summation of two arrays stored at 501 onwards and 601 onwards. The size of array is stored at location 500. After calculating the sum results are 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 add 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
BA
602
45
603
69
604
CA
605
95

 

Flow Diagram

 

Program

 

Output

E6, 50, E6, EF, B6

Address
Data

501
E6
502
50
503
E6
504
EF
505
B6

 

 

 

 

raja
Published on 11-Jun-2019 07:54:30
Advertisements