So I am basically very new to Assembly in general. I was trying to write this simple code where I need to sort numbers in an ascending order from source data and rewrite it into destination data. and whenever I run it, it shows: executables selected for download on to the following processors doesn't exist...
here is the code, maybe something wrong with it:
.global _start
_start:
ldr r0, =Input_data // load the input data into r0
ldr r1, =Output_data // load the output data into r1
mov r2, #32 // word is 32
first_loop:
ldr r3, =Input_data // load the input data into r3
ldr r4, [r3], #4 // load the 1st elem of input data into r4
mov r5, r0 // move to the second loop
second_loop:
ldr r6, [r1] // load the value of output data into r6
cmp r4, r6 // compare the current element eith the value in output data
ble skip_swap // if the current element is less than or equal, continue
// swap the elements:
str r6, [r1]
str r4, [r1, #4]
skip_swap:
// move to the next elem in output data
add r1, r1, #4
// decrement by one remaining elements (r2 was 32)
subs r2, r2, #1
// check if we have reached the end of input_data
cmp r3, r0
// if not, continue to the second loop
bne second_loop
// if the first loop counter is not zero, continue to the first loop
subs r2, r2, #1
bne first_loop
// exit
mov r7, #0x1
svc 0 // software interrupt
.data
.align 4
Input_data: .word 2, 0, -7, -1, 3, 8, -4, 10
.word -9, -16, 15, 13, 1, 4, -3, 14
.word -8, -10, -15, 6, -13, -5, 9, 12
.word -11, -14, -6, 11, 5, 7, -2, -12
// should list the sorted integers of all 32 input data
// like if saying: .space 32
Output_data: .word 0, 0, 0, 0, 0, 0, 0, 0
.word 0, 0, 0, 0, 0, 0, 0, 0
.word 0, 0, 0, 0, 0, 0, 0, 0
.word 0, 0, 0, 0, 0, 0, 0, 0
well, basically registers were all blank in Vitis IDE, even though I think it is supposed to be working..