29 comments

[ 0.25 ms ] story [ 49.8 ms ] thread
Here is the C program: https://www.ioccc.org/2018/mills/prog.c It is a PDP-7 emulator that can boot the most ancient known snapshot of Unix. This is running Unix from 1969 where the compiler is 'bc' (no 'cc' yet) then, he wrote a PDP-11 emulator in PDP-7 assembly and uses the PDP-7 to emulate a PDP-11 to boot BSD 2.9.
Hmm, seems neither current gcc nor clang can compile this even with -ansi or -std=c89
The submission has a Makefile that works fine for me. It needs several things defined by -D for configuration options for the emulator.

https://www.ioccc.org/2018/mills/

In my case it exits the shell upon loading ./v6. I compiled it with gcc 4.2 under OpenBSD 6.4. In happens the same with clang6.
IOCCC Judge here:

If you are using an xterm, you might try using "xterm -hold".

It seems that the termios structure is getting (re)set with some invalid values and some systems (one report from NetBSD) cause the terminal / shell to abort. We are figuring out how to do an update to fix this issue.

I laughed out loud when I got to the part about the PDP-11 emulation being written to run on the emulated PDP-7. That cranks up the hack value to 11.
The Turducken of software.
It's not a true turducken until someone takes the author up on their suggestion to in turn emulate a VAX 780 on top the PDP-11/40 here.
Turduckens+ all the way down...

+A recursively structured arrangement of Turing Machines.

This is amazing.

Make sure to view it on a sufficiently wide browser to see the ASCII art of a torn piece of punched paper tape.

The program would be impressive if it was clearly written and commented.
The contest is about obfuscated C. Clearly written or not, I'm impressed.
(comment deleted)
The binary on the paper tape seems to be ascii (with a parity bit) reading "pdp-7emu.s".
We are in the strange situation with these emulators that all code ever written can be executed today, no problem. Have some Fortran-II code for the IBM 1401? No problem. Want to run some Analytical Engine code (a machine that couldn't even be constructed)? No problem:

https://www.fourmilab.ch/babbage/emulator.html

Can you really say that this early code is obsolete? I think not, it's just different.

That Turing guy was on to something..
Dolphin runs Wii. Code, Xenia does XBox360 - but the future for XBoxOne emulation looks bleak.
Eh the new consoles use x86 pc parts. The xbone even runs a windows kernel. It would be less emulation and more just figuring out the supporting software. This is also the case with the original xbox. It's been hard to get working because it uses proprietary nvidia drivers and some weird version of windows 2000.
typo: "Thompson re-wrote a filesystem emulation he had been experementing with" should be experimenting
Way back in the early 80's when I was in high school I had an off campus class where I took a course on PDP-11 assembly language. Sadly we had to run our code in a PDP-11 emulator on a DEC System 10 and it was incredibly slow but I do remember how much I liked the PDP-11 instruction set. I wish I had kept the book from the class.
The short version is we have gone so far back in the history of UNIX that we don’t have filesystem paths yet.

Incidentally, the same was true of MS-DOS: no paths in version 1, only drive letters; directories and paths were introduced in version 2. However, early UNIX doesn't seem to have drive letters...

This is the best thing I have read this year. I expect I will still be able to say that next month.
Where do people like this exist and how can I hire them? Really...
Can anyone explain the background of this for a youngin like me whose first computer was Windows XP?