Professional Documents
Culture Documents
Date: 19/01/2022 Exp: 2 Sum and Average of An Array
Date: 19/01/2022 Exp: 2 Sum and Average of An Array
Aim:
Tool Used:
Algorithm:
1. NUM1 array is initialized in data segment and values are assigned.
2. Moving elements of an array in data register and performing sum using loop.
3. Sum of elements is stored in AX register and performing division operation with no of
elements in array and quotient result is stored in AL and remainder is stored in AH
register.
4. End of the program.
Program:
Register No.: 20BCE1477 Name: RAMINEDI SANTHOSH
Sample Input:
Data segment Num1 array consists of elements: 3H, 5H, 7H, 4H, 2H
Sample Output:
Sum of elements of the NUM1 Array is 15H (21 in decimal).
Result: