Implement a MIPS assembly language program that defines main, readArray and remo
ID: 3884842 • Letter: I
Question
Implement a MIPS assembly language program that defines main, readArray and removeEvenOdd procedures.
The readArray takes an array of integers as its parameter, reads in integers from a user to fill the array and also print each value as long as it is with the number of elements specified by the parameter "howMany" and "length".
The removeEvenOdd procedure takes parameters of an array of integers, its length, and even value, an asks a user how many integers to read in and calls the readyArray procedure. Then it should go through the array to see if each number is even (divisible by 2) if the parameter even is 0. In that case, such even integer in the array is changed to 1. If the parameter even is 1, then it changes every odd integer in the array to 0. Then it prints out the updated content of the array.
The main procedure asks a user to specify whether to remove even or odd numbers by asking them to enter an integer. Then it calls the removeEvenOdd procedure. It repeats these two steps twice.
Please see the following C program to understand how it should work.
If your program causes an infinite loop, press Control and 'C' keys at the same time to stop it.
Name your source code file assignment6.s.
The following shows how it looks like in a C program:
Explanation / Answer
please find the below code
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.