- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
8086 program to sort an integer array in descending order
In this program we will see how to sort array elements in descending order.
Problem Statement
Write 8086 Assembly language program to sort in descending order of the elements in a given array, which is starts from memory offset 501. The size of the series is stored at memory offset 500.
Discussion
Here we are sorting the number in bubble sorting technique. In this sorting technique there will be n passes for n different numbers. In ith pass the ith smallest element will be placed at the end. This is comparison based sort. We taking two consecutive numbers, compare them, and then swap them if the numbers are not in correct order.
Input
Address | Data |
---|---|
… | … |
500 | 06 |
501 | 51 |
502 | 24 |
503 | 2C |
504 | CF |
505 | 3E |
506 | 45 |
… | … |
Flow Diagram
Program
Output
Address | Data |
---|---|
… | … |
501 | CF |
502 | 51 |
503 | 45 |
504 | 3E |
505 | 2C |
506 | 24 |
… | … |
- Related Articles
- 8086 program to sort an integer array in ascending order
- C# program to sort an array in descending order
- C program to sort an array in descending order
- Golang Program to sort an array in descending order using insertion sort
- Python program to sort the elements of an array in descending order
- Golang Program To Sort The Elements Of An Array In Descending Order
- Swift Program to Sort the Elements of an Array in Descending Order
- C++ Program to Sort the Elements of an Array in Descending Order
- Sort an array in descending order using C#
- How do you sort an array in C# in descending order?
- 8085 Program to perform selection sort in descending order
- 8085 Program to perform bubble sort in descending order
- C# Program to order array elements in descending order
- How to sort an ArrayList in Descending Order in Java
- How to sort an ArrayList in Java in descending order?

Advertisements