Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application And Administration

Authors: Michael Mannino, Michael V. Mannino

2nd Edition

0072880678, 9780072880670

More Books

Students also viewed these Databases questions

Question

Evaluate the importance of diversity in the workforce.

Answered: 1 week ago

Question

Identify the legal standards of the recruitment process.

Answered: 1 week ago