Question: IN MIPS AND MUST RUN IN QTSPIM Write the program in MIPS that declares an array of positive integers. The size of the array is

IN MIPS AND MUST RUN IN QTSPIM

IN MIPS AND MUST RUN IN QTSPIM Write the program in MIPSthat declares an array of positive integers. The size of the array

Write the program in MIPS that declares an array of positive integers. The size of the array is not fixed. The final element of the array should have the value of 0xF, which is not used in calculations, and should be used to calculate the size of the array. The program can prompt the user for an integer input. Compare the input with the array. Display the index of the input in the array if found. If the number does not match any element in the array, insert the number in the array in sorted descender order. The program is terminated when input a negative integer. Print the new array with appropriate message on the screen. For example assume an array as follows (array: .word 4, 5, 23, 5, 8, 3, 15, 67, 8, 9, 0xF) Sorted array: 67,23, 15, 9, 8,8, 5, 5, 4, 3 Enter a number to search 20 Number not found. Added to array Sorted array: 67,23, 20,15, 9, 8,8, 5, 5, 4, 3 Enter a number to search: 5 Number at index 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!