Question: Consider the following MIPS assembly code segment for implementing a while loop. Start: add $t1,$s2,$s1 instruction type:___ addressing mode: lw St0, 4($t1) instruction type:__ addressing

Consider the following MIPS assembly code segment for implementing a while loop. Start: add $t1,$s2,$s1 instruction type:___ addressing mode: lw St0, 4(\$t1) instruction type:__ addressing mode: bne \$t0, \$s 5 , End instruction type:___ addressing mode: addi $S1,$s,2 instruction type:___ addressing mode: subi $s1,$s1,1 instruction type:___ addressing mode: j Start instruction type: addressing mode: End: (a) Specify the instruction type and addressing mode used in each instruction above. (b) Write MIPS machine code for the 2nd instruction (lw) in Hex number. Opcode for lw is 35 in decimal; register numbers for $t0 and $t1 are 8 and 9 in decimal, respectively. (c) Write MIPS machine code for the 3rd instruction (bne) in Hex number. Opcode for bne is 5 in decimal; register number for $ s 5 is 21 in decimal
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
