Need Help ?

Home / Expert Answers / Other / THE ASSIGNMENT You will write a function named TriMat. It will receive two parameters: the address

THE ASSIGNMENT You will write a function named TriMat. It will receive two parameters: the address ...


THE ASSIGNMENT You will write a function named TriMat. It will receive two parameters: the address of an integer n containing the size of the array The address of a two-dimensional integer array, size n by n TriMat will return one parameter, an integer representing what type of array was passed: Zero indicates that the matrix is a normal matrix, i.e. not triangular One indicates that the matrix is an upper triangular matrix Two indicates that the matrix is a lower triangular matrix TEST PROGRAM You should use the following code to test your function: .global _start _start: @ Driver program for Lab 5 - Triangular Matrices ADR R12,myData ADR R0,myCount ADR R1,myMat BL TriMat @ expected result in R0 = 1 NOP @ set breakpoint here myData: .int 0 myCount: .int 5 myMat: .int 1,2,3,4,5 Row2: .int 0,2,3,4,5 Row3: .int 0,0,3,4,5 Row4: .int 0,0,0,4,5 Row5: .int 0,0,0,0,5 @Your function goes here: @ Register usage @ R0 = input matrix row size @ R1 = input matrix address @ output matrix category: @ 0 = not a triangular matrix @ 1 = upper triangular matrix @ 2 = lower triangular matrix @ R1 = input matrix address @ TriMat: @ Put your code here MOV PC,LR .end The labels Row2, Row3, et cetera have no special meaning. They may not be present, or may be different Your program will be tested with the set of values shown in the sample above, along with other sizes and types of matrices. You may assume that the array size will always be an odd number (3,5,7,...).



Radioactive Tutors

Radio Active Tutors is a freelance academic writing assistance company. We provide our assistance to the numerous clients looking for a professional writing service.

NEED A CUSTOMIZE PAPER ON THE ABOVE DETAILS?
Order Now


OR

Get outline(Guide) for this assignment at only $10

Get Outline $10

**Outline takes 30 min - 2 hrs depending on the complexity and size of the task
Designed and developed by Brian Mubichi (mubix)
WhatsApp