RTL/2

Last updated

RTL/2
Paradigms Multi-paradigm: imperative, structured, real-time
Family ALGOL
Designed by J.G.P. Barnes
Developer Imperial Chemical Industries
First appeared1972;50 years ago (1972)
Typing discipline static, strong, safe, structural
Scope Lexical
Platform PDP-11, VAX
OS Cross- (multi-) platformRSX-11M, VMS
Dialects
none
Influenced by
ALGOL 68

RTL/2 (Real-Time Language) is a discontinued high-level programming language for use in real-time computing, developed at Imperial Chemical Industries, Ltd. (ICI), by J.G.P. Barnes. It was originally used internally in ICI but was distributed by SPL International in 1974. [1] It was based on concepts from ALGOL 68, and intended to be small and simple. [2] [3] [4] RTL/2 was standardised in 1980 by the British Standards Institution. [5]

Contents

Language overview

The data types in RTL/2 were strongly typed, with separate compiling. The compilation units contained one or more items named bricks, i.e.:

A procedure brick was a procedure, which may or may not return a (scalar) value, have (scalar) parameters, or have local (scalar) variables. The entry mechanism and implementation of local variables was reentrant. Non-scalar data could only be accessed via reference (so-called REF variables were considered scalar).

A data brick was a named static collection of scalars, arrays and records. There was no heap or garbage collection, so programmers had to implement memory management manually.

A stack brick was an area of storage reserved for running all the procedures of a single process and contained the call stack, local variables and other housekeeping items. The extent to which stack bricks were used varied depending on the host environment in which RTL/2 programs ran.

Access to the host environment of an RTL/2 program was provided via special procedure and data bricks called SVC procedures and SVC data. These were accessible in RTL/2 but implemented in some other language in the host environment.

Hello World

TITLE Hello World;  LET NL=10;  EXT PROC(REF ARRAY BYTE) TWRT;  ENT PROC RRJOB() INT; TWRT("Hello World#NL#"); RETURN(1); ENDPROC; 

Embedded assembly

RTL/2 compiles to assembly language and provides the CODE statement to allow including assembly language in RTL/2 source code. This is only available when compiled with a systems programming option (CN:F)

The CODE statement takes two operands: the number of bytes used by the code insert and the number of bytes of stack used.

Within code statements two trip characters are used to access RTL/2 variables. These vary between different operating systems. On a Digital Equipment Corporation (DEC) PDP-11 running RSX-11M, and a VAX running VMS, the trip characters are * and /.

While the specifics varied by operating system the following is an example of a code insert on VAX/VMS:

CODE6,0;JMPCODE_ENT; This code insert can be set to a fixed length as it jumps to a new psect.; this method is especially useful on systems such as VMS where the length of; instructions is variable.SAVE_PSECT; Save current program section.PSECTASMB_CODE,EXE,NOWRT,LONGCODE_ENT:MOVL*PARAM1(AP),*COUNTER/MYDATAJMPCODE_EX.RESTORE_PSECTCODE_EX:*RTL

This code insert moves the value of a variable passed into the RTL/2 procedure into a variable named COUNTER in a data brick named MYDATA.

Reserved words

  • ABS
  • AND
  • ARRAY
  • BIN
  • BLOCK
  • BY
  • BYTE
  • CODE
  • DATA
  • DO
  • ELSE
  • ELSEIF
  • END
  • ENDBLOCK
  • ENDDATA
  • ENDPROC
  • ENT
  • EXT
  • FOR
  • FRAC
  • GOTO
  • HEX
  • IF
  • INT
  • LABEL
  • LAND
  • LENGTH
  • LET
  • LOR
  • MOD
  • NEV
  • NOT
  • OCT
  • OF
  • OPTION
  • OR
  • PROC
  • REAL
  • REF
  • REP
  • RETURN
  • RTL
  • SHA
  • SHL
  • SLA
  • SLL
  • SRA
  • SRL
  • STACK
  • SVC
  • SWITCH
  • THEN
  • TITLE
  • TO
  • VAL
  • WHILE

Related Research Articles

MUMPS, or M, is a high performance transaction processing key–value database with integrated programming language. It was originally developed at Massachusetts General Hospital for managing hospital laboratory information systems.

VAX Line of computers sold by Digital Equipment Corporation

VAX is a series of computers featuring a 32-bit instruction set architecture (ISA) and virtual memory that was developed and sold by Digital Equipment Corporation (DEC) in the late 20th century. The VAX-11/780, introduced October 25, 1977, was the first of a range of popular and influential computers implementing the VAX ISA. The VAX family was a huge success for DEC - over 100 models were introduced over the lifetime of the design, with the last members arriving in the early 1990s. The VAX was succeeded by the DEC Alpha, which included several features from VAX machines to make porting from the VAX easier.

OpenVMS Computer operating system

OpenVMS, often referred to as just VMS, is a multi-user, multiprocessing virtual memory-based operating system designed to support time-sharing, batch processing, transaction processing and workstation applications. It was first announced by Digital Equipment Corporation (DEC) as VAX/VMS alongside the VAX-11/780 minicomputer in 1977. OpenVMS has subsequently been ported to run on DEC Alpha systems, the Itanium-based HPE Integrity Servers, and select x86-64 hardware and hypervisors. Since 2014, OpenVMS is developed and supported by a company named VMS Software Inc. (VSI).

Peripheral Interchange Program (PIP) was a utility to transfer files on and between devices on Digital Equipment Corporation's computers. It was first implemented on the PDP-6 architecture by Harrison "Dit" Morse early in the 1960s. It was subsequently implemented for DEC's operating systems for PDP-10, PDP-11, and PDP-8 architectures. In the 1970s and 1980s Digital Research implemented PIP on CP/M and MP/M.

RSTS/E Computer operating system

RSTS is a multi-user time-sharing operating system, initially developed by Evans Griffiths & Hart of Boston, and acquired by Digital Equipment Corporation for the PDP-11 series of 16-bit minicomputers. The first version of RSTS was implemented in 1970 by DEC software engineers that developed the TSS-8 time-sharing operating system for the PDP-8. The last version of RSTS was released in September 1992. RSTS-11 and RSTS/E are usually referred to just as "RSTS" and this article will generally use the shorter form.

BLISS is a system programming language developed at Carnegie Mellon University (CMU) by W. A. Wulf, D. B. Russell, and A. N. Habermann around 1970. It was perhaps the best known system programming language until C debuted a few years later. Since then, C became popular and common, and BLISS faded into obscurity. When C was in its infancy, a few projects within Bell Labs debated the merits of BLISS vs. C.

IDL, short for Interactive Data Language, is a programming language used for data analysis. It is popular in particular areas of science, such as astronomy, atmospheric physics and medical imaging. IDL shares a common syntax with PV-Wave and originated from the same codebase, though the languages have subsequently diverged in detail. There are also free or costless implementations, such as GNU Data Language (GDL) and Fawlty Language (FL).

DIBOL or Digital's Business Oriented Language is a general-purpose, procedural, imperative programming language, designed for use in Management Information Systems (MIS) software development.

BASIC-PLUS is an extended dialect of the BASIC programming language that was developed by Digital Equipment Corporation (DEC) for use on its RSTS/E time-sharing operating system for the PDP-11 series of 16-bit minicomputers in the early 1970s through the 1980s.

Addressing modes are an aspect of the instruction set architecture in most central processing unit (CPU) designs. The various addressing modes that are defined in a given instruction set architecture define how the machine language instructions in that architecture identify the operand(s) of each instruction. An addressing mode specifies how to calculate the effective memory address of an operand by using information held in registers and/or constants contained within a machine instruction or elsewhere.

POP-2 is a programming language developed around 1970 from the earlier language POP-1 by Robin Popplestone and Rod Burstall at the University of Edinburgh. It drew roots from many sources: the languages LISP and ALGOL 60, and theoretical ideas from Peter J. Landin. It used an incremental compiler, which gave it some of the flexibility of an interpreted language, including allowing new function definitions at run time and modification of function definitions while a program was running, without the overhead of an interpreted language.

VSI BASIC for OpenVMS is the latest name for a dialect of the BASIC programming language created by Digital Equipment Corporation (DEC) and now owned by VMS Software Incorporated (VSI). It was originally developed as BASIC-PLUS in the 1970s for the RSTS-11 operating system on the PDP-11 minicomputer. It was later ported to OpenVMS, first on VAX, then Alpha, and most recently Integrity.

Richard "Dick" Irvin Hustvedt was a renowned software engineer., designer and developer of several operating systems including Digital Equipment Corporation's RSX-11, and VMS.

MACRO-11 is an assembly language with macro facilities for PDP-11 minicomputers from Digital Equipment Corporation (DEC). It is the successor to PAL-11, an earlier version of the PDP-11 assembly language without macro facilities.

S-algol is a computer programming language derivative of ALGOL 60 developed at the University of St Andrews in 1979 by Ron Morrison and Tony Davie. The language is a modification of ALGOL to contain orthogonal data types that Morrison created for his PhD thesis. Morrison would go on to become professor at the university and head of the department of computer science. The S-algol language was used for teaching at the university at an undergraduate level until 1999. It was also the language taught for several years in the 1980s at a local school in St. Andrews, Madras College. The computer science text Recursive Descent Compiling describes a recursive descent compiler for S-algol, implemented in S-algol.

ALGOL 68RS is the second ALGOL 68 compiler written by I. F. Currie and J. D. Morrison, at the Royal Signals and Radar Establishment (RSRE). Unlike the earlier ALGOL 68-R, it was designed to be portable, and implemented the language of the Revised Report.

The PDP-11 architecture is a CISC instruction set architecture (ISA) developed by Digital Equipment Corporation (DEC). It is implemented by central processing units (CPUs) and microprocessors used in PDP-11 minicomputers. It was in wide use during the 1970s, but was eventually overshadowed by the more powerful VAX-11 architecture in the 1980s.

Charm is a computer programming language devised in the early 1990s with similarities to the RTL/2, Pascal and C languages in addition to containing some unique features of its own. The Charm language is defined by a context-free grammar amenable to being processed by recursive descent parser as described in seminal books on compiler design.

In computer programming, a subroutine is a sequence of program instructions that performs a specific task, packaged as a unit. This unit can then be used in programs wherever that particular task should be performed.

Synergy DBL is a compiled, imperative programming language designed for business use. The language was originally called DBL; later it was referred to as Synergy Language; as of 2012 the official name is Synergy DBL. It is based on Digital Equipment Corporation’s DIBOL programming language.

References

  1. Barnes, J.G.P. (September 1980). "The Standardisation of RTL/2". Software: Practice and Experience. Wyley. 10 (9): 707–719. doi:10.1002/spe.4380100904. S2CID   5050804.
  2. RTL/2 Language Specification
  3. "The Encyclopedia of Computer Languages". Archived from the original on 10 March 2011.
  4. Barnes, J.G.P. (1 January 1976). RTL/2 design and philosophy. Heyden. ISBN   978-0855012243.
  5. BS 5904:1980: Specification for computer programming language RTL/2. British Standards Institution. 30 September 1980. ISBN   978-0580114410.

SPL documentation

SPL published a range of documentation for RTL/2. Each such document was assigned a reference number. The following is an incomplete list.

RTL/2 Ref 1  – RTL/2 Language Specification RTL/2 Ref 2  – Introduction to RTL/2 RTL/2 Ref 3  – RTL/2 Training Manual RTL/2 Ref 4  – System Standards RTL/2 Ref 5  – Stream I/O RTL/2 Ref 18 – Hints on writing RTL/2 Programs RTL/2 Ref 26 – Language Reference Card RTL/2 Ref 39 – Run time environment on the PDP-11 RTL/2 Ref 63 – User Manual for the PDP-11 under RSX-11M RTL/2 Ref 107 – VAX/VMS RTL/2 User Manual RTL/2 REF 130 – The RTL/2 32-bit run time environment on the VAX