Assignment 12, due Dec 5
Part of
the homework for CS:2630, Fall 2019
|
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper in discussion section on Thursday. Some parts of assignments may be submitted on-line and completed in discussion section. Exceptions will be made only by advance arrangement (excepting "acts of God"). Late work must be turned in to the TA's mailbox (ask the CS receptionist in 14 MLH for help). Never push homework under someone's door!
Recall that a trap handler has the following outline, given in more detail in Section 13.3 of the Hawk manual (but with one error):
This question deals with the middle segment, step 2 above.
a) Suppose we wanted a trap handler to convert all undefined Hawk instructions to short (16-bit) no-op instructions. Give the shortest possible code to replace the code given in the hawk manual for step 2. (0.5 points)
b) Give the smallest possible code that you could add to part a) above that makes all of the unimplemented instructions set the condition codes to the unlikely value 1100 (both negative and zero at the same time) before returning, while making no other changes to the PSW. (0.5 points)
c) Find and correct the error in the code given in Section 13.3 of the Hawk manual. (0.5 points)
a) Why is it necessary that it be possible to turn off cacheing for some particular page of memory? (Hint: The reason is related to exercise c in Chapter 14.) (0.5 points)
b) For what range of addresses in the Hawk memory address space is it particularly likely that cacheing will be turned off? (Hint: This is a global question that integrates information from a wide range of different parts of this course.) (0.5 points)