Arranging numbers in Ascending order

:PROGRAM TO ARRANGE NUMBERS IN ASCENDING ORDER

data segment

list dw 53h,25h,19h,44h,13h,02h

count equ $-list-1

data ends

code segment

assume cs:code,ds:data

start: mov ax,data

mov ds,ax

mov dx,5h

again0: mov cx,dx

mov si,offset list

again1: mov ax,[si]

cmp ax,[si+2]

jl pr1

xchg [si+2],ax

xchg [si],ax

pr1:

add si,02h

loop again1

dec dx

jnz again0

int 03h

code ends

end start

1 comment:

  1. The Dog House Casino and Hotel Map | Mapyro
    Find your way around the casino, find 서산 출장안마 where everything is located with a map 전라남도 출장샵 of all the casinos 서귀포 출장샵 in the area and give accurate 과천 출장안마 results 계룡 출장마사지 on

    ReplyDelete