开发者

MIPS Input Taking

How to take input in main function开发者_JS百科 in mips?


It depends. If you are going to ask for an integer it should be

li $v0, 5
syscall

If you are going to ask for a float should be

li $v0, 6
syscall

If you are going to ask for a double it should be

li $v0, 7
syscall

And if you are going to ask for an string it should be

li $v0, 8
syscall

But, if you are going to ask for an string and the input is going to take maximum number of characters, then you should use $a1instead of $a0 when printing it.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜