translating MIPS binary code to MIPS assembly
I am very new to MIPS, and need help in this part of my assignment.
.data
fvar: .word 0
gvar: .word 10
hvar: .word -5
ivar: .word 6
jvar: .word 3
.text
.globl main
main:
la $t2, fvar
for the la instruction, the binary code(that my professor sent together) is as follows
0011 1100 0000 1010 0001 0000 0000 0000
For the MIPS la instruction, I know that it is made up of lui, ori. I have also read the MIPS manual, and know what the parts of the 32 bits mean.
This is the part that I'm confused with:
I am using QtSpim for reading the assembly code and simulation. When I run the la part, $t2 becomes 10010000.
Isn't $t2 supposed to be 10000000? On the manual, it says the last 16 bits are the immediate value which becomes the higher 16 digits.
But I'm also confused because I've read on another answer that 1001 is the default load address for the .data segment(in the MARS simulator). If this is the case for the QtSpim simulator, is it ignoring the last 16 bits in the binary code?
链接地址: http://www.djcxy.com/p/19222.html上一篇: 如何判断一个密钥是否存在
下一篇: 将MIPS二进制代码翻译成MIPS程序集