PDP-8 Assembly Language

From AboveTheGarage

Jump to: navigation, search

The Newport-Mesa Unified School District received a PDP-8 computer donated (so I was told) by Digital Equipment Corporation (DEC).

When I was in fifth grade the PDP-8 ran some kind of time-shared Basic.

Later, when I was in junior high school and high school, the system was enlarged and ran "TSS/8", perhaps the most ingenious time sharing system ever made.

And you could program it in assembler!

The entire system ran 16k bytes of memory - four 4k banks. The first two banks, 0 and 1, held the timesharing code. The other two banks, 2 and 3, ran user programs.

While code was running in one of the user banks, the system could swap a new user into the other bank. So it was a huge advantage to have two user banks as that hid a lot of the swapping.

I think the 16 user limit was the number of phone lines connected. It also had a righteous DECtape drive.

I spent every waking hour thinking about how to program this thing.

My parents were not pleased.

(Recently, Steve Gibson, of Spinrite fame, has been playing with his new PDP-8's, if you want to know more about them.)

Talk about obsessive behavior. There was an awesome book called Introduction to Programming that taught you everything you needed to know. We had three (THREE!) teletypes at my high school in the "math lab", which was literally across the street from my house. I could walk over there anytime I could sneak away from home. On the weekends I would get the janitor to let me in. If the machine had crashed I would call someone up and hassle them into rebooting it. (It was located at the school district's offices.)

I wrote a lot of small programs and I spent a lot of time hacking - trying to get around operating system restrictions.

The program that I spent - by far - the most time on was a program that let a person watch what another person typed on their teletype. It did this by examining the input buffers in the "Monitor" as the OS was called. A person named WEF, who was a sys admin when I was in junior high, somehow put me onto this problem. He spent endless hours on the phone trying to explain to me how the OS worked - he had the source code! WEF had never been able to get this 'spy' program to work. It took me two years before I finally understood that I was facing a concurrent programming problem. I could 'peek' one 12-bit word at a time from the OS and of course, duh, now we know that between peeks the data structures were changing on the fly. But after much pain and suffering I finally got it to work. Depending on the system load, of course, I might be swapped out at key moments, and so I might miss a few characters here and there. But it worked! And I showed it to WEF just before he graduated from high school and ... he was mightily impressed! I was so pleased.

I wrote a little language called SL1 (String Language 1) and implemented the Eliza Doctor program in it.

I wrote little programs where I would type in a message on the teletype and it would output my message, using my own font(!), as hole punches on the paper tape output of the teletype.

Another huge effort was spent on a DECtape file system that I cowrote with Paul Edelstein. This thing was so cool! I wrote the basic directory handling including the bitmaps for which blocks held the files. The DECTape could only do things so quickly and so you needed to write a block with at least seven other blocks in between, and so the layout could get fragmented after awhile. But that was handled well. It was really a big deal to be able to back up your code onto the DECTape in a user friendly format.

I wish I had the source code to these things still.

Finally, when I was a junior in high school, I had exhausted what the machine could do, so I stopped programming for a couple of years and taught myself to play Piano.

But then, at college, it was all-programming, all the time. w00t.

Personal tools