MIPS-“的;“从底部掉落”吗;?

MIPS-“的;“从底部掉落”吗;?,mips,Mips,我是MIPS的初学者,我需要编写一个代码,在位图显示上绘制一个框,框的每一侧使用4个循环,框应具有选框效果,并有5毫秒的延迟。它应该有键盘功能(w,a,s和d键应该移动方框)这是代码,但我一直在得到——程序已经完成运行(从底部掉下来)——我不知道如何修复它 .data # colors .eqv RED 0x00FF0000 .eqv GREEN 0x0000FF00 .eqv BLUE 0x000000FF .eqv WHITE 0x00FFFFFF .eqv YEL

我是MIPS的初学者,我需要编写一个代码,在位图显示上绘制一个框,框的每一侧使用4个循环,框应具有选框效果,并有5毫秒的延迟。它应该有键盘功能(w,a,s和d键应该移动方框)这是代码,但我一直在得到——程序已经完成运行(从底部掉下来)——我不知道如何修复它

        .data
# colors

.eqv RED 0x00FF0000

.eqv GREEN 0x0000FF00

.eqv BLUE 0x000000FF

.eqv WHITE 0x00FFFFFF

.eqv YELLOW 0x00FFFF00

.eqv CYAN 0x0000FFFF

.eqv MAGENTA 0x00FF00FF

.data

colors: .word MAGENTA, CYAN, YELLOW, BLUE, GREEN, RED,WHITE
.text
li $s1, 80 #y1 = x position of the tail
li $s2, 5 #y1 = y position of the tail

li $t3, 0x10008000 #t3 = first Pixel of the screen


li $t0,0 #Load index 0
loop1:
mul $t2,$s2,256 #get y index
add $t1,$t0,$s1 #load center address
mul $t1,$t1,4
add $t1,$t1,$t2
addu $t1, $t3, $t1 # adds xy to the first pixel ( t3 )
mul $a2,$t0,4 #get addresss of color
lw $a2,colors($a2)
sw $a2, ($t1) # put the color red ($a2) in $t0
add $t0,$t0,1 #i++
li $a0,50 #delay of mili seconds
li $v0,32
syscall
blt $t0,7,loop1

li $t0,0 #Load index 0
loop2:
add $t2,$s2,7 #get next line
mul $t2,$t2,256 #get y index
add $t1,$t0,$s1 #load center address
mul $t1,$t1,4
add $t1,$t1,$t2
addu $t1, $t3, $t1 # adds xy to the first pixel ( t3 )
mul $a2,$t0,4 #get addresss of color
lw $a2,colors($a2)
sw $a2, ($t1) # put the color red ($a2) in $t0
add $t0,$t0,1 #i++
li $a0,50 #delay of mili seconds
li $v0,32
syscall
blt $t0,7,loop2

li $t0,0 #Load index 0
loop3:
add $t2,$s2,$t0 #get next line
mul $t2,$t2,256 #get y index
mul $t1,$s1,4
add $t1,$t1,$t2 #load x y
addu $t1, $t3, $t1 # adds xy to the first pixel ( t3 )
mul $a2,$t0,4 #get addresss of color
lw $a2,colors($a2)
sw $a2, ($t1) # put the color red ($a2) in $t0
add $t0,$t0,1 #i++
li $a0,50 #delay of mili seconds
li $v0,32
syscall
blt $t0,7,loop3


li $t0,0 #Load index 0
loop4:
add $t2,$s2,$t0 #get next line
mul $t2,$t2,256 #get y index
add $t1,$s1,7 #get next line
mul $t1,$t1,4
add $t1,$t1,$t2 #load x y
addu $t1, $t3, $t1 # adds xy to the first pixel ( t3 )
mul $a2,$t0,4 #get addresss of color
lw $a2,colors($a2)
sw $a2, ($t1) # put the color red ($a2) in $t0
add $t0,$t0,1 #i++

li $a0,50 #delay of mili seconds
li $v0,32
syscall
blt $t0,8,loop4

li $v0, 10

它缺少末尾的系统调用。