diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-19 13:55:28 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-01-19 13:55:28 +0000 |
commit | cecf451da1144a279d2947cdbfcc3b2d44336c52 (patch) | |
tree | dc34d5dc345127ffcdab694102b608d630d144d6 /emulators/its/files | |
parent | 010ce51d3b900da8ad1900eb77ef3b6223cb0545 (diff) |
Notes
Diffstat (limited to 'emulators/its/files')
-rw-r--r-- | emulators/its/files/MIT-ITS-papers | 17 | ||||
-rw-r--r-- | emulators/its/files/README.FIRST | 190 | ||||
-rw-r--r-- | emulators/its/files/its-user-install.sh | 216 | ||||
-rw-r--r-- | emulators/its/files/its.sh | 57 | ||||
-rw-r--r-- | emulators/its/files/klh10-kn-freebsd.ini.in | 31 |
5 files changed, 511 insertions, 0 deletions
diff --git a/emulators/its/files/MIT-ITS-papers b/emulators/its/files/MIT-ITS-papers new file mode 100644 index 000000000000..ec08986e982f --- /dev/null +++ b/emulators/its/files/MIT-ITS-papers @@ -0,0 +1,17 @@ +ITS Status report (includes architecture info) from 1972 +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-238.ps + +ITS reference manual from 1969: +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-161A.ps + +Midas macro assembler documentation from 1965: +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-090.ps + +DDT debugger ("system apex procedure" i.e. "shell") from 1968 +ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-147.ps + +Emacs text editor (original ITS version) +ftp://publications.ai.mit.edu/ai-publications/500-999/AIM-519A.ps + +These files may be converted to PDF or gzipped to save space: +$ ps2pdf13 AIM-238.ps AIM-238.pdf diff --git a/emulators/its/files/README.FIRST b/emulators/its/files/README.FIRST new file mode 100644 index 000000000000..127ad0310131 --- /dev/null +++ b/emulators/its/files/README.FIRST @@ -0,0 +1,190 @@ +Consider adding firewall protection for the KLH-10 emulator before +ever running it. See @PREFIX@/share/doc/its/pubits/adm directory for +samples. + +To setup the emulator you must run the its-user-install(1) command. +It takes no arguments. It is best to run it as a regular (non-root) +user. Once that has been done to start ITS run the its(1) command. +It also takes no arguments. + +The first time the ITS boots it will not know the time of day. ITS +will display this message: + +The time could not be set because: +No host responded. +It will be necessary for someone to set the time +manually by logging in and running :PDSET. + +Tell ITS to activate the apex procedure, DDT, by typing a Ctrl-Z. +When you type that you will see: + +KN ITS.1647. DDT.1545. +TTY 0 +You're all alone, Fair share = 0% + +(ITS does not know the date, so messages cannot be reviewed right now.) + +Then run PDSET by typing (colon and all) + +:pdset + +ITS will suggest that you log in but you don't have to. + +(Please Log In) +___002 PDSET IOTLSR + +Now enter the time and save it. First the century: + +20C + +Next the YYMMDD: + +020219D + +Then the HHMMSS (try to time it so you have some lead time because it +will become active when you save it.) + +235115T + +Now save the time: + +!. + +Now exit PDSET + +X + +You will have no feedback from the exit operation except that new +commands will be echoed in lower case. Now bring down ITS so you can +start it without being root: + +:lock +(Please Log In) + LOCK.154 +_ + +the _ is a prompt, do not type it. Type + +5down + +LOCK is very picky about typos so be careful. It does not need the +Enter key so don't use it. + +DO YOU REALLY WANT THE SYSTEM TO GO DOWN? + +Type "y" + +y +___004 + PLEASE ENTER A BRIEF MESSAGE TO USERS, ENDED BY ^C +LOCK SYS DOWN MAIL WRITE 21:13:17 + +Just type Ctrl-C for the message unless you have a burning desire to +talk to yourself via ITS. + +KN ITS going down in 5:00 +CULPRIT = ___004 LOCK 21:13:38 + + +_ +KN ITS 1647 NOT IN OPERATION 21:13:38 +PFTHMG DRAGON CHANNA _DRGN_ TIMES WRITE 21:13:38 +PFTHMG DRAGON CHANNA LOGOUT TIMES DELRNM 21:13:38 + +After the "NOT IN OPERATION" message only very special programs like +the accounting dragon, PFTHMG DRAGON, may run. Be patient and it will +finish with: + +SHUTDOWN COMPLETE +PI LEVEL 7 BUGDDT. TYPE <ALTMODE>P TO CONTINUE. +YOU ARE NOW IN DDT. +BUGPC/ CAIA COFFI4+1 $Q-2/ JRST COFFI7 + +If ITS gets stuck shutting down for more than five minutes just +continue from here: + +At this point type Ctrl-\ to abort KLH10 back to the monitor. + +[HALTED: FE interrupt] +KLH10> + +and quit KLH10 + +KLH10> quit +Are you sure you want to quit? [Confirm]y +Shutting down...Bye! +$ + +ITS uses DEL for erasing characters. ITS defaults to dumb hardcopy +terminal settings. This is a pain so you want to configure ITS to +use something nicer. ITS knows about VT52. If you are using xterm +from XFree86 you can get into VT52 mode by running a script like this: + +#! /bin/sh + +awk 'END {printf "%c[?2l", 27}' </dev/null + +From ITS run +:tctyp vt52 + +On your VT52 mode terminal emulator. + +An alternative is that you can use vt100 mode via the CRTSTY program +which is a bit like window(1) in that you end up on something like a +pty but only one full screen window is available and it does terminal +emulation on it. You will be automatically logged in a second time on +the same terminal as a crufty side-effect. + +:crtsty vt100 speed 9600 + +Run :info and look at the introductory information about the +filesystem. I did not find that it covers directory operations very +well so here is what I have found out. ITS does have a process tree +(try the PEEK command) but does not have a directory tree. There is a +Master File Directory MFD (try DSKUSE * or DIRED and then MFD. Use +"Q" to quit after either of those.) and User File Directories UFDs one +level deep only. The only way to remove a directory is to delete its +contents and run the salvager. The salvager is the ITS equivalent of +fsck and will automatically be run at boot time. To create a new +directory provide certain options to the open UUO (ITS equivalent of +system call; try the DOC UUO command.) Since the PRINT command calls +the open UUO you can create a directory using print: + +:print ..new. (udir) dirnam; + +Where dirnam; is the name of the directory to be created. Directory +names are limited to six characters. + +Missing from this ITS distribution is the INQUIR database. It +contains user information. There were too many personal details in it +and no one has been able to scrub it so it was left out. This means +you cannot have a complete user account yet. The best you can do is +to pick a user name and make yourself a directory with that name and +put a login script in it. In this example the user "user" is created: + +:login user +:print ..new. (udir) user; +:emacs login user +[add startup code like ":tctyp vt52" and ^X^S to save ^X^C to exit] + +You log out with <ALTMODE><ALTMODE>u which is [Esc][Esc]u and +represented in the documentation as $$u + +The ITS equivalent of $PATH is implemented by scanning all +directories for files for files with TS as the first name and +the second name set to the command you issued. By convention +most commands are in the SYS; SYS1; ... SYSN; directories. +ITS supports symlinks via the LINK command and TS name is often +a symlink. + +ITS equivalent of job control works by typing ^Z to interrupt the +current program. To get back to the DDT prompt "*" use $^K + +Don't like DDT as the shell? Try MONMOD to use monitor mode where the +colon is printed for you. DDTMOD gets you back. Or try SHELL to +bring up a UNIX-like shell. + +Zork was developed in MDL (muddle) on an ITS system but apparently it +suffered from being too popular. Try the ZORK command to see what +happened. A scrap of MDL source code is left (:find @muddle) but I +don't know how to MIDAS it. diff --git a/emulators/its/files/its-user-install.sh b/emulators/its/files/its-user-install.sh new file mode 100644 index 000000000000..07af9668898e --- /dev/null +++ b/emulators/its/files/its-user-install.sh @@ -0,0 +1,216 @@ +#! /bin/sh + +# $FreeBSD$ + +# 1) zcat the PI fs image into a user's directory (the compressed +# image location is also configurable via "make install") +# +# 2) copy or lndir the /usr/local/share/klh10-ks-its/* (this location +# is immutable) bits into a user's directory +# +# 3) generate the klh-kn-its-freebsd .ini file for the user +# +# 4) generate ~/.itsrc file for its(1) command so that multple users +# can use its(1) with different filesystem images. + +umask 022 + +# remove symlinks in cleanup()? + +cleanup() { + rm -f $KLH10_HOME/@PI-IMG@ + echo its-install-user: Terminating. + exit 1 +} + +trap cleanup 1 2 3 15 + +validate_ip() { + echo $1 | grep -q -s '[^0-9\.]' + if [ $? != 1 ]; then + echo its-install-user: IP address must be digits and periods only. + return 1 + fi + echo $1 | grep -q -s '\..*\..*\.' + if [ $? != 0 ]; then + echo its-install-user: IP address must have at least three periods. + return 1 + fi + echo $1 | grep -q -s '\..*\..*\..*\.' + if [ $? = 0 ]; then + echo its-install-user: IP address must not exceed three periods. + return 1 + fi + echo $1 | grep -q -s '\.\.' + if [ $? = 0 ]; then + echo its-install-user: IP address must not have consecutive periods. + return 1 + fi + OLDIFS="$IFS" + IFS=. + set $1 + for i in $* ; do + if [ $i -gt 255 ]; then + echo its-install-user: Octets of IP address must not exceed 255. + IFS="$OLDIFS" + return 1 + fi + done + IFS="$OLDIFS" + return 0 +} + +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi + +if [ ! -d @KLH-SHARE@ ]; then + echo its-install-user: Can\'t find the emulator directory. + cleanup +fi + +cd @KLH-SHARE@ + +if [ ! -r @PI-IMG@.bz2 ]; then + echo its-install-user: The compressed PI disk image is missing. + cleanup +fi + +valid_input=false +while [ $valid_input = false ]; do + KLH10_HOME=~/klh10-its-home + echo Where do you want to install the 170MB filesystem image\? + echo -n "[default: $KLH10_HOME]: " + read ans + if [ "$ans" != "" ]; then + KLH10_HOME=$ans + fi + + if [ -e $KLH10_HOME -a ! -d $KLH10_HOME ]; then + echo There already is a non-directory $KLH10_HOME in the filesystem. + continue + fi + if [ ! -d $KLH10_HOME ]; then + echo -n "$KLH10_HOME is not an existing directory. Create it? (y/n) " + read yorn + case "$yorn" in + y|Y) + if ! mkdir -p $KLH10_HOME ; then + echo its-install-user: Can\'t make the target directory. + cleanup + else + valid_input=true + fi + ;; + n|N) + echo Type the interupt key to quit or try again. + ;; + *) + echo "I do not recognize your answer. ($yorn)" + ;; + esac + elif [ ! -w $KLH10_HOME ]; then + if ! chmod u+w $KLH10_HOME || chmod g+w $KLH10_HOME; then + echo its-install-user: Can\'t write in $KLH10_HOME + elif [ ! -w $KLH10_HOME ]; then + echo its-install-user: Can\'t write in $KLH10_HOME + else + valid_input=true + fi + else + valid_input=true + fi +done + +echo Extracting @PI-IMG@.bz2 into $KLH10_HOME +bzcat @PI-IMG@.bz2 > $KLH10_HOME/@PI-IMG@ + +if [ $? != 0 ]; then + echo its-install-user: What a mess--the extract failed. + cleanup +fi + +echo Linking up the emulator support files. +for i in *; do + case $i in + @PI-IMG@.bz2) # exclusions + ;; + *) + rm -f $KLH10_HOME/$i && ln -s @KLH-SHARE@/$i $KLH10_HOME + if [ $? != 0 ]; then + echo its-install-user: Failed to make symlinks. + cleanup + fi + ;; + esac +done +cd @KLH-LIBEX@ +for i in *; do + rm -f $KLH10_HOME/$i && ln -s @KLH-LIBEX@/$i $KLH10_HOME + if [ $? != 0 ]; then + echo its-install-user: Failed to make symlinks. + cleanup + fi +done +cd $KLH10_HOME + +EM_IP=10.134.198.236 +valid_input=false +while [ $valid_input = false ]; do + echo -n "What is the IP address for the emulated PDP-10? [$EM_IP]: " + read ans + if [ "$ans" != "" ]; then + if validate_ip $ans ; then + valid_input=true + EM_IP=$ans + fi + else + valid_input=true + fi +done + +GW_IP=10.0.0.1 +valid_input=false +while [ $valid_input = false ]; do + echo -n "What is the IP address for the gateway' [$GW_IP]: " + read ans + if [ "$ans" != "" ]; then + if validate_ip $ans ; then + valid_input=true + GW_IP=$ans + fi + else + valid_input=true + fi +done + +sed -e "s;@IPADDR@;$EM_IP;g" \ + -e "s;@GWADDR@;$GW_IP;g" \ + -e "s;@KLH-HOME@;$KLH10_HOME;g" \ + < klh10-kn-freebsd.ini.in > klh10-kn-freebsd.ini +if [ $? != 0 ]; then + echo its-install-user: Failed to generate ini file. + cleanup +fi +rm -f klh10-kn-freebsd.ini.in + +rm -f ~/itsrc +echo KLH10_HOME=$KLH10_HOME > ~/.itsrc +echo PI_IMAGE=$KLH10_HOME/@PI-IMG@ >> ~/.itsrc +if [ $? != 0 ]; then + echo its-install-user: Failed to generate rc file. + cleanup +fi diff --git a/emulators/its/files/its.sh b/emulators/its/files/its.sh new file mode 100644 index 000000000000..7eb94f43a143 --- /dev/null +++ b/emulators/its/files/its.sh @@ -0,0 +1,57 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Run KLH10 with KS-ITS hardware configuration and ITS OS configuration +# to bring up MIT Incompatible Timesharing System emulation. + +in_network=false +for i in `groups`; do + if [ $i = network ]; then + in_network=true + break + fi +done + +if [ `whoami` = root ]; then + in_network=true +fi + +if [ $in_network = false ]; then + echo WARNING: You must be in group network in order to run a networked ITS. + echo WARNING: You may still run a non-networked ITS. +fi + +if [ ! -r ~/.itsrc ]; then + echo its: My config file '(~/.itsrc)' is missing! + echo its: Did you remember to run its-user-install\? + echo its: Terminating. + exit 1 +fi + +set -e # croak on corrupt config file. +. ~/.itsrc +set +e + +if [ "$KLH10_HOME" = "" ]; then + echo its: KLH10_HOME is missing from my config file. + echo its: terminating. + exit 1 +elif [ ! -d "$KLH10_HOME" ]; then + echo its: $KLH10_HOME is not a directory. + echo its: terminating. + exit 1 +fi + +if [ "$PI_IMAGE" = "" ]; then + echo its: PI_IMAGE is missing from my config file. + echo its: Terminating. + exit 1 +elif [ ! -w "$PI_IMAGE" ]; then + echo its: $PI_IMAGE is not a writable file. + echo its: Terminating. + exit 1 +fi + +cd $KLH10_HOME +exec lockf -t 0 -k $PI_IMAGE kn10-ks klh10-kn-freebsd.ini diff --git a/emulators/its/files/klh10-kn-freebsd.ini.in b/emulators/its/files/klh10-kn-freebsd.ini.in new file mode 100644 index 000000000000..cbcfbe4db9ba --- /dev/null +++ b/emulators/its/files/klh10-kn-freebsd.ini.in @@ -0,0 +1,31 @@ +; KLH10 emulator configuration for KN ITS system from FreeBSD ports collection.. + +; Define basic KS10 device config - two RH11s each on its own Unibus + +devdef rh0 ub1 rh11 addr=776700 br=6 vec=254 +devdef rh1 ub3 rh11 addr=772440 br=6 vec=224 + +; Provide one disk, one tape in config ITS expects + +devdef dsk0 rh0.0 rp type=rp06 format=dbd9 path=@KLH-HOME@/PI-ITS-RP06.0-dbd9 iodly=0 +devdef mta0 rh1.0 tm02 fmtr=tm03 type=tu45 + +; ITS wants a 60Hz clock, allow it. Need this until defaults OK. +set clk_ithzfix=60 + +; Define IMP for KN +devdef imp ub3 lhdh addr=767600 br=6 vec=250 ipaddr=@IPADDR@ gwaddr=@GWADDR@ + +; Dummy definitions. Only one DZ is still (apparently) needed. +devdef dz0 ub3 dz11 addr=760010 br=5 vec=340 +;devdef dz1 ub3 dz11 addr=760020 br=5 vec=350 +;devdef chaos ub3 ch11 addr=764140 br=5 vec=270 + +; Define new HOST device hackery +devdef idler ub3 host addr=777000 + +; Preload ITS for convenience +load @.its-647kn-u + +; Use "GO 774000" to start DDT, else just "GO" to start ITS + |