
Best of Show: PDP-7 and PDP-11/40 emulation - wscott
https://www.ioccc.org/2018/mills/hint.html
======
wscott
Here is the C program:
[https://www.ioccc.org/2018/mills/prog.c](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.

~~~
wscott
For context, this is from _The International Obfuscated C Code Contest_
[https://www.ioccc.org/](https://www.ioccc.org/)

~~~
szc
Also, the 26th IOCCC has now started, if you are inspired!

[ Submitted as news:
[https://news.ycombinator.com/item?id=18764925](https://news.ycombinator.com/item?id=18764925)
]

------
jhallenworld
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](https://www.fourmilab.ch/babbage/emulator.html)

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

~~~
beagle3
Dolphin runs Wii. Code, Xenia does XBox360 - but the future for XBoxOne
emulation looks bleak.

------
jsolson
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.

~~~
wscott
The program would be impressive if it was clearly written and commented.

~~~
bitofhope
The contest is about obfuscated C. Clearly written or not, I'm impressed.

------
nickjj
If anyone wants to mess around with a PDP-11 simulator, you can get it up and
running with Docker in 1 command.

Details are at: [https://nickjanetakis.com/blog/run-the-first-edition-of-
unix...](https://nickjanetakis.com/blog/run-the-first-edition-of-
unix-1972-with-docker)

------
macjohnmcc
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.

~~~
tacon
All the old DEC manuals are online. For example, the PDP-11/40 system manual:

[http://bitsavers.informatik.uni-
stuttgart.de/pdf/dec/pdp11/1...](http://bitsavers.informatik.uni-
stuttgart.de/pdf/dec/pdp11/1140/DEC-11-H40SA-A-D_PDP-11_40_System_manual.pdf)

------
kevinwang
Can anyone explain the background of this for a youngin like me whose first
computer was Windows XP?

------
userbinator
_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...

------
kristopolous
Where do people like this exist and how can I hire them? Really...

------
meatsock
typo: "Thompson re-wrote a filesystem emulation he had been experementing
with" should be experimenting

------
ncmncm
This is the best thing I have read this year. I expect I will still be able to
say that next month.

