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

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

4. 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 (Sgp). The program executes the following set of assembly instructions: add Sr2, Sr2, Sr lw $r1, 8(Sgp) add Sri, Sr2, Srl sw Sr1, 12(Sgp) ori Sr3, Sr, 4 sw Sr3, 16(Sgp) sub Sr4, Sr3, Srl (a) Annotate the above MIPS instructions to indicate source registers and destination (b) Mention the memory addresses for all the global variables, .e., a, b.. (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!