Question: Write a program in MIPS Assembly language using Mars MIPS that inputs a 4x4 matrix of single-digit integers one row at a time (one row

Write a program in MIPS Assembly language using Mars MIPS that inputs a 4x4 matrix of single-digit integers one row at a time (one row per input line not one number per line!) and stores it into a linear 32-bit Integer Array M (so called Row-Major order). It is not completely trivial to do this given the Syscalls available and the desired input format. Hint: Format conversion will be required (do not use syscalls for the format conversion, just use loads, math and stores). Print the matrix back out with each row on a separate line and the values separated by spaces. Make this program a procedure so that you can use it again in later labs. For now you can call it from a very simple main routine that just calls the routine. When you run the program, the input should look something like

Input row 1: 1 4 3 2

Input row 2: 5 7 6 8

Input row 3: 9 1 2 3

Input row 4: 4 5 6 7

Where the integers 1 2 3 4 8 9 or whatever matrix values the user wants to input are input by the user on the console. And the output will look like

Row 1: 1 4 3 2

Row 2: 5 7 6 8

Row 3: 9 1 2 3

Row 4: 4 5 6 7

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!