Question: . A program declares two integer (size of integer data type: 4 bytes) global variables: a, b5]. The following are the initialization of these global

 . A program declares two integer (size of integer data type:

. A program declares two integer (size of integer data type: 4 bytes) global variables: a, b5]. The following are the initialization of these global variables b5 0,0,0,0,0 Consider the base address to these global variables be 2018. The base address is placed in a global pointer register ($gp). The program executes the following set of assem bly instructions: add Sr2, Sr2, $r1 add Srl, Sr2, $r1 sw Sr1, 12(Sgp) ori Sr3, Srl, 4 sw Sr3, 16(Sgp) sub $r4, Sr3, Sr1 sw Sr4, 0($gp) (a) Annotate the above MIPS instructions to indicate source registers and destination (b) Mention the memory addresses for all the global variables, i.e., a, b[0] b1], (c) What are the values stored in the global variables after executing the MIPS pro- registers. (10 points) b4 (10 points) gram. (10 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!