Question: Write MIPS code for this C-loop i=10: do f B+2 ii-1 )while (i> 0) Translate the loops above into C. Assume that the C-level integer
Write MIPS code for this C-loop i=10: do f B+2 ii-1 )while (i> 0) Translate the loops above into C. Assume that the C-level integer i is held in register $t1, $s2 holds the C- level integer called result, and $s0 holds the base address of the integer MemArray. addi $t1, $o, 100 LOOP: Iw $s1, 0(Ss0) add $s2, $s2, $s1 addi $s0, $50, 4 subi $t1, St1, 1 bne $t1, $0, LOOP b. addi $t1, $s0, 400 LOOP: lw $sl, 0(Ss0) add $s2, $s2, $sl lw $sl, 4(S0) add $s2, $s2, $s addi $s0, $s0, 8 bne St1, $s0, LOOP
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
