I am working with mips programming on mars 4.5. This is the sample code:
<code>.data
half: .float 0.1
.text
l.s $f12, half
li $v0, 2
syscall
</code>
<code>.data
half: .float 0.1
.text
l.s $f12, half
li $v0, 2
syscall
</code>
.data
half: .float 0.1
.text
l.s $f12, half
li $v0, 2
syscall
My purpose is print the number 0.1, and it worked when i use $f12 in the line
<code>l.s $f12, half
</code>
<code>l.s $f12, half
</code>
l.s $f12, half
However, when i tried with the other register like $f1, $f13, … the printed result is 0.0.
I am frustrated about how these registers work. Please help me explan it. Thank you so much for your replies
New contributor
Hân Trần is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.