Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

what.s is as follows 2. Modify what.s so that it takes two arguments. If the arguments are both the same then the answer should be

image text in transcribed
what.s is as follows
image text in transcribed
2. Modify what.s so that it takes two arguments. If the arguments are both the same then the answer should be the same as that of what.s that takes only one argument. If they are different then you should figure out what your program should do based on the above. Try to make as few changes as possible. Give your new program a sensible name. 3. Enhance the program to allow it to receive the two arguments from the keyboard and display the result in the console window of SPIM. If any of the input arguments is a negative number (less than zero), your enhanced program should display a zero in the console. data - word arg: .text -globl main main: la lw lw $13, arg $12, 0($13) $13, 0($13) addi beqz $11, $zero, o $12, fin fori: add addi bnez $11, $11, $12 $13, $13, -1 $13, fori fin: $v0, 10 li syscall 2. Modify what.s so that it takes two arguments. If the arguments are both the same then the answer should be the same as that of what.s that takes only one argument. If they are different then you should figure out what your program should do based on the above. Try to make as few changes as possible. Give your new program a sensible name. 3. Enhance the program to allow it to receive the two arguments from the keyboard and display the result in the console window of SPIM. If any of the input arguments is a negative number (less than zero), your enhanced program should display a zero in the console. data - word arg: .text -globl main main: la lw lw $13, arg $12, 0($13) $13, 0($13) addi beqz $11, $zero, o $12, fin fori: add addi bnez $11, $11, $12 $13, $13, -1 $13, fori fin: $v0, 10 li 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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

More Books

Students also viewed these Databases questions

Question

Which month recorded the highest sales revenue?

Answered: 1 week ago

Question

What is an interface? What keyword is used to define one?

Answered: 1 week ago