2016-10-02 62 views

回答

1

你所指的“34”是mars模拟器中“print integer in hexadecimal”的系统调用号。

的系统调用参考是:http://courses.missouristate.edu/kenvollmar/mars/help/syscallhelp.html

假设你的数量在寄存器中,也就是说,$t5,顺序将是:

move $a0,$t5     # put number into correct reg for syscall 
    li  $v0,34     # syscall number for "print hex" 
    syscall       # issue the syscall