CS611
Spring 2003
Programming Assignment 4
Due Sunday April 6


Write an IAS function, fpadd, to emulate IEEE 32-bit (single-precision) floating-point addition.

The fpadd function will be passed two IAS words. Assume that the two IEEE 32-bit values are stored in the low-order 32 bits of the two IAS words. The function should return a 32-bit value that should be the same as what is produced by IEEE floating-point hardware when given the same inputs. However, the function does not need to handle NaN, infinity or de-normalized inputs or outputs. Also, the function does not need to use the IEEE rounding algorithm. Instead it may simply truncate the result of the addition. The result value should be returned in the low-order 32 bits of a 40-bit IAS value.

You should use the IAS calling conventions discussed in class. These conventions are documented and illustrated in a sample main function available in ~cs611/public/prog4/main.asm. This file also describes how to use the IAS linker to combine a main function and the fpadd function.

Note: Your fpadd function should work with any main program that uses the calling conventions. The sample main function is just that, a sample. A different main function may be used for grading!

Grading will be based upon completed, correct functionality:

Your program will be graded primarily by testing it for correct functionality. However, good program structure and documentation is absolutely critical for assembly language programs. Therefore, you may lose points if your program is not properly structured or adequately documented.

Put your IAS code in a file called fpadd.asm.

Your assignment should be submitted for grading from a CIS Linux machine (e.g. turing.unh.edu). To turn in this assignment, type:
~cs611/bin/submit prog4 fpadd.asm

Do not turn in any other files!

Submissions can be checked from a CIS Linux machine by typing:
~cs611/bin/scheck prog4

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

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


Last modified on March 9, 2003.

Comments and questions should be directed to hatcher@unh.edu