Question: Given an array with 10 integers (1000 88 256 -547 90 -199 -2021 8044 O 888], write an assembly program to invert an array of

![-199 -2021 8044 O 888], write an assembly program to invert an](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f51f9568aae_43666f51f94d5647.jpg)
Given an array with 10 integers (1000 88 256 -547 90 -199 -2021 8044 O 888], write an assembly program to invert an array of the integers (words), i.e. [888 0 8044 -2021 -199 90 - 547 256 88 1000], and find the maximum integer in the array. Finally, print the result as shown in the sample output. Use a loop to repeat the steps of inversion, and define a procedure named "swap" to swap the content between two array elements (i.e. use $a0 and $a1 to pass the arguments from the main to the swap procedure). In the swap procedure, call another procedure called check_max". Sample Output: Original array: 1000 88 256 -547 90 - 199 -2021 8044 0 888 New array: 888 0 8044 -2021 -199 90 -547 256 88 1000 The biggest value = 8044 program is finished running -- Follow the procedures: 1. Adopt the .data segment as follows 2. Save the file as lab5.asm 3. Assembly the program by clicking Run -> Assemble 4. Run the program by clicking Run -> Go To facilitate grading of your work, please adopt the .data segment exactly as follows 1 2 msgl: 3 msg2: 4 msg3: 5 newline: 6 space: 7 array: 8 max: .data .asciiz "Original array: " .asciiz "New array: n" .asciiz "The biggest value .asciiz "n" .asciiz " .word 1000, 88, 256, -547, 90, -199, -2021, 8044, 0, 888 . Word o ! And use exact label names such as Swap, Check_max as mentioned above and in class
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
