login join help ad

May 19, 2020

Memoir 2 - booting DEMOS 2.2 on DVK-3

My first PC was a Soviet LSI-11 compatible, based on a DVK-3 motherboard in an Electronika-60 chassis with a transformer-based power supply. It had 256KB of RAM. I managed to find a controller of MFM winchester and a Seagate ST-20 20MB hard drive. So, it was capable of running UNIX.

I went to Demos and got a distributive of their UNIX. It was based on v7, but with many features of BSD 2.9 grafted in. Unfortunately, the bootstrap procedure crashed on my machine.

I cannot remember how I did it, but I identified the problem: the DVK-3 CPU did not implement the MFPS instruction, but the kernel identified it as a certain model of PDP-11, and assumed that it had to have the MFPS. I might have used my low-level debugger for it.

By that time Demos already was phasing out the obsolete stuff and there was no chance to get a new distributive composed for a free-loader. In order to fix the crash, I went a long way. Using Mark Vengerov's C under MISS on ES-1011, I ported ld(1). Then, I used Vadim "avg" Antonov's portable assembler (it was an unbelievable luck that he wrote that in the first place; his objective was speed - it worked many times faster than original UNIX v7 assembler written in assembly). Finally, I literally ported K&R C under MISS, with the output into avg's assembler and the aforementioned ld(1). It turned out that the compiler was absolutely full of endian assumptions, and Mitra-225/ES-1011 was big-endian. I fixed them all. And finally, I used the toolchain that I built to cross-compile the DEMOS' bootstrap loader and kernel. Then, I wrote it to a distribution floppy.

It all worked in the end. Now that I'm writing all this, it boggles the mind that I was able to pull it off. I was too young to know what was impossible back then.

UNIX in 256KB sucked though. And it was entirely useless. I was very happy to replace it with an IBM PC in a year or two.

Next: Memoir 3.

Posted by: Pete Zaitcev at 06:44 PM | No Comments | Add Comment
Post contains 354 words, total size 2 kb.




What colour is a green orange?




9kb generated in CPU 0.02, elapsed 0.0414 seconds.
25 queries taking 0.0292 seconds, 30 records returned.
Powered by Minx 1.1.6c-pink.