Aim: – To write an assembly language program to find sum of cubes of given ‘n’ numbers.
1 2 3 4 5 6 7 8 9 | MOV CL, NUM MOV SUM, 00 L1: MOV AL, CL MUL AL MUL CL ADD AL, SUM MOV SUM, AL LOOP L1 END |
Result: Sum of cubes of first ‘n’ natural numbers is obtained.
ASM program to find the sum of n elements using array
Can u send the alp to add 0 to n natural numbers using masm