Domanda

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

È stato utile?

Soluzione

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

enter image description here

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top