Reputation: 17
I'm writing my very first program in assembly, I just have to sum up 2.5 and 2.5 Here's my code
.data
#2.5+2.5=5.0
myNumber1: .float 2.5
myNumber2: .float 2.5
.text
lwc1 $f1, myNumber1
lwc1 $f2, myNumber2
add.s $f3, $f1, $f2
li $v0, 3
syscall
For some reason it always returns 0.0 in the output, but in the memory it seems to sum and store the value in $f3 correctly. What am I missing here?
Upvotes: 0
Views: 147