The following code is supposed to take two lists and put them into one big list (C[10]) and being a beginner in assembly I am unsure as to how to check if my output is correct. I tried implementing a print to check if the left half works but it only prints zero. (https://www.kvakil.me/venus/ using this website as an emulator)
.data
A:
.word 0,2,3,3,4
B:
.word 24,22,21,25,23
C:
.word 1,1,1,1,1,1,1,1,1,1,1
min:
.word 0
.text
.globl _main
_main:
add x8,x8,x0 #x8=i=0
addi x9,x9,5 #x9=5
#start of the loop
loop:
bge x8,x9,exit
add x18,x0,x8 #x18=i
slli x18,x18,2 #x18=i*4
addi x19,x18,20 #x19 =i*4+ 4*5
la x20,A #x20=&A
la x21,B #x21=&B
la x22,C #x22=&C
add x20,x18,x20 #x20=&A[i]
lw x20,0(x20) #x23=A[i]
add x21,x19,x21 #x21=&B[i]
lw x21,0(x21) #x24=B[i]
add x23,x22,x19 #x23=&C[i+5]
sw x23,0(x21) #C[i+5]=B[i]
add x22,x18,x22 #x22=&C[i]
sw x22,0(x20) #C[i]=A[i]
addi a0,x0,1
add x20,x0,x20
ecall
addi x8,x8,1 #i=i+1
beq x0,x0,loop
exit:
I am guessing the code is supposed to print 0224 however it is only printing 0.