22.11 PC-11 Paper Tape Reader/Punch Driver

This driver is to be found in the file “pc.c” on Sheets 86, 87. It is simpler than the line printer driver in that there is ro routine analogous to “lpcanon”. However it is more complicated in that there is both an input and an output device which can be simultaneously and independently active.

A description of the operation of this device is inciuded in the document “The UNIX I/O System” by D. Ritchie. Certain special features may be noted:

(1)

Only one process may open the file for reading at a time, but there is no limit on the nmber of writers;

(2)

This routine pays a little more attention to error conditions than the line printer driver, but the treatment is still not exhaustive;

(3)

“passc” (8695) knows how many characters are required and returns a negative valie when “enough” is reached;

(4)

“pcclose” is careful to flush out any remaining characters in the input queue if and only if it believes the device was opened for input.