0% found this document useful (0 votes)
10 views3 pages

MP Exp04 C80

The document outlines an experiment aimed at teaching students to write an assembly language program for sorting numbers using BIOS/DOS interrupts. It includes prerequisites, expected outcomes, a theoretical background on sorting algorithms, and a detailed algorithm for implementation. Additionally, it specifies requirements for students to submit their code, input/output, observations, conclusions, and answers to curiosity questions.

Uploaded by

rutujamhatre20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views3 pages

MP Exp04 C80

The document outlines an experiment aimed at teaching students to write an assembly language program for sorting numbers using BIOS/DOS interrupts. It includes prerequisites, expected outcomes, a theoretical background on sorting algorithms, and a detailed algorithm for implementation. Additionally, it specifies requirements for students to submit their code, input/output, observations, conclusions, and answers to curiosity questions.

Uploaded by

rutujamhatre20
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Experiment No.

04

A.1 Aim: Write assembly language program to sort numbers in ascending / descending order.
[Use BIOS/DOS interrupts to read input and display results.]

A.2 Prerequisite: Basic knowledge of sorting the numbers and interrupts of 8086

A.3 Outcome:
After successful completion of this experiment students will be able to
1. Use appropriate instructions to program microprocessor to perform various
task.
2. Develop the program in assembly/ mixed language for Intel 8086 processor
3. Demonstrate the execution and debugging of assembly/ mixed language program

A.4 Theory
Theory: A Sorting Algorithm is used to rearrange a given array or list elements
according to a comparison operator on the elements. The comparison operator is used to
decide the new order of element in the respective memory locations. In the given diagram the
numbers are sorted in ascending order from an array of n numbers, where size n is stored in
memory location2000:500 and numbers are sorted from memory location 2000:501

A.5 Algorithm

1. Defines the memory model


2. Initialize the data segment with variables. First variables will be the one which allow
user to give list of numbers and second will be array with size and it holds numbers .
Third variable will be holding Length of the Array.
3. Initialize the code segment
4. Apply DOS interrupt functions to allow user to give the inputs.
5. Set the counter
6. Travel from starting memory location and compare the first two two numbers if first
number is greater than second number then swap them(for ascending order) and vice
versa for descending order
7. Decrease the counter and increment SI
8. Continue until the counter become zero
9. Display the sorted numbers
PART B
(PART B : TO BE COMPLETED BY STUDENTS)

(Students must submit the soft copy as per following segments within two hours of the
practical. The soft copy must be uploaded at the end of the practical)

Roll. No Name:
Class: Batch
Date of Experiment: Date of Submission:
Grade:

B.1 Software Code written by student:

(Paste your code completed during the 2 hours of practical in the lab here)

B.2 Input and Output:

B.3 Observations and learning:

(Students are expected to comment on the output obtained with clear observations and
learning for each task/ sub part assigned)

B.4 Conclusion:

(Students must write the conclusion as per the attainment of individual outcome listed
above and learning/observation noted in section B.3)

B.5 Question of Curiosity

Q1. List out and explain the instructions used in above program
Q2. Write an assembly language program to do bubble sorting.

You might also like