Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 #

image text in transcribedimage text in transcribed

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 syscall

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 33rd International Conference Dexa 2022 Vienna Austria August 22 24 2022 Proceedings Part 1 Lncs 13426

Authors: Christine Strauss ,Alfredo Cuzzocrea ,Gabriele Kotsis ,A Min Tjoa ,Ismail Khalil

1st Edition

3031124227, 978-3031124228

Students also viewed these Databases questions

Question

=+ What are the information and consultation requirements?

Answered: 1 week ago

Question

=+ Should the MNE belong (why, why not)?

Answered: 1 week ago