Question: MIPS: Consider the following declarations: .data ARRAY: .word 10, 5, 7, 8, 88, 3, 16, 11, -1 COUNT: .word 0 Note that ARRAY contains an

MIPS:

Consider the following declarations:

.data ARRAY: .word 10, 5, 7, 8, 88, 3, 16, 11, -1 COUNT: .word 0

Note that ARRAY contains an arbitrary number of non-negative numbers, followed by a negative number which acts as a sentinel value. Write a MIPS program counts the non-negative numbers in the ARRAY that are evenly divisible by 8, stopping when it reads the first negative value and storing the result in integer variable COUNT. For the data shown above, your program would set COUNT to 3. NOTE: Your program should work for an ARRAY containing any number of non-negative values.

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!