PDP-1 LISP
Amongst the SIMH Software Kits is L. Peter Deutsch's PDP-1
LISP 1.5 implementation. It's quite limited (particularly in terms of
memory) and also reads all numbers in octal, but does at least let you
enter and evaluate basic expressions.
On Linux, install SIMH from your distribution's package repositories,
e.g., sudo apt-get install simh
. Download lispswre.zip
(that's from the "Lisp" link on the Kits page above) and unpack it.
lisp_doc.txt
contains instructions.
You need not compile the assembler and assemble the source; the
included lisp.rim
is the same output you would have generated
anyway.
Start the emulator with the pdp1
command and follow the instructions
in §3 of lisp_doc.txt
to set up the initial machine state. After the
final c
(continue) command you will not be presented with a prompt,
but you can type Lisp expressions to be evaluated. Remember that
newlines are ignored; typing a space (▒
in sample input below) after
the final closing paren is what triggers evaulation.
Most errors will halt the machine; when this happens you can continue
with the c
command:
(puls 7 1)▒
HALT instruction, PC: 000005 (STF6)
sim> c
(plus 7 1)▒
10
When you're done, Ctrl-E will exit back to the sim>
prompt where you can use the q
command to exit. To start again from
your saved machine state (created during the setup above), start the
simulator with pdp1
and at the sim>
prompt use the command get
lisp.sav
followed by c
.
The SIMH Users' Guide contains further details about using
SIMH.