One of the features of RSTS is the means for the execution of programs and the environment used to run them. The various environments allowed for programming in BASIC-PLUS, the enhanced and hard compiled BASIC-Plus-2, and in more traditional programming languages such as
COBOL (eventually upgraded to COBOL-85) and
FORTRAN IV (eventually upgraded to FORTRAN-77). Other languages were supported such as
DIBOL and
MUMPS. These environments were separate from each other such that one could start a program from one environment and the system would switch to a different environment while running a different program, and then return the user to the original environment they started with. These environments were referred to as a Runtime System (
RTS). The term for the
command line interface that most of these RTSs had was the
KBM. Prior to Version 9, the systems manager needed to define which RTS the system would start under, and it had to be one that would execute compiled programs. A systems manager may also install special
CCL (concise command language) commands, which take precedence over all KBM commands (with the exception of
DCL). A CCL is analogous to a shortcut to a program on a Windows system or a
symbolic link on Unix-based systems. CCLs are installed as a
memory-resident command either during startup, or dynamically while the system is running by a system's manager (i.e.: it is not permanent like a disk file). When logged in, a user can "SWITCH" to any of these environments, type language statements in the BASIC-PLUS programming language, issue RUN commands to specific programs, or issue a special command called a
CCL to execute a program with command options. Most RSTS systems managers generated the kernel to include the "Control-T" one line status option which could tell the user what program they were running, under what
RTS the program was using, how much memory the program was taking, how much it could expand to, and how much memory the
RTS was using.
BASIC-PLUS Programs written in
BASIC-PLUS ran under the BASIC
RTS, which allowed them up to 32K bytes of memory (out of 64K total). The language was interpreted, each different keyword being internally converted to a unique
byte code and the variables and data being indexed and stored separately within the memory space. The internal byte-code format was known as PCODE. When the interactive SAVE command was issued, the BASIC Plus
RTS simply saved the working memory area to a disk file with a ".BAC" extension. Although this format was undocumented, two Electronic Engineering undergraduates from
Southampton University in the UK (Nick de Smith and David Garrod) developed a
decompiler that could
reverse engineer BAC files into their original BASIC-Plus source, complete with original line numbers and variable names (both subsequently worked for DEC). The rest of the memory was used by the BASIC
RTS itself. If one wrote programs in a language that permitted true binary executables such as BASIC-Plus-2, FORTRAN-IV, or Macro Assembler, then the amount of memory available would be 56K (8K allocated to the
RTS). The standard BASIC-PLUS prompt is the "Ready" response, pressing
Control-T displays status (example):
DCL (Digital Command Language) Starting with Version 9,
DCL became the primary startup
RTS even though it does not have the ability to execute binary programs. This became possible with the advent of the disappearing RSX
RTS (see below).
DCL was incorporated into all of the recent versions of DEC's operating systems (RSX-11, RT-11,
VMS, and later
OpenVMS) for compatibility. The standard
DCL prompt is the dollar "$" sign (example): $ write 0 "Hello World, it is "+F$TIME() Hello World, it is 01-Jan-08 10:20 PM $ inquire p1 "Press Control-T for 1 line status:" Press Control-T for 1 line status: 1 KB0 DCL+DCL KB(0R) 4(8)K+24K 0.1(+0.1) -8 $ set verify/debug/watch $ show memory (show memory) (SYSTAT/C) Memory allocation table: Start End Length Permanent Temporary 0K - 85K ( 86K) MONITOR 86K - 1737K (1652K) (User) 1738K - 1747K ( 10K) (User) DAPRES LIB 1748K - 1751K ( 4K) (User) RMSRES LIB 1752K - 2043K ( 292K) ** XBUF ** 2044K - *** END *** $
RSX (Realtime System eXecutive) Programs that were written for the RSX
RTS such as COBOL, Macro Assembler, or later releases of BASIC-Plus-2, could use the maximum amount of memory available for a binary program (56K due to the requirements of an
RTS needing the top 8K to use for itself). RSTS Version 7 and later allowed the RSX
RTS to be included in the kernel, making it completely "disappear" from the user address space, thus allowing 64K bytes of memory for user programs. Programs got around the limitations of the amount of available memory by using libraries (when permissible), by complicated overlay strategies, or by calling other programs ("Chaining") and passing them commands and data in a shared memory area called "Core Common," among other practices. When RSX is the default
KBM, the standard RSX prompt (both logged in and logged out) is the ">" (or MCR "Monitor Console Routine") sign (example): >run Please type HELLO >HELLO 1,1;SECRET >run ?What? >help Valid keyboard commands are: ASSIGN DISMOUNT HELP RUN UNSAVE BYE EXIT MOUNT SHUTUP DEASSIGN HELLO REASSIGN SWITCH >run CSPCOM CSP>HWORLD=HWORLD CSP>^Z >RUN TKB TKB>HWORLD=HWORLD,LB:CSPCOM.OLB/LB TKB>// >run HWORLD.TSK Hello World Press Control-T for 1 line status: ? 1 KB0 HWORLD+...RSX KB(0R) 7(32)K+0K 0.8(+0.2) +0 >DIR HWORLD.*/na/ex/si/pr SY:[1,2] HWORLD.BAS 1 HWORLD.BAC 7C HWORLD.OBJ 2 HWORLD.TSK 25C Total of 35 blocks in 4 files in SY:[1,2] >
RT-11 The RT-11
RTS emulated the Single Job version of the RT-11 distribution. Like the RSX emulation, RT-11 occupied the top 8K of memory, leaving the bottom 56K for
CUSPS, programs written in FORTRAN-IV or Macro Assembler. When RT-11 is the default
KBM, the standard RT-11 prompt (both logged in and logged out) is the "." sign (example): .VERSION Please type HELLO .HELLO 1,1;SECRET .VERSION RT-11SJ V3-03; RSTS/E V8.0 .R PIP • HWORLD.MAC=KB: .MCALL .TTYIN,.PRINT,.EXIT HWORLD: .ASCII /Hello World/ .ASCIZ /Press Control-T for 1 line status:/ .EVEN Start: .PRINT #HWORLD .TTYIN .EXIT .END START ^Z • ^Z .R MACRO HWORLD=HWORLD • ^Z .R LINK • HWORLD=HWORLD • ^Z .R HWORLD.SAV Hello World Press Control-T for 1 line status: 1 KB0 HWORLD+RT11 KB(0R) 2(28)K+4K 0.6(+0.2) +0 ..DIR HWORLD.*/na/ex/si/pr SY:[1,2] HWORLD.BAS 1 HWORLD.BAC 7C HWORLD.TSK 25C HWORLD.MAC 1 HWORLD.OBJ 1 HWORLD.SAV 2C Total of 37 blocks in 6 files in SY:[1,2] .
TECO (Text Editor and COrrector) The
TECO editor was itself implemented as an RTS to maximize the amount of memory available for the editing buffer, and also because it was first implemented in RSTS V5B, before the release of the general purpose runtime systems (RSX and RT11). TECO was the only RTS distributed with RSTS that did not contain a built-in KBM. The user would start up TECO (like any other program) by running a TECO program (TECO.TEC). TECO and the affine QEDIT were the direct ancestors of the first UNIX-based text editor, ED. Most RSTS systems used CCL's to create a file (MAKE filespec), edit a file (TECO filespec), or run a TECO program (MUNG filespec, data). The following program is an example of how TECO could be used to calculate
pi (currently set to 20 digits): Ready run TECO • GZ0J\UNQN"E 20UN ' BUH BUV HK QN QQ/10UT QH+QT+48UW QW-58"E 48UW %V ' QV"N QV^T ' QWUV QQ-(QT*10)UH > QV^T @^A/ /HKEX$$ 31415926535897932384 Ready ==RSTS easter eggs==