MIPS 32 always stores 10 mul and li in $t

138 views Asked by At

This is part of my code, and I don't know why, $t1 always ends up with 10, when it should be 16. At this point, the data is the following:

$t5 = 4
$t3 = 1
$t2 = 0
and $t1 is 0
(and $t0 is an address)

This is the part of the code:

mul $t1, $t3 , $t5
add $t1, $t1, $t2
mul $t1, $t1, 4
**From here, $t1 should be 16, but it always turns out 10 even if I do li $t1, 16****
add $t1, $t1, $t0
lw $t6, ($t1)

I'm using MIPS 32 with QTSpim

1

There are 1 answers

0
Patrik On BEST ANSWER

If you set registers->Decimal, the result will be 16. I guess, going from the information you give.

enter image description here