Assignment 5
CSC 314
Due: Wednesday Nov 26, 2003
Turn in:
- Printed program listing
- source code listings
- include sufficient comments to make the code easily understood
- code should be well-structured and organized - don't jump all
around
- sufficient sample runs to demonstrate correctness
- Programming-Style Requirements - Same as usual
- Print-out/Submission Requirements - Same as usual
Peer Review:
- Get together with someone from the other side of the class. Exchange
programs in electronic form. Evaluate that assignment.
- Write your scores on the grade sheet on Monday December 2.
Floating-Point Output - loosely defined
Purpose: Develop a function to print out 32-bit floating point valuesBasic description: Floating point numbers will be stored in the
standard 32-bit representation (standard format as described in class).
Some details:
- write a function - not just a long main program
- use a well-defined interface : how do you get the information in to the
function and back from the function
- WriteFloat32 : a good name for the function
- Output Options
- WriteFloat32F : 123.45
- WriteFloat32E : 1.2345E2 or 1.2345 x
10^2
Test Case:
- Write a program to compute the following value
- x := 3.25
- y := 1.234
- w := 0.000088
- v := 700000
- z := (x+y) * (x-y)
- Output the values for v, w, x, y, and z upon completion
- The program/operations should match that of the above expression as much
as possible (order of operation, ...)
Bonus : do both output options:
- Print the number is scientific/exponential notation as well as the
"normal" decimal notation
More Bonus : interface with C++:
- Interface with C++ to do the I/O
- The computation is still done in ASM
- Using a procedure, modules, and parameter passing will be worth more
points
Please ask questions in class as needed to discover the other details you
will need to allow you to successfully complete this program.