Question: Write a MIPS subroutine, minmax, that has two input arguments: a pointer to a 1D array (i.e., the address of its first element), and the
Write a MIPS subroutine, minmax, that has two input arguments: a pointer to a 1D array (i.e., the address of its first element), and the length of the array. Each element of the array is a 32 bit word representing a signed integer. The subroutine should traverse the array and should return the value of both the largest and the smallest numbers in the array. Include a main procedure to test this subroutine. For this, you can create an array of a fixed length, and initialize it as you wish, using hard-coded values. Print the minimum and maximum values using the appropriate syscalls. You are given a template minmax.asm file to work with.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
