“lp11” is a seven word structure defined beginning at line 8829. The first three words of the structure in fact constitute a structure of type “clist” (7908). Only the first element is explicitly manipulated in “lp.c”. The next two are used implicitly by “putc” and “getc”.
“flag” is the fourth element of the structure. The remaining three elements are
“mcc” |
maximum character count |
“ccc” |
current character count |
“mlc” |
maximum line count |
The line printer controller has two registers on the UNIBUS.
Line Printer Status Register (“lpsr”)
Set when an error condition exists (see above);
Set when the printer controller is ready to receive the next character;
Set to allow “DONE” or “Error” to cause an interrupt;
Line Printer Data Buffer Register (“lpbuf”)
Bits 6 through 0 hold the seven bit ASCII code for the character to be printed. This register is “write only”.
Set the “enable interrupts” bit in the line printer status register;
Send a “form feed” (or “new page”) character to the printer, to ensure that characters which follow will start on a new page. (As already noted above, at this stage we are ignoring “lpcanon” and assuming line 8859 to be simply “lpoutput (FORM)”. “lpcanon” does things like suppressing all but the first “form feed” in a string of “form feed”s and “new line”s, to avoid wasting paper.);