Saturday, October 24, 2020

Assembly Program to Sort Series / Array in Descending order in 8086

Today in this post you will get the program code to sort the series or an array in descending order using the microprocessor 8086 !! So,lets Begin....
 

data segment

arr1 dw 44h,66h,91h,20h,33h,60h,88h,50h

count dw 07h

data ends

code segment

start:

assume cs:code, ds:data

mov ax,data

mov ds,ax

mov dx,count

iter: mov bx,offset arr1

mov cx,dx

comps: mov ax,[bx]

cmp ax,[bx+02h]

jnc skip

xchg ax, [bx+02h]

mov [bx],ax

skip: inc bx

inc bx

loop comps

dec dx

jnz iter

code ends

end start


Programs:-

For many other Language Programs of microprocessor 8086, C++ , C , Data Structures visit our  BLOG 

There are programs of Object-Oriented Programing, Operators (logical, arithmethic ,relational,etc) ,exception handeling , inheritance ,string operations ,etc

No comments:

Post a Comment