Question: (A) Write the function sumAll that has three parameters: $a0 holding an address in data memory, $a1 holding the total number of words to sum
(A) Write the function "sumAll" that has three parameters: $a0 holding an address in data memory, $a1 holding the total number of words to sum and $a2 holding the location of the sum in memory. For example, if you wanted to sum 10 integers starting at 0x10010000, $a0 would hold 0x10010000 and $a1 would hold 10. The function is to store the sum of numbers in memory at the location indicated in $a2.
(B) Write the function "printAll" that has two parameters: $a0 holding an address in data memory and $a1 holding the total number of words to print. For example, if you wanted to print 10 integers starting at 0x10010000, $a0 would hold 0x10010000 and $a1 would hold 10. The function is to print the numbers from memory to the screen, one integer per line of output.
(C) Write the function "sumAll" that has two parameters: $a0 holding an address in data memory and $a1 holding the total number of words to sum. For example, if you wanted to sum 10 integers starting at 0x10010000, $a0 would hold 0x10010000 and $a1 would hold 10. The function is to return the sum of the numbers in memory through $v0.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
