In MIPS, the la
instruction translates into lui
and ori
. However, MARS Simulator does not seem to do that at all. When I dump the following machine code:
.text
la $a0, array
la $a1, array_size
lw $a1, 0($a1)
.data
array: .word 0:10
array_size: .word 10
message: .asciiz "The sum of numbers in array is: "
I get:
00100000000001000010000000000000
00100000000001010010000000101000
10001100101001010000000000000000
Which is obviously. It is dumping la
as one instruction. What does MARS do? How can I make it interpret la
as lui
and ori
?
Thank you,