Skip to content

Instantly share code, notes, and snippets.

@oubiwann
Last active May 11, 2024 19:31
Show Gist options
  • Save oubiwann/c791d08cf661db89d746ffdbedf2cc21 to your computer and use it in GitHub Desktop.
Save oubiwann/c791d08cf661db89d746ffdbedf2cc21 to your computer and use it in GitHub Desktop.
MACLISP and MACSYMA on PDP-10 / ITS (emulation)

MACLISP and MACSYMA on PDP-10 / ITS (emulation)

Goals

On a Debian machine, using simh emulating a PDP-10 running ITS:

  1. Write some Lisp files on ITS, compile them, and run them.
  2. Run MACSYMA and view rendered plots on an emulated Tektronix 4010

Background

Projects

Documentation

Preparation

System Dependencies

sudo apt-get install -y \
  build-essential git expect libgtk-3-dev libpcap-dev libpcre3-dev vde2 \
  ncurses-base ncurses-bin libncurses5-dev \
  libsdl1.2debian libsdl1.2-dev libsdl2-2.0-0 libsdl2-dev \
  telnet simh

Not all of these are stricrtly necessary, iirc; however, I was doing a lot of debugging / troubleshooting / investigating, and ended up using all of them ;-)

Build and Start ITS

git clone https://github.com/PDP-10/its.git
cd its
make EMULATOR=simh

This will run for quite a while. 20 minutes? 40 minutes? Not sure; never timed it. When it's done:

./start

Once you see DSKDMP:

its <ENTER>
<ESC> g

Note the port given (mine was 10004); you'll connect to the server via telnet using this port.

Build and Run a Tektronix 4010 Terminal

git clone https://github.com/rricharz/Tek4010
cd Tek4010
rm tek4010
make
./tek4010 -b1200 -fullv -autoClear telnet localhost 10004

At which point you will see this:

Connected to the PDP-10 simulator DZ device, line 0

Login and Set Up a Dev Environment

<CTRL> Z
:LOGIN oubi
<CTRL> R
oubi; ..NEW. (UDIR).
:INQUIR

MACLISP

Write to File

:EMACS

Enter text, then save with <CTRL> X <CTRL> S (sound familiar?). Exit EMACS with <CTRL> Z.

Load File in MACLISP

:LISP
(LOAD "REDUCE.LISP")

Then use the loaded function (see screenshots below).

MACSYMA

TBD

A Note on Mac OS X

After running on Debian, I decided to give it a try on Mac OS X. All that was required were the deps:

brew install simh expect sdl sdl_ttf sdl2 sdl2_ttf 

(Note that I'd already installed developer tools for the OS).

I ran into an issue when running make, though:

make EMULATOR=simh

About 10-15 minutes into the build, and it would lock up:

...
   NSHARE UNFASL
   OCTAL  UNFASL
   OD     UNFASL
   OPTDEF UNFASL
   PHSPRT UNFASL
   PRIVOB UNFASL
   PROMPT UNFA

I'll follow up on this when I have time + need to run on Mac ...

@oubiwann
Copy link
Author

The Tektronix emulator was not a good fit for EMACS (the status line wasn't rendered at the bottom of the screen, default key-mappings weren't a good fit, etc.) I just ended up using a "retro" CRT emulator.

@oubiwann
Copy link
Author

A telnet session to the Debian machine running ITS on an emulated PDP-10 ... running EMACS:

Screenshot 2020-08-28 at 5 15 51 PM

... running LISP:

Screenshot 2020-08-28 at 5 24 19 PM

MACLISP integers in the REPL on ITS are in octal, so the expected 42 decimal is actually 52 in octal.

@larsbrinkhoff
Copy link

Good job! I'm always amazed to see someone navigate the challenges of getting ITS up and running.

Two comments:

  • Exit EMACS with ^X ^C, like you would GNU Emacs. Except in ITS this just suspends like ^Z, only in a more controlled manner.
  • I think the Tektronix emulator works better if you type :TCTYP TEK to ITS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment