5 ms·
Best of Show: PDP-7 and PDP-11/40 emulation
- wscott 8y agoHere 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 8y agoFor context, this is from The International Obfuscated C Code Contest https://www.ioccc.org/ https://www.ioccc.org/
- szc 8y agoAlso, 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 ]
- spacenick88 8y agoHmm, seems neither current gcc nor clang can compile this even with -ansi or -std=c89
- racingmars 8y agoThe 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/ https://www.ioccc.org/2018/mills/
- spacenick88 8y agoAhh thanks!
- anthk 8y agoIn 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.
- szc 8y agoIOCCC 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.
- flyinghamster 8y agoI 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.
- dboreham 8y agoThe Turducken of software.
- WorldMaker 8y agoIt'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.
- dboreham 8y agoTurduckens+ all the way down... +A recursively structured arrangement of Turing Machines.
- jsolson 8y agoThis 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 8y agoThe program would be impressive if it was clearly written and commented.
- bitofhope 8y agoThe contest is about obfuscated C. Clearly written or not, I'm impressed.
- deleted 8y ago[deleted]
- a1369209993 8y agoThe binary on the paper tape seems to be ascii (with a parity bit) reading "pdp-7emu.s".
- jhallenworld 8y agoWe 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.
- dboreham 8y agoThat Turing guy was on to something..
- beagle3 8y agoDolphin runs Wii. Code, Xenia does XBox360 - but the future for XBoxOne emulation looks bleak.
- robdachshund 8y agoEh 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.
- meatsock 8y agotypo: "Thompson re-wrote a filesystem emulation he had been experementing with" should be experimenting
- macjohnmcc 8y agoWay 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 8y agoAll the old DEC manuals are online. For example, the PDP-11/40 system manual: http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp11/1140/DEC-11-H40SA-A-D_PDP-11_40_System_manual.pdf http://bitsavers.informatik.uni-stuttgart.de/pdf/dec/pdp11/1...
- userbinator 8y agoThe 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...
- ncmncm 8y agoThis is the best thing I have read this year. I expect I will still be able to say that next month.
- nickjj 8y agoIf 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-1972-with-docker https://nickjanetakis.com/blog/run-the-first-edition-of-unix...
- kristopolous 8y agoWhere do people like this exist and how can I hire them? Really...
- kevinwang 8y agoCan anyone explain the background of this for a youngin like me whose first computer was Windows XP?