TOPS-10: Programming

A large number of programming languages were available for TOPS-10, both provided by DEC and created by third parties. In this article we'll take a quick tour of what is available today, along with a brief look at the TOPS-10 programming environment.

Programming languages available

From DEC

DEC provided the MACRO-10 assembler, and compilers for the big three languages of the time: Fortran, Algol and COBOL. DEC also had its own system programming language called BLISS.

There were two main versions of Fortran: F40, used until around 1972 and supporting Fortran IV/66, and Fortran-10, which took over after then and supported Fortran 66 and 77. The COBOL version is COBOL-68 and Algol is Algol-60.

On the interpreter side, DEC produced a BASIC and several languages inspired by JOSS - the initial one was AID, which was similar to RAND's JOSS II, and this was supplanted by Focal, DEC's own dialect that was implemented on its other machines.

DEC also produced an APL interpreter called APL-SF, but note this did not run on the KA CPU.

Versions of all the above exist on the disk images we are using.

From third parties

A probably incomplete list of preserved languages that can run on TOPS-10 is:

  • Algol-W - Niklaus Wirth's follow-up to Algol 60
  • BCPL - a compiled language that was one of the forerunners of C.
  • ECL - an interactive programming language from Harvard
  • Forth - a stack based language
  • IMP72 - a system language
  • Edinburgh IMP - a completely unrelated Algol like language
  • Lisp - several varieties of the list processing language
  • Logo - a language for teaching programming
  • Pascal - Wirth's follow-up to Algol-W
  • PILOT - a computer aided instruction language
  • SAIL - Stanform's extended Algol 60
  • SAM-76, a functional text processing language like TRAC
  • Simula - an early object orientated language
  • SNOBOL, a text processing language

Sources

Many of these were preserved via the DECUS tapes - a collection of software donated by PDP-10 users that DEC would distribute to users via tape on request. The program catalogue from 1978 can be found on Bitsavers and the tapes on trailing-edge.com. Software can be loaded via the TOPS-10 BACKUP utility as described in a previous post.

Others have been collected at the Github PDP-10 repo, often together with documentation.

Coverage on this blog

For this section of the blog, I will in later posts cover languages available on the TOPS-10 version we are using (6.03) and processor (KA). Discussion of Lisp will be deferred to future ITS/WAITS articles, and most post 1975 languages will be covered when I eventually look at TOPS-20.

The TOPS-10 compilation system

TOPS-10 has an common program development system for compiled languages where you can type EXECUTE src where src is a source file like HWORLD.FOR and it will work out what to do to execute the program. The steps it takes behind the scenes are

  • If the object file is newer than the source file, skip to the next step. Otherwise it will run COMPILE on the source file which works out what compiler to use based on the file extension and invokes it, This produces an object file with a REL extension.
  • Runs LOAD src.REL which loads the object file into memory and resolves external references - similar to linking on modern systems, but the result is now in core memory, not saved to an executable file.
  • Starts the program now in core memory using START.

If you want to create an executable file, you can use LOAD on the .REL file and then type SAVE name. This will create name.SAV which you can then invoke by typing RUN name.

As an extra convenience, the monitor will remember the parameters for the last 'compile-class' command. So if you type COMPILE hworld you can then just type LOAD and SAVE and it will use hworld as the parameter automatically.

There are several operators that can be used for more complex compile scenarios. COMPILE a+b+c will concatenate the three files a, b and c to produce a single output. COMPILE bin=src will create bin.REL after compiling the file identified by src. Compile options can also be saved into config files and then referenced in the command line by preceding them with @. See section 1.5 of the Operating System Command Manual linked below for more details.

Programmer's tools

As well as compilers, there are a number of tools helpful for programmers included in TOPS-10.

  • CREF produces a cross reference listing of symbols
  • MAKLIB to create object libraries
  • DDT for debugging

Further information

See the Operating Systems Command Manual on Bitsavers for full documentation of the compile-class command.

Questions, corrections, comments

I welcome any questions or comments, and also especially any corrections if I have got something wrong. Please email me at rupert@timereshared.com and I will add it here and update the main text.