4 ms·
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 kno
by wscott 8y ago
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 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.