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.