I've coded a bubble sort using ARM assembly language
The code works perfectly and sorts as intended, but it keeps looping in COMP (compare) after the sort has finished. I know I need a swap flag to check, but I can't understand its logic and where it should be placed in the code
r0 = address of array in memory
r1 = index of first number
r2 = value of first number
r3 = index of second number
r4 = value of second number
Sorry for not including the code as a text because I will be submitting it through a plagiarism detecting system.