Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试从 0-99(含)生成一个随机整数,但是在使用 42 系统调用时我很难找到将值存储到的位置。
到目前为止,我有:
li $a1, 100 li $v0, 42 syscall
我不确定生成的值存储在哪里,所以我可以使用它。
来自系统调用帮助页面:$a0是伪随机数生成器 id,$a1是上限,返回的随机数也将包含在$a0.
$a0
$a1