Assignment 11, due Apr 13

Part of the homework for 22C:60 (CS:2630), Spring 2012
by Douglas W. Jones
THE UNIVERSITY OF IOWA Department of Computer Science

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!

  1. Background: Look at the Hawk code to read from the keyboard given in Chapter 12.

    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)

  2. A problem from the text: Do exercise d) from Chapter 12. (0.6 points)

  3. Background: Look at the section of Chapter 12 on building registers at the gate level. There are two figures there, one showing a negative-edge-triggered D master-slave flipflop, and the second showing the construction of the master-slave flipflop.

    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)

  4. Two problems from the text: Do exercises h) and o) from Chapter 12. (0.5 points each)