Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a MIPS program to complete the following functions. You must write comment

ID: 3565630 • Letter: W

Question

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

(1) Declare an integer array of 20 elements and other variables and labels;

(2) Write a procedure to initialize the array. Use random numbers between 0 and 99, and use

a loop to initialize the array

(3) Implement a sort procedure.

(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

Explanation / Answer

#random number geneator

#use this in word

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote