开发者

MIPS storing and printing double precision numbers

开发者 https://www.devze.com 2023-02-14 21:39 出处:网络
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

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

精彩评论

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

关注公众号