我是汇编新手,我正在尝试输出两个数字的除法和模数,到目前为止我是成功的。我可以打印两个数字,用空格分隔它们是一个空格字符,但是当我尝试打印一个换行符'\ n'时,我得到语法错误......这是一个片段:
.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