Part I (70 points) Build an assembly function that will sort an array of integers. Bubble sort algorithm can be used. The
Part I (70 points)
Build an assembly function that will sort an array of integers. Bubble sort algorithm can be used. The function receives the array and the array size from a C/C++ program. The array of integers should be created and populated with values inside the C/C++ program. After sorting, the C/C++ code should display the array in sorted order. The array could be loaded with random numbers
Part II (30 points)
Modify the assembly function from part I to allow sorting for either ascending or descending order. A third parameter should be passed into the function to represent the chosen sorted order (for example 0 for ascending and 1 for descending). The user should be prompted in the C/C++ program about the sorting order.
Part III (25 points)
In the C/C++ program write a separate function for bubble sort. Set up a timer using the time() function and record the time difference for the assembly and for the C/C++ function for sorting. To get meaningful reading, the array should have 10,000 elements or more. The two functions should be given the same, unsorted array to work with. The recorded time differences should be displayed on the console.
I have attached an example for measuring the time of execution to this question as well.
Collepals.com Plagiarism Free Papers
Are you looking for custom essay writing service or even dissertation writing services? Just request for our write my paper service, and we'll match you with the best essay writer in your subject! With an exceptional team of professional academic experts in a wide range of subjects, we can guarantee you an unrivaled quality of custom-written papers.
Get ZERO PLAGIARISM, HUMAN WRITTEN ESSAYS
Why Hire Collepals.com writers to do your paper?
Quality- We are experienced and have access to ample research materials.
We write plagiarism Free Content
Confidential- We never share or sell your personal information to third parties.
Support-Chat with us today! We are always waiting to answer all your questions.
