http://invisible-island.net/personal/oldprogs/
Copyright © 2012-2020,2021 by Thomas E. Dickey


A printer utility that I (re)wrote

During the first several years of programming, I used (of course) programs written by different companies including IBM, Univac, DEC, as well as a few written by knowledgeable university staff. But it was rare to to use programs written by my immediate associates.

That changed in the fall of 1977.

I was developing a complicated set of programs (more than a dozen, totaling about 75,000 lines) on a PDP-11 minicomputer for my research project. At the end of each weekend (this was not a personal computer), I would print the programs that I had modified, and review them during the week. This was only possible because the research grant that had purchased the minicomputers had also bought a line printer. While it was possible to print on a terminal, the line printer was much faster:

However, an unrelated group began setting up a Unix system on a PDP 11/34. Deciding that they had better use for the printer, they took it away (actually its cabling), and made no provision for its use by the researchers.

After several months of heated discussion, the new “owner” of the printer offered to

I agreed to the former. None of my programs would have been portable to the Unix system, and it was a distraction. There was a catch however: this was a trade, rather than a gift. In return for the working printer program, I provided these people with a copy of the cross-assemblers and microprocessor simulators which I had developed over the previous two and a half years.

But on reviewing the code I found the result to be unacceptably poor quality (a “D” on anyone's grading scale). I recall that the RT-11 side had 219 lines (of assembler), made no error checks, and had two comments. One said ^O and the other said ^C.

The author of this code (technically a resident of a third lab) said in so many words, “take it or leave it”. I did neither, using the program as a reference wrote my own, filling in the missing documentation and logic.

In the rewrite I made fixes (including stripping the parity bit) based on reading the technical description of the serial interface (e.g., the DL11 asynchronous line interface manual). Months later, the original version of the program stopped working due to someone's having changed the line parity sense via the driver on the Unix side. But I continued using that printer with the rewritten driver for at least two more years.

Incidentally, I found time to read the Unix manuals (many copies were printed and discarded), and course notes (in particular—seeing bugs in implementations of FIFOs—realized there was nothing to learn in those courses).

Using the printer utility

A recent (2020) encounter with Clem Cole reminded me that there was more to the story than simply rewriting a program. In the TUHS wiki he comments on this period, but has the wrong year (1976 rather than 1977):

In the fall of 1976 (I believe), Ted Kowalski shows up for his OYOC year in the EE dept after his summer at Bell Labs, and graduating U Michigan (he was once Bill Joy's housemate at Michigan in a strange twist of fate). He brought with him some stuff, including a photocopy of what would become K&R and copy of phototypesetter C, and a copy of UNIX/TS. He also brought his cool (but unfinished) program he had started to write originally at U Mich – fsck. [Hacking on fsck under the tutorial guidance of tjk was my first real introduction into UNIX file system internals]

Ted brought back to AT&T the 11/34 support and eventually 11/34A and RK07 support that Dan and I would later do. He also spoke of the upcoming 7th edition. Ted wanted to get the 34 support added back into the main line at AT&T, because it was clear that was going to be system most people bought from then on. We keep asking when it was going to be released. While CMU was not the first V7 licensee, thanks to Ted, we were very early.

Before Kowalski came into the picture, I happened to be talking to Gary Leive and Don Thomas one evening in the lab (e.g., at the beginning of the 1977-1978 term). They said that they would be bringing in a Unix system (which I would later read about — in 1978 — since the R&D Center had the BSTJ issues discussing it). I asked if this was something that was being brought over from the Computer Science department. Their reply was that no, it was actually part of some larger activity starting in the school of architecture, which had been running Unix on several machines for some time, and that the Electrical Engineering department's PDP-11/34 was being acquired within that activity.

That was when we made the initial agreement for access to the printer in return for a copy of the programs I had been developing. Don Thomas mentioned that there was a student who would be using the Unix system and would be able to use that work. That would not have been Ted Kowalski, but someone else. Clem Cole may know.

However, that wiki entry needs some attention. At the beginning of the page, it says that the EE department had PDP-11/20s. Actually it had an 11/20 and an 11/40. The latter ran RT-11 (and when Ted Elkind was around, RSX-11), while the other ran only CAPS-11 (a tape cassette system).

I used both of those machines from the time they were first set up, but for a few years (mid-1976 to April 1979) also used a PDP-11/40 belonging to the Mechanical Engineering department. That was an informal arrangement, where I helped to maintain the computer in return for using it over the weekends. That part came to an end when the machine needed a new power supply. After some work I resumed just using the EE department's 11/40 which had been relegated to an garret. That went on until late in 1980 (or early 1981), when someone sold the machine to a local company.

Back to the story.

Ted Kowalski worked on weekends, e.g., to do builds. A few people would hang around to talk, but he was the one doing development.

One Sunday evening, I printed my program and found a problem with the printer:

I discussed this with someone in the lab,

After an hour or so, I was able to use the printer again.