Hi, I am tasked with writing selection sort in assembly. We are writing for the ARM processor. Currently, this is what I have: [CODE] sort2: 73 stmdb sp!, {v1-v5, lr} @ Copy registers to stack 74 ldrb r5, [a2] @ J = n 75 76 ldrb v2, [a1] 77 cmp a2, #1 78 beq skip_sorting 79 80 sub r5, r5, #1 @ j = N-1 81 outer_loop: 82 cmp r5, #0 @ j > 0 add j-- at the bottom 83 beq skip_sorting 84 85 inner_loop: 86 mov r6, r5 @ k = j 87 sub r6, r6, #1 @ …

Member Avatar
+0 forum 0

The End.