CSC 220 Program #2"Life is an array, old chum" Program #2 is:
|
|||||||||||||||
DescriptionWrite an assembly program that queries the user for an array of integers and manipulates them. Then, allow the user to select menu items to 1) report the minimum and maximum values in the array, 2) sort the numbers, or 3) quit the session. Here's an example session (user input in bold):
You should limit the size of the array at, say, 20 numbers. If the user requests more numbers than that (or less than 1), then print an error and exit. That's secret nerd code for saying that your arrays should not be dynamically allocated... unless you want to, I guess. Also, speaking of what you want... if you want to do more interesting functions than min/max with your arrays, feel free but let me know your plans beforehand. Also, you must implement this program in two slightly different ways:
Peak at the array examples that I have provided (it's some other link on the "Programs" web page) for help on creating arrays that are either local or global variables. These two choices should be separate executables.
|
|||||||||||||||
ImplementationYou can use any sorting algorithm you'd like. Bubble sort, insertion sort, and quicksort are all given in the CSC 160 textbook or you can google them. Please implement the following functions:
You can implement other functions as well, if you want to make your program easier to understand and follow. Again, for your sanity, write program #2 one section at a time. Get one function working, then move onto the next. For example:
You can implement your program in one large file or separate files.
|
|||||||||||||||
LogisticsHey, all this stuff is the same as Program #1. Please place your completed code in the k: drive. This should include:
You must comment your code. Uncommented programs will face fierce and heavy penalties. Tell me what each block of assembly code is meant to accomplish. Also, please use meaningful names for labels, so that your code is easier to follow. Of course, programs that don't even compile will face a very difficult judgment as well.
|