我是装配新手,我试图输出两个数字的除法和模数,到目前为止我成功了。我可以打印两个数字,用空格分隔它们是一个空格字符,但是当我尝试打印一个新行字符时,我得到了语法错误......这是一个片段:
.text
main: #-------------------
addi $t0, $0, 60
addi $t1, $0, 7
#-------------------
div $t0, $t1 #Divide the two numbers
mflo $a0 #store division
addi $v0, $0, 1 #Call service 1 to print integers
syscall #print
#-------------------
addi $v0, $0, 11 #Call service 11 to print characters
add $a0, $0, '\n' #print new line
syscall #print
#-------------------
div $t0, $t1 #Divide the two numbers
mfhi $a0 #Store modulus
addi $v0, $0, 1 #Call service 1 to print integers
syscall #print