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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!