%% 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 leve