Question: A callable nested function add _ memory _ values as shown below calls another function ( plot _ function with parameter a 0 ) and
A callable nested function addmemoryvalues as shown below calls another function plotfunction with parameter and being a nested function, it also gets called from somewhere. We assume that the code that follows uses the RISCV calling conventions. We also assume that the function knows essentially nothing about its caller, nor about the function that it calls, ie plotnumbers that is other than knowing what parameters are passed returned. Assume that is the pseudo instruction equivalent of: addi $$ in other words, it copies register to $
addmemoryvalues: adds and plots numbers in array of integers
# SAVE REGSET ON STACK CODE GOES
HERE
# param with address of array of integers
# parameter with number of integers to be added
# s will be used as a down
counter
li t # initializes an accumulator
loop:
Iwu t Os # load from integer array
add s # go to to next word for each time around loop
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
