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](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66eefe0db9011_63766eefe0d3eb30.jpg)
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
Get step-by-step solutions from verified subject matter experts
