用 UNIX 7ed 中的 cc 編譯和執行 C 語言的程式：
Turn your PC into a PDP-11 running Seventh Edition UNIX. This way you can run UNIX just like Dennis Ritchie and Ken Thompson did back in 1979. This is a sanos port of Bob Supnik’s PDP-11 simulator. I have made an ISO image with sanos, the PDP-11 simulator, and the UNIX V7 kit from The Computer History Simulation Project. Just put the CD-ROM in your PC and boot. Then your PC is turned into a PDP-11 running UNIX V7! This is great fun if you’re a nostalgic UNIX geek.
If your want to try the UNIX V7 demo first download and unzip the ISO image. You can burn this image to a CD-ROM using your favorite CD-burner program and then boot the computer from the CD-ROM. You can also try it out using VMware by setting pdp11.iso as the ISO image for the CD-ROM device. You can get the source I have used to build the image here.
When you boot from the CD-ROM, sanos boots and starts the PDP-11 simulator. The simulator then boots UNIX V7 from the image.
- At the boot prompt type: b
- At the @ prompt type: boot<enter>
- At the : prompt type: rl(0,0)rl2unix<enter>
- At the # prompt type <ctrl-d>
- Login as root with password root
12345678910111213141516171819202122232425 KDF11B-BH ROM V0.9512KB MEMORY9 STEP MEMORY TESTSTEP 1 2 3 4 5 6 7 8 9TOTAL MEMORY ERRORS = 0CLOCK ENABLEDType ? for HELPEnter one of [Boot, Diagnose, Help, List, Map]:bTRYING UNIT DL0BOOTING FROM DL0@bootNew boot, known devices are hp ht rk rl rp tm vt:rl(0,0)rl2unixmem = 177856# Restricted rights: Use, duplication, or disclosuresis subject to restrictions stated in your contract withWestern Electric Company, Inc.Thu Sep 22 19:44:08 EDT 1988login: rootPassword:#
Your UNIX V7 system is now up and running. You can use your ordinary UNIX commands like cat, ls, man, etc.
You can try to compile and run a simple C program:
1234 # cd /usr/src# cat hello.c# cc -o hello hello.c# hello