Assignment 6
New Skills need for this Assignment (quote from your assignment)
- Use of system I/O (exceptions) to open and read an input binary file (Nov 28/30 tutorials)
- Understanding and use of floating-point single and double formats (lecture)
- Use of floating-point instructions to do simple calculations (Nov 28/30 tutorials)
- Use of floating-point comparison instructions (Nov 28/30 tutorials)
Script
"Run your program using the input binary file supplied on D2L. Capture its execution using the script UNIX command, and name the output file script.txt."
I am not expecting any use of gdb for the A6 script. The below sections on gdb are for when you debug your program.
Command line arguments in gdb
In case anyone still hasn't tried this, you simply add command line arguments after "r" or "run".
gdb a6
r input.bin
Examining floating point numbers in gdb
// Registers
p/f$d0
display/f$d0
// Memory
x/wf <address> // examine a single (4 bytes) --- we are actually examining a word (4 bytes), and displaying with the f (float) format
x/gf <address> // examine a double (8 bytes) --- we are actually examing a giant word (8 bytes), and displaying with the f (float) format