Question: This is a practice problem for a Computer Organization class and must be done in the MIPS language: The goal is to write a complete
This is a practice problem for a Computer Organization class and must be done in the MIPS language:
The goal is to write a complete program in MIPS assembly language that implements the selection sort algorithm to sort an array of integers in both ascending and descending order. The program must be based on the C code presented below. I have attached the C code below. This also must be developed to run in the MIPS simulator QtSpim.


t
SPIM System Calls SPIM provides a small number of OS "system calls" Some of these calls are: scall code Arquments Result Service print_int print float print_double print_string read_int read_float read_double read_string $a0integer $f12 float $f12 double $a0 string 4 integer in $vo float in $fo double in $f0 7 $a0 buffer $al length exit 10 main( int j. k, temp, nin, direction int length9: int list C17, 9. 4, 3, 8, 1, 6, 2, 5; printf("Enter 0 to sort in descending order. In) printfAny number different than 0 vill sort in ascending order. ") scanf("%d", &direction); printf( Before Sort:n) printData(list, length) for( k = 0; k min) else return( j
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
