%% LyX 1.3 created this file.  For more info, see http://www.lyx.org/.
%% Do not edit unless you really know what you are doing.
\documentclass[12pt,american]{book}
\usepackage{ae}
\usepackage{aecompl}
\usepackage[T1]{fontenc}
\usepackage[latin1]{inputenc}
\usepackage{geometry}
\geometry{verbose,letterpaper,tmargin=0.75in,bmargin=0.75in,lmargin=1in,rmargin=0.75in}
\pagestyle{headings}
\setcounter{secnumdepth}{3}
\setcounter{tocdepth}{3}
\usepackage{longtable}
\usepackage{amssymb}

\makeatletter

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% LyX specific LaTeX commands.
\providecommand{\LyX}{L\kern-.1667em\lower.25em\hbox{Y}\kern-.125emX\@}
\newcommand{\lyxline}[1]{
  {#1 \vspace{1ex} \hrule width \columnwidth \vspace{1ex}}
}
%% Bold symbol macro for standard LaTeX users
\newcommand{\boldsymbol}[1]{\mbox{\boldmath $#1$}}

%% Because html converters don't know tabularnewline
\providecommand{\tabularnewline}{\\}

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Textclass specific LaTeX commands.
 \newcommand{\lyxaddress}[1]{
   \par {\raggedright #1 
   \vspace{1.4em}
   \noindent\par}
 }
 \newenvironment{lyxcode}
   {\begin{list}{}{
     \setlength{\rightmargin}{\leftmargin}
     \setlength{\listparindent}{0pt}% needed for AMS classes
     \raggedright
     \setlength{\itemsep}{0pt}
     \setlength{\parsep}{0pt}
     \normalfont\ttfamily}%
    \item[]}
   {\end{list}}

\usepackage{babel}
\makeatother
\begin{document}

\title{ITS 1.5 Reference Manual}


\date{\textsc{Massachusetts Institute of Technology}\\
\textsc{Artificial Intelligence Laboratory}\\
MAC-M-377\\
July 1969\\
 Artificial Intelligence\\
Memo No. 161A\\
(Revised 161, June 1968)}


\author{D. Eastlake%
\footnote{Author of this memo%
}, R. Greenblatt, J. Holloway, T. Knight, S. Nelson}

\maketitle
This reference manual consists of two parts. The first (sections 1 through 6)
is intended for those who are either interested in the ITS 1.5 time sharing monitor
for its own sake or who wish to write machine language programs to run under
it. Some knowledge of PDP-6 (or PDP-10) machine language is useful in reading
this part. The second part (sections 7, 8 and 9) describes three programs that
run under ITS. The first program (DDT) is a modified machine language debugging
program that also replaces the {}``monitor command'' level (where the user
is typing directly at the monitor) present in most time-sharing systems. The
remaining two (PEEK and LOCK) are a status display and a miscellaneous utility
program. It should be remembered that the McCulloch Laboratory PDP-6 and PDP-10
installation is undergoing continuous software and hardware development which
may rapidly outdate this manual.

\medskip{}
\begin{center}{*} {*} {*}\end{center}
\medskip{}

Work reported herein was supported by the Warren McCulloch Laboratory, an M.I.T.
research program sponsored by the Advanced Research Projects Agency of the Department
of Defense under Office of Naval Research contract number N00014-70-A-0362-0002.
Reproduction of this document, in whole or in part, is permitted for any purpose
of the United States Government.

\vfill{}\lyxline{\normalsize}\vspace{-1\parskip}
\noindent \textsf{\textit{This manual was transcribed by David Carter from a
scanned, typewritten original between February 27, 2004 and March 10, 2004. Effort
has been put into being as accurate as possible in the transcription process,
but due to the condition of the original, some errors have no doubt been made.
Where there is uncertainty about a particular character or word, a best guess
has been made. Please send any corrections to dcarter at sigfs dot org, especially
if you have page 19 of the original! The original file came from ftp://publications.ai.mit.edu/ai-publications/0-499/AIM-161A.ps
so refer to that if you're in doubt about anything.}}

\smallskip{}
\noindent \textsf{\textit{This came from http://www.sigfs.org/its-reference/
so you should check there for any updates. This file is available in PDF, HTML,
ASCII, \LaTeX{} and the original \LyX{}, so hopefully one of those formats fits
your need. If you convert this file to another widely-used format, please send
me a copy so I can post it.}}
\lyxline{\normalsize}

\tableofcontents{}


\newpage
\section{Introduction}

The reader will find below in section 0.2 a few notes on the notation used in
this manual. This is followed in section 0.3 by fairly extensive introductory
and overview material on the Incompatible Time Sharing system monitor (ITS),
the body of the information which appears in sections 1 through 6. Then in section
0.4 will be found a brief preview of the information appearing in sections 7,
8, and 9 about the three programs DDT, PEEK, and LOCK respectively. The first
of these is a modified machine language debugging program that replaces the {}``monitor
command'' level (where the user is typing directly at the monitor) present in
most time sharing systems. The remaining two are of a status display and miscellaneous
utility nature. These three sections are each fairly self-contained as opposed
to any particular section of the six on ITS which may be highly interdependent
with other ITS sections. Finally, in section 0.5, appears a summary of the appendices
to this manual.

It should be remembered that Project MAC, AI Group, PDP-6 and PDP-10 installation
is undergoing continuous software and hardware development that may rapidly outdate
this manual. Please direct all corrections, additions or comments to the author
at:


\medskip{}
\lyxaddress{Donald E. Eastlake III,\\
Room 915,\\
545 Technology Square,\\
Cambridge, Mass. 02139}
\medskip{}


\section{Notation Used in this Manual}


\subsection{Numbers}

All numbers written in arabic numerals are octal except as follows:

\begin{enumerate}
\item those part of a name, such as a type {}``35'' teletype
\item those part of the meta-structure of this manual (a page or section number for
example)
\item or those that are floating point, which will always have more than one digit
to the right of the decimal point such as 3.14159
\end{enumerate}
\noindent For the meaning of numbers which appear to be floating point with one
digit to the right of the decimal point and which are not section numbers, see
section 0.2.3 below. Numbers that are written alphabetically are decimal.


\subsection{Character Objects and Strings}

Character objects and strings are usually surrounded by quotation marks ({}``'')
and are relatively clear from context. Non-graphic characters typed by holding
down the control key of a teletype and striking a graphic are represented by
the graphic preceeded by a {}``\textasciicircum{}'' as in \textasciicircum{}A
for {}``control-A''. The special character alt.-mode (or escape or prefix)
is represented by {}``\$''.


\subsection{Bit Positions and Intervals}

Bit positions in thirty-six bit words (word length on the PDP-6 and PDP-10) are
represented by the concatenation of a digit from 1 through 4, a {}``.'', and
a digit from 1 through 9. The first digit is a quadrant number starting from
the right or least arithmetically significant part of the word. The second digit
is a bit number in the quadrant, also starting from the right or least significant
bit. Thus 1.1 is the lowest bit and 4.9 the sign bit.

Bit intervals are represented by the concatenation of an included starting bit
position, a {}``--'', and an included terminating position. Thus 3.3--3.1 is
the lowest octal digit in the left half of a word.


\subsection{Internal References}

Most internal references in the text of this manual are of the following form:
{[}App x{]}, {[}Ref x{]}, and {[}Sec x{]}. These refer, respectively, to the
x'th appendix, the x'th item in the section of this manual entitled {}``References'',
and the x'th numbered section of this manual. Some internal references are written
out in less formality and combined forms are allowed, such as the following,
whose meaning should be evident: {[}Sec x, y{]}, {[}App x; Ref x, y{]}, etc.


\subsection{Other Conventions}

UUO's ({}``UnUsed Operations{[}Ref 1{]}) that trap to the system {[}Sec 1.2.1{]}
to request action by it are frequently referred to as {}``system calls''. (This
should not be confused with the .CALL subclass of systems calls.) Individually
they are written in all capital letters with a preceding period. The reasons
for this is that the MIDAS {[}Ref 3{]} assembler has just these character strings
(actually the first six characters including the period) pre-defined as symbols.
In pronouncing them, the period should be ignored.

The use of the system calls described in this manual is frequently illustrated
by a short excerpt of pseudo-assembly-language. In such examples, the tag CALL
will appear on the line of the system call in question. Frequently set-up instructions
precede the call to emphasize certain of its properties. They should not be taken
too literally.


\section{Introduction to ITS}

The Incompatible Time Sharing system (ITS) is a control program tailored to the
Project MAC Artificial Intelligence (AI) Group PDP-6 and PDP-10 installation.
It was designed in an attempt to provide the following potential advantages of
a time sharing system:

\begin{enumerate}
\item More than one person can perform tasks not requiring all available computer resources
with seeming simultaneity; one person can similarly perform several tasks.
\item Simple device independent input-output facilities should relieve the user of
having to worry about hardware interface routines.
\item Jobs which would otherwise require excessive continuous blocks of time can be
performed automatically in small parts over long periods of time at reduced priority.
\item Various debugging and other facilities can be designed-in using the mechanisms
necessary to protect user programs from each other.
\end{enumerate}
To achieve these advantages and the particular goals of Project MAC's AI Group,
which require a high level of sophisticated service to a limited number of users,
ITS is designed with the following properties:

\begin{enumerate}
\item ITS sits in control of the PDP-6 performing most input-output for and allocating
machine resources among various user programs.
\item All user programs reside in core storage so it is possible to switch between
programs with great rapidity and have sufficiently short quanta to allow character
response without undue inefficiency. (Swapping of programs may soon be added
but it is expected that only dormant programs will be swapped out.) A user may
have many programs running for him {}``simultaneously''.
\item ITS has a minimal direct user command facility to assure users that they can
maintain control over their programs. For the utmost in flexibility almost all
system actions are the result of systems calls executed by the user's programs.
\item ITS attempts to provide not only simple standardized input-output and other system
calls but also much more complex and specialized calls which reduce overhead
or enable the use of special devices and features.
\end{enumerate}
MIDAS, a machine language assembler with macro facilities {[}Ref 3, 10{]}, was
chosen for writing ITS because of the resultant efficiency, flexibility, ease
in writing, and ease in debugging. For information more detailed or more recent
than this manual consult the sources listed in Appendix F.


\subsection{Preview of Section 1}

The user of ITS normally commands a hierarchy of programs in machine storage
organized in an inverted tree. The top procedure {[}Sec 7{]} is initially loaded
for him by the system when he informs it of his presence by typing a \textasciicircum{}Z
on an idle console {[}Sec 1.1.1{]}. All programs may have inferior procedures
which they can control. Almost all commands to the system are machine instructions
{[}App A, B; Ref 1{]}, which trap to the monitor, executed for the user by his
programs {[}Sec 1.2{]}. The only exception is that he may interrupt the superior
procedure of the program with which he is conversing by typing \textasciicircum{}Z
{[}Sec 1.2.1{]}. By this method the user can return to his top procedure at which
point \textasciicircum{}Z's typed on his console are ignored by the system.


\subsection{Preview of Sections 2 and 3}

The majority of the code in the ITS monitor is devoted to input-output. It has
been organized with such goals in mind as flexibility, speed, and generality.
Simple device-independent system calls applicable to all devices where they are
meaningful, more complex but efficient calls applicable to most devices, and
specialized system calls enabling nearly full use of some special devices are
all available. Most devices are referenced symbolically {[}App C{]} and procedures
may cause symbolic translations such that an inferior procedure referencing a
particular device will in fact get a different device. Input-output may be done
a character or word per system call or, for less overhead per character or word,
an arbitrary size block of words may be transferred into or out of the user program's
core with one system call. The user program is not required to have any buffers
in its core image. Many special features relate to consoles or special devices
on the PDP-6 such as eyes, arms and the DEC 340 display.


\subsection{Preview of Section 4}

A feature of the ITS monitor not frequently found in time sharing systems and
contributing greatly to its flexibility and generally is that user programs may
receive software implemented interrupts in much the same way that ITS receives
hardware interrupts. The system is so designed that the user is rarely involuntarily
uninterruptable for more than a few hundred microseconds. If the interrupt is
dismissed in a normal manner the non-interrupt portion of the program can proceed
even from the {}``middle'' of a system call taking an arbitrary amount of time.

The ITS core allocator keeps a record of the status of each 2000 word block of
memory and the 200 word sub-blocks into which some of these are divided. It allocates
and de-allocates memory for and at the request of procedures and system input-output
routines. Most of its complexity is due to the lack of paging on the PDP-6 which
makes it sometimes necessary to {}``shuffle'' memory to provide sufficient
contiguous space for a procedure.

A scheduling algorithm is used which tries primarily to equalize machine time
used by each active procedure tree (console) and secondarily to equalize machine
time among those procedures in each tree. The system variables related to a particular
procedure {[}App D{]} used by the scheduler and other parts of ITS are kept in
system memory and do not impinge on the user's core image.


\subsection{Preview of Section 5}

User programs operating within the environment provided by ITS are organized
(as mentioned in section 0.3.2) as inverted tree hierachies. Superior procedures
can retrieve and store words in their inferior procedures as if they were input-output
devices. There also exists a large set of special system calls for controlling
procedures immediately beneath them and several special ways that procedures
may communicate with their superior procedure. Buffered communication between
arbitrary pairs of procedures treating each other as input-output devices is
also provided {[}Sec 3.4.3{]}.


\subsection{Preview of Section 6}

A large number of miscellaneous system calls and features exist for a variety
of purposes. Some provide easy input-output to devices which do not fit the forms
of standard ITS devices. Others provide the use of certain hardware modifications
to the PDP-6 which enable the simulation of certain features of manual control
of the PDP-6 such as address stop {[}Ref 1{]}. The remainder are such minor but
necessary functions as login and logout.

A special procedure, known as the system job, exists under ITS. it performs various
low priority functions for the system and can check constant portions of ITS
against a copy in an attempt to detect some forms of system or hardware failure.


\section{Introduction to DDT, PEEK, and LOCK}

These three programs all run under ITS but are more closely related to it than
most other systems programs. The editor (TECO), assembler (MIDAS {[}Ref 3{]}),
list processing language (LISP), etc.~used by the Project MAC AI Group have
also been modified to run under ITS but have very similar non-time-sharing versions.
PEEK and LOCK would generally be meaningless outside ITS and while there is a
non-time-sharing DDT, the version for ITS has been very extensively modified.


\subsection{Preview of DDT}

DDT originated as a general machine language debugging program on the Digital
Equipment Corporation PDP-1 computer. When the hierarchical organization of procedures
{[}Sec 5{]} and logical simplicity of procedure origination of almost all system
actions {[}Sec 1.2{]} had been decided upon, the need for a conversational {}``monitor
command'' program was recognized. An extensively modified DDT, with commands
relating to various ITS features and modifications so as to be able to control
multiple procedures was the obvious answer. For historic reasons a top level
modified DDT under ITS is known as a {}``HACTRN''.


\subsection{Preview of PEEK and LOCK}

The first of these utility programs, PEEK, is described in section 8 of this
manual. It provides periodically updated displays or printouts of various aspects
of the time sharing system's status.

The second and smaller program, LOCK, is described in section 9 of this manual.
It performs a variety of miscellaneous functions, some related to testing or
debugging ITS.

DDT, described in section 7, is the normal means by which the user may load and
transfer control to these programs. Note that the commands P, Q, and ? have the
same meaning for both programs. The ? command causes each of them to print a
list of their commands with short explanations.


\subsection{Preview of Appendices}

The first three appendices to this manual are for cross-reference and index usage
(although important cross-references are frequently included in the text {[}Sec
0.2.4{]}). Appendices A and B list system calls {[}Sec 0.2.5, 1.2.1{]} in numeric
and alphabetic order, respectively, with the number of the manual section most
relevant to the call. Appendix C lists symbolicly referenceable input-output
devices in alphabetic order with the section or sections most relevant to them.

Appendix D is nearly a direct extract from the source listing of ITS. It is the
initial {}``dummy'' image of the user variable area, one of which exists for
each procedure {[}Sec 4, 5{]} in a system.

Appendix E, included for completeness, lists certain system calls that are being
phased out along with their replacements and short descriptions of their functions.

Appendix F lists persons to consult for further information on ITS.

The last appendix, denominated G, gives a single console session with ITS as
an illustration in which the self documenting features of DDT, PEEK, and LOCK
are exercised.


\chapter{Transmitting Commands to ITS}

See also section 0.3.1.


\section{Control Z}

The only item of input-output data recognized by ITS directly as a command is
the character \textasciicircum{}Z when received from an idle teletype or from
an active console, that is a teletype in control of a procedure tree {[}Sec 5{]}.
A teletype is a member of the class of devices that may be consoles, currently
either a GE Datanet 760 terminal or a KSR 35/37. Teletypes may also be in use
as ordinary devices (as Tnm instead of TTY {[}Sec 3.2.1{]}) in which case ITS
ignores \textasciicircum{}Z's typed on them.


\subsection{Control Z on an Idle Teletype}

If the teletype is idle, \textasciicircum{}Z normally causes the teletype to
become a console and loads and starts as its top level procedure {[}Sec 5.1,
7{]} the dump file named {}``@ HACTRN'' on device SYS, or if not found there
from device UT2 (see section 2.1 for a discussion of file and device names).
The JNAME of a thus initiated procedure is HACTRN and its UNAME and SNAME are
set to the value minus 1 {[}Sec 2.2.3, 5.1; App D{]}. This will not happen if
there is insufficient memory available or if too many people type \textasciicircum{}Z
simultaneously. ITS will echo a \textasciicircum{}Z typed on an idle teletype
if and only if it succeeded in starting a top procedure. If a failure to start
a top procedure is due to a lack of memory, a console free message will be typed
out {[}Sec 6.5{]}.


\subsection{Control Z on an Active Console}

The effect of \textasciicircum{}Z in the second case, that of an active console,
is intended to be such that the user at the console may cause control of his
console to revert to higher level procedures and ultimately to his top level
procedure even in the face of hostile inferiors.

A \textasciicircum{}Z typed on an active console is ignored by ITS if the console
is being controlled by its top level procedure. Otherwise it sets a flag associated
with the console so that it may not be assigned downward in the procedure tree
{[}Sec 3.2.1.1{]}. This flag is cleared only by typing any character other than
\textasciicircum{}Z on the console. ITS also sets the \textasciicircum{}Z interrupt
bit, a class on interrupt {[}Sec 4.2{]}, for the procedure controlling the console
and possible for an arbitrary number of procedures, each the immediate superior
of the last, extending upward in the tree from the procedure controlling the
console. The condition for each step upward in the procedure tree is that either
the superior to the procedure having its \textasciicircum{}Z interrupts bit set
is stopped or the current procedure was found to already have its \textasciicircum{}Z
bit on.

Action on \textasciicircum{}Z interrupt bits set will be taken in less than one
quantum time when the scheduler {[}Sec 4.4{]} next runs.


\section{Trapping Instructions}

With the exception of \textasciicircum{}Z all commands to ITS are given by instructions
which trap to the monitor. All valid commands are from a class of instructions
called UUO's which are characterized by an initial octal digit of 0. These are
discussed in section 1.2.1 and listed in Appendices A and B. Section 1.2.2 concerns
all other trapping instructions. It is a useful characteristic of the PDP-6 and
PDP-10 that an identical effective address calculation is performed on all words
fetched as instructions regardless of their operation code or legality {[}Ref
1{]}. Thus indexing and indirect addressing are available on all trapping instructions.
Interrupts to the monitor as a result of conditions encountered in the execution
of an instruction (such as memory protection violation, AR overflow, PDF overflow,
etc) rather than the type of instruction are discussed in section 4.2.


\subsection{UUO's}

The instruction as instructions or words with an operation code {[}Ref 1{]} of
from 000 to 077 normally results in the instruction word being stored in absolute
location 40 modified by having had its effective address computed and stored
in its address field and its indirect and index fields cleared. The instruction
in absolute location 41 is then executed. Since all ITS system calls utilize
only UUO's 040 through 047 the Project MAC AI Group's PDP-6 has been modified
so that UUO's 001 through 037 and 050 through 077 will trap, as described above,
but directly to the user program's relocated core image with no extra overhead.
UUO 000 will also appear to trap to the user but this occurs via monitor simulation
that checks to see if relocated location 41 directly addresses (indexing or indirect
addressing ignored) a location between 20 and the location 6 less than the top
of the user's core image inclusive. If so, a JSR to that location is simulated.
If not, the user's illegal instruction interrupt bit, a class two interrupt {[}Sec
4.2{]}, is turned on and a schedule {[}Sec 4.4{]} immediately performed.

Complete lists of system calls appear in numeric order in Appendix A and in alphabetic
order in Appendix B. However, a list classified by operation code is listed here:

\medskip{}
\begin{flushleft}\begin{tabular}{lll}
\textsf{UUO}&
\textsf{Symbol}&
\textsf{Description}\tabularnewline
\textsf{040}&
\textsf{.IOT}&
\textsf{Executed for each item or block of data transmitted between}\tabularnewline
&
&
\textsf{a user program and a symbolic input-output device {[}Sec 2.3{]}.}\tabularnewline
\textsf{041}&
\textsf{.OPEN}&
\textsf{Used to initialize input-output between a device and a}\tabularnewline
&
&
\textsf{program {[}Sec 2.2{]}.}\tabularnewline
\textsf{042}&
\textsf{.OPER}&
\textsf{A class of system calls further decoded by the value of their}\tabularnewline
&
&
\textsf{effective address.}\tabularnewline
\textsf{043}&
\textsf{.CALL}&
\textsf{A class of system calls further decoded by the value of their}\tabularnewline
&
&
\textsf{accumulator field.}\tabularnewline
\textsf{044}&
\textsf{.USET}&
\textsf{Executed by procedures to examine and set some of the system}\tabularnewline
&
&
\textsf{variables associated with their inferior procedures {[}Sec 5.2.3{]}.}\tabularnewline
\textsf{045}&
\textsf{.BREAK}&
\textsf{Executed by a procedure to signal its superior {[}Sec 4.3.2{]}.}\tabularnewline
\textsf{046}&
\textsf{.STATUS}&
\textsf{Used to ascertain the status of an input-output device, channel,}\tabularnewline
&
&
\textsf{or transfer {[}Sec 2.5{]}.}\tabularnewline
\textsf{047}&
\textsf{.ACCESS}&
\textsf{Used in input-output to randomly addressable devices {[}Sec 2.7.4{]}.}\tabularnewline
\end{tabular}\end{flushleft}
\medskip{}

ITS system calls were designed to be numerically rather than symbolically decoded
to decrease their cumbersomeness and increase monitor efficiency.


\subsection{Non-UUO Trapping Instructions}

The only other trapping instructions are those whose first octal digit is 7 and
the instruction JRST with the 10 or 4 bit on in its accumulator field {[}Ref~1{]}.
The first of these two includes all instructions which effect hardware input-output
and most of those affecting the state of the PDP-6 instruction processor (including
user/executive mode). In the second the 10 and 4 bits respectively dismiss a
hardware interrupt and stop the PDP-6. The execution of any of these trapping
instructions causes an illegal instruction interrupt to the user (a class two
interrupt {[}Sec 4.2{]}) unless the user's procedure is in iot-user mode {[}Sec
5.8.3{]}. The remaining way to affect the state of the processor is a JRST instruction
with the 2 bit on in the accumulator field; however, in user mode this will not
effect the state of the user, special or iot-user {[}Sec 6.8.3{]} modes except
that it may turn off iot-user mode.


\chapter{The General Transaction of Input-Output}


\section{Philosophy and Organization}

\bigskip{}
{[}original document missing page 19 here{]}
\bigskip{}

\noindent user core image input-output is negligible in comparison to any significant
processing of the data. Using system buffers has the following advantages:

\begin{enumerate}
\item The user may be interrupted, swapped out, moved in core, or otherwise molested
during an .IOT {[}Sec 2.3{]} as it is the software transfer of data between system
buffers and his core.
\item Real input-output transfers may proceed without consideration of the state of
the user program they are occuring for as they are into or out of system controlled
memory.
\item Higher memory efficiency is obtained due to the dynamic nature of major file
device buffers. Even for devices with fixed buffers, such as the line printer,
only one large buffer need exist regardless of how many programs that could use
the device are in the system.
\item User programs need not concern themselves with the size of physical blocks on
devices.
\end{enumerate}
Some devices do not fit this framework very well and system calls relating to
them are not included in section 6. Miscellaneous calls and special features
related to particular symbolic devices are, however, included under the device
in section 3.


\section{The .OPEN UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.OPEN CHNUM,FILNAM}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{FILNAM:}&
\textsf{MODE,,(SIXBIT /DEV/)}\tabularnewline
&
\textsf{SIXBIT /FILNM1/}\tabularnewline
&
\textsf{SIXBIT /FILNM2/}\tabularnewline
\end{tabular}
\medskip{}

\noindent Input-output on a particular channel is initialized by executing a
.OPEN. The channel is numerically specified by the accumulator field of the .OPEN
(CHNUM in the illustration above) and any previous transfer of that channel is
terminated as if by a .CLOSE {[}Sec 2.7.1{]}. If the user is interrupted {[}Sec
4.2{]} during a .OPEN the channel may have been closed and not yet reopened.
The effective address of the .OPEN should point to the first word of a block
of three words in the user's core image which specify a device, mode, and file.
The second two words specify the two file names (FILNM1 and FILNM2 in the above
illustration). As a convention, the file names are usually thought of as up to
six left-justified sixbit characters rather than thiry-six bit quantities. Some
devices ignore the supplied file names. Other devices augment the file names
by the procedure's system name as explained in section 2.2.3 below. These properties
are indicated in the device descriptions in section 3. The first word has the
three character sixbit device name in its right half (DEV in the above illustration)
and the direction and mode in its left. Immediately below are the standard mode
bits from this left half.

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit(s)}&
\textsf{Meaning}\tabularnewline
\textsf{4.9}&
\textsf{Always ignored.}\tabularnewline
\textsf{4.8-3.4}&
\textsf{Device dependant but using zero should be safe.}\tabularnewline
\textsf{3.3}&
\textsf{1$\Rightarrow$Image mode.}\tabularnewline
&
\textsf{0$\Rightarrow$ASCII mode, alias character mode.}\tabularnewline
\textsf{3.2}&
\textsf{1$\Rightarrow$Block mode.}\tabularnewline
&
\textsf{0$\Rightarrow$Unit mode.}\tabularnewline
\textsf{3.1}&
\textsf{1$\Rightarrow$Output.}\tabularnewline
&
\textsf{0$\Rightarrow$Input.}\tabularnewline
\end{tabular}
\medskip{}

The device and file specified will be altered by entries in the translation table
{[}Sec 2.2.2{]} made by either the procedure or any of its superior procedures.
Because of this translation and the symbolic nature of .OPEN, it is one of the
slower ITS system calls.

If the .OPEN is successful it will skip the immediately following instruction.
If not successful it will not skip and will set a {}``most recent channel in
error'' system variable associated with the procedure to the channel number
on which the .OPEN was attempted. The reason for the failure may be ascertained
with a .STATUS {[}Sec 2.5{]} or via the ERR device {[}Sec 3.4.4{]}. Zero file
names are not allowed on many devices and attempts to use them will cause the
.OPEN to fail. Any .OPEN closes previously opened devices on that channel whether
or not the .OPEN is successful.


\subsection{File Directories}

For devices with true file structure a file directory of the device may be read
by trying to input the file with the name {}``.FILE.(DIR)''. If character mode
is used, a readable file directory terminated by a \textasciicircum{}L and \textasciicircum{}C
results. If this pseudo-file is read from the DSK, DKn, or Pnm device, only files
with the system name {[}Sec 2.2.3{]} of the reading procedure will be listed.
Both block and unit modes are available {[}Sec 2.3{]}. For non-file devices character
input of this file name will yield the string {}``NON-DIRECTORY DEVICE''. Attempted
binary input will fail (the .OPEN will not skip) except for the UTn devices {[}Sec
3.1.2{]} and the DSK family of devices {[}Sec 3.1.1, 3.1.3{]} where an actual
device dependant binary of the directory will be read. For the DSK family of
devices a pseudo-file {}``M.F.D. (FILE)'' is also recognized by the system
and yields a list of the system names {[}Sec 2.2.3{]} for which directories exist
on the disk. In general files may be written with these pseudo-file names and
then renamed {[}Sec 2.4{]} so their contents can be read back.

In an ITS-produced readable file directory, an {}``{*}'' by a file name indicates
the file is inaccessible. This may be due to the fact that it is just then being
written or it may have been deleted while open for reading and will vanish when
closed.


\subsection{The Translation Table}

Entries in the translation table may be made or deleted by any procedure and
have effect only at .OPEN time for the procedure making the entry and its inferiors.
The entry consists of the following:

\begin{enumerate}
\item The UNAME and JNAME of the procedure making the entry
\item The JNAME of the procedure it is to apply to ({}``{*}'' means all JNAME's)
\item Whether it is to apply to input, output, or both
\item Whether its resultant is to be considered final or be retranslated
\item The from device and pair of file names, where {}``{*}''s in from positions
match any device or file name
\item The to device and pair of file names, where {}``{*}''s in to positions indicate
no substitution
\end{enumerate}
At .OPEN time all entries in the table are examined to see if the device and
file names of the .OPEN and the UNAME and JNAME of the procedure executing the
.OPEN match them. If so and the procedure which made the entry is the same or
superior to the procedure executing the .OPEN, the substitution for device and
file names specified by the entry is made and unless prohibited by the entry
this process is repeated. Should eight successful and sequential translations
be made the .OPEN will fail leaving a {}``too many translations'' indication
{[}Sec 2.5{]} and no further attempt will be made to translate.


\subsubsection{The .TRANS UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.TRANS FILNAM}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{FILNAM:}&
\textsf{MODE,,(SIXBIT /DEV/)}\tabularnewline
&
\textsf{SIXBIT /FILNM1/}\tabularnewline
&
\textsf{SIXBIT /FILNM2/}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call is expected to point to a three word block in the
same manner as a .OPEN {[}Sec 2.2{]}. It normally skips and returns with the
block replaced by its translation (the block pointed to by a .OPEN is never changed
by the execution of the .OPEN). If too many levels of translation are required
it will not skip and the block will be unchanged.


\subsubsection{The .TRANAD UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.TRANAD TBLOCK}&
\tabularnewline
&
\textsf{;error return}&
\tabularnewline
&
\textsf{;normal return}&
\tabularnewline
&
&
\tabularnewline
\textsf{TBLOCK:}&
\textsf{UNAME}&
\textsf{;UNAME of procedure making \& subject to entry}\tabularnewline
&
\textsf{JNAME}&
\textsf{;JNAME for procedure subject to entry}\tabularnewline
&
\textsf{ATMIO,,DEV1}&
\textsf{;4.9 = 0 $\Rightarrow$ retranslate}\tabularnewline
&
&
\textsf{;4.9 = 1 $\Rightarrow$ atomic, don't retranslate}\tabularnewline
&
&
\textsf{;3.2 = 1 $\Rightarrow$ applies to output .OPEN's}\tabularnewline
&
&
\textsf{;3.1 = 1 $\Rightarrow$ applies to input .OPEN's}\tabularnewline
&
&
\textsf{;DEV1 = from device}\tabularnewline
&
\textsf{FN11}&
\textsf{;from file names}\tabularnewline
&
\textsf{FN12}&
\tabularnewline
&
\textsf{,,DEV2}&
\textsf{;to device}\tabularnewline
&
\textsf{FN21}&
\textsf{;to file names}\tabularnewline
&
\textsf{FN22}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call makes new entries in the translation table. All information
for the entry is specified by an eight word block pointed to by the UUO (TBLOCK
in the illustration above). Before trying to insert a new entry in the translation
table, this system call simulates a .TRANDL pointing at the same block to eliminate
redundant entries. If a .TRANAD is successful in creating an entry it skips.
If not, because the first entry in the block is incorrect or the translation
table is full, it returns without skipping.


\subsubsection{The .TRANDL UUO}

This system call deletes entries in the translation table and normally points
at an eight word block identical to the one which was used by the corresponding
.TRANAD. See section 2.2.2.2 immediately above for the contents of this normal
block. If may, if appropriate, modify the ATMIO bits of an entry for both input
and output to delete one or the other. It skips if successful in deleting an
entry or removing one of the directions to which it applies. If it effects no
change in the translation table, it returns without skipping. It also has a special
form where the first work of the block is zero (not a possible UNAME). In this
case all entries previously made by the procedure doing the .TRANDL relating
to the JNAME in the second word of the block are deleted. This special form always
skips and does not examine the remaining six words of the block.


\subsection{System Names}

In order to distinguish the files of different users of ITS on shared devices
with common file directories a third file name is used. This file name is referred
to as a procedure's {}``system name'' or SNAME.

In reading, writing, deleting, etc. files on the DSK and related devices {[}Sec
3.1.1{]} and on the core link devices {[}Sec 3.4.3{]}, ITS obtains a third file
name from the SNAME {[}App D{]} associated with the procedure. This variable
is set, when the procedure is initially created, to the common UNAME {[}App D{]}
of the procedure tree {[}Sec 5.1{]} the procedure is in. This is normally the
name the user has logged in as {[}Sec 5.1{]} so his procedures will initially
refer to his files. However, a procedure may examine and change its own SNAME
by means of an .SUSET {[}Sec 4.5{]} and may examine and change the SNAME of any
of its inferiors with a .USET {[}Sec 5.2.3{]}.

The system name facility is also used to simulate certain pseudo-devices as explained
in sections 3.1.3 and 3.4.5.


\section{The .IOT UUO}

\textsf{}\begin{tabular}{lll}
\textsf{;unit mode}&
&
\tabularnewline
\textsf{CALL:}&
\textsf{.IOT CHNUM,DATLOC}&
\tabularnewline
&
\textsf{;return}&
\tabularnewline
&
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{;place char or word read into or written from}&
\tabularnewline
&
&
\tabularnewline
&
&
\tabularnewline
\textsf{;block mode}&
&
\tabularnewline
\textsf{CALL:}&
\textsf{.IOT CHNUM,PNTR}&
\tabularnewline
&
&
\tabularnewline
\textsf{PNTR:}&
\textsf{--LENGTH,,DATLOC}&
\textsf{;pointer, modified during transfer}\tabularnewline
&
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{BLOCK LENGTH}&
\textsf{;block read into or written from}\tabularnewline
\end{tabular}
\medskip{}

\noindent All actual data transfers to or from devices being handled via input-output
channels are initiated by .IOT's. The accumulator field of a .IOT should contain
the number of an input-output channel (CHNUM in the above illustrations) that
has been set up for transfer in a particular mode between the procedure and a
particular device by a successful .OPEN {[}Sec 2.2{]}. If the channel has not
been .OPEN'ed the procedure will receive an input-output channel error interrupt
(a class two interrupt {[}Sec 4.2{]}). Also the number of the channel on which
the .IOT was attempted will be remembered as the most recent erroneous channel
for use by the ERR device {[}Sec 3.4.4{]}. The effective address of a .IOT is
used somewhat differently depending on whether the channel is open in unit or
block mode.

For unit mode (the first of the two illustrations above) the effective address
points to a word to be written from or read into. For character unit modes the
character is right justified and the rest of the word is ignored on output and
zeroed (except as mentioned in section 2.3.1 on input. Some devices, which are
classified as input, use the contents of the effective address as an argument
to determine what they will store back (see devices IMX, VID, and NVD).

Block modes always read or write to a contiguous block of words. The contents
of the effective address of the .IOT is interpreted as having minus the length
of the block in its left half and the address of the first word in its right
half (see second illustration above). Block mode normally treats each word in
the block identically to the corresponding unit mode except that block character
modes pack five characters of seven bits per word left adjusted. The block pointer
word pointed to by the .IOT is advanced as the transfer progresses so that if
it completes the left half will be zero and the right half will point to one
greater than the last word processed. If a procedure is interrupted out of a
block mode .IOT the pointer word will reflect the progress of the transfer when
it was interrupted.

Block character input-output from some devices which are naturally one character
at a time is limited to blocks of length 77777 words or less and the top three
bits of the pointer word are used during the transfer as a character count.

When a .IOT returns to the user without causing an input-output channel error,
the transfer it requested will have been completed for unit mode input or output
or block mode output. For block mode input, the count in the pointer word will
indicate the amount transferred which may be less than that requested if an end
of file is reached {[}Sec 2.3.1{]}.


\subsection{The End of File Condition}

For devices on which the end of file while reading condition is meaningful it
is signaled to the user in various ways depending on the transfer mode. For character
devices in the character at a time mode a \textasciicircum{}C will be read with
the left half of the word read into set to minus one. In block character mode
the last word will be filled out with \textasciicircum{}C's. Usually the pointer
word will not have counted out as the end of file did not occur on a block boundary.
For word devices, the user must normally determine the logical end of file from
the data being read although physical end of file is detectable in block mode
by the lack of advancement of the pointer word. On some devices, attempts to
read beyond an end of file will cause the input-output channel to be automatically
.CLOSE'ed {[}Sec 2.7.1{]} and further .IOT's will cause input-output channel
errors (class two interrupts {[}Sec 4.2{]}).

When packed characters are being read from a word device the physical block is
normally filled out with \textasciicircum{}C's but some older files on DEC tape
{[}Sec 3.1.2{]} are filled out with the character whose ASCII value is 141 ({}``a'').
The end of file character for a particular file can be determined after the file
has been opened by putting the number of the input-output channel it is open
on in the accumulator specified by an .EOFC. This channel number will be replaced
with the end of file character for that channel by the execution of the .EOFC.
See following illustration:

\medskip{}
\textsf{}\begin{tabular}{lll}
&
\textsf{MOVEI AC,CHNUM}&
\tabularnewline
\textsf{CALL:}&
\textsf{.EOFC AC,}&
\textsf{;replaces CHNUM in AC with eof character}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}


\subsection{The Device Full Condition}

Attempted output on a full file structured device (UTn, DSK) results in an input-output
channel error (a class two interrupt {[}Sec 4.2{]}) for the outputing procedure.
This interrupt will occur for the .IOT that failed in such a way that it may
be successfully resumed if the procedure's interrupt routine or some other procedure
deletes material from the full device. The channel on which the error occured
is saved by ITS for the ERR device.


\subsection{Non-Recoverable Data Errors}

ITS normally encounters non-recoverable data errors when reading into its buffer
for the user asynchronously with any UUO's by the user. After a fixed number
of attempts it accepts the possible erroneous data which it will later give to
the user if her reads far enough. It also sets a flag related to the channel
so the next .IOT performed on it will give an input-output channel error interrupt.
The purpose of this flag is to avoid giving the user a channel error interupt
with no indication of which channel it is on. The user's program may return to
the .IOT and continue reading the file after handling the interrupt.


\section{The .FDELE UUO}

The system call .FDELE is used for deleting and renaming files. It points at
a five word block which, for the three types of .FDELE's, contain the following:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.FDELE FBLOCK}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\end{tabular}

\textsf{}\begin{tabular}{lll}
\textsf{;file delete}&
&
\tabularnewline
\textsf{FBLOCK:}&
\textsf{---,,DEV}&
\textsf{;device on which to find file}\tabularnewline
&
\textsf{FN1}&
\textsf{;names of file to be deleted}\tabularnewline
&
\textsf{FN2}&
\tabularnewline
&
\textsf{0}&
\textsf{;zero}\tabularnewline
&
\textsf{---}&
\textsf{;unexamined}\tabularnewline
&
&
\tabularnewline
\textsf{;normal file rename}&
&
\tabularnewline
\textsf{FBLOCK:}&
\textsf{---,,DEV}&
\textsf{;device on which to find file}\tabularnewline
&
\textsf{FN11}&
\textsf{;old file names}\tabularnewline
&
\textsf{FN12}&
\tabularnewline
&
\textsf{FN21}&
\textsf{;new file names}\tabularnewline
&
\textsf{FN22}&
\tabularnewline
&
&
\tabularnewline
\multicolumn{1}{|l}{\textsf{;rename of file while open for writing}}&
&
\tabularnewline
\textsf{FBLOCK:}&
\textsf{---}&
\textsf{;unexamined}\tabularnewline
&
\textsf{CHNUM}&
\textsf{;channel on which open}\tabularnewline
&
\textsf{FN1}&
\textsf{;new file names}\tabularnewline
&
\textsf{FN2}&
\tabularnewline
\end{tabular}
\medskip{}

An .FDELE on a device that is not truly file structured has no effect but skips
as do all successful effective .FDELE's. If a .FDELE does not skip the reason
for its failue may be determined with a .STATUS as though the .FDELE had been
a failing .OPEN on channel zero {[}Sec 2.5{]}.


\section{The .STATUS UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.STATUS CHNUM,DATLOC}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{;location status information is stored in by call}\tabularnewline
\end{tabular}
\medskip{}

\noindent The accumulator field of this system call is the number of an input-output
channel (CHNUM in the above illustration) whose status word replaces the contents
of the effective address (DATLOC in the above illustration) of the UUO. This
status word is described in detail by the tables below; however, its general
composition is as follows:

\begin{itemize}
\item The left half relates to the channel and it set by failing .OPEN's, failing .FDELE's
and input-output channel errors
\item The right half relates to the device, if any, open on the channel and the state
of the transfer between it and the user.
\end{itemize}
\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit(s)}&
\textsf{Meaning}\tabularnewline
\textsf{1.1-1.6}&
\textsf{ITS physical device code (see table below).}\tabularnewline
\textsf{1.7-1.9}&
\textsf{Mode in which device was opened.}\tabularnewline
\textsf{2.1}&
\textsf{1 $\Rightarrow$ buffering capacity empty.}\tabularnewline
\textsf{2.2}&
\textsf{1 $\Rightarrow$ buffering capacity full.}\tabularnewline
\textsf{2.3-2.9}&
\textsf{Device dependent.}\tabularnewline
\textsf{3.1-3.6}&
\textsf{Set by failing .OPEN's and .FDELE's}\tabularnewline
&
\tabularnewline
\textsf{3.7-3.9}&
\textsf{Set by interpreted display {[}Sec 3.4.1{]}}\tabularnewline
&
 \textsf{input-output channel errors (see table below).}\tabularnewline
\textsf{4.1-4.5}&
\textsf{Set by non-display input-output channel}\tabularnewline
&
\textsf{errors (see table below).}\tabularnewline
\textsf{4.6-4.9}&
\textsf{Always zero.}\tabularnewline
\end{tabular}
\medskip{}

The following is a table of ITS device codes (note that the 40 bit indicates
that the file names used are significant and the 20 bit indictes a software device):

\medskip{}
\textsf{}\begin{tabular}{lll}
\textsf{Code}&
\textsf{Symbol}&
\textsf{Device}\tabularnewline
\textsf{1}&
\textsf{Tnm}&
\textsf{Teletype (KSR 35/37).}\tabularnewline
\textsf{2}&
\textsf{Tnm}&
\textsf{GE display and keyboard.}\tabularnewline
\textsf{3}&
\textsf{LPT}&
\textsf{Line printer.}\tabularnewline
\textsf{4}&
\textsf{VID}&
\textsf{Old vidisector ({}``TVB'').}\tabularnewline
\textsf{5}&
\textsf{NVD}&
\textsf{New vidisector ({}``TVC'').}\tabularnewline
\textsf{6}&
\textsf{PLT}&
\textsf{Calcomp plotter.}\tabularnewline
\textsf{7}&
\textsf{PTP}&
\textsf{Paper tape punch.}\tabularnewline
\textsf{10}&
\textsf{IMX}&
\textsf{Input multiplextor (A-D).}\tabularnewline
\textsf{11}&
\textsf{OMX}&
\textsf{Output multiplexor (D-A).}\tabularnewline
\textsf{12}&
\textsf{PTR}&
\textsf{Paper tape reader.}\tabularnewline
\textsf{13}&
\textsf{DIS}&
\textsf{DEC 340 display.}\tabularnewline
\textsf{14}&
\textsf{IDS}&
\textsf{Interpreted display.}\tabularnewline
\textsf{15}&
\textsf{COD}&
\textsf{Morse code transmitter.}\tabularnewline
\textsf{16}&
\textsf{COD}&
\textsf{Morse code receiver.}\tabularnewline
\textsf{21}&
\textsf{NUL}&
\textsf{Null device.}\tabularnewline
\textsf{41}&
\textsf{UTn}&
\textsf{DEC tape.}\tabularnewline
\textsf{43}&
\textsf{DSK}&
\textsf{2311 disks.}\tabularnewline
\textsf{60}&
\textsf{USR}&
\textsf{A not immediately inferior procedure.}\tabularnewline
\textsf{61}&
\textsf{USR}&
\textsf{An inferior procedure.}\tabularnewline
\textsf{62}&
\textsf{CLx}&
\textsf{Core link device.}\tabularnewline
\textsf{63}&
\textsf{---}&
\textsf{The directory service {[}Sec 2.2.1{]}.}\tabularnewline
\textsf{64}&
\textsf{USR}&
\textsf{PDP-10 device.}\tabularnewline
\end{tabular}
\medskip{}

The following is a list of the codes left by failing .OPEN's and .FDELE's:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Code}&
\textsf{Reason}\tabularnewline
\textsf{1}&
\textsf{No such device.}\tabularnewline
\textsf{2}&
\textsf{Wrong direction.}\tabularnewline
\textsf{3}&
\textsf{Too many translations.}\tabularnewline
\textsf{4}&
\textsf{File not found.}\tabularnewline
\textsf{5}&
\textsf{Directory full.}\tabularnewline
\textsf{6}&
\textsf{Device full.}\tabularnewline
\textsf{7}&
\textsf{Device not ready.}\tabularnewline
\textsf{10}&
\textsf{Device not available.}\tabularnewline
\textsf{11}&
\textsf{Illegal file name.}\tabularnewline
\textsf{12}&
\textsf{Mode not available.}\tabularnewline
\textsf{13}&
\textsf{File already exists (attempted rename).}\tabularnewline
\textsf{14}&
\textsf{Bad channel number (attempted open rename).}\tabularnewline
\textsf{15}&
\textsf{Link depth limit exceeded (DSK).}\tabularnewline
\textsf{16}&
\textsf{Pack not mounted (Pnm).}\tabularnewline
\textsf{17}&
\textsf{Directory not now available.}\tabularnewline
\textsf{20}&
\textsf{User doesn't exist (DSK or USR).}\tabularnewline
\textsf{21}&
\textsf{Local service only.}\tabularnewline
\end{tabular}
\medskip{}

The following are the error codes left by the 340 interpretive display routines:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Code}&
\textsf{Meaning}\tabularnewline
\textsf{1}&
\textsf{Illegal scope mode.}\tabularnewline
\textsf{2}&
\textsf{Scope hung.}\tabularnewline
\textsf{3}&
\textsf{More than 2000 words scope buffer.}\tabularnewline
\textsf{4}&
\textsf{Memory protection violation.}\tabularnewline
\textsf{5}&
\textsf{Illegal scope operation.}\tabularnewline
\textsf{6}&
\textsf{Memory protection violation on PDL pointer.}\tabularnewline
\textsf{7}&
\textsf{Illegal parameter set.}\tabularnewline
\end{tabular}
\medskip{}

The following are the non-display input-output channel error codes:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Code}&
\textsf{Meaning}\tabularnewline
\textsf{3}&
\textsf{Non-recoverable data error on read {[}Sec 2.3.3{]}.}\tabularnewline
\textsf{4}&
\textsf{Non-existant sub-device (such as IMX channel {[}Sec 3.3.3{]}).}\tabularnewline
\textsf{5}&
\textsf{Over .IOPOP {[}Sec 2.6.1{]}.}\tabularnewline
\textsf{6}&
\textsf{Over .IOPUSH {[}Sec 2.6.1{]}.}\tabularnewline
\textsf{7}&
\textsf{Channel does not have a procedure open on it.}\tabularnewline
\textsf{8}&
\textsf{Channel not open.}\tabularnewline
\textsf{9}&
\textsf{Device full {[}Sec 2.3.2{]}.}\tabularnewline
\end{tabular}


\section{The Input-Output Channel Push Down Facility}

For greater flexibility in input-output than that available with the basic input-output
channel system {[}Sec 2.1{]}, a facility is provided whereby a limited number
of input-output transactions may be stored for later resumption. Meanwhile the
channel they were being effected on may be otherwise utilized.


\subsection{The .IOPUSH and .IOPOP UUO's}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.IOPUSH CHNUM,}&
\textsf{;push channel number CHNUM}\tabularnewline
&
\textsf{;return}&
\tabularnewline
&
&
\tabularnewline
\textsf{CALL:}&
\textsf{.IOPOP CHNUM,}&
\textsf{;pop channel number CHNUM}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent These instructions treat input-output channels as the PUSH and POP
instructions {[}Ref 1{]} do memory locations. A channel may be .IOPUSH'ed regardless
of whether it is open or not and any transfer in progress on it will be inaccessable
until the slot occupied by the information pushed is .IOPOP'ed (possible by .IOPDL
{[}Sec 2.6.2{]}) into a channel (possible different from that from which it was
.IOPUSH'ed). The error status and .ACCESS {[}Sec 2.7.4{]} pointer for a channel
are also correctly stored and restored. Executing a .IOPOP into a channel first
.CLOSE's the channel. Each procedure's input-output channel push down list {[}App
D{]} has space for eight entries.


\subsection{The .IOPDL UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.IOPDL}&
\textsf{;reset input-output channel pdl}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call takes no arguments and is intended to reset a procedure's
input-output channel push down list. Entries on a procedure's input-output channel
push down list actually contain the number of the channel that was pushed to
produce the entry. This information is used only by .IOPDL whose execution is
equivalent to the number of .IOPOP's {[}Sec 2.6.1{]} equal to the number of entries
in the procedure's input-output push down list and which .IOPOP each entry back
into the channel from which it was .IOPUSH'ed.


\section{Miscellaneous Input-Output Related System Calls}

The following system calls relate to most or all devices handled via input-output
channels.


\subsection{The .CLOSE UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.CLOSE CHNUM,}&
\textsf{;close input-output channel}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call closes the input-output channel whose number (CHNUM
in the above illustration) is in its accumulator field. It has no effect if the
channel is not open. Executing a .IOT on the channel without reopening it will
result in an input-output channel error. For devices with true file structure
it is at close time that a file with the same name as one being written is deleted.


\subsection{The .RESET UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.RESET CHNUM,}&
\textsf{;reset input-output channel}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call is intended to reset system buffer pointers so that
buffered data on an input-output channel (specified by the accumulator field
as with CHNUM in the above illustration) will be ignored. It is currently implemented
for the following devices: Tnm, TTY, LPT, PLT, PTR, TVC, and USR. For the USR
device it has special effects {[}Sec 3.4.2{]}.


\subsection{The .ITYIC UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVEI AC, CHNUM}&
\textsf{;set up for channel number CHNUM}\tabularnewline
\textsf{CALL:}&
\textsf{.ITYIC AC,}&
\textsf{;get interrupt character}\tabularnewline
&
\textsf{;error return}&
\textsf{;none available}\tabularnewline
&
\textsf{;normal return}&
\textsf{;got one}\tabularnewline
\end{tabular}
\medskip{}

\noindent It is frequently desirable to examine the characters of an incoming
stream at the interrupt {[}Sec 4.2{]} level of a procedure (for {}``quit''
features, etc.). This system call provides the facility to read these characters
from channels on which devices are open that will provide appropriate interrupts
(TTY and Tnm). The accumulator referred to by an .ITYIC should have an appropriate
channel number placed on it (see illustration above). The execution of an .ITYIC
will then replace this number with the character read and skip. If no character
is available the .ITYIC will return without skipping and if an improper channel
is specified the procedure will receive an illegal instruction interrupt.


\subsection{The .ACCESS UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.ACCESS CHNUM,LOC}&
\textsf{;set channel pointer to value LOC}\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call is intended to be used in accessing randomly addressable
devices. A pointer is associated with each input-output channel which is set
to the effective address of a .ACCESS executed with the channel's number (CHNUM
in the above illustration) in its accumulator field. This pointer is set to zero
whenever the channel is closed. Currently this pointer influences only the USR
device {[}Sec 3.4.2{]} but it is hoped that random access will be added to the
disk {[}Sec 3.1.1{]} routines soon.


\chapter{Properties of Particular Devices}

Properties and system calls related to particular devices handled via input-output
channels are discussed below. Lower case letters in a device name indicate that
there are several devices distinguished by numeric digits in their place. The
phrase {}``all standard modes'' in descriptions below implies that all combinations
of ASCII/image and unit/block modes are available and that ASCII mode implies
seven bit ASCII characters and image mode thirty-six bit binary words.


\section{File Structured Devices}


\subsection{The DSK, DKn, and Pnm Devices}

These symbolic devices represent IBM 2311 units attached to the PDP-6. These
disks are characterized by interchangable disk packs. A single logical directory
is maintained by the system for the entire disk volume. Files are identified
by two names {[}Sec 2.2{]} and a system name {[}Sec 2.2.3{]}. If a file is being
read, which of the above symbolic device names is used is entirely immaterial.
There are some special aspects to reading directories from these devices as explained
in section 2.2.1.

If a file is being written, the DSK device will physically write it on a particular
drive whose number is assembled into the system. In contrast the DKn device will
write the file on the n'th drive. The Pnm device will try to write on a pack
with a particular two digit number.

The actual directory for these devices consists of a master directory for each
drive and a user directory for each system name that has been used to write files
on the disk. The maximum number of user directories is one hundred. The maximum
number of files per user is not fixed as the area in a users directory, used
to describe the location of the blocks each file consists of is dynamically allocated.
When as is occasionally necessary a garbage collection, to compact the information
in a user directory, occurs, the system job {[}Sec 2.5{]} prints out a message
on its teletype. This warning was added when the garbage collector was less reliable
than it now is. The master directory for a drive is read in the first time the
drive is referenced. A copy is written back out whenever the disks are idle and
the master directory has been changed since it was last written out. User directories
are read in when first referenced. If a currently nonexistant user directory
is referenced to write it will be created. If rereferenced to read, a special
open lose {[}Sec 2.5{]} will indicate this to the user. User directories are
copied out whenever the disks are idle and they have been changed since last
copied out. A user directory in memory may be erased if no files are open in
it, a current copy has been written out, and a core request provokes the core
allocator {[}Sec 4.3{]} to examine the status of an area of memory including
the buffer.

The IBM 2311 interface transfers information directly to memory in units of 2000
words. Dynamically allocated buffers in system memory are used for input and
output. The capacity of each pack is about thirty times that of a reel of DEC
tape {[}Sec 3.1.2{]}.


\subsubsection{Links}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.FDELE FBLOCK}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{FBLOCK:}&
\textsf{200000,,{[}SIXBIT /DSK/{]}}\tabularnewline
&
\textsf{SIXBIT /FFNAM1/}\tabularnewline
&
\textsf{SIXBIT /FFNAM2/}\tabularnewline
&
\textsf{SIXBIT /TFNAM1/}\tabularnewline
&
\textsf{SIXBIT /TFNAM2/}\tabularnewline
&
\textsf{SIXBIT /TSNAME/}\tabularnewline
\end{tabular}
\medskip{}

\noindent A special feature of the disk device is that users may establish symbolic
links. If the call illustrated above has been executed, then an attempt to read
the file FFNAM1 FFNAM2 with the system name {[}Sec 2.2.3{]} that was being used
by the procedure that established the link will actually refer to file TFNAM1
TFNAM2 with the system name TSNAME. A link may refer to another link and so on
for up to eight levels. Attempting to write or delete through a link writes on
top of or deletes the link rather than the file it refers to.


\subsection{The UTn Devices}

The devices UT1, UT2, UT3 and UT4 represent the four DEC tape drives on the PDP-6.
They are true file structured devices under ITS with all standard modes available.
Data is dynamically buffered by ITS for both input and output. The file directory
of a tape is read in by the system and retained when a drive is referenced and
there is no directory being retained for it. An updated directory will be written
out on a particular tape whenever the directory has been changed, no files are
open on the tape, and no data transfers are in progress on any drive. Files on
UTn do not have a system name {[}Sec 2.2.3{]} associated with them. Directories
can be excised from core only by the .UDISMT UUO.


\subsubsection{The .UDISMT UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.UDISMT AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call, if successful, causes a DEC tape's file directory
to be excised from core and the tape to be physically demounted. The drive number
must be in the accumulator specified by the UUO. Manually removing tapes or switching
drive numbers of drives for which ITS is retaining a directory may result in
out-of-date file entries left on tapes and directories for one tape being written
on another.

A .UDISMT skips if and only if successful. It will fail if any files are open
on the tape. If a file is opened, deleted, or renamed on a tape while the tape
is being dismounted by ITS the dismount will be aborted and the tape retained.


\subsubsection{The .ASSIGN and .DESIGN UUO's}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.ASSIGN AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
&
\textsf{MOVEI AC,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.DESIGN AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent These system calls are to enable a user to protect against other users
accidentally referencing his DEC tape to write or delete a file or rename {[}Sec
3.1.2.4{]} the tape. Both specify the drive numbers as the contents of their
specified accumulator. The .ASSIGN UUO skips if successful and results in attempts
to write on the designated drive failing unless the writing procedure has the
same system name {[}Sec 2.2.3{]} as the UNAME of the procedure that executed
the .ASSIGN. For a procedure in a disowned tree {[}Sec 5.2.2{]}, an .ASSIGN will
be treated as an illegal instruction. An .ASSIGN will fail only if the drive
is already assigned. The .DESIGN UUO skips if successful and causes the drive
to be unassigned. It fails if the drive is already unassigned or assigned to
a different user. A drive may also be .DESIGN'ed by a .UDISMT {[}Sec 3.1.2.1{]}
and the .ASSIGN'ing of a drive does not protect against other users dismounting
it.


\subsubsection{The .UBLAT UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.UBLAT AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call is intended for reading non-MAC format {[}Ref 4{]}
(such as DEC format) DEC tapes. The contents of the specified accumulator must
be a drive number for which ITS is not retaining a directory. If a directory
is already being retained, the .UBLAT will fail and return without skipping.
(The user might try first .UDISMT'ing the drive.)

If successful, the .UBLAT skips. Instead of attempting to read in the directory
from the tape mounted on the specified drive, ITS internally marks the drive
so that its contents may not be changed (no writes, deletes, or renames). At
this point a successful .OPEN of the tape may be executed with any file name
and all blocks of the tape will be read consecutively. Thus the tape may only
be referenced to read the file containing the entire contents or to .UDISMT {[}Sec
3.1.1{]} it.


\subsubsection{The .UTNAM UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}(SIXBIT /lll/),,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.UTNAM AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call changes the three character tape name of a particular
DEC tape. The tape drive number must be specified in the right half of the specified
accumulator. The call will fail and return without skipping if there is no such
drive or if the drive is in .UBLAT mode {[}Sec 3.1.2.3{]} or .ASSIGN'ed {[}Sec
3.1.2.2{]} to another user. Otherwise it modifies the tape's directory (reading
it in if necessary) so as to have a tape name corresponding to the left half
of the accumulator specified by the call and skips on return.


\subsubsection{The .UINIT UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,TAPEN}\tabularnewline
\textsf{CALL:}&
\textsf{.UINIT AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call initializes the directory for the DEC tape on the
drive whose number is the contents of the accumulator it specifies. The tape
must have been .ASSIGN'ed {[}Sec 3.1.2.2{]} to the user doing the .UINIT. If
successful the .UINIT skips on returning. If the specified drive is nonexistant
or the tape on it is not .ASSIGN'ed to the user doing the .UINIT, it returns
without skipping.


\subsection{The COM and SYS Devices}

The device SYS is used for storage of systems programs and the {}``message of
the day'' {[}Sec 7.1.1{]}. It is currently those files on device DSK with system
name SYS. Reading or writing device SYS causes one to reference DSK as though
one's system name were momentarily SYS. The device COM is used for commonly used
user files and the mail feature {[}Sec 7.2.1, 7.2.2{]}. In a manner similar to
device SYS it is DSK with system name COMMON.


\section{Unit Character Oriented Devices}


\subsection{The Tnm and TTY Devices}

Device T00 is the console teletype. Devices T11 through T14 (the two digits are
treated as an octal number) are GE Datanet 760 terminals with a character only
display and keyboard. Devices T01 through T10 are available for more teletype
and teletype-like hardware and are read and written through the Knight Teletype
Kludge. Device TTY for a particular procedure is the console controlling the
procedure tree it is on. All input-output to these devices is in ASCII characters
and the {}``image'' mode {[}Sec 2.2{]} has special meanings. Further detail
on which Tnm is {}``where'' is given in the following table (as of July 14,
1969):

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Tnm}&
\textsf{Location}\tabularnewline
\textsf{T0}&
\textsf{Main console (by PDP-6).}\tabularnewline
\textsf{T1}&
\textsf{Advanced Remote Display Station.}\tabularnewline
\textsf{T2}&
\textsf{Outside line (or 1479 depending on switch).}\tabularnewline
\textsf{T3}&
\textsf{Robot console.}\tabularnewline
\textsf{T4}&
\textsf{PDP-10 console.}\tabularnewline
\textsf{T5}&
\textsf{System console (by line printer).}\tabularnewline
\textsf{T6}&
\textsf{Inside line 1425.}\tabularnewline
\textsf{T7}&
\textsf{Inside line 1474 (or outside depending on switch) 15cps.}\tabularnewline
\textsf{T10}&
\textsf{Spare.}\tabularnewline
\textsf{T11}&
\textsf{GE console by plotter.}\tabularnewline
\textsf{T12}&
\textsf{GE console on 8th floor.}\tabularnewline
\textsf{T13}&
\textsf{GE console by air conditioner.}\tabularnewline
\textsf{T14}&
\textsf{GE console by ham rig (in far corner).}\tabularnewline
\textsf{T15up}&
\textsf{Nonexistent.}\tabularnewline
\end{tabular}
\medskip{}

A procedure may not open its console by referring to it as Tnm for the corresponding
n and m. Only one procedure at a time may have a teletype open as a device rather
than a console. The procedure with T00 opened as a console (TTY) and that actually
has control of it {[}Sec 3.2.1.1{]} can always seize the DEC 340 display {[}Sec
3.4.1{]}.

Image mode output to KSR 35/37's is very straight forward and just sends the
character to the teletype unmodified. ASCII mode differs only in the following:

\begin{enumerate}
\item The character whose value is 33 is printed as a {}``\$''.
\item Other characters with a value less than 40 that are not format effectors or bell
are printed as a {}``\textasciitilde{}'' followed by the character with an
ASCII value 100 greater.
\item Tab is simulated with spaces.
\item The {}``delete'' character doesn't type out.
\item New line is simulated for a carriage return.
\end{enumerate}
\noindent Output to GE terminals is the same as ASCII mode output to KSR 35/37's
except for the following: 

\begin{enumerate}
\item All line feeds (12) are ignored.
\item A \textasciicircum{}L (form feed) clears the screen.
\item An automatic new line is inserted if the right margin is touched.
\item An {}``$\ulcorner$'' as displayed by the GE terminal, is used instead of a
{}``\textasciitilde{}'' prefix.
\item Output beyond the bottom of the output area wraps around and overwrites from
the top of the output area which does not include the bottom three lines unless
the first input .OPEN {[}Sec 2.2{]} had the 3.4 mode bit on.
\item Finally, if the output is in image mode only, the character \textasciicircum{}T
will allow overwriting starting from the top of the output area without clearing
the screen or wrapping off the bottom.
\end{enumerate}
\noindent For all the above output modes, adding block mode only affects individual
character processing by causing \textasciicircum{}C's that are output to be ignored.

Input to keyboards (which are all full duplex) is buffered by ITS in relatively
small fixed size buffers. Striking a key when this input buffer is full results
only in a \textasciicircum{}G (bell) (or {}``?'' on a GE terminal) being output
as echo. Any input when the keyboard is not in use, except \textasciicircum{}Z
{[}Sec 1.1.1{]}, is ignored by ITS. Procedures may enable interrupts (class three)
due to non-empty input buffers {[}Sec 4.2{]} and also examine the input characters
at interrupt time with .ITYIC {[}Sec 2.7.3{]}.

Image mode input is characterized by no ITS-supplied echo and no modofication
of the character codes unless open mode {[}Sec 2.2{]} bit 3.5 ({}``old mode'')
is also on, in which case lower case KSR 37 characters are transformed to upper
case KSR 35 characters.

ASCII mode input provides echo in approximately the same manner as outputing
the characters in ASCII mode. Procedure output has higher priority than echo
output. On GE terminals input is normally echoed in the bottom three lines unless
the 3.4 open mode bit was on, in which case characters are echoed where output
is appearing except that a few characters are not echoed at all. In ASCII mode
input, the characters whose values are 175 and 176 are input and echoed as if
they were the character whose value is 33. Having open mode bit 3.5 on has the
same effect for ASCII mode input as it did for image mode input. In general,
all of the various mode bits affecting input are obtained from the first input
.OPEN {[}Sec 2.2{]} executed by a procedure for a particular teletype. For all
the above input modes, adding block mode results in input until the block input
pointer runs out or until a \textasciicircum{}C is typed at which point the .IOT
{[}Sec 2.3{]} being executed terminates as on an end of file {[}Sec 2.3.2{]}.

Any input or output TTY .OPEN by a procedure that has never had control of a
console will fail. Any input or output .IOT or .OPEN executed on a TTY device
by a procedure that has had control of the device while it is actually being
controlled by another procedure {[}Sec 3.5.1{]} will hang until the executing
procedure regains the device.

The device dependent .STATUS {[}Sec 2.5{]} bits for the teletype devices are
as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit}&
\textsf{Meaning}\tabularnewline
\textsf{2.3}&
\textsf{Channel open in {}``DDT mode'' (3.4 mode bit).}\tabularnewline
\textsf{2.4}&
\textsf{A console (TTY device) open on this channel.}\tabularnewline
\textsf{2.5--2.9}&
\textsf{If channel open for output:}\tabularnewline
&
\textsf{Current line number if a GE console.}\tabularnewline
\textsf{2.5--2.9}&
\textsf{If channel open for input:}\tabularnewline
\textsf{2.5}&
\textsf{Indicates some characters have been seen at}\tabularnewline
&
\textsf{interrupt and not main program level.}\tabularnewline
\textsf{2.8}&
\textsf{Teletype is at the 340 {[}Sec 3.4.1{]} or a 340 slave.}\tabularnewline
\textsf{2.9}&
\textsf{Teletype is local, not dial in.}\tabularnewline
\end{tabular}


\subsubsection{The .ATTY and .DTTY UUO's}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.ATTY CHNUM,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{CALL:}&
\textsf{.DTTY CHNUM,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent These system calls enable procedures in a single console controlled
procedure tree to transfer control of their console between each other. The execution
of either by a procedure that does not have control of the console, because it
was taken away by a higher procedure's execution of a .DTTY, will hang until
it regains control. The accumulator field of each must specify a channel (CHNUM
in the above illustration) on which an immediate inferior procedure is open {[}Sec
3.4.2{]}. An .ATTY will pass control of the console to this open procedure unless
the procedure executing the .ATTY has control of the teletype by taking it from
some deeper inferior along the same procedure tree branch in which case it reverts
to the procedure from which it came. An .ATTY will hang instead of doing the
above if the last character typed on the console was a \textasciicircum{}Z. A
.DTTY retrieves control of the console from some inferior to the procedure executing
it.

Both of these calls skip if successful. An .ATTY will fail to skip only if no
inferior is open on the channel it specifies. A .DTTY will fail to skip if no
inferior is open on the channel it specifies or if the procedure executing it
never had control of the console or never gave control away. All other conditions
blocking the success of either system call cause them to hang.


\subsubsection{The .LISTEN UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.LISTEN AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call is usable only on the console a procedure is associated
with. It will hang if control of the console {[}Sec 3.2.1.1{]} has been taken
away from the procedure executing it and if all procedure output has not been
typed. It then returns with the number of buffered input characters in the specified
accumulator. If the procedure has never had control of the console or is in a
disowned tree {[}Sec 5.2.2{]} zero will be returned.


\subsubsection{The Dial Feature}

A feature is available under ITS that allows procedures to dial calls on the
two dataphone lines now available. Caution should be exercised in using this
feature if one is using the system over one of these lines. The computer may
{}``hang-up'' in a more literal sense than usual.

\medskip{}
\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,{[}440600+DIALN,,DLBUF{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.DIAL AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{DLBUF:}&
010201,,020202\tabularnewline
&
100506,,101000\tabularnewline
\end{tabular}
\medskip{}

The .DIAL call is used to initially associate a procedure with a dialer and to
actually request dialing on the dataphone line associated with the dialer. The
accumulator specified by the call, AC in the above example, should contain a
byte pointer directly addressing a byte within the user's core image. Indirect
addressing and indexing are ignored and in fact the index field is used to specify
the dialer number, DIALN in the above example. This corresponds to a teletype
as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Dialer}&
\textsf{Teletype}\tabularnewline
\textsf{0}&
\textsf{T07}\tabularnewline
\textsf{1}&
\textsf{T06}\tabularnewline
\end{tabular}
\medskip{}

\noindent The .DIAL will have no effect and return without skipping if any of
the following conditions hold:

\begin{enumerate}
\item A nonexistant dialer is specified.
\item The teletype associated with the dialer is in use by a procedure other than the
dialing procedure.
\item The associated teletype is not in use but the dialer is assigned (by the execution
of a .DIAL not yet followed by a .HANGUP (see below)) to a procedure other than
the dialing procedure.
\end{enumerate}
If the .DIAL skips in returning it will have set up variables in the system to
that dialing will proceed asynchronously with the procedure's execution. The
byte string, which specifies what is to be dialed, can not be more than five
words long. These words are transfered to the system by the .DIAL and dialing
will be unaffected by the user's subsequent modification of his image of these
words. However a later .DIAL without an intervening .DIALW or .HANGUP (see below)
will simply overwrite these words and may cause garbled dialing.

As dialing proceeds, each byte is examined in succession. A zero byte indicates
the end of bytes to be processed. A byte whose value is between one and ten causes
a similar number of dial pulses to be sent. Interdigital pauses are automatically
inserted after each digit. Bytes with a value larger than ten cause a pause in
dialing of as many tenths of a second as the byte's value minus ten.

A special means is provided to send the {}``break'' signal. If the accumulator
specified by a .DIAL is zero except possibly for the index field (where the dialer
number is specified), then a {}``break'' will be sent after a .DIALW has been
simulated to avoid garbling any dialing in progress.

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DIALW DIALN,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

This call refers to the dialer specified by its accumulator field (DIALN in the
above example). It has no effect and returns without skipping if the dialer has
not been assigned to the .DIALW'ing procedure by a successful .DIAL (see above).
Otherwise it returns and skips after requested dialing by the dialer is complete.

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.HANGUP DIALN,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

This call refers to the dialer specified by its accumulator field (DIALN in the
above example). It has no effect and returns without skipping if the dialer has
not been assigned to the .HANGUP'ing procedure by a successful .DIAL (see above).
Otherwise it returns and skips after hanging up the line for at least three seconds
and freeing the dialer so it is no longer assigned to any procedure.


\subsection{The LPT Device}

A six hundred line per minute Data Products, Inc. line printer with one hundred
and twenty print positions and sixty four printing characters is available for
character output as device LPT. The ASCII/image mode bit {[}Sec 2.2{]} is ignored
in .OPEN's on device LPT but either single ASCII characters or blocks of packed
characters may be output as indicated by the block/unit mode bit. The following
{}``transformations'' are made to the output text:

\begin{enumerate}
\item Lower case characters are made upper case.
\item Characters beyond the one hundred and twentieth print position are ignored.
\item Format effectors (except for vertical tab) are simulated as for a model 35 teletype,
thus overprinting can be accomplished by using carriage return without line feed.
\item Characters with an ASCII value below 40 other than the simulated format effectors
and character 33, which is printed as a {}``\$'', are printed as a {}``\textasciitilde{}''
followed by the character whose ASCII value is 100 greater.
\end{enumerate}
Only one procedure may have the LPT device open at one time but it may be open
on more than one channel. Procedures in disowned trees are blocked from opening
the LPT device but it will not be taken away from a procedure as the procedure
is disowned {[}Sec 5.2.2{]}. (Disowned procedures may use the TPL {[}Sec 3.4.5{]}
device.) A fixed 1000 word buffer in ITS is used for output to this device.

The device dependent .STATUS {[}Sec 2.5{]} bits for the LPT device have in the
2.2-2.9 field the current character position in the print line. This count starts
at zero at the left margin.


\subsection{The PLT Device}

A CalComp model 565 plotter {[}Ref 9{]} is available via {}``character'' output
to device PLT. Available with the same modal restrictions as the LPT device {[}Sec
3.2.2{]}, it is also similar to that device in that it may only be open by one
procedure at a time but may be open on more than one channel. A fixed 200 word
area is used in ITS to buffer output.

Only the right most six bits of characters output to the PLT device have effect.
They are as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit}&
\textsf{Effect if a one}\tabularnewline
\textsf{1.1}&
\textsf{drum down}\tabularnewline
\textsf{1.2}&
\textsf{drum up}\tabularnewline
\textsf{1.3}&
\textsf{carriage right}\tabularnewline
\textsf{1.4}&
\textsf{carriage left}\tabularnewline
\textsf{1.5}&
\textsf{pen up}\tabularnewline
\textsf{1.6}&
\textsf{pen down}\tabularnewline
\end{tabular}


\subsection{The PTP and PTR Device}

The PTP and PTR devices represent, respectively, the sixty three and a third
character per second paper tape punch and four hundred character per second photoelectric
paper tape reader on the PLP-6 {[}Ref 1{]}. They are similar to the LPT and PLT
devices {[}Sec 3.2.2, 3.2.3{]} in that only one procedure may have each open
at one time but that procedure may have the device open on more than one channel
possibly in different modes. Also output or input is buffered in ITS in fixed
areas of 20 and 100 words, respectively. These devices differ from the LPT and
PLT devices in that all standard modes {[}Sec 4{]} are available and the following
special mode. If in a successful .OPEN for one of these devices, the 3.4 mode
bit {[}Sec 2.2{]} is on then the 3.3 mode bit is ignored, the 3.2 mode bit must
indicate unit mode, and all eight paper tape channels may be written or read
from or into the eight rightmost bits of the word addresses by each .IOT {[}Sec
2.3{]} executed.


\subsubsection{The .FEED UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.FEED CHNUM,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call checks to see if the PTP device is open on the channel
it specifies (CHNUM above). If not, it returns without skipping. If so, it causes
one line of blank tape to be punched and skips.


\subsection{The COD Device}

This is a character output device that may be used in block or unit mode but
not any form of image mode and not by more than one procedure at a time. It causes
transmission of low power FM Morse code at a frequency just off the bottom of
the FM broadcast band. Characters for which there is no standard Morse code (such
as line feed) are ignored except that the speed it set by characters whose value
is greater than 137 to approximately, seventy five divided by the difference
between the character value and 137, words per minute. It tries to interrupt
on the input-output channel it is open on when the fixed buffer in ITS it uses
is almost empty.


\section{Robotic Oriented Devices}


\subsection{The NVD, TVC, and VID Devices}

The VID and NVD devices are somewhat similar to the IMX device {[}Sec 3.9{]}
in that they may be open by any number of procedures, have block and unit modes,
and {}``functional'' word input where the quantity read is a function of the
contents. They differ in that the ASCII/image .OPEN mode bit {[}Sec 2.2{]} is
ignored and they represent vidissectors. The initial contents of words input
into should be the coordinates of a point in the field of view of the particular
vidissector at which it is desired to know the light intensity. This contents
will be replaced by a function of said intensity. The exact form of these words
and the use of any device dependent .OPEN mode bits {[}Sec 2.2{]} is listed in
the table below.

\medskip{}
\textsf{}\begin{tabular}{lll}
\textsf{Item}&
\textsf{VID}&
\textsf{NVD}\tabularnewline
\textsf{X}&
\textsf{2.3--1.1}&
\textsf{4.5-3.2}\tabularnewline
\textsf{Y}&
\textsf{4.3--3.1}&
\textsf{2.5-1.2}\tabularnewline
\textsf{value}&
\textsf{1.8--1.1}&
\textsf{(reciprocal of intensity)}\tabularnewline
&
&
\textsf{4.9-3.3 (normalized floating reciprocal intensity)}\tabularnewline
&
&
\textsf{2.1-1.1 (integar logarithm reciprocal intensity)}\tabularnewline
\textsf{(too}&
\textsf{400}&
\textsf{3.1 (overflow)}\tabularnewline
\textsf{dark)}&
&
\textsf{3.2 (dim cut off)}\tabularnewline
\textsf{dead}&
\textsf{--1}&
\textsf{4000000}\tabularnewline
\textsf{modes}&
\textsf{3.6--3.4}&
\textsf{(340 intensity)}\tabularnewline
&
&
\textsf{3.5-3.4 (confidence level)}\tabularnewline
&
&
\textsf{3.8-3.6 (dim cut off level)}\tabularnewline
\end{tabular}
\medskip{}

The VID device is of little use as it is a lower quality subset of the NVD device.
The deflection signals for the VID device come from the DEC 340 display {[}Sec
3.4.1{]} whose use will be degraded by using device VID.

The TVC device is the same as the NVD device except that it should be opened
on two channels, one for output and one for input. Words with coordinates in
them are output on one channel and stored in a fixed length buffer in system
memory. There they are replaced by ITS, at its interrupt level, with the response
word shown above (value). They may be read, in the same order as output, on the
input channel. Unlike most devices, a block mode .IOT outputting to the TVC device
when its buffer is full will not hang up but return with the block .IOT pointer
word pointing at the first word not transferred.


\subsubsection{The .VSCAN and .VSTST UUO's}

(Some of this section is taken from Reference 13.)

\medskip{}
\textsf{}\begin{tabular}{lll}
\textsf{PTABLE:}&
\textsf{WBIT,,VCONO}&
\textsf{;+0}\tabularnewline
&
\textsf{--LENGTH,,ARRAY}&
\textsf{;+1}\tabularnewline
&
\textsf{XRES,,YRES}&
\textsf{;+2}\tabularnewline
&
\textsf{R1}&
\textsf{;+3}\tabularnewline
&
\textsf{R2}&
\textsf{;+4}\tabularnewline
&
\textsf{C1}&
\textsf{;+5}\tabularnewline
&
\textsf{R3}&
\textsf{;+6}\tabularnewline
&
\textsf{R4}&
\textsf{;+7}\tabularnewline
&
\textsf{C2}&
\textsf{;+10}\tabularnewline
&
\textsf{P1}&
\textsf{;+11}\tabularnewline
&
\textsf{P2}&
\textsf{;+12}\tabularnewline
&
&
\tabularnewline
\textsf{ARRAY:}&
\textsf{BLOCK LENGTH}&
\tabularnewline
\end{tabular}
\medskip{}

This system call allows the user to read the light intensity at an array of points
with low overhead and, if desired, overlapped computation.

The effective address of a .VSCAN should point at an eleven word block of parameters
defining the points to be scanned, the locations to read into, the mode they
are to be read in, and whether the call should hang until the scan is through.
The effect of the parameters, in order, is described below.

The first word has in its right half the control bits for the vidisector as in
section 3.3.1 for NVD. The sign bit, if a one, causes the .VSCAN to hang until
the scan is over. If a zero, computation by the .VSCAN'ing user may procede while
the scanning proceeds at ITS's interrupt level.

The second word should be similar to a block mode .IOT {[}Sec 2.3{]} pointer
word. Its right half should point to the beginning of an array to be read into
in the response format of NVD in section 3.3.1. Its left half should be a negative
count equal to or larger, in magnitude, than the number of points being scanned.
(If in the above illustration either PTABLE+12
 or ARRAY+LENGTH-1
 were beyond the users memory bound, the .VSCAN would be treated as an illegal
instruction.)

The third word has in its left and right halves, as eighteen bit integers, the
{}``X'' and {}``Y'' resolution or number of points to be scanned in each
direction.

The remaining nine parameters, which are fixed point quantities with the binary
point between 2.9 and 3.1, define where the XRES by YRES points lie in vidissector
coordinates according to the following ALGOL program:

\medskip{}
\textsf{}\begin{tabular}{l}
\textsf{FOR Y1<--0 STEP 1 UNTIL YRES--1 DO}\tabularnewline
\textsf{BEGIN}\tabularnewline
\end{tabular}

\textsf{}\begin{tabular}{lc}
&
\textsf{Y2<--(2{*}Y1+1)/(2{*}YRES)}\tabularnewline
\end{tabular}

\textsf{}\begin{tabular}{l}
\textsf{FOR X1<--0 STEP 1 UNTIL XRES--1 DO}\tabularnewline
\textsf{BEGIN}\tabularnewline
\end{tabular}

\textsf{}\begin{tabular}{ll}
&
\textsf{X2<--(2{*}X1+1)/(2{*}XRES)}\tabularnewline
\end{tabular}

\textsf{}\begin{tabular}{l}
\textsf{TEMP<--P1{*}X2+P2{*}Y2+1}\tabularnewline
\textsf{X<--(R1{*}X2+R2{*}Y2+C1)/TEMP}\tabularnewline
\textsf{Y<--(R3{*}X2+R4{*}Y2+C2)/TEMP}\tabularnewline
\textsf{ARRAY(Y1{*}XRES+X1)<--SCAN(X,Y)}\tabularnewline
\textsf{END}\tabularnewline
\textsf{END}\tabularnewline
\end{tabular}
\medskip{}

A .VSCAN will hang up until the NVD device is free. This device is then seized,
not to be released until the scan is over or aborted. A scan is only aborted
if the procedure it is being executed for is reset {[}Sec 3.4.2{]} or its core
size reduced so as to exclude the array being read into (ARRAY in the above illustrations)
or by .VSTST.

\medskip{}
\textsf{}\begin{tabular}{lll}
&
\textsf{MOVSI AC,1}&
\textsf{;or 0 or 400000}\tabularnewline
\textsf{CALL:}&
\textsf{.VSTST AC,}&
\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

This system call allows later control of and sensing by a procedure that has
overlapped computation with a .VSCAN. It is illegal if executed when another
procedure is .VSCAN'ing. If the contents of the specified accumulator is positive,
the .VSTST hangs till the scan is over. If the contents of the specified accumulator
is negative, any scan in progress is aborted. If the contents of the specified
accumulator is zero, the user's location then being stored into by the scan,
if any, replaces it.


\subsection{The OMX Device}

A multiplexed digital to analog converter on the PDP-6 is available via word
output to the OMX device {[}Ref 5, 6{]}. Block and unit modes are available and
the {}``ASCII/image'' mode bit {[}Sec 2.2{]} has a special significance explained
below. Each word output should have the desired channel number in bits 4.9-4.4
and the value to be converted in bits 4.3-3.1. Thus channel numbers range from
zero to 77 and values from zero to 7777. These output channels decay exponentially
with some large time constant so ITS stores the current desired value for each
channel and outputs them every half second as long as the OMX device is open
by some procedure. Output in {}``ASCII'' mode immediately affects the channel
as well as storing a value to be output periodically. Slightly less overhead
occurs in {}``image'' mode which only stores a value in ITS and may have no
effect for up to half a second. Any number of users may have the OMX device open,
possibly on more than one channel and possible in different modes. Current OMX
channel assignments are as follows:

\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{Channel}&
\textsf{Effect}\tabularnewline
\endhead
\textsf{0--31}&
\textsf{Unused.}\tabularnewline
\textsf{32}&
\textsf{NVD iris.}\tabularnewline
\textsf{33}&
\textsf{NVD focus.}\tabularnewline
\textsf{34}&
\textsf{NVD mirror.}\tabularnewline
\textsf{35-55}&
\textsf{Unused.}\tabularnewline
\textsf{56}&
\textsf{TVB pan.}\tabularnewline
\textsf{57}&
\textsf{TVB tilt.}\tabularnewline
\textsf{60}&
\textsf{MA3 hand extend.}\tabularnewline
\textsf{61}&
\textsf{MA3 hand rotate.}\tabularnewline
\textsf{62}&
\textsf{MA3 hand grasp.}\tabularnewline
\textsf{63}&
\textsf{Cannon lens zoom (MA3 hand finger \#1).}\tabularnewline
\textsf{64}&
\textsf{Cannon lens focus (MA3 hand finger \#2).}\tabularnewline
\textsf{65}&
\textsf{MA3 hand tilt.}\tabularnewline
\textsf{66}&
\textsf{Alles hand grip.}\tabularnewline
\textsf{67}&
\textsf{Alles hand tilt.}\tabularnewline
\textsf{70}&
\textsf{Alles hand extend.}\tabularnewline
\textsf{71}&
\textsf{Alles hand rotate.}\tabularnewline
\textsf{72}&
\textsf{AMF arm wrist roll.}\tabularnewline
\textsf{73}&
\textsf{AMF arm wrist yaw.}\tabularnewline
\textsf{74}&
\textsf{TDR horizontal.}\tabularnewline
\textsf{75}&
\textsf{AMF arm horizontal.}\tabularnewline
\textsf{76}&
\textsf{AMF arm vertical.}\tabularnewline
\textsf{77}&
\textsf{AMF arm swing.}\tabularnewline
\end{longtable}


\subsubsection{The .ARMOVE and .ARMOFF UUO's}

(Some of this section is taken from Reference 13.)

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}--LENGTH,,ARMBLK{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.ARMOVE AC,}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\textsf{;test successful return}\tabularnewline
&
\tabularnewline
\textsf{ARMBLK:}&
\textsf{BLOCK LENGTH}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call allows one procedure at a time to exercise special
control over several digital to analog multiplexor channels {[}Sec 3.3.2{]}.
It provides acceleration and velocity limiting, software limit stops, and conversion
from joint number to multiplexor channel.

To avoid certain timing problems, the transmission of commands to the multiplexor
control routines in ITS is noninterruptable (but for a limited length of time
as only a limited number of commands may be transmitted). Each command is a single
word in a block pointed at by the contents of the accumulator specified in the
call. The format of these words is as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bits}&
\textsf{Significance}\tabularnewline
\textsf{4.9--4.4}&
\textsf{joint number}\tabularnewline
\textsf{4.3--3.7}&
\textsf{command}\tabularnewline
\textsf{3.6}&
\textsf{unused}\tabularnewline
\textsf{3.5}&
\textsf{indirect}\tabularnewline
\textsf{3.4--3.1}&
\textsf{index}\tabularnewline
\textsf{2.9--1.1}&
\textsf{address or operand}\tabularnewline
\end{tabular}
\medskip{}

The currently available joint addresses are as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Address}&
\textsf{Significance}\tabularnewline
\textsf{0}&
\textsf{AMF swing}\tabularnewline
\textsf{1}&
\textsf{AMF vertical}\tabularnewline
\textsf{2}&
\textsf{AMF horizontal}\tabularnewline
\textsf{3}&
\textsf{AMF yaw (inoperative)}\tabularnewline
\textsf{4}&
\textsf{Alles hand tilt}\tabularnewline
\textsf{5}&
\textsf{Alles hand grip}\tabularnewline
\textsf{6}&
\textsf{Alles hand rotate}\tabularnewline
\textsf{7}&
\textsf{Alles hand extend}\tabularnewline
\textsf{10}&
\textsf{AMF roll (inoperative)}\tabularnewline
\end{tabular}
\medskip{}

The currently available commands are as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Command}&
\textsf{Significance}\tabularnewline
\textsf{0}&
\textsf{set destination}\tabularnewline
\textsf{1}&
\textsf{set velocity limit}\tabularnewline
\textsf{2}&
\textsf{test magnitude of position error}\tabularnewline
\textsf{3}&
\textsf{test magnitude of velocity}\tabularnewline
\end{tabular}
\medskip{}

The operand is computed by adding the contents of the specified index register
(if any) to the right half of the command. The result is masked to 13 bits. If
the indirect bit is a one, the right half of the word addressed is used as the
operand. No further indexing or indirecting is interpreted.

The test commands are {}``true'' if the quantity tested exceeds the operand.
If any tests are {}``true'' the .ARMOVE will skip.

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.ARMOFF}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

The multiplexor control routines are activated by the first .ARMOVE and are turned
off by an .ARMOFF or killing the .ARMOVE'ing procedure.

An .ARMOVE is illegal if:

\begin{enumerate}
\item The arm is in use by another user.
\item The block extends above the user's memory bound.
\item An indirect reference is out of bounds.
\item An unused command code or joint number is specified.
\item The block is over 100 words long.
\end{enumerate}

\subsection{The IMX Device}

A multiplexed analog to digital converter attached to the PDP-6 is available
via word input from the IMX device {[}Ref 5, 6{]}. Block and unit modes are available
but the {}``ASCII/image'' mode bit {[}Sec 2.2{]} has a special significance
explained below. Each word input into must initially contain a number from zero
to 177. This number will be replaced with the twelve bit digitalization of the
analog quantity associated with the multiplexor channel of the same number. If
it is desired to read in values converted at each .IOT {[}Sec 2.4{]} time then
device IMX should be opened in {}``ASCII'' mode. Opening device IMX in {}``image''
mode causes ITS to continuously read all input multiplexor channels into system
core a minimum of about ten times a second. Executing a .IOT on a channel opened
in this manner will result in values up to one tenth of a second old but without
the overhead necessary to read in new values. Any number of procedures may have
the IMX device open, possibly on different channels and possibly in different
modes. Current IMX channel assignments are as follows:

\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{Channel}&
\textsf{Input function}\tabularnewline
\endhead
\textsf{0--21}&
\textsf{Unused.}\tabularnewline
\textsf{22}&
\textsf{MA3 hand extend.}\tabularnewline
\textsf{23}&
\textsf{MA3 hand rotate.}\tabularnewline
\textsf{24}&
\textsf{MA3 hand grasp.}\tabularnewline
\textsf{25}&
\textsf{Cannon lens zoom (MA3 hand finger \#1).}\tabularnewline
\textsf{26}&
\textsf{Cannon lens focus (MA3 hand finger \#2).}\tabularnewline
\textsf{27}&
\textsf{MA3 hand tilt.}\tabularnewline
\textsf{30--32}&
\textsf{Unused.}\tabularnewline
\textsf{33}&
\textsf{NVD iris.}\tabularnewline
\textsf{34}&
\textsf{NVD focus.}\tabularnewline
\textsf{35}&
\textsf{NVD mirror.}\tabularnewline
\textsf{36}&
\textsf{Rhomboidal test table pot A.}\tabularnewline
\textsf{37}&
\textsf{Rhomboidal test table pot B.}\tabularnewline
\textsf{40}&
\textsf{Rhomboidal test table pot C.}\tabularnewline
\textsf{41}&
\textsf{Rhomboidal test table pot D.}\tabularnewline
\textsf{42}&
\textsf{Pot box upper left.}\tabularnewline
\textsf{43}&
\textsf{Pot box upper right.}\tabularnewline
\textsf{44}&
\textsf{Pot box lower right.}\tabularnewline
\textsf{45}&
\textsf{Pot box lower left.}\tabularnewline
\textsf{46--57}&
\textsf{Unused.}\tabularnewline
\textsf{60}&
\textsf{TDR output.}\tabularnewline
\textsf{61}&
\textsf{Alles hand tilt.}\tabularnewline
\textsf{62}&
\textsf{Alles hand extend.}\tabularnewline
\textsf{63}&
\textsf{Alles hand rotate.}\tabularnewline
\textsf{64}&
\textsf{Alles hand grasp.}\tabularnewline
\textsf{65}&
\textsf{AMF arm wrist roll.}\tabularnewline
\textsf{66}&
\textsf{AMF arm wrist yaw.}\tabularnewline
\textsf{67--70}&
\textsf{AMF arm horizontal high resolution.}\tabularnewline
\textsf{71}&
\textsf{AMF arm horizontal absolute position.}\tabularnewline
\textsf{72--73}&
\textsf{AMF arm swing high resolution.}\tabularnewline
\textsf{74}&
\textsf{AMF arm swing absolute position.}\tabularnewline
\textsf{75--76}&
\textsf{AMF arm vertical high resolution.}\tabularnewline
\textsf{77}&
\textsf{AMF arm vertical absolute position.}\tabularnewline
\textsf{100--111}&
\textsf{Unused.}\tabularnewline
\textsf{112}&
\textsf{Joy stick X.}\tabularnewline
\textsf{113}&
\textsf{Joy stick Y.}\tabularnewline
\textsf{114--131}&
\textsf{Unused.}\tabularnewline
\textsf{132}&
\textsf{TVC pot box one (manual iris control).}\tabularnewline
\textsf{133}&
\textsf{TVC pot box two (manual focus control).}\tabularnewline
\textsf{134}&
\textsf{TVC pot box three.}\tabularnewline
\textsf{135}&
\textsf{TVC pot box four.}\tabularnewline
\textsf{136}&
\textsf{TVC pot box five.}\tabularnewline
\textsf{137}&
\textsf{TVC pot box six.}\tabularnewline
\textsf{140}&
\textsf{New pot box pot one.}\tabularnewline
\textsf{141}&
\textsf{New pot box pot two.}\tabularnewline
\textsf{142}&
\textsf{New pot box pot three.}\tabularnewline
\textsf{143}&
\textsf{New pot box pot four.}\tabularnewline
\textsf{144}&
\textsf{New pot box pot five.}\tabularnewline
\textsf{145}&
\textsf{New pot box pot six.}\tabularnewline
\textsf{146}&
\textsf{New pot box pot seven.}\tabularnewline
\textsf{147}&
\textsf{New pot box pot eight.}\tabularnewline
\textsf{150--155}&
\textsf{Unused.}\tabularnewline
\textsf{156}&
\textsf{Pot box two, one.}\tabularnewline
\textsf{157}&
\textsf{Pot box two, two.}\tabularnewline
\textsf{160}&
\textsf{Pot box two, three.}\tabularnewline
\textsf{161}&
\textsf{Pot box two, four.}\tabularnewline
\textsf{162}&
\textsf{Pot box two, five.}\tabularnewline
\textsf{163}&
\textsf{Pot box two, six.}\tabularnewline
\textsf{164}&
\textsf{Pot box two, seven.}\tabularnewline
\textsf{165}&
\textsf{Pot box two, eight.}\tabularnewline
\textsf{166}&
\textsf{Joy stick console pot ten.}\tabularnewline
\textsf{167}&
\textsf{Joy stick console pot nine.}\tabularnewline
\textsf{170}&
\textsf{Joy stick console pot eight.}\tabularnewline
\textsf{171}&
\textsf{Joy stick console pot seven.}\tabularnewline
\textsf{172}&
\textsf{Joy stick console pot six.}\tabularnewline
\textsf{173}&
\textsf{Joy stick console pot five.}\tabularnewline
\textsf{174}&
\textsf{Joy stick console pot four.}\tabularnewline
\textsf{175}&
\textsf{Joy stick console pot three.}\tabularnewline
\textsf{176}&
\textsf{Joy stick console pot two.}\tabularnewline
\textsf{177}&
\textsf{Joy stick console pot one.}\tabularnewline
\end{longtable}


\subsubsection{The .POTSET UUO}

(some of this section is taken from Reference 13.)

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.POTSET PTABLE}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{PTABLE:}&
\textsf{BLOCK 4{*}NUMENTRIES}\tabularnewline
&
\textsf{0}\tabularnewline
\end{tabular}
\medskip{}

\noindent This call gives the user a flexible means of controlling program parameters
via the input multiplexor. A maximum of 20 simultaneous connections between pots
and variables is permitted. Each may be variable fixed or floating point. If
fixed point, it may be an arbitrary byte within a word. The user may specify
a mapping from pot values to variable values by giving an upper and lower limit.
These may be inverted to give a backward mapping. Two types of control are provided,
absolute and incremental. In absolute mode, the true pot position sets the value.
This may be useful for positioning displayed objects with a joystick. The incremental
mode permits a variable or set of variables to be changed slightly without causing
a discontinuous jump in their values. The value is unchanged at connect time,
but rotating the pot adds its scaled increment to the variable. Turning it down
in the bottom third, or up in the top third of the pot's range causes a faster
change so as to keep the control near center. The increase in gain is inhibited
at low speeds to prevent drift due to noise.

The address of the call points to a table of pot connection (or disconnect) specifications.
This table consists of blocks of 4 words, followed by a zero word. The block
format is as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Location}&
\textsf{Variable}\tabularnewline
\textsf{F00+0}&
\textsf{Multiplexor channel,,control bits (see below)}\tabularnewline
\textsf{F00+1}&
\textsf{Byte specification (see below),,variable address}\tabularnewline
\textsf{F00+2}&
\textsf{Lower limit (value at pot = 0)}\tabularnewline
\textsf{F00+3}&
\textsf{Upper limit (value at pot = 100000)}\tabularnewline
\end{tabular}
\medskip{}

The control bits are as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit}&
\textsf{Meaning}\tabularnewline
\textsf{2.9}&
\textsf{1$\Rightarrow$disconnect pot}\tabularnewline
&
\textsf{0$\Rightarrow$connect pot}\tabularnewline
\textsf{1.2}&
\textsf{1$\Rightarrow$absolute}\tabularnewline
&
\textsf{0$\Rightarrow$incremental}\tabularnewline
\textsf{1.1}&
\textsf{1$\Rightarrow$floating}\tabularnewline
&
\textsf{0$\Rightarrow$fixed}\tabularnewline
\end{tabular}
\medskip{}

The byte specification should be in machine byte pointer format (no index or
indirect allowed) for a partial word and may be zero for a full word.

A .POTSET call is illegal if:

\begin{enumerate}
\item The user tries to connect a pot already in use by another user.
\item The table is more than twenty blocks long.
\item An attempt is made to connect a pot when twenty pots are already connected.
\item The address exceeds the user's memory bound.
\end{enumerate}
\noindent A pot is disconnected when:

\begin{enumerate}
\item The user disconnects it with a .POTSET.
\item The user reduces his memory bound below the address the pot controls.
\item The job is killed.
\end{enumerate}

\section{Miscellaneous Devices}


\subsection{The DIS and IDS Devices}

The DEC 340 display {[}Ref 1{]} differs significantly from all other devices
usable in ITS. In order to maintain an image on the display it is necessary to
repeatedly output to it a list of display words. This list must be stored in
main memory and the various means of using the display may be divided into those
that maintain this list in system memory (discussed in this section) and those
that allow the list to be maintained in the user's core image {[}Sec 3.4.1.1{]}.

Only one procedure at a time may use the 340 display and in only one of its three
modes (as symbolic device DIS, as symbolic device IDS, or via the .DSTART and
.STRTL UUO's). If the display is free, any procedure may seize it by executing
a proper .OPEN on device DIS or IDS or by executing a .DSTART or .DSTRTL UUO.
If the display is in use, however, a procedure will succeed in any of the above
UUO's only if it is the procedure that has the display or it has control of device
T00 as a console {[}Sec 3.5{]}. If the second case applies, the channels, if
any, on which the other procedure had the DIS or IDS open will be modified to
the corresponding (block or unit) NUL device {[}Sec 3.4{]} output. .CLOSE'ing
{[}Sec 2.8.1{]} all input-output channels in which device DIS or IDS are open
is the same as executing a .DCLOSE {[}Sec 3.4.1.3{]}.

The DIS symbolic device allows the user to output single or packed blocks of
ASCII characters in ASCII mode and single or blocks of 340 display list half
words {[}Ref 1{]} in image mode. This device may be open on more than one channel
at a time in possibly different modes. If the user outputs characters and then
halfwords, ITS will automatically insert intervening items to cause the display
to escape to parameter mode. If the user outputs half words and then character,
ITS assumes that he has inserted items to cause the display to escape to parameter
mode. A display list produced by output to the DIS device will start by setting
the 340 display intensity to 7, its x and y coordinates to zero and 7000, and
its scale to one larger than the 3.4-3.5 field of .OPEN mode bits {[}Sec 2.2{]}
used unless that field is 3 in which case the scale is set to zero. Lines of
character output that extend beyond the right edge of the screen will wrap around
and continue, superimposed on their beginning, from the left. Lines of character
output that extend beyond the bottom of the screen similarly continue from the
top. The amount of display information created by DIS output may not exceed 2000
words. After that, further output is ignored. The stored information created
by output to the DIS device may be deleted to accept new information by outputting
a \textasciicircum{}T or \textasciicircum{}L (form feed) character. In the latter
case, this action will be delayed for a few seconds.

The IDS symbolic device allows the user to use a semi-idealized display. This
device is known as the interpreted display since the user writes {}``instructions''
to be executed by a display processor which are then interpreted by ITS simulating
the processor and creating a 340 display list to actually display. The IDS device
may only be opened in unit output mode and what the user outputs to it is the
location, in the user core image, for the display processor to start {}``executing''.

\medskip{}
\textsf{}\begin{tabular}{lll}
&
\textsf{.IOT DISCHN,PC}&
\tabularnewline
&
\textsf{\ldots{}}&
\tabularnewline
&
&
\tabularnewline
\textsf{FC:}&
\textsf{STRTLC}&
\textsf{;location to start}\tabularnewline
&
&
\textsf{;updated during execution}\tabularnewline
\end{tabular}
\medskip{}

Almost all error conditions encountered during this {}``execution'' cause interrupts
to the user {[}Sec 4.2{]}. The simulated display processor has a push down list
facility with its push down list pointer in the user's location 43. The information
to be sent by the .IOT'ing {[}Sec 2.4{]} of each starting location to the IDS
device is normally terminated by the display processor POPJ'ing to zero. Frequently
this is made to happen by over popping by the display processor. The information
stored by the IDS device is currently limited to 2000 words. If the 340 display
is being run by the IDS device when a .IOT is executed on it, the display will
stop and the stored information will be over-written. If the 340 display is not
being run, output from simulation is appended to that already present. Whether
the 340 display is started at the end of the simulation initiated by a .IOT is
determined by a display processor parameter that may be set during simulation.

Instructions for the IDS simulated display processor are thiry-six bit words
interpreted as five left justified ASCII characters if bit 1.1 is zero. If bit
1.1 is a one, bits 1.4--1.6 are interpreted as the following commands:

\medskip{}
\textsf{}\begin{tabular}{lll}
\textsf{1.4--1.6}&
\textsf{Command}&
\textsf{Other fields}\tabularnewline
\textsf{0}&
\textsf{Illegal.}&
\tabularnewline
\textsf{1}&
\textsf{Point.}&
\textsf{4.9--3.4 Y, 3.3--1.7 X, 1.2 intensify.}\tabularnewline
\textsf{2}&
\textsf{Rel vector.}&
\textsf{4.9--3.4 Y, 3.3--1.7 X, 1.2 intensify.}\tabularnewline
\textsf{3}&
\textsf{Increment.}&
\textsf{5 left justified 5 bit fields each:}\tabularnewline
&
&
\textsf{1.1--1.2 length}\tabularnewline
&
&
\textsf{1.3 intensify}\tabularnewline
&
&
\textsf{1.4--1.6 direction (clockwise from vertical).}\tabularnewline
\textsf{4}&
\textsf{See below.}&
\textsf{1.7--1.9 subcommand function.}\tabularnewline
\textsf{5}&
\textsf{Abs vector.}&
\textsf{4.9--3.4 Y, 3.3--1.7 X, 1.2 intensify.}\tabularnewline
\textsf{6}&
\textsf{Illegal.}&
\tabularnewline
\textsf{7}&
\textsf{Illegal.}&
\tabularnewline
\end{tabular}
\medskip{}

\textsf{}\begin{tabular}{lll}
\textsf{1.7--1.9}&
\textsf{Function}&
\textsf{Other fields}\tabularnewline
\textsf{0}&
\textsf{Illegal.}&
\tabularnewline
\textsf{1}&
\textsf{PUSHJ.}&
\textsf{4.9--3.1 address.}\tabularnewline
\textsf{2}&
\textsf{POPJ.}&
\textsf{4.9--3.1 address.}\tabularnewline
\textsf{3}&
\textsf{JRST.}&
\textsf{4.9--3.1 address.}\tabularnewline
\textsf{4}&
\textsf{POP.}&
\textsf{4.9--3.1 address.}\tabularnewline
\textsf{5}&
\textsf{PUSH.}&
\textsf{4.9--3.1 address.}\tabularnewline
\textsf{6}&
\textsf{See below.}&
\textsf{2.3--2.9 parameter to set from 4.9--3.1.}\tabularnewline
\textsf{7}&
\textsf{Illegal.}&
\tabularnewline
\end{tabular}
\medskip{}

\textsf{}\begin{tabular}{ll}
\textsf{2.3--2.9}&
\textsf{Parameter}\tabularnewline
\textsf{0}&
\textsf{Illegal.}\tabularnewline
\textsf{1}&
\textsf{Start mode (nonzero means start after .IOT).}\tabularnewline
\textsf{2}&
\textsf{Character scale.}\tabularnewline
\textsf{3}&
\textsf{Increment mode.}\tabularnewline
\textsf{4}&
\textsf{Vector scale.}\tabularnewline
\textsf{5}&
\textsf{All scales.}\tabularnewline
\textsf{6}&
\textsf{Coordinate of left edge of displayed area.}\tabularnewline
\textsf{7}&
\textsf{Coordinate of bottom edge of displayed area.}\tabularnewline
\textsf{10--77}&
\textsf{Illegal.}\tabularnewline
\end{tabular}


\subsubsection{The .DSTART and .DSTRTL UUO's}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DSTART DPNTR}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{DPNTR:}&
\textsf{--LENGTH,,DISLIST--1}\tabularnewline
&
\tabularnewline
\textsf{DISLIST:}&
\textsf{BLOCK LENGTH}\tabularnewline
&
\tabularnewline
\end{tabular}

\noindent \textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DSTRTL PHTRL}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{PHTRL:}&
\textsf{DPNT2+1,,.+1}\tabularnewline
&
\textsf{DPNT2+1,,0}\tabularnewline
&
\tabularnewline
\textsf{DPNT2:}&
\textsf{--LENGTH,,DISLIST}\tabularnewline
&
\tabularnewline
\textsf{DISLIST:}&
\textsf{BLOCK LENGTH}\tabularnewline
\end{tabular}
\medskip{}

\noindent These UUO's enable the user to display lists that are in his core image.
The execution of either attempts to seize the 340 display and skips only if successful.

A .DSTART should point at a location that will always contain either a BLK0 {[}Ref
1{]} type output pointer, if one block of data is to be displayed, or the first
word of a linked list of display blocks. In this linked list, the right half
of each entry points to the next entry, or, if zero, indicated the end of the
list. The left half of each word should be positive and is a pointer to a BLK0
pointer or is ignored if it is zero or points to a zero word.

.DSTRTL differs from .DSTART only in that, if it is used to display a list of
blocks, the left halves of its linked list words are interpreted as pointing
to the word after not a BLK0 pointer but a regular block mode output pointer
{[}Sec 2.4{]}.


\subsubsection{The .LTPEN UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}CONTROL{]}}\tabularnewline
&
\textsf{MOVEM AC,LBLOCK}\tabularnewline
\textsf{CALL:}&
\textsf{.LTPEN LBLOCK}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{LBLOCK:}&
\textsf{BLOCK 6}\tabularnewline
\end{tabular}
\medskip{}

\noindent The 340 display is equipped with a light pen that causes a hardware
interrupt when the light intensity it sees increases suddenly as when a spot
is displayed under it. The display also stops when this occurs and its current
coordinates can be read in by the PDP-6. The user may enable software interrupts
(class three) to his procedures when the light pen is seen and he has the display
seized {[}Sec 4.2{]}.

This system call enabled the user with the display seized to read information
about where the light pen has been seen and the state of the current transfer
to the display. Results are returned in the contents of the effective address
and following five locations. The contents of the effective address also acts
as an argument. If bit 4.9 is zero the rest is ignored. But if bit 4.9 is a one
then bit 3.1 will cause the .LTPEN to hang until the light pen has been seen
at least once and bit 1.1 will be used to set the multiple sighting mode. If
this mode is on, the light pen may be seen many times while a display block is
displayed once. If this mode is off (zero) the light pen may be seen only once
and ignored thereafter for each display of a display block.

The six words returned to the user are as follows:

\begin{enumerate}
\item The actual word DATAI'ed {[}Ref 1{]} from the 340 display at the time of the
last light pen interrupt.
\item The number of times the light pen was seen since the last .LTPEN.
\item The sum of the y coordinates at the points the light pen was seen since the last
.LTPEN.
\item The corresponding sum of x coordinates.
\item The current linked list pointer.
\item The current BLK0 pointer.
\end{enumerate}

\subsubsection{The .DCLOSE UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DCLOSE}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call releases the 340 display if executed by the user who
has the display seized, closing any channels on which it is open. Otherwise it
does nothing.


\subsubsection{The .DSTOP UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DSTOP}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}

\noindent This system call stops the 340 display, but does not release it, if
executed by the user who has the display seized. Otherwise it does nothing. It
is intended for use in conjunction with the .DSTART or .DSTRTL UUO.


\subsubsection{The .NDIS UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,69.}\tabularnewline
\textsf{CALL:}&
\textsf{.NDIS AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}

\noindent This system call is intended for use in taking pictures of 340 displays.
It sets a display control variable from the contents of the accumulator it specifies.
This variable has no effect if it is negative but if zero it inhibits display
completely and if positive it is decremented by one each time the current display
block or list of blocks is displayed. This call skips unless executed by a procedure
that does not have the display assigned to it.


\subsection{The USR Device}

The USR device actually represents procedures. A successful .OPEN {[}Sec 2.2{]}
executed on device USR will either create a new procedure {[}Sec 5.1.1{]}, attach
a disowned procedure tree {[}Sec 5.1.2{]}, associate with the input-output channel
on which it was executed an existant procedure or allow the user access to the
PDP-10's memory {[}Sec 3.4.2.1{]}. The file names are the UNAME and JNAME of
the procedure being .OPEN'ed. Only immediate inferiors may be .OPEN'ed to write
into but any procedure may be examined. If an inferior procedure has been opened,
it may be destroyed by a .UCLOSE {[}Sec 5.2.1{]} but will be entirely unaffected
by a .CLOSE {[}Sec 2.7.1{]} executed on the channel. The same procedure may be
open on more than one channel of its superior, possibly in different modes. It
is as first .OPEN time that an interrupt bit {[}Sec 5.1.3{]} is assigned by ITS
to a procedure. The number of inferior procedures a procedure may have is currently
limited to eight.

The 3.3 mode bit {[}Sec 2.2{]} is ignored in .OPEN's on device USR but both block
and unit modes are available. Executing .IOT's on channels opened on device USR
results in the transfer of a thirty-six bit binary word or words between the
procedures. The location in the .OPEN'ed procedure of the first word to be transferred
is specified by the .ACCESS {[}Sec 2.7.5{]} pointer associated with the input-output
channel on which the transfer is occuring. Each word transferred advances the
appropriate pointer by one even in unit mode which ITS treats internally as blocks
of length one. An attempt to read a word beyond the core allocated {[}Sec 4.3{]}
will result in a class two interrupt {[}Sec 4.2{]} but in a similar attempt to
write (possible only for an immediate inferior) ITS will attempt to extend the
procedure's core image and and interrupt will result only if more core is unobtainable.

Executing a .RESET {[}Sec 2.7.2{]} on a channel with an inferior procedure open
on it is equivalent to executing a .UCLOSE and then a .OPEN to recreate the procedure
(with reset variables, one 2000 word block of cleared core, etc.) but with less
overhead.


\subsubsection{The PDP-10}

An .OPEN on device USR with a second file name of {}``PDP10'' may be made,
in all the modes allowed for regular procedures, to access the memory of the
PDP-10. .IOTs attempting to read or write the PDP-10's accumulators will be ineffective
and read or write the core locations shadowed by the accumulators. Attempting
to reference above the PDP-10's memory will result in illegal user address interrupts.
Only the procedures of one procedure tree may have the PDP-10 open at a time,
possibly on more than one channel at a time in different modes.

Attempts to set or read variables for the PDP-10 {}``inferior'' are ignored
except that 40000 will be read as its memory bound. A .RESET executed on a channel
on which the PDP-10 is open will clear its memory.


\subsection{The CLA, CLI, CLO and CLU Devices}

These symbolic devices enable arbitrary pairs of procedures to talk to each other
as buffered input-output devices. Each file on any of these {}``core link''
devices represents a 200 word area, most of which is buffer, which may be simultaneously
open for reading, writing, both or neither. The files are identified by two regular
file names and a system name {[}Sec 2.2, 2.2.3{]}. Only one procedure at a time
may have a core link open to write or read on one channel. All standard modes
are available.

The CLO (Core Link Open) device may be used to open any core link file and (whether
reading or writing) will create one if none exists with the name used. The CLU
(Core Link Use) device is identical except that an .OPEN on it will fail if the
referenced file does not already exist.

Core link {}``files'' have some peculiar properties. When writing a core link,
a procedure will hang if the buffer is full and will write an end-of-file mark
outside of the data stream when it closes the channel it has the file open on.
However, opening and writing again the same file name essentially pushes a new
block of data into the pipeline to be removed by a reading procedure. A procedure
reading a core link can not read past an end-of-file and must close and reopen
the file if it suspects that there is more to follow. If a reading procedure
closes a core link before encountering an end-of-file, remaining information
until the end-of-file is ignored. Core link {}``files'' cease to exist only
if empty and open for neither reading nor writing or not empty and not open for
from two to four minutes. In the later case they are expunged by the system job
{[}Sec 6.5{]} to unclutter the system.

The CLI (Core Link Interrupt) device may only be opened to write. The two file
names specified should be the UNAME and JNAME {[}Sec 5.1{]} of a procedure in
the system with the CLI interrupt {[}Sec 4.2{]} enabled. If ther is no existing
core link with the file names and system name used, the .OPEN will succeed in
creating a link and interrupting the specified procedure. In addition ITS inserts
in the created link two words of information as the start of the first file.
These are the UNAME and JNAME of the .OPEN'ing procedure.

The CLA (Core Link Answer) device is to be used in response to a CLI interrupt.
It may only be opened for reading and scans through all existing links for one
with file names the same as the UNAME and JNAME {[}Sec 5.1{]} of the procedure
doing the CLA open. If one is found not already open for reading, the .OPEN succeeds.


\subsection{The ERR Device}

This device, by a mechanism similar to that used for the {}``directory device''
{[}Sec 2.2.1{]}, allows the user to input a character string explaining whatever
error indication there may be in a .STATUS word {[}Sec 2.5{]}.

The first file name specified on an .OPEN on device ERR must numerically be either
1, 2 or 3. If it is 1, the status of the last input-output channel on which there
was an error will be analyzed. If it is a 2, the bottom four bits of the second
file name specify which input-output channel to examine. If a 3, the second file
name is treated as the .STATUS word to analyze.


\subsection{The TPL Device}

This device allows a user to output a file to be line printed {[}Sec 3.2.2{]}
at some later time when the line printer is free and such print out has not been
inhibited {[}Sec 6.5.1{]}. In a manner similar to the COM and SYS {[}Sec 3.1.3{]},
this device refers to files on the disk with system name {}``.LPTR.''. However,
renames are ignored on the TPL device and, while reads work normally, on writes
the supplied file names are ignored. Instead, the UNAME of the procedure writing
is used as the first file name and a counter of how many files have been written
on the TPL device in the current system run is used as the second file name.

Files written on the TPL device are printed out by the system job {[}Sec 6.5{]}
when the line printer is free. A significant length of time (up to two minutes)
is left between non-TPL line printer use and TPL print out and between successive
TPL output to allow local users to seize and use the line printer directly.


\subsection{The NUL Device}

This device has all standard modes and is a high speed infinite sink on output
and source of zeros on input.


\chapter{The Procedure}

See also section 0.3.3.


\section{Philosophy and Organization}

The use of ITS is entirely procedure oriented. Almost all system actions are
caused by trapping instructions {[}Sec 1.2; App A, B{]} executed by user programs
that are hierarchially organized {[}Sec 5.1{]}. A large number of variables {[}App
D; Sec 4.5{]} is associated with each procedure by the ITS system. These variables
are stored in the system and do not impinge on the user's core image.

These procedures are run for short fixed lengths of time or until they become
unrunnable (whichever comes sooner) in an order determined by the scheduler {[}Sec
4.4{]}. The scheduler also handles software interrupts to the user {[}Sec 4.2{]}.
When in execution, user programs run with the PDP-6 in user mode {[}Sec 1.2.2{]}
which enabled protection and relocation hardware that ITS sets in accordance
with the length {[}Sec 4.3{]} and location in absolute memory of the particular
procedure's core image.

The following are among the advantages of this storage of user variables:

\begin{enumerate}
\item No effort by a user's procedure to randomize its core image can effect system
variables related to the procedure and thus erase evidence of system malfunction
or lack of malfunction.
\item A procedure's core image may be easily swapped out without significant reduction
in information concerning it of interest to the system or the necessity to retain
some portion of it.
\end{enumerate}

\section{User Interrupts}

ITS provides software implemented interrupts to the user program similar to the
hardware interrupts it receives. Only one level of interrupt is simulated but
this makes little difference due to the ease with which the user can inhibit
or enable various types of interrupt {[}Sec 4.2.1{]} and may also re-enable interrupts
without immediately or ever returning to the location his program was interrupted
from.

Each procedure has in system memory two interrupt enable mask words, two interrupt
request words, and a flag indicating interrupt level status {[}App D{]}. Various
conditions that can cause interrupts are assigned bits in these interrupt request
words. These conditions are divided into three classes according to severity
as follows:

\begin{enumerate}
\item Class one conditions, the most severe, can not be enabled. They always cause
the {}``interrupted'' program to be stopped and its superior procedure to receive
an interrupt.
\item Class two conditions are of moderate severity. They may be enabled to interrupt
the user but if they occur while not enabled or while the user's interrupt level
flag indicates he is currently processing an interrupt, he will be stopped and
his superior procedure interrupted.
\item Class three conditions are the least severe and may also be enabled to interrupt
the user. While not enabled they have no effect. If enabled and they occur while
the user's interrupt level flag indicates he is free to receive interrupts he
will not be interrupted but if the user's flag indicates he is not free they
will be stored in the interrupt request words to be presented to the user as
soon as he allows unless reset with an .SUSET {[}Sec~4.5{]}.
\end{enumerate}
In cases mentioned above (for class one and two) when a procedure's superior
is interrupted, the particular bit used to interrupt the immediately superior
procedure is in its second interrupt request word. A bit is assigned by ITS to
that inferior at the time it was created {[}Sec 5.1.3{]} and can be read with
a .USET {[}Sec 5.2.3{]}.

When conditions that would cause a procedure's superior to be interrupted occur
in a top level procedure one of two things may happen. If the procedure tops
a console controlled tree, a new HACTRN will be loaded (as in section 1.1) and
all inferior procedures will be lost. If the procedure tops a disowned tree {[}Sec
5.2.2{]} it will be immediately stopped and when next attached {[}Sec 5.1.2{]}
by a job tree the attaching procedure will be appropriately interrupted.

ITS determines that it should actually interrupt a procedure when it schedules
{[}Sec 4.4{]}, or the procedure executes a .DISMISS {[}Sec 4.2.2{]}, or .SUSET
{[}Sec 4.5{]} of the PICLR variable if there are corresponding bits on in one
or both of the procedure's interrupt request and mask words and its interrupt
level flag (PICLR) indicates interrupts are enabled. ITS examines the contents
of the procedure's location 42 to see if its direct address (indexing and indirect
addressing ignored) is between location 20 and the location 6 less than the top
of the user's core image, inclusive. If not, the user receives a class one interrupt
for a bad location 42. If so, the user's appropriate interrupt word (first word
has higher priority than the second), containing bits on for interrupts the user
is being presented with, is placed in the word directly addressed by the user's
location 42 and bit 4.9 of that location is turned on if second word requests
are stored. The interrupt request word stored is then cleared to receive further
interrupts. The user's interrupt level flag is also set to inhibit further interrupts.
Finally a JSR {[}Ref 1{]} is simulated to a location one greater than that in
which the interrupts were just stored. The normal manner to return from an interrupt
is with a .DISMISS {[}Sec 4.2.2{]}.

The following is a list of word one interrupt bits:

\medskip{}
\textsf{}\begin{longtable}{lll}
\textsf{Bit(s)}&
\textsf{Class}&
\textsf{Condition}\tabularnewline
\endhead
\textsf{1.1}&
\textsf{3}&
\textsf{Character typed at console {[}Sec 3.2.1{]}.}\tabularnewline
\textsf{1.2}&
\textsf{1}&
\textsf{\textasciicircum{}Z typed {[}Sec 1.1.2{]}.}\tabularnewline
\textsf{1.3}&
\textsf{1}&
\textsf{Bad location 42.}\tabularnewline
\textsf{1.4}&
\textsf{3}&
\textsf{AR overflow {[}Ref 1{]}.}\tabularnewline
\textsf{1.5}&
\textsf{2}&
\textsf{Display list memory protection violation {[}Sec 3.4.1{]}.}\tabularnewline
\textsf{1.6}&
\textsf{2}&
\textsf{Illegal instruction.}\tabularnewline
\textsf{1.7}&
\textsf{3}&
\textsf{System going down in 5 minutes {[}Sec 6.5.2{]}.}\tabularnewline
\textsf{1.8}&
\textsf{1}&
\textsf{.VALUE executed {[}Sec 5.3.1{]}.}\tabularnewline
\textsf{1.9}&
\textsf{2}&
\textsf{Input-output channel error. This interrupt always occurs}\tabularnewline
&
&
\textsf{at an .IOT {[}Sec 2.3{]} or .OPER {[}Sec 1.2.1{]} that refers, with}\tabularnewline
&
&
\textsf{its ac field, to the channel on which the error occured. For}\tabularnewline
&
&
\textsf{more exact cause of interrupt use a .STATUS {[}Sec 2.6{]} or}\tabularnewline
&
&
\textsf{the ERR device {[}Sec 3.4.4{]}.}\tabularnewline
\textsf{2.1}&
\textsf{2}&
\textsf{Memory protection violation on reference to inferior procedure {[}Sec
3.4.2{]}.}\tabularnewline
\textsf{2.2}&
\textsf{1}&
\textsf{.BREAK executed {[}Sec 5.3.2{]}.}\tabularnewline
\textsf{2.3}&
\textsf{1}&
\textsf{Return from single instruction proceed {[}Sec 6.7{]}.}\tabularnewline
\textsf{2.4}&
\textsf{3}&
\textsf{Slow clock (every half second).}\tabularnewline
\textsf{2.5}&
\textsf{2}&
\textsf{Memory protection violation {[}Ref 1{]}.}\tabularnewline
\textsf{2.6}&
\textsf{2}&
\textsf{MAR interrupt {[}Sec 6.4{]}.}\tabularnewline
\textsf{2.7}&
\textsf{3}&
\textsf{Light pen {[}Sec 3.4.1.2{]}.}\tabularnewline
\textsf{2.8}&
\textsf{3}&
\textsf{PDL overflow {[}Ref 1{]}.}\tabularnewline
\textsf{2.9}&
\textsf{3}&
\textsf{Not used.}\tabularnewline
\textsf{3.1--4.8}&
\textsf{---}&
\textsf{Not used}\tabularnewline
\textsf{4.9}&
\textsf{---}&
\textsf{Indicates rest of bits to be interpreted as below.}\tabularnewline
\end{longtable}
\medskip{}

In the second word of interrupt requests, bits 3.1-3.8 represent inferior procedures
{[}Sec 5.1.3{]} and bits 1.1--2.7 represents input-output channels {[}Sec 2.1{]}
with 1.1 for channel zero. Interrupts occur from inferior procedures as described
above for class one or two interrupts to the inferiors while an input-output
channel will try to interrupt if there is buffered teletype {[}Sec 3.2.1{]} input
on the channel. These buffered characters may be examined at the interrupt level
with .ITYIC {[}Sec 2.7.3{]}.


\subsection{The .SETM2 UUO}

A procedure can examine and modify all of the five variable words associated
with interrupts to it by means of the .SUSET UUO {[}Sec 4.5{]}. When a procedure
is first created {[}Sec 5.1.1{]} or has a .RESET executed on it {[}Sec 3.4.2{]}
all of these five variables are zero except PICLR which is set to minus one.
For the mask (MSKST and MSKST2) and request (PIRQC and IFPIR) words a one bit
represents an enabled interrupt of pending request and a zero represents an inhibited
interrupt or lack of request. ITS will ignore attempts by the user to enable
a class one interrupt (first word mask bits 1.2, 1.3, 2.2, and 2.3). To avoid
certain timing errors, special .SUSET means (APIRQ and IPIRQ) are provided to
turn on or off bits in the first request word without affecting other bits in
that word.

The procedure's interrupt level flag (PICLR) can also be read or set. Its zero
state indicated that interrupts are inhibited and class two interrupts become
fatal. If nonzero, interrupts are enabled. ITS sets this variable to minus one
when it executes a .DISMISS from a user, but when a user attempts to set it the
word he stores there with .SUSET will be shifted right thirty five places. Thus
the user can set his PICLR to either zero or one depending on the sign bit of
the word he stores. As a result he can enable interrupts (even in the middle
of his {}``interrupt routine'' in a manner distinguishable from the automatic
enablement performed by ITS or inhibit interrupts.

The above discussion also applies to examining and modifying these variables
in inferiors with .USET {[}Sec 5.2.3{]}.

To avoid certain timing problems there is a special UUO by which a procedure
may set both its mask words at once as follows:

\medskip{}
\textsf{}\begin{tabular}{lll}
&
\textsf{MOVE AC,{[}MASKW1{]}}&
\textsf{;set up first word of mask bits}\tabularnewline
&
\textsf{MOVE AC+1,{[}MASKW2{]}}&
\textsf{;set up second word of mask bits}\tabularnewline
\textsf{CALL:}&
\textsf{.SETM2 AC,}&
\textsf{;set both mask vars from AC \& AC+1}\tabularnewline
&
\textsf{;return}&
\tabularnewline
&
&
\tabularnewline
\end{tabular}


\subsection{The .DISMISS UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{LOC 42}&
\tabularnewline
&
\textsf{JSR TSINT}&
\tabularnewline
&
&
\tabularnewline
\textsf{TSINT:}&
\textsf{0}&
\textsf{;interrupt bits stored here}\tabularnewline
&
\textsf{0}&
\textsf{;loc interrupted from stored here}\tabularnewline
&
\textsf{\ldots{}}&
\textsf{;interrupt routine}\tabularnewline
&
\textsf{\ldots{}}&
\tabularnewline
&
\textsf{\ldots{}}&
\tabularnewline
\textsf{CALL:}&
\textsf{.DISMISS TSINT+1}&
\textsf{;returns to where interrupted from}\tabularnewline
&
&
\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call provides the normal means to return to an interrupted
routine. It simultaneously re-enables interrupts and transfers to the location
addressed by the right half of the contents of its effective address, restoring
flags from the left half. This is normally, but not necessarily, the pseudo-JSR
word stored by ITS as it simulates an interrupt. If there are pending conditions
in the user's interrupt request words he will be immediately re-interrupted.


\section{The Core Allocator}

The core allocator consists of a single special procedure, called the core job,
that does most of the work and various routines that signal to it their interest
in acquiring or releasing core.

An internal map of the status of every 2000 word block of memory exists in the
system and is maintained by the core allocator. The majority of the complexity
of the core allocator is not due to maintaining this table but to the actions
it must sometimes take to relocate input-output buffers and other occupants of
core when a procedure wishes to expand. The lack of paging on the PDP-6 makes
it sometimes neccessary to {}``shuff'le'' core to make a sufficient contiguous
block.

Each 2000 word block must, except for two transient states, be devoted to one
of the following uses:

\begin{enumerate}
\item Part of a procedure's core image (ITS code and variables appear as core allocated
for the system job {[}Sec 6.5{]}).
\item A disk buffer or directory {[}Sec 3.1.1{]}.
\item A display buffer.
\item Unused.
\item Further divided into 200 word blocks. These 200 word blocks are used for core
link device buffers {[}Sec 3.4.3{]} or for DEC tape buffers or directories {[}Sec
3.1.2{]}.
\end{enumerate}
A procedure may request more or less core by means of a .CORE {[}Sec 4.3.1{]}
and determine its memory bound without making protection violations with a .SUSET
{[}Sec 4.5{]}. Other than the .CORE UUO a procedure's memory bound may be affected
only by its destruction, when all blocks in its core image are marked free, or
a .USET {[}Sec 5.2.3{]} or .IOT on device USR {[}Sec 3.4.2{]} executed by its
immediate superior.


\subsection{The .CORE UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.CORE NUMBLK}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call requests for the procedure executing it as many 2000
word blocks as the value of its effective address except that if this value is
zero it will be treated as if it were one. If and only if the .CORE is successful
it skips. Only a .CORE to acquire more core may fail. If it does and a more than
one block increase was being requested, some smaller number than requested may
have been obtained.


\section{The Scheduler}

The scheduler runs when a quantum time-out occurs or when the physically running
procedure encounters a blocking condition or causes an interrupt by some program
action (memory protection violation, PDL overflow, etc.). The scheduler decides
which procedure should run next by an examination of the variables {[}App D{]}
in the system for each procedure. It simultaneously performs those modifications
of these variables necessary to provide the simulated interrupt feature {[}Sec
4.2{]}.

For those procedures that have their stop word (USTP {[}App D{]}) zero, their
runnability is determined by a variable known as the flush instruction (FLSINS)
which is set when the procedure becomes blocked. If this variable is zero the
procedure is runnable. if nonzero it is executed with the procedure's EPDL2 variable
{[}App D{]} loaded into ITS symbolic accumulator T. If the instruction skips
then the procedure is runnable and has just become unblocked. If the flush instruction
does not skip the procedure is still blocked.

The next procedure to be run is picked from among the runnable procedures by
a scan which considers two {}``resource'' variables per procedure. Both of
these are quantized approximations to exponential decays toward proportions of
machine time. The JTMU variable is associated with a particular procedure while
the UTMPTR variable pointer for that procedure points to a quantity similar to
JTMU maintained for all procedures in one console controlled tree. During the
scan to select the next procedure to run, a procedure will be preferred to the
best so far if its console tree has used less time recently than that of the
best so far or its console tree has used exactly the same amount and the procedure
has used less time recently. Exceptions to this are that a procedure is always
preferred to the best so far if it has used less than one eighth as much time
recently and never preferred if it has used more than eight times as much. Also
the procedure, if any, that has seized the .MASTER {[}Sec 6.8.5{]} facility is
given double priority and disowned procedures are given one eighth priority unless
they have the line printer (device LPT) assigned to them or are running in executive
mode when scheduled.

All disowned {[}Sec 5.1{]} job's UTMPTR's point to a single word which is given
less resource than that for a normal console tree. The systems job {[}Sec 5.5{]}
and core job {[}Sec 4.3{]} have UTAPTR's to seperate words given the same priority
as a normal tree.

The general properties of this scheduling system can be described as follows:

\begin{enumerate}
\item Machine time is normally equally divided between consoles and then between all
the procedures running for each console.
\item Machine time used by a procedure is integrated with decay (time constant about
seven seconds) so

\begin{enumerate}
\item a procedure that is frequently blocked for a short period of time (compared with
a quantum, currently one fifteenth of a second) should receive equal service
with a pure compute job and
\item an interactive program called on infrequently by a user is essentially guaranteed
good service as it starts to think of a reply but can not, on average, use more
time than a pure compute job.
\end{enumerate}
\end{enumerate}

\section{The .SUSET UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.SUSET {[}DIRECTION+VARIABLE,,DATLOC{]}}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{;location read into or written from}\tabularnewline
\end{tabular}
\medskip{}

\noindent Procedures may examine and modify some of their system variables {[}App
D{]} by means of this system call. The contents of its effective address (a constant
in the illustration above) is viewed as two half words. The right half should
point at the word from which the variable is to be set or into which the variable
is to be read. The left half specifies by its top bit (4.9) whether the variable
is to be read (zero) or written (one) and by the value of its remaining bits
which system variable. The following table lists permissible values:

\textsf{}\begin{longtable}{llll}
\textsf{Name}&
\textsf{Value}&
\textsf{Type}&
\textsf{Variable}\tabularnewline
\endhead
\textsf{UPC}&
\textsf{0}&
\textsf{07}&
\textsf{Program counter word {[}Ref 1{]}.}\tabularnewline
\textsf{VALUE}&
\textsf{1}&
\textsf{17}&
\textsf{Contents of effective address of most recent .VALUE {[}Sec 5.3.1{]}.}\tabularnewline
\textsf{TTY}&
\textsf{2}&
\textsf{05}&
\textsf{Status relative to console {[}Sec 3.2.1{]}.}\tabularnewline
\textsf{FLSIMS}&
\textsf{3}&
\textsf{01}&
\textsf{Blocking condition {[}Sec 4.4{]}.}\tabularnewline
\textsf{UNAME}&
\textsf{4}&
\textsf{05}&
\textsf{UNAME {[}Sec 3.4.2{]}.}\tabularnewline
\textsf{JNAME}&
\textsf{5}&
\textsf{07}&
\textsf{JNAME {[}Sec 3.4.2{]}.}\tabularnewline
\textsf{MASK}&
\textsf{6}&
\textsf{17}&
\textsf{Interrupt mask word {[}Sec 4.2{]}.}\tabularnewline
\textsf{USTP}&
\textsf{7}&
\textsf{03}&
\textsf{Stop word (usually only bit 4.7 can be written) {[}Sec 4.4{]}.}\tabularnewline
\textsf{PIRQC}&
\textsf{10}&
\textsf{17}&
\textsf{First interrupt request word {[}Sec 4.2{]}.}\tabularnewline
\textsf{IMTS}&
\textsf{11}&
\textsf{01}&
\textsf{Bit used to interrupt superior {[}Sec 5.1.3{]}{]}.}\tabularnewline
\textsf{MEMT}&
\textsf{12}&
\textsf{07}&
\textsf{Memory bound {[}Sec 4.3{]}, first location it would be}\tabularnewline
&
&
&
\textsf{illegal to reference.}\tabularnewline
\textsf{SV40}&
\textsf{13}&
\textsf{05}&
\textsf{Last executed UUO trapping to system {[}Sec 1.2.1{]}.}\tabularnewline
\textsf{IPIRQ}&
\textsf{14}&
\textsf{17}&
\textsf{Interrupt request word (written by an IORM).}\tabularnewline
\textsf{APIRQ}&
\textsf{15}&
\textsf{17}&
\textsf{Interrupt request word (written by an ARDCAM).}\tabularnewline
\textsf{SNAME}&
\textsf{16}&
\textsf{17}&
\textsf{System name {[}Sec 2.2.3{]}.}\tabularnewline
\textsf{PICLR}&
\textsf{17}&
\textsf{17}&
\textsf{Interrupt level status word {[}Sec 4.2{]}.}\tabularnewline
\textsf{MARA}&
\textsf{20}&
\textsf{17}&
\textsf{MAR register and control bits {[}Sec 6.4{]}.}\tabularnewline
\textsf{MARPC}&
\textsf{21}&
\textsf{17}&
\textsf{Program counter at last MAR interrupt {[}Sec 6.4{]}.}\tabularnewline
\textsf{UUOH}&
\textsf{22}&
\textsf{05}&
\textsf{Program counter word at last system UUO.}\tabularnewline
\textsf{UIND}&
\textsf{23}&
\textsf{05}&
\textsf{User index.}\tabularnewline
\textsf{RUNT}&
\textsf{24}&
\textsf{05}&
\textsf{Total run time in 4.069 microsecond units.}\tabularnewline
\textsf{MSK2}&
\textsf{25}&
\textsf{17}&
\textsf{Interrupt mask word two {[}Sec 4.2{]}.}\tabularnewline
\textsf{IFPIR}&
\textsf{26}&
\textsf{17}&
\textsf{Interrupt request word two {[}Sec 4.2{]}.}\tabularnewline
\textsf{APRC}&
\textsf{27}&
\textsf{05}&
\textsf{Disowned and processor cono status.}\tabularnewline
\textsf{SV60}&
\textsf{30}&
\textsf{05}&
\textsf{Saved absolute location 60.}\tabularnewline
&
\textsf{31--77}&
\textsf{00}&
\textsf{Unused.}\tabularnewline
\textsf{IOC}&
\textsf{100+N}&
\textsf{01}&
\textsf{Input-output channel word for channel N.}\tabularnewline
\textsf{IOS}&
\textsf{120+N}&
\textsf{01}&
\textsf{Status word for input-output channel N.}\tabularnewline
\textsf{IOP}&
\textsf{140+N}&
\textsf{01}&
\textsf{Nth word of input-output channel push down list}\tabularnewline
&
&
&
\textsf{{[}Sec 2.6{]}, two words per entry.}\tabularnewline
\end{longtable}

In the above table the 1.3 bit on in the type column implies that the variable
can be read with .SUSET and the 1.4 bit implies it can be written with .SUSET.
The other type bits relate to the .USET UUO {[}Sec 5.2.3{]}.

Pre-defined symbols are available in the MIDAS assembler consisting of a {}``.''
followed by an {}``R'' for read or a {}``S'' for set followed by the string
in the name column of the above table for all its entries.


\chapter{Procedure Interaction}

See also section 0.3.4 and 3.4.2.


\section{The Hierarchical Organization of Procedures}

All procedures operating under ITS are members of a tree structure recorded in
the system by associating with each a pointer to its immediate superior. If this
pointer is minus one it indicates that the procedure tops a tree. These trees
may be of two types, those under the control of a console and those that are
disowned {[}Sec 5.2.2{]}.

Console {}``controlled'' trees have had their top level procedure automatically
loaded by ITS {[}Sec 1.1{]}. Since procedures may control their inferiors and
the most that the user can do in appealing for aid when confronted with recalcitrant
programs is to cause his console to converse with higher level procedures {[}Sec
1.1.2{]}, he is actually at the mercy of this top level program. It is currently
a DDT expanded by the addition of new commands related to time sharing {[}Sec
7{]}. About the only restrictions deliberately inserted in it relate to logging
in {[}Sec 6.1{]}.

Disowned procedure trees differ from console controlled trees only in the following
ways:

\begin{enumerate}
\item The have no console associated with them.
\item Class one interrupts in a top level procedure are handled differently {[}Sec
4.2{]}.
\item They are scheduled with lower priority {[}Sec 4.4{]}.
\item Certain system calls, when executed in them, are treated as illegal instructions.
\item Certain input-output devices are not accessible by them.
\end{enumerate}
There exist a variety of means for procedures immediately above and below each
other to interact {[}Sec 5.2, 5.3{]}. Procedures may also affect any procedure
beneath them in the procedure tree by means of input-output translation table
entries {[}Sec 2.2.2{]} and an arbitrary pair of procedures may converse treating
each other as input-output devices {[}Sec 3.4.3{]}.

Among the advantages of the above system of procedure organization are the following:

\begin{enumerate}
\item The highest level command processor (the top level procedure of a console controlled
tree) may vary arbitrarily from user to user. In actual operation it is normal
to see a HACTRN's whose inferior procedure variables and symbol tables much exceed
their code.
\item New versions of the highest level command processor may be introduced simply
by writing a file on the dik with no interruption to system continuity.
\item New versions of the highest level command processor may be easily and safely
debugged by loading them as inferior procedures. In this position they can exercise
all their normal functions except logging in and out.
\item It is not necessary to make every effort to remove all bugs from the highest
level command processor for fear that the system may be destroyed by them, a
consideration often inhibiting more complex and powerful command languages. A
fatal error simply results in the program being reloaded.
\item Users have great generality in creating command levels of their own.
\item Multi-task programs may be organized in a consistent manner.
\end{enumerate}
Items 1, 2 and 4 above argue to various extents against pure procedures as does
their inherent speed inefficiency. Having to maintain seperate copies of the
highest level command processor for each user is not that significant a disadvantage
if one considers the amount of each copy's core image unique to each user and
that while not in actual use they could be swapped out of the system.


\subsection{Procedure Creation}

Procedures may be created only by typing \textasciicircum{}Z on an idle teletype
{[}Sec 1.1.1{]} or by executing a .OPEN {[}Sec 2.2{]} on device USR {[}Sec 3.4.2{]}.
In the second case, which is discussed here, there are strict requirements on
the {}``file name'' used in the .OPEN. The first file name, which will be the
UNAME of the created procedure, must be the same as the UNAME of the procedure
executing the .OPEN. The second file name, which will be the JNAME of the created
procedure, must be different from the JNAME of all jobs then in existence that
have the UNAME being used. A procedure may have a maximum of eight directly inferior
procedures. A newly created procedure will have one 2000 word block of cleared
memory and all of its system variables initialized.


\subsection{Attaching Disowned Procedure Trees}

The only case in which a successful .OPEN {[}Sec 2.2{]} on device USR {[}Sec
3.4.2{]} may be executed to provide an inferior procedure (as opposed to opening
a procedure for examination only) with a first file name different from the UNAME
of the procedure executing the .OPEN is that in which the top procedure of a
disowned tree is being opened. This type of .OPEN will be treated as an illegal
instruction if executed by a procedure in a disowned tree. If not and the opening
procedure has less than eight inferiors the open will succeed and ITS will modify
the UNAME of the opened procedure and its inferior tree to agree with the opening
procedure. It will then take each UNAME JNAME pair in the attached tree and make
it unique by incrementing the JNAME part if necessary.


\subsection{The .UTRAN UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.UTRAN FBLOCK}&
\tabularnewline
&
\textsf{;error return}&
\textsf{;no inferior found for int bit}\tabularnewline
&
\textsf{;normal return}&
\textsf{;inferior found}\tabularnewline
&
&
\tabularnewline
\textsf{FBLOCK:}&
\textsf{INTBIT,,}&
\textsf{;UNAME stored here by call}\tabularnewline
&
\textsf{0}&
\textsf{;JNAME stored here by call}\tabularnewline
\end{tabular}
\medskip{}

\noindent When a procedure is first created by a .OPEN, ITS assigns to it a bit
for use in interrupts {[}Sec 4.2{]} to its superior procedure different from
that for any other inferior procedure its superior may have. Since inferior procedures
can only be directly controlled when open on input-output channels, the loss
of the name of an inferior by its superior while it was not open would result
in complete loss of communication. Although procedures that have inferiors normally
keep close track of their names and interrupt bits as read by .USET's {[}Sec
5.2.3{]}, this system call has been provided to translate from particular interrupt
bit to name of inferior. The left half of the contents of the effective address
must have only the appropriate interrupt bit on. If a corresponding inferior
procedure is found, the .UTRAN skips and the UNAME and JNAME of the inferior
are stored in the two words after the word containing the interrupt bit. If not
corresponding inferior is found the .UTRAN will fail to skip and the two locations
after the location it effectively addresses will be unmodified.


\section{Controls over an Immediately Inferior Procedure}

See also section 3.2.1.1.


\subsection{The .UCLOSE UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.UCLOSE CHNUM,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent Procedures may be destroyed only by the execution of a .LOGOUT {[}Sec
6.1{]} or a .UCLOSE. The second of these two system calls, which is discussed
here, destroys the inferior procedure open on the channel specified by its accumulator
field (CHNUM in the above illustration) and the entire procedure subtree of which
this inferior is the top procedure. If an inferior is not open on the channel,
the .UCLOSE'ing procedure will receive an input-output channel error interrupt.
.CLOSE's {[}Sec 2.7.1{]} are automatically effected on all channels of all destroyed
procedures and any system resources they claim are surrendered (by possibly simulating
a .DCLOSE, .HANGUP, and/or .MASTER). In order to kill certain cancerous types
of procedure subtrees it has been found necessary to implement this system call
such that it first stops all procedures in the subtree and then destroys them.


\subsection{The .DISOWN UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DISOWN CHNUM,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call requires that an inferior procedure be open on the
channel specified by its accumulator field (CHNUM in the above illustration)
or the .DISOWN'ing procedure will receive an input-output channel error interrupt.
It causes this open procedure to become the top procedure of a disowned tree
{[}Sec 5.1{]} and in the process closes all channels on which the disowning procedure
has it open. A procedure in a disowned tree that tries to execute this system
call will be unsuccessful and receive an illegal instruction interrupt {[}Sec
4.2{]} as will a procedure trying to disown a subtree that controls the tree's
console {[}Sec 3.2.1.1{]}.


\subsection{The .USET UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.USET,{[}DIRECTION+VARIABLE,,DATLOC{]}}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{;location read into or set from}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call was created to allow a procedure to set and read many
of the system variables {[}App D{]} associated with its inferiors and to read
variables associated with other procedures. When executed its accumulator field
must contain the number of a channel (CHNUM in the above illustration) on which
a procedure open or the .USET'ing procedure will receive an input-output channel
error interrupt. Otherwise it is very similar to .SUSET {[}Sec 4.5{]}. Reading
is allowed if the 1.1 bit is on in the type column of the table in section 4.5.
Setting is allowed for immediate inferiors if the 1.2 bit is on in that table.


\section{Communication to an Immediately Superior Procedure}


\subsection{The .VALUE UUO}

\textsf{}\begin{tabular}{lll}
\textsf{CALL:}&
\textsf{.VALUE ARGLOC}&
\tabularnewline
&
\textsf{;return if restarted}&
\tabularnewline
&
&
\tabularnewline
\textsf{ARGLOC:}&
\textsf{ARG}&
\textsf{;transmitted to superior procedure}\tabularnewline
\end{tabular}
\medskip{}

\noindent A procedure executing this system call receives a class one interrupt
{[}Sec 4.2{]} stopping it and interrupting its superior procedure. The contents
of the effective address is saved in a system variable associated with the procedure
{[}App D{]} so its superior can easily retreive it with a .USET {[}Sec 5.2.3{]}.


\subsection{The .BREAK UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.BREAK ARG1,ARG2}\tabularnewline
&
\textsf{;return if restarted}\tabularnewline
\end{tabular}
\medskip{}

\noindent The accumulator field and effective address of this UUO are ignored
by ITS. A procedure executing it receives a class one interrupt {[}Sec 4.2{]}
stopping it and interrupting its superior procedure.


\section{The .GUN UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,USRINDEX}\tabularnewline
\textsf{CALL:}&
\textsf{.GUN AC,}\tabularnewline
&
\textsf{;failure return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call, intended for use as a last resort, allows any procedure
in a console controlled tree to expunge another tree from the system. The procedure
specifies the tree to by .GUN'ed down by the user index (see section 8.2, mode
N) of its top procedure. This is used instead of the normally unique UNAME JNAME
pair so that easy reference may be had to procedures not logged in {[}Sec 6.1{]}.
The contents of the accumulator specified by a .GUN must be the user index (can
be read with .USET) of a top level {[}Sec 5.1{]} procedure other than the system
job {[}Sec 6.5{]} or core job {[}Sec 4.3{]}. If the procedure executing the .GUN
is in a disowned tree it will receive an illegal instruction interrupt.

The .GUN skips if successful at which point the system job will have been informed
of the tree it is desired to expunge, which action the system job will, in due
course, perform, also typing out an appropriate message. If the above restrictions
on the specified user index are not met the .GUN will return without skipping.


\chapter{Miscellaneous System Calls and Features}

See also section 0.3.5.


\section{The .LOGIN and .LOGOUT UUO's}

These two system calls are the only ones that are effective only at the top level.

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.LOGOUT}\tabularnewline
&
\textsf{;return if not top level}\tabularnewline
\end{tabular}
\medskip{}

\noindent .LOGOUT has no effect and simply returns from the system to the instruction
following if not executed in a top level procedure. It causes the procedure tree
in whose top procedure it is executed in to be expunged from the system. It works
for both console controlled trees and disowned trees. Since the normal means
to create {[}Sec 5.1.1{]} and destroy {[}Sec 5.2.1{]} a procedure under ITS are
calls in a superior procedure, the special case of the top level procedure must
be handled differently as it is by \textasciicircum{}Z {[}Sec 1.1.1{]} and .LOGOUT.

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}SIXBIT /NAME/{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.LOGIN AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

.LOGIN is not restricted to top level procedures by ITS but rather by HACTRN,
the top level procedure ITS automatically loads {[}Sec 7{]}. A .LOGIN represents
an attempt by a procedure to set its UNAME to the contents of the accumulator
specified. This is allowed by ITS only if the procedures's current UNAME is minus
one (as the UNAME of initial HACTRN's is set) and the desired UNAME is neither
zero, minus one, nor the UNAME of an extant console controlled tree. The success
of a .LOGIN is signalled by its skipping. HACTRN will not open inferior procedures
for a user until he has successfully logged in at which point his inferior procedures
will have UNAME's dooming future .LOGIN's in that tree to failure.


\section{Nonstandard Devices}


\subsection{The .RDSW UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RDSW AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call reads (DATAI's {[}Ref 1{]}) the contents of the data
switches on the PDP-6's console into the specified accumulator. 


\subsection{The .RD760 and .WR760 UUO's}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RD760 AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
&
\tabularnewline
\textsf{CALL:}&
\textsf{MOVE AC,{[}BITS{]}}\tabularnewline
&
\textsf{.WR760 AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent These system calls respectively read the data register (DATAI) of the
device whose PDP-6 device number is 760 into the specified accumulator and output
(DATAC) from the specified accumulator to the data register of the device {[}Ref
1{]}. The bits in the data register of this device are usually used for temporary
direct control or sense hookups. Currently the bottom six bits control lights
on the hand of the AMF arm {[}Sec 3.3.2{]}.


\subsection{The .RD710 UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RD710 AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent The real time clock, which ITS currently uses to time user quanta,
has, as well as an interval timing counter, a clock counter which is neither
set or stopped by ITS. This system call reads into the specified accumulator
a word whose bottom twenty four bits are this clock counter. It is incremented
once every 4.069 microseconds.


\subsection{The .RD500 UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RD500 AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This call reads (DATAI's) into the specified accumulator from device
500. This device is purported to be or become yet another kind of clock. See
Paul DeCoriolis for more information.


\section{Various Times and the Date}


\subsection{The .RDTIME UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RDTIME AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call reads into the specified accumulator the internal
system time which is a word set to zero when a system is first loaded and is
incremented every thirtieth of a second thereafter. This quantity is useful in
conjunction with .SLEEP {[}Sec 6.8.1{]}.


\subsection{The .RTIME UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RTIME AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent After the system has determined real (24 hour system) time, it maintains
this internally as a number in units of one half second since the last midnight.
This system call reads into the specified accumulator in sixbit characters this
time in pairs of digits, reading from the left, hours, minutes, and seconds.
If the time has not yet been determined, minus one will be read.


\subsection{The .RDATE UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RDATE AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

After the system has determined the calendar date, it maintains it internally
as a word with sixbit characters in it. These characters are all numeric. The
first two are the last two digits of the year, the next two are the month number,
and the last two digits are the day of the month. This system call reads this
word into the specified accumulator. If the date has not yet been determined,
minus one will be read. In the current implementation, the date being determined
implies that the time {[}Sec 6.3.2{]} has been determined. The date is correctly
incremented every midnight.


\section{The MAR Feature}

In order to simulate the address stop facility of the PDP-6 in a time shared
mode, it was decided to introduce a new hardware register, the MAR register,
to cause interrupts when a particular location was addressed by the computer.
To increase the flexibility of this feature, three control bits were added which
further define the interrupt condition given that a memory address match has
occurred.

Among the system variables {[}App D{]} kept by ITS for each procedure are its
MAR register contents and control bits. These are loaded into the hardware as
the user is started. Since the MAR feature is intended primarily as a debugging
aid, it causes a class two interrupt {[}Sec 4.2{]} and a .USET {[}Sec 5.2.3{]}
is used to set it from DDT {[}Sec 7{]} more frequently than a procedure sets
its own with an .SUSET {[}Sec 4.5{]}.

.USET and .SUSET take the right half of the word set from as the new address
to be put in the MAR register and the low three bits of the left half as control
bits as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit}&
\textsf{Meaning (one state)}\tabularnewline
\textsf{3.3}&
\textsf{Interrupt if data read or written is negative}\tabularnewline
\textsf{3.2}&
\textsf{Interrupt if data read or written is positive}\tabularnewline
\textsf{3.1}&
\textsf{Interrupt only on a write}\tabularnewline
\end{tabular}
\medskip{}

At this time, attempts to differentiate read cycles on the basis of sign will
fail as, due to a timing error, the data always appears positive. If a write
cycle is interrupted on, the protected location will have been modified when
the interrupt is processed.

When an MAR interrupt occurs, further MAR interrupts are disabled until the MAR
is again set. A .SUSET or .USET may be used to read the word stored by the JSR
at the system's processor interrupt channel location when the last MAR interrupt
occurred.

Although, for their own safety, some parts of executive code inhibit MAR interrupts,
it is quite possible for the user to cause some system calls to interrupt to
the user, on reference to his core image where his MAR is pointing. The program
counter word stored by the JSR at the user's location 42 {[}Sec 4.2{]} will be
the location in his core image of the offending system call. The word read by
a .SUSET or .USET will be an executive program counter word showing the absolute
location at which the system call first attempted to reference the user's protected
location.


\section{The System Job}

There are various tasks ITS would like to perform, most of which include input-output
or waiting indefinite periods of time, which would be inconvenient to implement
directly due to the procedure originated orientation of almost all system routines.
Because of this a procedure was synthesized, known as the system job, that is
actually a part of the monitor and always runs in executive mode. To aid in debugging
ITS a feature was added to the system job so that when it had no other tasks
to perform it would compare constant parts of ITS against a copy it makes initially
{[}Sec 6.5.1{]}. The following are some of the other tasks the system job performs:

\begin{enumerate}
\item Does .CORE's {[}Sec 4.3.1{]} for ITS to make room for more blocks of user variables
or for the system job's copy of constant parts of ITS.
\item Prints messages on the system console whenever an effective .SETLOC, .GUN, .IOTLSR,
.LOGIN, .LOGOUT, or .OPEN for output or .FDELE on device SYS is executed.
\item Prints messages on the system console when a parity error, unrequested change
in teletype priority interrupt channel allocation, memory excessively full condition,
or garbage collection of DSK user directory is detected.
\item Initially determines the 24 hour time and calendar date {[}Sec 6.3.2, 6.3.3{]}.
\item Prints a message on all teletypes when the system is first loaded.
\item Outputs a {}``CONSOLE FREE'' message on any teletype when it is no longer open
by any procedure.
\item Various tasks related to the system going down feature {[}Sec 6.5.2{]} and TPL
device {[}Sec 3.4.5{]}.
\end{enumerate}

\subsection{The .SUPSET UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,2}\tabularnewline
\textsf{CALL:}&
\textsf{.SUPSET AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent The system job is partially controlled by ITS through a word in system
memory. Bits to the left of 2.8 in this system word represent requests for some
transient action. In the right half the bottom two bits (1.1--1.2) are currently
used. Bit 1.1 controls the system checking feature. If this bit is on, the system
job makes a copy of the constant parts of ITS and procedes to spend its spare
time checking the areas it copied against the copy. If a discrepency occurs,
a message is printed and the copy corrected. If this bit is off, the system job
will destroy any copy it may have, freeing that memory and most of the fraction
of the machine time the system job uses when in checking mode.

Bit 1.2 affects the TPL device {[}Sec 3.4.5{]}. If it is on, TPL use of the LPT
device is inhibited. Furthermore if a TPL file is being printed when this bit
is turned on, it will be deleted, output will be aborted, and the LPT device
freed.

The .SUPSET system call enables the user to control the system checking bit by
XOR'ing {[}Ref 1{]} bits 1.1--2.8 of the specified accumulator into the system
job control word and returning the resulting value in the specified accumulator.
It also types out a message on the system job console like the message for .SETLOC.


\subsection{The System Going Down Feature}

To provide an orderly means for the termination of the operation of ITS, a special
feature has been added. It is activated by setting absolute location 37 negative
(either with the PDP-6 console keys {[}Ref 1{]} or a .SETLOC {[}Sec 3.8.4{]})
or using .SHUTDN {[}Sec 6.5.2.1{]}. After a negative location 37 is noticed,
all procedures for which it is enabled will receive a system going down interrupt
{[}Sec 4.2{]} and all free teletypes have an appropriate message typed on them.
Then a five minute timer is started and new console trees started {[}Sec 1.1.1{]}
will be given a system going down interrupt right after they are created.

When the timer times out or when the number of console controlled trees in which
successful .LOGIN's {[}Sec 6.1{]} have been executed goes to zero, all trees
are forcably logged out and a message typed on all teletypes. All DEC tapes {[}Sec
3.1.2{]} for which the system is retaining a directory are flapped.


\subsubsection{The .SHUTDN UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC, {[}TIME{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.SHUTDN AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call, which is illegal for procedures in a disowned tree,
is a request for the system to go down {[}Sec 6.5.2{]} in as many thirtieths
of a second as the contents of the specified accumulator. If an amount less than
five minutes is specified, it will be treated as though it had been five minutes.
If the system is already going down in less time than specified, this call will
be ignored and return without skipping.

If the system is going down in a longer time than specified or not going down
at all the call will succeed and skip. It will cause a system going down interrupt
to all enabled procedures and start a timer for the specified length of time.
New console trees created thereafter {[}Sec 1.1.1{]} will also receive a system
going down interrupt when created. If the time till system death passes through
five minutes, all enabled procedures will be interrupted again.

The conditions for and actions on actual death are as in section 6.5.2.


\subsubsection{The .DIETIM UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.DIETIM AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call sets its specified accumulator to minus one if the
then running ITS is not going down {[}Sec 6.5.2{]}. If it is, the accumulator
is set to the maximum time till system death in thirtieths of a second.


\section{Examining ITS}


\subsection{The .GETSYS UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVE AC,{[}--LENGTH,,DATLOC{]}}&
\tabularnewline
&
\textsf{MOVE AC+1,{[}SIXBIT /AREA/{]}}&
\tabularnewline
\textsf{CALL:}&
\textsf{.GETSYS AC,}&
\tabularnewline
&
\textsf{;error return}&
\tabularnewline
&
\textsf{;normal return}&
\tabularnewline
&
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{BLOCK LENGTH}&
\textsf{;area read into}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call enables a procedure to receive copies of various internal
monitor areas in such a way that the data in those areas must be consistent.
The specified accumulator contains a pointer word as for a block mode .IOT {[}Sec
2.3{]}. If the left half of the accumulator is zero, the block is treated as
running to the end of the user's core image. The location following the specified
accumulator contains, in left justified sixbit, the area requested as follows:

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
\textsf{Sixbit}&
\textsf{Area}\tabularnewline
\textsf{TRANS}&
\textsf{Translation table {[}Sec 2.2.2{]}.}\tabularnewline
\textsf{GETS}&
\textsf{List of things which can be requested with .GETSYS.}\tabularnewline
\textsf{DEVS}&
\textsf{List of available symbolic input-output devices {[}App C{]}.}\tabularnewline
\textsf{MEMORY}&
\textsf{Memory allocation tables {[}Sec 4.3{]}.}\tabularnewline
\textsf{UTAPE}&
\textsf{DEC tape routine variables {[}Sec 3.1.2{]}.}\tabularnewline
\textsf{CLINK}&
\textsf{Core link variables {[}Sec 3.4.3{]}.}\tabularnewline
\textsf{CALLS}&
\textsf{List of symbols in squoze {[}Ref 3{]} for system calls {[}App A{]}}\tabularnewline
&
\textsf{and .SUSET {[}Sec 4.5{]} left halves and their values.}\tabularnewline
\textsf{DSYMS}&
\textsf{Symbol table for ITS.}\tabularnewline
\textsf{IMPX}&
\textsf{Area input multiplextor cycled into {[}Sec 3.3.3{]}.}\tabularnewline
\textsf{OMPX}&
\textsf{Area output multiplexor cycled from {[}Sec 3.3.2{]}.}\tabularnewline
\textsf{USERS}&
\textsf{User variables for all procedures {[}App D{]}.}\tabularnewline
\textsf{USER}&
\textsf{User variables for particular user specified by UNAME and}\tabularnewline
&
\textsf{JNAME in locations two and three greater than the specified}\tabularnewline
&
\textsf{accumulator {[}App D{]}. If user not found location containing}\tabularnewline
&
\textsf{UNAME will be zeroed.}\tabularnewline
\end{tabular}
\medskip{}

\noindent Interrupts are inhibited to a sufficient extent that the data obtained
can not be inconsistent due to the area's modification while being transferred
to the user. A successful .GETSYS will skip. One that fails, due to non-recognition
of its sixbit word or insufficient memory specified by its pointer word, will
not skip and in the former case the sixbit word will be zeroed.


\subsection{The .GETLOC UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVE AC,{[}ABSLOC,,DATLOC{]}}&
\tabularnewline
\textsf{CALL:}&
\textsf{.GETLOC AC,}&
\tabularnewline
&
\textsf{;return}&
\tabularnewline
&
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{0}&
\textsf{;contents of ABSLOC stored here}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call simply transfers the contents of the absolute location
pointed to by the left half of the specified accumulator to the user's relative
location pointed to by the right half. If the right half points beyond the user's
memory bound he will receive an illegal instruction interrupt {[}Sec 4.2{]}.


\subsection{The .RSYSI UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.RSYSI AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call reads into the specified accumulator the sixbit representations
of the second file name of the symbolic file that was assembled to produce the
running version of ITS.


\subsection{The .EVAL UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}SQUOZE sym{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.EVAL AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
\end{tabular}
\medskip{}

\noindent The .EVAL system call allows a user to easily look up symbols in high
core DDT's table of system symbols. The {}``squoze'' code {[}Ref 3{]} for the
symbol should be put in the accumulator specified. If the symbol is not found,
the call will return without skipping. If it is found its value will be placed
in the specified accumulator and the call will skip on returning.


\section{The One Proceed Feature}

The Project MAC AI Group PDP-6 has been modified so that there exists a mode
in which it executes one instruction and then traps. This mode is properly stored
when an interrupt occurs and is restored by JRST 2, {[}Ref 1{]}. For users it
causes a class one interrupt and is expected to be used by superior (such as
DDT {[}Sec 7{]} procedures by .USET'ing {[}Sec 5.2.3{]} the 3.9 bit of their
inferior's program counter word. There is coding in ITS such that all system
calls will appear to be single instructions using this mode. While in this mode
a user interrupt may be serviced and the user's status, including this mode,
will be restored by a normal .DISMISS {[}Sec 4.2.2{]}.


\section{Miscellaneous}


\subsection{The .SLEEP UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVE AC,{[}TIME{]}}\tabularnewline
\textsf{CALL:}&
\textsf{.SLEEP AC,}\tabularnewline
&
\textsf{;return eventually}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call allows a procedure to stop running, while remaining
interruptable, by either specifying a length of time to remain quiescent or a
particular time to wake up. If the specified accumulator contains a positive
number it is considered the length of time, in thirtieths of a second, that the
procedure wishes to sleep. If the specified accumulator contains a negative number
then the procedure will sleep until the magnitude of system time (as read by
.RDTIME {[}Sec 6.3.1{]}) is greater than the magnitude of this negative number.
When a .SLEEP returns, the accumulator specified will be zero, but if a program
is interrupted out of either type of .SLEEP the accumulator will be seen to contain
the appropriate negative number.


\subsection{The .GENSYM UUO}

\textsf{}\begin{tabular}{ll}
\textsf{CALL:}&
\textsf{.GENSYM AC,}\tabularnewline
&
\textsf{;return}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call returns in the specified accumulator a valid sixbit
file-name-like symbol that will be unique among those returned by .GENSYM's for
a particular system run.


\subsection{The .IOTLSR UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVSI AC,400000}&
\textsf{;or 0 to release}\tabularnewline
\textsf{CALL:}&
\textsf{.IOTLSR AC,}&
\tabularnewline
&
\textsf{;return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent Procedures run by ITS in IOT-user mode may execute hardware input-output
instructions which would otherwise be ineffective and trap to the monitor. This
system call sets the IOT-user status of the procedure executing it from the sign
bit of the specified accumulator. If this bit is a one the procedure will attempt
to enter IOT-user mode. If it is not currently in IOT-user mode it will enter
it and a message will be output by the system job {[}Sec 6.5{]} unless the procedure
is in a disowned tree in which case it will receive an illegal instruction interrupt
{[}Sec 4.2{]}. If this bit is a zero, the procedure will not be in IOT-user mode
after the .IOTLSR.


\subsection{The .SETLOC and .IFSET UUO's}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVE AC,{[}DATLOC,,ABSLOC{]}}&
\tabularnewline
\textsf{CALL:}&
\textsf{.SETLOC AC,}&
\tabularnewline
&
\textsf{;return}&
\tabularnewline
&
&
\tabularnewline
\textsf{DATLOC:}&
\textsf{\ldots{}}&
\textsf{;data from here written in ABSLOC}\tabularnewline
\end{tabular}
\medskip{}

\noindent The .SETLOC system call treats the specified accumulator as two half
word pointers. It takes the contents of the relative user location pointed to
by the left half and places it in the absolute location pointed to by the right
half and causes the system job to output an appropriate message {[}Sec 6.5{]}
unless the procedure executing it is in a disowned tree in which case the procedure
will receive an illegal instruction interrupt {[}Sec 4.2{]}.

\medskip{}
\noindent \textsf{}\begin{tabular}{lll}
&
\textsf{MOVE AC,{[}DATBLK,,ABSLOC{]}}&
\tabularnewline
\textsf{CALL:}&
\textsf{.IFSET AC,}&
\tabularnewline
&
\textsf{;error return}&
\tabularnewline
&
\textsf{;normal return}&
\tabularnewline
&
&
\tabularnewline
\textsf{DATBLK:}&
\textsf{TESTWD}&
\textsf{;tested against c(ABSLOC)}\tabularnewline
&
\textsf{SETWRD}&
\textsf{;set into ABSLOC if test succeeds}\tabularnewline
\end{tabular}
\medskip{}

The .IFSET system call is very similar to .SETLOC. The left half of its accumulator,
however, points to a two word block. It first compares the first of these two
words against the specified absolute location. If they are not equal, it returns
immediately without skipping. If they are equal, it proceeds as for .SETLOC but
sets from the second word of the block and skips on returning.

Going to the extra effort to use .IFSET is much safer of you think there is some
chance that the absolute location you are setting may be moved by the core allocator.


\subsection{The .MASTER UUO}

\textsf{}\begin{tabular}{lll}
&
\textsf{MOVSI AC,400000}&
\textsf{;or 0 to release}\tabularnewline
\textsf{CALL:}&
\textsf{.MASTER AC,}&
\tabularnewline
&
\textsf{;error return}&
\tabularnewline
&
\textsf{;normal return}&
\tabularnewline
\end{tabular}
\medskip{}

\noindent ITS has a specified feature whereby one procedure can receive peferential
treatment. It will be scheduled {[}Sec 4.4{]} with twice the priority of a normal
procedure (running in competition with a second running job, it would reach an
equilibrium where it was using twice as much machine time) and is given preference
in the use of the DEC 340 display {[}Sec 3.4.1{]}.

To request this status a procedure should execute a .MASTER with the 4.9 bit
of the specified accumulator a one. It will succeed, and the .MASTER will skip,
if no procedure has the facility seized or if the procedure executing the .MASTER
has control {[}Sec 3.2.1.1{]} of teletype T00 (the {}``main console'' in front
of the 340 display). If the later case, the facility may be removed from another
procedure having it. A failing .MASTER returns without skipping.

The facility may be released by executing a .MASTER with the specified accumulator
having bit 4.9 zero. This always skips even if the procedure does not have the
facility to release.


\subsection{The .REDEF UUO}

\textsf{}\begin{tabular}{ll}
&
\textsf{MOVEI AC,SYMBLK}\tabularnewline
\textsf{CALL:}&
\textsf{.REDEF AC,}\tabularnewline
&
\textsf{;error return}\tabularnewline
&
\textsf{;normal return}\tabularnewline
&
\tabularnewline
\textsf{SYMBLK:}&
\textsf{SQUOZE BITS,sym}\tabularnewline
&
\textsf{VALUE}\tabularnewline
\end{tabular}
\medskip{}

\noindent This system call allows the user to define, redefine, and delete system
symbols from high core DDT's symbol table. It is illegal for a procedure in a
disowned procedure tree. The accumulator specified by it should contain a pointer
to a two word block. The first word in this block should be the {}``squoze''
code {[}Ref 3{]} for the symbol to be affected. The second word is the new value
for a define (the symbol is not currently in the table) or redefine (the symbol
currently is in the table). A delete request is indicated by having all four
squoze flag bits (BITS in the above illustration) on. The call skips if successful.
It can fail only on an attempt to define a new symbol when there is no more room
above the time sharing system.


\chapter{DDT}

See also section 0.4.1.


\section{Introduction}

DDT is a general purpose machine language debugging program that has been extensively
modified to act as a supervisory procedure in ITS. It is automatically loaded
by ITS {[}Sec 1.1.1{]} when a user informs ITS of his presence at an idle teletype.
All further requests of the system by the user, until he logs out, are by means
of trapping instructions {[}Sec 1.2{]} executed for the user, possibly as a result
of characters he types in, by DDT or procedures inferior {[}Sec 5.1{]} to and
under the control of DDT. The current binary of DDT exists as the file {}``@
HACTRN'' on device SYS {[}Sec 3.1.3{]}. For historic reasons, a top level DDT
is known as a HACTRN (pronounced hack-tran).

The initial command structure of DDT provided single character debugging commands
of limited mnemonicity. This structure was badly strained by the introduction
of time-shared related commands. Then a new set of multi-letter commands was
introduced. This set was expanded with the thought of providing all the most
frequently used commands that did not relate to machine language debugging. Since
a beginning or transient user might wish to use only these mnemonic commands,
a mode switch was added to DDT. There is a {}``monitor mode'' in which only
the multi-letter commands are available besides a few interrupt level commands
that are unaffected by mode. In {}``DDT mode'' all of the single character
debugging commands are also available.

Section 7.2 below gives more information on monitor mode and describes almost
all monitor mode commands. Section 7.3 describes the few interrupt mode commands
in HACTRN and section 7.4 explains how DDT tells the user about error conditions.
The information in these three sections should be more than enough to enable
extensive use of ITS, particularly the conversational and interpretive programs
avaiable under it (such as TECO, LISP and STRING).

The remaining section (7.5) gives information on finding out about DDT mode commands.
These would be important to someone developing a machine language program.


\subsection{When DDT Starts}

When a new copy of DDT is started, it types out certain useful information. If
output is to a GE Datanet 760 console, it first clears the screen. Then it types
out {}``DDT.xxx.'' where xxx is the version number of the DDT so that bugs
can be correctly matched to version. Then, if ITS is in the system going down
mode {[}Sec 6.5.2{]}, a message indicating its remaining life span is output.
Finally, if a file named {}``SYSTEM MAIL'' is found on device SYS {[}Sec 3.1.3{]},
it is typed out.


\section{Monitor Mode Commands}

When in monitor mode {[}Sec 7.1{]}, DDT indicates its readiness to accept a command
by typing out a {}``:''. At this point the user can type a series of letters
followed by a break character (normally space or carriage return). DDT looks
up this symbol (or its first six letters if longer) in a table of monitor mode
commands. A user may also type a comment that will be ignored by DDT in or before
this string by beginning and ending it with an {}``\textasciicircum{}\$'' (alt.-mode).
No {}``\textasciicircum{}\$''s may be embedded in the comment. If the symbol
is found, control is transferred to a routine associated with it which may perform
immediate actions or wait for more information to be typed by the user. At any
time during the typing of a command, the user can abort and start over by typing
a rubout.

If the string (say {}``llll'') after the {}``:'' is not found in DDT's command
table, it looks for a file called {}``TS llll'' on device SYS {[}Sec 3.1.3{]}.
If not found an error comment {[}Sec 7.4{]} to that effect is output. If found,
an inferior procedure is created, this file loaded into the inferior core image,
and it is then started. The effect is as though the following {[}Sec 7.2{]} were
typed:

\medskip{}
\textsf{}\begin{tabular}{l}
\textsf{:JOB llll}\tabularnewline
\textsf{:LOAD SYS: TS llll}\tabularnewline
\end{tabular}
\medskip{}

\noindent except that symbols for the program are not loaded into DDT from the
file and the normal effects of :LOAD on the current file and device names in
DDT is absent.


\subsection{Logging In and Out}

\textsf{:LOGIN uname}

\noindent This command takes as its argument the {}``uname'' that the user
wishes to log in with {[}Sec 6.2{]}. A {}``?'' will be typed out and the command
will be ineffective if someone is already logged in with that name. For ease
in accessing his disk files, a user should use a consistent UNAME.

At the time the user logs in, DDT looks for a file names {}``uname MAIL'' on
device COM {[}Sec 3.1.3{]}. If not found, no action is taken by DDT. If found,
DDT types it out, deletes the file {}``uname OMAIL'', if any, on device COM,
and renames the {}``uname MAIL'' file as {}``uname OMAIL''.

\medskip{}
\noindent \textsf{:LOGOUT}

\noindent This command expunges all of the user's procedures from the system
including the user's HACTRN {[}Sec 6.1{]}. The teletype the user was typing on
will become free and a message to that effect will be typed out on it by the
system job {[}Sec 6.5{]}. DDT also deletes the file {}``uname OMAIL'' on device
COM at this time (where {}``uname) is the name the user logged in as).


\subsection{Inter User Communication}

\textsf{:MAIL uname string\ldots{}\textasciicircum{}C}

\noindent This command takes as its first argument the user name of someone who
uses ITS and as its second argument a string terminated by a {}``\textasciicircum{}C''.
The command prefixes the string to the file {}``uname MAIL'' on device COM
{[}Sec 3.1.3{]} if such a file exists. If no such file exists, one is created
with the string as its contents. This file is presented to the specified user
when he logs in {[}Sec 7.2.1{]}. The user can rubout individual characters while
typing the string or cancel the command by typing enough rubouts.

\medskip{}
\noindent \textsf{:BUG string\ldots{}\textasciicircum{}C}

\noindent This command is intended for use in reporting bugs in systems software.
It is identical to {}``\textsf{:MAIL SYS string\ldots{}\textasciicircum{}C}''.

\medskip{}
\noindent \textsf{:SEND uname string\ldots{}\textasciicircum{}C}

\noindent This command takes arguments like \textsf{:MAIL} above but attempts
to send the message string supplied to the user specified in a direct manner
so that, if he is logged in, his HACTRN will type the string out on his console.
If he is not logged in, DDT will type out {}``(MAIL)'' and perform the actions
specified under \textsf{:MAIL} above.

\medskip{}
\noindent \textsf{:GAG number}

\noindent This command enables a user to gag messages that other users may attempt
to send the him with \textsf{:SEND} (above). It takes a numeric argument that
is bit decoded as per the table below.

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Bit}&
\textsf{Source}\tabularnewline
\textsf{1.1}&
\textsf{Other user's inferiors.}\tabularnewline
\textsf{1.2}&
\textsf{Other user's HACTRN's.}\tabularnewline
\textsf{1.3}&
\textsf{Your inferiors.}\tabularnewline
\textsf{1.4}&
\textsf{Your HACTRN (yourself).}\tabularnewline
\end{tabular}
\medskip{}

If a bit is on it inhibits messages from the source listed. If off, messages
are not inhibited. The initial state is \textsf{:GAG 1}.

The current implementation gives no way to tell if a message sent was gagged
by the intended receiver.


\subsection{Inferior Procedures}

\textsf{:JOB \{jname\}}

\noindent This command may be followed by an optional job name {[}Sec 5.1{]}.
If there is an inferior procedure with this JNAME it will be selected by HACTRN
as its {}``current job'' (possibly attaching a disowned tree {[}Sec 5.1.2{]}).
Many commands in DDT affect the current job only as this changes infrequently
and one would not want to respecify it with each command. If there is no inferior
with the specified name, one will be created {[}Sec 5.1.1{]} and selected as
the current job.

The job names SYS and PDP10 are special. The first allows the user limited access
to absolute core. The second allows full access to the core image of the PDP-10
{[}Sec 3.4.2.1{]} to one user.

If no argument is supplied to \textsf{:JOB} it attempts to select some job different
from the current one and types out {}``\textsf{jname\$J}'' to inform the user
it has selected job {}``jname''. If there is no current or other job, nothing
it typed out. If the current job is the only inferior of HACTRN it will be reselected.
If other inferiors exist one is selected in such a way that all inferiors are
cycled through by successive \textsf{:JOB}'s with no argument.

\medskip{}
\noindent \textsf{:KILL}

\noindent This command obliterates {[}Sec 5.2.1{]} the current job and all its
inferiors if it is an immediate inferior. If not an immediate inferior the variable
space for it in HACTRN is reclaimed and logical pointers to it obliterated. In
either case a \textsf{:JOB} with no argument is then simulated to minimize the
time during which there is no current job.

\medskip{}
\noindent \textsf{:LISTJ}

\noindent This command lists all of the inferiors of which HACTRN is aware. An
{}``{*}'' is printed before the current job, if any. After each job will be
a character indicating its state as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Character}&
\textsf{Status}\tabularnewline
\textsf{--}&
\textsf{Just created or loaded.}\tabularnewline
\textsf{R}&
\textsf{Running.}\tabularnewline
\textsf{P}&
\textsf{Procedable from random interrupt.}\tabularnewline
\textsf{Bn}&
\textsf{Procedable from breakpoint n {[}Sec 7.5{]}.}\tabularnewline
\textsf{W}&
\textsf{Interrupt/message to HACTRN pending.}\tabularnewline
\end{tabular}
\medskip{}

After this letter is the user index of the procedure (see section 8.2, mode N).
An example of \textsf{:LISTJ} output appears in Appendix G.

\medskip{}
\noindent \textsf{:DISOWN}

\noindent This command disowns {[}Sec 5.2.2{]} the current job, deselecting it,
expunging all information about it in HACTRN, and simulating a \textsf{:JOB}
with no argument.

\medskip{}
\noindent \textsf{:LOAD \{file specification\}}

\noindent This command attempts to load a file into the current job. HACTRN has
a current device, system name {[}Sec 2.2.3{]}, and pair of file names which it
will use if nothing is specified after a command taking a file argument. This
current file is initially device DSK, file name {}``@ BIN'', and the system
name the user logged in as {[}Sec 7.2.1{]}. Various fields can appear in the
file specification distinguished by their terminating character. A {}``dev:''
field sets the device to {}``dev''. An {}``sname;'' sets the system name
to {}``sname''. A field terminated by a space or carriage return (the later
indicating the end of the file specification) is treated differently depending
on how many of this type of field have been seen. The first, if any, such becomes
the first file name. The second, if any, becomes the second file name. A third,
if supplied, becomes the device name (as if followed by a {}``:'') and indicates
the end of the file specification.

\medskip{}
\noindent \textsf{:DUMP \{file specification\}}

\noindent This command dumps the current job as a file optionally specified as
in \textsf{:LOAD} above.

\medskip{}
\noindent \textsf{:START \{number\}}

\noindent This command starts the current job, giving it control of the user's
console {[}Sec 3.2.1.1{]}. If no argument is supplied it is started at the last
place it was started with a \textsf{:START}. if not \textsf{:START}'ed before
then at the assembled-in starting address that was read in as the program was
loaded. If no starting address was supplied a {}``?'' is typed out.

If a numeric argument is supplied, the job is started at the specified address
which is stored away for future :START's without argument.

\medskip{}
\noindent \textsf{:CONFIX\{UE\}}

\noindent This restarts the current job if it is stopped and gives it control
of the user's console. It can be used to continue after returning to HACTRN with
a {}``\textasciicircum{}Z'' {[}Sec 1.1.2{]}.

\medskip{}
\noindent \textsf{:PROCED}

\noindent This command restarts the current job if it is stopped but leaves HACTRN
in control of the user's console. Using this command the user can easily get
several inferiors running at the same time.


\subsection{Files and Input-Output}

\textsf{:PRINT \{file specification\}}

\noindent This command treats a file as ASCII characters and prints it out. It
accepts an optional file specification as described under \textsf{:LOAD} {[}Sec
7.2.3{]} above.

\medskip{}
\noindent \textsf{:DELETE \{file specification\}}

\noindent This command deletes {[}Sec 2.4{]} a file. It takes an optional file
specification as described under \textsf{:LOAD} {[}Sec 7.2.3{]} above.

\medskip{}
\noindent \textsf{:LISTF \{device name\}}

\noindent This command lists the files on HACTRN's current device or the device
specified as an argument {[}Sec 2.2.1{]}.

\medskip{}
\noindent \textsf{:FLAP number}

\noindent This command must be followed by the number of a DEC tape drive. It
causes the tape on the specified drive to by physically demounted and its directory
to be excised from ITS {[}Sec 3.1.2.1{]}.

\medskip{}
\noindent \textsf{:LINK \{file name pair\} sname; fnam1 fnam2}

\noindent This command creates a link {[}Sec 3.1.1.1{]} under HACTRN's current
system name to the file {}``fname1 fname2'' under system name {}``sname''.
The link's file name is also {}``fnam1 fnam2'' unless the optional file names
shown above are supplied.


\subsection{The {}``Control-P'' Feature}

DDT has a feature which is designed to reduce the need to repeatedly type the
same or very similar file names at different systems programs. For historic reasons
this is called a {}``Control-P'' feature. This feature is implemented using
a block of four locations in DDT. These are deposited in the core image of a
newly loaded inferior by the execution of certain DDT mode {[}Sec 7.5{]} commands
and certain of the commands explained below. The locations set in an inferior
and their significance are as follows:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Location}&
\textsf{Significance}\tabularnewline
\textsf{50}&
\textsf{First file name.}\tabularnewline
\textsf{51}&
\textsf{New second file name.}\tabularnewline
\textsf{52}&
\textsf{Current second file name.}\tabularnewline
\textsf{53}&
\textsf{Old second file name.}\tabularnewline
\end{tabular}
\medskip{}

\medskip{}
\noindent \textsf{:CR}

\noindent This command reads in a file name as for \textsf{:LOAD {[}Sec 7.2.3{]}.
It puts the first file name read in the DDT word to be deposited in location
50. It puts the second file name in the DDT word to be deposited in location
52 and the second file name incremented in the word to be deposited in location
51. It clears the word to be deposited in 53 and finally loads, deposits in 50
through 53, and starts a copy of TECO, the normal ITS editing program, as for
a :TECO {[}Sec 7.2{]} except for the depositing in 50 through 53.}

\medskip{}
\noindent \textsf{:ED}

\noindent This command increments the file name in the location to be put in
51 and then puts the incremented file name back after moving what was there into
the location to be put in 52 and similarly moving that word into the location
to be put into 53. it then loads, deposits in, and starts a copy of TECO, the
normal ITS editor, as for a \textsf{:TECO {[}Sec 7.2{]} except for the depositing
in 50 through 53.}

\medskip{}
\noindent \textsf{:ST}

\noindent This command simply reads a file name and does the same thing with
it as \textsf{:CR (described above) except it does not load or start a TECO.}


\subsection{Miscellaneous}

\textsf{:?}

\noindent This command lists all important monitor mode commands with a short
explanation of each. An example is shown in Appendix G.

\medskip{}
\noindent \textsf{:DDT}

\noindent This command switches HACTRN to DDT mode {[}Sec 7.1{]}.

\medskip{}
\noindent \textsf{:MON}

\noindent This command switches HACTRN to monitor mode {[}Sec 7.1{]}.

\medskip{}
\noindent \textsf{:XFILE \{file specification\}}

\noindent This command reads the file, optionally specified as for \textsf{:LOAD}
{[}Sec 7.2.3{]} above, and, treating it as ASCII, executes it as HACTRN commands.

\medskip{}
\noindent \textsf{:SYNLOD}

\noindent Mostly useful in conjunction with DDT mode {[}Sec 7.5{]} commands,
this command loads symbols only for the current job. It takes an optional file
specification as for \textsf{:LOAD} {[}Sec 7.2.3{]} above.

\medskip{}
\noindent \textsf{:ERR}

\noindent Mostly useful in conjunction with DDT mode {[}Sec 7.5{]} commands,
this command interprets the last quantity typed out by HACTRN as a .STATUS {[}Sec
2.5{]} word using the ERR device {[}Sec 3.4.4{]}.


\section{Interrupt Level and Context Tree Commands}

There are six single character commands to HACTRN that are interpreted at its
interrupt level or at its top level in a manner independent of and not affecting
the context in which they occur. They are presented in alphabetic order below.
Two provide the user with the ability to {}``silence'' any particular output
of his HACTRN and abort it from a hung state. The remaining four control where
HACTRN's output goes.

\medskip{}
\noindent \textsf{}\begin{tabular}{ll}
\textsf{Character}&
\textsf{Effect}\tabularnewline
\textsf{\textasciicircum{}B}&
\textsf{Attempts to seize the line printer {[}Sec 3.2.2{]}. If successful, causes
HACTRN output}\tabularnewline
&
\textsf{to be printed.}\tabularnewline
\textsf{\textasciicircum{}E}&
\textsf{Releases the line printer {[}Sec 3.2.2{]} and stops HACTRN output from
being printed.}\tabularnewline
\textsf{\textasciicircum{}G}&
\textsf{Interpreted at the interrupt level, this command causes HACTRN to abort
from}\tabularnewline
&
\textsf{whatever it is doing, type out {}``QUIT?'', and wait for new commands.
This command}\tabularnewline
&
\textsf{should only be used when necessary (ie HACTRN seems to be permanently
hung}\tabularnewline
&
\textsf{up) as there is almost no protection from interrupting out of embarrasing
places where}\tabularnewline
&
 \textsf{variables are out of phase, etc. All buffered type in and out is also
reset {[}Sec 2.7.2{]}.}\tabularnewline
\textsf{\textasciicircum{}S}&
\textsf{This character is interpreted at both interrupt and top level. It inhibits
HACTRN output,}\tabularnewline
&
\textsf{also doing a type out reset {[}Sec 2.7.2{]}, between these two interpretations.
Thus {}``\textasciicircum{}S''}\tabularnewline
&
\textsf{is a much less drastic step than {}``\textasciicircum{}G'' (above)
to be used when the only trouble is that}\tabularnewline
&
\textsf{HACTRN is being somewhat long winded. It re-enables output when HACTRN
gets}\tabularnewline
&
\textsf{around to it at the top level.}\tabularnewline
\textsf{\textasciicircum{}V}&
\textsf{This command causes HACTRN output to be typed. It is the initial state.}\tabularnewline
\textsf{\textasciicircum{}W}&
\textsf{This command stops HACTRN output from being typed.}\tabularnewline
\end{tabular}


\section{Error Comments}

DDT used to have two error comments, {}``U'' and {}``?''. The first of these
is typed out when an undefined symbol is evaluated, usually when it is terminated
by a non-symbol-constituent. The second was typed out for all other errors. it
has been significantly augmented.

Errors in attempting to open, rename, or delete a file are indicated by the comment
produced by the ERR device {[}Sec 3.4.4{]} followed by the symbolic name of the
device and a question mark. In the case of an input-output error interrupt from
an .IOT or .OPER, a special check is made to see if the error is device full
on the input-output channel on which dumps are written. If so, the partial dump
is deleted and an appropriate message output. Otherwise, the following error
comment is output.

\textsf{n, m, p, IOC?}

where n is the error number, m the input-output channel on which it occurred,
and p the location of the offending .IOT or .OPER. For other errors indicated
by interrupts the following is output:

\textsf{n, p, INT?}

where n is a number with the interrupt bits on and p is the location interrupted
from.

Other error comment listed in the following table:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{Output}&
\textsf{Meaning}\tabularnewline
\textsf{NML?}&
\textsf{Interrupt from unknown inferior.}\tabularnewline
\textsf{TMJ?}&
\textsf{Attempt to have too many inferiors.}\tabularnewline
\textsf{CKS?}&
\textsf{Checksum error on load.}\tabularnewline
\textsf{EOF?}&
\textsf{Unexpected end-of-file on read.}\tabularnewline
\textsf{CFT?}&
\textsf{Unable to assign console to inferior.}\tabularnewline
\textsf{COR?}&
\textsf{Can't get more core.}\tabularnewline
\textsf{JOB?}&
\textsf{No current job.}\tabularnewline
\textsf{UNF?}&
\textsf{DEC tape unflappable.}\tabularnewline
\textsf{DSK?}&
\textsf{Disown failed.}\tabularnewline
\textsf{TMS?}&
\textsf{Too many undefined symbols.}\tabularnewline
\textsf{ILUUC?}&
\textsf{Illegal UUO executed in DDT.}\tabularnewline
\textsf{LOGIN?}&
\textsf{You are not logged in.}\tabularnewline
\end{tabular}
\medskip{}


\section{DDT Mode Commands}

Monitor mode commands may also be used in DDT mode. It is simply necessary for
the user to type the initial {}``:''. For further information on DDT mode commands,
references 2, 7 and 8 of this memo are recommended. Also one might try next year's
edition of this memo.


\chapter{PEEK}


\section{Introduction}

PEEK is a utility program operating under ITS. It enables a user to monitor a
variety of aspects of the time sharing system by providing periodically updated
display output or periodic character string output to teletype or line printer.
Commands to PEEK are single letters sometimes preceded by numeric arguments.
When initially started, PEEK is in N, or normal, mode {[}Sec 8.2{]}. If the uder
is on a GE console {[}Sec 3.2.1{]} PEEK will initially start outputing by typing
(which, on a GE console, is effectively displaying). If the user is on a teletype,
PEEK will try to seize the 340 display {[}Sec 3.4.1{]} and either display on
the 340 or type its output depending on whether it succeeds or fails, respectively.
This may be disconcerting if you are at a teletype not in view of the 340 because
it will appear that the PEEK is just sitting there. This can be rectified with
the \textasciicircum{}N command {[}Sec 8.3{]}.

The first line of all pages output by PEEK is as follows:

\smallskip{}
\textsf{ITS xxx PEEK yyy mm/dd/yy hh:mm:ss}
\smallskip{}

where xxx is the version number of the system in use {[}Sec 6.5.3{]}, yyy is
the version number of the PEEK in use (so bugs can be matched to exact version),
and mm/dd/yy is the date and hh:mm:ss the time according to ITS {[}Sec 6.3.2,
6.3.3{]}. If any core or disk parity errors have occured during the current system
run, a second line is displayeed listing the number of each. The last line of
all pages displayed on the 340 by PEEK is a list of mode commands which can be
given by light-penning {[}Sec 3.4.1.2{]} them with effects identical to typing
them.

All characters typed at PEEK are interpreted at its interrupt level and have
effect, if any, immediately. Characters that are not commands, digits, or \textasciicircum{}Z
are completely ignored. Digits are accumulated as an octal number until a non-digit
is typed at which time the accumulated number is made available (if the non-digit
is a command taking a numeric argument) and reset.

The amount of memory occupied by PEEK varies with mode but the present minimum
is three memory blocks (a total of 5000 words).


\section{Modes Available}

The particular subset of the time sharing system's status being output by PEEK
is controlled by its mode. Initially PEEK is in N mode but it may be changed
to any of those listed below by typing the letter indicated or light penning
{[}Sec 3.4.1.2{]} it if PEEK is displaying on the 340. Unless otherwise specified
the output repetition rate for those modes is the standard rate initially set
to 5 seconds delay after end of page output before starting on the next update.
This is variable by the user with the Z command {[}Sec 8.4{]}.

\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{D}&
\textsf{This mode outputs system supplied directories {[}Sec 2.2.1{]} for the
disk}\tabularnewline
&
\textsf{device {[}Sec 3.1.1{]}. The directory output will list only those files
for the}\tabularnewline
&
\textsf{system name {[}Sec 2.2.3{]} of the PEEK. If the PEEK is running as an}\tabularnewline
&
\textsf{inferior of DDT {[}Sec 7{]}, this system name may be easily changed by
a}\tabularnewline
&
\textsf{DDT command. If output is to the 340 display, the user directory is}\tabularnewline
&
\textsf{preceded by a list of the extant user directories which may be}\tabularnewline
&
\textsf{individually light penned to change PEEK's system names and select a}\tabularnewline
&
\textsf{different directory to display.}\tabularnewline
\textsf{G}&
\textsf{This mode lists the sixbit symbols recognized by .GETSYS {[}Sec 6.6.1{]}}\tabularnewline
&
\textsf{in the system in use. Output is updated after a ten second delay.}\tabularnewline
\textsf{H}&
\textsf{Only available with the 340 display, this mode outputs a graph of}\tabularnewline
&
\textsf{memory with different memory users {[}Sec 4.3{]} on different vertical}\tabularnewline
&
\textsf{levels and location represented by horizontal coordinate.}\tabularnewline
\textsf{I}&
\textsf{The symbolic devices implemented in the system in use {[}App A, B{]}
are}\tabularnewline
&
\textsf{listed by this mode. Output is updated after a ten second delay.}\tabularnewline
\textsf{M}&
\textsf{This mode is somewhat reminiscent of H mode. It lists all memory users}\tabularnewline
&
\textsf{and the amount of memory they are using in decreasing order. An {}``{*}''
is}\tabularnewline
&
\textsf{also output by stopped jobs as are the characters for special resources}\tabularnewline
&
\textsf{being used by any job (see table below).}\tabularnewline
\textsf{V}&
\textsf{This is the most frequently used mode of PEEK. It tries to give a snapshot}\tabularnewline
&
\textsf{of the status of all user jobs in the system. Different amounts of information}\tabularnewline
&
\textsf{are displayed depending on the particular output device in use, but in
all}\tabularnewline
&
\textsf{cases the following additional information is output:}\tabularnewline
\end{longtable}
\medskip{}

\begin{enumerate}
\item Above the list of user jobs, the number of free blocks (each 2000 words) of memory
(MEMFR), the number of areas that are allocated for user variable {[}App D{]}
(USRRI), and the number of user programs that were runnable last schedule time
(RNABLU);
\item Below the list of user jobs, the number of blocks of memory occupied by user
programs (USR MEM) (the sum of this figure and MEMFR is not constant due to dynamic
IO buffers), the total percentage of machine time being used by the listed programs
(USR TIM) (less than one hundred due to scheduling and other overhead), the amount
of time that the running system has been up (STIME), and the total amount of
machine time used by users that have logged out (LOUTIN).
\end{enumerate}
Between the two sets of information described above, there is one line of information
for each procedure in the system topped by a title line which provides a heading
for each column of information. The first item on the line for any particular
procedure will be the user index of the procedure, a number that uniquely refers
to it (see mode V). The second item will be either the UNAME for top level procedures
and the JNAME for inferiors or the UNAME, JNAME, and SNAME for each procedure
depending on the line width of the output device. This second item also portrays
the existant procedure tree structure in that each procedure not at the top level
is an inferior of the nearest procedure above it whose name is not indented as
far.

Other items include an exponential approximation to the percentage of machine
time the procedure has been receiving, the number of core blocks it is occupying,
a column labeled {}``TTY'' that has a {}``T'' concatenated with the console
number opposite procedures controlling a console, various letters immediately
after the {}``TTY'' column for system resources controlled by the procedure
(see the table below), and a column labelled {}``STATUS''. The character string
opposite a procedure in the STATUS column should be interpreted as follows:

\begin{enumerate}
\item A leading {}``{*}'' indicates that the procedure is processing a software interrupt
{[}Sec 4.2{]}.
\item RUN indicates that the program is running in user mode.
\item A pair of numbers separated by an {}``!'' indicates that the procedure is stopped.
\item Most other strings represent a system call (with S used for the very common .SLEEP
call) or input-output device and type of transfer.

\begin{enumerate}
\item If preceded by a {}``+'' the procedure is running in executive move performing
the call or input-output.
\item If not it is hung on the call or input-output.
\end{enumerate}
\end{enumerate}
\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{T}&
\textsf{The contents of the system translation table {[}Sec 2.2.2{]} is output.}\tabularnewline
\textsf{U}&
\textsf{This mode displays the status of the DEC tape drives {[}Sec 3.1.2{]}}\tabularnewline
&
\textsf{and of the open DEC tape files. For the normal user, the most}\tabularnewline
&
\textsf{useful information per tape is the drive number in the leftmost}\tabularnewline
&
\textsf{column and the DIR variable in the next to rightmost (UTASS)}\tabularnewline
&
\textsf{column. If the DIR variable is minus one, ITS is not retaining a}\tabularnewline
&
\textsf{directory for that drive and a tape mounted on it could be removed}\tabularnewline
&
\textsf{manually. Otherwise it is the absolute location of the directory.}\tabularnewline
&
\textsf{The per open file information includes the names of the procedure}\tabularnewline
&
\textsf{using the file, its direction, and the number of buffers (200 words}\tabularnewline
&
\textsf{each) currently being used for the file by the system.}\tabularnewline
\textsf{V}&
\textsf{This mode command should be proceeded by the user index (see}\tabularnewline
&
\textsf{mode K above) of some user. It displays many of his user variables}\tabularnewline
&
\textsf{{[}App D{]} and the channel word and status word for each of his}\tabularnewline
&
\textsf{input-ouput channels {[}Sec 2.1, 2.5{]}. If output is to the 340 or line}\tabularnewline
&
\textsf{printer, the contents of the selected user's accumulators are also}\tabularnewline
&
\textsf{output.}\tabularnewline
\textsf{X}&
\textsf{This mode outputs the digitalization of all the multiplexed analog to}\tabularnewline
&
\textsf{digital input channels {[}Sec 3.3.3{]} and the value being output on
each}\tabularnewline
&
\textsf{of the multiplexed digital to analog channels {[}Sec 3.3.2{]}.}\tabularnewline
\textsf{Y}&
\textsf{This mode outputs system supplied {[}Sec 2.2.1{]} directories for DEC}\tabularnewline
&
\textsf{tapes. It shoud be proceeded by a drive number.}\tabularnewline
\textsf{?}&
\textsf{This mode outputs a list and brief explanation of PEEK's commands.}\tabularnewline
&
\textsf{An example of its use is included in Appendix G. Output is updated}\tabularnewline
&
\textsf{after a ten second delay.}\tabularnewline
\end{longtable}
\medskip{}

The following are the system resource letters used in modes N and M above:

\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{C}&
\textsf{Indicates that the procedure is now or was the last}\tabularnewline
&
\textsf{to use the core allocator.}\tabularnewline
\textsf{D}&
\textsf{Indicates that the procedure has seized control of the DEC}\tabularnewline
&
\textsf{340 display.}\tabularnewline
\textsf{F}&
\textsf{Indicates that the procedure has control of the COD device.}\tabularnewline
\textsf{I}&
\textsf{This letter can be present for more than one procedure. It}\tabularnewline
&
\textsf{indicates that the procedure it appears with is in {}``IOT-user''}\tabularnewline
&
\textsf{mode {[}Sec 6.8.3{]}.}\tabularnewline
\textsf{L}&
\textsf{Indicates that the procedure has control of the line printer.}\tabularnewline
\textsf{M}&
\textsf{Indicates that the procedure has seized the .MASTER}\tabularnewline
&
\textsf{{[}Sec 6.8.5{]} facility.}\tabularnewline
\textsf{P}&
\textsf{Indicates that the procedure has seized control of the plotter.}\tabularnewline
\textsf{R}&
\textsf{Indicates that the procedure has control of the paper tape reader.}\tabularnewline
\textsf{T}&
\textsf{Indicates that the procedure has control of the paper tape punch.}\tabularnewline
\textsf{10}&
\textsf{Indicates that the user has the PDP-10 core image open on}\tabularnewline
&
\textsf{device USR {[}Sec 4.3.2.1{]}.}\tabularnewline
\end{longtable}


\section{IO Control}

PEEK will output to only one device at a time. The initial device is chosen as
explained in section 8.1. All of the following four commands for changing PEEK's
output device also cause PEEK to immediately restart output for its current mode
{[}Sec 8.2{]}:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{\textasciicircum{}B}&
\textsf{This switches output to the line printer if it is available.}\tabularnewline
&
\textsf{If not available the output device will be unchanged.}\tabularnewline
\textsf{\textasciicircum{}E}&
\textsf{This command will terminate PEEK output to the line}\tabularnewline
&
\textsf{printer and cause it to either type or display its output.}\tabularnewline
\textsf{\textasciicircum{}N}&
\textsf{This command terminates 340 display output, starts}\tabularnewline
&
\textsf{typed output, and sets a flag in PEEK that is cleared}\tabularnewline
&
\textsf{only by the \textasciicircum{}Y command. This flag inhibits PEEK's}\tabularnewline
&
\textsf{attempts to seize the 340 as described in section 8.1}\tabularnewline
\textsf{\textasciicircum{}Y}&
\textsf{PEEK will attempt to seize the 340 display for output}\tabularnewline
&
\textsf{on receipt of this command. If it is unsuccessful, output}\tabularnewline
&
\textsf{will revert to typing. In any case the flag mentioned}\tabularnewline
&
\textsf{under \textasciicircum{}N above is cleared.}\tabularnewline
\end{tabular}


\section{Miscellaneous}

The following are miscellaneous PEEK commands:

\medskip{}
\textsf{}\begin{tabular}{ll}
\textsf{P}&
\textsf{If the PEEK is running under DDT {[}Sec 7{]}, this command}\tabularnewline
&
\textsf{will return control of the user's console to DDT but leave}\tabularnewline
&
\textsf{PEEK running and, if the 340 display or line printer is}\tabularnewline
&
\textsf{selected, producing output. It uses .VALUE to return the}\tabularnewline
&
\textsf{string {}``\textasciicircum{}P'' as a command to DDT.}\tabularnewline
\textsf{Q}&
\textsf{If the PEEK is running under DDT {[}Sec 7{]}, this command}\tabularnewline
&
\textsf{will destroy the PEEK it is typed at and return control of}\tabularnewline
&
\textsf{the user's console to DDT. It uses .VALUE to return the}\tabularnewline
&
\textsf{string {}``\$\textasciicircum{}X.'' as a command to DDT.}\tabularnewline
\textsf{Z}&
\textsf{This command should be preceded by a small number. It}\tabularnewline
&
\textsf{sets the standard update delay to as many seconds {[}Sec 8.2{]}.}\tabularnewline
\textsf{!}&
\textsf{This command will probably go away when swapping is}\tabularnewline
&
\textsf{added to the system. Under normal circumstances it will}\tabularnewline
&
\textsf{cause the procedure tree in which is found the pEEK it is}\tabularnewline
&
\textsf{typed at to be replaced by a single newly loaded PEEK at the}\tabularnewline
&
\textsf{top level. This saves memory if several people want to leave a}\tabularnewline
&
\textsf{PEEK at a single console running for their joint enlightenment.}\tabularnewline
&
\textsf{A top level PEEK will commit suicide if a \textasciicircum{}Z is typed
at it.}\tabularnewline
\end{tabular}


\chapter{LOCK}


\section{Introduction}

LOCK is a utility program operating under ITS performing a multitude of infrequently
required tasks. Its name derives from the fact that the function it was originally
written for was to {}``lock'' and {}``unlock'' teletypes (see the + and --
commands {[}Sec 9.2{]}). Most of LOCK's commands are single characters.

In contrast to PEEK {[}Sec 8{]}, which interprets commands at the interrupt level,
commands to LOCK are read at the main program level. Thus commands will in general
have no effect before previous commands have been completed. In fact, some commands
cause a change in the state of LOCK such that following letters are interpreted
as arguments.

LOCK occupies only one block (2000 words) of memory except after the {}``T''
command.


\section{Commands}

The following are the current LOCK commands:

\medskip{}
\textsf{}\begin{longtable}{ll}
\textsf{+}&
\textsf{This command should be preceeded by a teletype number}\tabularnewline
&
\textsf{{[}Sec 3.2.1{]}. The LOCK will try to open the specified}\tabularnewline
&
\textsf{teletype as an input-output device. it will be successful only}\tabularnewline
&
\textsf{if the teletype is not in use. If it successful, the teletype will}\tabularnewline
&
\textsf{become impervious to \textasciicircum{}Z's so no user can log in on it.
LOCK}\tabularnewline
&
\textsf{will type out an appropriate message on the now locked}\tabularnewline
&
\textsf{teletype, and LOCK will type a {}``W'' to the LOCK user. If the}\tabularnewline
&
\textsf{LOCK fails in opening the teletype it will type an {}``L'' at the}\tabularnewline
&
\textsf{LOCK user.}\tabularnewline
\textsf{--}&
\textsf{This command should be preceeded by a teletype number. If}\tabularnewline
&
\textsf{LOCK has the specified teletype locked (see {}``+'' above) it will}\tabularnewline
&
\textsf{unlock it and type out an {}``{*}''. Otherwise it will type a {}``?''.}\tabularnewline
\textsf{\_}&
\textsf{This command should be preceded by the octal code for a}\tabularnewline
&
\textsf{character. LOCK will type out the character represented in image}\tabularnewline
&
\textsf{mode {[}Sec 3.2.1{]}. This is useful for determining the reaction of
a}\tabularnewline
&
\textsf{console to various codes.}\tabularnewline
\textsf{G}&
\textsf{This command should be preceded by the user index {[}Sec 8.2, see}\tabularnewline
&
\textsf{mode N{]} of the top procedure in a tree that the user wishes to}\tabularnewline
&
\textsf{obliterate. It must be followed by the characters {}``UN''. If the
user}\tabularnewline
&
\textsf{deviates from this sequence, a {}``?'' will be typed and LOCK will}\tabularnewline
&
\textsf{listen for a new command. If the user does not deviate the system}\tabularnewline
&
\textsf{job {[}Sec 6.5{]} forceably logs out {[}Sec 5.4{]} the tree and types
out a}\tabularnewline
&
\textsf{message on the system job teletype.}\tabularnewline
\textsf{I}&
\textsf{A series of magic characters must be typed at a model 37 teletype}\tabularnewline
&
\textsf{to allow its use in full duplex, the mode assumed by most programs}\tabularnewline
&
\textsf{operating under ITS. This command causes LOCK to type the}\tabularnewline
&
\textsf{requisite characters in image mode {[}Sec 3.2.1{]}.}\tabularnewline
\textsf{K}&
\textsf{This command must be immediately followed by the characters {}``ILL''}\tabularnewline
&
\textsf{(see G above) and should be preceded by a number. It will activate the}\tabularnewline
&
\textsf{system going down feature {[}Sec 6.5.2{]} with a time limit of five or
the}\tabularnewline
&
\textsf{number preceding the command minutes, whichever is larger.}\tabularnewline
\textsf{O}&
\textsf{When it receives this command, LOCK will permanently go into a mode}\tabularnewline
&
\textsf{where characters typed at it are echoed as their ASCII values in octal.
To}\tabularnewline
&
\textsf{ultimately escape from LOCK in this mode, the user should use \textasciicircum{}Z
{[}Sec}\tabularnewline
&
\textsf{1.1.2{]}.}\tabularnewline
\textsf{P}&
\textsf{If LOCK is running under a DDT {[}Sec 7{]}, this command causes control}\tabularnewline
&
\textsf{of a user's console to revert to it. The command uses .VALUE to return}\tabularnewline
&
\textsf{a null string.}\tabularnewline
\textsf{Q}&
\textsf{If LOCK is running under a DDT {[}Sec 7{]}, this command causes control}\tabularnewline
&
\textsf{of a user's console to revert to his DDT and his LOCK to be destroyed.}\tabularnewline
&
\textsf{Note that this will unlock all teletypes previously locked (see {}``+''
above)}\tabularnewline
&
\textsf{by the destroyed LOCK as destroying a procedure closes all its channels.}\tabularnewline
&
\textsf{It uses .VALUE to return the string {}``:KILL''.}\tabularnewline
\textsf{S}&
\textsf{This command complements the run status of the system checking feature}\tabularnewline
&
\textsf{of the system job {[}Sec 6.5.1{]}. It will type out the resultant state
as either}\tabularnewline
&
\textsf{{}``START'' or {}``STOP''.}\tabularnewline
\textsf{T}&
\textsf{This command causes complex and nonterminating gyrations on the part}\tabularnewline
&
\textsf{of the LOCK it is typed at and the procedures the LOCK will create as
a}\tabularnewline
&
\textsf{result of this command. Its purpose is to test the core allocator {[}Sec
4.3{]}}\tabularnewline
&
\textsf{and other components of the ITS system. Its casual use is not}\tabularnewline
&
\textsf{recommended.}\tabularnewline
\textsf{?}&
\textsf{This command causes LOCK to type out an up-to-date list of its commands}\tabularnewline
&
\textsf{with a brief explanation of each. An example appears in Appendix G.}\tabularnewline
\end{longtable}


\chapter{References}

\begin{enumerate}
\item Digital Equipment Corporation\\
Programmed-Data-Processor-6 Handbook (P-65)\\
August 1964, DEC, Maynard, Massachusetts.
\item Digital Equipment Corporation\\
DDT (DEC-6-0-UP-DDT-U4-FP-ACT00),\\
April 1965, DEC, Maynard, Massachusetts.
\item Peter R. Samson\\
MIDAS (MAC-M-279, AI-90)\\
October 1965, Project MAC memo.
\item Peter R. Samson\\
MAC PDP-6 DEC-tape File Structure (MAC-M-249, AI-82)\\
Project MAC memo.
\item Michael D. Beeler\\
{[}untitled{]} (AI-128)\\
March 1967, MAC AI group memo.
\item Michael D. Beeler\\
IO Test (AI-144)\\
October 1967, MAC AI group memo.
\item Digital Equipment Corporation\\
DDT-10 (DEC-10-CDDB-D)\\
June 1958, DEC, Maynard, Massachusetts.
\item Thomas F. Knight\\
A Multiple Procedure DDT (AI-147)\\
January 1958, MAC AI group memo.
\item John T. Holloway\\
Output to the PDP-6 Calcomp Plotter (AI-104)\\
August 1966, MAC AI group memo.
\item Donald E. Eastlake III\\
PDP-6 Software Update (Revised AI-118)\\
June 1967, MAC AI group memo.
\item Donald E. Eastlake III\\
ITS 1.4 Reference Manual (MAC-C-377, AI-161)\\
June 1968, MAC memo.
\item Donald E. Eastlake III\\
PEEK and LOCK (MAC-M-367, AI-169)\\
November 1968, MAC memo.
\item Stewart Nelson, Michael Levitt\\
Robot Utility Functions (AI-172)\\
February 1969, MAC AI Group memo.
\end{enumerate}
\appendix

\chapter{System Calls in Numeric Order}

(correct as of ITS version 528)

\medskip{}
\textsf{}\begin{longtable}{lll}
\textsf{Name}&
\textsf{Number}&
\textsf{Section}\tabularnewline
\endhead
\textsf{.IOT}&
\textsf{UUO 040}&
\textsf{2.3}\tabularnewline
\textsf{.OPEN}&
\textsf{UUO 041}&
\textsf{2.2}\tabularnewline
\textsf{.OPER}&
\textsf{UUO 042}&
\textsf{1.2.1}\tabularnewline
\textsf{.ITYI}&
\textsf{.OPER 1}&
\textsf{App E}\tabularnewline
\textsf{.LISTE}&
\textsf{.OPER 2}&
\textsf{3.2.1.2}\tabularnewline
\textsf{.SLEEP}&
\textsf{.OPER 3}&
\textsf{6.8.1}\tabularnewline
\textsf{.SETMS}&
\textsf{.OPER 4}&
\textsf{App E}\tabularnewline
\textsf{.SETM2}&
\textsf{.OPER 5}&
\textsf{4.2.1}\tabularnewline
\textsf{.LOGIN}&
\textsf{.OPER 6}&
\textsf{6.1}\tabularnewline
\textsf{.CLOSE}&
\textsf{.OPER 7}&
\textsf{2.7.1}\tabularnewline
\textsf{.UCLOS}&
\textsf{.OPER 10}&
\textsf{5.2.1}\tabularnewline
\textsf{.ATTY}&
\textsf{.OPER 11}&
\textsf{3.2.1.1}\tabularnewline
\textsf{.DTTY}&
\textsf{.OPER 12}&
\textsf{3.2.1.1}\tabularnewline
\textsf{.IOPUS}&
\textsf{.OPER 13}&
\textsf{2.6.1}\tabularnewline
\textsf{.IOPOP}&
\textsf{.OPER 14}&
\textsf{2.6.1}\tabularnewline
\textsf{.DCLOS}&
\textsf{.OPER 15}&
\textsf{3.4.1.3}\tabularnewline
\textsf{.DSTOP}&
\textsf{.OPER 16}&
\textsf{3.4.1.4}\tabularnewline
\textsf{.RDTIM}&
\textsf{.OPER 17}&
\textsf{6.3.1}\tabularnewline
\textsf{.RDSW}&
\textsf{.OPER 20}&
\textsf{6.2.1}\tabularnewline
\textsf{.GUN}&
\textsf{.OPER 21}&
\textsf{5.4}\tabularnewline
\textsf{.UDISM}&
\textsf{.OPER 22}&
\textsf{3.1.2.1}\tabularnewline
\textsf{.GETSY}&
\textsf{.OPER 23}&
\textsf{6.6.1}\tabularnewline
\textsf{.RD500}&
\textsf{.OPER 24}&
\textsf{6.2.4}\tabularnewline
\textsf{.GETLO}&
\textsf{.OPER 25}&
\textsf{6.6.2}\tabularnewline
\textsf{.SETLO}&
\textsf{.OPER 26}&
\textsf{6.8.4}\tabularnewline
\textsf{.DISOW}&
\textsf{.OPER 27}&
\textsf{5.2.2}\tabularnewline
\textsf{.RD760}&
\textsf{.OPER 30}&
\textsf{6.2.2}\tabularnewline
\textsf{.WR760}&
\textsf{.OPER 31}&
\textsf{6.2.2}\tabularnewline
\textsf{.GEHSY}&
\textsf{.OPER 32}&
\textsf{6.8.2}\tabularnewline
\textsf{.LOGOU}&
\textsf{.OPER 33}&
\textsf{6.1}\tabularnewline
\textsf{.GSNAM}&
\textsf{.OPER 34}&
\textsf{App E}\tabularnewline
\textsf{.WSNAM}&
\textsf{.OPER 35}&
\textsf{App E}\tabularnewline
\textsf{.UPISE}&
\textsf{.OPER 36}&
\textsf{App E}\tabularnewline
\textsf{.RESET}&
\textsf{.OPER 37}&
\textsf{2.7.3}\tabularnewline
\textsf{.ARMOV}&
\textsf{.OPER 40}&
\textsf{3.3.2.1}\tabularnewline
\textsf{.WMAR}&
\textsf{.OPER 41}&
\textsf{App E}\tabularnewline
\textsf{.RRTIM}&
\textsf{.OPER 42}&
\textsf{App E}\tabularnewline
\textsf{.ASSIG}&
\textsf{.OPER 43}&
\textsf{3.1.2.2}\tabularnewline
\textsf{.DESIG}&
\textsf{.OPER 44}&
\textsf{3.1.2.2}\tabularnewline
\textsf{.RTIME}&
\textsf{.OPER 45}&
\textsf{6.3.2}\tabularnewline
\textsf{.RDATE}&
\textsf{.OPER 46}&
\textsf{6.3.3}\tabularnewline
\textsf{.RD710}&
\textsf{.OPER 47}&
\textsf{6.2.3}\tabularnewline
\textsf{.EOFC}&
\textsf{.OPER 50}&
\textsf{2.3.1}\tabularnewline
\textsf{.IOTLS}&
\textsf{.OPER 51}&
\textsf{6.8.3}\tabularnewline
\textsf{.RSYSI}&
\textsf{.OPER 52}&
\textsf{6.6.3}\tabularnewline
\textsf{.SUPSE}&
\textsf{.OPER 53}&
\textsf{6.5.1}\tabularnewline
\textsf{.UBLAT}&
\textsf{.OPER 56}&
\textsf{3.1.2.3}\tabularnewline
\textsf{.IOPDL}&
\textsf{.OPER 57}&
\textsf{2.6.2}\tabularnewline
\textsf{.ITYIC}&
\textsf{.OPER 60}&
\textsf{2.7.3}\tabularnewline
\textsf{.MASTE}&
\textsf{.OPER 61}&
\textsf{6.8.5}\tabularnewline
\textsf{.VSTST}&
\textsf{.OPER 62}&
\textsf{3.3.1.1}\tabularnewline
\textsf{.DIAL}&
\textsf{.OPER 63}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.DIALW}&
\textsf{.OPER 64}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.HANGU}&
\textsf{.OPER 65}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.DIETI}&
\textsf{.OPER 66}&
\textsf{6.5.2.2}\tabularnewline
\textsf{.SHUTD}&
\textsf{.OPER 67}&
\textsf{6.5.2.1}\tabularnewline
\textsf{.ARMOP}&
\textsf{.OPER 70}&
\textsf{3.3.2.1}\tabularnewline
\textsf{.NDIS}&
\textsf{.OPER 71}&
\textsf{3.4.1.5}\tabularnewline
\textsf{.FEED}&
\textsf{.OPER 72}&
\textsf{3.2.4.1}\tabularnewline
\textsf{.EVAL}&
\textsf{.OPER 73}&
\textsf{6.6.4}\tabularnewline
\textsf{.REDEF}&
\textsf{.OPER 74}&
\textsf{6.8.6}\tabularnewline
\textsf{.ITSET}&
\textsf{.OPER 75}&
\textsf{6.8.4}\tabularnewline
\textsf{.UTNAM}&
\textsf{.OPER 76}&
\textsf{3.1.2.4}\tabularnewline
\textsf{.UINIT}&
\textsf{.OPER 77}&
\textsf{3.1.2.5}\tabularnewline
\textsf{.CALL}&
\textsf{UUO 043}&
\textsf{1.2.1}\tabularnewline
\textsf{.DISMI}&
\textsf{.CALL 1,}&
\textsf{4.2.2}\tabularnewline
\textsf{.TRANS}&
\textsf{.CALL 2,}&
\textsf{2.2.2.1}\tabularnewline
\textsf{.TRANA}&
\textsf{.CALL 3,}&
\textsf{2.2.2.2}\tabularnewline
\textsf{.VALUE}&
\textsf{.CALL 4,}&
\textsf{5.3.1}\tabularnewline
\textsf{.UTRAN}&
\textsf{.CALL 5,}&
\textsf{5.1.3}\tabularnewline
\textsf{.CORE}&
\textsf{.CALL 6,}&
\textsf{4.3.1}\tabularnewline
\textsf{.TRAND}&
\textsf{.CALL 7,}&
\textsf{2.2.2.3}\tabularnewline
\textsf{.DSTAR}&
\textsf{.CALL 10,}&
\textsf{3.4.1.1}\tabularnewline
\textsf{.FDELE}&
\textsf{.CALL 11,}&
\textsf{2.4}\tabularnewline
\textsf{.DSTRT}&
\textsf{.CALL 12,}&
\textsf{3.4.1.1}\tabularnewline
\textsf{.SUSET}&
\textsf{.CALL 13,}&
\textsf{4.5}\tabularnewline
\textsf{.LTPEN}&
\textsf{.CALL 14,}&
\textsf{3.4.1.2}\tabularnewline
\textsf{.VSCAN}&
\textsf{.CALL 15,}&
\textsf{3.3.1.1}\tabularnewline
\textsf{.POTSE}&
\textsf{.CALL 16,}&
\textsf{3.3.3.1}\tabularnewline
\textsf{.USET}&
\textsf{UUO 044}&
\textsf{5.2.3}\tabularnewline
\textsf{.BREAK}&
\textsf{UUO 045}&
\textsf{5.3.2}\tabularnewline
\textsf{.STATU}&
\textsf{UUO 046}&
\textsf{2.5}\tabularnewline
\textsf{.ACCES}&
\textsf{UUO 047}&
\textsf{2.7.4}\tabularnewline
\end{longtable}


\chapter{System Calls in Alphabetic Order}

(correct as of ITS version 528)

\medskip{}
\textsf{}\begin{longtable}{lll}
\textsf{Name}&
\textsf{Number}&
\textsf{Section}\tabularnewline
\endhead
\textsf{.ACCES}&
\textsf{UUO 047}&
\textsf{2.7.4}\tabularnewline
\textsf{.ARMOF}&
\textsf{.OPER 70}&
\textsf{3.3.2.1}\tabularnewline
\textsf{.ARMOV}&
\textsf{.OPER 40}&
\textsf{3.3.2.1}\tabularnewline
\textsf{.ASSIG}&
\textsf{.OPER 43}&
\textsf{3.1.2.2}\tabularnewline
\textsf{.ATTY}&
\textsf{.OPER 11}&
\textsf{3.2.1.1}\tabularnewline
\textsf{.BREAK}&
\textsf{UUO 045}&
\textsf{5.3.2}\tabularnewline
\textsf{.CALL}&
\textsf{UUO 043}&
\textsf{1.2.1}\tabularnewline
\textsf{.CLOSE}&
\textsf{.OPER 7}&
\textsf{2.7.1}\tabularnewline
\textsf{.CORE}&
\textsf{.CALL 6,}&
\textsf{4.3.1}\tabularnewline
\textsf{.DCLOS}&
\textsf{.OPER 15}&
\textsf{3.4.1.3}\tabularnewline
\textsf{.DESIG}&
\textsf{.OPER 44}&
\textsf{3.1.2.2}\tabularnewline
\textsf{.DIAL}&
\textsf{.OPER 53}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.DIALW}&
\textsf{.OPER 64}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.DIETI}&
\textsf{.OPER 66}&
\textsf{6.5.2.2}\tabularnewline
\textsf{.DISMI}&
\textsf{.CALL 1,}&
\textsf{4.2.2}\tabularnewline
\textsf{.DISOW}&
\textsf{.OPER 27}&
\textsf{5.2.2}\tabularnewline
\textsf{.DSTAR}&
\textsf{.CALL 10,}&
\textsf{3.4.1.1}\tabularnewline
\textsf{.DSTOP}&
\textsf{.OPER 16}&
\textsf{3.4.1.4}\tabularnewline
\textsf{.DSTRT}&
\textsf{.CALL 12,}&
\textsf{3.4.1.1}\tabularnewline
\textsf{.DTTY}&
\textsf{.OPER 12}&
\textsf{3.2.1.1}\tabularnewline
\textsf{.EOFC}&
\textsf{.OPER 50}&
\textsf{2.3.1}\tabularnewline
\textsf{.EVAL}&
\textsf{.OPER 73}&
\textsf{6.6.4}\tabularnewline
\textsf{.FDELE}&
\textsf{.CALL 11,}&
\textsf{2.4}\tabularnewline
\textsf{.FEED}&
\textsf{.OPER 72}&
\textsf{3.2.4.1}\tabularnewline
\textsf{.GENSY}&
\textsf{.OPER 32}&
\textsf{6.8.2}\tabularnewline
\textsf{.GETLO}&
\textsf{.OPER 25}&
\textsf{6.6.2}\tabularnewline
\textsf{.GETSY}&
\textsf{.OPER 23}&
\textsf{6.6.1}\tabularnewline
\textsf{.GSNAM}&
\textsf{.OPER 34}&
\textsf{App E}\tabularnewline
\textsf{.GUN}&
\textsf{.OPER 21}&
\textsf{5.4}\tabularnewline
\textsf{.HANGU}&
\textsf{.OPER 65}&
\textsf{3.2.1.3}\tabularnewline
\textsf{.IFSET}&
\textsf{.OPER 75}&
\textsf{6.8.4}\tabularnewline
\textsf{.IOPDL}&
\textsf{.OPER 57}&
\textsf{2.6.2}\tabularnewline
\textsf{.IOPOP}&
\textsf{.OPER 14}&
\textsf{2.6.1}\tabularnewline
\textsf{.IOPUS}&
\textsf{.OPER 13}&
\textsf{2.6.1}\tabularnewline
\textsf{.IOT}&
\textsf{UUO 040}&
\textsf{2.3}\tabularnewline
\textsf{.IOTLS}&
\textsf{.OPER 51}&
\textsf{6.8.3}\tabularnewline
\textsf{.ITYI}&
\textsf{.OPER 1}&
\textsf{App E}\tabularnewline
\textsf{.ITYIC}&
\textsf{.OPER 60}&
\textsf{2.7.3}\tabularnewline
\textsf{.LISTE}&
\textsf{.OPER 2}&
\textsf{3.2.1.2}\tabularnewline
\textsf{.LOGIN}&
\textsf{.OPER 5}&
\textsf{6.1}\tabularnewline
\textsf{.LOGOU}&
\textsf{.OPER 33}&
\textsf{6.1}\tabularnewline
\textsf{.LTPEN}&
\textsf{.CALL 14,}&
\textsf{3.4.1.2}\tabularnewline
\textsf{.MASTE}&
\textsf{.OPER 61}&
\textsf{6.8.5}\tabularnewline
\textsf{.NDIS}&
\textsf{.OPER 71}&
\textsf{3.4.1.5}\tabularnewline
\textsf{.OPEN}&
\textsf{UUO 041}&
\textsf{2.2}\tabularnewline
\textsf{.OPER}&
\textsf{UUO 042}&
\textsf{1.2.1}\tabularnewline
\textsf{.POTSE}&
\textsf{.CALL 16,}&
\textsf{3.3.3.1}\tabularnewline
\textsf{.RD500}&
\textsf{.OPER 24}&
\textsf{6.2.4}\tabularnewline
\textsf{.RD710}&
\textsf{.OPER 47}&
\textsf{6.2.3}\tabularnewline
\textsf{.RD760}&
\textsf{.OPER 30}&
\textsf{6.2.2}\tabularnewline
\textsf{.RDATE}&
\textsf{.OPER 46}&
\textsf{6.3.3}\tabularnewline
\textsf{.RDSW}&
\textsf{.OPER 20}&
\textsf{6.2.1}\tabularnewline
\textsf{.RDTIM}&
\textsf{.OPER 17}&
\textsf{6.3.1}\tabularnewline
\textsf{.REDEF}&
\textsf{.OPER 74}&
\textsf{6.8.6}\tabularnewline
\textsf{.RESET}&
\textsf{.OPER 37}&
\textsf{2.7.3}\tabularnewline
\textsf{.RRTIM}&
\textsf{.OPER 42}&
\textsf{App E}\tabularnewline
\textsf{.RSYSI}&
\textsf{.OPER 52}&
\textsf{6.6.3}\tabularnewline
\textsf{.RTIME}&
\textsf{.OPER 45}&
\textsf{6.3.2}\tabularnewline
\textsf{.SETLO}&
\textsf{.OPER 26}&
\textsf{6.8.4}\tabularnewline
\textsf{.SETM2}&
\textsf{.OPER 5}&
\textsf{4.2.1}\tabularnewline
\textsf{.SETMS}&
\textsf{.OPER 4}&
\textsf{App E}\tabularnewline
\textsf{.SHUTD}&
\textsf{.OPER 67}&
\textsf{6.5.2.1}\tabularnewline
\textsf{.SLEEP}&
\textsf{.OPER 3}&
\textsf{6.8.1}\tabularnewline
\textsf{.STATU}&
\textsf{UUO 046}&
\textsf{2.5}\tabularnewline
\textsf{.SUPSE}&
\textsf{.OPER 53}&
\textsf{6.5.1}\tabularnewline
\textsf{.SUSET}&
\textsf{.CALL 13,}&
\textsf{4.5}\tabularnewline
\textsf{.TRANA}&
\textsf{.CALL 3,}&
\textsf{2.2.2.2}\tabularnewline
\textsf{.TRAND}&
\textsf{.CALL 7,}&
\textsf{2.2.2.3}\tabularnewline
\textsf{.TRANS}&
\textsf{.CALL 2,}&
\textsf{2.2.2.1}\tabularnewline
\textsf{.UBLAT}&
\textsf{.OPER 56}&
\textsf{3.1.2.3}\tabularnewline
\textsf{.UCLOS}&
\textsf{.OPER 10}&
\textsf{5.2.1}\tabularnewline
\textsf{.UDISM}&
\textsf{.OPER 22}&
\textsf{3.1.2.1}\tabularnewline
\textsf{.UINIT}&
\textsf{.OPER 77}&
\textsf{3.1.2.5}\tabularnewline
\textsf{.UPISE}&
\textsf{.OPER 36}&
\textsf{App E}\tabularnewline
\textsf{.USET}&
\textsf{UUO 044}&
\textsf{5.2.3}\tabularnewline
\textsf{.UTNAM}&
\textsf{.OPER 76}&
\textsf{3.1.2.4}\tabularnewline
\textsf{.UTRAN}&
\textsf{.CALL 5,}&
\textsf{5.1.3}\tabularnewline
\textsf{.VALUE}&
\textsf{.CALL 4,}&
\textsf{5.3.1}\tabularnewline
\textsf{.VSCAN}&
\textsf{.CALL 15,}&
\textsf{3.3.1.1}\tabularnewline
\textsf{.VSTST}&
\textsf{.OPER 62}&
\textsf{3.3.1.1}\tabularnewline
\textsf{.WMAR}&
\textsf{.OPER 41}&
\textsf{App E}\tabularnewline
\textsf{.WR760}&
\textsf{.OPER 31}&
\textsf{6.2.2}\tabularnewline
\textsf{.WSNAM}&
\textsf{.OPER 35}&
\textsf{App E}\tabularnewline
\end{longtable}


\chapter{Available Symbolic Devices in Alphabetic Order}

(correct as of ITS version 528)

\medskip{}
\textsf{}\begin{longtable}{lll}
\textsf{Device}&
\textsf{Type}&
\textsf{Section}\tabularnewline
\endhead
\textsf{CLA}&
\textsf{5}&
\textsf{3.4.3}\tabularnewline
\textsf{CLI}&
\textsf{3}&
\textsf{3.4.3}\tabularnewline
\textsf{CLO}&
\textsf{7}&
\textsf{3.4.3}\tabularnewline
\textsf{CLU}&
\textsf{7}&
\textsf{3.4.3}\tabularnewline
\textsf{COD}&
\textsf{6}&
\textsf{3.2.5}\tabularnewline
\textsf{COM}&
\textsf{7}&
\textsf{3.1.3}\tabularnewline
\textsf{DIS}&
\textsf{2}&
\textsf{3.4.1}\tabularnewline
\textsf{DKn}&
\textsf{7}&
\textsf{3.1.1}\tabularnewline
\textsf{DSK}&
\textsf{7}&
\textsf{3.1.1}\tabularnewline
\textsf{ERR}&
\textsf{4}&
\textsf{3.4.4}\tabularnewline
\textsf{IDS}&
\textsf{2}&
\textsf{3.4.1}\tabularnewline
\textsf{IMX}&
\textsf{4}&
\textsf{3.3.3}\tabularnewline
\textsf{LPT}&
\textsf{2}&
\textsf{3.2.2}\tabularnewline
\textsf{NUL}&
\textsf{6}&
\textsf{3.4.6}\tabularnewline
\textsf{NVD}&
\textsf{6}&
\textsf{3.3.1}\tabularnewline
\textsf{OMX}&
\textsf{2}&
\textsf{3.3.2}\tabularnewline
\textsf{PLT}&
\textsf{2}&
\textsf{3.2.3}\tabularnewline
\textsf{Pnm}&
\textsf{7}&
\textsf{3.1.1}\tabularnewline
\textsf{PTP}&
\textsf{2}&
\textsf{3.2.4}\tabularnewline
\textsf{PTR}&
\textsf{4}&
\textsf{3.2.4}\tabularnewline
\textsf{SYS}&
\textsf{7}&
\textsf{3.1.3}\tabularnewline
\textsf{Tnm}&
\textsf{6}&
\textsf{3.2.1}\tabularnewline
\textsf{TPL}&
\textsf{7}&
\textsf{3.4.5}\tabularnewline
\textsf{TTY}&
\textsf{6}&
\textsf{3.2.1}\tabularnewline
\textsf{TVC}&
\textsf{6}&
\textsf{3.3.1}\tabularnewline
\textsf{USR}&
\textsf{6}&
\textsf{3.4.2}\tabularnewline
\textsf{UTn}&
\textsf{7}&
\textsf{3.1.2}\tabularnewline
\textsf{VID}&
\textsf{6}&
\textsf{3.3.1}\tabularnewline
\end{longtable}


\chapter{System Variables per User}

(correct as of ITS version 528)

\medskip{}
\textsf{}\begin{longtable}{lll}
\textsf{ICCHNM:}&
\textsf{REPEAT 20,0}&
\textsf{;input-output channel assignment words}\tabularnewline
&
&
\textsf{;right half, index into IOTTB, CLSTB}\tabularnewline
&
&
\textsf{;left half, device dependent}\tabularnewline
\textsf{SIOCHN:}&
\textsf{BLOCK LUIOP}&
\textsf{;input-output channel push down list}\tabularnewline
\textsf{SIOCP:}&
\textsf{SIOCHN--1}&
\textsf{;pointer into input-output push down list}\tabularnewline
\textsf{IOCHST:}&
\textsf{BLOCK 20}&
\textsf{;input-output channel status for channels at IOCHNM}\tabularnewline
&
&
\textsf{;3.1--4.9 input-output status}\tabularnewline
&
&
\textsf{;1.1--2.9 .ACCESS pointer}\tabularnewline
\textsf{UPC:}&
\textsf{0}&
\textsf{;stores program counter when not running}\tabularnewline
\textsf{UPR:}&
\textsf{0}&
\textsf{;user protection and relocation registers}\tabularnewline
\textsf{MEMTOP:}&
\textsf{0}&
\textsf{;six less than first illegal location}\tabularnewline
\textsf{RMEMT:}&
\textsf{0}&
\textsf{;first illegal location}\tabularnewline
\textsf{CORRQ:}&
\textsf{--1}&
\textsf{;request to core job}\tabularnewline
&
&
\textsf{;1.1--1.8 number of blocks, 3.1--4.8 user requested for}\tabularnewline
&
&
\textsf{;4.9=0 means request present, 4.9=0 means no request}\tabularnewline
\textsf{ACOS:}&
\textsf{BLOCK 15}&
\textsf{;swap out accumulators}\tabularnewline
\textsf{AC15S:}&
\textsf{0}&
\textsf{;commonly referenced swap out accumulator}\tabularnewline
\textsf{AC16S:}&
\textsf{0}&
\textsf{;commonly referenced swap out accumulator}\tabularnewline
\textsf{AC17S:}&
\textsf{0}&
\textsf{;commonly referenced swap out accumulator}\tabularnewline
\textsf{UUO:}&
&
\textsf{;the following three locations swapped in \& out of}\tabularnewline
&
&
\textsf{;UEXIT, UUOH, etc with user}\tabularnewline
\textsf{SUEXIT:}&
\textsf{JRST 2,@UUOH}&
\textsf{;user UUO exit instruction}\tabularnewline
\textsf{SUUOH:}&
\textsf{0}&
\textsf{;contents of @41 (absolute)}\tabularnewline
\textsf{SAC17P:}&
\textsf{MOVEM U,}&
\textsf{;accumulator 17 in user's shadow memory}\tabularnewline
\textsf{SV40:}&
\textsf{0}&
\textsf{;last interrupting UUO}\tabularnewline
&
&
\textsf{;(contents of 40 when user out)}\tabularnewline
\textsf{SV60:}&
\textsf{0}&
\textsf{;contents of 60 when user out}\tabularnewline
\textsf{AC14P:}&
\textsf{0}&
\textsf{;points to accumulator 14 in shadow memory}\tabularnewline
\textsf{AC15P:}&
\textsf{0}&
\textsf{;points to accumulator 15 in shadow memory}\tabularnewline
\textsf{AC16P:}&
\textsf{0}&
\textsf{;points to accumulator 16 in shadow memory}\tabularnewline
\textsf{40P:}&
\textsf{0}&
\textsf{;points to user's relative location 40}\tabularnewline
\textsf{41P:}&
\textsf{0}&
\textsf{;points to user's relative location 41}\tabularnewline
\textsf{APRC:}&
\textsf{APRCHN}&
\textsf{;right half is cono to processor}\tabularnewline
&
&
\textsf{;4.9 implies user is in a disowned tree}\tabularnewline
&
&
\textsf{;4.8 implies user being .UCLOS'ed}\tabularnewline
&
&
\textsf{;4.7 user has been cored zero}\tabularnewline
&
&
\textsf{;4.6 core request pending on this user}\tabularnewline
&
&
\textsf{;4.1--4.4 number of last channel on which an}\tabularnewline
&
&
\textsf{;error occurred}\tabularnewline
\textsf{USTP:}&
\textsf{0}&
\textsf{;stop word}\tabularnewline
&
&
\textsf{;zero implies runnable}\tabularnewline
&
&
\textsf{;4.9 stopped to be moved by core allocator}\tabularnewline
&
&
\textsf{;4.8 general core allocator stop bit}\tabularnewline
&
&
\textsf{;4.7 controlled by superior procedure}\tabularnewline
&
&
\textsf{;4.6 special bit, see URMEMT \& UMEMEX}\tabularnewline
&
&
\textsf{;1.1--2.9 count of transient reasons to be stopped}\tabularnewline
\textsf{PIRQC:}&
\textsf{0}&
\textsf{;pending first word interrupts}\tabularnewline
\textsf{MSKST:}&
\textsf{0}&
\textsf{;interrupt enable mask for PIRQC}\tabularnewline
\textsf{IFPIR:}&
\textsf{0}&
\textsf{;second wod of interrupt requests}\tabularnewline
&
&
\textsf{;3.8--3.1 inferior procedure interrupts}\tabularnewline
&
&
\textsf{;2.7--1.1 input-output channel interrupts}\tabularnewline
&
&
\textsf{;1.1 for channel 1, etc.}\tabularnewline
\textsf{MSKST2:}&
\textsf{0}&
\textsf{;second word interrupt enable mask}\tabularnewline
\textsf{PICLR:}&
\textsf{0}&
\textsf{;interrupt level status flag}\tabularnewline
\textsf{SUPPRO:}&
\textsf{0}&
\textsf{;pointer and interrupt bit to superior procedure}\tabularnewline
&
&
\textsf{;--1 for top level procedure}\tabularnewline
\textsf{FLSINS:}&
\textsf{0}&
\textsf{;blocking condition instruction}\tabularnewline
&
&
\textsf{;zero implies runnable}\tabularnewline
\textsf{UFINAL:}&
\textsf{0}&
\textsf{;nonzero implies finalization required to interrupt}\tabularnewline
\textsf{RPCL:}&
\textsf{0}&
\textsf{;0 implies no RPCLosering in progress}\tabularnewline
&
&
\textsf{;0,,n RPLSR'ing user n}\tabularnewline
&
&
\textsf{;--1,,n being RPCLSR'ed by user n}\tabularnewline
\textsf{UNAME:}&
\textsf{0}&
\textsf{;user name}\tabularnewline
&
&
\textsf{;This word for each procedure is copied from the}\tabularnewline
&
&
\textsf{;UNAME of the procedure that creates it (see USR}\tabularnewline
&
&
\textsf{;device). For an initial top level procedure it is --1 but}\tabularnewline
&
&
\textsf{;is modified by .LOGIN. It is the same for all procedures}\tabularnewline
&
&
\textsf{;in a tree.}\tabularnewline
\textsf{JNAME:}&
\textsf{0}&
\textsf{;job name}\tabularnewline
&
&
\textsf{;Each logged in procedure has a unique UNAME,}\tabularnewline
&
&
\textsf{;JNAME pair. The JNAME of an initial top level}\tabularnewline
&
&
\textsf{;job is {}``HACTRN''. For other jobs it is the second}\tabularnewline
&
&
\textsf{;file name specified in the .OPEN on the USR device}\tabularnewline
&
&
\textsf{;that creates them.}\tabularnewline
\textsf{USYSNM:}&
\textsf{0}&
\textsf{;current system name}\tabularnewline
&
&
\textsf{;This variable is initially set equal to the procedure's}\tabularnewline
&
&
\textsf{;UNAME. It can be read or set by the procedure or its}\tabularnewline
&
&
\textsf{;superior (.SUSET, .USET). It is used as the third file}\tabularnewline
&
&
\textsf{;name on certain shared devices.}\tabularnewline
\textsf{USYSN1:}&
\textsf{0}&
\textsf{;system name used inside disk routines}\tabularnewline
&
&
\textsf{;This variable is normally equal to USYSNM but see}\tabularnewline
&
&
\textsf{;devices COM, SYS and TPL.}\tabularnewline
\textsf{TTYTEL:}&
\textsf{0}&
\textsf{;console assignment for this procedure}\tabularnewline
\textsf{UQUAN:}&
\textsf{0}&
\textsf{;quantum time}\tabularnewline
\textsf{UTRNTM:}&
\textsf{0}&
\textsf{;total run time}\tabularnewline
\textsf{UTMPTR:}&
\textsf{0}&
\textsf{;pointer to procedure tree resource word}\tabularnewline
\textsf{JTMU:}&
\textsf{0}&
\textsf{;procedure resource word}\tabularnewline
\textsf{IOTLSR:}&
\textsf{0}&
\textsf{;4.9 a one implies iot-user mode}\tabularnewline
&
&
\textsf{;4,5--4.3 MAR conditions}\tabularnewline
&
&
\textsf{;2.9--1.1 contents of MAR register}\tabularnewline
\textsf{UMARPC:}&
\textsf{0}&
\textsf{;program counter at last MAR interrupt}\tabularnewline
\textsf{VALUE:}&
\textsf{0}&
\textsf{;contents of effective address of last .VALUE}\tabularnewline
\textsf{UOUT:}&
\textsf{0}&
\textsf{;4.9=1 $\Rightarrow$ user not completely in core}\tabularnewline
&
&
\textsf{;4.8 in transit in}\tabularnewline
&
&
\textsf{;4.7 in transit out}\tabularnewline
&
&
\textsf{;4.6 ref to disk in progress}\tabularnewline
&
&
\textsf{;4.5 back in core but needs to be blessed before starting}\tabularnewline
&
&
\textsf{;1.1--1.9 core blocks needed for swap in}\tabularnewline
\textsf{USRPDL:}&
\textsf{--LUPDL,,UPDL--1}&
\textsf{;push down list pointer for system calls}\tabularnewline
\textsf{UPDL:}&
\textsf{BLOCK LUPDL--2}&
\textsf{;push down list area for system calls}\tabularnewline
\textsf{EPDL1:}&
\textsf{0}&
\textsf{;link depth for 2311 routines}\tabularnewline
\textsf{EPDL:}&
\textsf{0}&
\textsf{;temporarily saves accumulator B for ACORE}\tabularnewline
\textsf{EPDL2:}&
\textsf{0}&
\textsf{;temporarily saves accumulator T for FLSINS}\tabularnewline
\end{longtable}


\chapter{Relics of ITS's Past}

The following system calls, while still effective as of ITS version 523, can
be expected to ultimately disappear. They are redundant, more specialized, older
versions of their replacements.

\medskip{}
\begin{center}\textsf{}\begin{tabular}{llll}
\textsf{Name}&
\textsf{Number}&
\textsf{Replacement}&
\textsf{Function}\tabularnewline
\textsf{.ITYI}&
\textsf{.OPER 1}&
\textsf{.ITYIC}&
\textsf{Read interrupt level characters from open TTY device, if any.}\tabularnewline
\textsf{.SETMS}&
\textsf{.OPER 4}&
\textsf{.SUSET}&
\textsf{Set own user variable MSKST.}\tabularnewline
\textsf{.GSNAM}&
\textsf{.OPER 34}&
\textsf{.SUSET}&
\textsf{Read own user variable USYSNM.}\tabularnewline
\textsf{.WSNAM}&
\textsf{.OPER 35}&
\textsf{.SUSET}&
\textsf{Set own user variable USYSNM.}\tabularnewline
\textsf{.UPISE}&
\textsf{.OPER 36}&
\textsf{.SUSET}&
\textsf{Set own user variable PICLR.}\tabularnewline
\textsf{.WMAR}&
\textsf{.OPER 41}&
\textsf{.SUSET}&
\textsf{Set own user variable IOTLSR.}\tabularnewline
\textsf{.RRTIM}&
\textsf{.OPER 42}&
\textsf{.SUSET}&
\textsf{Read own user variable UTRNTM.}\tabularnewline
\end{tabular}\end{center}


\chapter{Further Sources of Information on ITS}

Information further than or more recent than that contained in this manual may
usually be obtained by consulting the symbolic listings of ITS, DDT, PEEK, or
LOCK. The following persons may also be helpful:

\medskip{}
\textsf{}\begin{tabular}{l}
\textsf{Donald E. Eastlake III}\tabularnewline
\textsf{Jerry S. Freiberg}\tabularnewline
\textsf{Richard D. Greenblatt}\tabularnewline
\textsf{Thomas F. Knight}\tabularnewline
\textsf{John T. Holloway}\tabularnewline
\textsf{Stewart B. Nelson}\tabularnewline
\textsf{Frederick H.G. Wright II}\tabularnewline
\end{tabular}


\chapter{Illustrative Console Output}

The following pages are a sample console session with ITS illustrating several
features documented in this memo.

\begin{lyxcode}
$\uparrow$Z

~~DDT.198.

:LOGIN~DE

:PEEK!

~

$\uparrow$N

~~~~ITS~530~~~PEEK~142~~~07/14/69~~~00:22:15

PARITY~ERRORS:~~DISK~=~~~11~~~CORE~=~~~0

MEMFR=267~USRMI=11~~~~~~~~~~~~~RNABLU=2

I=~U-JNAME~~STATUS~TTY~~~CORE~\%TIM

~0~SYS~~~~~~TYO~~~~T5~~~~~25~~0\%

~1~CORE~~~~~UUO~~~~?~~~~~~0~~~1\%

~3~~PEEK~~~~+GETSY~T4~~C~~5~~~3\%

10~MS~~~~~EOAMIC~~RUN~DISOWN~~20~91\%

USR~MEM=~60~~USR~TIM=~97\%

STIME~=~7:03:22~~LOUTIM~=~0~\\
~\\
~\\
~\\
?

~~~~ITS~530~~~PEEK~142~~~07/14/69~~~00:22:58

MODE~CONTROL:

~~D~~DISK~DIRECTORY

~~G~~AVAILABLE~.GETSYS'S

~~H~~MEMORY~GRAPH~(340~ONLY)

~~I~~AVAILABLE~IO~DEVICES

~~M~~MEMORY~USE~LIST

~~N~~NORMAL~MODE

~~T~~TRANSLATION~ENTRIES

~~U~~DEC~TAPE~STATUS

~~V~~SINGLE~USER~(PRECEDE~BY~INDEX)

~~X~~MULTIPLEXORS~MODE

~~Y~~DEC~TAPE~DIRECTORY~(PRECEDE~BY~\#)

~~?~~EXPLANATION~MODE

IO~CONTROL:

~~$\uparrow$B~USE~LINE~PRINTER

~~$\uparrow$E~STOP~USING~LINE~PRINTER

~~$\uparrow$Y~USE~340

~~$\uparrow$N~STOP~USING~340

OTHER:

~~P~~PROCEED~BUT~RETURN~TTY~TO~DDT

~~Q~~QUIT

~~Z~~SET~DOZE~IN~SECONDS

~~!~~STAND~ALONE~\\
~\\
Q~\\
~\\
\$$\uparrow$X.~\\
~\\
:LOCK!~\\
~\\
~LOCK.39~\\
~\\
$\leftarrow$?~\\
~\\
+~LOCK~TTY~(PRECEDE~BY~\#)

-~UNLOCK~TTY~(\char`\"{})

$\leftarrow$OUTPUT~CHARACTER~WITH~ASCII~VALUE~\#~(\char`\"{})

GUN~~KILL~USER~WITH~\#~INDEX~(\char`\"{})

I~~INITIALIZE~A~MODEL~37~TTY

KILL~~SYSTEM~DOWN~IN~\#~MINUES~(\char`\"{})

O~~OUTPUT~CHARACTERS~IN~OCTAL

P~~RETURN~TO~DDT

Q~~VALRET~AN~\$$\uparrow$X.

S~~COMPLEMENT~RUN~STATUS~OF~SYS~JOB

T~~TEST~CORE~ALLOCATOR

?~~LIST~COMMANDS~\\
~\\
$\leftarrow$Q~\\
~\\
\$$\uparrow$X.

:?

?~=~LIST~MODE~COMMANDS

DISOWN~=~DISOWN~CURRENT~JOB

LOGOUT~=~AUTO-EXPUNGE

SYMLOD~=~LOAD~SYMBOLS~ONLY

XFILE~=~EXECUTE~FILE~AS~DDT~COMMANDS

CR~=~ENTER~TECO~AND~CREATE~FILE

ED~=~ENTER~TECO~AND~EDIT

LOAD~=~LOAD~FROM~FOLLOWING~FILE~INTO~CURRENT~JOB

DUMP~=~DUMP~INTO~\char`\"{}~\char`\"{}~FROM~\char`\"{}~\char`\"{}

KILL~=~KILL~CURRENT~JOB

LOGIN~=~LOGIN~AS~FOLLOWING~NAME

SEND~=~SEND~MESSAGE

GAG~=~CONTROL~RECEIPT~OF~MESSAGES

BUG~=~DOCUMENT~BUG

MAIL~=~ADD~TO~USER'S~MAIL~FILE

JOB~=~CREATE~OR~SELECT~JOB

LISTJ~=~LIST~JOBS

FLAP~=~FLAP~DECTAPE,~FOLLOW~BY~DRIVE~\#

LISTF~=~LIST~FILES

DELETE~=~DELETE~FILE

PRINT~=~PRINT~FILE

LINK~=~CREATE~LINK

ERR~=~IOC~ERROR~STATUS

DDT~=~ENTER~DDT~MODE

MON~=~ENTER~MONITOR~MODE

START~=~START~INFERIOR

CONTIN~=~CONTINUE~GIVING~INF.~TTY

PROCED~=~PROCEDE~INF.,~LEAVE~TTY~WITH~DDT

WALLP~=~$\uparrow$B~TO~SPECIFIED~FILE~\\
~\\
:LOGOUT~\\
~\\
ITS~530~CONSOLE~4~FREE.~00:25:57















\end{lyxcode}

\end{document}
