Machine Problem 6, due December 8

Part of the homework for 22C:60, Fall 2008
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

Submit the source file mp6.a (or mp6.txt if you must) for your solution to ICON on or before the indicated date.

The Problem

Our Hawk emulator has no floating point coprocessor, and the COSET and COGET instructions are unimplemented. Write an unimplemented instruction trap handler that identifies these instructions and implements the semantics of COSET and COGET correctly for loading and storing FPA0 and FPA1 in single precision mode. Your trap handler may have undefined behavior for all floating point operations other than simply setting and getting FPA0 and FPA1.

NOTE ADDED LATER Note that the COSET and COGET instructions are defined in hawk.macs, as are the identifiers FPA0 and FPA1. This should help you in testing.

The code in mp6.a will contain just the trap handler, and nothing else. If you assemble it, to produce mp6.o, you can test it by linking it with a main program that uses the COSET and COGET instructions, even though your program defines no EXT or INT symbols. When you submit your code, we will link it with our test program to test it.

Your code will probably have this top-level structure:

LCSAVE  =       .
.       =       #20
; undefined instruction trap entry in trap vector
   ... some of your code ...

.       =       LCSAVE
; the start of the rest of your code