User Tools

Site Tools


vintage_systems:rt11

DEC RT-11 Survival Guide

What is RT-11?

RT-11 (Real-Time 11) is a disk-based, real-time operating system developed by Digital Equipment Corporation (DEC) for its popular line of PDP-11 minicomputers. First released in 1970, RT-11 was designed to be lightweight, fast, and highly responsive, making it ideal for real-time applications such as industrial control, scientific data acquisition, and laboratory automation. Unlike DEC's more complex timesharing system (RSTS/E) or the later UNIX-like RSX-11, RT-11 focused on simplicity and low overhead, often running comfortably on machines with as little as 28 KB of memory.

RT-11 gained widespread popularity throughout the 1970s and early 1980s due to its efficiency and ease of use. It supported both foreground and background job processing, allowing a high-priority real-time task to run concurrently with an interactive user session. The system's command-line interface, based on the Keyboard Monitor (KMON), was known for being straightforward and responsive even on floppy-disk-based systems. Many early microcomputer operating systems, including CP/M and even the first versions of MS-DOS, borrowed concepts from RT-11 — most notably its simplified file naming convention (6+3 characters) and command structure. Although DEC phased out RT-11 in the late 1980s in favor of RSX-11 and later VMS, the operating system maintains a loyal following among PDP-11 enthusiasts, collectors, and retrocomputing hobbyists, and it continues to run on emulators like SIMH today.

RT-11 Command Reference

RT-11 commands are interpreted by the Keyboard Monitor (KMON). Commands can be abbreviated to the first four unique characters. Wildcard `*` is supported.

Basic RT-11 Commands Table

Command Function Basic Example
DIRECTORY (or DIR) Lists the files on a device or directory .DIR DX1:
COPY Copies files from one device or location to another .COPY DX0:. DY1:.
TYPE Displays the contents of a text file on the terminal .TYPE STARTS.COM
RUN Loads and starts an executable program (usually .SAV files) .RUN DUNGEO
DELETE Removes one or more files from a disk .DELETE TEMP.DAT
RENAME Changes the name of an existing file .RENAME OLDNAME.NEW NEWNAME.NEW
INITIALIZE Prepares (formats) a disk volume for use with RT-11, creating a new directory .INITIALIZE DY1:
SHOW Displays information about the system configuration, resident devices, and jobs .SHOW
SQUEEZE Rearranges files on a disk to reclaim “free” space left by deleted files (like a defragmenter) .SQUEEZE DK0:
HELP Displays information about a specific command or general system usage .HELP COPY
@ Executes a command file (batch processing) @STARTF.COM
SET Controls various system options and device characteristics .SET TERMINAL WIDTH:80
SETUP Configures hardware characteristics for specific devices .SETUP TERMINAL LIGHT
DATE Displays or sets the current system date .DATE 25-DEC-1985
TIME Displays or sets the current system time .TIME 14:30

RT-11 File Specification Format Table

Component Format Description Example
Device ddn: Physical or logical drive identifier DX0:, RK1:, DL0:
Filename 1-6 characters User-assigned file name PROG1, START
Type 1-3 characters File type identifier .SAV, .MAC, .TXT, .SYS
Full example ddn:filename.type Complete file specification DX1:MYPROG.SAV

Common Device Names Table

Device Code Description
DX Floppy disk
RK RK05 cartridge disk
DL RL01/RL02 disk
TT Terminal
LP Line printer
SY System device (usually the boot device)

Command Line Control Keys Table

Key Function
CTRL/C Aborts the currently executing command or program
CTRL/O Suppresses terminal output from a command (toggles on/off)
CTRL/S Temporarily suspends output to the terminal
CTRL/Q Resumes terminal output after a CTRL/S
CTRL/U Cancels the current line you are typing
CTRL/B Switches control to the background job
CTRL/F Switches control to the foreground job

Complete Combined Page Example

RT-11 Command Reference

RT-11 commands are interpreted by the Keyboard Monitor (KMON). Commands can be abbreviated to the first four unique characters. The wildcard * is supported.

Basic Commands

Command Function Basic Example
DIRECTORY (DIR) Lists files on a device or directory .DIR DX1:
COPY Copies files .COPY DX0:. DY1:.
TYPE Displays text file contents .TYPE STARTS.COM
RUN Loads and executes a program .RUN DUNGEO
DELETE Removes files .DELETE TEMP.DAT
RENAME Renames a file .RENAME OLD.NEW NEW.NEW
INITIALIZE Formats a disk volume .INITIALIZE DY1:
SHOW Shows system configuration .SHOW
SQUEEZE Defragments a disk .SQUEEZE DK0:
HELP Displays help .HELP COPY
@ Runs a command file @STARTF.COM
SET Sets system options .SET TERMINAL WIDTH:80
SETUP Configures hardware .SETUP TERMINAL LIGHT
DATE Sets/shows date .DATE 25-DEC-1985
TIME Sets/shows time .TIME 14:30

File Specification

Component Format Example
Device ddn: DX0:
Filename 1-6 chars PROG1
Type 1-3 chars .SAV
Full ddn:filename.type DX1:MYPROG.SAV

Common Device Names

Code Device
DX Floppy disk
RK RK05 cartridge disk
DL RL01/RL02 disk
TT Terminal
LP Line printer
SY System device

Control Keys

Key Function
CTRL/C Abort command/program
CTRL/O Toggle output suppression
CTRL/S Pause output
CTRL/Q Resume output
CTRL/U Cancel current line
CTRL/B Switch to background job
CTRL/F Switch to foreground job

BASIC-11

Command Function Example
FREE Displays the amount of RAM memory currently available for program statements and variables [citation:1]. FREE
LIST Lists the current program lines on the terminal. LIST 100-200
LOAD Loads a specified .BAS file from disk into memory. LOAD “PROG1”
NEW Clears the current program from memory. NEW
OLD Equivalent to LOAD (used in some DEC BASIC versions). OLD “PROG1”
RUN Executes the program currently in memory. RUN
SAVE Saves the current program to a disk file. SAVE “PROG1”
SYSTEM Exits BASIC and returns to the RT-11 Monitor prompt (`.`). SYSTEM
Statement Function Example
DATA Holds numeric and string constants used by READ statements. 100 DATA 10, 20, “HELLO”
DIM Allocates space for arrays. 20 DIM A(10), B$(5)
END Terminates program execution. 999 END
FOR…TO…STEP Creates a loop that executes a block of code repeatedly. 30 FOR I=1 TO 100 STEP 2
GOSUB Branches to a subroutine. 150 GOSUB 1000
GOTO Unconditionally branches to a specified line number. 50 GOTO 200
IF…THEN…ELSE Conditionally executes code. 60 IF X=10 THEN PRINT “YES” ELSE PRINT “NO”
INPUT Accepts input from the terminal. 70 INPUT “ENTER VALUE”; A
LET Assigns a value to a variable (usually optional). 80 LET X = 5 (or 80 X=5)
NEXT Marks the end of a FOR loop. 40 NEXT I
ON…GOTO / GOSUB Computed branch. 90 ON I GOTO 100,200,300
READ Assigns a value from a DATA statement to a variable. 110 READ A, B, C$
REM Inserts a comment or remark. 10 REM THIS IS A COMMENT
RESTORE Resets the DATA pointer, allowing READ statements to start over. 120 RESTORE
RETURN Returns from a GOSUB subroutine. 2000 RETURN
SLEEP Puts the processor into low-power “Stop Mode” (hardware specific) [citation:1]. 710 SLEEP
STOP Halts program execution and returns to the command prompt. 95 STOP
Function Description Example
ABS(X) Returns the absolute value of X. ABS(-10) returns 10
CHR$(N) Returns the ASCII character corresponding to the code N. CHR$(65) returns “A”
COS(X) Returns the cosine of angle X (in radians). COS(0) returns 1
INT(X) Returns the integer part of X (floor function). INT(3.7) returns 3
LEFT$(A$,N) Returns the leftmost N characters of string A$. LEFT$(“HELLO”,2) returns “HE”
LEN(A$) Returns the number of characters in string A$. LEN(“TEST”) returns 4
MID$(A$,P,N) Returns N characters from string A$ starting at position P. MID$(“HELLO”,2,2) returns “EL”
ONTIME(GOSUB) Causes an interrupt to occur after a specified system time interval [citation:1]. 100 ONTIME 10 GOSUB 5000
POS Returns the current print head position. PRINT POS
RIGHT$(A$,N) Returns the rightmost N characters of string A$. RIGHT$(“HELLO”,2) returns “LO”
RND Returns a random number between 0 and 1. X = RND
SIN(X) Returns the sine of angle X (in radians). SIN(1.5708) returns 1
SQR(X) Returns the square root of X. SQR(25) returns 5
STR$(X) Converts a numeric value X into a string. STR$(123) returns “123”
TIME Returns the current system time counter [citation:1]. PRINT TIME
VAL(A$) Converts the string A$ into a numeric value. VAL(“123”) returns 123

### 💡 Tips for Using This Documentation

1. Line Numbers Only: The BASIC-11 on RT-11 is a traditional line-numbered BASIC. You cannot execute statements like `PRINT “HELLO”` directly unless you type it as `PRINT “HELLO”` in immediate mode or include it in a numbered line.

2. Check Syntax with “SYN”: While older BASIC-11 versions don't have a built-in HELP, they often support the `SYN` (Syntax check) command. Typing `SYN` followed by a line number or range will check syntax without executing the code [citation:2].

3. String Handling: Most standard string functions (`LEFT$`, `RIGHT$`, `MID$`, `LEN`) are available. String variables are denoted by a `$` suffix (e.g., `A$`, `NAME$`).

vintage_systems/rt11.txt · Last modified: by smj