Assignment 11, due Apr 29

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

Always, on every assignment, please write your name legibly as it appears on your University ID and on the class list! All assignments will be due at the start of class on the day indicated, and unless there is what insurance companies call "an act of God" - something outside your control; the only exceptions to this rule will be by advance arrangement.

  1. The Hawk instruction set contains seven undefined opcodes. The Hawk also has several dozen instructions where one or more fields of the instruction must be nonzero, please ignore them and list just the seven undefined instructions. (0.5 points)

  2. Write code to fit into a trap handler built along the lines given in Section 9.3 of the Hawk manual. That is, your code should be in the form of a subroutine that is called with its return address in R3 (not R1!, and with R1 pointing to the register save area.) Your code should assume that it was called as a result of an illegal instruction trap, and it should act as follows: If the opcode is 080x16 it should clear registers from Rx (the register specified by the bottom 4 bits of the instruction word) up to R15, inclusive. Otherwise, it should treat the undefined instruciton as a no-op. If you were to install this code into the Hawk monitor, you would create a virtual machine that implements the Hawk instruction set augmented with this new instruction to zero registers. (1.5 points)

  3. From chapter 13, do problems c and e. (0.5 points each).