Write a procedure to initialize the array


Problem:

Question- Write a MIPS program to complete the following functions. You must write comments and follow the register convention.

Part 1- Declare an integer array of 20 elements and other variables and labels;

Part 2- Write a procedure to initialize the array. Use random numbers between 0 and 99, and use a loop to initialize the array

Part 3- Implement a sort procedure.

Part 4- Write the main program. It calls the initialization procedure; prints the numbers in the array; calls the sort procedure to sort the numbers in the array; and print the numbers in the sorted array.

Based on the syscalls in MARS simulator, you can use the following code to generate random
numbers between 0 and 99.

li $a1,100 # define the upper range
li $v0, 42 # 42 is the syscall
code for random integer generation
syscall # the generated random number will be placed in $a0

Please describe the code with the help of comments.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a procedure to initialize the array
Reference No:- TGS0894035

Expected delivery within 24 Hours