CS611
Programming Assignment 2
Spring 1999


Implement bubble sort and quicksort using Alpha assembly language.

C implementations of these functions are provided in ~cs611/public/prog2. Also there is a main program provided that is a test rigging for testing both sorts. It randomly generates data to be sorted, calls a sort and checks the results. In addition there is a Makefile for building an executable from the C code.

You must use the C code as a specification for what your Alpha assembly language should do. The same algorithms must be used. In particular, quicksort should call bubble sort for small lists.

This means you should implement and test bubble sort first. A correct implementation of bubble sort will be worth 70% of the points for this assignment. A correct implementation of quicksort will be worth an additional 30%.

Your program will be graded primarily by testing it for correct functionality. However, you may lose points if your program is not properly structured or adequately documented. Remember that with an assembler program documentation is even more important than with C programs.

Put your implementation of bubble sort in the file bsort.s. Put your implementation of quicksort in the file qsort.s. Modify the distributed Makefile to build an executable using your Alpha assembly source code.

Your code should be submitted for grading from alberti (or hopper or christa). To turn in this assignment, type:
~cs611/bin/submit prog2 bsort.s qsort.s

Do not turn in any non-Ascii files (i.e. no object files, no executable files, etc.).

Submissions can be checked by typing:
~cs611/bin/scheck prog2

To receive full credit for the assignment, you must turn in your files prior to 8am on Monday February 15. Late submissions will be accepted at the penalty of 5% per day up to one week late.

Remember: as always you are expected to do your own work on this assignment.


Last modified on January 26, 1999.

Comments and questions should be directed to pjh@cs.unh.edu