Question: Can someone help me with this Mips assembly program? I tried to post this a few times and all i got was errors or no
Can someone help me with this Mips assembly program? I tried to post this a few times and all i got was errors or no one answered.. Please help. I mainly neeed help with Problem 2.

Problem 1. Write a search function that etakes three input parameters: an array's starting address, the array size, and a seed value to be found; and returns two results: the index of the first location where the value is greater than the sced value f not found, return -I), and how many elements in the array that are greater than the seed value. For example, in array of 1, 5, 4, 6, 3, 5, 2, 10, we search for the seed value of 4. The return value should be 1 and 4. (i.e. the first element with value greater than 4 is in index 1, and there are four elements with value greater than 4.) Also, write a main program that calls the search function three times using the data sets below the above array of 8 elements and search for 4; an array of 10 elements 1, -1, 2, -2, 3,-3, 4,-4, 5, -5 and search for 10 an array of 30 elements 28, -17, 0, 51,-12,11, 5, 22, -2, -9, 13, 16, 2,1,36,-13, -32, -71, 101, 30. 130 120, 13. 11.-91, 14, 48, 53, -50, 44, and search for 13. Problem 2. Write a function AVA(&x,&Y,&2, n,s, t) to perform the following absolute value vector addition, such that where &X, &Y, and &Z refer to the array X, Y, Z's starting address, n is the size of the array, and s and t are integers. Please use the stack to pass these six parameters. Also, write main programs that call the AVA function on the following data sets (note: please prepare two separate program files, one for each data set) 5, s= 2, 1-1, Y 3, {-5,-4,-3,-2,-1} {1, 2, .n- 10, s- 3, t-2,Y--1, 3, -5, 7, -9. 2, -4, 6, -8, 10], n 4, 5), and Z = - and Z 1,2,3, 4,5, 6,7,8,9,10) (For each data set, the main program should first print out Y and Z arrays, and then to calculate X and finally prints out X array.) Problem 1. Write a search function that etakes three input parameters: an array's starting address, the array size, and a seed value to be found; and returns two results: the index of the first location where the value is greater than the sced value f not found, return -I), and how many elements in the array that are greater than the seed value. For example, in array of 1, 5, 4, 6, 3, 5, 2, 10, we search for the seed value of 4. The return value should be 1 and 4. (i.e. the first element with value greater than 4 is in index 1, and there are four elements with value greater than 4.) Also, write a main program that calls the search function three times using the data sets below the above array of 8 elements and search for 4; an array of 10 elements 1, -1, 2, -2, 3,-3, 4,-4, 5, -5 and search for 10 an array of 30 elements 28, -17, 0, 51,-12,11, 5, 22, -2, -9, 13, 16, 2,1,36,-13, -32, -71, 101, 30. 130 120, 13. 11.-91, 14, 48, 53, -50, 44, and search for 13. Problem 2. Write a function AVA(&x,&Y,&2, n,s, t) to perform the following absolute value vector addition, such that where &X, &Y, and &Z refer to the array X, Y, Z's starting address, n is the size of the array, and s and t are integers. Please use the stack to pass these six parameters. Also, write main programs that call the AVA function on the following data sets (note: please prepare two separate program files, one for each data set) 5, s= 2, 1-1, Y 3, {-5,-4,-3,-2,-1} {1, 2, .n- 10, s- 3, t-2,Y--1, 3, -5, 7, -9. 2, -4, 6, -8, 10], n 4, 5), and Z = - and Z 1,2,3, 4,5, 6,7,8,9,10) (For each data set, the main program should first print out Y and Z arrays, and then to calculate X and finally prints out X array.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
