You are on page 1of 6

add $s1,$0,$0

add $s0,$0,$0
loopFor : slti $t0,$s0,4
beq $t0,$0,exitFor
sll $t1,$s0,2
add $t2,$t1,$s3
lw $t3,0($t2)
add $s1,$s1,$t3
addi $s0,$s0,1
j loopFor
exitFor: srl $s2,$s1,2

You might also like