去http://sourceforge.net/projects/bsd42/files/Install tapes/Research Unix/Unix-v6-Ken-Wellsch.tap.bz2/download下載Unix-v6-Ken-Wellsch.tap.bz2,解壓後變成Unix-v6-Ken-Wellsch.tap:
socket
mv Unix-v6-Ken-Wellsch.tap dist.tap $ cat tboot.ini set cpu 11/40 set tm0 locked attach tm0 dist.tap attach rk0 rk0 attach rk1 rk1 attach rk2 rk2 d cpu 100000 012700 d cpu 100002 172526 d cpu 100004 010040 d cpu 100006 012740 d cpu 100010 060003 d cpu 100012 000777 g 100000
從磁帶機中啓動.net
$ pdp11 tboot.ini PDP-11 simulator V3.9-0 Disabling XQ RK: creating new file RK: creating new file RK: creating new file ^E Simulation stopped, PC: 100012 (BR 100012) sim> g 0 =tmrk disk offset 0 tape offset 100 count 1 =tmrk disk offset 1 tape offset 101 count 3999 =^E Simulation stopped, PC: 137300 (BGE 137274) sim> q Goodbye
生成磁盤啓動unix
$ vi dboot.ini $ cat dboot.ini set cpu 11/40 set tto 7b set tm0 locked attach tm0 dist.tap attach rk0 rk0 attach rk1 rk1 attach rk2 rk2 dep system sr 173030 boot rk0 $ pdp11 dboot.ini PDP-11 simulator V3.9-0 Disabling XQ @rkunix mem = 1035 RESTRICTED RIGHTS Use, duplication or disclosure is subject to restrictions stated in Contract with Western Electric Company, Inc. # STTY -LCASE # chdir /usr/sys/conf # cc mkconf.c # mv a.out mkconf # ./mkconf rk tm tc 8dc lp done # as m40.s # mv a.out m40.o # cc -c c.c # as l.s # ld -x a.out m40.o c.o ../lib1 ../lib2 # mv a.out /unix # ls -l /unix -rwxrwxrwx 1 root 30346 Oct 10 12:37 /unix # /etc/mknod /dev/rk0 b 0 0 # /etc/mknod /dev/rk1 b 0 1 # /etc/mknod /dev/rk2 b 0 2 # /etc/mknod /dev/mt0 b 3 0 # /etc/mknod /dev/tap0 b 4 0 # /etc/mknod /dev/rrk0 c 9 0 # /etc/mknod /dev/rrk1 c 9 1 # /etc/mknod /dev/rrk2 c 9 2 # /etc/mknod /dev/rmt0 c 12 0 # /etc/mknod /dev/lp0 c 2 0 # /etc/mknod /dev/tty0 c 3 0 # /etc/mknod /dev/tty1 c 3 1 # /etc/mknod /dev/tty2 c 3 2 # /etc/mknod /dev/tty3 c 3 3 # /etc/mknod /dev/tty4 c 3 4 # /etc/mknod /dev/tty5 c 3 5 # /etc/mknod /dev/tty6 c 3 6 # /etc/mknod /dev/tty7 c 3 7 # chmod 640 /dev/*rk* # chmod 640 /dev/*mt* # chmod 640 /dev/*tap* # dd if=/dev/mt0 of=/dev/rk1 count=4000 skip=4100 4000+0 records in 4000+0 records out # /etc/mount /dev/rk1 /usr/source # dd if=/dev/mt0 of=/dev/rk2 count=4000 skip=8100 4000+0 records in 4000+0 records out # mkdir /usr/doc # /etc/mount /dev/rk1 /usr/source mount: Mount device busy # /etc/mount /dev/rk2 /usr/doc # cat >> /etc/rc /etc/mount /dev/rk1 /usr/source /etc/mount /dev/rk2 /usr/doc # chdir /usr/source/s1 # ed df.c 1282 /rp0/d -2a "/dev/rk0", "/dev/rk1", . w 1297 q # cc -s -O df.c # cp a.out /bin/df # rm a.out # icheck /dev/rrk0 /dev/rrk0: spcl 22 files 294 large 96 direc 25 indir 96 used 2920 free 993 # dcheck /dev/rrk0 /dev/rrk0: # icheck /dev/rrk1 /dev/rrk1: spcl 0 files 595 large 98 direc 34 indir 98 used 2973 free 940 # dcheck /dev/rrk1 /dev/rrk1: # icheck /dev/rrk2 /dev/rrk2: bad freeblock missing 1499 spcl 0 files 337 large 69 direc 25 indir 69 used 2222 free 192 # dcheck /dev/rrk2 /dev/rrk2: # ed /etc/ttys 112 1,8s/^0/1/p 170 w 112 q # sync # sync # sync # synv synv: not found # sync # Simulation stopped, PC: 002502 (MOV (SP)+,177776) sim> q Goodbye
最後的啓動文件rest
$ cat boot.ini set cpu 11/40 set cpu idle set tto 7b set tm0 locked attach rk0 rk0 attach rk1 rk1 attach rk2 rk2 attach lpt printer.txt set dci en set dci lines=8 set dco 7b att dci 5555 boot rk0 $ pdp11 boot.ini PDP-11 simulator V3.9-0 Disabling XQ Listening on port 5555 (socket 8) @unix login: root # cat hello.c main() { printf("Hello World!\n"); } # cc -S hello.c # cat hello.s .globl _main .text _main: ~~main: jsr r5,csv mov $L2,(sp) jsr pc,*$_printf L1:jmp cret .globl .data L2:.byte 110,145,154,154,157,40,127,157,162,154,144,41,12,0 # as hello.s hello.s u 0005 u 0007 u 0008 # mv a.out hello.o ld hello.o ./lib/*.a .globl _main .text _main: ~~main: jsr r5,csv jbr L1 L2:mov $L4,(sp) jsr pc,*$_printf L3:jmp cret L1:jbr L2 .globl .data L4:.byte 110,145,154,154,157,40,127,157,162,154,144,41,12,0 # od -x a.out 0000000 000407 001160 000104 001022 000740 000000 000000 000001 0000020 170011 010600 011046 005720 010066 000002 004767 000010 0000040 010016 004737 001112 104401 004567 001070 012716 001160 0000060 004737 000050 000167 001072 004567 001050 162706 000176 0000100 016567 000004 001202 010504 062704 000006 117700 001170 0000120 001411 005267 001162 020027 000045 001406 010016 004737 0000140 000732 000764 000167 001012 005067 001136 005067 001136 0000160 127727 001124 000055 001004 005267 001114 005267 001112 0000200 004367 000450 010167 001076 005067 001100 020027 000056 0000220 001004 004367 000426 010167 001064 010603 062703 000004 0000240 012701 001176 012102 001732 020021 001374 000112 012401 0000260 002005 005401 112723 000055 000401 012401 004767 000002 0000300 000522 005000 071027 000012 010146 010001 001402 004767 0000320 177760 012600 062700 000060 110023 000207 112423 001001 0000340 005303 112423 001100 005303 000476 016701 000740 005003 0000360 011402 105722 001402 005203 077104 012402 000470 012702 0000400 001246 000402 012702 001252 012401 001405 005767 000676 0000420 001402 112723 000060 005000 004767 000002 000444 010146 0000440 073012 001402 004767 177766 012600 046200 000002 062700 0000460 000060 020027 000071 003402 062700 000007 110023 000207 0000500 016700 000612 016702 000604 004767 000224 000414 016700 0000520 000574 016702 000566 004767 000206 000405 012404 012467 0000540 000546 000167 177346 010602 062702 000004 160203 010446 0000560 012746 000040 010304 005403 066703 000512 003406 005767 0000600 000510 001003 004737 000732 077303 005704 001404 112216 0000620 004737 000732 077404 005703 003405 012716 000040 004737 0000640 000732 077303 005726 012604 000167 177240 005067 000434 0000660 005001 117700 000422 005267 000416 162700 000060 020027 0000700 177772 001002 012400 000403 020027 000011 101006 005267 0000720 000372 070127 000012 060001 000754 062700 000060 000203 0000740 062704 000010 112723 000077 000207 010546 010605 016700 0000760 000342 001004 004767 000054 016700 000330 116520 000004 0001000 001407 005267 000316 005367 000310 003002 004767 000024 0001020 016500 000004 012605 000207 010546 010605 004767 000004 0001040 012605 000207 016700 000254 001412 162700 001306 010067 0001060 000220 016700 000232 001001 005200 104400 001256 012767 0001100 001306 000220 012767 001000 000210 026727 000202 000002 0001120 101003 012767 000001 000172 000207 010546 010605 016500 0001140 000004 104401 010500 010605 010446 010346 010246 005746 0001160 000110 010501 014104 014103 014102 010506 012605 000207 0001200 062510 066154 020157 067527 066162 020544 000012 000236 0001220 000144 000364 000157 000356 000170 000460 000146 000476 0001240 000145 000314 000143 000332 000163 000252 000154 000514 0001260 000162 000000 000000 177774 177760 177775 177770 104404 0001300 001306 000000 071143 030164 067456 000000 000037 000000 0001320 072163 071141 000164 000000 000002 000000 062550 066154 0001340 027157 000157 000037 000030 066576 064541 000156 000000 0001360 000002 000030 071160 067151 063164 067456 000037 000050 0001400 067546 066562 000160 000000 000004 001270 067554 070157 0001420 000000 000000 000002 000074 065162 071565 000164 000000 0001440 000004 001272 062156 063551 072151 000000 000004 001276 0001460 067147 066565 000000 000000 000002 000634 064567 072144 0001500 000150 000000 000004 001266 062156 067146 000144 000000 0001520 000004 001274 073563 060564 000142 000000 000003 001176 0001540 062544 064543 060555 000154 000002 000236 061557 060564 0001560 000154 000000 000002 000364 062550 000170 000000 000000 0001600 000002 000356 066146 060557 000164 000000 000002 000460 0001620 061563 062551 000156 000000 000002 000476 064143 071141 0001640 061541 000000 000002 000314 072163 064562 063556 000000 0001660 000002 000332 067554 064547 060543 000154 000002 000252 0001700 062562 067555 062564 000000 000002 000514 071160 072542 0001720 000146 000000 000002 000526 071160 072163 000162 000000 0001740 000002 000536 063146 072154 071160 067456 000037 000720 0001760 072560 061564 071150 067456 000037 000732 066146 000000 0002000 000000 000000 000002 001024 074145 072151 067456 000000 0002020 000037 001112 071543 027166 000157 000000 000037 001124 0002040 060563 071166 000065 000000 000044 001264 062537 064570 0002060 000164 000000 000042 001112 066537 064541 000156 000000 0002100 000042 000030 071543 000166 000000 000000 000042 001124 0002120 070137 064562 072156 000146 000042 000050 071143 072145 0002140 000000 000000 000042 001142 063160 067554 072141 000000 0002160 000042 000720 071560 064543 067145 000000 000042 000720 0002200 070137 072165 064143 071141 000042 000732 063137 072554 0002220 064163 000000 000042 001010 063137 072557 000164 000000 0002240 000044 001300 0002244