BS 5904 specifies the semantics and syntax of the computer programming language RTL/2 by specifying requirements for a compiler and for a conforming program.
Note: The specification requirements have been drafted so that all features of RTL/2 are either explicitly defined, or explicitly stated to have been left intentionally undefined.
Appendix A contains information regarding input/output. Appendix B contains information on error recovery. Appendix C makes a recommendation on compiler limits.
BS 5904 on computer programming language RTL/2 is useful for:
In drafting BS 5904 the continued stability of RTL/2 has been a prime objective. BS 5904 includes the scope of record component names, strings, LET definitions, equality of label values, and the character set. These alterations have been carefully designed to correct features of the original specification that with hindsight have proved to be inappropriate and yet do not alter the semantics of valid programs.
RTL/2 provides a method for writing both application and system programs for use in real-time computing and is especially suited for online data acquisition, communication, and control systems.
The overall objectives of the language are:
RTL/2 is designed to be as machine-independent as practicable even at the expense of certain (probably obsolescent) machine architectures. RTL/2 recognizes, however, that operating systems need a degree of flexibility that is incompatible with the security needs of application programs.
Accordingly, BS 5904 provides RTL/2 comprising of two languages, the full language being the system language, and a secure subset (see 7.6) being the application language.
It is virtually impossible to define precisely a high-level language so that programs will be executed equally efficiently by all types of computers. It has therefore been necessary to leave certain areas of RTL/2 deliberately unspecified so that implementations can take the best advantage of the characteristics of particular computers. The most, important of these areas ensured by BS 5904 are:
Such areas are indicated in BS 5904 by the use of phrases such as “implementation-dependent”. On the other hand, it should be noted that the representation of integer values has been explicitly specified to be in twos-complement forms; thus, implementations of RTL/2 on computers that do not use this representation will be less efficient.
An RTL/2 complex consists of a collection of items known as bricks, of which there are the following types:
Note: As a language, RTL/2 imposes few constraints on the design of multitasking systems and the actual facilities of such systems are outside the scope of BS 5904. It is, however, possible to describe in outline the intended relationships between the various bricks in a multitasking system.