It is meant to count the first two numbers in the array and then place them in ascending order, but sth wrong. Any idea?
Code segment
jmp main
add1 dw 9,3,2,7,1,4,2,5,8,1
main: mov si,0
call orderab
exit: mov ax,04c00h
int 21h
orderab: cmp add1[si],add1[si+2]
jle finish
mov ax,add1[si]
mov bx,add1[si+2]
mov add1[si],bx
mov add1[si+2],ax
finish: ret