Writing a function that produces the NxN matrix resulting from adding an N-element vector to the diagonal of an NxN matrix, in MIPS assembly.
You will use MARS for this portion of the assignment. A simple calling framework, with one hardcoded test case, is provided in “Diagonal-tester.asm” — treat this as your “main” file and load it first in MARS. Your solution MUST be specified in the provided file “DiagAdd.asm” and use the provided global label “DiagAdd” for your function name (i.e. you cannot change the name of the function). Documentation of each argument is to the function is available within DiagAdd.asm. When executing the program, the test wrapper will print out the number of erroneous entries in the NxN result matrix. It should be 0 for a correct solution.
You will only be turning in your modified copy of DiagAdd.asm. Feel free to modify Diagonal-tester.asm to test additional inputs. We will be testing your code with different values of N and different input matrices/vectors.