开发者

MIPS storing and printing double precision numbers

I am trying to get inputs of double precision numbers stored and printed off an array.

According to here, to read a double, you use $f0 with code 7

However, I am getting an syntax par开发者_C百科se error on this line: li $f0, 7

Edit: I dont know why, but when Im printing array, it just prints out 0, does anyone know why?


You missed the part of the documentation that says "Code in $v0". You load 7 into $v0 and make your syscall, the result of which will be put into the $f0 register.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜