Question: Consider a program that declares global integer variables x, y[10], all of which are initialized to zero. Assume that $gp = 0x1000. The program starts
Consider a program that declares global integer variables x, y[10], all of which are initialized to zero. Assume that $gp = 0x1000. The program starts by executing the following assembly instructions: lw $s1, 0($gp) addi $s1, $s1, 53 sw $s1, 0($gp) lw $s2, 8($gp) addi $s2, $s2, 27 sw $s2, 8($gp)
What are the memory addresses of variables x, y[0], and y[1]?
What are the values of variables x, y[0], and y[1] at the end of the program?
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
