PL516 provides only the facilities that are provided by the hardware of the Series 16 machines. This has a major effect on the PL516 language. For example, it is not possible to use expressions whose evaluation would require the use of temporary storage. Since return addresses of procedures are stored in the first location of the procedure, rather than on a stack, recursion is not available (although there are ways to achieve recursion). There is no dynamic storage allocation in PL516.
An early report on PL516 is available. I am indebted to B. A. Wichman for the PDF version of this report.
The text of the compiler (itself in PL516) along with other PL516 examples can be found in the tables below.
|PL516/88||HTML text file||A relatively early version of the compiler from around 1971, I think.|
|PL516/99||pl516_99.ptp||A binary release of the compiler, later than the PL516/88 source code (above), complete with text editor.|
|PL516 from NPL report COM 65, 1973||HTML text file||A later version of the compiler, published as source
code in the NPL report. This version is intended for use
with a disk operating system, and on entry asks where to
get the souce code, expecting either a
|PL516 NPL COM 65, modified for papertape||HTML text file||A lightly modified (by me) version of the compiler,
with default input from papertape. The original
functinality (asking for the location of the source code)
is retained in a fourth entry point
|Perle||HTML text file||This is the example program given in "An
ALGOL-like Assembly Language for a Small Computer"
Software - Practice and Experience,
John Wiley and Sons, Ltd. The code
here has been modified to reflect later changes in the
language. (For example in that early report "=" was still
used as the assignment operator instead of ":=" that was
The program implements a C.A.C.M. algorithm, producing all possible permutations of the five characters "01234" on the ASR.
|Condition test||HTML text file||This is the first example program given in the "PL-516 PROGRAMMERS REFERENCE MANUAL", January 1970 (which was later issued as "PL516, An Algol-like assembler for the DDP-516", CCU9, National Physical Laboratory B A Wichmann).|
|Prime number square||HTML text file||This is the example program given in
NPL REPORT COM. 65, "PL-516 in PL-516, THE
TEXT, SYNTAX AND INFORMAL DESCRIPTION OF A HIGH LEVEL
ASSEMBLER.", Donald A. Bell,
The program prints out a square, "...consecutive integers are written into the square in spiral form ... The non-prime numbers are replaced by asterisks and the prime numbers tend to form long diagonal lines." The example run given in the report starts from 41 with a square of size 18.
|Coredump||HTML text file||Produces a "Self Loading System Tape"|
|99 Bottles of Beer||HTML text file||This is an example of PL-516 that I submitted to the 99 Bottles of Beer web site, which shows the same simple program coded in many different languages.|