RTL/2
From Wikipedia, the free encyclopedia
| Paradigms | Multi-paradigm: imperative, structured, real-time |
|---|---|
| Family | ALGOL |
| Designed by | J.G.P. Barnes |
| Developer | Imperial Chemical Industries |
| First appeared | 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]
The data types in RTL/2 were strongly typed, with separate compiling. The compilation units contained one or more items named bricks, i.e.:
- Procedure bricks
- Data bricks
- Stack bricks
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;