Anyone knows how to write the bubblesort algorithm in AVR Assembly Language?
Here's the algorithm:
for i := 1 to n
for j := n to i+1
if A[ j ] < A[ j-1 ]
then exchange A[ j ] <-> A[ j-1 ]
where n will be 0< n <250 unsigned 8-bit
A is given in an input file where the first element is going to be the number of elements to be sorted and followed by the elements.
The code MUST be in AVR assembly language.
Thanks.