Question: 6. (20 points) Complete the assembly program that calculates the sum as given below. Variable n is saved in register rO at the beginning of
6. (20 points) Complete the assembly program that calculates the sum as given below. Variable n is saved in register rO at the beginning of the code, and the sum should be saved in rO at the end of the program for return value. sumi 12+22++n2 AREA squareSum, coDE EXPORTmain ALIGN ENTRY main PROC MOV re, #4 ; value n MOV r1,#0 ; loop index MOV r2,#e ; total ENDP END
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
