12 pts total.
a, b, iand
jare in registers
$s0, $s1, $t0and
$t1, respectively. Also assume that register
$s2holds the base address of the array D.
for ( i = 0; i < a; i++ ) for ( j = 0; j < b; j++ ) D[4*j] = i + j;
bare initialized to 10 and 1 and all elements of
Dare initially 0, what is the total number of MIPS instructions that is executed to complete the loop?
0010 0000 0000 0001 0100 1001 0010 0100This can be done using only instructions we have discussed in class, although you may use any of the instructions from the table in Figure 2.1 (p. 64), including ones we have not used in class, if you wish.
0000 0000 0000 0000 0000 0000 0000 0000can you use a single jump instruction to get to the PC address represented by the constant in the previous question?