Question: Write a MIPS program that initialize two arrays with the following content : A: 1, 2, 3, 4, 5,6 B: 0, 3, 4, 5, 7,9
Write a MIPS program that initialize two arrays with the following content :
A: 1, 2, 3, 4, 5,6 B: 0, 3, 4, 5, 7,9
The main program calls Sub1 subroutine and passes the array pointers to the Sub1 subroutine (use the passing conventions). The subroutine will swap the las element of array B with the first element of array A. You need to swap all the elements of array A and B in this fashion. Finally subroutine will send the array pointers to main and main pass the array pointer to Print the routine and call Print subroutine to print each array.
Output :
A: 9,7,5,4, 3,0 B: 6,5,4,3,2,1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
