Online / 5 & 6 February 2022

visit

A Venix/86 emulator

A step in recreating Venix/86 Sources


Venix/86 was the first commercially available Unix for the IBM PC. PC/IX was the first one that IBM supported, but VentureCom created released this port about the time PC/IX was announced. They ported it to a number of the 'near compatible' systems as well, so for many people the first Unix available on those early 8086/8088 machines was Venix. This included the DEC Rainbow 100B with Venix/86R.

A companion project to recreate the sources for Venix/86 from 7th edition tapes now available was hampered by the slow speed of the DEC Rainbow, so I wrote the emulator to seed that along.

This talk will be about the emulator's structure, system call interface and portability to other ancient 8088/8086 Unixes. It will also discuss how many of the early ports coped with lack of a MMU in clever ways. It will touch on the path here, and then focus on the current implementation.

The author had a DEC Rainbow which was supported with Venix/86R. By the time the author was employed post college, copies of it had become impossible to find.

Recently, A copy surfaced and I started working with it. A number of interesting challenges for creating this port will be discussed. I took the hard path to decompile parts of libc to discover the system call interface, and went through a few preliminary implementations of Venix/86 emulation before arriving at what we have today. After the initial decompile, documentation surfaced, other incomplete copies were found along with some source, all of which confirmed most of the details that had been guessed.

This has been a labor of love for me, using 4 different x86 emulators, a number of deep searches online to find as much info as I can, disassembly, etc. I'll touch on some of these aspects as well. It's currently running using vm86 on a FreeBSD/i386 bhyve instance hosted on a FreeBSD/amd64 machine nicely... A port to qemu user-* might be possible too.

This goes hand in hand with another project: recreate the sources that can create a Venix kernel using the now-available 7th Edition sources, which may be a future submission.

Speakers

Photo of Warner Losh Warner Losh

Links