Publication

Algol for the LGP-30
Stephen J. Garland, Anthony W. Knapp, and Thomas E. Kurtz
Computation Center, Dartmouth College, 1962-1964

Abstract

This is a collection of technical memoranda describing two implementations of Algol 60 for the LGP-30: Dartmouth ALGOL 30, a three-pass system for a large subset of Algol, and SCALP, a "load-and-go" system for a much smaller subset. SCALP was used by hundreds of undergraduates at Dartmouth until it was replaced by Basic in 1964. The SCALP compiler processed programs almost as fast as the source code could be read in from paper tape, and students could trace and patch a program using symbols from the source code. Thus, quick turn-around and the ability to deal only with the source language were confirmed as essential for a student-oriented system. [Thomas E. Kurtz, "BASIC," History of Programming Languages, Richard L. Wexelblat (editor), Academic Press, 1981, pp. 515-537.]

ALGOL for the LGP-30, A Comparison (1962)

Dartmouth ALGOL 30 is an implementation, firstly of the ALGOL 58 programming language, then of ALGOL 60 for the LGP-30 at Dartmouth College, hence the name. It is a three-pass system developed by Dartmouth undergraduates under the supervision of Professor Thomas E. Kurtz, consisting of a compiler (written by Stephen J. Garland), a loader (written by Robert F. Hargraves and Jorge Llacer), and a runtime interpreter (written by Anthony W. Knapp). Intermediate code is similar to relocatable binary and is punched onto paper tape. Compilations can be "batched," but the delays between presenting the source code tape and the final execution were too great to allow widespread student use. Hence was born the later "load-and-go" SCALP, A Self Contained Algol Processor.

Since the limited size of the LGP-30 precluded a full implementation of ALGOL 60, features requiring run-time storage allocation (arrays called by value, own arrays, dynamic arrays, strings, and recursion) were omitted; but the implementation did include parameters called by name, using "thunks" (P. Ingerman, 1961; E. T. Irons and W. Feurzeig, "Comments on the implementation of recursive procedures and blocks in ALGOL 60," Communications of the ACM 4:1, Jan. 1961, pp. 65-69), and integer labels. The compiler is based on Garland's extension of the method of Samelson and Bauer for compiling arithmetic expressions [Samelson and Bauer, "Sequential formula translation," Communications of the ACM 3:2, Feb. 1960, pp. 76-83].

ALGOL 30 is similar to SMALGOL-61, which is slightly more restrictive.

[Download PDF]

Procedure Manual for ALGOL-30 (CCM-5, 1962)

This manual describes how to use the three-pass ALGOL-30 system on the LGP-30 computer.

  1. A compiler uses a photoelectric reader to read ALGOL 30 programs punched on paper tape and produces an object tape in a semi-symbolic code called SNAP.
  2. A loader loads the SNAP object tapes and all necessary function tapes (in relocatable hex), converts SNAP into machine language, and links procedures.
  3. An interpreter performs all arithmetic, including integer arithmetic, handles input and output, and performs all necessary bookkeeping operations; the only sequences that are performed in machine language are the Boolean operations.

[Download PDF]

A Manual for SCALP, a Self Contained Algol Processor for the LGP-30 (1962)

An early manual for SCALP, an implementation of a subset of ALGOL 60 more easily usable by undergraduates than the multi-pass ALGOL-30 system. This manual was superceded by a more extensive manual in 1964.

[Download PDF]

SCALP Block Diagrams (CCM-8A, 1963)

These block diagrams describe the operation of the SCALP compiler, which follows the last-in, first-out translation process proposed by K. Samelson and F. L. Bauer ("Sequential formula translation," Communications of the ACM 3:2, Feb. 1960, pp. 76-83) and the method of symbol table construction proposed by Francis A. Williams ("Handling identifiers as internal symbols in language processors," Communications of the ACM 2:6, June 1959, pp. 21-24). The coding sheets appear in a companion memorandum, CCM-8B, while the library of special functions is documented in CCM-8C.

[Download PDF]

SCALP Coding Sheets (CCM-8B, 1963)

These coding sheets provide machine language code for the LGP-30 implementation of the SCALP compiler. Block diagrams for the code appear in a companion memorandum, CCM-8A.

[Download PDF]

A Manual for SCALP, being a Self Contained Algol Processor for the General Precision LGP-30 (CCM-7A, 1964)

SCALP provides an implementation of a subset of ALGOL 60 that was suitable for use by undergraduates. Whereas the earlier ALGOL-30 system supported a much larger subset of ALGOL 60, it required users to load three system tapes and two program tapes before getting any output from their programs. SCALP requires loading but a single system tape.

SCALP does not recognize any blocks (except for the entire program), procedure declarations, conditional expressions (conditional statements are recognized in their full generality), constructs other than while in a for statement, nested switch declarations (nested calls are permitted), or boolean variables and operators. It requires that all symbols be separated by stop codes (i.e., by the flexowriter STOP CODE key).

[Download PDF]

LGP-30 Operations Manual (Royal McBee, 1959)

This manual describes the operation of the LGP-30 computer, a desk-sized machine with 4096 32-bit (one of which is a spacer bit) words of memory on a magnetic drum rotating at 4000 rpm, input and output via a typewriter and punched paper tape, and 16 operation codes.

[Download PDF]