Question: MIPS PROGRAMING Exercise 2 -- Simple subroutines (registers and JAL-based) Write a program that loops through 10 iterations, in each pass prompting the user for
MIPS PROGRAMING
Exercise 2 -- Simple subroutines (registers and JAL-based)
Write a program that loops through 10 iterations, in each pass prompting the user for two floating-point numbers (in a subroutine call it twice, returning the value in $f0), calculating the product of the two numbers (also in a subroutine, passing in the values in $f12 and $f14 and returning the value in $f0) and printing the product (also in a subroutine, passing in the value in $f12). You will have three little subroutines and your loop will make four subroutine calls per iteration. See the book for $f register usage with subroutines.
Use the "simple linkage convention" discussed in class (no stack use, use appropriate registers for arguments and return values).
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
