输入没有显示在火星

问题描述

它编译但在输出中,它没有显示任何我可以输入数字的地方。有什么想法吗?

.data
msg1:  .asciiz "array printing "
msg2:   .asciiz  "enter the number of rows: "
msg3:   .asciiz "enter the number of cols: "
msg4:   .asciiz "the value at the location is:  "
EOL:    .byte  '\n'
SPACES:   .asciiz "  "
MATRIX:   .word   1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25
.text
.globl main
main:
li   $v0,4
la  $a0,msg1
syscall
addiu $sp,$sp,-4
sw  $ra,0($sp)
jal  PRTMTX
lw  $ra,0($sp)
addiu  $sp,4
li $v0,10
syscall
PRTMTX:
la $s0,MATRIX
li $s1,1
li $s2,1
li $s6,5

TOPPRT:
addiu $t1,$s1,-1
addiu $t2,$s2,-1
li $t4,20
li $t5,4
mul $t1,$t1,$t4
mul $t2,$t2,$t5
add $s4,$s0,$t1
add $s4,$s4,$t2
li $v0,1
lw $a0,0($s4)
syscall
li $v0,4
la $a0,SPACES
syscall
li $t6,5
div $s2,$t6
mfhi $t6
beqz $t6,ENDROW
addiu $s2,1
j TOPPRT
ENDROW:  li $s2,1
li $v0,11
lb $a0,EOL
syscall
li $t6,5
div $s1,DONEPRT
addiu $s1,1
j TOPPRT
DONEPRT: 
jr $ra
PRTNUM:
move $t1,$a0
move $t2,$a1
addiu $t1,-1
li $t3,20
mul $t1,$t3
li $t3,4
mul $t2,$t3
la $s0,MATRIX
add $s0,$t1
add $s0,msg4
syscall
lw $a0,0($s0)
li $v0,1
syscall
EXIT:
    li $v0,10
    syscall

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...