Assignment 11, due Apr 13
Part of
the homework for 22C:60 (CS:2630), Spring 2012
|
On every assignment, write your name legibly as it appears on your University ID card! Homework is due on paper at the start of class on the day indicated (usually Friday). 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!
a) Why does the code use LOAD R4,PKBD instead of LIL R4,#FF100000? (0.4 points)
b) Rewrite the code of KBDGET so that it calls an external subroutine called BEEP whenever there is a read error from the keyboard. In the event of a read error, it should still return the character it read. The requirement to call BEEP does not change this basic requirement. Presumably, BEEP causes some kind of audible alert so that a touch typist will be warned of a potential error. (Note: This problem is as much about activation records and local variables as it is about I/O). (0.6 points)
A Question: The second figure implements the behavior of the circuit shown in the first figure, but they are not the same! In the first figure, the Q output of the master stage is ignored by the slave stage, while in the second, the corresponding output is not ignored. This change involves an optimization. What was saved by using the Q output of the master stage? (0.4 points)