Question: 3, (18%) The following MIPS Assembly program contains a loop construct (from label loop to label next). Please answer the following questions: .data re the

 3, (18%) The following MIPS Assembly program contains a loop construct

3, (18%) The following MIPS Assembly program contains a loop construct (from label loop to label next). Please answer the following questions: .data re the values of registers Sa0 and Sto initA: word 20-30 40 -50 10 unitX: word? just before running the loop? text globl main (2) What are the values of registers Sa0, St0, and Stl after the first iteration of the loop? Sa0,0 St0, 20 main: li li loop: blez St0, done addi lw bltz add St0, St0, -4 $tl, initA($t0) Stl, next $a0, Sa0, Stl (3) What are the values of registers Sa0, St0, and Stl after the second iteration of the loop? next: b loop done: sw Sa0, unitX($O) (4) What are the values of registers Sa0, St0, and Stl after the loop is done? li Sv0, 10 syscall (5) How many iterations of the loop? What is the value at memory location unitX after the program finishes? 4,6%) Translate the following arithmetic expression into MIPS assembly instructions. Ss0 Sa0 Sa0+Sal Sal 546%) Given the following the data definition, please write a se SPIM gment of MISP code using th

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!