- An Assembly program that takes array of numbers from the user, sorts it with one of the three simple algorithms: Bubble Sort, Selection Sort, Insertion Sort (depending on the user desire) and prints the sorted array.
-
- Three types of sorting algorithms.
- Choosing the method of sorting is based on the user desire.
- The number of values is variable and determined by the user.
- Handling for inputs such that the user can only enters integers.
- The numbers can be sorted ascending or descending.
-
Name Role Branch 1. Mostafa Mahmoud Mostafa Handling Input validation and representation Input_branch 2. Mohamed Ali Mohamed Creating Bubble sort algorithm Bubble_Sort 3. Mohamed Hani Abo Elela Creating Insertion Sort algorithm Insertion_Sort 4. Mahmoud Mohamed Abdelwahab Creating Selection sort algorithm selection_sort 5. Mina Ashraf Fakhry Handling output after Sorting master
-
Assembly Programming Language.
-
This project is a program takes a set of numbers from user to sort them ascending or descending based upon the desire of the user. firstly the program asks the user to enter the number of elements, then the program asks him to enter the values of numbers. then the program asks the user to choose the sorting method because the program supports three ways of sorting (Bubble Sort - Selection Sort - Insertion Sort).
-
-
In this sorting technique, we pick an element and then insert it in the appropriate position in ascending or descending order.
-
In pass 1, element arr[1] is inserted before arr[0], so that arr[0] and arr[1] are sorted.
In pass 2, element arr[2] is inserted before arr[0] or between arr[0] and arr[1] or after arr[1], so that arr[0], arr[1] and arr[2] are sorted.
In a similar way the process is carried out n-1 times.
-
Time Complexity is O(n^2).
-
-
- Visual studio IDE.
- MASM.
-
- Irvine32.lib
-
-
- Learning git and github: https://www.youtube.com/watch?v=ACOiGZoqC8w&list=PLDoPjvoNmBAw4eOj58MZPakHjaO3frVMF.
-
- prentice_the_intel_microprocessors_8th_edition_013.
- Assembly language for Intel-based computers by Kip R. Irvine.
-
-
-
Irvine32 library handles input using function called ReadInt and in this function he takes the input as string then calls for another function called ParseInteger32 in this function he takes each digit as token so he takes the longest decimal number possible from the string and if the length of input string is 0 he assigns the EAX register with 0.
-
So if the user presses Enter in an input that accepts 0 as input i am forced to take it as valid input.
-
When the input is partially valid as the number has character in it Irvine gives me the longest valid number as previously stated and again i am forced to take the input as valid input.
-