Some notes on setting up an ITS system
These are some brief notes on setting up an ITS system based on klh10
and the PI
(Public ITS) distribution. I work on it very occasionally
, but it
may help some people along the way.
No, I'm not an ITS wizard, just an old TOPS-20 hacker.
Any comments, corrections, or suggestions for improvements are very welcome!
Keep a copy of .INFO.;DDTORD >
within arms reach at any point (or read it here).
Read .../doc/ksits.txt (but see below)
Reference Manual is also worth reading, at some point.
- Making klh10
- To get it running decently
- Minor caveats
- Setting up COMSAT
- Setting up PANDA/PWORD
- My contributions
- Notes on renaming your system (don't try this before you've done the above things!)
- Tunneling CHAOS over UDP (don't try this before you've done the above things!)
- Running klh10 on a Raspberry Pi
- To do
See also my Luser's Guide to ITS
, and the ITS Primer
by V. Ellen Golden
, and Getting Started Computing at the AI Lab
) especially chapter 6, and in the not-so-related-but-still-fun department, HAKMEM
especially the "Programming Hacks" section
Use the latest klh10. The original at trailing-edge lacks a lot of things. The Panda version (see also Panda.COM) has almost all you need - and includes a full TOPS-20 distribution.
If you run gcc version 4 (or later?) you will NEED to apply a patch to the file src/kn10def.h - download it here (patch found by Roch Kusiak, see here).
Follow the instructions which came with your klh10.
Run MD instead of PI.
Instead of using PI, as suggested in
.../doc/ksits.txt, use MD. I.e., use
klh10-md.ini instead of klh10-pi.ini.
Using PI gives a system that runs, but many many
programs don't know the PI machine, so you'll typically get
.VALUE 0 breakpoints when running INQUIR, LISP etc.
MD is more "well-known" (except to COMPLR), so you'll get a
system which is easier to use.
Get networking up. Since the console gets random
typeouts from the system (it is intended as a paper console
logging what's happening to the system), it's a good idea to
use the system over Telnet or Supdup.
If you run Linux, you may be interested in
a patch to support the tun/tap device in Linux (e.g the patch by MMcM);
at least this gives you local
access, which is all you dare before you get PWORD/PANDA
running. Note that this is not included in klh10-2.0h (the Panda version, see above).
You can try my iptables script to set up restricted external access (and forwarding of the Supdup port from the host to ITS). No guarantees it'll work in your setup. (See my notes for Raspberry pi setup for the most recent version.)
You may also be interested in my
patched Supdup client for Linux
If you want to use features like the SAIL character set, Ctrl-8 etc, you may want to try a Supdup client in Java ( 2009-04-05).
Check that DEVICE;JOBDEV DIRMD exists and is a link
to DEVICE;ATSIGN DIRDEV, otherwise Dired in Emacs
won't work (unless you do 0m.vDIRED use DIR device$
in your emacs init file). To create the link, use the :LINK command.
Putting 223fs Help Char$ in your Emacs init
file may help, since the default help char is Top-H, and you
probably don't have a Top key on your keyboard... (223 is
^_ (which you have to type twice, by the way, see
Info node (ITSTTY)A/5.))
INQUIR will still not work. If you get the following error
then your problem is probably a broken LISP; directory in the PI distribution disk. To fix:
;162798. CAN'T CREATE A HUNK OF THIS SIZE
A bug in INQUIR has been encountered.
This should never happen.
Please send a message explaining the circumstances leading to this
to Bug-INQUIR@MIT-MC. Thank you.
You now have a fresh LISP directory, and INQUIR will work again.
- Fetch the LISP directory from the AI archive here (or here).
- Unpack it with tar zxf lisp.tgz.
- Make an ITS tape from the new lisp directory using ITStar (local copy here, doc here, text format):
itstar -cf lisp.tap lisp
- Mount it as a tape:
- Press ^\ (to get a klh10 prompt)
- devmount mta0 lisp.tap (where lisp.tap is the file created by itstar)
- cont (to continue klh10)
- :DUMP (if you get a warning message, press ^Z, type :sl 〈ENTER〉, then wrong/0 〈ENTER〉 and $P)
- reload crdir links sorry (answer y if asked)
- quit (when done)
Set up mail aliases.
It's probably a good idea to edit .MAIL.;NAMES >, basically replacing KLH with your own uname, and replacing @NX with @MD and *NX with *MD
The file SYS;NET MAIL is printed when people
connect from the network. Unfortunately this output is
erased when Supdup clears the screen immediately after.
Maybe SYS;SYSTEM MAIL is a better place for
greetings, since it's printed after the version/fair share
message. (The file SYS;LOCAL MAIL is shown to
The standard contents of SYS;NET MAIL points at
HACK;PI NEWS, which you'll like to update.
In addition to setting up mailing lists, you'll need to set up
COMSAT (the mailer demon) properly.
As mentioned in distrib.its, you need to set
BUGHST, DOMGAT and TCPGAT. BUGHST is most likely the local IP
address (192.168.0.203 for MD), the others are most likely
your klh10 gwaddr (192.168.0.200 for MD). The format of the
address can be described by the following Common Lisp functions:
(defun make-ipaddr (oct1 oct2 oct3 oct4)
(dpb oct1 (byte 8 24)
(dpb oct2 (byte 8 16)
(dpb oct3 (byte 8 8)
(defun parse-ipaddr (addr)
(list (ldb (byte 8 24) addr)
(ldb (byte 8 16) addr)
(ldb (byte 8 8) addr)
(ldb (byte 8 0) addr)))
NOTE that CL byte specs count the bits from the right, not left.
(So 192.168.0.200 => 3232235720. and 192.168.0.203 => 3232235723.)
So parse your IP address(es), put them in the appropriate locations of .MAIL.;COMSAT BIN, set DEBUG/ 0 and XVERS/ 0, and start at PURIFY.
Of course, you don't need Common Lisp - you can hack anything with TECO and DDT. To type in an address like 192.168.12.203, say
to DDT. Note the "." (to make decimal numbers) and that $ is Escape.
I have some notes on my external email setup - YMMV (certainly).
Mount a tape: give klh10 the command devmount mta0 tapefile rw
(where tapefile is a new file),
To see which tape number to use (if you are disciplined about tape use), issue the TAPES command, specifying TTY: as the LIST DEV(ice).
Full backup: give DUMP the command DUMP FULL LINKS, followed by
ICHECK to check tape contents and set dumped bit on checked files.
Incremental backup: DUMP INCREM LINKS (checks and sets bits)
Backup done: QUIT
Done: give klh10 the command devunmount mta0
- Mount the tape: devmount mta0 tapefile, and continue
- Restore: give DUMP the command RELOAD LINKS CRDIR SORRY
- Dismount tape: devunmount mta0
PWORD is a replacement for HACTRN which doesn't let you log in
as anyone without a password (except on the console and local
terminals). PANDA is the administrative tool
to set passwords, accept account applications, etc.
Set the master password for PANDA.
Now type in a password. When you hit the breakpoint, its
encrypted form is in T. Copy it (573037415503 in the example
below), and then set it in the real copy:
$l sysbin;panda bin
ttyhak+7/ CAME T,SPWORD .$b
To make it easy to run, make a link to it in SYS;TS PANDA (so you can run it by :panda).
$l sysbin;panda bin (re-load a pure copy)
:pdump sysbin;panda bin
Create ACOUNT; which is needed for account applications etc.
Add mail aliases for ACCOUNTS-NOTIFICATION, USER-ACCOUNTS, ACCOUNTS-HELD-REFUSED, USER-ACCOUNTS-ARCHIVE, PASSWORD-SYSTEM, and BUGGY-PWORD (see above). If you expect account applications, read the mail coming to these addresses...
Make PWORD the replacement for HACTRN.
You may want to start by setting a password for your uname:
set uname -pw (where uname is your uname)
Is this OK? (Y or N) Y
Enter new password.
Now just make a link to SYS;ATSIGN PWORD in
SYS;ATSIGN HACTRN (not the other way!) and you're done. To change your password later, use :login uname -pw.
Note that logging in on the console never requires a password.
Things to document:
- My ddt patches
- Patch to LUSER
If you know how to do these things, please let me know:
DNS resolver to not have to hack H3TEXT host table
(the DQ device is a fake (DQXDEV), but there is another (DQDEV) which might work?)
Get all the sources missing from the PI distribution (and from Alan's archive)
So far, I'm looking in particular for TURNIP;READER, SPACY;NETRTN and SPACY;LSRRTN. It seems some EMACS sources are missing too (e.g. PURIFY). (The sources of :DATE aren't among PI, AI or MC sources, but Paul Svensson has them.)
- Write a script to recompile the world in order to change system name.
Update: I've done it manually, and recorded the steps here.
- The "Fair share" is very wrong.
Could this be because it's calculated (in SYSTEM;ITS after ALCR1) based on "ticks per second", which we nowadays have many more of than on a KS? But KLH10 (when configured correctly) claims to use 60 ticks/s? New theory: the "host" device (idling the kn10 process in the null job). There is very little idle/lost time on an ITS system under klh10 with the host device+patch. See also notes here.
- Time zone is fixed at -5 (EST)... see my PATCH; directory for an extension of ITS to make it configurable.
In the movie Swordfish
(Jackman, Travolta, Berry), the hacker played by Jackman connects to an ITS system in the basement of Caltech
to retrieve his worm. In the script
, the ITS machine is at MIT, which is surprisingly well written by the author, Skip Woods. Would anyone know how he would know about ITS? Would anyone have a guess why the machine was moved to Caltech in the movie?