VAX simulator V3.8-1 gmake USE_NETWORK=1 all build simh with networking enabled show xq eth see if networking is supported scripts ------- quas.sh run 4.3BSD quasijarus 211bsd.sh run 2.11BSD unix-v7d.sh run unix v7 on pdp-11/70 unix-v6.sh run unix v6 on pdp-11/70 unix-v6p.sh run unix v6 prime on pdp-11/70 unix-v5.sh run unix v5 Setting up simh for PDP11 ------------------------- note: pdp11 must run as root to access ethernet sim> load -r ka655x.bin sim> set cpu 64m sim> set rq0 ra92 sim> at rq0 linux.dsk RQ: creating new file sim> set rq2 rrd40 sim> boot cpu sim> show version displays version of simh sim> show con displays configuration sim> show cpu iospace displays I/O space address assignments sim> show dev displays devices sim> show xq mac displays ethernet mac address sim> set xq enabled enable ethernet device sim> attach xq0 eth0 sim> set console telnet=23 while in VAX mode: >>> help Setting up PDP11 ---------------- The PDP-11 was a series of 16-bit minicomputers from DEC pdp11 emulates a PDP 11/45 with 256K as the default (256K memory is maximum possible) The /73 had a 15MHz J-11 CPU with 22-bit memory management for 4MB RAM max BA23 standing tower configuration was common PDP-11/45 used a H960-C cabinet 128KW (256KB) of DRAM both 11/45 and 11/73 had an MMU set cpu 11/45 sets PDP 11/45 set cpu u18 same (deprecated) set xq enabled enable ethernet device so I'm running Unix v6 & v7 on a PDP 11/45 pdp11 pdp11-v5.ini to run Unix v5 on pdp11 pdp11 pdp11-v6.ini to run Unix v6 on pdp11 pdp11 pdp11-v7.ini to run Unix v7 on pdp11 while using simh pdp11 ---------------------- set cpu U18 attach rk0 unix_v5_rk.dsk boot rk0 ctrl-e stops the simulation sh dev displays devices quit exits simh Notes on v1 ----------- The first edition of Unix was developed for the PDP-11/20 at Bell Labs Written in assembly, there is no C code at all Notes on v3 ----------- pipes are introduced yacc is present snobol interpreter is introduced Notes on using v5 ----------------- @unix login: root use chdir instead of cd commands: ar, as, bas, cat, cc, cdb, check, chmod, chown, clri, cmp, cp, date, db, dc, dd, df, dsw, du, dump, echo, ed, exit, fc, goto, if, kill, ld, ln, login, lpr, ls, mail, mkdir, mv, nm, od, pr, ps, restor, rew, rm, rmdir, sh, size, sort, strip, stty, su, sum, sync, time, tp, tty, uniq, who, write Notes on using v6 ----------------- baseline v6 for pdp-11 is in uv6swre.zip id32 i32.ini runs unix v6 for interdata (type unix at prompt) v6tar is a critical utility which is 27494 bytes kernel is named unix which is 28472 bytes Designed to run on the PDP-11s with 18-bit addressing such as the PDP-11/40, 11/45 and 11/70 v6 introduced the `Portable C Library' written by Mike Lesk, which would evolve into the Standard I/O library MMU makes it possible to address 2^18 bytes v6 uses only swapping, no paging thompson shell rather than bourne shell no user environment, no .profile (e.g. no $PATH) filenames are a maximum of 14 characters in length in Unix V6, there was a program /etc/glob that would expand wildcard patterns (this goes back to Unix v1) v6 is not Y2K compliant ctrl-h works as expected brw-rw-r-- 2 root 2, 0 May 2 1983 rl0 @unix login: root # appears to act as a delete character @ disregards all characters on a line use chdir instead of cd cc understands switch *.h files appear to be a rarity stty 9600 set stty speed to 9600 nroff and roff are available ar t /usr/sys/lib2 look at contents of lib2 (math functions are here) ar x cont.a extract contents of archive cont.a cc -f test1.c compile a program that uses floating point cpall *.c /usr/extra/prog/apl-1976 copy multiple files certain cases generate "arg list too long" diff file-1 file-2 compare two binary files find / -name apl -a -print find apl v6tar 0x input file(s) from tape v6tar 0cr aplp write out aplp to tape /etc/mknod /dev/rk3 b 0 3 /etc/mknod /dev/rrk3 c 9 3 /etc/mkfs /dev/rk3 4000 create a new filesystem on rk3 date ; echo "yeah" commands can be separated using semi-colon nice [ -n ] command od -h file display hex dump of file od -c file display ascii dump of file chdir /usr/doc/start roff cover read documentation to get started with unix v6 who displays who is logged on bc -l run bc with standard math library cd $h/bin go to /usr/cubeman/bin pfe print floating exception using basic ----------- basic test.bas run basic and load test.bas variables names are only significant up to two characters bye exit to operating system a% = 1.1 set integer variable a% to 1 print tan(1) print 4*3 asterisk is multiply print abs(-7) absolute value of -7 print sqr(4) returns square root of 4 print chr$(77) returns M renumber 10 renumber all lines starting at 10 save test1 save program test1.bas example: 10 dim a% ( 10 ) 20 for x = 1 to 10 30 a% = x 40 print a%; " " ; 50 next x using chess ----------- e2e4 make moves using algebraic notation exit quits chess adding a user ------------- use \# for # ed /etc/passwd $a joe::10:1::/usr/joe: . w q mkdir /usr/joe chown joe /usr/joe login joe ls -la login root building tp ----------- as tp?.s ld a.out -lc -l cmp a.out /bin/tp cp a.out /bin/tp tp xm0 res tp 0uv tp 0tv rew 0 dd if=/dev/mt0 of=v6tar bs=1 count=27494 dd if=/dev/rhm0 bs=32b of=/dev/null building kernel --------------- /usr/sys/conf configure kernel /usr/sys/dmr device drivers are here notes on cc ----------- can't use conditional compilation need fixing ----------- df, icheck, dcheck files ----- /usr/pub/ascii ascii table /lib/c0 /lib/c1 /lib/c2 /bin many executable files are here /bin/fc fortran compiler /lib/liba.a assembler library /usr/bin some executables are here /usr/source source code is here /usr/source/c source code for c compile is here /mnt/man/ all the man pages are here /usr/doc/man all the man pages are here set fpp = 1 in c0t.s for PDP-11/45 (for hardware floating point support) recompile c0 and put in /lib added later ----------- sh.yale the yale shell set a = gerbil (spaces seem necessary) next .profile loads set commands into shell certain cd commands with backspace seem to make sh.new exit man man page utility (v6 unix shell script) man 2 mknod list mknod docs from section 2 man 5 dump incremental dump tape format man 8 dump incremental file system dump man 6 sno list docs on snobol III interpreter pg pager, e.g. man ps | pg unirubik apl apl oct 1976 doesn't have ------------- awk tail, head strings fprintf Notes on super v6 ----------------- info table gives list of commands that have info available Notes on LSX ------------ a very stripped down Unix v6 type lsx at boot prompt commands: cc, check, cp, date, db, ed, ld, load, ls, mkdir mv, od, reloc, rm, rmdir, sh, size, strip, stty Notes on using v7 ----------------- run script unix-v7.sh, unix-v7a.sh or unix-v7c.sh unix-v7c.sh is the most complete version and has /usr/sys files unix-v7c.sh runs PDP-11/45 with 256K unix-v7d.sh runs PDP-11/70 with 2 megs (same software) using xterm is better than konsole for running unix v7 md5sum 97a669b8216245aec4aa8f20c9bbe189 v7sys.rp0 original md5sum 30da56499ce2000f0942ee5fbe54d59c v7sys.rp0.march-14-2013 md5sum b37c92f861eae46916dff0854b014f6a v7sys.rp0.march-15-2013 md5sum 725aa1d504c7367453253509f13dc3c3 v7sys.rp0.march-16-2013 md5sum df4ce8f78ac96dfd57f07e7b8108feea v7sys.rp0.march-18-2013 v7sys.rp0 174416896 2013-03-09 filenames are a maximum of 14 characters pathnames are a maximum of 128 characters don't use 2bsd ls.c v7m works 32V works @boot New Boot, known devices are hp ht rk rl rp tm vt : rl(0,0)rl2unix or : hp(0,0)unix for RP04/5/6 or : ht(0,3) for the TU16/TE16 : att rl1 test.dsk starts in single user mode (no /usr files) ctrl-d logs out of single user mode and starts multi-user mode login as root or cubeman v7vol1.pdf mentions rp(0,0)unix hp(0,0)unix /bin most commands are here /bin/man this is the man script to view man pages /boot second stage bootstrap /etc contains essential data and dangerous maintainance utilities /etc/dmesg display system messages /etc/group text file for groups /etc/rc has /etc/mount /dev/rp3 /usr /etc/wall send message to all users /lib/libm.a this is the math library /unix kernel /usr/include include file are here /usr/lib/lib.b text file gives bc some math functions (had to be added) /usr/mdec/hpuboot.s disk boot program to load and transfer to unix /usr/pub/ascii display ascii codes /usr/src/games/chess source code for chess here hit enter on an empty line to display board /usr/src/dev source code for device drivers /usr/src/cmd/bas source code for bas (unix basic) is here includes bas.s and makefile /usr/src/cmd/factor.s source code for factor /usr/src/cmd/primes.s source code for prime number finder /usr/src/libc/stdio stdio files are here /usr/src/libm math function source code /usr/sys/conf configuration files for building kernel /usr/sys/h more include files adb file debug file cat pg.c | pg display pg.c and pipe through pg cd $HOME change to home directory chmod u+t file turn on sticky bit for file date 9901012000 sets date to jan 1, 1999 at 20:00 echo -n '][H][J' | tr ']' '\033' clear screen echo "obase=16; 10" | bc convert 10 decimal to hex echo $PATH displays path echo "1 50" | graph | plot -Ttek graphics for tektronix ed test edit file test expr 45 + 5 add 5 to 45 (spaces are necessary) find / -name f77* -print find files starting with f77 f77 hello.f -o hello compile fortran program head -15 file display first 15 lines of file init run init and go back into multi-user mode kill -1 1 kill init and go back to single user (must be root) kill 128 kill process 128 look stuff show words that begin with stuff ls -l | grep '^d' show only directories ls ; cal 1980 multiple commands on one line man -w ps displays where help file is for ps man man | tk gives info on man pages and pages for tektronix terminal man a.out assembler and link editor output man boot display notes on startup procedures man chess display documentation on chess man intro introduction to unix main hier description of the file system hierarchy man du du - DU-11 201 data-phone interface man hp hp - RH-11/RP04, RP05, RP06 moving-head disk man hs hs - RH11/RS03-RS04 fixed-head disk file man ht ht - RH-11/TU-16 magtape interface man pk pk - packet driver man rf rf - RF11/RS11 fixed-head disk file man rk rk - RK-11/RK03 or RK05 disk man rp rp - RP-11/RP03 moving-head disk man tm tm - TM-11/TU-10 magtape interface man vp vp - Versatec printer-plotter nm program print namelist for program /usr/games/maze 12,12 generate a 12x12 maze mkconf generates the assembly file l.s od -x file display file in hexadecimal ps -alx show processes in detail STR=`ps` store ps in variable $STR echo 0 0 1 1 2 0 | spline generates data points for a parabola osh thompson (older) shell /etc/mkfs /dev/rl1 9000 /etc/mount /dev/rl1 /mnt set display all environment variables stty erase '^H' set erase character as ^H stty erase ^? set erase as backspace stty kill '^C' set kill character as ^C stty ek reset to default erase and kill characters su switch to super user tail -15 file display last 15 lines of file tar -cvf file.tar . create a tar archive tar -xvf file.tar expand a tar archive tar x extracts everything from /dev/mt0 tar tv lists files from /dev/mt0 test & execute test and don't wait for it wc test display lines, words and characters of file test who show who is logged in create wtmp file for login accounting mkdir /usr/adm cd /usr/adm cat > wtmp ^d the shell is /bin/sh both cd and chdir will change the directory /dev contains device drivers, e.g. /dev/rp3 /usr is a general purpose directory, usually a mounted filesystem e.g. /usr/include /tmp contains temporary files languages available include Algol 68, APL, Basic, Lisp, Pascal and Snobol ctrl-d exits out of many programs and can log out of shell ctrl-h backspace ctrl-i tabs forward ctrl-j acts as a carriage return ctrl-m acts as a carriage return ctrl-\ exits and core dumps a program setup swap and make some devices -------------------------------- mkdir /tmp /usr/tmp chmod 777 /tmp /usr/tmp cd /dev make rl tm rp03 ln /dev/rl0 /dev/swap chmod go-w swap cp /rl2unix /unix chmod 666 /dev/swap adding user ----------- # mkdir /usr/dmr # chown dmr /usr/dmr # chgrp 3 /usr/dmr using adb --------- $m print the address map $r print the general registers $q exit using bas (basic for unix) --------- q or done to exit bas $ bas a = 7 + 1.2 print a 8.2 log(2) .6931471806 10 a=1 20 b=2 30 c=a+b 40 print c run 3 4*atn(1) prints pi to 10 digits bas file executes basic and loads file dump displays all variable values list lists all lines of program save saves program as b.out ? does not work as a shortform for print using ed -------- ed test f display filename w test write file test a append text, . to end c change text, . to end e edit new file 1 display line 1 (or any number) 1,2p display lines 1 to 2 1,$p display lines 1 to the end $,$p display the last line 3d delete line 3 3,$d delete lines 3 to the end s/wrong/right/ replace wrong with right on current line 1,$s/crap/crud/ replace first occurrence of crap with crud in each line 1,$s/crap/crud/g replace all occurrences of crap with crud 1,1m$ move line 1 to the end /apple/ find first occurence of apple p print current line using bc -------- bc scale=10 sqrt(2) print square root of 2 1.4142135623 2^3 print 2 to the power of 3 for(i=1; i<=10; i++) e(i) prints values of exponential function of first ten integers devices ------- devices are in /dev console is /dev/console ttyz0 to ttyz15 are the serial character devices using tektronix terminal ------------------------ via xterm -t esc 8 35 lines of 74 characters df -- /DEV/RP0 5000 note that neither number should be zero /DEV/RP3 296273 new for v7 ---------- stdio bourne shell strings awk, lex, yacc, lint, sed, m4 and make pcc the portable c compiler uucp doesn't have ------------ cd ~ (does not work) cd - (does not work) csh halt, haltsys or shutdown uname tcp stack ping, ftp, telnet, web browser chgrp sudo vi more, less or pg source code for maze, reversi seq (no unix seems to have seq) /usr/local no gamma or tgamma function added later ----------- basename returns filename from pathname (not needed) clear clears the screen cls clear tektronix 4014 screen dr list only directories env display environment variables (not really needed) head display first few lines of a file lc columnar ls (bash script) pg pager program reset.sh reset screen attributes reverse.sh set reverse text unirubik rubik's cube program ls1 ls from v7m, has -p option Commands -------- as and as1 are assembler programs f77 is the fortran compiler cc is the c compiler icheck / check filesystem Errors ------ Line overflow. man generated this once, disk corruption? No namelist something is wrong with /dev/swap Using 2.11 BSD -------------- 211bsd.tar.gz contains the necessary files to run 2.11BSD under simh vipw update password file ./MAKEDEV rx boot: unix CPU, 11/73, NOCIS, idle disabled, autoconfiguration enabled, 3072KB 22-bit physical address space, can handle maximum 4 megs of ram pdp11 211bsd.simh starts pdp11 with 2.11 BSD telnet localhost 4000 login as a user on a terminal /dev/rxp0a driver for single density 8" floppy drives /dev/rxp0b driver for double density 8" floppy drives /etc/netstart edit this to something sensible hostname=2bsd netmask=255.255.255.0 broadcast=192.168.0.255 default=192.168.0.99 /etc/hosts edit this to give the emulated bsd 2.11 a name /etc/group edit this to add to wheel group, e.g. wheel:*:0:root,cubeman /etc/rc.local added ntp -s -f 192.168.0.101 to set time and date /etc/resolv.conf set nameserver here, e.g. router's ip 192.168.0.1 /etc/master.passwd passwords are set here, added the following: cubeman:*:8:3:Mark,,,:/usr/cubeman:/bin/sh /usr/libexec/ftpd ftp daemon /usr/local executables /usr/man/whatis summary of man pages /usr/src/games source code for games, must be root to access /usr/src/bin source code for commands, must be root to access /usr/src/man man pages in nroff form are here /usr/src/new/PORT/apl source code for apl, make all, add -z to ld /usr/src/sys/OTHERS/dmc11/dmc.c /usr/src/sys/OTHERS/rx02/#1/rx2.c driver code for rx02 floppy drive /usr/src/ucb/ftp/ftp.c source code for ftp driver code for dmc11 /usr/ucb more executables (ucb -> University California Berkeley) directory /usr/cubeman must be chmod 755 bc -l run calculator cat wall.c | more display wall.c and pipe through more cc hello.c -o hello compile a c program chown cubeman.8 file change owner of file to cubeman and group 8 chpass user change password for user .profile startup options are set here ftp run file transfer protocol client hostname display hostname halt to shutdown system immediately shutdown +1 shutdown in one minute ifconfig qe0 show network parameters for device qe0 ifconfig lo0 show loopback ifconfig lo0 127.0.0.1 up look stuff show words beginning with stuff man adduser instructions on how to add a user mkhosts -v /etc/hosts this is needed after updating /etc/hosts stty size reports rows and columns of terminal uname -a display operating system info uname -r -m display current level release and platform info zork text adventure game, can't save or restore (A vicious emt 345 kills you.) adventure does not work, recompile seems to work saving a game generates a large executable libraries --------- libcurses.a doesn't have ------------ bas cd ~ (does not work, same as v7) cd - (does not work, same as v7) cat ~/.profile (does not work) sudo history maze in /usr/games ssh, locate, pkill locate improvements over v7 -------------------- cc has conditional compilation filenames can now be up to 63 characters in length 4.3BSD U of Wisconsin --------------------- ps generates /dev/kmem: Permission denied runs on vax 780 4.3BSD Quasijarus (fork of 4.3BSD-Tahoe) ----------------- /dev/ra0a 7221 5229 1269 80% / /dev/ra0h 136504 1 122852 0% /home /dev/ra0g 241183 90077 126987 41% /usr e.g. /home has 136 megs free missing ntp missing apl (added apl from 4.3BSD-Tahoe) runs on MicroVax 3000 has gamma function man math displays various math functions Setting up simh for altairz80 and cp/m -------------------------------------- altairz80 cpm2 use cpm2.sh script to run cpm2 with Fortran Notes on PDP8 ------------- 12-bit machine 4096 words extended by memory extension controller used printing terminal ASR33 filenames are 6.2 pdp8.sh script to emulate pdp8 with OS/8 within OS/8 ----------- help basic get help on basic teco file.ba edit a basic file Notes on PDP7 ------------- operating system is DECSYS-7 EDIT! E enter edit mode F,TEST edit fortran file test ibm1130 ------- uses Disk Monitor System Release 2 Version 12 ibm1130 job lisptest generates lisptest.lst run ibm-apl-1130.sh to run ibm 1130 with apl konsole seems to work the best as a terminal emulator use iso 8859-1 encoding with APLX upright font [ is mapped to APL left arrow not all characters show up correctly but they still work check ibm 1130 keyboard a110.gif )CLEAR )SAVE TEST )VARS )OFF logs off )LIB shows all workspaces )FNS list functions in current workspace )47 login as norm )100 login as guest keys ---- uio -> 123 jkl -> 456 m,. -> 789 . is . , is , 4 is + 5 is multiply = generates ! which gives character error ;' generates [] hitting 2 twice locks shift 4 becomes minus 5 becomes divide 9 becomes backspace T becomes tilde ~ P becomes asterisk * (exponent) J becomes small circle K becomes ' F becomes _ (flat line) I becomes iota R becomes rho ;' becomes () , becomes ; . becomes : - becomes ATTN (Attention) Q becomes ? W becomes high minus M becomes vertical line backspace is cumbersome, one must hit 9 to backspace then minus (ATTN) hitting 3 twice locks number shift asdfghjkl; becomes 1234567890 P becomes ^ E becomes < U becomes > T becomes = Z becomes / C becomes \ , becomes ! shift only , becomes multiply 8 becomes + f1 becomes divide (does not work) apl statements -------------- ~0 not zero returns 1 ~1 not one returns 0 divide 2 returns reciprocal of 2 !4 returns factorial of 4 2*3 returns 2 to the power of 3 *3 returns e to the power of 3 4+4 returns 8 5x5 returns 25 16* divide 2 returns the square root of 16 which is 4 'this is a test' | negative 2 returns absolute value of negative 2 which is 2 iota 10 returns numbers 1 to 10