© D. Thiebaut

Figure 1: A simple printer port. (Click on image for a larger, clearer version)
Figure 1 above shows a simple implementation for a parallel printer port. This interface is slightly different from the one we have used in lab and class - there are two decoders for the address decoding and for generating the D flip-flop clock input.
Your assignment is to write a program in assembly for this interface, i.e. a device driver of sorts. Your program should send all the letters of the alphabet to the printer.
The top flip-flop is a D-flip-flop whose output, Strobe, is a signal sent to the printer to indicate that a character is available for printing. The D input of this flip-flop is connected to the D0 signal of the Data Bus.
The lower group contains 8 flip-flops. These flip-flops have their D inputs connected to each of the 8 data bits of the Data Bus. The Q outputs are sent to the printer. This is how the printer gets the ASCII code of the character to be printed. The 8 flip-flops have a common clock signal which is connected to the Y1 output of the 1-to-2 decoder.
When the computer sends a byte to the printer, it follows the following protocol:
Your program should contain the assembly code and be well commented (being sure, for example, to indicate addressing mode, where necessary).
Make sure you explain how you implement the 10ms and 5ms delays. Note that the delays are the minimum delays required. In other words, the printer will not work properly if the processor waits less than the specified intervals. Waiting longer, however, is fine, but we want to insure fast data transfer, and implement delays that are as close to the 10 and 5 ms as possible.
What is the maximum printing speed of this computer/printer setup? In other words, What is the maximum number of characters printed per second using this method? Be precise. Saying that the speed is 1sec/(10ms+5ms) is not accurate enough! You need to specify the number of characters that can be printed each second.