1
.data
prompt1: .asciiz "Enter your first number:"
prompt2: .asciiz "Enter your second number:"
.text
main:
#displays "Enter your first number:"
li $v0 4
la $a0 prompt1
syscall
#Reads the next int and stores in $s0
li $v0 5
syscall
move $s0 $v0
#displays "Enter your second number:"
li $v0 4
la $a0 prompt2
syscall
#Reads next int and stores in $s1
li $v0 5
syscall
move $s1 $v0
#Divides user input $s0/$s1 and stores in $t0
div $t0 $s0 $s1
syscall
#Print value of $t0
li $v0 1
move $t0 $v0
syscall
li $v0 10
syscall
我的代码的目标是要求用户输入2个输入并将它们分开。但是,当我在输入“1”中运行程序时,我的输出是一个非常高的数字。我想在MARS MIPS中划分,但它给了我错误的答案