.if n .po 12
.hy 14
.nr SE 0 1
.nr SU 0 1
.nr PT 0 1
.de it
.ul
\\$1
..
.	Only works for 2 character arguments
.	The following contains backspace characters
.	Replace when the new nroff is available
.de bd
.if n \\$1\\$1\\$1
.if t .ft B
.if t \\$1
.if t .ft
..
.de hd
.ev 2
.cp
.if t 'tl '-''-'
'sp 2
.tr "'
.ps 9
.if t .if o 'tl 'RT-11 Command Interpreter Maintenance Guide''%'
.if t .if e 'tl '%''RT-11 Command Interpreter Maintenance Guide'
.if n 'tl 'RT-11 Command Interpreter Maintenance Guide''%          '
.tr ""
'sp 2
.ev
..
.de fo
.ev 2
'sp 2
.ps 9
'tl ''Human Computing Resources Corporation''
'bp
.ev
..
.de BE
.wh 0 hd
.wh -6 fo
.nr % 0
..
.de se
.bp
\\n+(SE.
.nr SU 0 1
.nr PT 0 1
.ps +2
.ul
\\$1
.in 0
.br
.ps -2
..
.de su
.br
.ne 8
.sp 2
.nr PT 0 1
.ps +2
.ul
\\$1
.br
.ps -2
..
.de pt
.br
.ne 5
.sp 2
.ps +1
\\n(SE.\\n(SU.\\n+(PT
\\$1
.ps -1
..
.de pg
.br
.ne 2
.sp
..
.de -
.sp
.ti -2
-\\ \\c
..
.de id
Identical to RT-11 SJ.
..
.sp 22
.nf
.ce 100
RT-11 Command Interpreter, Version 2
Maintenance and Installation Guide
.sp
May 1979
.sp 5
Michael D. Tilson
Human Computing Resources Corporation
10 St. Mary Street
Toronto, Ontario, Canada
M4Y 1P9
.sp 2
ABSTRACT
.sp
.ce 0
.fi
.in +3
.ll -5
This document provides notes on maintenance and installation of
the RT-11* keyboard
command interpreter.
The command simulator allows a large subset of the RT-11 commands to be
used under UNIX*, such as MACRO, COPY, DIRECTORY, EDIT, etc.
.sp
Information contained in this document is proprietary and is not to be
transmitted or reproduced
without permission.
.sp 3
.ps -1
* RT-11 is a trademark of Digital Equipment Corp.
.br
* UNIX is a trademark of Bell Laboratories.
.ps +1
.in -3
.ll +5
.BE
.bp
.su Introduction
.pg
This documentation provides information useful for the installation and
maintenance of
.it rtcom,
the RT-11 command interpreter.
Additional information will have been supplied with your distribution disk
or tape.
.su Files
.pg
The following directories are supplied:
.sp
.in +10
.ti -5
cinterp - Source files.
.ti -5
docu - Documentation.
.ti -5
misc - Miscellaneous useful programs.
.ti -5
test - Test data.
.in -10
.su Installation
.pg
In order to install rtcom,
the RT-11 emulator must be installed first.
To do this, consult the
.ul
RT-11 Emulator Maintenance and Installation Guide.
.pg
Before proceeding, consult any "read_me" files supplied with the source.
.pg
To install the command interpreter, simply execute the shell file "run"
supplied with the source.
(Before doing so, you may wish to look at the code for the SET command
in "comm.c".
This command manipulates an "stty" terminal option which is not
installed at most locations.
You may simply make this command be a NOP.)
The resulting binary should be installed in "/usr/bin/rtcom."
.pg
The directory /lib/rt11/dk0 should contain all the RT-11 system files
except for the *.SYS files.
Each site must supply its own copy of the actual RT-11 programs -- they
are not supplied with the emulator nor with the command interpreter.
Each site must obtain its own RT-11 license.
.it Rtcom
uses PIP and DIR for file and directory operations, so these at least
should be installed.
.su "How it Works
.pg
The execution of an RT-11 command proceeds according to the following
sequence:
.pg
1) The low-level lexical analysis splits the input into tokens, and
takes care of comments and the opening of indirect files.
.pg
2) A "yacc" parser determines the rough structure of the command
and builds a parse tree.
.pg
3) If parsing is successful, the parse tree is traversed, and
the appropriate CSI command strings are built.
CSI strings are built even if no RT-11 program is going to be run.
.pg
4)  The command is executed.
In the normal case (an EXTERNAL command) "ru" is called to run the
appropriate program.
In other special cases,
.it rtcom
executes the command itself.
It may examine the CSI switches to determine which options are in effect.
.pg
5)  Any abnormal termination is reported to the user, and the system re-initializes
itself for the next command.
.pg
Most of rtcom is table driven.
(See below.)
These tables unfortunately contain a number of strange flags.
This is because the highly non-uniform structure of RT-11 commands
results in a number of special cases.
.su "New Commands
.pg
The most likely maintenance item is the installation of a new command.
If the command is fairly straightforward, only the file "init.c"
should need modification.
This file contains a command table, with entries for the name of the command,
type of command (anything that is not a special case is type EXTERNAL),
a program name and default CSI input string, a pointer to a table of options,
an input prompt, an output prompt, a number of inputs, a number of outputs,
and a set of flags.
All of this is described more fully in the program comments.
Before installing a new command (e.g. a PASCAL command) one
should look at the entry for a similar command (e.g FORTRAN) to see what
to do.
.pg
Most commands have a table of options.
This option table contains the option name, a CSI switch character,
an option type (often O_SWITCH) and a set of flags.
.su "New Releases of UNIX"
.pg
.it Rtcom
has been designed to compile under any 6th or 7th edition
C compiler.
There are no fundamental dependancies on any non-standard system features.
.it Rtcom
does look at the structure of "core" files, and does contain one "stty".
These may need to be changed for the 7th edition UNIX.
.su "Final Words
.pg
When
.it rtcom
is used by RT-11 users, the most
likely source of trouble will be the keyboard editing conventions.
The User's Guide does not discuss specific details of this, because
the editing conventions are so different at various UNIX sites.
If your site uses `@', `#', and RUBOUT as the interrupt character,
then
.it rtcom
users will experience trouble with indirect files (@FILE.COM) and
with line editing (since they will often kill a program with RUBOUT
when they meant to erase a character.)
This point should be emphasized to
.it rtcom
users who have no UNIX experience.
Alternatively, a TTY driver could be installed which allows CNTL-U,
RUBOUT, and CNTL-C as the line editing and interrupt characters.
Such drivers are available in the UNIX community.
