Question: Let m be a segment of data memory starting at location 5100 and ending at the first locations (after 5100) that contains 0. Write a

Let m be a segment of data memory starting at location 5100 and ending at the first locations (after 5100) that contains 0.

Write a MIPSzy program that computes: the sum of positive numbers in m (stored in data memory location 5084)

the number of positive values in m (stored in data memory location 5088)

the sum of negative numbers in m (stored in data memory location 5092); and

the number of negative values in m (stored in data memory location 5096)

(show comments also)

Let m be a segment of data memory starting at location 5100

For example, if m contains 5100 10 5104 | 12 5108 -5 5112 -6 5116 11 51201 51240 - After execution of the program, data memory will contain 5084 34 5088 4 5092 11 5096 2 510010 510412 5108--5 5112 -6 5116 1 5120 5124 For example, if m contains 5100 10 5104 | 12 5108 -5 5112 -6 5116 11 51201 51240 - After execution of the program, data memory will contain 5084 34 5088 4 5092 11 5096 2 510010 510412 5108--5 5112 -6 5116 1 5120 5124

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!