Assembly function to perform sorting of a list of integer key values
$10-30 USD
Terminado
Publicado hace alrededor de 9 años
$10-30 USD
Pagado a la entrega
Description:
You are responsible to write an assembly function to perform sorting of a list of integer key values. This function can sort either in ascending or descending order. You will use the bubble sort algorithm for this function. This function will use the C function signature but everything within this function should be assembly code using the ASM block similar to the assembly example shown in class.
Program Specification:
int sorter ( int* list, int count, int opcode );
list – the starting address of the list of integers to be sorted
count – total number of integers in the list
opcode -
1. Ascending
2. Descending
Additional Information:
- You must use register EDX to store your temporary swap value
- The input list stored in a text file with the filename being passed by command line argument.
- The output is display on the screen.
- You will first sort the list based on command line parameter in either ascending or descending order and then print it out.
- You must add comments to each line of your ASM code inside sorter().
- To get full credit, you need to use the same block of code for ASC and DESC (except for the value comparison).