Question: do Solutions for part A and part B in separate files 1. [100pts] The following program (written in C) finds the maximum value of an

do Solutions for part A and part B in separate files

 do Solutions for part A and part B in separate files

1. [100pts] The following program (written in C) finds the maximum value of an array int max, 1j max = array[0]; for (i=0; i size; i++) if ( max array[1] ) max = array[1]; 1.a [50pts] Implement the above C routine in the MIPS assembly language. This part should be written without any urge for optimization 1.b [50pts] Carry out the following optimizations on your program [1525pts] Reorganize the loop so it can be accomplished with one branch instruction instead of two . [4025pts] Replace the array subscripting with pointers as illustrated in the "Arrays versus Pointers section of the text. Instructions: Use the following sample dataset to finish your implementation 0 -4 3 -7 -10 10 -5 47 -9 -1 10 -9 0 6 3 -5 2-4 -0 You might need to define array in the text segment shown below data array: .word , -4, 3, -7, 10, 10, -5, 4, 7,-9 .word -1, 10, -9, 0, 6, 3, -5, 2, -4, -0 Also, in your text segment, you have to load the address of array by using "la $t1, array" From there, you should be able to implement your algorithm

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!