[TUHS] LSX on the PDP-11/03 (LSI-11)

Paul Ruizendaal pnr at planet.nl
Sun May 31 23:50:11 AEST 2020

> I've stumbled across LSX, and I have it running on SimH. I'm quite inexperienced with Unix, but it's something I want to learn well, having brushed against it at university in the '80s, and having played with Linux somewhat.

I think you will experience a sizeable learning curve. You will be working with Unix and C as it stood around 1975 and that is substantially different from what it was in the 80’s. That said, I know from personal experience that it is an intriguing journey and certainly not impossible to do.

> Some help would be nice, but more generally, is anyone on this list more than vaguely familiar with LSX, or 6th Edition itself?

Many on this list are familiar with 6th edition. The best way to learn the internals of 6th edition is the “Lions’ book”:

Coming from today’s perspective (or a 1980’s one), you will find the following key challenges:

- The version of C used for 6th edition is different from the 1980’s. Amongst other things the syntax of the assignment operators changed (not += but =+), the syntax for initialisation changed (not 'int a = 3', but 'int a 3’), the ‘long’ datatype (32 bit on a PDP-11) did not exist, the ‘void’ keyword did not exist, structs could not be assigned, passed or returned (only pointers to structs), etc.

- The stdio library did not exist yet, in its place there was the ‘portable i/o library’. This may be the hardest part to get used to.

- The file system was 16-bit based throughout. This has implications for stat(), lseek() did not exist (its precursor seek() used additional whence values to move the file pointer in 512 byte increments), etc.

When it comes to LSX, there are a few people who have experience with it on the this list (that I know of - there may be many more).

First of all, Heinz Lycklama, the original creator of LSX, appears to read this list from time to time.

Second, Leonid Broukhis and Serge Vakulenko (who managed to recover the LSX sources 20 years ago) might be reading the list. They took the trouble to port LSX to the Soviet BK-0010 computer, an LSI-11 type system some 15 years ago:
You can stand on their shoulders, as they already took the trouble to convert the kernel source from 1975 C to 1980’s C and to create a stdio compatible library for it; they are using the 2.11BSD C compiler, which generates tighter code than the 1975 compiler — hence they could squeeze a bit more functionality in.

Third, I found the BK-0010 port some 5 years ago and used that as base to create a version that would run on a small TI990 clone:
This work later evolved into a stock 6th edition kernel and is now a curious mix of stuff dating from 1975 to 1985.

Your main challenge will be that neither the BK-0010 work nor my work will run on your hardware as-is. I think you have two possible paths forward. The first is to learn C and the library as it stood in 1975, the second is to take the BK-0010 code and to make it run on a stock LSI-11 again.

More information about the TUHS mailing list