以mips打印邮件

时间:2013-04-04 23:58:49

标签: assembly printf mips

我的程序中有以下代码

li $v1, 4              #system call code for Print String
la $a0, LC             #load address of message into $a0
syscall                #print the string
li $v1, 1              #system call code for Print Integer
move $a0, $v0          #move value to be printed to $a0
syscall                #print result

.rdata
LC: .asciiz "The factorial of 10 is : "

但是当我尝试在mips中使用它时,它说:

未知系统调用:3628800

其中3628800是我要打印的结果!

出了什么问题?我可以改用jal printf吗?我该怎么写呢? 提前谢谢

1 个答案:

答案 0 :(得分:2)

系统电话号码进入$v0,而不是$v1