0
我編寫了程序以從用戶獲取4個值並將其存儲。但我無法弄清楚如何把它變成了「清單」(。空間):MIPS:如何將值存儲到數組中
.data
list: .space 16
msg: .asciiz "Enter 4 numbers: "
.text
main:
la $a0,msg # display prompt string
li $v0,4
syscall
li $v0, 5 # read integer
syscall
add $s0, $v0, $zero #store input1 to s0
li $v0, 5 # read integer
syscall
add $s1, $v0, $zero #store input2 to s1
li $v0, 5 # read integer
syscall
add $s2, $v0, $zero #store input3 to s2
li $v0, 5 # read integer
syscall
add $s3, $v0, $zero #store input4 to s3
exit:
li $v0, 10 # exit system call
sysca