Question
The purpose of this first programming assignment is for you to become familiar with the MIPS assembly language and the MARS MIPS program development environment.
The purpose of this first programming assignment is for you to become familiar with the MIPS assembly language and the MARS MIPS program development environment.
Consider the following MIPS variable declarations:
LIST: .word 11, 22, 33, 44, 55, 66, 77, 88, 99
LENGTH: .word 9
EVEN: .word 0
ODD: .word 0
Note that integer variable LENGTH indicates the number of values stored in integer array LIST.
Write a program in C++ and assembly language that uses a loop and a selection statement to count the number of even integers and the number of odd integers in the given LIST, and stores these counts in variables EVEN and ODD, respectively. For the declarations shown above, your program should determine that four of the values in LIST are even, and five of the values are odd. Your program should store these counts in variables EVEN and ODD, respectively. Be sure to test and thoroughly debug your program using a lists
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started