Question: 2. Consider a program that declares global integer variables x,y,z,w[10]. Assume that an integer occupies 4 bytes. These variables are allocated starting at a base

 2. Consider a program that declares global integer variables x,y,z,w[10]. Assume

2. Consider a program that declares global integer variables x,y,z,w[10]. Assume that an integer occupies 4 bytes. These variables are allocated starting at a base address of decimal 4000. All these variables have been initialized to decimal 100 . The base address 4000 has been placed in $ gp. The program executes the following assembly instructions: Iw $s1,0($gp) Iw $s2,4($gp) add $s1,$s1,$s1 add $s2,$s2,$s1 sw $s1,12($gp) sw \$s2, 16(\$gp) subi \$s2, \$s2, 80 sw \$s2, 8(\$gp) 1. What are the memory addresses of variables x,y,z,w[0], and w[1] ? (15 points)

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!