Write an ARM assembly program to check whether an N × N matrixis a magic square. A magic square is an N × N matrix in which thesums of all rows, columns, and the two diagonals add up to N(N2 +1)/2. All matrix entries are unique numbers from 1 to N2 . If thematrix is a magic square, register R0 will be set (i.e. all ones)upon completion; otherwise it will be cleared. Test the followingmatrix: 16 3 2 13 5 10 11 8 9 6 7 12 4 15 14 1 Store the matrixelement numbers in memory starting at location 0x20004000. Assumeall numbers are Bytes.
Expert Answer
Answer to Write an ARM assembly program to check whether an N × N matrix is a magic square. A magic square is an N × N matrix in…