what is wrong with this
;Author : Alerwi Ali
;Function : Sort an array of 10 elemnts(Bubble sort)
.model small
.stack
size equ 10
.data
vett db 1,4,3,2,4,-1,-4,0,6,10
temp db ?
i db 0
j db 1
.code
.startup
mov ax,@data
mov dx,ax
xor si,si
xor cx,cx
mov cx,size
lea si,vett
Loop1:
add i,1
cmp i,size
jl NestedLoop
mov bl,[si]
cmp bl,si+1
NestedLoop:
add j,1
mov al,size
sub al,1
mov dl,i
sub al,dl
mov dl,1
mov size,al
cmp j,al
jl condition
jge loop1
condition:
mov bl,[si]
cmp bl,si+1
jg swap
loop NestedLoop
swap:
mov temp,bl
mov bl,si+1
mov [si],bl
mov bl,temp
mov si+1,bl
loop NestedLoop
End