Question: . . CDA 3102 Programming Assignment 1 Let m be a segment of data memory starting at location 5104 and ending at the first locations

. . CDA 3102 Programming Assignment 1 Let m be a segment of data memory starting at location 5104 and ending at the first locations (after 5200) that contains 0. Let x be the value stored at DM[5000] Write a MIPSzy program that computes: the sum of all values in m that are larger than x and stores the result in DM[5084); the number of all values in in that are larger than x and stores the result in DM[5088); the sum of all values in m that are less than x and stores the result in DM[5092); the number of all values in m that are less than x and stores the result in DM[5096); and the sum of all values in m and stores the result in DM[5100] For example, if DM[5000]=6 and in contains: 5104 10 5108 12 . . 5112-5 5116 6 5120 11 5124 1 5128 0 After execution of the program, data memory will contain: 5084 33 5088 3 5092 -4 5096 2 5100 35 5104 10 5108 12 5112 -5 5116 6 11 51 20 5124 1 5128 0 You are only allowed to use register Szero and registers $t0-$t. You will not get any credit (i.e. will get a zero) if you use any other register and/or instructions that are not part of MIPSzy. Make sure that your program is clearly commented. There is no credit for programs that are not commented Save your program in a file with txt extension and submit the file online. . . CDA 3102 Programming Assignment 1 Let m be a segment of data memory starting at location 5104 and ending at the first locations (after 5200) that contains 0. Let x be the value stored at DM[5000] Write a MIPSzy program that computes: the sum of all values in m that are larger than x and stores the result in DM[5084); the number of all values in in that are larger than x and stores the result in DM[5088); the sum of all values in m that are less than x and stores the result in DM[5092); the number of all values in m that are less than x and stores the result in DM[5096); and the sum of all values in m and stores the result in DM[5100] For example, if DM[5000]=6 and in contains: 5104 10 5108 12 . . 5112-5 5116 6 5120 11 5124 1 5128 0 After execution of the program, data memory will contain: 5084 33 5088 3 5092 -4 5096 2 5100 35 5104 10 5108 12 5112 -5 5116 6 11 51 20 5124 1 5128 0 You are only allowed to use register Szero and registers $t0-$t. You will not get any credit (i.e. will get a zero) if you use any other register and/or instructions that are not part of MIPSzy. Make sure that your program is clearly commented. There is no credit for programs that are not commented Save your program in a file with txt extension and submit the file online
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
