Bubble sort is one of the simplest sorting algorithms. The two adjacent elements of an array are checked and swapped if they are in wrong order and this process is repeated until we get a sorted array. The steps of performing a bubble sort using Assembly MC68K are:
->Compare the Last and the element Before the Last of the array and swap them if they are in wrong order. ->Proceed till the first element of the array in a similar fashion. ->Repeat all of the above steps until the array is sorted.