- Read file that contains a list of numbers (One number per line - limited to 32 bits; Line terminated by '\n'
- Create another file that has the numbers in ascending order
Usage: Sort linefeed delimited numbers in a file in ascending order then output to a file
Example:
- input.txt output.txt It is also possible to replace the file with the sorted version:
- numbers.txt numbers.txt
- Download the assembly file from GitHub using curl:
curl https://raw.githubusercontent.com/alizameller/Project2/main/jag2.s --output jag2.s
- Download the Makefile from GitHub using curl:
curl https://raw.githubusercontent.com/alizameller/Project2/main/Makefile --output Makefile
- Run the Makefile in the directory downloaded:
make
- Run the exectutable generated followed by the input and output file names:
./jag2.out input.txt output.txt
If you do not include an input/output file a help message will be displayed
Your input file should look something like this:
1248293
-23472394
2384
2347
234
1
33423
23478
-6789
-2346
23487
-2342374
Running jag2.out
will then output this into the output file:
-23472394
-2342374
-6789
-2346
1
234
2347
2384
23478
23487
33423
1248293
The Design Document can be found here