answersLogoWhite

0

title ascending order using bubble sort

.model small

.stack 64

.data

a db 34h,78h,56h,47h

si_ze dw $-a ;si_ze=no of elements

.code

bubsort:

mov ax,@data

mov ds,ax

mov bx,si_ze

dec bx ;bx=no of passes needed to complete sorting(n-1)

outlup:

mov cx,bx ;cx=no of comparisions to be performed in a pass

mov si,0

inlup:

mov al,a[si]

inc si

cmp al,a[si]

jb go_on

xchg al,a[si]

mov a[si-1],al

go_on:

loop inlup ;dec cx,until cx=0

dec bx

jnz outlup

int 3 ;breakpoint interrupt

align 16

end bubsort

User Avatar

Wiki User

12y ago

What else can I help you with?

Related Questions

Which program translate assembly language into machine language?

Assembly langue is translated into machine language by an assembler.


A program for assembly language for traffic light control?

an assembly language program of traffic light


What is assembly program?

An assembly program is a machine-dependent program written in a low-level symbolic code known as assembly language.


Reserved word in assembly language program?

use of reserved word in assembly language


Example of Password program code in assembly language?

How to write the program un Assembly language to set a password for personal computers?


Write an Assembly language program which implements sorting algorithm both ascending and descending order and display those numbers with certain delay say of 5sec between successive displays?

das


Assembly language program for string concatenation using 8086 microprocessor?

write program to concatenating two sting in 8086 assembly language


Write a program in 8086 assembly language to draw a circle?

You need an 8086 assembly language pencil.


What translation programs converts assembly language programs to object program?

The only translation program that converts assembly language to machine code is an assembler.


How do you write an assembly language program to find the sum of n numbers using array?

write an assembly language program to find sum of N numbers


What application will be used to convert an assembly language source program into machine language?

An Assembler converts assembly language instructions into machine language.


How is a calculator created with an assembly language program?

programaticly