Jump to content

PL360

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by Comp.arch (talk | contribs) at 13:01, 28 September 2016 (E.g. ndash). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

PL360 (or PL/360) is a programming language designed by Niklaus Wirth and written by Niklaus Wirth, Joseph W. Wells, Jr., and Edwin Satterthwaite, Jr. for the IBM System/360 computer at Stanford University. A description of PL360 was published in early 1968, although the implementation was probably completed before Wirth left Stanford in 1967.[1]

Description

PL/360 is a one pass compiler with a syntax similar to Algol that provides facilities for specifying exact machine language instructions and registers similar to assembly language, but also provides features commonly found in high-level languages, such as complex arithmetic expressions and control structures. Wirth used PL360 to create Algol W.

Data types were:[2]: p.2-1 

  • Byte or character – a single byte.
  • Short integer – 2 bytes, interpreted as an integer in two's complement binary notation.
  • Integer or logical – 4 bytes, interpreted as an integer in two's complement binary notation.
  • Real – 4 bytes, interpreted as a base-16 short floating-point number.
  • Long real – 8 bytes, interpreted as a base-16 long floating-point number.

Registers could contain integer, real, or long real.

Individual System/360 instructions could be generated inline using the PL360 "function statement" that defined an instruction by format and operation code. Function arguments were assigned sequentially to fields in the instruction. Examples are:

definition reference
UNPK(10,#F300) UNPK(3,7,B2,worker)
EX(2,#4400) EX(R1,MVC(0,lines,buffer)) note nested reference

Example

R0, R1, and R2, and FLAG are predeclared names.

   BEGIN INTEGER BUCKET;
        IF FLAG THEN
        BEGIN BUCKET := R0; R0 := R1; R1 := R2;
              R2 := BUCKET;
        END ELSE
        BEGIN BUCKET := R2; R2 := R1; R1 := R0;
             R0 := BUCKET;
        END
        RESET(FLAG);
   END

Implementation

Wirth was at Stanford between 1963 and 1967, during the earlier part of which he was developing his Euler compiler and interpreter, the sources of which are dated 1965. Also in 1965, Stanford updated their drum-based Burroughs B5000 to a disk-based B5500.

Since the target IBM S/360 (which was to replace an existing IBM 7090) was not installed until 1967, the initial implementation of PL360 was written in ALGOL and tested on Stanford's Burroughs B5500 system. Once working, the compiler was then recoded in PL360 itself, recompiled on the Burroughs system, and moved as a binary to the S/360. [1]

It is notable that the B5500 is itself programmed in a high-level ALGOL-derived language (ESPOL), and PL360 brought a comparable facility to the IBM mainframe architecture. Unfortunately this was largely ignored, with programmers continuing to use implementations of IBM's macro assembler: IBM Basic assembly language and its derivatives.

However, in the early 1970s, PL360 was extended to provide more capabilities, and was the programming language of choice for developing SPIRES, Stanford's Database Management System.

See also

References

  1. ^ Wirth, Niklaus (January 1968). "PL360, a Programming Language for the 360 Computers". Journal of the ACM (JACM). 15 (1): 34–74. doi:10.1145/321439.321442. Retrieved October 8, 2012.
  2. ^ Stanford University. "P L 3 6 0 REFERENCE MANUAL". Retrieved October 21, 2012.