Movatterモバイル変換


[0]ホーム

URL:


Jump to content
Rosetta Code
Search

Category:RTL/2

Help
From Rosetta Code
This page uses content fromWikipedia. The original article was atRTL/2. The list of authors can be seen in thepage history.As with Rosetta Code, the text of Wikipediais available under theGNU FDL. (See links for details on variance)
Language
RTL/2
Thisprogramming language may be used to instruct a computer to perform a task.
Parameter passing methods:By reference, By value
Type safety:Safe
Type strength:Weak
Type compatibility:Structural
Type expression:Explicit
Type checking:Dynamic, Static
See Also:
Listed below are all of the tasks on Rosetta Code which have been solved using RTL/2.

RTL/2 was a high-level programming language developed atImperial Chemical Industries Ltd byJ.G.P. Barnes. It was originally used internally within ICI but was distributed by SPL International in 1974[1]It was designed for use in real-time computing (hence the acronym RTL = real-time language). Based on concepts fromAlgol 68, it was intended to be a small, simple language.[2][3] RTL/2 was standardised in 1980 by theBritish Standards Institution[4].

RTL/2 was aweakly typed language with separate compilation. Thecompilation units contained one or more items known as "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 wasre-entrant. 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. Programmers had to implement memory management themselves (there was no heap or garbage collection).

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 actually used varied depending upon the host environment in which RTL/2 programs actually 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.

Dropping into Assembler

RTL/2 compiles to assembly language and provides the CODE statement to permit assembly language to be inserted directly into RTL/2 programs. 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 from operating system to operating system. On PDP-11 and VAX/VMS the trip characters are '*' and '/'

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

CODE 6,0;
JMP CODE_ENT ; This code insert can be set to a fixed length as it jumps to a new psect.
; this technique is especially useful on systems such as VMS where the length
; of instructions is variable
.SAVE_PSECT  ; Save current program section
.PSECT ASMB_CODE,EXE,NOWRT,LONG
CODE_ENT:
MOVL *PARAM1(AP),*COUNTER/MYDATA
JMP CODE_EX
.RESTORE_PSECT
CODE_EX:
*RTL

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

Design and Rationale

J. G. P. Barnes describes RTL/2 and the reasons behind some of the design decisions made during its development in his 1976 book RTL/2 Design and Philosophy.

Reserved Words

ABSANDARRAYBINBLOCKBYBYTECODEDATADOELSEELSEIFENDENDBLOCKENDDATAENDPROCENTEXTFORFRACGOTOHEXIFINTLABELLANDLENGTHLETLORMODMODENEVNOTOCTOFOPTIONORPROCREALREFREPRETURNRTLSHASHLSLASLLSRASRLSTACKSVCSWITCHTHENTITLETOVALWHILE

References

SPL Documentation

SPL published a range of documentation for RTL/2. Each of these documents had a reference number assigned. The following is an incomplete list.

RTL/2 Ref 1  - Language SpecificationRTL/2 Ref 2  - Introduction to RTL/2RTL/2 Ref 3  - RTL/2 Training ManualRTL/2 Ref 4  - System StandardsRTL/2 Ref 5  - Stream I/ORTL/2 Ref 18 - Hints on writing RTL/2 ProgramsRTL/2 Ref 26 - Language Reference CardRTL/2 Ref 39 - Run time environment on the PDP-11RTL/2 Ref 63 - User Manual for the PDP-11 under RSX-11MRTL/2 Ref 107- VAX/VMS RTL/2 User ManualRTL/2 REF 130- The RTL/2 32 bit run time environment on the VAX
  1. Barnes J.G.P., The Standardisation of RTL/2, Software Practice and Experience, Volume 10 Issue 9, pp 707 - 719, Wyley, September 1980
  2. RTL/2 Language Specification
  3. http://hopl.murdoch.edu.au/showlanguage2.prx?exp=596#_jmp0_
  4. http://shop.bsigroup.com/en/ProductDetail/?pid=000000000000133906

Code Specimen


This page is a stub. It needs more information! You can help Rosetta Code by filling it in!

Subcategories

This category has the following 3 subcategories, out of 3 total.

Pages in category "RTL/2"

The following 4 pages are in this category, out of 4 total.

Retrieved from "https://rosettacode.org/wiki/Category:RTL/2?oldid=373666"
Categories:
Cookies help us deliver our services. By using our services, you agree to our use of cookies.

[8]ページ先頭

©2009-2026 Movatter.jp