Arm/swap
From ASMBits
arm/load2Previous
Nextarm/chrcpy
Write a function that will swap two array elements. Your function will be passed three parameters: The first is a pointer to the beginning of the array. The second and third parameters are indexes to specify which pair of elements of the array should be swapped.
int swap (int *pointer, int index1, int index2);
Expected solution length: Around 7 lines.
Sample Input
r0=Data, r1=0, r2=2
Sample Output
[Two array elements swapped]
arm/load2Previous
Nextarm/chrcpy