Question: i need the C code above translated into MIPS assembly language please and executed in qt spim Assignment Description: An array of integers can be

i need the C code above translated into MIPS assembly language pleaseand executed in qt spim Assignment Description: An array of integers canbe assigned to a memory address in the .data section of aMIPS assembly language program as show below. Here the length of thei need the C code above translated into MIPS assembly language please and executed in qt spim

Assignment Description: An array of integers can be assigned to a memory address in the .data section of a MIPS assembly language program as show below. Here the length of the array is stored first, and then the elements of the array numbers next. Implement a MIPS assembly language program to perform the functionality of the following C program and print the updated array content, by listing each integer in it. It should ask a user to enter three integers, a starting index, an ending index, and an integer to use for a comparison. It should examine only the elements in the array located from the entered starting index, to the entered ending index to check if each of them is greater the last entered integer, then if it is, subtract 3*the last entered integer to each such element in the array. For instance, if a user enters 2, enters 9, then enters 3, then the output will be the following: i.e., the numbers that are located between the index 2 and 9 are examined to see if each of them is greater than the last entered number (3 in this case) then each of such element is subtracted with 3 times that number (3 in this case) if it is. If the entered ending index is larger than 11. then the program should exam elements in the array until the end, and if the entered starting index is less than 0, then it should start examining elements from the first one in the array. If your program causes an infinite loop, press Control and 'C' keys at the same time to stop it. Name your source code file assignment5.s. numbers_len: .data .word .word 12 45, -6, 23, -7, 15, -17, 11, -4, 23, -26, 2, 19} numbers: The following shows how it looks like in a C program: int numbers[12] = {45, -6, 23, -7, 15, -17, 11, -4, 23, -26, 2, 19); int startIndex, endIndex, numl; int i; printf("Enter a starting index: "); //read an integer from a user input and store it in startIndex scanf("%d", &startIndex); printf("Enter an ending index: "); //read an integer from a user input and store it in endIndex scanf("%d", &endIndex); printf("Enter an integer: "); //read an integer from a user input and store it in num1 scanf("%d", &numl); if (startIndex numl) numbers[j] = numbers[j] - (3 * numl); printf("Result Array Content: "); for (j = 0; j numl) numbers[j] = numbers[j] - (3 * numl); printf("Result Array Content: "); for (j = 0; j

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!