Question
mips .text main: li $a0, 0 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, 1 jal putDec li $a0, ' '
mips
.text
main: li $a0, 0 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, 1 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, 196 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, -1 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, -452 jal putDec li $a0, ' ' li $v0, 11 syscall li $a0, 2 jal mystery move $a0, $v0 jal putDec li $a0, ' ' li $v0, 11 syscall
li $a0, 3 jal mystery move $a0, $v0 jal putDec li $a0, ' ' li $v0, 11 syscall
li $v0, 10 # terminate program syscall
putDec: ## FILL IN ## jr $ra # returnv
mystery: bne $0, $a0, recur # li $v0, 0 # jr $ra # recur: sub $sp, $sp, 8 # sw $ra, 4($sp) # sub $a0, $a0, 1 # jal mystery # sw $v0, 0($sp) # jal mystery # lw $t0, 0($sp) # addu $v0, $v0, $t0 # addu $v0, $v0, 1 # add $a0, $a0, 1 # lw $ra, 4($sp) # add $sp, $sp, 8 # jr $ra #
put Dec: li $v0, 1 syscall. li 1. li $v1 11 character print syscall li al, '1' li $v1, 11 character print syscall 1 prints the string li $v1, 4 la Sal, Str syscall. Str a SC 2 M-1" -1 prints the integer li sv1, 1 sprints the integer la Sal, -1 syscallStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started