I need to create a little assembly app for arm cpu which reads two 32 bit numbers from the address which register r0 points out. Then it compares absolute value of those two numbers and puts them back to those same addresses the way there's number which absolute value is higher in the first address. Finally the app sets 0 as the register r0 value, if the numbers were in the right order and sets 1 if the number orders needed to be changed.
The problem is that my little app isn't workin.
Hope someone can help me solve the problems there. thanks.
ldr r1,[r0,#0] ldr r2,[r0,#4] mov r3,#-1 cmp r1, #0 mulmi r4, r1, r3 movpl r4, r1 cmp r2, #0 mulmi r5, r2, r3 movpl r5, r2 subs r3,r4,r5 strmi r1,[r0,#4] strmi r2,[r0,#0] strpl r2,[r0,#4] strpl r1,[r0,#0] movpl r0,#0 movmi r0,#1