Project #4
(Due 6 December 2005)
A file named realnumbers.txt contains a lot of floating point numbers, each with a whole number and fractional part. The numbers may be positive or negative; but all have a decimal point and at least one digit on either side of it. Some lines have a single number; some lines have several with one or more spaces between each two numbers. The number of values in this file is not known; however, the file contains fewer than 30,000 bytes.
You are to write a MIPS assembly language program that reads a file such as realnumbers.txt and displays several items of information about the values in it:
Your program should prompt for the
file name and then open whatever file is specified. In this way,
you can create your own small file of numbers to test your program on.
When you test-run the program, enter your sample data file name.
When you get the program working, then run it and enter realnumbers.txt
as the file name.
You can get a copy of realnumbers.txt from the I:\ drive at I:\jlwolfe\300\fall05\realnumbers.txt or from the P:\ drive at P:\courses\fall05\cosc\cosc300\001\information\realnumbers.txt or from WebCT under Class Handouts, Project #4
Hand in a printout of your well-documented
program and a printout of the program's output. Capture the output
in the log file, paste the register section and console section into a
Notepad file and print it. You can also use Notepad to print the
program. Make sure the printout does NOT have lines that wrap.
It is nearly impossible to read an assembly language listing which is full
of wrapped lines. Also, copy your .s file to the handin folder on
the P: drive. You should name the file after yourself before copying
to the handin folder.