Question: Consider the following MIPS code: .data str1: .asciiz i love mips .text lui $t0, 4097 #la $t0, str1 cond: lb $t2, 0($t0) beq $t2, $zero,
Consider the following MIPS code:
.data str1: .asciiz "i love mips" .text lui $t0, 4097 #la $t0, str1 cond: lb $t2, 0($t0) beq $t2, $zero, exit addiu $t2, $t2, -32 sb $t2, 0($t0) addiu $t0, $t0, 1 j cond exit:
1) How many instructions would be executed for this example? Show workings.
2) What is the minimum binary size (in bytes) for this sequence of instructions (i.e., minimum machine code size)?
3) What would the hexadecimal value of $t0 be after the execution of the above code? Respond in the form 0x01234567.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
