Reading an integer into a local variable in MIPS

做~自己de王妃 提交于 2019-12-09 10:58:15

问题


How can I read an integer into a local variable in MIPS ? Is it possible? The problem asks me to use the concept of assigning integer variables as local variables. #A question from my text book. And by the way , not a homework!

Thanx in advance! :D


回答1:


li $v0, 5
syscall
move $t0, $v0

The value is now in $t0. This will read the integer from the console.



来源:https://stackoverflow.com/questions/6900762/reading-an-integer-into-a-local-variable-in-mips

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!