DEC 10 OMCMA B DN1 DECsystem10 Monitor Calls

DEC-10-OMCMA-B-DN1 DECsystem10 Monitor Calls DEC-10-OMCMA-B-DN1 DECsystem10 Monitor Calls

User Manual: DEC-10-OMCMA-B-DN1 DECsystem10 Monitor Calls

Open the PDF directly: View PDF PDF.
Page Count: 436

DownloadDEC-10-OMCMA-B-DN1 DECsystem10 Monitor Calls
Open PDF In BrowserView PDF
~----

--,/

"".'

,.

r

i

!, '.

'f

.MONITOR' CALLS
(

•

i

\
1 .
';;,'

[

,

...:

".-'

,

,'~""

<

•

,>

~

",.""'-'"-<- . •

..

~.~--

.--""*:"-.-.. _----- .---.

.,

c-

'",

DEC-lO-OMCMA"B-D
DEC-lO-OMCMA-B-DNl

,(

I

(

(

MONITOR CALLS
This manual reflects the software of the
6.02 monitor.

I,

digital equipment corporation · maynard. massachusetts

First Printing, June 1971
Revised: January 1972
June 1972
March 1973
May 1974
November 1975
March 1976

(

The information in this document is subject to change without notice and should not be construed as a commitment by Digital Equipment Corporation. Digital Equipment Corporation assumes no responsibility for any errors
that may appear in this document.
The software described in this document is furnished under a license and may be used or copied only in accordance
with the terms of such license.
Digital Equipment Corporation assumes no responsibility for the use or reliability of its software on equipment
that is not supplied by DIGITAL.

(

Copyright 01971, 1972, 1973, 1974, 1975, 1976 by Digital Equipment Corporation

(

The postage prepaid READER'S COMMENTS form on the last page of this document requests the user's critical
evaluation to assist us in preparing future documentation.
The following are trademarks of Digital Equipment Corporation:

DIGITAL
DEC
PDP
DECUS
UNIBUS
COMPUTER LABS
COMTEX
DDT
DECCOMM

DECsystem-lO
DECtape
DIBOL
EDUSYSTEM
FLIP CHIP
FOCAL
INDAC
LAB-8
DECsystem-20

MASSBUS
OMNIBUS
OS/8
PHA
RSTS
RSX
TYPESET-8
TYPESET-l a
TYPESET-II

(

(

CONTENTS
Page

(

(

CHAPTER 1

1-1
1-1
1-1
1-2
1-2
1-2
1-2
1-2
1-19
1-19
1-19
1-19
1-19
1-19
1-20
1-20
1-20
1-20

CHAPTER 2

2-1
2-1
2-1
2-2
2-3
2-4
2-4

USER PROGRAMMING. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . ..
1.1
PROCESSOR MODES . . . . . ... . .. . .... . .. .. . . . .... . . ... .... . . . . .. . ..
1.1.1
User Mode Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.1.2
User I/O Mode Processing. . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . ..
1.1.3
Executive Mode Processing .........................................
1.2
MONITOR CALLS (PROGRAMMED OPERATORS) . . . . . • . . . . . . .. . . . . . . . . ..
1.2.1
Op Codes 001-037 ......... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.2.2
Op Codes 040-100 and 000 .........................................
1.2.2.1
Physical Only . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.2.2.2
Restriction on Monitor Calls in Programs .............................. ,
1.2.3
Operation Codes 100-127. . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . ..
1.2.4
Illegal Operation Codes ............................................
1.2.5
Naming Convention for Monitor Symbols. . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.2.5.1
Symbols for Numbers .............................................
1.2.5.2
Symbols for Masks. . . ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.2.5.3
Symbols for Monitor Calls. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
1.2.5.4
Symbols for GETTAB Tables ..................... , . . . . . . . . . . . . . . . . ..
1.2.5.5
Symbols for Error Codes ...........................................

MEMORY FORMAT ...... ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
2.1
USER PROGRAMS ..................................................
2.2
MEMORY PROTECTION AND RELOCATION
. . . . . . . . . . . . . . . . . . . . . . . . ..
2.2.1
The KA10 Processor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
2.2.2
The KIlO and KLlO Processors (Without Virtual Memory) . . . . . . . . . . . . . . . ..
2.2.3
KIlO and KLl 0 Processors With the Virtual Memory Option. . . . . . . . . . . . . . ..
2.2.3.1
Virtual Memory Organization .......................................

CHAPTER 3

JOB DATA AREA ..................................................
JOBDAT (JOB DATA AREA) ..........................................
VESTIGIAL JOB DATA AREA .... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

3-1
3-1
3-5

JOB CONTROL AND INFORMATION ..................................
4.1
JOB CONTROL
........................ " ........................
4.1.1
Start Program Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
4.1.2
Stop Program Execution .......................................... "
4.1.2.1
The HALT Instruction ........................................... "
4.1.2.2
The EXIT Monitor Call (CALLI 12) ..................................
4.1.2.3
The LOGOUT Monitor Call (CALLI 17) ...............................
4.1.3
Suspend the Execution Of A Job. . . . . . .. . . . . . . . . . . . . . . . . . .. . . . . . . . . ..
4.1.3.1
The SLEEP Monitor Call (CALLl31) .................................
4.1.3.2
The HIBERnate Monitor Call (CALLI 72) .............................
4.1.3.3
The WAKE Monitor Call (CALLI 73) .................................
4.2
SET OR OBTAIN JOB INFORMATION .................................
4.2.1
Set the Program Name ............................................
4.2.2
Set System/Job Parameters .........................................
4.2.3
Set the Logical Node ..............................................
4.2.4
Obtain Run Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
4.2.5
Obtain the Job Number of the Calling Job. . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

4-1
4-1
4-1
4-1
4-1
4-2
4-2
4-2
4-2
4-3
4-3
4-4
4-4
4-5
4-8
4-9
4-9

3.1
3.2

CHAPTER 4

(

iii

June 1976

CONTENTS (Cont.)
Page
4.2.6
4.2.7
4.3
4.3.1
4.3.2
4.3.3
4.4
4.4.1
4.4.2
4.4.3
4.5
4.5.1
4.5.2
4.5.3
4.6
4.6.1
CHAPTER 5
5.1
5.2
5.3
5.3.1
5.3.2
5.3.3
5.3.4
5.3.5
5.3.6
5.3.7
5.3.8

Obtain the Project-Programmer Number of the Calling Job . . . . . . . . . . . . . . .
The OTHUSR Monitor Call (CALLI 77) . . . . . . . . . . . . . . . . . . . . . . . . . . .
TIMING INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The DATE Monitor Call (CALLI 14) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The MSTIME Monitor Call (CALLI 23) . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TIMER Monitor Call (CALLI 22) . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
CONFIGURATION INFORMATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The SWITCH Monitor Call (CALLI 20). . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The LIGHTS Monitor Call (CALLI -1) ............................
The DAEMON Monitor Call (CALLI 102) . . . . . . . . . . . . . . . . . . . . . . . . .
MONITOR EXAMINATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The PEEK Monitor Call (CALLI 33) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The SPY Monitor Call (CALLI 42) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The POKE Monitor Call (CALLI 114) . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
INTER-PROGRAM COMMUNICATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The TMPCOR Monitor Call (CALLI 44) . . . . . . . . . . . . . . . . . . . . . . . . . . .

TRAPPING, INTERCEPTION, AND INTERRUPTION. . . . . . . . . . . . . . . . . .. 5-1
USER TRAP SERVICING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-1
ERROR INTERCEPTING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-2
SOFTWARE INTERRUPT SYSTEM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
Interrupt Conditions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
Interrupt Control Block. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-8
Initialize the Software Interrupt System . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-8.1
Control the Software Interrupt System. . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-9
Save the Interrupt Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-11
Reload the Saved State of the Interrupt System. . . . . . . . . . . . . . . . . . . . . .. 5-12
Dismiss an Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 5-12
An Example of the Software Interrupt System . . . . . . . . . . . . . . . . . . . . . . . 5-12

CHAPTER 6
CORE AND SEGMENT CONTROL. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1
CORE CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.1
Definitions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.2
The LOCK Monitor Call (CALLI 60) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1.2.1
The LOCK Monitor Call Extension . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.2.2
Minimizing Fragmentation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.3
The UNLOK.Monitor Call (CALLI 120) . . . . . . . . . . . . . . . . . . . . . . . . . "
6.1.4
The CORE Monitor Call (CALLI 11) . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.5
The SETUWP Monitor Call (CALLI 36) . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.6
The PAGE. Monitor Call (CALLI 145) . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Page Fault Handling. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.1.6.1
6.1.6.2
Format of the Page Fault Handler . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
SEGMENT CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2
The RUN Monitor Call (CALLI 36) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2.1
6.2.1.1
Programming with the RUN Monitor Call. . . . . . . . . . . . . . . . . . . . . . . . . ..
6.2.2
The GETSEG Monitor Call (CALLI 40) . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2.3
The REMAP Monitor Call (CALLI 37). . . . . . . . . . .. . . . . . . . . . . . . . . . ..
6.2.4
Testing for a Sharable High Segment . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2.5
Determining the High Segment Origin . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
6.2.6
Modifying Shared Segments and Meddling . . . . . . . . . . . . . . . . . . . . . . . . .

June 1976

4-9
4-10
4-10
4-11
4-11
4-11
4-11
4-11
4-11
4-12
4-13
4-13
4-14
4-14
4-14
4-14

iv

6-1
6-1
6-1
6-1
64.1
6-7
6-8
6-8
6-10
6-11
6-14
6-15
6-16
6-16
6-18
6-18
6-19
6-20
6-21
6-21

(

(
\

CONTENTS (Cont.)
Page

(

(

(

(

CHAPTER 7
I/O PROGRAMMING. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . ..
7.1
JOB INITIALIZATION ...............................................
7.2
DEVICE SELECTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.1
Device Initialization. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.2
Device Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.2.1
File Structure Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.2.2
Logical Unit Names ...............................................
7.2.2.3
Physical Controller Class Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.2.4
Physical Controller Names ..........................................
7.2.2.5
Physical Unit Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.2.2.6
Name Abbreviations ....................................... _. . . . . ..
7.3
DATA MODES ......................................................
7.3.1
Unbuffered Data Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.3.2
Buffered Data Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.3.2.1
Buffered Input .......... '" ................... , ..................
7.3.2.2
Buffered Output. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.3.2.3
Synchronization of Buffered I/O .....................................
7.3.3
Buffer Structure. . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . ..
7.3.3.1
Buffer Ring Header Block .................... ~ . .. . .. . .. .. . . . .... .. ..
7.3.3.2
BufferRing .......................................................
7.3.3.3
Monitor Generated Buffers. . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
7.3.3.4
User Generated Buffers. . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. . . . . . . . . ..
7.3.4
Non-Blocking I/O ..................... " . . . . . . . . . . . . . . . . . . . . . . . . ..
DEVICE TERMINATION AND REASSIGNMENT .................... ,. ....
7.4
RELEASE a Devise. . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . ..
7.4.1
7.4.2
The RESDV. Monitor Call (CALLI 117) ..............................
7.4.3
The REASSIGN Monitor Call (CALLI 21) ...... '" ....................
7.4.4
The DEVLNM Monitor Call (CALLI 107) ..................... . . . . . . ..
7.5
DEVICE INFORMATION .................... , ........ '" .. ... .. ......
7.5.1
The DEVSTS Monitor Call (CALLI 54) . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . ..
7.5.2
The DEVCHRMonitor Call (CALLI 4) ................................
7.5.3
The DEVTYP Monitor Call (CALLI 53). . . . . . . . . . . . . . . . . . . . . . .. . . . . . . ..
7.5.4
The DEVSIZ Monitor Call (CALLI 101) ...............................
7.5.5
The WHERE Monitor Call (CALLI 63) ................................
7.5.6
The NODE Monitor Call (CALLI 157)..................................
7.5.7
The DEVNAM Monitor Call (CALLI 64). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

7-1
7-1
7-2
7-3
7-4
7-5
7-5
7-5
7-5
7-5
7-5
7-6
7-6
7-9
7-9
7-9
7-10
7-10
7-10
7-11
7-12
7-12
7-13
7-13
7-13
7-13
7-14.1
7-14.1
7-15
7-15
7-15
7-16
7-16
7-19
7-19
7-21

CHAPTER 8
8.1
8.2
8.2.1
8.2.2
8.2.3
8.3
8.4
8.4.1
8.4.2
8.5
8.5.1
8.6
8.6.1
8.6.1.1

8-1
8-1
8-1
8-1
8-4
8-5
8-5
8-6
8-6
8-7
8-8
8-8
8--10
8-10
8-10

FILES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
FILE DEFINITION .......... ; . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
STRUCTURE OF DISK FILES.. . . . .. . .. . . . . . .. . ... ..... .. .. . . . .. .. . ...
File Directories. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Job Search List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Storage Allocation Table (SAT) Blocks ................................
DISK FILE FORMAT. . . .. .. . . .. . . . . . .. . .... . ... . .. ... . . .. ... . .. . .. ..
ACCESS PROTECTION ..............................................
File Access Privileges ..............................................
Directory Privileges ...............................................
FILE NAMES .......................................................
The RENAME Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
FILE SELECTION ..................................................
LOOKUP/ENTER A File ................ " . . . .. ....... .. .... . .. ....
The LOOKUP Operator ............................................

v

June 1976

I

I

(

CONTENTS (Cont.)
Page
The ENTER Operator ..........................................
Extended Arguments to LOOKUP, ENTER and RENAME ................
Error Recovery for ENTER and RENAME Monitor Calls .................
Non-Superseding ENTER .........................................
Data Transmission. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The FILOP. Monitor Call (CALLI 155). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THE PATH. MONITOR CALL (CALLI 110) .. . . . . . . . . . . . . . . . . . . . . . . . . . . .
PATH. Examples ...............................................
USETI AND USETO Operators.... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THE SEEK MONITOR CALL (CALLI 56) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THE CHKACC MONITOR CALL (CALLI 100) ...........................
THE STRUUO MONITOR CALL (CALLI 50) ............................
THE JOBSTR MONITOR CALL (CALLI 47) ............................
.
1
THE GOBSTR MONITOR CALL (CALLI 66) ............................
THE SYSSTR MONITOR CALL (CALLI 46) ............................
THE SYSPHY MONITOR CALL (CALLI 51) ............................
THE DEVPPN MONITOR CALL (CALLI 55) ............................
THE DSKCHR MONITOR CALL (CALLI 45) ............................
THE DISK. MONITOR CALL (CALLI 121) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
FILE STATUS. . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The GETSTS Operator .... . . . . . . . . . . . . . . . . .. . .. ..................
The STATOjSTATZ Operators. .. ......... . . . . . . . . . . . . . . . . . . . . . . . . .
The SETSTS Operator ............. . .......... ... ..............
TERMINA TE A FILE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8-11
8-13
8-21
8-21
8-21
8-22
8-22.2
8·25
8-27
8-29
8-30
8-32
8-32
8-33
8-33
8-34
8-34
8-36
8-39
8-41
8-42
8-43
8-43
8-44

CHAPTER 9
9.1
9.2
9.2.1
9.2.2
9.3
9.3.1
9.3.2
9.3.3
9.4
9.4.1
9.4.2
9.4.3
9.4.4
9.5
9.5.1
9.5.2
9.5.3
9.5.4
9.5.5
9.5.6
9.6
9.7

I/O PROGRAMMING FOR DECTAPE . . . . . . . . . . . .. .. . . . . .. . . . . . . . . . . .. .
DECT APE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
DATA MODES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Buffered Data Modes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Unbuffered Data Modes ..........................................
DEC TAPE FORMAT................. ............ ....... ....... .....
DECtape Directory Format ........................................
DEC tape File Format ............................................
Block Allocation ................................................
I/O PROGRAMMING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The LOOKUP Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The ENTER Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The RENAME Operator. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The INPUT, OUTPUT, CLOSE, RELEASE Operators. . . . . . . . . . . . . . . . . . . .
SPECIAL MONITOR CALLS .........................................
The USETI Operator ............................................
The USETO Operator ............................................
The UGETF Operator ............ . .......... ... ................
The UTPCLR Monitor Call .......................................
The MTAPE Operator ............................ '" ...........
The DEVSTS Monitor Call After Each Interrupt. . . . . . . . . . . . . . . . . . . . . . . .
FILE STATUS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IMPORTANT CONSIDERATIONS. . .. .. . . . . . . . . .. . . . . . . . . . . . . .. . . . . . . .

9-1
9-1
9-1
9-1
9-2
9-2
9-2
9-4
9-5
9-5
9-5
9-7
9-7
9-8
9-9
9-9
9-9
9-9
9-9
9-9
9-9
9-9
9-11

CHAPTER 10
10.1

I/O PROGRAMMING FOR MAGNETIC TAPE ...................... __ . __
DATA MODES ........ " . . .. . . . . . . . . .. .. . . . . . . .. .. .. . . . . . . . . .. . . ..

10-1
10-2

8.6.1.2
8.6.1.3
8.6.1.4
8.6.1.5
8.6.2
8.6.2.1
8.7
8.7.1
8.8
8.9
8.10
8.11
8.12
8.13
8.14
8.15
8.16
8.17
8.18
8.19
8.19.1
8.19.2
8.19.3
8.20

June 1976

vi

(

(
\

(

(

CONTENTS (Cont.)

(

Page
SPECIAL MONITOR CALLS FOR MAGNETIC TAPE ...................... -10-3
10.2
The MTAPE Operator ......................................... 10-3
10.2.1
Function 11, Rewind and Unload. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-4
10.2.1.1
10.2.2
The MTCHR. Monitor Call (CALLI 112) . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-5
10.2.2.1
Nine-Channel Tapes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-6.1
10.2.3
The TAPOP. Monitor Call (CALLI 154). . . . . . . . . . . . . . . . . . .. . . . . . . . . . .. 10-6.1
10.2.3 .1
Function .TFMOD (Data Modes) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-11
10.2.3.2
Read Backwards (TX01 Only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-12
10.2.4
The MTAID. Monitor Call (CALLI 126).. ......... ................... 10-12
10.3
FILE STATUS
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. 10-12

CHAPTER 11

(

(

11.1
11.2
11.2.1
11.2.1.1
11.2.2
11.2.3
11.2.4
11.3
11.4
11.5
11.6
1l.7
1l.7.1
1l.7.2
1l.7 .3
1l.7.4
11.7.4.1
1l.7.4.2
1l.7 .4.3
11.7.4.4
1l.7.4.5

I/O PROGRAMMING WITH TERMINALS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
INTRODUCTION. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
TERMINAL MONITOR CALLS. . . . . . . . . . . . . . . . . .. . . . . . . . . . . . . . . . . . . ..
The TTCALL Operator .......... . .......... ... .................
TTCALL Examples .......................................... '.' . ..
The GET LIN Monitor Call (CALLI 34) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The TRMNO. Monitor Call (CALLI 115) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The TRMOP. Monitor Call (CALLI 116) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
DATA MODES
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
FILE STATUS
..................................................
PAPER-TAPE INPUT FROM THE TERMINAL (FULL-DUPLEX SOFTWARE) ..
PAPER-TAPE OUTPUT AT THE TERMINAL (FULL-DUPLEX SOFTWARE) ..
PSEUDO-TTYS (PTYs) ................................. .............
Concepts
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The HIBER Monitor Call (CALLI 72) ................................
..................................................
File Status
Special Monitor Calls .............................................
The OUT, OUTPUT Operators (Op Codes 57 and 67). . . . . . . . . . . . . . . . . . . ..
The IN, INPUT Operators (Op Codes 56 and 66) . . . . . . . . . . . . . . . . . . . . . . ..
The RELEASE Monitor Call (Op Code 71). . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The JOBSTS Monitor Call (Op Code 61) . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
The CTLJOB Monitor Call (CALLI 65) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

CHAPTER 12

I/O PROGRAMMING WITH UNIT RECORD DEVICES.....................
12.1
THE CARD PUNCH (CDP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.1.1
Data Modes and Buffer Zones ......................................
12.1.2
Monitor Calls ..................................................
12.1.3
File Status
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2
THE CARD READER (CDR) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.1
....' ............................................ "
Data Modes
12.2.1.1
ASCII, Octal Code 0 .............................................
12.2.1.2
ASCII Line, Octal Code 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.1.3
Image, Octal Code 10 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.1.4
Image Binary, Octal Code 13 ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.1.5
Binary, Octal Code 14. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.1.6
Super-Image, Code 110 2 ....... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.2.2
Monitor Calls ..................................................
12.2.3
..................................................
File Status
12.3
DISPLA Y WITH LIGHT PEN .........................................
12.3.1
Data Modes
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
12.3.2
Background
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
vii

11-1
11-1
11-1
11-1
11-3
11-4
11.5
11-5
11-9
11-12
11-13
11-13
11-14
11-14
11-15
11-15
11-16
11-16
11-16
11.16
11-16
11-17
12-1
12-2
12-2
12-2
12-3
12-4
12-4
12-4
12.4
12-4
12-4
12-4
12-4
12-4
12-5
12-6
12-6
12-6

June 1976

(

CONTENTS (Cont.)
Page

12.3.3
12.3.3.1
12.3.3.2
12.3.4
12.4
12.4.1
12.4.1.1
12.4.1.2
12.4.1.3
12.4.2
12.4.3
12.5
12.5.1
12.5.1.1
12.5.1.2
12.5.1.3
12.5.1.4
12.5.1.5
12.5.2
12.5.3
12.6
12.6.1
12.6.1.1
12.6.1.2
12.6.1.3
12.6.1.4
12.6.1.5
12.6.2
12.6.3
12.7
12.7.1
12.7.1.1
12.7.1.2
12.7.1.3
12.7.1.4
12.7.1.5
12.7.2
12.7.3

CHAPTER 13
13.1
13.1.1
13.2
13.3
13.4
13.4.1
13.4.2
13.4.3
13.4.4
13.4.5
13.4.6
June 1976

Display Monitor Calls ........................................... .
The INPUT Operator .......................................... .
The OUTPUT Operator .•.......... , ............................ .
File Status
..................................................
LINE PRINTER ................................................. .
Data Modes
................................................ .
ASCII, Octal Code 0 ........................................... .
ASCII Line, Octal Code 1 ........................................ .
Image, Octal Code 10 ........................................... .
Monitor Calls ................................................ .
.................................................. .
File Status
THE PAPER-TAPE PUNCH ........................................ .
................................................ .
Data Modes
ASCII, Octal Code O.••.••••••••.••••••.•.••.•.••••••••.•••••••••
ASCII Line, Octal Code 1 ........................................ .
Image, Octal Code 10 .......................................... .
Image Binary, Octal Code 13 ..................................... .
Binary, Octal Code 14 .......................................... .
Monitor Calls ................................................ .
File Status
................................................ .
THE PAPER·TAPE READER ....................................... .
Data Modes ................................................ .
ASCII, Octal Code 0 ........................................... .
ASCII Line, Octal Code 1 ........................................ .
Image, Octal Code 10 ........................................... .
Image Binary, Octal Code 13 ..................................... .
Binary, Octal Code 14 .......................................... .
Monitor Calls ................................................ .
File Status
PLOTTER
Data Modes
................................................ .
ASCII, Octal Code O•...••.•.•.•••••.•••.••••••••••••...•.•.•••••
ASCII Line, Octal Code 1 ....................................... .
Image, Octal Code 10 ......................................... .
Image Binary, Octal Code 13 ..................................... .
Binary, Octal Code 14 ........................................... .
Monitor Calls ................................................ .
File Status

12-6
12-6
12-6
12-8
12-9
12-9
12·9
12-9
12-9
12·9
12-9
12·10
12·10
12-10
12·10
12-10
12-10
12·10
12·10
12·10
12·11
12-11
12-11
12-11
12·11
12-11
12·11
12·11
12·11
12-13
12-13
12·13
12·13
12-13
12·13
12·13
12·13
12·13

THE MULTIPLEX CHANNEL FEATURE .............................
BUFFER RING EXTENSION .......................................
Device Chains ................................................
................................................
DATA MODES
DEVICE IDENTIFICATION ...................................... "
MPX MONITOR CALLS ...........................................
The CNECT. Monitor Call (CALLI 130) .............................
The ERLST. Monitor Call (CALLI 132) .............................
The SENSE. Monitor Call (CALLI 133) .............................
The CLRST. Monitor Call (CALLI 134) .............................
The IONDX. Monitor Call (CALLI 127) ............................
. The MVHDR. Monitor Call (CALLI 131) ............................

13·1
13-1
13·2
13·2
13·2
13-2
13·2
13·3
13-4
13·5
13-6
13-6

viii

.
.
.
.
.
.
.
.
.
.
.
.

(

(

c

CONTENTS (Cont.)
Page

(

CHAPTER 14
14.1
14.1.1
14.1.2
14.1.3
14.1.4
14.2
14.2.1
14.2.2

REAL-TIME PROGRAMMING. . . . .. . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .
THE RTTRPMONITOR CALL (CALLI 57) . . . . . . . . . . .. . . . . . . . . . . .. . . . . .
Interrupt Level Use of RTTRP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restrictions ...................................................
Removing Devices from a Priority Interrupt Channel. . . . . . . . . . . . . . . . . . . .
Dismissing the Interrupt. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
THE TRPSET MONITOR CALL (CALLI25) . . . . . . . . . . . . . . . . . . . . . . . . . . . .
The UJEN Operator (Op Code 100)
...............................
The HPQ Monitor Call (CALLI 71) .................................•

14-1
14-1
14-4
14-4
14-5
14-5
14-5
14-7
14-7

CHAPTER 15
15.1
15.1.1
15.1.2
15.1.3
15.1.4
15.1.5
15.1.6
15.1.7
15.2
15.3
15.4
15.5
15.6
15.7
15.8
15.9

INTER-PROCESS COMMUNICATION FACILITY .......................
PACKETS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flags ........................................................
PIDs .............................................. ". . . . . . . . . .
Length of the Packet Data Block ..... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Address of the Packet Data Block .................................. ;
Sender's Project-Programmer Number. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Capabilities of Sender. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Packet Data Block ..............................................
SENDING A PACKET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
RECEIVING A PACKET ...........................................
[SYSTEM] INFO .................................................
[SYSTEM] ICPP .................................................
STATUS OF AN INPUT QUEUE
. . . . . . . .. . . . . . . . . . . . . . . . . . . . . . . . .. .
RETRIEVE AN IPCF PACKET. . . . . . . . . . . . . ... . . . . .. . . . . . . . . . . . . .. .. .
SEND AN IPCF PACKET. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
IPCF EXAMPLE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15-1
15-1
15-1
15-1
15-4
15-4
15-5
15-5
15-5
15-5
15-6
15-6
15-7
15-10
15-11
15-11
15-13

ENQUEUE/DEQUEUE FACILITY ...................................
CHAPTER 16
OVERVIEW OF ENQUEUE/DEQUEUE. .. . .. . . . . . . . . . .. . . . . . .. . . . . . . . .
16.1
Shared Ownership and Exclusive Ownership ..........................
16.1.1
Pooled Resources ........................ :.....................
16.1.2
Sharer's Group. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.1.3
ENQUEUE/DEQUEUE MONITOR CALLS ........................ ·····
16.2
The ENQ. Monitor Call (CALLI 151) .......... , . . . . . . . . . . . . . . . . . . .. .
16.2.1
The DEQ. Monitor Call (CALLI 152). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
16.2.2
The ENQC. Monito'r Call (CALLI 153) ..............................
16.2.3
Status Information .............................................
16.2.3.1
Modifying the Queue Structure ............................. . . . . . .
16.2.3.2

16-1
16-1
16-1
16-2
16-4
16-5
16-5
16-7
16-9
16-9
16-11

CHAPTER 17
17.1
17.2
17.3
17.4
17.5

METERING .....................................................
OVERVIEW OF METERING ........................................
METER POINT ROUTINES ........................................
...................................
USING THE TRACE CHANNEL
ADDING A METER POINT
.......................................
THE METER. MONITOR CALL (CALLI 111) . . . . . . . . . . . . . . . . . . . . . . . . . . .

17-1
17-1
17-2
17-2
17-3
17-4

CHAPTER 18

GETTABS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

18-1

APPENDIX A

COMPARISON OF DISK DEVICES.. . . . . . . . . . . . . . . .. . . . .. . . . . . . . . . . . .

A-I

APPENDIX B

COMPARISON OF MAGNETIC TAPE SYSTEMS. . . . . . . . . . . . . . . . . . . . . . . .

B-1

ix

June 1976

(

CONTENTS (Cont.)
Page
APPENDIX C

CARD AND TAPE CODES ......................................... .

C-I

...................................

D-I

APPENDIXD

COMPARISON OF TERMINALS

APPENDIXE

ERROR CODES

••••••••••••••••

• • • •0

•••••••••••••••••••••••••••••

E-I

APPENDIXF

DECSYSTEM-1O AT-A-GLANCE ....................................

F-I

APPENDIXG

MEMORIES

G-I

APPENDIXH
H.l
H.l.l
H.2

FILE RETRIEVAL POINTERS .....................................
A GROUP POINTER .............................................
Folded Checksum Algorithm .....................................
END-OF-FILE POINTER ..........................................
CHANGE OF UNIT POINTER ......................... " ..........
DEVICE DATA BLOCK ..........................................
ACCESS BLOCK ................................................

H.3
HA
H.5

....................................................

.
.
.
.
.
.
.

H-I
H-I
H-I
H-I
H-2
H-2
H-2

APPENDIX I

DATA COMMUNICATIONS ............................. " ........ .

I-I

APPENDIXJ

UUOSYM.MAC ................................................. .

J -1

APPENDIXK

2741 TERMINALS .............................................. .

K-I

INDEX .......................................................................... Index-1

(

FIGURES
Page
FIGURE

I
June 1976

2-1
2-2
2-3
5 -1
5-2
5-3
6-1
7 -1
7-2
8-1
8-2
8-3
8-4
8-5
8-6
8-7
8-8
8-9
9-1
9-2
9-3
9-4
10-1
11-1
13-1

KAIO User Address Relocation ...................................... .
KIl O/KLl 0 Paging Coqfiguration (Without Virtual Memory) .............. .
Physical and Virtual Page Limits ..................................... .
Software Interrupt Process ......................................... .
Interrupt Control Block ........................................... .
Saved Status Block Structure ........................................ .
Locking Jobs in Core .............................................. .
Buffer Ring Header Block .......................................... .
Buffer Structure ................................................. .
Basic Disk File Organization for Each File Structure ....................... .
Disk File Organization ............................................. .
Access Protection Code ............................................ .
ENTER Argument Block .......................................... .
FILOP. Argument Block ........................................... .
PATH. Argument Block ........................................... .
Directory Paths on a Single File Structure ............................. .
Directory Paths on Multiple File Structures ............................. .
DISK. Priority Level .............................................. .
DECtape Directory Format ......................................... .
Format of a File on a DECtape ...................................... .
Format of a DECtape Block ........................................ .
LOOKUP/ENTER/RENAME Argument Block .......................... .
Data Word on Tape ............................................... .
Pseudo-TTY ................................................... .

2-2
2-3
2-5
5-6
5-8
5-11
6-4.1
7 -11
7-11
8-2
8-3
8-7
8-12
8-22
8-22.2
8-26
8-26
8-40
9-3
9-5
9-5
9-6
10-6.1
11-14

MPX Buffer Ring Header Block ...................................... .

13-1

x

(

(

FIGURES (Cont.)
Page

FIGURE

(

13-2
15-1
15-2
15-3
15-4
15-5
15-6
16-1
16-2
16-3
16-4
16-5
16-6
16-7
17-1
K-1

Status Block Entry ............................................... .
Representation of an IPCF Packet ................................... .
Request to [SYSTEM] INFO ................ ' ....................... .
[SYSTEM] INFO Response Format .................................. .
Request to [SYSTEM] IPCC ........................................ .
Response from [SYSTEM] IPCC ..................................... .
An Associated Variable ............................. : .............. .
Shared Ownership ................................................ .
Shared and Exclusive Ownership Requests .............................. .
Exclusive Ownership ..................... , ........................ .
Pooled Resources ................................................ .
ENQ. Argument Block ............................................ .
Lock·Block Dump ................................................ .
Queue·Block Dump .............................................. .
Metering ....................................................... .
Model 2741 Keyboard ............................................ .

13-5
15-2
15-6
15-8
15-8
15-10
15-11
16-2
16-3
16-3
16-4
16-5
16-12
16-12
17-1
K-1

I

TABLES
Page

(

(

(

TABLE

1-1
1-2
2-1
3-1
3-2
4-1
4-2
4-3
4-4
5-1
5-2
5-3
5-4
5-5
5-6
5-7
5-8
5-9
6-1
6-2
6-3
6-4
6-5
6-6
6-7
6-8
7-1
7-2
7-3

Op Codes 040-100 ................................................. .
CALLis/Monitor Calls ........... : ................... _............. .
VM Abbreviations ................................................ .
Job Data Area Locations ........................................... .
Vestigial Job Data Area Locations .................................... .
HIBERnate Conditions ............................................ .
SETUUO Functions .............................................. .
DAEMON Functions ............................................. .
DAEMON Error Codes ............................................ .
APRENB Flags .................................................. .
Error Intercepting Class Bits ........................................ .
I/O Interrupt Conditions .......................................... .
Non-I/O Interrupt Conditions ....................................... .
Control Flags .................................................... .
Argument Block Flags ............................................ .
PISYS. Error Codes .............................................. .
PISAV. Error Codes ............................................... .
PIRST. Error Codes ......................................... _.... .
LOCK Bits ...................................................... .
LOCK Error Codes ................................................ .
LOCK Extension Functions .......................................... .
Values Returned from CORE ........................................ .
PAGE. Functions ................................................. .
Bits Returned from Function .PAGCA ................................. .
PAGE. Error Codes ................................................ .
Page Fault Word ................................................. .
Non-Directory Devices ............................................. .
OPEN Status Bits ................................................ .
Format of Device Names ........................................... .
xi

1-3
1-6
2-5
3-1
3-6
4-4
4-5
4-12
4-13
5-2
5-3
5-7
5-8.1
5-9
5-10
5-10
5-11
5-12
6-2
6-3
6-7
6-9
6-11
6-13
6-14
6-15
7·2
7-4
7-4

June 1976

I

TABLES (Cont.)

(
Page

TABLE

I

I

June 1976

7-4
7-5
7-6
7-7
7-8
7-9
7-10
7-11
8-1
8-2
8-3
84
8-5
8-6
8-7
8-8
8-9
8-10
8-11
8-12
8-13
8-14
8-15
8-16
8-17
8-18
9-1
9-2
9-3
9-4
9-5
10-1
10-2
10-3
10-4
10-5
10-6
11-1
11-2
11-3
114
11-5
11-6
11-7
12-1
13-1
13-2
13-3
13-4
13-5
14-1

Physical Disk Unit Names ...........................................
Data Modes .. , .................................................. ,
DEVLNM Error Codes ............................................. ,
Device Characteristics ..............................................
Device Type Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
DEVSIZ Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
NODE Function Codes ..............................................
NODE Error Codes ..... .' ............................................
Access Protection Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Access Privileges to UFDs and SFDs .......... _ . . . . . . . . . . . . . . . . . . . . . . ..
LOOKUP Argument Block ..........................................
Extended Arguments to ENTER, LOOKUP, and RENAME ..... , ...........
.RBSTS Bit Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
FILOP. Function Codes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
PATH. Function Codes ..................................... " ., ... ,
PATH. Switches and Flags ..........................................
USETI/USETO Function Codes ......................................
CHKACC Access Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
JOB/GOBSTR Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
GOBSTR Error Codes ............................................. ,
Ersatz Devices ...................................................
DSKCHR Argument Block ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
DSKCHR Status Bits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
DISK. Function Codes .............................................
DISK. Error Codes ................................................
Disk File Status Bits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
DECtape Devices ............•....................................
Format of Words 105 - 126 in the DECtape Directory Block . . . . . . . . . . . . . . ..
LOOKUP Parameters ..............................................
ENTER Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
RENAME Parameters. .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Magnetic Tape Data Modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
MTAPE Functions .........•......................................
MTCHR. Returned Values ..........................................
Values Returned to the AC After MTCHR. .............................
TAPOP. Function Codes ...........................................
TAPOP. Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Terminals .......................................................
TTCALL Functions ...............................................
Terminal Line Characteristics .......................................
TRMOP. Function Codes ...........................................
Transmit/Receiving Speeds . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
TRMOP. Error Codes ..............................................
JOB Status Bits ................................................. .
Summary of Some Non-Directory Devices ............................. .
CNECT. Operation Codes .......................................... .
CNECT. Error Codes ............................................. .
ERLST. Error Codes ............................................. .
SENSE. Error Codes
CLRST. Error Codes
RTTRP Error Codes ................ .
xii

7-6
7-7
7 -15
7-17
7-18
7-19
7-19
7-21
8-6
8-8
8-11
8-14
8-20
8-22.1
8-23
8-23
8-28
8-31
8-32
8-34
8-35
8-37
8-38
840
841
842
9-1
9-3
9-6
9-7
9-8
10·2
10-3
10-5
10-6
10-7
10-10
11-1
11-2
114
11-6
11-9
11-9
11-17
12-1
13-3
13-3
134
13-5
13-6
14-3

(

(

(

(

TABLES (Cont.)

(
TABLE

(

(

18-16
18-17
18-18
18-19
18-20
18-21
18-22
18-23
18-24
18-25
18-26
18-27

Packet Flags .....................................................
IPCF Capabilities of a Sender . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
[SYSTEM] INFO Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
[SYSTEM] IPCC Functions .........................................
IPCF Error Codes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
ENQ. Function Codes ............................ :. . . . . . . . . . . . . . . ..
DEQ. Function Codes ............................................ "
Current State of Resource. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
ENQC. Function Codes ............................................
ENQC. Flags ....................................................
Enqueue/Dequeue Error Codes ...................................... .
METER. Function Codes .......................................... .
METER. Error Codes ............................................. .
GETTAB Tables ................................................. .
Privilege Table (.GTPRV, GETTAB Table Number 6) .................... .
Configuration Table (.GTCNF, GETTAB Table Number 11) ............... .
System State Bit Settings (Item Number 17 in GETTAB Table Number 11) .... .
Non-swapping Data Table (.GTNSW, GETTAB Table Number 12) ........... .
Swapping Data Table (.GTSDT, GETTAB Table Number 13) ............... .
ONCE-ONLY Disk Parameters (.GTODP, GETTAB Table Number 15) ........ .
LEVEL-D Parameters (.GTLVD, GETT AB Table Number 16) .............. .
GETTAB Immediate Word Entries (.GTSLF, GETTAB Table Number 23) ..... .
Spooling Control Table (.GTSPL, GETTAB Table Number 36) ............. .
Time and Batch Status Table (.GTLIM, GETT AB Table Number 40) ......... .
Hardware Status After a Crash (.GTCRS, GETTAB Table Number 44) ........ .
System Wide Data Table (.GTSYS, GETTAB Table Number 51) ............ .
CPUO Control Data Block Constants Table (.GTCOC, GETT AB Table
Number 55) ........................................ , ............ .
CPUO Control Data Block Variable Table (.GTCOV, GETTAB Table
Number 56) .................................................... .
Response Sub table ............................................... .
Parity Sub table .................................................. .
Feature Table (.GTFET, GETTAB Table Number 71) ..................... .
Scanner Table (.GTSCN, GETTAB Table Number 73) .................... .
SEND-ALL Text (.GTSND, GETTAB Table Number 74) .................. .
IPCF Miscellaneous Data (.GTlPC, GETTAB Table Number 77) ............. .
IPCF Statistics Per Job (.GTlPA, GET TAB Table Number 104) ............. .
IPCF Flags and Quotas (.GTlPQ, GETTAB Table Number 107) ............. .
General Virtual Memory Data (.GTVM, GETTAB Table Number 113) ........ .
Scheduler Statistics (.GTSST, GETTAB Table Number 115) ............... .
Special PID Table (.GTSID, GETTAB Table Number 126) ................. .
ENQ./DEQ. Statistics (.GTENQ, GETTAB Table Number 127) ............. .

A-I
B-1
C-l
C-2
D-l
E-l
F-l
G-l
I-I
K-l
K-2

Disk Devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
Magnetic Tape Systems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..
ASCII Card Codes ................................................
ASCII Codes and BCD Equivalents ................................... ,
Terminals .......................................................
Error Codes .....................................................
DECsystem-10 ...................................................
Core Memories ...................................................
Communication Systems ...........................................
Conversion of Characters ...........................................
Model 2741 Typing Elements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ..

15-1
15-2
15-3
15-4
15-5
16-1
16-2
16-3
16-4
16-5
16-6
17-1
17-2
18-1
18-2
18-3
18-4
18-5
18-6
18-7
18-8
18-9
18-10
18-11
18-12
18-13
18-14
18-15

(

(

xiii

Page
15-3
15-5
15-7
15-8
15 -12
16-7
16-8
16-10
16-11
16-12
16-13
17-4
17-5
18-2
18-6
18-6
18-11
18-12
18-13
18-14
18-14
18-16
18-17
18-17
18-18
18-18
18-19
18-20
18-21
18-22
18-23
18-26
18 c26
18-26
18-26
18-27
18-27
18-28
18-28
18-29
A-I
B-1
C-1
C-3
D-1
E-1
F-1
G-1
I-I
K-2
K-3

June 1976

(

(

(

(

(

ALPHABETICAL LIST OF MONITOR CALLS

APRENB,5·1
ATTACH,UUOPRV
CALlI., UUOPRV
CHKACC, 8·30
CHGPPN, UUOPRV
CLOSE,8-44
for DECtape, 9·8
for CDP, 12·2
for LPT, 12·9
for Display, 12·6
for PTP, 12·10
for Plotter, 12·13
CLRST., 13·5
CNECT., 13·2
CORE,6·8
CTUOB, 11-17
DAEFIN, UUOPRV
DAEMON, 4·12, UUOPRV
DATE,4-11
DEBRK., 5·12
DEQ., 16·7
DEVCHR,7·15
DEVLNM,7·14.1
DEVNAM,7·21
DEVPPN,8·34
DEVSIZ, 7·16
DEVSTS, 7·15
DEVTYP, 7·16
DISK.,8·39
DSKCHR, 8·36
DVRST., UUOPRV
DVURS., UUOPRV
ENQ., 16·5
ENQC., 16·9
ENTER,8·11
for DECtape, 9-7
ERLST., 13·3
ERRPT., UUOPRV
EXIT,4-2
FILOP., 8·22
FRUCCO,UUOPRV
GETLIN, 11-4
GETPPN,4·9
GETSEG,4·1
G ETSTS, 8-41
GETTAB,18·1
GOBSTR, 8·33

HALT,4·1
HIBER,4·2
for pseudo·TTYs, 11·15
HPQ,14·7
IN,8·21
for Display, 12·6
for TTY, 11·16
INBUF,7·11
INIT,7·3
INPUT,8·21
for DECtape, 9·8
for TTY, 11·16
IONDX., 13·6
IPCFQ., 15·10
IPCFR., 15·11
IPCFS., 15·11
JBSET, UUOPRV
JOBPEK, UUOPRV
JOBSTR,8·32
JOBSTS, 11·16
LIGHTS, 4·11
LOCATE,4·8
LOCK,6·1
LOGIN, UUOPRV
LOGOUT, 4·2, UUOPRV
LOOKUP, 8·10
for DECtape, 9·5
METER,17·1
MSTIME,4·11
MTAID., 10·12, UUOPRV
MTAPE,1O·3
for DECtape, 9·9
MTCHR., 10·5
MVHDR., 13·6
NODE, 7·19
OPEN,7·3
OTHUSR,4·10
OUT,8-21
for TTY, 11·16
OUTBUF,7-11
OUTPUT,8·21
for TTY, 11·16
for display, 12·6
for DECtape, 9·8

PEEK,4·13
PIIN!., 5·8
PIRST., 5·12
PISAV., 5·11
PISYS., 5·9
PJOB,4·9
POKE,4·14

I

REASSIGN,7·14.1
RELEASE,7·13
for TTY, 11·16
for Display, 12·6
for DECtape, 9-8
RENAME,8·8
for DECtape, 9·7
REMAP,6-19
RESDV., 7·13
RESET,7-1
RTTRP., 14·1
RUN,6·16
RUNTIME, 4·9

I

SCHED., UUOPRV
SEEK,8·29
SENSE., 13-4
SETNAM,4-4
SETSTS, 8-43
SETUUO, 4·5, UUOPRV
SETUWP,6·10
SLEEP, 4·2
SPY, 4·14
STATO, 8-42
STATZ, 8-43
STRUUUO, UUOPRV
SUSET., UUOPRV
SWITCH,4·11
SYSPHY, 8·34
SYSSTR, 8·33

I

TAPOP., 10-6.1
TIMER,4-11
TMPCOR,4·14
TRMNO, 11·5
TRMOP., 11-5
TRPSET,14-5
TTCALL, 11·1

I
I

UGETF,9·9
UJEN,14·7
UNLOK., 6·8

PAGE., 6·11
PATH., 8-22.2
xv

I

I
June 1976

(
ALPHABETICAL LIST OF MONITOR CALLS (Cont.)

USETI,8-27
for DECtape, 9-9
USETO,8-27
for DECtape, 9-9
UTPCLR,9-9
WAIT,7-10
WAKE,4-3
WHERE,7-19

(

(

(

\

June 1976

xvi

(

CHAPTER 1
USER PROGRAMMING
1.1 PROCESSOR MODES
In a single.user, non.timesharing environment, a user's program is limited only by those conditions inherent in the
hardware. The program must

1.
2.
3.

stay within the memory capacity,
observe the hardware restrictions placed on the use of certain memory locations, and
observe the restrictions on interrupt conditions.

In a timesharing environment, the hardware limits the central processor to one of three modes:

1.
2.
3.

user mode, which on a KIlO/KLl0 is divided into concealed and public modes,
user I/O mode, and
executive mode, which on the KIlO/KLlO is divided into kernal mode and supervisor mode.

1.1.1 User Mode Processing
The processor is usually in user mode when user programs are executed. In this mode, user programs must operate
within an assigned area of core and certain instructions are illegal. The illegal instructions are:

(

the op codes 700 through 777 1,
a JRST 10, instruction,
a JRST 4, instruction,
unimplemented op codes,
and, on the KLlO, any JRST except JRST 0, JRST I, or JRST 2.
All illegal instructions trap to the monitor, stop the program, and print one of the following messages on the user's
terminal.

(

?HALT AT USER PC addr
?ILLEGAL INSTRUCTION AT USER PC addr
?KIl 0 or KLl 0 INSTRUCTION AT USER PC addr
~KLl 0 ONLY INSTRUCTION AT USER PC addr
The CONT and CCONT commands can be used to continue the execution of the user program only after a HALT.
User mode processing is used to guarantee the integrity of the monitor and each user program. The user mode of the
processor is characterized by the following conditions.
1.
2.

Automatic memory protection and mapping, refer to Chapter 3.
Trap to the monitor on any of the following:
op codes 040 through 077 and op code 00,
I/O instructions (DATAl, DATAO, BLKI, BLKO, CONI, CONO, CONSZ, and CONSO),l
HALT (Le., JRST 4,)

3.

Trap to location 40 in the user area on the execution of op codes 001 through 037.

1except I/O instructions using a device code greater then 734 on a KIlO/KLlO.

1·1

User Programming

(

1.1.2 User I/O Mode Processing
The user I/O mode (i.e., bits 5 and 6 of the PC word equal to 11 2) of the central processor allows privileged user
programs to be executed with automatic protection and mapping in effect, as well as the normal execution of all
defined operation codes (except the HALT instruction on the KIlO/KLlO processors.) User I/O mode provides
some protection against partially debugged monitor routines and it provides infrequently used device service routines
to be executed as user jobs. Direct control of special devices, which is particularly important in real-time applications, may be obtained by a user program.
To utilize user I/O mode, the system administrator must have set bit 15 (JP.TRP) in the privilege word (refer to
.GTPRV, GETTAB Table Number 6). All user I/O mode activities are terminated by the execution of the RESET
monitor call. User I/O mode is not used by the monitor, and it is not, normally, available to the unprivileged timesharing user.
1.1.3 Executive Mode Processing
The monitor operates with the processor in executive mode, which is characterized by special memory protection
and mapping (refer to Chapter 3) and by the normal execution of all defined op codes.
When user programs execute in user mode, the monitor schedules user programs, services the interrupts, performs all
input/output operations, takes action when control returns from a user program, and performs any other legal userrequested operations not available in user mode. Monitor services and how a user program obtains these services are
described in Chapters 4 and 5.
1.2 MONITOR CALLS (PROGRAMMED OPERATORS)
Operation codes 000 through 100 on the DECsystem~lO are monitor calls. These are sometimes referred to as programmed operators (UUOs). Monitor calls are software-implemented instructions. Their functions, from a hardware
point of view, are not pre specified. Some monitor calls trap to the monitor; others trap to the user program.

(

When a monitor call is executed:
the effective address is calculated,
the contents of the instruction register (along with the effective address) is stored,
and an instruction is executed out of the normal sequence of operations.
Refer to the DECsystem-l 0 System Reference Manual for further details on Monitor Call handling by the central
processor.
1.2.1 Op Codes 000-037
Op codes 000 through 037 do not affect the mode of the central processor. When these op codes are executed in
user mode, they trap to location 40. This allows the user program complete freedom when using these operators.
If an undebugged program executes one of these op codes accidentally, the following message is printed:

HALT AT USER PC addr
where:

addr is the location of the user's monitor call.

The message is typed because the users relative location 41 contains a HALT instruction, unless the user program
overtly changed it. This HALT instruction is provided by LINK-IO.
1.2.2 Op Codes 040-100 and 000
Op codes 040 through 100 trap to absolute location 40 on KAlO-based systems. On KIlO/KLlO-based systems, the
call is stored at location 424, and the new pc is loaded from location 436 of the user's process table (the central processor operates in executive mode). These monitor calls are interpreted by the monitor to perform I/O operations
and other control functions for the user program.

1-2

(

User Programming

(

Op code 000 always returns to monitor mode, and the following error message is printed:
?ILLEGAL DUO AT USER PC addr
Table l-l1ists the op codes 040 through 100, their mnemonics, and their meanings.
Table 1-1
Op Codes 040-100
Op Code
040

Call

Meaning
Programmed operator extension. (Refer to
Table 1-2).

{CALL ac, [SIXBIT/name/]}

nameac,
041

(

channel, status
SIXBIT/device/
XWD obut. ibuf
error return
normal return
INIT

I

Initialize a device and associate it with an I/O
channel.

Reserved for installation dependent definition.

042-046
047

CALLI ac, n

Programmed operator extension.

050

channel, spec
error return
normal return

Initialize a device, and associate it with an I/O
channel.

OPEN

I

(
spec:

EXP status

SIXBIT/device/
XWD obut. ibuf
051

TTCALL

I

aC,addr

Extended operations on job-controlling
terminals.

052-054

(

055

Reserved to Digital for future expansion.

channel, addr
error return
normal return
RENAME

addr:
addr:

Rename or delete a me on a

SIXBIT /filename /
SIXBIT/ ex tension/

non-directory device.

SIXBIT/filename/

DECtape.

I
I

SIXBIT/ ex tension/ "hi-date2

0, ,low-date
addr:

SIX BIT/filename /
SIXBIT/ ex t/ ,hi-date, date1

disk unit.

prot, mode, time, low-date2
ppn
056

IN

channel, addr
normal return
error return

Transmit data from a me to a user's core area,
skip on an error or an EOF.

1-3

June 1976

User Programming

Table 1-1 (Cont.)
Op Codes 040-100
Meaning

Call

Op Code

Transmit data from a user's core area to a me,
skip in an error or an EOF.

057

channel, addr
OUT
normal return
error return

060

SETSTS
return

061

STATO
channel, status
normal return
alternate return

062

GETSTS
return

063

STATZ
channel, status
normal return
alternate return

Skips if all status bits are zero.

064

INBUF
return

channel,n

Set up input buffer ring with n buffers.

065

OUTBUF
return

channel,n

Set up output buffer ring with n buffers.

066

INPUT
return

channel, addr

Transmit data from a me to the user's core area.

OUTPUT
return

channel, addr

Transmit data from a me to the user's core area.

CLOSE
return

channel, option

Terminate me operations.

071

RELEASE
return

channel,

Release a device.

072

MTAPE
return

channel,function

Perform tape positioning operations.

073

UGETF
return

channel, addr

Get next free block number on DECtape.

074

USETI
return

channel, block

Set next input block number on disk or
DECtape.

075

USETO
return

channel, block

Set next output block number on disk or
DECtape.

076

LOOKUP
channel, addr
error return
normal return

I

I

067
,
070

I

(

..

I
June 1976

Change the me status.

channel, addr

Skip if any me status bits are equal to one.

Copy me status to addr.

channel, addr

(

(

~

Select a me for input on a

addr:

SIXBIT/filename/
SIXBIT/ext/

non-directory device

addr:

SIXBIT/filename/
SIXBIT/ext/, high date2
prot, mode, time, date
XWD proj,prog

directory device.

(
1-4

User Programming

Table 1·1 (Cont.)
Op Codes 040-100

(
Op Code
077

Call

Meaning

channel, addr
error return
normal return

Select a file for output on a

ENTER

addr:

SIXBITlfilenamel

non·directory device.

SIX BITIex tensionl

addr:

SIXBITIfilenamel
SIXBITIex tl, dflte

DECtape.

a"date
addr:

(

100

SIXBITlfilenamel
SIXBITlextl, date, date
prot, moi:ie, time, date
XWD proj, prog

disk unit.

UJEN

Dismiss a real·time interrupt.

return

(

(

(
1·5

User Programming

Tablet -2
CALLIs/Monitor Calls
CALLI

#

Function

Call

-2, ...

Customer defined.

Reserved for customer definition.

-1

LIGHTS ac,
only return

Display the contents of the AC in the lights.

I

RESET
return

ac,

Reset an I/O device.

2

MOVEI
SETDDT
return

ac, start-addr
ac,

Set the protected DDT starting address.

ac, [SIXBIT/d""ice/]}

Get device characteristics.

4

tOVE

MOVE
ac,channel
MOVEI
aC,udx
DEVCHR ac,
return

10

{MOVEI
MOVEI
WAIT
return

ac, channel}
ac,udx
channel

(
Wait until device is inactive.

MOVE
ac, [XWD hi, 10 ]
CORE
ac,
error return
normal return

Allocate core.

12

EXIT
ac,
return here on continue

Reset is performed when AC = 0, job is stopped when
AC not equal to O.

13

ac, channel}
{MOVEI
MOVEI
aC,udx
UTPCLR ac,
only return

11

(
Clear a DECtape directory.

14

DATE
ac,
only return

Return the date.

151

MOVE
ac, [XWD on, loc]
LOGIN
ac,
only return

Privileged call available only to system privileged programs. It is a no-op if executed by ajob already
logged in.

16

MOVEI
APRENB
return

Enable central processor traps.

17

LOGOUT ac,
no return

Privilege monitor call available only to system privileged programs. It is treated as an EXIT monitor call
if executed by a non-system privileged program.

20

SWITCH
return

Read the console data switches.

aC,bits
ac,

ac,

(

I

\.
1-6

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI #
21

Call

Function

MOVE!
ac,job-number
Reassign a device.
MOVE
ac+l, [SIXBIT/deVicel]}
{ MOVEI
ac+ 1, channel
I MOVEI ac+l,udx
I
REASSIGN
ac,
only return

I

22

TIMER
ac,
only return

Return the time of day in jiffies.

23

MSTIME ac,
only return

Return the time of day in milliseconds.

24

GETPPN ac,
normal return
alternate return

Return the project-programmer number of the current
job.

25

MOVE
ac, [XWD n, loc]
TRPSET ac,
error return
normal return

Set a trap for user I/O mode.

loc:

JSR

TRAP

26
27

30

I

Illegal monitor call.
ac,job number t
{MOVEI
MOVEI
ac,O
J
RUNTIM ac,
only return

PJOB

ac,

Return the job's running time in milliseconds. (0 indicates the current job).

Return the job number.

only return

31

(

MOVEI
ac, sees. to sleep
SLEEP
ac,
only return

32

Stop a job for a specified number of seconds (68
seconds is the maximum).
Historical monitor call.

33

MOVEI
aC,addr
PEEK
ac,
only return

Return the contents of a specified exec address.

34

GETLIN ac,
only return

Return the SIXBIT physical name of the terminal that
the current job is attached to.

35

MOVSI
ac, start-addr-inc
HRRI
aC,loc
RUN
ac,
error return
;@.JBSA
normal return

Allow programs to transfer control to one another.
Both the low and the high segments of the user's
addressing space are replaced with the program being
called.

(

1-7

June 1976

I

I

User Programming

(

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI

#

Function

Call

loc:

I

SIXBITIdevice I
SIXBITlextensionl
SIXBIT Iftlenamel

0
XWD proj,prog
XWD hi-addr, core

36

37

ac, bit
ac,
error return
normal return

MOVEI
SETUWP

{MOVEI
MOVE
REMAP

ac, hi in low seg
}
ac, [XWD hiorigin, 10 ]

Set or clear user mode write protect for high segment.

(

Remap top of low segment into the high segment.

ac,

error return
normal return

40

ac,addr
ac,
error return
normal return

MOVEI
GETSEG

Replace the high segment in user's addressing space.

(
addr:

SIXBIT/devicel
SIXBIT /Iilenamel

I

:

SIXBITlextl

0
XWD proj, prog

0
41

ac, job-number }
ac, index-number
ac, table-number
ac,
error return
normal return

Return contents of monitor table or location.

42

ac, hi-phys-addr
SPY
ac,
error return
normal return

Make physical core assig..nment for examination of
monitor.

43

MOVE
SETNAM

{MOVSI
MOVSI
HRRI
GETTAB

MOVEI

ac, [SIXBITlnamel]
ac,

Set program name in monitor table.

only return
44

MOVE
ac, [XWD code, block]
TMPCOR ac,

Allow temporary in-core file storage for the job.

error return
normal return

June 1976

1-8

User Programming

(

Table 1-2 (Cont.)
CALLis/Monitor Calls
CALLI #

block:

45

XWD
IOWD

name, 0
bulen, buffer

MOVEI
ac, [XWD +n, lac]
DSKCHR ac,
errar re turn
normal return

lac:
.(

Function

Call

Return disk characteristics.

SIXBIT/diskname/

46

MOVEI
ac,O
MOVE
ac, [SIXBIT/fsname/]
SYSSTR ac,
error return
normal return

Return all of the file structures names in the system.

47

MOVE
ac, [XWD n, lac]
JOBSTR ac,
error return
normal return

Return next file structure name in job search list.

50

MOVE
ac, [XWD n, lac]
STRUUO ac,
error return
normal return

Manipulate the structures.

\

(

lac:

function

argn-1

(

51

52
53

54

(

MOVEI
ac,O
MOVE
ac, [SIXBIT/name/]
SYSPHY ac,
error return
normal return

Return all physical disk units.

Reserved for future use.

rOVE

Return properties of a device.

tOVE1

Remove hardware device status word.

ac, [SIXBIT/ d"'ice/j }
ac,channel
MOVEI
MOVEI
ac,udx
DEVTYP ac,
error return
normal return
ac, channel
}
MOVE
ac, [SIXBIT/device/1
MOVEI
aC,udx
DEVSTS ac,
error return
normal return
1-9

User Programming

. Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI

55

56

#

Call

Function

ac, [SIXBIT/deVice l1 }
aC,channel
ac,
error return
normal return

{MOVE
MOVEI
DEVPPN

SEEK

channel,

60

61

MOVEI
RTTRP

ac,loc
ac,
error return
normal return

Connect real-time device to the PI system.

ac, [XWD hi, 10] }
ac, [XWD -n,addr]
ac,
error return
normal return

Lock job in core.

ac, channel
}
ac,job-number
aC,udx
ac,
error return
normal return

Return status information about device TTY and/or
controlled job.

ac, station-number
ac,
error return
normal return

Change the job's logical station/node number.

{MOVE
MOVE
LOCK

r

MOVEI
OVEI
MOVEI
JOBSTS

62

63

Return the project-programmer word.

Perform a SEEK to current selected block for software channel AC.

return

57

(

r

ac,'hannel

}

Return physical name of device obtained through
generic INIT/OPEN/FILOP. or logical device
assignment.

error return
normal return

65

MOVEI
CTLJOB

ac,job-number
ac,
error return
normal return

Return job number of controlling job.

66

MOVE
GOBSTR

Return next file structure name in an arbitrary job's
search list.

ac, [XWD n, loc]
ac,
error return
normal return
loc:

\

(

MOVEI
LOCATE

MOVE
ac, [SIXBIT/device/]
OVEI
MOVEI
ac,udx
DEVNAM ac,

(

job-number
XWD proj,prog
SIXBIT/name/
-1
0
status-bits

(

(
1-10

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI #

Reserved to Digital.

70

Reserved to Digital.

71

MOVEI
HPQ

ac,hpq
ac,
error return
normal return

Place job in high priority scheduler's run queue.

72

MOVSI
HRRI
HlBER

ac, enable bits
ac, sleep time
ac,
error return
normal return

Allow job to become dormant until the specified event
occurs.

73

MOVEI
WAKE

ac,job-number
ac,
error return
normal return

Activate the specified dormant job.

74

MOVE
CHGPPN

ac, [XWD proj,prag]
ac,
error return
normal return

Change project-programmer number.

75

ac, [XWD function,arg]
ac,
error return
normal return

Set system and job parameters.

MOVE
SETUUO

76
77

Reserved for Digital.
OTHUSR ac,

non-skip return
skip return

(

Function

67

(

(

Call

100

ac,loc
ac,
errar return
normal return
MOVEI
CHKACC

lac:

Determine if another job is logged into the same projectprogrammer number. If one is not, take the non-skip
return.

I

Check user's access to the file specified.

1

access, dir-prot, file-prot
directory ppn
user ppn

(

1-11

June 1976

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls

CALLI #

101

I

Function

Call

ac,loc
ac,
error return
normal return

MOVEI
DEVSIZ

loc:

Determine buffer size.

EXP data mode

{ SIXBITIdevice,}
channel
udx

102

ac, [XWD length, addr]
MOVE
DAEMON ac,

Request DAEMON to perform a specified function.

error return
normal return

addr:

[unction
argJ

(
argn

103

MOVEI
JOBPEK

ac,addr
ac,
error return
normal return

Read or write another job's core.

104

ac, [XWD line# ,job #]
MOVE
ATTACH ac,

Attach the job to the specified TTY line number.

error return
normal return

I

105

MOVE
DAEFIN

ac, [XWD length,addr]
ac,
error return
normal return

Indicate that the request to the DAEMON program has
been completed.

106

ac, [XWD length, addr]
MOVE
FRCUUO ac,

Force a command for ajob.

error return
normal re tum

(

1-12

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI

107

#

Call

t

ac,

rSIXBITld"iCCI}

Function
Set a logical name for this device.

aC,channel
MOVEI
OVE
MOVEI
aC,udx
MOVE
aC+ 1, [SIXBIT/logicalj]
DEVLNM ac,

error return
normal return
110

(

MOVE
ac, [XWD length, addr]
PATH
ac,
error return
normal return

addr:

Read or modify the default directory path or read the
current path of a file OPEN on a channel, or set and/
or test the additional path.

I
I

SIXBIT/name/
scan switch
XWD proj, prog
sfdname
sfdname

(

(

(

1-12.1

(

(

(

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI #
111

ac, [XWD n+ 1, lac]
MOVE
METER. ac,
error return
normal return

lac:

(

rOVE

"c. [XWD n,lac]

MOVEI
ac,channel
MOVEI
aC,udx
MOVE
ac, [SIXBIT/devicej]
MTCHR. ac,
error return
normal return

113

(

(

I

Return characteristics of a magnetic tape.

MOVE
ac, [XWD 2, block]
JBSET.
ac,
error return
normal return

block:
114

Provide performance analysis and metering of dynamic
system variables.

function
argl

argn
112

Functiom

Call

Execu te the specified function of SETUUO for a job.

lac:

I

XWD O,job #
XWD function, value

MOVE
ac, [XWD 3, lac]
POKE.
ac,
error return
normal return

I

Alter the specified location in the monitor.

location
old value
new value

115

MOVEI
ac,job#
TRMNO. ac,
error return
normal return

Return the number of the terminal currently controlling the specified job.

116

MOVE
ac, [XWD n, addr]
TRMOP. ac,
error return
normal return

Perform miscellaneous terminal functions.

1-13

June 1976

I

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
Call

CALLI#
117

{MOVEI
MOVEI
RESDV.

120

{MOVSI
MOVSI
{HRRI
HRRI
UNLOK.

121

122

Function

ac, chonnel }
aC,udx
ac,
error return
normal return

Reset the specified channel.

aC,1 }
ac,O
aC,1 }
ac,O
ac,
error return
normal return

Unlock a locked job in core.

ac, [XWD /unction,addr]
ac,
error return
normal return

Set or read a disk or file system parameter.

(

MOVE
DISK.

tOYE

Restrict the specified device to a privileged job.

ac, [SIXBITfdev;C'il}
aC,channel
ac,udx
ac,
error return
normal return
MOVEI
MOVEI
DVRST.

I
123

tYE

(
Remove the restricted status of a specified device.

ac, [SIXBIT fdeviceil}

aC,channel
ac,udx
ac,
error return
normal return

MOVEI
MOVEI
DVURS.

124
125

I

126

Reserved to Digital.

ac, [XWD n,addr]
ac,
error return
normal return

MOVE
CALLI 1.

tOVE

Front-end debug monitor call.

Associate a visual identification with a magnetic tape
drive during a mount.

ac, [SIXBIT/dev;C'il}

ac, udx
aC,channel
aC+1, [SIXBIT /reelid/]
ac,
error return
normal return

MOVEI
MOVEI
MOVE
MTAID.

127

June 1976

ac, channel
}
ac, [SIXBIT/device/]
ac,
error return
normal return

{MOVEI
MOVE
IONDX.

Return the universal I/O index for a device.

1-14

(

User Programming

Table 1-2 (Cont.)
CALLis/Monitor Calls
Function

Call

CALLI#

130

MOVEI
CNECT.

ae, list
ae,
error return
normal return

Connect/disconnect devices to/from an MPX
channel.

131

{MOVEI
MOVE
MVHDR.

ae, channel
}
ae, [outaddr,inaddr]
ae,
error return
normal return

Move a buffer ring header between core locations.

132

MOVEI
ERLST

ae,addr
ae,
error return
normal return

Provide a list of non-operational devices connected to
an MPX channel.

(

#Words, channel
#devices
UDX"GETSTS
ae,
[XWD length,addr]
MOVE
CLRST.
ae,
error return
normal return

addr:

133

(

addr:

Allow a device to continue after a device error
condition has occurred.

udx
channel
SIXBIT/deviee/
O,SETSTS value

(

\
135

MOVE
PIINI.

ae, base-addr
ae,
error return
normal return

Initialize the software interrupt system.

136

MOVE
PISYS.

ae, [XWD [lags, addr]
ae,
error return
normal return

Control the software interrupt system.

DEBRK.

Dismiss a software interrupt.

137

return

140

ae, [XWD size,addr]
ae,
error return
normal return

MOVE
PISAV.

Save the state of the software interrupt system.

1-15

User Programming

Table 1-2 (Cont.)
CALLIs/Monitor Calls
CALLI#

(
Function

Call

141

MOVEI
PIRST.

ac,addr
ac,
error return
normal return

Restore the state of the software interrupt system.

142

ac, [XWD n, lac]
ac,
error return
normal return

Receive an IPCF packet.

MOVE
IPCFR.

lac:

143

ac, [XWD n, lac]
ac,
error return
normal return

MOVE
IPCFS.

lac:

144

flags
sender's PID
receiver's PID
message length"addr
Send an IPCF packet.

(

flags
sender's PID
receiver's PID
message length, ,addr

ac, [XWD n, lac]
ac,
error return
normal return

MOVE
IPCFQ.

lac:

Obtain information about an IPCF input queue.

(

flags
sender's PID
receiver's PID
message length"addr

145

MOVE
PAGE.

ac, [XWD function, lac]
ac,
error return
normal return

Manipulate pages and the data associated with these
pages.

146

ac, [XWD n, lac]
ac,
error return
normal return

Set the next I/O block number.

MOVE
SUSET.

1-16

User Programming

1.2.2.1 Symbols for Numbers - Some system programs, e.g., LOGOUT, require I/O to specific phYSical devices
regardless of the logical name assignments. Therefore, for any monitor call, if bit 19 (UU.PHS) in the effective
address of the call is not equal to bit 18, only physical device for any names will be used; logical device assignments
will be ignored. This suppression of logical device names is helpful, for example, when using the results of the
DEVNAM monitor call where the physical name corresponding to a logical name is returned.
1.2.2.2 Restriction on Monitor Calls in Programs - A number of restrictions on monitor calls that involve a high
segment prevent naive or malicious users from interfering with other users while sharing segments and minimize
monitor overhead in handling two-segment programs. The basic rules are as follows:
1.
2.
3.

(

4.

All monitor calls can be executed from either the low or high segment although some of their arguments
cannot be in or refer to the high segment.
No buffers or buffer headers may exist in the high segment for reading from or writing to any I/O
device.
No I/O is processed into or out of the high segment except via the SAVE, OSAVE, NSAVE and SSAVE,
OSSAVE, NSSAVE commands.
As a convenience in writing user programs, the monitor makes a special check so that the INIT monitor
call can be executed from the high segment, although the calling sequence is in the low segment. The
monitor also allows the effective address of the OPEN monitor call (which contains the status bits,
device name, and buffer header addresses) in the high segment. The address of TTCALL 1, and
TTCALL 3, may be in the high segment for convenience in typing messages.

1.2.3 Operation Codes 100-127
OP Code 100 (UJEN)
OP Codes 101-106
107,114-117

(

OP Codes 110-113

Dismiss real-time interrupt from user mode.
Monitor prints ?ILLEGAL INSTRUCTION AT USER n and stops the job.
These op codes are valid only on the KLlO. The message ?KLlO ONLY
INSTRUCTION will be printed if an attempt is made to execute them on any
other system.
These op codes are valid on the KIlO or the KLlO. If used on the KAlO, the
monitor prints ?KIlO or KLlO INSTRUCTION AT USER n and stops the job.

1.2.4 Illegal Operation Codes
The eight I/O instructions (e.g., DATAl) and JRST instructions with bit 9 or 10 equal to 1 (e.g., HALT, JEN) are
interpreted by the monitor as illegal instructions (refer to the DECsystem-20 SYSTEM Reference Manual). The job
is stopped and a question mark is printed immediately. A carriage-return/line-feed sequence is performed, followed
by an error message. For example, a DATAl instruction would produce the following:·

?
?ILLEGAL INSTRUCTION AT USER addr
1.2.5 Naming Convention for Monitor Symbols
The names of the monitor's data base symbols contain dots or percent signs so that they can be made user-mode
symbols without conflicting with previously-coded user programs. Data symbols can be divided into five classes:
1.
2.
3.
4.
5.

numbers
masks
monitor call names
GETT AB arguments
error codes

1.2.5.1 Symbols for Numbers - Symbols defining numbers begin with a dot, followed by a 2-letter prefix
indicating the type of number, and end with a3-character abbreviation representing the specific number. Numbers
are 18-bit quantities and include core addresses and function codes. The following are examples of various numbers:
1-17

User Programming

.JBxxx
.GTxxx
.RBxxx

Job Data Area
GETT AB Table Numbers
Extended arguments for LOOKUP, ENTER, RENAME monitor calls

(

1.2.5.2 Symbols for Masks - Names for masks start with a 2-letter prefix indicating the individual word, followed
by a dot, and end with 3 characters representing the specific mask. Masks are 36-bit quantities that include bits and
fields. The following are examples of names of masks:
JP.xxx
JW.xxx
PC.xxx

Privilege word bits
WATCHword bits
PC word bits

1.2.5.3 Symbols for Monitor Calls - Names for monitor calls implemented after the 5.03 release of the monitor
are 5 or fewer characters followed by a dot. For example:
PATH.
TRMOP.

The monitor call to modify a directory path
The monitor call to perform terminal operations

1.2.5.4 Symbols for GETTAB Tables - Individual words within a GETTAB table start with a percent sign,
followed by 2 characters representing the generic name of the table, and end with 3 characters identifying the
specific word. For example:
%NSCMX
o/oCNSTS

CORMAX word in the nonswapping data table
The states word in the configuration table

Names of bytes and bits within a GETTAB table begin with 2 characters representing the word, followed by a
percent sign, and end with 3 characters designating the specific byte.
ST%DSK
ST%SWP

(

Byte representing the disk system; this is contained in the states word
Byte indicating a swapping system; this is contained in the states word

1.2.5.5 Symbols for Error Codes - Error codes returned because of an monitor call error have names following the
pattern: 2 characters indicating the call name, three characters designating the failure type, and a terminating
percent sign. The following are examples of error code symbols:
DMILF%
RTDlU%
LKNLPL%

DAEMON error code
RTTRP error code
LOCK error code

(

Many of the values useful in user programming are encoded in the parameter file UUOSYM.MAC (refer to
Appendix J) for the convenience of writing and modifying programs.

(
1-18

CHAPTER 2
MEMORY FORMAT

2.1 USER PROGRAMS
User programs must be loaded into core memory before they can be executed. There are two methods of loading a
user program into core. The simpler method is to load a core image stored on a retrievable device (refer to the RUN
and GET commands in the DECsystem-10 Operating System Commands Manual). The other method is to load a
collection of relocatable binary (.REL) mes using LINK-lO.
The address space of a user program can be divided into two segments, high and low; all user programs must have
at least a low segment. A user program can have one of several me name extensions, depending on its me type and
how it was stored.

(

.EXE

The me is an exact copy of the user's core image .

.SAV

The me is a low segment me .

.LOW l
.HGH J

The me has two segments: a low segment (.LOW) and a high segment (.HGH) .

.LOW}
.SHR.

The file has two segments: a low segment and a sharable high segment (.SHR) .

The low segment is always used by one individual program, and each user program has its own low segment.
By default, the monitor will write-protect the high segment, preventing a user from altering it. Any suitably privileged
prograin can clear the write-protect bit of a high segment. This clearing to modify the write-protect bit is necessary
for debugging the high segment.

(

A high segment can be shared by any number of jobs that have unique low segments. For instance, if five users have
low segments containing their own FORTRAN user programs, they may share a high segment containing the
FORTRAN compiler. The monitor performs this sharing function automatically; each user believes that he has his own
high segment containing the FORTRAN compiler, and is unaware of sharing the high segment with the others.
Any user job attempting to modify a write-protected high segment will be aborted and will receive an error message.
If the user's job has two segments and he has asked the monitor to clear the high segment's write-protection, his job
will be a two-segment writable job.
All user programs are assembled and loaded as if to execute in an address space starting at location zero in core memory.
However, user programs are never started at location zero, but at the most convenient location in core. All references
to locations made by the user program during its execution are relocated to actual physical core memory addresses.
Relocation is accomplished in different ways, depending on the type of processor in the system.

(

2.2 MEMORY PROTECTION AND RELOCATION
When a user program is executing, the processor operates in user mode. In this mode, certain operations are illegal
(e.g., I/O instructions), and all address references are relocated. The relocation hardware prevents a user from'
accessing any location not assigned to him by the monitor; conversely, the relocation hardware prevents access to
his assigned area by another user.
.

2-1

I

Memory Format

The user specifies the size of his program; from that information the DECsystem-lO monitor determines the position
in core memory where his program will reside.

(

There are three types of processors available with the DECSystem-lO - the KA10, the KIlO, and the KLlO.
Monitors for the KIlO and KLlO processors are available with the virtual memory option. The methods for relocating user programs into core memory are:

•
•
•

the KA10 method,
the KIl 0 /KLlO method, or
the KIlO/KLlO with virtual memory method.

Each method determines the core resident size and position of each user's area in a different way. A program running
on a KIlO-based system (or KLlO) with the virtual memory option is upwards compatible with those running on the
KIlO without virtual memory and with those running on the KAlO.
2.2.1 The KAlO Processor
With a KAlO processor, the monitor relocates each user program on a per segment basis. The segments of a user program (i.e., just a low segment, or both high and low segments) are relocated into core memory, occupying contiguous
blocks of 1024 words each. The relocation is accomplished by protection and relocation registers. Besides relocation,
segment protection is performed by these registers, which prevents one user job from accessing memory assigned to
the monitor or to another user job.
Each segment of a user program has a relocation and a protection address. The relocation address is the absolute core
address of the first location in the segment, as seen by the hardware. The protection address of each segment is the
maximum relative address that the user may reference. The hardware defines both these addresses in units of 1024word blocks. Relocation is accomplished dynamically by adding the contents of the appropriate relocation register
to every user address reference.

(

All physical address locations are invisible to the user, as is the process of relocation. The relative user address and
relocated address configuration on the KA10 are shown in Figure 2-1, where PL, RL, PH, and RH are the protection
and relocation addresses of the low and high segments, respectively. If the low segment is more than half the maximum
capacity (i.e.,PL is greater than or equal to 400000), the high segment will start at the first location after the low
segment ends (i.e., at PL+200000). The high segment is limited to 128K.
o

o
REGISTERS

17

17

1'.
LOW SEGMENT

PL+ 1777

ILLEGAL

:'-

RH+400000

ILLEGAL

HIGH SEGMENT
RH+PH+I777

~

400000

ILLEGAL

HIGH SEGMENT

RL

PL+1777
LOW SEGMENT

\

ILLEGAL

RL+PL+1777
ILLEGAL

777777

USER ADDRESS

TYPICAL ADDRESS
CONFIGURATION AFTER
RELOCATION

SPACE BEFORE
RELOCATION

Figure 2-1 KA10 User Address Relocation

2-2

(

Memory Format

i

\

In summary, the KA10 relocates each segment of a user program into contiguous blocks of core memory. Relocation
and protection are accomplished via the relocation and protection registers. At anyone time during a program's
execution, the entire program is core resident.
2.2.2 The KIlO and KLlO Processors (Without Virtual Memory)
KIlO and KLlO based programs are relocated and protected just as KA10 based programs are; relocation is accomplished
by paging hardware. A KIlO or KLlO processor relocates user programs into core memory in the form of pages. A
page consists of 51210 words, and the maximum possible user address space is 51210 pages (or 256K) of core. A
user program of more than 512 words, when relocated, will consist of several pages.

(

The pages composing a user program are relocated into core individually. One page's physical placement has no connection with that of any other page. The monitor maintains a map for translating user addresses into their actual
physical addresses. The map, which is invisible to the user, is kept in a page known as the user process table or the
user map page. The paging hardware in the KIlO and the KLlO employs the user process table to relocate all user
address references. Since all address references must be mapped through the process table, a user program can access
only those physical pages contained in that program's process table. Therefore, the paging hardware provides protection and relocation capabilities compatible with the KAlO's protection and relocation registers.
The important difference between the KAIO and the KIlO/KLlO (without virtual memory) is that the pages of a
segment do not have to be contiguous on the KIlO/KLlO as they do on the KAlO. All pages forming a program,
however, must be in core whenever that program is executed.
Figure 2-2 illustrates the KIlO/KLlO paging method (without virtual memory).

0
0

(

\
LOW
SEGMENT

2
3
ILLEGAL

400000

256

(

257
HIGH
SEGMENT

258
259
ILLEGAL

,,I
' - - - - - - - - - ' , 17777777

USER ADDRESS SPACE
BEFORE RELOCATION

TYPICAL PHYSICAL
ADDRESS CONFIGURATION
AFTER RELOCATION

Figure 2-2 KIlO/KLIO Paging Configuration (Without Virtual Memory)

(
2-3

Memory Format

2.2.3 KIlO and KL10 Processors With the Virtual Memory Option
The virtual memory option of the 6.01 and 6.02 monitors makes further use of the KIlO/KLlO's paging hardware.
The pages of a user program are relocated individually, but not all pages need reside in core memory during execution. Some pages may be in core and the rest in secondary storage (i.e., disk or drum). Therefore, the virtual memory
option makes it possible to run programs that are significantly larger than the physical core memory available for
their execution.
Assume that user A has a 50-page program but core memory has only 20 pages blank. With the virtual memory
option, the monitor can swap into core several of user A's pages, while keeping the rest on a secondary storage
device. When one of the stored pages is referenced, it is brought into core while another page is swapped out to
make room for it.
Deciding which pages are initially swapped to core and which pages are swapped into secondary storage is a function
of the page fault handler. The page fault handler also decides which page will be swapped into secondary storage
to make room in core for a new page. A user may create his own page fault handler; if he does not, the system
default page fault handler will be used.
For more information concerning the page fault handler and virtual memory, refer to Chapter 4 and to GUIDES
TO VIRTUAL MEMORY.
Using virtual memory is a privilege granted (or denied) by the system administrator at each installation. Therefore, not all users at an installation may utilize the virtual memory features, if the system administrator so chooses.
2.2.3.1 Virtual Memory Organization - Virtual memory permits a program to reference an address space that
is larger than the actual physical core occupied during that program's execution. Programs running on a vutUal
memory system need no modifications from the same programs running on non-virtual memory systems. It is possible with the virtual memory option to execute very large programs (e.g., BLISS-lO programs) on small systems.

(
\

For efficiency and rapid response, the monitor is always core resident. High segments can be paged or shared,
but not both. A sharable high segment must be completely core resident during its execution.
Not all programs utilize virtual memory during their execution. If a user is authorized to employ the virtual memory
feature, his program will go virtual only when one of the following events occurs:
1.
2.

3.

The program exceeds the user's physical core limit when he issues a GET or RUN command.
The program uses the CORE monitor call (or command) to expand the program's memory
beyond the user's physical core limit; subsequently, the program references one of the newly
created pages.
The program assumes direct control of its memory management with the PAGE. monitor call.

Figure 2-3 illustrates the limits imposed on a virtual memory system.
Figure 2-3 uses several abbreviations, which are described in Table 2-1.
At the moment a job's current physical page count becomes greater than its physical page limit, i.e.,
CPPC> CPPL
that job will go virtual. A user with virtual memory privileges can control how much of his job will be. c~re
resident at any time. If a user lowers a program's physical page limit to fewer than the number of pages Wlthin
the program, he will force the program to use virtual memory. A user controls the current physical page limit via
the SET PHYSICAL LIMIT command and the current virtual page limit via the SET VIRTUAL LIMIT command.

2-4

(

Memory Format

I/

SET B Y PAGE
LT H ANDLER
FAU
SET BY
USE R PR OGRAM

CVPC

CPPL

SET BY
US ER

CVPL

MPPL

SET BY
SYS TEM
AD MINISTRATOR

MVPL

CPPC

GPPL

1---------

~

SET BY
SYS TEM
AD MINIS

\

256K

I

256K

-------

GVPL

VIRTUAL
LIMITS

PHYSICAL
LIMITS

Figure 2-3 Physical and Virtual Page Limits
Table 2-1
VM Abbreviations
Meaning

Abbreviation
GPPL

The global physical page limit set by the system
administrator using a privileged SETUUO.

GVPL

The global virtual page limit set by the system administrator using a privileged SETUUO.

MPPL

The maximum physical page limit set by the system
administrator using a privileged SETUUO.

CPPL

The current physical page limit which can be set by
each user via the SET PHYSICAL LIMIT command
or an unprivileged SETUUO.

CPPC

The current physical page count established by the
user program or by the page fault handler.

CVPL

The current virtual page limit set by the user via
the SET VIRTUAL LIMIT command or an unprivileged
SETUUO.

CVPC

The current virtual page count established by the user
program.

2-5

March 1976

Memory Format

The system administrator establishes a maximum virtual page limit (MVPL) for each user, a maximum physical
limit for all users (GPPL), and a combined virtual limit that applies to the total amount of virtual memory (i.e.,
secondary storage) in use by all virtual memory users (GVPL). These limits are set by LOGIN using the privileged
functions of the SETUUO.

c

(

(

(

2-6

CHAPTER 3
JOB DATA AREA
3.1 JOBDAT (JOB DATA AREA)
The first 1408 locations in the user's core area are allocated to the Job Data Area. The locations within this area
are given mnemonic assignments, where the first three characters are always .JB.
The function of the Job Data Area is to store information of interest to the monitor and to the user. Some locations within the Job Data Area, such as .JBPFH and .JBINT, are set by the user's program for use by the monitor.
Other locations, such as .JBREL, are set by the monitor for use by the user's program.

(

I

The JOBDAT locations that are of significant importance to the user are listed in Table 3-1. The JOBDAT locations that are not listed within this table are those used by the monitor and those unused at the present time.
User programs should not be written to reference any location in the Job Data Area that is not described in Table
3-1.
JOBDAT is loaded automatically (when needed) during LINK-la's library search for undefined global references;
the values are assigned to the mnemonics at this time also. JOBDAT exists as a .REL fIle on device SYS: so that
it may be loaded with the user programs that symbolically refer to locations within it. When a user program refers
to a JOBDAT location, the location's assigned mnemonic should be used. The mnemonic must first be declared as
an EXTERNal reference to the assembler (refer to the MACRO-lO Programmer's Reference Manual). All mnemonics
beginning with the characters .JB within this manual refer to locations within the Job Data Area (JOBDAT).

(

"

Table 3-1
Job Data Area Locations
(for user program reference)
Mnemonic

Location 8

Description

.JBUUO

40

User's location 40 which is used by the hardware, when processing
user monitor calls (001 through 037), for storing the op code and
the effective address.

.JB41

41

This instruction is executed to start the user's programmed operator
service routine (usually this is a JSR or a PUSHJ).

.JBERR

42

Left Half:

Reserved.

Right Half:

The accumulated error count from one system
program to the next. System programs should be
written to look at the right half of this location
only.

Left Half:

Reserved.

Right Half:

The highest relative core location available to the
user (i.e., the contents of the memory protection
register when this user program is executing).

(

.JBREL

44

(

3-1

I

June 1976

Job Data Area

Table 3-1 (Cont.)
Job Data Area Locations
(for user program reference)
Mnemonic

.JBDDT

Description

Locationg

74

I

Left Half:

The last address of DDT.

Right Half:

The starting address of DDT, which can be set with the
SET DDT monitor call. If the contents of .JBDDT
are zero, it indicates that DDT has not been loaded.
If the monitor includes the virtual memory option
and this location contains zero, the monitor will
attempt to read into core SYS:DDT.VMX when
the user executes a DDT command (refer to the
DECsystem-l0 Operating System Commands
ManUal). If successful, SYS:DDT.VMX is brought
into the program's virtual address space, starting
at the User virtual address 700000. The left and
right halves of .JBDDT will then be set to the
appropriate values.

.JBPFI

114

All user I/O references must be to locations greater than 114.

.JBHRL

115

Left Half:

The first relative free location in the high segment
(relative to the high segment origin, so it is the same
as the high segment length). This location is set by
LINK-IO and on subsequent GETs, even if there is
no file to initialize the low segment. The left half
is a relative quantity because the high segment can
appear at different user origins at the same time.
The SAVE command uses this value to determine
how much to write from the high segment.

Right Haif:

.JBSYM

.JBUSY

116

117

The highest legal address in the high segment. This
value is set by the monitor each time a user program
begins execution or executes a CORE or REMAP
monitor call ..JBHGA allows this value to be any nonzero value. The proper way to test if a high segment
exists is to test this half-word for a non-zero value.

A pointer to the symbol table created by LINK-IO.
Left Half:

The negative length of the symbol table.

Right Half:

The lowest address used by the symbol table.

A pointer to the table of undefined symbols created by LINK-IO
or defined by DDT. If .JBUSY contains a value greater than or equal
to zero, there are no undefined symbols.
The negative length of the undefined symbol table.

Left Half:

June 1976

(

3-2

(

-'·I(

(

~

Job Data Area

(

Table 3-1 (Cont.)
Job Data Area Locations
(for user program reference)
Mnemonic

.JBSA

.JBFF

120

121

(

.JBPFH

Description

Locations

123

Right Half:

The lowest address used by the undefined symbol
table.

Left Half:

The first free location in the low segment, which is
set by LINK-lO.

Right Half:

The starting address of the user's program.

Left Half:

Zero.

Right Half:

The address of the first free location following the
low segment. This value is set to the contents of
.JBSA (left half) each time a RESET monitor call
is executed.

Left Half:

The last address of the page fault handler.

Right Half:

The starting address of the page fault handler. If the
contents of .JBPFH are zero, the user program does not
currently have its own page fault handler. When a
page fault occurs, the monitor will read in
SYS:PFH.VMX to the top of the user program's
virtual address space; the left and right halves of
.JBPFH will be set accordingly .

Left Half:

Unused.

Right Half:

The REENTER start address. This value is set by the
user program or by LINK-lO, and it is used when the
REENTER command is executed as an alternate entry
point.

Left Half:

Zero.

Right Half:

This value is set by the user program as a trap address
when the user is enabled to handle APR traps (such
as illegal memory references, push-down list overflows).
Refer to the APRENB monitor call description,
Chapter 5 .

(

.JBREN

124

I

\
.JBAPR

125

.JBCNI

126

The state of the APR as stored by a CONI APR when a userenabled APR trap occurs.

.JBTPC

127

The PC of the next instruction to be executed after a user-enabled
APR trap occurs. This value is set by the monitor.

3-3

Job Data Area

Table 3-1 (Cont.)
Job Data Area Locations
(for user program reference)
Mnemonic

Description

Locationg

.JBOPC

130

The previous contents of the job's last user mode program counter
(PC). This value is set by the monitor each time a DDT, REENTER,
START, or CSTART commandis executed. Location .JBOPC contains the address of the HALT instruction, when the user program
contains a HALT instruction followed by the execution of a
START,DDT, CSTART, or REENTER command. In order to process at the address specified by the effective address, the user
program must recompute the effective address of the HALT instruction and use that address to start. Similarly, after an error has occurred during execution of a monitor call followed by a START, DDT,
CSTART, or REENTER command, .JBOPC will point to the address
of the monitor call .

.JBOVL

131

Left Half:

Zero.

Right Half:

A pointer to the header block for the root link.

Left Half:

The highest location in the low segment loaded with
a non-zero. If .JBCOR is less than 140, a low segment file will not be written when a SAVE or
SSAVE command is executed. This value is set by
LlNK-lO.

.JBCOR

.JBINT

133

134

(

Right Half:

The user specified argument on the last execution
of a SAVE or GET command. This value is set by
the monitor .

Left Half:

Reserved for the future.

Right Half:

Zero or the address of the error-intercepting block .

.JBOPS

135

Reserved for all object-time systems.

.JBCST

136

Reserved for customers .

.JBVER

137

The program version number; its bit definitions are:
Bits 0-2

=0

indicates that the Digital development group last
modified the program.

=1

indicates that other Digital employees last modified the program.

=2}
=3 indicates that a customer last modified the program.
=4

3-4

(

Job Data Area

Table 3-1 (Cont.)
Job Data Area Locations
(for user program reference)
Mnemonic

Location8

Description

.5}

=6 indicates that a customer's user last modified
=7 the program.

Bits 3-11

Digital's latest major revision number, which is
usually incremented by 1 after a release.

Bits 12-17

Digital's minor version number, which is usually 0,
but may be > 0 if an update is needed to a program
after work has started on the next major release.

Bits 18-35

The edit number, which is increased by 1 after each
edit. This value not reset.

\

The VERSION and the SET WATCH VERSION commands output
the version number in the standard format, refer to the DECsystem-l0
Operating System Commands Manual.
.JBDA

(

140

The first location available to the user .

3.2 VESTIGIAL JOB DATA AREA
Some constants in the job data area may be loaded by a two-segment, one-me program without executing a GET
command, and some locations are loaded by the monitor when a GET command is executed. The vestigial Job
Data Area (the first ten (octal) locations of the high segment) is reserved for these low-segment constants. Therefore, a high segment program is loaded at the high segment origin + 10 (refer to .JBHGA in Table 3-2) instead of
at the high segment origin (refer to Table 3-1). By placing the vestigial job data area within the high segment,
LINK-IO automatically loads the constant data into the Job Data Area without requiring a low segment me when
executing a GET or RUN command, or a RUN monitor call. The SAVE command writes .LOW me for a twosegment program only if the left half of .JBCOR is 140(8) or greater (refer to Table 3-1).

a

(

3-5

Job Data Area

Table 3-2
Vestigial Job Data Area Locations
Mnemonic

Description
8

.JBHSA

0

A copy of .JBSA (Iocation 120 ) in Table 3-1).

.JBH41

1

A copy of .JB41 (Iocation 41 8) in Table 3-1) .

.JBHCR

2

A copy of .JBCOR (Iocation 133 8 in Table 3-1).

.JBHRN

3

Left Half:

Restores the left half of .JBHRL (Iocation 115 8
in Table 3-1).

Right Half:

Restores the right half of .JBREN (Iocation 124 8 in
Table 3-1).

.JBHVR

4

A copy of .JBVER (refer to Table 3-1, location 137 for the bit
definitions).

.JBHNM

5

The high segment name which was set on the execution of a SAVE
command.

.JBHSM

6

A pointer to the high segment symbols, if there are any.

.JBHGA

7

Bits 0-9 indicate the high segment origin. The monitor places the
high segment at location 400000 8 or if the segment is larger than
128K, at the first available page boundary (lK on KAlO systems)
above the low segment. This nine-bit byte should always be zero on
KA10 systems. However, if the field is non-zero on KIlO or KLlO
systems, it is taken as the page where the high segment is to start.
This value is set by LlNK-10. Bits 10-35 are unused fields that are
reserved for future expansion and must contain zero.

.JBHDA
I

Location8

(

\

10

(

(

The first location not used by the vestigial Job Data Area.

Relative to the origin of the high segment, usually .JBHGH = 400000 8.

3-6

(

(
CHAPTER 4
JOB CONTROL AND INFORMATION

4.1 JOB CONTROL
4.1.1 Start Program Execution
One user program may start the execution of another by either the RUN or the GETSEG monitor call (refer to
sections 6.2.1 and 6.2.2. You may start or continue the execution of a user program with any of the following
operating system commands.

(

1.

2.
3.
4.
5.
6.

7.

(

I

R
RUN
START
CSTART
CONT
CCONT
REENTER

Refer to the DECsystem-l 0 Operating System Commands Manual for specific information concerning these commands. The user program's start address can be the argument of a command, or it can be stored in the program's
Job Data Area.

4.1.2 Stop Program Execution
A running program may be stopped in several ways:
1.

2.
3.

You can type one CTRL/C from your terminal if your program is in TTY input wait state (TI)1;
otherwise, you need two CTRL/Cs to stop your program from the terminal.
The program contains a monitor detected error.
The program can execute one of the following monitor calls:
HALT
EXIT function,
LOGOUT ac,

(

see paragraph 4.1.2.1
see paragraph 4.1.2.2
see paragraph 4.1.2.3

4.1.2.1 The HALT Instruction - The HALT instruction is an exception to the illegal instructions rule (refer to
section 1.1.1). HALT traps to the monitor, stops the current job, and prints the following message at your terminal.
?HALT AT USER PC addr
where:

addr is the location of the HALT instruction.

If the HALT instruction is in location 41 and the program executes a user call (op-codes 001 through 037), the
address in the error message will be that of the user call instead of address 41.
To continue the program at the effective address of the HALT instruction (provided that the effective address does
not equal zero or the address of the HALl), you can issue either the CONT or CCONT command from your terminal.
Mter a user program executes a HALT instruction followed by your typing either a START, DDT, CSTART, or
1 The state of a program can be determined by using the USESTAT command or CTRL/T (refer to the Operating System
Commands Manual).

4-1

June 1976

I

Job Control and Information

REENTER command, location .JBOPC in the Job Data Area will contain the address of the HALT instruction.
To continue from the effective address specified, you or your program must recompute the effective address of
the HALT instruction. HALT should not be used to terminate the execution of a program; its main use is to indicate possible error conditions.

(

4.1.2.2 The EXIT Monitor Call (CALLI 12) - The EXIT monitor call will stop ajob (with optional RESET). Its
calling sequence is
EXIT function,
return on a continue
where:

; if function = 1

function is either 1 or O. A 1 stops the job; a 0 performs a RESET and stops the job.

The EXIT monitor call performs the following functions:
1.

2.
3.
4.
5.
6.

All I/O devices (including real-time devices) are RELEASED. }
The job is unlocked from core.
The user mode write-protect bit for the high segment is set.
function 0
The APR traps are reset to zero.
The PC flags are cleared.
The job is stopped.

functions 0 and 1

(

If timesharing was stopped by a TRPSET monitor call, it is resumed by the monitor. Mter releasing all devices that
close files, a RESET is performed. Acarriage return/line feed sequence is performed, and the word EXIT is printed
at the user's terminal, which is left in monitor mode. You cannot type the CONT and CCONT commands to continue the recently stopped program.

I

When the function specified is 1, the job is stopped, and a return is made to monitor mode (EXIT is not printed on
the user terminal). You can type the CONT or CCONT commands to continue the program's execution. In other
words, this form of the EXIT monitor call does not affect the state of your job except to stop it and return your
terminal to monitor mode. Note that programs using EXIT with a function code of 1 (MONRT.) should RELEASE
all devices first.

4.1.2.3 The LOGOUT Monitor Call (CALLI 17) - The LOGOUT monitor call is used by the LOGOUT program to
release all I/O devices associated with the job and to return them to the monitor pool along with the job's allocated
core and job number. If a program other than LOGOUT uses this monitor call, the LOGOUT call functions identically to EXIT (function 0).
4.1.3· Suspend the Execution Of A Job
There are two monitor calls that can suspend the execution of ajob. The SLEEP monitor call suspends execution
for a specified amount of time; the HIBERnate monitor call suspends execution until a specified event occurs.
4.1.3.1 The SLEEP Monitor Call (CALLI 31) - The SLEEP monitor call allows a user program to stop or "sleep"
for a specified number of seconds. Its calling sequence is

MOVEI ac, seconds
SLEEP ac,
only return
where:

seconds is the number of seconds the job is to sleep.

SLEEP will temporarily stop a job and continue it automatically after the specified number of real-time seconds has
elapsed. If the SLEEP monitor call is issued with a zero argument, the job will sleep for one clock tick. The explicit
maximum is approximately 68 seconds (82 seconds in 50-Hz. countries and on the KLIO using 50-Hz.). A program

June 1976

4-2

(

Job Control and Information

(

that requires a SLEEP time longer than 68 seconds should call DAEMON (via the .CLOCK function) to put it to
sleep (refer to DAEMON in section 4.4.3). After invoking DAEMON, the program can use the HIBERnate monitor
call with no clock request and DAEMON will awaken the job.
4.1.3.2 The HIBERnate Monitor Call (CALLI 72) - The HIBERnate monitor call stops the current job until a
specified event occurs. Its calling sequence is
MOVSI ac, bits
HRRI ac, sleep time
HIBER ac,
error return
normal return
where:

I

;or IORI ac, sleep time

bits specifies one or more HIBERnate conditions, as listed in Table 4-1.
sleep time is the number of milliseconds for which the current job is to sleep. This value is rounded up
to an even multiple of jiffies (with a maximum value of 68 seconds). A 0 specifies an infinite sleep
time (Le., no clock request).

(

If the HIBERnate monitor call has not been implemented in the current system, the error return is taken; under this
circumstance, the SLEEP monitor call cart be used.
The normal return is taken after an enabled HIBERnate condition occurs.

(

To prevent a job from oversleeping and missing an event, the monitor sets the wakeup bit (even if the event occurs
while the job is awake). Another HIBERnate monitor call will clear the wakeup bit. A job issuing a monitor call
should test all events that may have caused it to wakeup; however, the job cannot assume that anyone of the events
actually happened.
Privileged jobs (those running with the JACCT bit set or those logged in under [1,2]) can be written to wake any
HIBERnating job.
A RESET monitor call always clears the job's protection code and wake-enable bit. Until the first HIBERnate monitor call, therefore, there is no protection against wakeup commands from other jobs. To guarantee such protection,
the calling job should execute a WAKE monitor calIon itself followed by a HIBERnate monitor call with the desired
protection codes. The WAKE call ensures that the first HIBERnate call takes the normal return immediately, which
leaves the job with the correct protection code. Note that a correctly written program will not fail if it was
aWAKEned for no apparent reason.
4.1.3.3 The WAKE Monitor Call (CALLI 73) - The WAKE monitor call allows one job to activate a dormant job
when some event occurs. Its calling sequence is
MOVEI ac, job number
WAKE ac,
error return
normal return
where:

job number is the number of the job to be awakened. (The number -1 indicates the calling job.)

Real-time process control jobs can cause other process control jobs to run in response to a specific alarm condition.
WAKE can be called from an RTTRP job running at interrupt level, thereby allowing a real-time job to wake its background portion quickly to respond to some real-time condition. (Refer to the RTTRP monitor call for restrictions
on accumulators when using the call at interrupt level.)

(
4-3

June 1976

I

Job Control and Information

Table 4-1
HIBERnate Conditions

I

I

I

Bit

Mnemonic

0

HB.sWP

Job will be swapped out immediately.

10

HB.IPC

The job will be awakened on the delivery of an lPCF packet to an input
queue.

11

HB.RIO

The job will be awakened when asynchronous I/O is finished.

12

HB.RPT

The job will be awakened when PTY activity occurs since the last
HIBERnate.

13

HB.RTL

The job will be awakened when a line of input is ready.

14

HB.RTC

The job will be awakened when a character is ready.

15

HB.RWJ

The HIBERnating job can be awakened only by itself.

16

HB.RWP

The calling job and the HIBERnating job must have the same programmer number ( aWAKE protection code).

17

HB.RWT

The calling job and the HIBERnating job must have the same project
number (a WAKE protection code).

(

Meaning

(

If the calling job does not have the appropriate privileges, the error return will be taken. If any of the enabled conditions specified in the last HIBERnate monitor call occur, the wake bit is set for that job. A wake bit is associated
with each job. At the next HIBERnate call, the wake bit is cleared and the call returns immediately. The wake bit
eliminates the problem of ajob's oversleeping a WAKE condition.
On a normal return, the referenced job will be awake and start at the return location of the HIBERnate that caused
the job to become dormant.

(

4.2 SET OR OBTAIN JOB INFORMATION
There are several monitor calls that can obtain and set system/job information. The user can set the current program's name and set various system/job parameters (like the time between virtual time traps). He can change ajob's
current logical node/station number, or obtain its accumulated run time,job number, or project-programmer
number.
4.2.1 Set The Program Name
The SETNAM monitor call (CALLI 43) allows the user program to set the program name. The calling sequence
for SETNAM is

(

MOVE
ac, [SI)CBIT/name/]
SETNAM ac,
only return
where:

I

name is a left-justified SI)CBIT program name.

SETNAM stores the specified program name in the monitor job table, which is used by the SYSTAT system program. SETNAM performs several addition functions: it clears the SYS: program bit (JB.LSY, which is used by
Batch); it clears the execute-only and JACCT bits; and it causes a version typeout to occur on the user's terminal if
version watching has been enabled by the SET WATCH VERSION command (refer to the DECsystem-lO Operating
System Commands Manual).

(
June 1976

44

Job Control and Information

4.2.2 Set System/Job Parameters
The SETUUO monitor call (CALLI 75) allows the user program to set various system and/or job parameters. To
set system parameters, the calling program must be running with the JACCT bit set in the privilege word, or the
job must be running under [1,2]. The calling sequence for SETUUO is

(

MOVE
ac, [XWD function, arg]
SETUUO ac,
error return
normal return
where:

function is one of the SETUUO function codes listed in Table 4-2.
arg is the argument needed for the specified function. The arguments are also listed in Table 4-2.

The error return is taken if one of the following conditions occurs:

1.
2.
3.

(

The monitor call has not been implemented.
The user is not suitably privileged for the function specified.
The argument is invalid.
Table 4-2
SETUUO Functions

Code

Mnemonic

0

.STCMXl

The largest size that any job may assume (Le., the sum of the high
segment and low segment). The minimum value is)OK unless changed
via MONGEN at monitor generation time. The maximum value is the
size of user (non-monitor) core. (This value is known as CORMAX.)

I

.STCMN 1

The guaranteed amount of contiguous core that a single unlocked job
may assume. The minimum value is 0; the maximum value is the value
of CORMAX. (This value is known as CORMIN.)

2

.STDAy l

A decimal number (in the range 0-2359) representing the DAYTIME
(i.e., time is computed using a 24-hour clock, hours * 100 + minutes) .

3

.STSCH1

An octal argument stored in the right half of the STATES word in
COMMON.

'.

4

.STCDR

Argument

0

regular timesharing

1

no further LOGINS are allowed (except from CTy)

2

no further LOGINs from remote terminals, data sets are not
answered

4

no further LOGINs are allowed (except for Batchjobs)

10

the system is running. stand-alone

100

device mounts without operator intervention are allowed

200

unspooling is allowed

400

no operator coverage

The input name for this job. This value (3-SIXBIT characters) will be
stored in the left half of .STSPL.

IThis is a privileged function.

4-5

Job Control and Information

Table 4-2 (Cont.)
SETUUO Functions
Code

Mnemonic

5

.STSPL2

6.

.STWTC

(

Argument
The bits are 31-35 of .STSPL:
Bit

Mnemonic

Meaning

35

JS.PLP

LPT spooling

34

JS.PPL

PLT spooling

33

JS.PPT

PTP spooling

32

JS.PCP

CDP spooling

31

JS.PCR

CDR spooling

Bits are 18·23 of .STWCH:
Bit

Mnemonic

Meaning

19

ST.WDY

Watch daytime at start.

20

ST.WRN

Watch run time.

21

ST.WWT

Watch wait time.

22

ST.WDR

Watch disk reads.

23

ST.WDW

Watch disk writes

24

ST.WVR

Watch versions.

25

ST.WMT

Watch MTA Statistics

7

.STDATl

The decimal number of days since January 1, 1964. (DATE =((year1964) * 12 + (month - 1) * 31 + day = 1))

10

.STOPR 1

The address of the word which contains the SIXBIT physical name of the
TTY to be used as the Operator terminal.

11

.STKSyl

The decimal number of minutes until timesharing ceases. If 0, time·
sharing is not to be stopped (This value is known as KSYS) .

12

.STCLM 1

The maximum amount of core (in words) for the job. This value is
stored in bits 1-9 (JB.LCR) of .GTLIM (units of 512-word pages) .

13

.STTLMl

The job's time limit in seconds.

14

.STCPU

The CPU specification for this job .

15

.STCRN l

Bit

Mnemonic

CPU

35

SP.CRO

CPUO

34

SP.CRI

CPUl

33

SP.CR2

CPU2

32

SP.CR3

CPU3

31

SP.CR4

CPU4

30

SP.CR5

CPU5

Bits which indicate a CPU's runnability. If bit 35
If bit 34 = 1, CPUI is runnable, and so on.

/
\

(

= 1, CPUO is runnable.

lThis is a privileged function.
2 This is not a privileged function unless the user is unspooling devices.

(

"
4-6

Job Control and Information

Table 4-2 (Cont.)
SETUUO Functions

(
Code

Mnemonic

Argument

16

.STLMX1

The maximum number of jobs allowed to be logged in at anyone time.
The maximum value for this symbol is JOBN, which is the system limit
speCified at monitor generation time via MONGEN. The minimum value
is 1. If LOG MAX is a value smaller than the number of jobs currently
logged in, no new jobs are allowed to LOGIN until enough current jobs
LOGOUT to get the system below LOGMAX. The number of jobs currently logged in (referred to as LOGNUM) can be obtained from the
GETT AB table .GTCNF, item number 54 (%CNLOG). (This value is
referred to as LOGMAX. )

17

.STBMX1

The maximum number of Batch jobs that are allowed to be logged-in concurrently (BATMAX). The maximum value is the smaller of either the
BATCON limit of 14 or the system limit of JOBN. The initial value is 14.
The number of jobs currently logged-in (BATNUM) can be obtained from
the GETTAB table .GTCNF, Item Number 55 (%CNBAT) .

20

.sTBMN l

The number of jobs guaranteed for batch jobs (BATMIN). The maximum
value is either the BATCON limit of 14 or the value of JOBN-l (one job
must be reserved for BATCON), whichever is smaller. The initial value
is O. Therefore, the maximum number of non-Batch jobs is JOBN minus
BATMIN .

21

.STDFL2

DSKFUL for this job. An argument of 0 (.DFPSE) causes a pause and an
argument of 1 (.DFERR) causes an error when the disk is full or the user's
quota is exceeded. The current setting can be obtained by using an argument other than 0 or 1. The value returned in the AC is either 0 or 1
depending on whether PAUSE or ERROR is set. The initial setting is
ERROR .

22

.STMVM 1

The system-wide virtual memory limit. The value returned on a normal
return is dependent on the value of the call's argument. The returned
value will be either:

(

1.

2.
3.
23

.STMVRI

The total amount of virtual memory in use by VM users, if the
current argument is less than the current virtual memory page
count.
The total amount of available swapping space, if the argument
is greater than the current available swapping space.
The call's argument, if the argument is greater than the total
amount of virtual memory currently in use .

The address of the word that contains either the SYSTEM or the JOB
designation and the virtual memory page fault rate.
Left half =0:
Set the system-wide page fault rate to RATE.
Left Half = 1:

(

Set the per-job page fault rate for this job to RATE.
Right Half =RATE:
The number of page faults per CPU second.

(

IThis is a privileged function.
2 This is not a privileged function unless the user is unspooling devices.

4-7

Job Control and Information

Table 4-2 (Cont.)
SETUUO Functions
Code
24

Mnemonic
.STUVM 1

Argument
The address of the word that contains the maximum virtual memory page
limit and the maximum physical page limit.
Left half = maximum virtual page limit.
Right half = maximum physical page limit.
If the left half of the word contains zero, the user cannot utilize the
virtual memory option. If the right half of the word contains zero, all
of core is indicated .

25

.STCVM2

The user's current virtual memory maximum, which is stored in a word
with the format:
Right half = current virtual page guideline
Left half =current virtual page limit
If either the left half or the right half is zero, the current value is unchanged.
Ifbit 18 = 1, bits 19-25 contain the guideline.

26

.STTVM

The time interval between virtual time traps in milliseconds. This type of
trap causes a code 5 page fault to the page fault handler each time the time
interval has elapsed.

27

.STABK

The address break condition. On a normal return, the new address break
condition and the break address will have been set. Address conditions are:
0

Break on EXECUTE

1

Break on READ

2

Break on WRITE

3

Break on the execution of a monitor call

(

Bits 9-17 contain a quantity that specifies the number of times the break
address is to be referenced before the interrupt occurs.
Bits 18-35 contain the break address.
Note that if bits 0,1,2, and 3 are equal to 0, the address break is cleared.
If the user is enabled for address break interrupts, the software interrupt
system will interrupt when an address break occurs.
30

.STPGM

Set the program to run .

31

.STDER

Set deferred spooling .

IThis is a privileged function.
2This is not a privileged function unless the user is unspooling devices.

4.2.3 Set The Logical Node
A user program (via LOCATE, CALLI 62) can change a current job's logical node number. The calling sequence
for the LOCATE monitor call is
MOVE
ac, [SIXBIT/node-name/]
MOVEI
ac, station-number
LOCATE ac,
error return
normal return

(

4-8

Job Control and Information

(

where:

node-number can be one of the following:

-1

Changes the job's location to the physical node of the job's terminal.

o

changes the job's location to that of the central station.

n

changes the job's location to node number n.

The normal return is taken when the node number or name has been defined and the node is in contact with the
central site. Subsequent generic device specifications are associated with the new node number/name.
The error return is taken if
1.
2.
3.

the monitor call has not been implemented,
an illegal node number was specified,
or, the node specified was not in contact.

The following is an example to logically locate a job at node number 3.

(

MOVEI
LOCATE
JRST
JRST

AC1,3
AC1,
ERROR
WINNER

For more information about remote operation, refer to future editions of the REMOTE STATION USER'S GUIDE.

,(

"

4.2.4 Obtain Run Time
The RUNTIM monitor call (CALLI 27) can be used to obtain a specified job's accumulated run time. The calling
sequence for RUNTIM is
MOVEI
RUNTIM
only return
where:

ac, job-number
ac,

job-number is the number of the job whose accumulated run time is requested. A job-number of
o returns the current job's run time.

On a return, the accumulated run time (in milliseconds) is returned as a right-justified quantity in the AC. If the
specified job number does not exist, 0 is returned in the AC.
4.2.5 Obtain The Job Number Of The Calling Job
The PJOB monitor call (CALLI 30) obtains the number of the calling job. PJOB's calling sequence is
PJOB ac,
only return
On a return, the job number of the calling job is returned right-justified in the AC.

4.2.6 Obtain The Project-programmer Number Of The Calling Job
The GETPPN monitor call (CALLI 24) obtains the project-programmer number associated with the callingjob. Its
calling sequence is
GETPPN ac,
normal return
.alrernate return
On hOfh a i:ormal return and an alternate return, the project number is returned in the left halfof the AC; the
plugr;; ·nmf'f number is returned in the right half.
4-9

June 1976

Job Control and Information

The alternate (skip) return is taken if the calling program is running with the JACCT bit set, and the projectprogrammer number is associated with another logged-in job.

4.2.7 TheOTHUSR Monitor Call (CALLI 77)
The OTHUSR monitor call helps the user program determine if its project-programmer number is logged-in for one
or more other jobs, OTHUSR's calling sequence is
OTHUSR ac,
normal return
alternate return
On a return, the specified AC will contain the project-programmer number of the job executing the OTHUSR monitor call. The call has two return points: normal return (non-skip) and alternate (skip) return. The normal return
is taken· if one of the following occurs.

1.
2.

The monitor call has not been implemented, in which case the AC remains unchanged.
The monitor call is implemented and no other job is logged-in with the same project-programmer
number, in which case the AC contains the calling job's project-programmer number.

(

The skip return is taken only if the monitor call is implemented, and one or more other jobs are logged-in with the
same project-programmer number as that of the calling job. OTHUSR is utilized by KJOB.
4.3 TIMING INFORMATION
There are three methods of generating timing information: the APR clock (KA1 O/KIl 0), the DKIO (internal
accounting clocks) (KA10/KIlO), and internal clocks (EBOX,MBOX on the KLlO).

(

The APR clock, driven by the power source frequency (60 Hz. in North America, 50 Hz. in most other countries),
is accurate over long periods of time. For this reason, it is used to keep the time of day (e.g., for the TIMER call).
This clock can also account for the processor time used by each job. In this application, however, the APR clock
loses some accuracy, because its tick is often longer than ajob's run time period.
The DKIO clock (lOOK Hz.) is accurate over short periods of time. If it is present in the system, it can be used to
account for processor run time instead of the APR clock. The DKlO clock, however, is more accurate than the
APR clock.
KLlO processor systems have two types of system runtime, called high precision runtime and EBOX/MBOX
runtime. All runtimes that are reported by the system (e.g., RUNTIME monitor call, TIME command, USESTAT
command, CTRL/T, and GETTAB table .GTTIM) can be selected to be of either type. The type of runtime reported is determined by the value of bit ST%EMR (bit 20) in item %CNST2 of GETTAB table .GTCNF.
ST%EMR equal to 1 selects EBOX/MBOX runtime.
EBOXjMBOX runtime is computed from the KLlO accounting meters, and is designed to be a highly reproducible measure of the amount of work a user job has accomplished. High precision runtime, which is the same
as that used on KIlO and KAlO systems with DKlOs, uses 10 microseconds resolution elapsed time on the
CPU.
Note that EBOX/MBOX runtime cannot be compared with any other type of runtime. The relationship between
EBOXjMBOX runtime and elapsed time on the CPU is not direct; it depends on the cache hit rate, memory
speed, and other factors.

I

With all of these clocks, monitor overhead can optionally be included in the run time statistics for the current job.
This parameter is set during Monitor Generation Time via MONGEN. Monitor overhead is the CPU time spent in
tasks like clock queue processing, command decoding, core shuffling, swapping, and scheduling.
June 1976

4-10

(

Job Control and Infonnation

The traditional DECsystem-lO date (which can be obtained via the DATE monitor call) is a IS-bit integer. This
integer is incremented by 1 each day, by 31 each month (regardless of the actual number of days in the month), and
by 12 * 31 each year (regardless of the actual number of days in the year). The date format is easily resolved into
the year-month-day format; however, the difference between two dates in this format is not necessarily the actual
number of days between the two.
For convenience, the local (host computer) time can be converted to a universal date-time standard, where the
word's left half is the day, and its right half is the time. This day is uniformly incremented at midnight, with 1 equal
to November 18, 1858. The November date is used for consistency with the Smithsonian Astronomical Date
Standard and other computer installations and systems. (Refer to GETTAB Table Number 11, Item Number 64.)
The time is specified as a fraction of the day, allowing the 36-bit value to be in units of days,with a binary point
between the right and left halves of the word. The resolution is approximately one-third of a second (i.e., the least
significant bit (bit 35) represents approximately one-third of a second).

4-10.1

I

Job Control and Information

(

The monitor maintains a set of GETTAB values which give the local date and time in terms of year, month, day,
hours, minutes, and seconds. (Refer to GETTABTable Number 11, Items 56 through 63.)
4.3.1 The DATE Monitor CaU (CALLI 14)
The DATE monitor call returns the current date. Its calling sequence is
DATE ac,
only return
The current date will be returned in the AC as a right-justified IS-bit integer. This date is computed using the
formula

««(year - 1964)
where:

* 12) + (month

- 1)

* 31 + (day

I

- 1») = date

January 1, 1964 is the base date.

4.3.2 The MSTIME Monitor Call (CALLI 23)
The MSTIME monitor call returns the current time of day. Its calling sequence is
MSTIME ac,
only return
The time is returned in the AC (in milliseconds) as a right-justified binary integer.
4.3.3 The TIMER Monitor Call (CALLI 22)
The TIMER monitor call returns the day time in jiffies, right-justified in the AC. Its calling sequence is
TIMER ac,
only return
A jiffy is 1/60 of a second (16.2 milliseconds) for 60-cycle power and 1/50 of a second (20 milliseconds) for 50cycle power. MSTIME should normally be used so that the time is not a function of the power.
4.4 CONFIGURATION INFORMATION

(

4.4.1 The SWITCH Monitor Call (CALLI 20)
The SWITCH monitor call returns the contents of the central processor data switches in the specified AC; its calling
sequence is
SWITCH ac,
only return
Users should issue this call with caution because the data switches are an allocated resource and are always available
to all users. This call is meaningful only for KAlO and KIlO systems, since the KLlO has no data switches.
4.4.2 The LIGHTS Monitor Call (CALLI -1)
The LIGHTS monitor call displays the contents of the AC in the console lights. The calling sequence is
LIGHTS ac,
only return
This monitor call is meaningful only for KAlO and KIlO systems, because the KLlO has no console lights.

4-11

March 1976

Job Control and Information

4.4.3 The DAEMON Monitor Call (CALLI 102)
The DAEMON monitor call invokes the DAEMON system program to perform a specified function. The calling
sequence for DAEMON is

(

MOVE
ac, [XWD length,addr]
DAEMON ac,
error return
normal return
addr: function
argument list

where:

length is the number of arguments in the list plus one. If this number is fixed, length is zero.
addr points to the first word of the argument list.
function is the code of the DAEMON function desired. All DAEMON functions are described in
Table 4-3. Some function codes are privileged; to use these, the user program must be running with
the JACCT bit set or the user must be logged-in under [1,2] .

(

argument list varies with the function code specified; the possible arguments are described along with
the DAEMON functions codes in Table 4-3.

Table 4-3
DAEMON Functions
Code

Mnemonic

Arg Block

Meaning

1

.DCORE

1
SIXBIT / dev /
SIXBIT / file /
SIXBIT / ext /
0,,0

Writes a dump file of the current job's core
area. If argument list is omitted, the default
is the same as default for DCORE. Refer to
the Operating System Commands Manual.

2

.CLOCK

2
seconds

Enters a request in the clock queue awaken
the current job after a specified number of
seconds have passed. As soon as the request
has been entered into the queue, the HIBER
call should be used with no clock request.
An argument of 0 clears the job's entry in
the clock queue and wakes the job.

31

.FACT

3

Makes entry in the system accounting file
(FACT). The FACT file entry must be less
than 20 octal words in length. The entry will
not be instantly written in FACT.SYS, but
may be stored in core for as long as ten
minutes.

argl

arg208
51

.DMERR

(

Makes an entry in the error file; the block-2
is put into the error file.

5

code
word 1

word2

(

1This is a privileged function.

4·12

(
CHAPTER 5
TRAPPING, INTERCEPTION, AND INTERRUPTION
The execution of a program is normally performed in a sequential manner, whereby one instruction is executed followed immediately by the next and so on. By using skip and branch instructions, it is possible for a program to
deviate from the normal sequential method of execution. Deviation from normal program flow may also be accomplished by trapping to user trap-servicing routines (APRENB monitor call), enabling for error interception (utilizing
.JBINT), or using the software interrupt system.
Using trap-servicing routines and error interception are simple methods for controlling error conditions; the software
interrupt system is much more general and complex.

(

APR trapping allows a user program to handle traps that occur while the job is running, including illegal memory
references and push·down list overflows. Error interception may be used when certain conditions occur in a user
program. The monitor will intercept, when the condition occurs, and will examine location .JBINT in the Job Data
Area. The monitor does this to find out whether or not an error interception routine has been prOVided. In addi·
tion, the monitor provides a generalized software interrupt mechanism for interrupting the sequential flow of operation under a wide variety of special conditions.
Two important reasons for wishing a program to deviate from simple sequential operation are as follows:
1.

(,

2.

The program may wish to respond to special conditions without testing for them wherever they may
occur. For example, it is possible for a program to test for an arithmetic overflow condition after every
instruction that might cause the condition to occur. However, it is easier to have normal sequential
operation interrupted each time an overflow occurs and then have control transferred to an error
routine.
A program could respond to asynchronous events without testing for those events repeatedly. For
example, some programs react to CTRL/C by taking a special action rather than permitting control to
be returned immediately to monitor level.
If a program were to test regularly and frequently for the possibility of a user typing a CTRL/C, an
unreasonable constraint would be placed on the program's design. The program instead could be interrupted each time a CTRL/C was typed; control would be transferred to a special processing routine
before control would be returned to the monitor. The interrupt would eliminate the need for repeated
testing.

f

\.

5.1 USER TRAP SERVICING
The APRENB monitor call (CALLI 16) enables a user program for trap servicing. The calling sequence for
APRENB is

MOVEI
ac, flags
APRENB ac,
only return
where:

(

flags specifies the central processor flags to be tested on a trap condition. The sequence for APRENB
flags that may be set are listed in Table 5-1.

When one of the specified conditions occurs while the central processor is in user mode, the state of the central
processor is conditioned (CONI) into the Job Data Area location .JBCNI, and the PC is stored in location .JBTPC

5-1

Trapping, Interception, and Interruption

Table 5-1
APRENB Flags

(

Mnemonic

Value

Bit

Trap Condition

AP.REN
AP.POV
AP.lLM
AP.NXM
AP.PAR
AP.CLK
AP.FOV
AP.AOV

400000
200000
20000
10000
4000
1000
100
10

18
19
22
23
24
26
29
32

Repetitive enable.
Pushdown list overflow.
Memory protection violation.
Non-existent memory flag.
Parity error.
Clock tick flag.
Floating point overflow.
Arithmetic overflow.

in the Job Data Area. After the arithmetic and floating point flags have been cleared, control is transferred to the
user trap-servicing routine specified by the contents of the right half of .JBAPR in the Job Data Area. The job is
stopped, however, if the PC is equal to the first or second instruction in the user's trap-servicing routine.
The user program must set up location .JBAPR before executing the APRENB monitor call. To return control to
the interrupted program, the user's trap-servicing routine must execute a JRSTF .JBTPC, which clears the bits that
have been processed and restores the state of the processor.
The APRENB monitor call normally clears traps for only one occurrence of any selected condition, and it must be
reissued after each trap. To disable this feature, the user program can set bit 18 to a 1 when executing the monitor
call. However, even when bit 18 equals 1, clock interrupts must be reenabled after each trap.
If the user program does not enable for traps, the monitor sets the processor to ignore arithmetic and floating-point
overflows, but the monitor enables interrupts for other error conditions in the list above. If the user program produces such an error condition, the monitor will stop the user j ob and print one of the following messages:

(
'-

?ILL MEM REF AT USER PC addr
?MEM PAR ERROR AT USER PC addr
?NON-EX MEM AT USER PC addr
?PC OUT OF BOUNDS AT USER PC addr
?PDL OV AT USER PC addr
After one of the above messages, the CONT and CCONT commands will not succeed.
5.2 ERROR INTERCEPTING
When certain conditions occur in a user program, the monitor intercepts them and examines location .JBINT in the
Job Data Area. Depending on the contents of this location, control is either retained by the user program or it is
transferred to the monitor. If this location contains zero, the job will be stopped, and the user (and possibly the
operator) will be notified with an appropriate message, if any. If location .JBINT contains a non-zero value, the
contents of the location will be interpreted as the address of a block that has the following format:
lac:
loc+l:
loc+2:
loc+3:

where:

XWD
XWD

n, intloc
bits, class

0
0

"-

n is the number of words in the block which must be at least 3.
intloc is the location at which the program is to be restarted.
bits may be 0 or 1 as described below:

5-2

(

Trapping, Interception, and Interruption

bit 0 = 1 causes an error message, if any, to be printed on the user's terminal and/or the
operator's terminal.

(

class contains bits which may be set to determine the action taken on a given error condition; the class
bits are listed in Table 5-2.
For each type of error condition, there is an associated class bit. The job is interrupted for an error only if the
appropriate bit in the class word is 1 and loc+2 contains zero. The job will be stopped if the appropriate bit is 0 or
if the contents of loc+2 is not zero. The requirement that loc+2 contains zero precludes a loop.
Therefore, the monitor examines the class bits and loc+2 to determine whether to stop or interrupt the job after an
error occurs. If the monitor interrupts, it stores the follOWing information in loc+2 and loc+3:
Ioc+2:

the last user PC word

loc+3:

Right Half: the channel number (if applicable)
Left Half: the error bit as defined in class

The j ob is then restarted from the location specified in intloc.

(

Table 5-2
Error Intercepting Class Bits
Bit

Mnemonic

35

ER.IDV

Error Condition
A device error occurred that can be corrected by human intervention. The following
message is printed
DEVICE xxx OPR zz ACTION REQUESTED

(

where xxx is the device name, and zz is the operator's station number. The following
message is printed on the operator's terminal:
%PROBLEM ON DEVICE xxx FOR JOB n
where xxx is the device name, and n is the job number of the job stopped. When the
operator has corrected the error and continued the job with the JCONT command,
the message
CONTBYOPR
appears on the user's terminal to indicate that the error has been corrected.

(

34

ER.lCC

A user has typed a CTRL/C, interrupting the program. This interrupt allows the user
program to process a CTRL/C instead of returning the job automatically to monitor
level when a CTRL/C is typed, but it will instead trap to the user's interrupt routine.
No messages will be printed on either the user's terminal or the operator's terminal.
When this bit is set, the job should normally exit immediately by releasing any special
resources and issuing an EXIT monitor call. The CONT command can be issued by
the user to continue the job.

33

ER.OFL

A disk unit has dropped off-line. The following message is printed on the user's
terminal:
DSK IS OFF-LINE. WAITING FOR OPERATOR ACTION. TYPE-C
TO GET A HUNG MESSAGE (IN 15 SECONDS). DON'T TYPE ANYTHING WAIT FOR THE OPERATOR TO FIX THE DEVICE.
If the user has a system resource, this additional message will be printed on the user's
terminal:

(

THE SYSTEM WILL DO NO USEFUL WORK UNTIL THE DRIVE IS
FIXED OR YOU TYPE A -C

5-3

Trapping, Interception, and Interruption

Table 5-2 (Cont.)
Error Intercepting Class Bits
Bit

(

Error Condition

Mnemonic

The following message is printed on the operator's termip.al:
UNIT xxx WENT OFF-LINE (FILE UNSAFE)l
PLEASE POWER DOWN AND THEN TURN IT ON AGAIN
32

ER.FUL

A file structure has been filled with data (i.e., there are no free blocks). There will be
no messages printed.

31

ER.QEX

The user's disk quota has been exhausted. The following message is printed on his
terminal:
[EXCEEDING QUOTA file-structure name]

30

ER.TLX

The user's run time limit, as set by the SET TIME command, has been exhausted.
This error condition applies only to non-BATCH jobs. The following message is
printed on the user's terminal:
?TIME LIMIT EXCEEDED

29

ER.EIJ

The job has a fatal error. The following are a few of the possible error messages which
may be printed on the user's terminal:
?ILLEGAL DUO AT USER PC addr
?ADDRESS CHECK AT USER PC addr
?PC OUT OF BOUNDS AT USER PC addr

(

1 only if the disk went unsafe

The following example shows how to enable and handle a CTRL/C intercept. Note that the user is returned to
monitor level as quickly as possible.

LOC
EXP
RELOC
INTBLK: XWD
XWD

134

INTBLK
4,INTLUC
0,2

Z
Z

:SET POINTER IN .JBINT
:TO THE INTERRUPT BLOCK
:4 WORDS LONG"PLACE TO START
;NO MESSAGE CONTROL"TYPE 2 (-C)
;GETS LAST USER PC
:LH GETS INTERRUPT TYPE

(
\

JTHE INTERRUPT ROUTINE STARTS HERE
INTLOC: MOVEM
HLRZ
CUE
HALT

EXIT
l-lOVE
EXCH
PUSH
SETZM
POPJ
TEMP1:

Z

1,TEMPl
1,INTBLK+3
1,2

1,

1,INTBLK+2
1,TEMPl
P,INTBLK+2
INTBLK+2
p,

:SAVE AC 1
:GET REASON FOR INTERRUPT
:SEE IF CONTROL-C
:ERROR IF NOT
:RELEASE ANY SPECIAL RESOURCES HERE
:BUT BE CAREFUL THAT THIS DOES NOT
:TAKE VERY LONG OR CAUSE A LOOP.
:RETURN TO MONITOR
:GET RETURN PC
:RESTORE AC
:SAVE RETURN ADDRESS
:CLEAR INTERRUPT TO ALLOW ANOTHER ONE
:RETURN TO WHERE PROGRAM STOPPEU
:TEMPORARY
5-4

\-

Trapping, Interception, and Interruption

/
\

The following example shows processing of a user CTRL/C by a program that prevents return to the monitor by
means of a CTRL/C.

LOC
EXP
RELOC

134

INTBLK

INTBLKI 3,INTLOC
XWD
0,2
Z
Z

:SET UP .JBINT TO POINT TO
:THE INTERRUPT BLOCK
:3 WORDS LONG"PLACE TO START
:NO MESSAGE CONTROL"TYPE 2 (~cj
:GETS LAST USER PC
:LH GETS INTERRUPT TYPE

,THE INTERRUPT ROUTINE
INTLOC: SKIPL
JRST

(

(

(

RENFLA
.+3

SETZM
JRST

INTBLK+2
REENRT

SETOM

RENSWH

PUSH
SETZM
POPJ

P,INTBLK+2
INTBLK+2
P,

:OK TO FAKE A REENTER?
:NO, CURRENT ROUTINE CANNOT BE
:INTERRUPTED.
:YES, RE-ENABLE INTERRUPT AND GO
:TO INTERRUPT ROUTINE
:SET FLAG TO SAY "REENTER AS SOON AS
: YOU CAN"
:GET LAST PC, PUSH/POP
:RE-ENABLE INTERRUPT
:GO BACK TO INTERRUPTED ROUTINE
:NOTE THAT IF A CONTROL-C IS
:TYPED AFTER THE SETZM, THE
:INTERRUPTS NEST.

5.3 SOFTWARE INTERRUPT SYSTEM
The Software Interrupt System is a generalized mechanism for interrupting sequential program execution under a
wide variety of conditions. An interrupt allows the system to respond dynamically to external conditions, and to
requests for servicing error conditions. The monitor transfers control to a specified routine that services the interrupt. After interrupt servicing is complete, a transfer of control is made to the point of interruption (from which
point normal execution will proceed).
The Software Interrupt System is initialized by the PIINI. monitor call. PIINI. allows the user program to specify
the base address of an interrupt vector containing one or more four-word interrupt control blocks that control the
operation of the Software Interrupt System. Note that the interrupt vector block must be in page O. After initializing the Software Interrupt System, the user program must turn the system on with the PISYS. monitor call. This
call also specifies
the conditions on which the user wishes control to be passed to an interrupt servicing routine, and
the location of the appropriate interrupt control block (specified as an offset from the base of the
interrupt vector).
Interrupts occur after the execution of one instruction and before the execution of the next. When an interrupt
condition occurs, the monitor first determines if this type of condition is to cause a transfer of control to an interrupt servicing routine. If a transfer is to take place, control will be transferred to the location specified in the
appropriate interrupt control block. If not, the condition's default action will occur. Figure 5-1 charts the software interrupt process.

(
5-5

Trapping, Interception, and Interruption

(
PROGRAM (USER)
LEVEL

INTERRUPT
LEVEL

INTERRUPT
CONDITION
OCCURS

THE INTERRUPT
SERVICING ROUTINE
YES -----t~ DESIGNATED BY THE
APPROPRIATE IN·
TERRUPT CONTROL
BLOCK
NO

TAKE DEFAULT
ACTION (E.G., DO
NOTHING, STOP
JOB, PRINT ERROR
MESSAGE)

(
DEBRK.
MONITOR CALL

USER PROGRAM

Figure 5-1. Software Interrupt Process
After an interrupt request has been granted, the program operates at interrupt level until the user issues a DEBRK.
monitor call. DEBRK. dismisses the interrupt, re-enables the interrupt control block (if it was disabled), and causes
any pending interrupt requests to be granted. If there are no pending interrupt requests, the user program will be
restarted as though no interrupt had occurred.
The granting of an interrupt request does not change any of the conditions causing the interrupt. If a user program
issues a DEBRK. monitor call without doing anything else, the result will be the same as if the interrupt condition
was neve~ enabled. However, any special action (e.g., stopping the job on a CTRL/C) is not taken. The mortitor does
not clear any reason bits on the DEBRK. monitor call; the user program must clear these bits. EXCEPTION: If the
interrupt occurs while the monitor is executing a call for the user program, that call will be aborted. The only conditions which can cause interrupts during the processing of monitor calls are error conditions in the calls themselves.
All other interrupt conditions are deferred until the monitor call exits.
5.3.1 Interrupt Conditions
The interrupt conditions that can be requested by a user program are divided into two categories: I/O interrupts
and non-I/O interrupts. For any device, the user program can specify interrupt processing for one or more of the
I/O conditions listed in Table 5-3.

5-6

(

Trapping, Interception, and Interruption

Table 5-3
I/O Interrupt Conditions
Meaning

Bit

Mnemonic

Meaning

PS.RID

Input done.

24

PS.RDO

Device off-line.

20

PS.ROD

Output done.

25

PS.RDF

Device full.

21

PS.REF

End-of-file.

26

PS.RQE

Quota exceeded.

22

PS.RIE

Input error.

27

PS.RWT

I/O wait.

23

PS.ROE

Output error.

Bit

Mnemonic

19

The non-I/O interrupt conditions are listed in Table 5-4.
5.3.2 Interrupt Control Block
The Interrupt Control Block is the controller of the Software Interrupt System. It keeps track of
the instruction that was last executed when an interrupt occurred,
The location of the interrupt servicing routine for processing the current interrupt, and
the reason for the current interrupt.
There may be more than one interrupt condition associated with the same interrupt control block, but the preferred usage is to associate one interrupt condition with one interrupt control block. An interrupt control block is
represented in Figure 5-2.

(

o

35

17 18

control flags

new PC

.PSVNP

old PC

.PSVOP

I

reasons

status word

.PSVFL
.PSVIS

(
Figure 5-2. Interrupt Control Block
where:

new pc is the location of the rOU,tine that will service the interrupt.
old pc is the current contents of the program counter (PC) at the time of the interrupt. If a monitor
call is executed, old PC will contain the address of the call's return location (either error return or
normal return). If an attempted monitor call is aborted, old pc will contain the address of the monitor
call.
control flags are used to indicate the circumstances under which an interrupt is to occur (refer to
Table 5-5).
reason is the type of interrupt condition that has occurred (refer to Table 5-3)_
status word contains status information pertinent to the type of interrupt detected. This information
is listed in Table 5-4 for those conditions that cause information to be returned in the status word.

5-7

Trapping, Interception, and Interruption

Table 5-4
Non-I/O Interrupt Conditions
Code
-1

Mnemonic
.PCTLE

-2

Interrupt Condition
The time limit for a job has been exhausted. (Applicable only for non-Batch jobs) .
The run time (in milliseconds) for the job is returned in the status word.
Reserved for Digital.

-3

.PCSTP

A CTRL/C has been issued from a user terminal. If the terminal is in input-wait state
when this interrupt occurred, bit 0 in the status word will contain a 1.

4

.PCUUO

A monitor call is about to be processed. The status word contains the monitor call
that was executed.

-5

.PClUU

An illegal monitor call has been executed. The status word contains the illegal
monitor call.

-6

.PCIMR

An illegal memory location has been referenced .

-7

.PCACK

An address check has occurred. The status word will contain the device name .

-10

.PCARI

An arithmetic exception has occurred_

-11

.PCPDL

A push-down list overflow has occurred .

-12

I

(

(

Reserved for Digital.

-13

.PCNXM

A non-existent memory location has been referenced .

-14

.PCAPC

The line frequency clock has ticked. The status word will contain the universal date/
time word.

-15

_PCUEJ

A fatal error has occurred in the user'sjob.

-16

.PCXEJ

An external condition has caused a fatal error in the job .

-17

.PSKSY

A KSYS warning has occurred. The status word will contain the minutes left until
KSYS.

-20

.PCDSC

The dataset status has changed. The status word will contain the new dataset status .

-21

.PCDAT

Either an ATTACH or a DETACH monitor call has been executed. If DETACH, the
status word will contain a -1; if ATTACH, the status word will contain the TTY's UDX
(universal device index).

-22

.PCWAK

AWAKE monitor call has been executed . The status word will contain the job number
of the waker.

-23

.PCABK

An address break condition has occurred .

-24

.PCIPC

The job has received an IPCF packet in its input queue. The status word will contain
the length of the packet in its right half, and the right half of the flags word in its left
half.

-25

.PCRMC

Reserved .

-26

.PCQUE

An ENQ/DEQ resource is available for ownership. The request ID is returned in the
status word.

(

(

5.3.3 Initialize the Software Interrupt System
The PUNI. monitor call (CALLI 136) initializes the software interrupt system. Its calling sequence is
MOVEI
ac,addr
PUN!.
ac,
error return
normal return

(
5-8

Trapping, Interception, and Interruption

where:

addr is the base address of the interrupt vector block. Note that the interrupt vector block must be in
page 0 on a VM system.

The PIINI. monitor call performs the following functions:
1.
2.
3.

It turns off the software interrupt system.
It unlinks any devices with which enabled interrupt conditions are associated.
It stores the base address of the interrupt vector block.

Table 5-5
Control Flags
Bit

0

(

Meaning

Mnemonic
Reserved to Digital.

1

PS.VPO

Disable all interrupts until a PISYS. monitor call re-enables them.

2

PS.VTO

Disable all interrupts until a DEBRK. monitor call is executed.

3

PS.VAI

Allow additional interrupts to be received by this interrupt block. Normally, no other
interrupts for the current block are permitted until a DEBRK. monitor call is executed.
The use of this bit is not recommended since it could interrupt the service routine and
therefore lose information.

4

PS.VDS

Dismiss any additional interrupt requests for this control block that are received while an
interrupt is in progress. This bit is useful if the interrupt service routine wants to perform
functions that would cause another interrupt.

5

PS.VPM

Print the standard message (if any relevant to this interrupt condition).

6

PS.VIP

This bit indicates that an interrupt is in progress for this block. The user should clear this
bit at the start of the program. It is set and cleared by the monitor as interrupts are processed, and it should not be altered by the user.

5.3.4 Control the Software Interrupt System
The PISYS. monitor call (CALLI 137) allows a user program to control the Software Interrupt System. Its calling
sequence is
MOVE ac,fflags"addrj
PISYS. ac,
error return
normal return

addr: type
vector-offset"enabled reasons
0,,0
where:

flags may be set which control the software interrupt system (see Table 5-6).
addr points to the first word of the three-word interrupt argllment block.
type (.PSECN) specifies a device or a condition to be associated with the interrupt. The type can be one
of the following:
.
SIXBIT /device-name/
channel-number
UDX (universal device index)
a negative number specifying a non-I/O condition (see Table 5-3)

vector offset (left half of .PSEOR) is the offset from the base address of the four-word interrupt control
block to be associated with this interrupt condition.
5-9

Trapping, Interception, and Interruption

enabled reasons (right half of .PSEOR) specifies the type of interrupt desired. This half-word should be
zero, if a device is not specified by type (refer to Table 5-3 and Table 5-4).

I

(

The PISYS. monitor call is the primary means by which the user program can control the software interrupt system.
The call accepts a three-word argument block that specifies the type of condition the user wishes to service with an
interrupt servicing routine. It also specifies the offset from the interrupt vector base address that points to the
appropriate interrupt control block. Since each interrupt control block is four words long, the offset is always
specified in multiples of four words.
Table 5-6
Argument Block Flags
Bit

Mnemonic

1

PS.FOF

Turn off the interrupt system.

2

PS.FON

Turn on the interrupt system.

3

PS.FCP

Clear all pending interrupts.

4

PS.FCS

Clear all pending interrupts for a specified device.

5

PS.FRC

Remove the specified device or condition.

6

PS.FAC

Add the specified device or condition.

Meaning

The possible error codes resulting from a PISYS. monitor call are listed in Table 5-7.
Table 5-7
PISYS. Error Codes
Code

Mnemonic

0

PSTMA%

The right half of the AC is non-zero; no bits in the left half require an
argument block.

1

PSNFS%

The left half of the AC does not have any function bits set.

2

PSUKF%

The left half of the AC contains function bits which have been set but have
no defined meaning.

3

PSOOF%

The bits in the left half of the AC that turn the system on and off have
been set.

4

PSUKC%

The contents of addr do not specify a valid address.

5

PSDNO%

The device specified by the contents of addr has not been INITed for this
job.

6

PSPRV%

A restricted (illegal) condition has been specified.

7

PSIVO%

The vector table offset is too large or not a multiple of four words. A
GETT AB table (Table number 11, item number 76) provides the maximum
value that the vector offset may assume.

10

PSUKR%

An invalid bit was set in word 3 of the argument block; word 3 should be
all zeroes.

I

11

Meaning

Reserved.

12

PSNRW%

The reserved half-word (the right half of word three) is non-zero.

13

PSPND%

A PIINI. monitor call was not executed.

14

PSARF%

Both the 'add the device' bit and the 'remove the device' bit have been set.

March 1976

5-10

(

Trapping, Interception, and Interruption

5.3.5 Save the Interrupt Blocks
The PISAV. monitor call (CALLI 140) returns the entire monitor base related to the software interrupt system. The
call can be used by modules such as QMANGR to save and reload (via PIRST.) the complete interrupt system. It
can also be used to provide detailed error message reporting. The calling sequence for PISAV. is
MOVE ac, [size"addrj
PISAV. ac,

error return
normal return
size is the length (in words) of the block pOinted to be addr. The size of this block can be determined
by the algorithm

where:

(3 *number-of-argument-blocks) + 2 = size-in-words
addr pOints to a block of three words. This block is represented in Figure 5-3 ..

o

1

xl

17 18

I

00000000000000000

(

35

count

.PSSFC

base address

.PSSIV

start-of-the-three-word-argument-blocks

.PSSBL

Figure 5-3. Saved Status Block Structure

\

x (PS.SON, bit 0) can be 1 or 0; 1 indicates that the software interrupt system is turned on; 0 indicates

where:

that it is off.

bits 1 through 17 must contain zero.
count is the number of words that the monitor actually returned with the saved status block.
base address is the address of the interrupt vector block which contains one or more four-word
interrupt control blocks.

\.

start points to the first location of the three-word argument blocks.
The location pointed to by the third word of the block represented in Figure 5-3 is the beginning of one or more
argument blocks. The interrupt argument blocks are those that the user has set up by means of the PISYS. monitor
call.
The possible errors resulting from the PISAV. monitor call are listed in Table 5-8.
Table 5-8
PISAV. Error Codes
Code

Mnemonic

0

PSBTS%

Meaning
The block is too small to hold the data. The right half of the first word contains
the count of the number of words which would have been returned, if the block
had been long enough.

5-11

Trapping, Interception, and Interruption

5.3.6 Reload the Saved State of the Interrupt System
The PIRST. monitor call reloads the saved state of the software interrupt system. This call does not, however,
remember any pending interruptions. If the interrupt control block has not been cleared of its condition, the
interrupt will be granted. The PIRST. monitor call should not be used to load the interrupt system of program
initialization time; this function is performed by the PIIN!. monitor call. The calling sequence for PIRST. is

MOVEI ac,addr
PIRST. ac,

error return
normal return
addr is the address of the saved status block specified in the PISAV. monitor call.

where:

The possible error codes resulting from a PIRST. monitor call are listed in Table 5·9.
Table 5·9
PIRST ..Error Codes
Code

Mnemonic

0

PSNRS%

(
Meaning

The user program has been modified to prevent the PIRST. monitor call
from performing its specified task.

5.3.7 Dismiss an Interrupt
The DEBRK. monitor call dismisses a software interrupt, re·enabling anything which may have been disabled by the
occurrence of the interrupt. The calling sequence for the DEBRK. call is

(

DEBRK.

return 1
return 2
The DEBRK. call normally returns to old PC. Returnl is taken if DEBRK. is not implemented; return 2 is taken if
there was no interrupt in progress. The DEBRK. call scans the pending interrupt queue, looking for any conditions
which may require servicing by an interrupt servicing routine. If such a condition exists, its interrupt request will be
granted, and a transfer will be made to the interrupt servicing routine. If there are no pending interrupts, DEBRK.
will restart the interrupt process beginning at the point within the user job where interruption occurred (e.g., the·
instruction after the last instruction executed).

(

5.3.8 An Example of the Software Interrupt System

TITLE PI5AMP -- SAMPLE PROGRAM TO SHOW PSISER USE WITH NON-BLOCKING 1/10
;THIS PROGRAM WRITES A FILE CONTAINING THE NUMBERS 1 TO 100,000
WHILE DOING A COMPUTE-BOUND BACKGROUND COMPUTATION. BECAUSE THE PROGRAM
; NEVER BLOCKS FOR liD, IT CAN USE 100X OF THE AVAILABLE CPU TIME.
BY USING
; THE PI SYSTEM IT CAN DRIVE THE DISK AT FULL SPEED.
i

AC USE AGE
T1=1
N=2

; TEMPOf':AR'T'
,NUMBER TO WRITE ON THE DISK

; I/O CHANS.
DSK=1
SEARCH
i

; THE C:'ISK FILE
C

; S'T'MBOL DEFS.

INITIALIZATION

5·12

(

Trapping, Interception, and Interruption

START:

RESET
t'10VE I
PIINI.
HALT
OPEN

HALT
EtHEF~

HALT
MOVE
PIS',.'S.
HAL T
MOVEI

; F~ESET THE WOF~LD
; BASE OF INTERRUPT VECTOR
.; I NIT PI S'T'STEM
;NOT IMPLEMENTED
DSK . [1.11.1. AI 0+. lOB I N; OPEN [;tI SK FOF~ A:=;W~CHF~mWUS BI NAF~'T'
OUTPUT
S I :':E: IT /[:'SK/
OB ...' e:1 J
;DISK NOT aVAILABLE
DSK . [S D::E: IT "SAt1PLE" .; ENTEF~ THE OUTPUT FILE
S1:>::BIT "BIN" .; ON THE [;.ISK
E:,,:P e:1 . 121 J
;CAN'T WRITE
Tl. VECTOR
Tl..

Tl.CPS. FAC+[ EXP DSK
4 •• PS.ROD
;OFFSET •• OUTPUT DONE
I2IJJ
;PRIORITY •• RESERVED
Tl..
.; CAL.L MON I TOF~ TO TUF~~~ ON S',.'STE~l AND
; ENABLE FOR OUTPUT DONE ON CHAN DSK
; PI S',.'S. 1.11.10 FA I L.Ee:,
N.O
; PRESET N

;HERE ON AN OUTPUT DONE INTERRUPT OR AT THE START OF THE PROGRAM
OUTDON: SOSGE
IDPB

B'r'TECT
[:'UMPE:F
N. E:',.'TEPT

CA~lE

N. [

AOcTA
CLOSE
E>UT

N. OUT[:'ON

cTF~ST

(

~'[:'1e:1e:1e:1e:1e:1

J

;ROOM IN THIS BUFFER?
; NO--GO OUTPUT BUFFER
;STORE IN BUFFER
.; [:,ONE';:O
; NO--WRITE NEXT NUMBER

1.

1 ..
DUt'lPBF: OUT
;WRITE OUT THE BUFFER
JRST OUH:t1)N
;NO ERRORS AND MORE BUFFERS
STATZ
1. 10. ERR
; A~J',.' EF:F~OF:S?
HALT
;FATAL. I/O ERROR
;AT THIS POINT WE FILLED ALL AVAILABLE BUFFERS AND WANT TO GO BACK TO THE
; BACf~P
OUTC'ON
e:1
E::O::F'

n:p

EXP

e:1
e:1

E~W

STAF~T

.; E:'r'TE PO I NTEF~
; E:',.'TE COUNT
;FIRST SLOT IS UNUSED
; NEW PC:
;OLD PC STORED HERE
; FLAGS
; STATUS

5·13

(

(

(

(

CHAPTER 6
CORE AND SEGMENT CONTROL
6.1 CORE CONTROL
For various reasons, users may wish to lock privileged jobs into core, so that they are never considered for swapping
and shuffling. Some examples of these jobs follow.

I

I

Real time jobs

which require immediate access to the processor in response to an interrupt from an I/O
device.

Display jobs

which must be refreshed from a display buffer in the user's core area in order to keep the
display picture flicker-free.

Performance
Analysis
Jobs

so that they can be invoked quickly with low overhead in order to record the activities of
the monitor.

6.1.1 Definitions
Unlocked jobs occupy only those physical core locations not occupied by locked jobs. Therefore, locked jobs and
timesharing jobs contend with one another for physical core memory. In order to control this contention, the system administrator is provided with a number of system parameters which are described below.
Total User Core is the physical core that can be used for both locked and unlocked jobs. This value equals
the totalyhysical core minus the monitor size.
CORMIN

is the amount of contiguous (on a KAla) core guaranteed a single unlocked job. This value
is a constant system parameter defined by the system administrator at monitor generation
time (via MONGEN). This value can range from a to TOTAL USER CORE. CORMIN may
be changed by the system administrator through the use of the SET CORMIN command
(refer to DECsystem-l 0 Operating System Commands) or the SETUUO monitor call.

CORMAX

is the largest (on a KAla) contiguous block allowed an unlocked job. It is a time-varying
system parameter that is reduced from its initial setting as jobs are locked in core. In order
to satisfy the guaranteed size of CORMIN, the monitor never allows ajob to be locked in
core if it would cause CORMAX to be less than CORMIN. The initial setting of CORMAX
is defined at monitor generation time (via MONGEN), and can be changed with the SET
CORMAX command (refer to DECsystem-l 0 Operating System Commands) or the SETUUO
monitor call.

I

\.

6.1.2 The LOCK Monitor Call (CALLI 60)
The LOCK monitor call provides a mechanism for locking jobs into user memory. The user may specify that the
high, the low, Or both segments are to be locked, and if the core is to be physically contiguous or not. Note that on
KAla-based systems, core is always allocated contiguously, and that the job will be moved to an extremity of user
core before it is locked. The calling sequence for the LOCK monitor call is:

(

MOVE ac, [XWD hi-code, la-code]
LOCK ac,
errar return
normal return
6-1

Core and Segment Control

hi-code and la-code are the high and low segment codes - a series of bits that specify the way in which
the high segment (left half code) and the low segment (right half code) are to be locked. The order and
the position of the bits in the left half correspond to the order and the position of the bits in the right
half (i.e., to obtain the bit number for the high segment, subtract 18 from the corresponding bit for the
low segment). The possible bits that may be set with the LOCK monitor call are listed in Table 6-1.

where:

Table 6-1
LOCK Bits

I

Bit

Mnemonic

Meaning

17
35

LK.HLS
LK.LLS

If the bit contains 1, lock the high (or low) segment as indicated by bits
15 or 16 (33 and 34).

16
34

LK.HNE
LK.LNE

If the bit contains 0, map the high (or low) segment contiguously in the
exec virtual memory (always implied on a KAlO-based system). This
action causes the segment to be added to the exec virtual address space
so that it can be executed in exec mode. For example, this would be
required when exec mode real-time trapping is used. On KIlO/KLlObased systems, the amount of exec virtual address space used by locked
jobs is a limited resource with a defined maximum limit per processor.
If mapping of the segment would cause the maximum to be exceeded,
the LKMEM% error code will be returned in the AC, and the error
return will be taken. The maximum exec virtual memory available for
the LOCK monitor call can be obtained from GETTAB table .GTCnV,
item number 43 (%CEVM), where n is the number of the CPU. The
current amount used can be obtained from .GTCnV, item number 44
(%CVEVU).

15
33

I

LK.HNP
LK.LNP

(

(

If the bit contains 1, do not attempt physical continuity. If the bit
contains 0, lock the high segment (low segment) into contiguous
physical memory locations (always implied on KA10 based systems).
This action causes the high segment (low segment) to be moved and
remapped (if necessary) so that its physical core is contiguous. On
KAlO-based systems, the high segment (low segment) is also moved to
one end of user core, in order to minimize fragmen ta tion of memory.

On a normal return, the job is locked into core. If there is a high segment, the left half of the AC will contain its
physical core address, or virtual address if meaningful (in units of 518 8 word pages). This value can be converted to a word address by shifting it left nine bits. If there is no high segment, the left half of the AC will contain
zero. The right half of the AC will contain the page number of the low segment, which can be shifted nine bits.
If the job is locked in place so that no physical or virtual contiguity is implied (KIlO and KLlO only), the
contents of the AC on a normal return will be zero.
On an error return, the job is not locked into core, and the AC is either unchanged or contains an error code. An
error code indicates the condition that prevented the job from being LOCKed. The possible error codes are
listed in Table 6-2.
Ajob may be locked into core if all of the following conditions are satisfied:
1.
2.

June 1976

The job has the LOCK privilege (bit 14, JB.LCK) in the privilege word which is set from the accounting
file, ACCT.SYS, by LOGIN.
The job, when locked, would not prevent another job from expanding to the guaranteed limit
(CORMIN).

6-2

(

Core and Segment Contwl

3.
4.
5.

The job, when locked, would not prevent an existing job from running. Note that unlocked jobs can
exceed the value of CORMIN.
The job, when mapped, if specifying exec mapping, would not exceed the maximum amount of exec
virtual address space available for locking (KIlO/KLlO-based systems only).
The job has a non-sharable high segment when running virtual on a KIlO/KLlO-based system.
Table 6-2
LOCK Monitor Call Error Codes

(

Bit

Mnemonic

Meaning

0

LKNIS%

The monitor call is not included in this system, or the requested function is not implemented because it has not been defined with MaNGEN
or because the appropriate feature test switch has been turned off.

1

LKNLP%%

The job requires locking privileges, but does not have them.

2

LKNCA%

If the job were locked into core, it would be impossible to run the largest
existing non-locked job.

3

LKNCM%

If the job were locked into core, it would be impossible to sustain the
guaranteed maximum for unlocked jobs.

4

LKNEM%

The allowable amount of exec virtual memory has been exhausted.

5

LKNIA%

An illegal sub function has been specified.

6

LKNPU%

The specified page is unavailable.

If a user program requests a segment to be locked into contiguous physical memory, the monitor will attempt to lock
it into physical memory at the lowest location possible. When the segment is locked below 128K, physical and
virtual contiguity are equivalent; therefore, virtual contiguity does not always require the exec virtual memory
resource to achieve contiguity.
On KAIO-based systems, physical memory is always allocated contiguously, and user segments are directly addressable in exec mode (bits 15, 16,33, and 34 are ignored).
Clearing bits 33 and 34 (bits 15 and 16 for the high segment) in KIlO/KLlO-based systems is compatible with the
implementation of the LOCK monitor call for KAIO-based systems. Code 1 is the most restrictive code, allowing a
program coded for a KA10-based system that implicitly uses these properties to also be executed on a KIlO/KLlDbased system. Applications that do not require all properties can add the appropriate bits the LOCK monitor call's
calling sequence.
Although memory fragmentation is minimized by the LOCK monitor call and the shuffler, the locking algorithm
always allows job-locking even though severe fragmentation may take place, as long as
1.
2.

all existing jobs can continue to run, and
CORMIN, at least, is available (refer to Figure 6-1).

Since memory fragmentation can degrade system throughput, system administrators must use caution when granting
locking privileges. Section 6.1.2.1 lists guidelines for minimizing fragmentation when using the LOCK monitor call
on KAlO-based systems.
NOTE
The CORE monitor call may be given for the high segment of a locked job only to remove the high segment
from the addressing space. When any segment is locked
into core, neither the CORE monitor call nor the CORE

6-3

Core and Segment Control

(

command with a non-zero argument can be satisfied
because they will cause an error. Before executing the
LOCK monitor call, the program should determine and
request the amount of core needed for execution.
6.1.2.1 The LOCK Monitor Call Extension - (KIlOjKLlO-based systems only) the extension to the LOCK
monitor call locks a segment into a specified page of physical core memory. Its calling sequence is
MOVE ac, [XWD -n,addr]
LOCK ac,
error return
normal return
addr:

function
argument 1

(
\

argument i

where:

n is the number of arguments plus one (Le., i + I = n).
addr points to the first word of the argument block.
function is one of the function codes described in Table 6-3 (currently, one function is impleTllp.llted).
argument 1 ... argument i is different depending on the function used; all possible arguments are li~ted
in Table 6-6.

,

(
Before

After

Monitor

Monitor

1\

/\

'/\

/\

/\

/\

/\

/\

/\

/\

CORMAX

CORMAX

/\

/\

/\

/\

/\

/\

1\

/\

1\

1\
Locked job

/\

Figure 6-1 Locking Jobs in Core on KAlO Systems

64

'"

"

1\

(

Core and Segment Control

Monitor

Monitor

1\

Locked job

Locked job

1\

1\

1\

1\

1\

1\

1\

1\

1\

1\

CORMAX

CORMAX

1\

1\

1\

1\

1\

1\

1\

1\

1\

Locked job

Before

After

Monitor

Monitor

Locked job

Locked job

(

1\

1\

Locked job

1\

1\

1\

1\

1\

1\

1\

1\

1\

1\

CORMAX

CORMAX

1\

1\

1\

1\

1\

1\
Locked job

Locked job

(
Figure 6-1 (Cont.) Locking Jobs in Core on KA10 Systems

6-5

Core and Segment Control

(
Before

After

Monitor

Monitor

Locked job

Locked job

1\
1\

Locked job

1\
1\

1\

1\

1\

1\

COAMAX

COAMAX

1\

1\

1\

1\

1\

1\

1\

1\

Locked job

(

Monitor
Timesharing job
issuing LOCK Monitor Call

1\
1\
1\

1\
1\
1\

COAMAX

COAMAX

1\

1\
1\

~

Locked job

Locked job

Figure 6·1 (Cont.) Locking Jobs in Core on KAlO Systems
6-6

(

Core and Segment Control

Table 6-3
LOCK Extension Functions
Function

Mnemouic

0

.LKPPN

Argument

Meaning
Lock the high segment and/or
low segment into contiguous
physical pages, starting at the
physical page number specified
in the argument.

LH

= 0 Do not lock the high

LH

= n lock the high segment

segment
starting with page number
n
RH

= 0 Do not lock the low
segment.

RH

= n lock the low segment
starting with page number
n.

On a normal return, the segment is locked (physically and contiguously) starting at the specified physical address.
On an error return, error code 6 (LKNPU%) is returned in the AC (refer to Table 6-2). The error return will be
taken when locking the segment at the pages specified in the argument would cause any of the following conditions
to be true.
1.
2.
3.
4.

when locked, the two segments would overlap.
when locked, one or both segments would overlap another locked job.
when locked, one or both segments would overlap the monitor.
when locked, one or both segments would be outside the range of on-line memory.

Note that if the monitor call indicates that the low segment is to be locked, the physical page number specified in the
right half of argument i is where the low segment is locked into the next higher physical page location, an example of
the extended LOCK monitor call is
MOVE
AC, [XWD -2,ADDR]
LOCK
AC,
JRST ERROR

ADDR:

0
230,,224

In the example above, the high segment will be locked into core starting with page 230 and the low segment will be
locked into core starting with page 224.
6.1.2.2 Miuimizing Fragmentation - For KAlO-based systems, the guidelines for minimizing fragmentation when
using the LOCK monitor call are listed below.
1.
2.

3.

If two or fewer segments are locked into core, there will be no memory fragmentation.
If the locked jobs do not relinquish their locked status (i.e., no job that has issued the LOCK monitor
call terminates), there will be no memory fragmentation. In general, only production jobs should be
granted locked privileges.
If a job issuing a LOCK monitor call is to be debugged, and production jobs with locking privileges are
to be executed, the job to be debugged should be initiated and locked into core first. Locking this job
first will place it at the top of core, reserving this area for it and guaranteeing that as the job locks and
unlocks there will be no fragmentation.
6-7

Core and Segment Control

4.

I

By appropriately setting CORMIN and the initial setting of CORMAX in relationship to TOTAL USER
CORE, the system administrator can establish a policy that guarantees the following.
a.
A maximum size for any unlocked job (CORMIN).
b.
A minimum amount of total lockable core for all jobs (TOTAL USER CORE minus CORMAX).
c.
The amount of core for which locked and unlocked jobs can contend on a first-come/first-serve
basis (TOTAL USER CORE equals the initial setting for CORMAX plus CORMIN).

(

6.1.3 The UNLOK. Monitor Call (CALLI 120)
The UNLOK. monitor call provides a mechanism for a job to unlock itself without having to perform a RESET
monitor call. The user program specifies whether the high, the low, or both segments are to be unlocked from core.
The calling sequence for UNLOK. is
MOVSI
HRRI
UNLOK.

ae,n
aC,m

ac,
error return
normal return
where:

(

n is specified if the high segment is to be unlocked (LH not equal to 0).
m is specified if the low segment is to be unlocked (RH not equal to 0).
nand m are specified if both the high and low segments are to be unlocked.

The error return is taken if the monitor call has not been implemented. Under this circumstance, ajob can
relinquish its locked status by executing a RESET or EXIT monitor call; locked status is relinquished also when the
monitor implicitly executes a RESET for the user program. An implicit RESET will occur when

1. The user program issues a RUN monitor call, or
2. The user types anyone of the following operating system commands: R, RUN, GET, SAVE, SSAVE,
CORE, NSAVE, NSSAVE, OSAVE, OSSAVE, or a system program-invoking command.
On a normal return, the segment (or job) is unlocked and becomes eligible for swapping and/or shuffling. Any meter
point (METER monitor call) is deactivated and, if the low segment is unlocked, any real-time device will be reset.
CORMAX is increased to reflect the new size of the largest contiguous region available to unlocked jobs. CORMAX,
however, will never be set higher than its initial value.

NOTE
A locked high segment shared by several jobs is unlocked
only when the SN%LOK bit is turned off for all of those
jobs (Le., when all jobs which executed the LOCK monitor call have performed the UNLOK. monitor call).
Refer to GETTAB Table Number 14.

I

6.1.4 THE CORE MONITOR CALL (CALLI 11)
The CORE monitor call allows a user program to expand and contract its core allocation in either one or both segments, as its memory requirements change. Its calling sequence is

I

MOVE ac, [XWD hi-seg-addr, low-seg-addr]
}
{ CORE ac,
CORE ac,200000
error return
normal return

March 1976

6-8

(

Core and Segment Control

(

where:

hi-seg-addr is the highest user address (end point) to be assigned to the high segment. If h.i.-seg-addr is zero,
the current core assignment for the high segment will be unchanged.

low-seg-addr is the highest user address (end point) to be assigned to the low segment. Iflow-seg-addr is
zero, the current core assignment for the low segment will be unchanged.
The argument 200000 sets bit 19 (UU.PRY) to indicate that the core assignment is for physical core. (This
argument is meaningful only for KIlO/KLlO-based systems with virtual memory.)
The monitor will always assign the smallest amount of core that will satisfy the request. To ensure privacy of all information, all of core is cleared before assignment to the user program.
On KA10-based systems, the high segment address is relative to location 400000 or page 400. If the address specified
in the left half of the AC is smaller than either of these values, the high segment will be destroyed. If the value is
greater than either of these values, the new high segment end address will be that specified.

(

On KIIO/KLlO-based systems the user may start the high segment at any location by using the REMAP monitor call
(a LINK-lQ switch may also be used, refer to the LINK-10 Programmer's Reference Manual). When the CORE monitor call is issued, the left half of the AC is always relative to the starting address of the high segment specified in the
REMAP monitor call.
On a normal return, the information returned in the AC is listed in Table 64.
Table 6·4
Values Returned from a CORE Monitor Call
Type of System

(

Information Returned

Non-VM

The maximum amount of 1K core blocks (all of core minus the monitor,
unless an installation chooses to restrict the amount of core available to
the user. (CORMAX)

VM Systems

The current virtual memory limit in lK core blocks assigned to the user.

\

On KI1 O/KLl O·based ·systems, if the left half of the AC is non·zero, and it is either less than 400000 or the length of
the low segment (whichever is greater), the high segment will be eliminated. If this call is executed from the high segment, an illegal memory error message will be printed when the monitor attempts to return control to the new illegal
address.
To increase the low segment and decrease the high segment simultaneously, two CORE monitor calls should be issued
to reduce the chances of exceeding the maximum size allowed to a user.
The error return is taken on the following conditions:

(

1. The left half of the AC is greater than or equal to 400000, and the user has been meddling without write·
access privileges.
2. The left and the right halves of the AC are both zero.
3. The sum of the sizes of the new low segment and the old high segment is greater than the maximum
amount of core allowed to a user. (The core assignment will be unchanged, and the maximum core avail·
able for high and low segments is returned in the AC for swapping systems.
4. The sum of the new low segment and the new high segment is greater than the maximum amount of core
allowed to a user. (The core assignment will be unchanged.) The maximum core available for the user is
returned in the AC in 1K core blocks.
5. The right half of the AC specifies an argument which would cause the low segment to overlay (expand
into) the high segment.

6-9

Core and Segment Control
. If the high segment is eliminated by the CORE monitor call, a subsequent CORE with the left half of the AC greater
than 400000 will create a new,.non-sharable segment instead of re-establishing the old high segment. This segment
will become sharable if it has been
1.
2.
3.
4.

(

given the filename extension .SHR,
written onto a storage device,
closed so that a directory entry will be made, and
initialized from the storage device by either of the following commands: GET, R, RUN, or the RUN or
GETSEG monitor calls.

LINK-I 0 and the SSAVE and GET commands use the above sequence to create and initialize new sharable segments.
A user program that expands core should compare its highest desired address with its highest legal address, which can
be obtained from location .JBREL in the Job Data Area (refer to Chapter 3). If the desired address is greater than the
highest legal address, the program should execute a CORE monitor call for the new desired address (i.e., not for the
highest old legal address plus 512 or 1024).
The monitor will update .JBREL by a basic il1location unit (i.e., 1024 words for KA10-based systems, and 512 words
for KIlO/KLlO-based systems), Subsequent comparing of the desired address and the highest legal address do not
cause a CORE monitor call until the next increase of core is required. If used in this manner, the CORE monitor
call will execute the same on all three processors and will require less monitoLCPU time, because of the number of
COREs needed will be minimized.
The following example illustrates the method of obtaining core only when it is needed.
;SUBROUTINE TO GET CORE ONLY WHEN NEEDED
;CALL:
MOVE Tl,HIGHEST DESIRED ADDRESS
PUSHJ P,CHKCOR
RETURN HERE UNLESS NO MORE CORE
CHKCOR: CAMG TI,.JBREL##
;GREATER THAN HIGHEST LEGAL ADDRESS?
POPJ
P,
;NO, PRESET CORE BIG ENOUGH.
CORE
T1,
;YES, GET NEXT INCREMENT OF CORE.
JRST ERROR
;NOT AVAILABLE.
POPJ
P,
;NEXT INCREMENT ASSIGNED.
6.1.5 The SETUWP Monitor CaIl
The SETUWP monitor call allows a user program to set or clear the hardware user-mode write-protect bit and to obtain the previous setting for this bit. The call must be used if the program is to modify its high segment; its calling
sequence is
MOVEI ac,bit
SETUWPac,

e"or return
normal return
where: bits is used to specify the setting of the user-mode write-protect bit in bit 35 of the AC (write'protect ::: 1
and write-privileges =0).
The previous setting of the user-mode write-protect bit is returned in bit 35 of the AC. so that any user subroutine
can preserve the previous setting before changing it. Nested subroutines that either set or clear this. bit can be written,
providing that the subroutines save the previous value of the bit and restore it on returning to the caller.

6-10

(

Core and Segment Control

(

6.1.6 The PAGE. Monitor Call
The PAGE. monitor call (only available on KIl-/KLlO-based systems with virtual memory) manipulates pages and
the data associated with those pages. Its general calling sequence is
MOVE ac, [XWD function,addr]
PAGE. ac,

error return
normal return
addr:

number-of-words
argument 1

argument n
function is a PAGE. function code in the range 0 to 7; the possible function codes for PAGE. are listed in

where:

Table 6-5.

addr points to the first word in the argument block.
number-ofwords is the number of arguments in the argument block.
argument is different depending on the function code specified; all arguments are described in Table 6-5
pertinent to the given function code.

:/

On an error return, an error code will be returned in the AC. The possible error codes are listed in Table 6-7. On a
normal return, the function specified has occurred. There are two limitations in regard to what pages may be paged
out: page zero may never be paged out; and, if the high segment is sharable, none of the high segment pages may be
paged out.

\
Table 6-5
PAGE. Monitor Call Functions
Function
0

Mnemonic
.PAGIO

.Meaning/Argument Format
Swaps a page in or out. Pages already allocated are swapped in and
added to the working set. Pages are deleted from the working set in
core and moved to secondary storage. The argument words are set up
as follows.
Bit 0

=0 Swap-in
= 1 Swap-out

Bit 1 =0 Transfer to fast secondary storage
= 1 Create page on the disk
Bits 2-26

=0

Bits 27-35

=Page number

Multiple entries in the argument block must specify page numbers in
increasing numeric order.

(

6-11

Core and Segment Control

Table 6-5 (Cont.)
PAGE. Monitor Call Functions
Function
1

Meaning/Argument Format

Mnemonic
.PAGCD

Creates or destroys a page. The argument word format takes the following
format.
Bit 0

=0 Create a page
= 1 Destroy a page

Bit 1 = 0 Create a page in the working set
= 1 Create a page on disk
Bits 2-26

=0

Bits 27-35

=Page number

Multiple entries in the argument block must specify page numbers in
increasing numeric order.
2

.PAGEM

Moves or exchanges a page. A~page is moved from one location to an •
other location in user virtual address space, or two pages exchange locations. Note that a page cannot be moved to a location already allocated to another page. The argument word format is in the following
format.
Bit 0

= 0 Page is moved
= 1 Page is exchanged

Bits 1-8

(

=0

Bits 9-17

= Source page location

Bits 18-26 = Zero
Bits 27-35
3

.PAGAA

= Destination page location

Sets or clears the access-allowed bit. If a page is a part of the working
set, its access bit can be turned off. When the access bit is off, a page
fault will occur the next time that page is accessed. The page will remain in core, the access bit may be turned on at time, therefore. The
argument word format is
Bit 0

=0 The bit is set
= 1 The bit is cleared

Bits 1-26 = 0
Bits 27-35

=Page number

Multiple entries in the argument block must specify page numbers in
increasing numeric order.

6-12

(

Core and Segment Control

Table 6·5 (Cont.)
PAGE. Monitor Call Functions

(
Function

Meaning/Argument Format

Mnemonic

4

.PAGWS

Returns a bit map indicating those pages in the current working set .
In the PAGE. call, number·of·words specifies the number of words
in the bit map that are to be returned (normally 17 for the entire map.
There is one bit for each possible page (0·511). If a bit is set, the page
associated with that bit is a part of the working set. For example, word
1 contains the bits associated with pages 0 through 35; word 2 con·
tains the bits associated with pages 36 through 71, etc.

5

.PAGGA

Returns a bit map indicating which pages have their access-allowed
bits set. This bit map has the same format as the one returned for
function code 4. If a bit in the map is set, the page associated with
that bit is accessible. In the PAGE. monitor call, number·of-words
specifies the number of the words in the bit map that are to be reo
turned (normally 17 for the entire map).

06

.PAGCA

Determines the type of access allowed for a given page. There is no
argument block; instead, theAC (bits 0·17) contain the function code
and bits 18·35 contain the page number. On a normal return, one or
more of the bits described in Table 6·6 will be set.

7

.PAGCH

Create a high segment .

(

Table 6·6
Bits Returned from Function .PAGCA
Bit

Meaning

Mnemonic

0

PA.GNE

The page specified does not exist.

1

PA.GWR

The page specified is writable.

2

PA.GRD

The page specified is readable.

3

PA.GAA

The page specified is accessible.

4

PA.GAZ

The page specified is allocated but zero.

5

PA.GCP

The page specified cannot be paged out.

6

PA.GPO

The page specified has already been paged out.

(

6·13

.

Core and Segment Control
Table 6-7
PAGE. Monitor Call Error Codes

>

Error
Code

Mnemonic

1

PAGUF%

An unimplemented function has been specified.

2

PAGIA%

An illegal argument has been specified.

3

PAGIP%

An illegal page number has been specified.

4

PAGMF%

A page must exist, but it does not.

5

PAGMI%

A page must be in core, but it is not.

6

PAGCI%

A page cannot be in core, but it is.

7

PAGSH%

A page is in a sharable high segment.

10

PAGIO%

A paging I/O error has occurred.

11

PAGNS%

No swapping space is available.

12

PAGLE%

Specified function is illegal when the job is locked in core.

13

PAGIL%

Cannot create the specified page (an attempt was made to create a page
on the disk).

24

PAGNX%

Cannot create the specified page (an attempt was made to create a
page on the disk) with virtual memory limit to zero.

Meaning

(

6.1.6.1 Page Fault Handling - When an executing program (on KIlO/KLlO-based systems with virtual memory)
references a location in a noncore-resident page, the system transfers control to a page fault handler. The page fault
handler determines which pages are to be placed in core during program execution. A user program can utilize its own
own page fault handler, or, if the program does not include its own, the default page fault hander will be used.
The default page fault handler utilizes a modified FIFO technique in swapping pages in and out of core. An ordered
list of core-resident pages is maintained by age of page in physical core. Each page has an access-allowed bit associated with it; the access-allowed bit can be set to 1 indicating that the page is accessible, or to 0 indicating that the
page is not accessible. Periodically, the page fault handler will set every physical page's access-allowed bit to O. A page
fault will occur the next time one of these inaccessible pages is referenced; after the reference is made, the accessallowed bit is set to 1, and execution continues.
By use of the age-ordered list, along with a periodic check on the access-allowed bit, pages are swapped on a modified first-in/first-out basis.
The page fault handler controls the entire working set of pages, and is a part of the user's core image. If the user
program does not supply its own page fault handler, the default page fault handler will be read into the top of the
user's address space from SYS:PFH.VMX. If a user-supplied handler is to be used, .JBPFH in the Job Data Area
must point to it. In .JBPFH, bits 9-17 contain the page fault handler's and address; bits 18-35 contain its start
address. Before the occurrence of the first page fault, the user program must have ensured that .JBPFH contains
these two addresses.

6-14

(

Core and Segment Control
Alternatively, the user program may cause a page fault handler to be obtained from its directory by ASSIGning DSK:
as SYS:, in which case, PFH.VMX will be loaded from the user's disk area.
If the user supplied page fault handler is deleted because of a CORE or PAGE, monitor call, the default page fault
handler (i.e., SYS:PFH.VMX) will be brought into core on the next occurrence of a page fault.
6.1.6.2 Format of the Page Fault Handler -

The page fault handler must be in the form

PFH: JRST START

pc for fault
page fault word
virtual time
current page rate

o
o
o

(

START:
where: PC for fault contains the program counter location when the fault occurred.
This value is filled in by the monitor when a page fault occurs.

page fault word is filled in by the monitor when a page fault occurs; refer
to Table 6-8.

virtual time since the page fault handler was first brought into core is filled
in by the monitor when a page fault occurs.
current page rate is filled in by the monitor when a page fault occurs.
Table 6-8
Page Fault Word
Bit(s)

Mnemonic

0

PF.HCB

Bit 0 = 1 indicates that the working set of pages has been
changed by the monitor or the user program without the
page fault handler's control.

1-17

PF.HPN

These bits contain the number of the page causing the
page fault.

18-35

PF.HFC

These bits con tain a code indicating the type of page
fault that has occurred.

Meaning

Code

Mnemonic

1

.PFHNA

2

.PFHNI

6-15

Meaning
The access-allowed bit has been
turned off; the page is not
accessible.
The referenced page has been
swapped out; the page is not
in core.

Core and Segment Control

(

Table 6-8 (Cont.)
Page Fault Word
Bit(s)

Meaning

Mnemonic
Code

Mnemonic

3

.PFHUU

4

.PFHTI

5

.PFHZI

6

.PFHZU

Meaning
A page containing a monitor
call argument has been swapped
out; a monitor detected fault
FRAG 11.
A trap occurs every n units of
virtual time as a result of requesting virtual time traps;
refer to the description of the
.STTVM option of the SETUUO).
The page has been allocated, but
it is a zero page.
The page has been allocated, but
it is zero after a call's execution.

(

6.2 SEGMENT CONTROL
6.2.1 The RUN Monitor CALL (CALLI 35)
The RUN Monitor call allows program to transfer control to one another. Both the low and the high segments of a
user's addressing space are replaced with those of the program being called. RUN's calling sequence is

(

MOVSI ac, start-addr-increment
HRRI ac, addr

RUNac,
errorretum

(

; normal return is to the start address
; plus the start-addr-increment of the
; new program

addr:

STXBIT/device-name/
SIXBIT//ilename/
; or 0

SIXBIT/ extension/

I

0,,0

XWD project-number, programmer-number

.. ora

XWD 0, core assignemnt

; or 0

March 1976

6-16

(

Core and Segment Control

where: start-addr-increment is an increment to the starting address.

addr points to the first word of the six-word argument block.
logical-device-name is the name of the device storing the called program.
filename specifies the name of the file for either or both of the high and low se gments.
extension is the file name extension for the low segment file. If the left half = 0, .LOW is assumed when
there is a high segment; .SAV is assumed when there is not a high segment. When the program has been
saved by the NSAVE or NSSAVE command, the extension will be .EXE.
project-programmer number specifies the owner of the called program; if 0, the project-programmer number for the calling program is assumed.
core assignment is an optional argument. If it is present the value specified is assigned to the low segment.
The left half of this word is always ignored, and it should be zero.

(

Normally, the calling program will set up only the first two words of the argument block leaving the rest of the words
zero. The error retum is taken if any errors are detected; an error code will be returned in the AC. Possible error codes
are listed in Appendix E. The user program can attempt to recover from the error and/or give the user more information pertaining to program continuation. If the left half of the error return location contains a HALT instruction,
the monitor will return an error code in the AC,and it will print
?HALT AT USER PC addr

(

on the user's terminal, which will be returned to monitor mode. By storing the HALT instruction in the left half of the
error return location, a user program can analyze the error code returned in the AC. If the error' code indicates an error
from which the user can recover, the program can issue a second RUN, including another HALT instruction stored in
the error return location. The possible error codes that can be returned in the AC as a result of the RUN monitor call
are listed in Appendix E. Note that the monitor will not attempt to return to a user program if the high or low segment containing the RUN call has been overlaid. Therefore, the RUN call should be placed in the low segment in case
the error is discovered after the high segment has been released.
For certain system programs (e.g., LOGIN and LOGOUT), the RUN monitor call will automatically set the appropriate bits (e.g., JACCT and JLOG). These bits are not set (or are turned off if they were set) for unprivileged programs
from device SYS: or for programs whose starting address offset is greater than I. These bits cannot be set by
ASSIGNING a device to be SYS:.
The execution of the RUN monitor call clears all of core. User programs, however, should not assume that this action
will occur; they must initialize core to the desired value in order to allow programs to be restarted by the CTRL/C,
START sequence without having to perform I/O.
If a user program wants to call programs from the system library, it should call them by device SYS: and the null
project-programmer number (instead of the device DSK: and aI, 4 project-programmer number). The extension
specified for these programs should also be null, so that the calling program will not have to determine if the called
program is reentrant.

(

Before control is transferred to the called program, the left half of the AC is added to and stored in .JBSA of the
Data Area. A CTRL/C followed by a START command will restart the program at the location specified by the RUN
monitor call; therefore the current system program may be restarted.

6-17

Core and Segment Control

If the left half of the AC does not contain either 0 or 1, the user is considered to be meddling with the program unless the program being executed is execute-only for this job.

(

6.2.1.1 Programming with the RUN Monitor Call - To successfully program the RUN monitor call for systems
of all sizes and for all system programs whose size is not known at the time of RUN execution, it is necessary to
understand the sequence of operations initiated by RUN. (The RUN could be executed from either the high or the
low segment; fewer errors are returned to the user, however, ifit is executed from the high segment.)
To be guaranteed of handling the largest number of errors, the cautious user should remove his high segment from
high logical addressing space (via CORE with I in the left half of the AC). The error handling core should be put in
the low segment with the RUN call and the size of the low segment should be reduced to IK. A better idea would be
to have to error handling code written once and put into a seldom used (probably non-sharable) high-segment, which
could be called via GETSEG when an error return is taken on a RUN monitor call.
The following sequence occurs when a RUN monitor call is utilized for an .EXE file:

(
Execute
RUN call

LOOKUP
r-------------------no--------------~

file .EXE

(

yes
I
I

:
I

I
L _______ ..

~r------no------------~

Complete
current
processing

Process file;
set up address
space accord ing to
the access bits in
the directory

Note that if the user specifies an explicit extension to the file name specified in the RUN call, that extension will be
used when the file is LOOKedUP. If the extension specified, though, is .SAV, filename.EXE is searched for before
filename .SAV.
6.2.2 The GETSEG Monitor Call (CALLI 40)
The GETSEG monitor call replaces the high segment in the user's addreSsing space. Its calling sequence is
MOVEI ac, addr
GETSEGac,
error return

(

normal return

6-18

Core and Segment Control
addr: SIXBIT/ device-name /
SIXBIT/filename/
SIXBIT/extension/
0,0
XWD project-number, programmer-number

0,0
where: addr points to a six-word argument block.

(

device-name is the name of the device on which the high segment resides.
filename is a 1 to 6 character file name, left-justified, specifying the file containing the new high segment.
project-programmer number are the project-programmer numbers representing the directory in which the
file is stored. If this word contains zero, the project-programmer numbers under which the job is logged
in are assume d.

c

The GETSEG monitor call allows a user program to initialize a high segment from a file or shared segment without
affecting the low segment. This facility can be used for shared data segments, shared program overlays, and run-time
routines (e.g., the FORTRAN or COBOL object-time systems).
The GETSEG monitor call works like the RUN monitor call, except for the following differences:
1. No attempt is made to read the low segment file. If an .EXE file is found, only the pages
representing the high segment will be merged into the user's address space.
2. The contents of the ACs are not preserved.
3. The only changes made to JOBDAT are (1) to set the left half of .JBHRL to a and (2) to
set the right half of the highest legal user address. (Note that a SAVE/OSAVE command
can be used to save all of the high segment.)
4. If an error occurs, control will be returned to the error return location, unless its left half
contains a HALT instruction.
5. On a normal return, control is returned to one of two locations following the monitor call,
depending on whether the high or the low segment made the request. The call should be
requested from the low segment unless the normal return coincides with the starting address
of the new high segment.
6. User channels 1 through 17 are not released. Channel 0, however, is released because it is
used by the GETSEG call.
7 . .JBSA and .JBREN will be set to a by the monitor, if they point to a high segment that is
being removed. If this happens, the following message will be printed on the user's terminal:
?NO START ADDRESS
when a START or REENTER command is issued.
6.2.3 The REMAP Monitor Call (CALLI 37)
The REMAP monitor call remaps the top part of a specified low segment into a high. segment. The previous high
segment (if any) is removed from the user's addressing space. The new low segment will be the previous low segment
minus the amount remapped. The calling sequence for the REMAP monitor call is

6-19

Core and Segment Control

(

MOVEI ac, ,addrl
MOVEac, XWD origin, addrl

REMAPac,
error return
normal return
where: addrl is the highest address in the low segment.

origin is the origin of the high segment (KI10/KLlO only).
The mohltor will round up the address specified to the nearest core allocation unit (i. e., on KA10-based systems the
unit is 102410 words; on KI10/KLlO-based systems the units is 512 10 words).

;

(
On a normal return, the following will occur:
1. the contents of the AC are preserved.
2 ..JBREL is set to the value of addrl.
3. The left half of .JBHRL is set to O.
4. The right half of .JBHRL is set to the highest legal user address in the
high segment (greater than or equal to 401777 or 0).
5. The hardware relocation is changed.
6. The user-mode, write-protect bitis set.

(

The error return is taken under the following conditions:

1. When a high segment origin is specified on a KAlO-based system.
2. When the requested remapping would cause the high and the low
segments to overlap (KI1 O/KLl 0 only).
3. When the sum of the high segment origin plus its length would cause
the high segment to start (or end) at an address outside the program's
virtual address space (Le., greater than or equal to 256K).
4. When the specified argument addrl exceeds the length of the low
segment. (Also, remapping will not occur, and the high segment will
remain unchanged in the user's address space).
5. When the system on which the program is running does not have tworegister capability.

i'\

6.2.4 Testing for a Sharable High Segment
It is occasionally desirable for a program to determine whether or not its high segment is sharable. If the high segment is sharable, the program may decide not to modify itself. The following code determines
whether or not the system has a high segment capability (i.e., two-register capability), and
whether or not the job has a high segment.
HRROI T, .GTSGN

; see if high segment is sharable

GETTABT,

; look at monitor .GETSGN table

JRST

; table or call not present

.+2

6-20

(

Core and Segment Control

TLNN

T, (SNo/oSHR)

; is sharable bit on?

JRST

NOTSHR

; no, go ahead and modify here if
; high segment is sharable

6.2.5 Determining the High Segment Origin
It is occasionally desirable for a program to determine the origin of its high segment (Le., the starting virtual address
of the high segment within the program's address space.) This information would be useful, for example, to a program
that was to access information in the vestigial Job Data Area or to transfer control to an entry point in a high segment which has been'GETSEGed. Before the 5.07/6.01 release of the monitor, the high segment origin was normally
400000 8 or the first available core allocation boundary above the low segment, if the low segment was larger than
129K. User programs should not assume this location for their high segment, but should find its location by using
the following procedure:

(

(,

HRRZ

Tl, .JBHRL

; highest relative address in the high segment

JUMPE

Tl,NOHIGH

; jump if there is no high segment

HRRZ

Tl,.JBREL

; the highest address in the low segment

TRNN

Tl,400000

; is low segment larger than 128K?

MOVEI

Tl,377777

; no, assume high segment starts at 400000

MOVE

T2, [XWD -2, .GTUPM]

; gethigh segment origin from monitor table

GETTAB

T2,

; .GTUPM indexed by current high segment number

T2,1(Tl)

; table or call not present, use assumed

LSH

T2,-tD18

; value. Convert to address of high segment

AND!

T2,777000

; clear any low bits

MOVEM

TI,HIORGN

; store as the origin of the high segment

HRLI

(

6.2.6 Modifying Shared Segments and Meddling
A high segment is usually write-protected, but it is possible for a user program to clear the write-protect bit or to increase/decrease a shared segment's core assignment by using the SETUWPmonitor call or the CORE monitor call.
These calls are legal from either the low segment or the high segment only if the sharable segment has not been
meddled with (unless the user has writ'e-privileges for the file that initialized the high segment). Even the malicious
user can have the privileges of running such a program, although he does not have the access rights to modify the
files used to initialize the shared segment.
Meddling is defined as any of the following conditions (even if the meddling user has the privileges to write the file
which initialized the sharable segment):

(

1. When a START or CSTART command is executed with an argument.
2. When the DEPOSIT command is issued for either the low or the high segment.
3. When the RUN monitor call is called with anything other than a 0 or a 1 in the
left half of the AC (i.e., a starting address increment).
4. When the GETSEG monitor call is called.

6-21

June 1976

Core and Segment Control

It is not considered to be meddling to perform any of the above commands or calls with a non-sharable program. It
is never considered to be meddling to type a CTRLjC followed by a CONT, CCONT, CSTART (with an argument),
START (without an argument), REENTER, DDT, SAVE, NSAVE, OS AVE, or E command (refer to the DECsystem10 Operating System Commands Manual).

(

When a sharable program is meddled with, the monitor will set the meddle bit for the meddling user. The error return is taken when the user attempts to clear the write-protect bit via the SETUWP monitor call. The error return is
taken, also, when the reassignment of core for the high segment (except to remove it completely) is attempted via the
" CORE monitor call.
An attempt to modify the high segment via the DEPOSIT command causes the following message to be printed on
the user's terminal:

?OUT OF BOUNDS
If the user-mode, write-protect bit was not set when the user meddled, it will be set to protect the high segment in
case it is being shared. The DEPOSIT command,"the SETUWP call, and the CORE call are allowed (in spite of
meddling), if the user has the access privileges to write the fIle which initialized the high segment. Users with access
privileges can write programs that access sharable data segments via the GETSEG call and then turn off the writeprotect bit using SETUWP.
A privileged user can specify that a sharable program is to be superseded. When a CLOSE, OUTPUT, or RENAME
monitor call is executed for a file with the same UFD and file name as the segment being shared, the name of the
segment will be set to O. New users will not be able to share the older version" of the program, but they will be able to
share the newer version. The monitor, therefore, is required to read a newly created fIle only once before it initializes
the fIle. The monitor will delete the older version of the file when all users are finished with it.

(

(

When control can be transferred only to a small number of entry points (e.g., two), the shared program can do anything that it has the privileges to do. (The program, not the person running it, has these privileges.)

(

(
6-22

CHAPTER 7
I/O PROGRAMMING

Within this Chapter I/O programming is generally described, specifics deal with the disk. -For programming considerations concerning the other devices refer to the applicable chapter. (For example, DECtape I/O programming is
described in Chapter 9).
All user I/O programming is controlled by monitor calls. I/O is directed by
1.

2.
3.

associating a device and a ring of buffers with one of the user's I/O channels (via INIT, OPEN, or
FILOP.),
optionally selecting a file (via LOOKUP, ENTER, and FILOP), and
passing buffers of data to and from the user program (via IN, INPUT, OUT, or OUTPUT).

Device specifications may be delayed from program generation time until program run-time because the monitor
1.
2.

(

allows a logical device name to be associated with a physical device (via the ASSIGN or MOUNT command), and
treats operations that are not pertinent to a given device as no-ops.

7.1 JOB INITIALIZATION
The RESET monitor call should normally be the first instruction in every user program; its calling sequence is
RESET ac,
only return

(

The call immediately stops all I/O on all devices without waiting for the devices to become inactive. All device allocations made by the INIT/OPEN/FILOP. calls are cleared and, unless the devices have been assigned via ASSIGN or
MOUNT, the devices are returned to the monitor pool of available devices. The contents of the left half of .JBSA in
the Job Data Area is stored in the right half of .JBFF in the Job Data Area, so that the user buffer is reclaimed if the
program is restarted. The left half of .JBFF is cleared. Any files being written that have not been closed are deleted
on the disk. The user-mode write-project bit is automatically set if a high segment exists (whether or not the high
segment is sharable); therefore, a program cannot inadvertently store into the high segment. Additional functions of
the RESET call include the following.
1.
2.
3.
4.
5.
6.
7.
8.
9.

It unlocks a j ob if it was locked.
It releases any real-time devices.
It resets any high-priority queues set by the HPQ monitor call to a value set by the HPQ command (refer
to the DECsystem-10 Operating System Commands Manual).
It resumes timesharing, if timesharing had ceased as a result of a TRPSET monitor call with a non·zero
argument:
It resets the action of the HIBERnate and APRENB monitor calls.
It clears all PC flags except USRMODE (KLlO/Kl10 only).
It drops all PIDs (IPCF) that were to be dropped on the execution of a RESET.
It clears the Software Interrupt System.
It dequeues anything locked by ENQ.

7-1

I

I/O Programming

7.2 DEVICE SELECTION
A specific device must be associated with a software I/O channel for every I/O operation. This specification is made
via the INIT, OPEN, or FILOP. monitor calis, which may specify a device by its logical or physical name. Some system programs (e.g., LOGOUT) require I/O to specific physical devices regardless of any logical name assignment.

(

Therefore, when an OPEN monitor call is executed, if the sign bit of word 0 in the OPEN block is set to 1 (UU.PHS),
the device name is regarded as a physical name only, and logical names will not be searched. When an association is
made between a device and a software I/O channel via INIT, OPEN, or FILOP., the association remains in effect
until the channel is RELEASEd or until another INIT, OPEN, or FILOP., call is issued for that software I/O channel.
Non-disk and non-spooled devices may be assigned to a particular job by use of the ASSIGN or MOUNT commands.
Assignable devices are designated as either unrestricted devices or restricted devices. An unrestricted device can be
assigned directly by any job via the ASSIGN command, the INIT call, the OPEN call or the FILOP. call. A restricted
device can be assigned directly only by a privileged job. However, any unprivileged job can have a restricted device
assigned to it indirectly through the use of the MOUNT command.
The MOUNT command allows operator intervention for the selection or denial of a particular device; therefore, the
operator can control the use of assignable devices for the non·privileged user. This function is useful when there are
multiprogramming batch and interactive jobs competing for the same device. The restricted status of a device is set
or removed by the operator with the OPSER commands : RESTRICT and :UNRESTRICT. (Refer to the DECsystem-10 Operators Guide.)
The non-directory devices are listed in Table 7-1. The selection of a device is sufficient to allow I/O operations to
take place over the associated software channel.
Table 7-1
Non-Directory Devices
Device

(

3-Letter Generic Name

2-Letter Generic Name

card reader

CDR:

CR:

card punch

CDP:

CP:

line printer

LPT:

LP:
LL:
LU:

display unit

DIS:

paper· tape reader

PTR:

PR:

paper·tape punch

PTP:

PP:

user terminal

TTY:

TT:

pseudo-TTY

PTY:

magnetic tape unit

MTa:

MT:
M7:
M9:

,

plotter

PLT:

console TTY

CTY:

All other file specifiers directed to a non-directory device are ignored. Whether or not the program will use a directory device or a non-directory device for I/O operations, it is advisable that the program select a file, so that a direc·
tory device can be substituted for a non·directory device at run-time without notifying the program.

7-2

I/O Programming

(

For directory devices (e.g., disk and DECtape), files are addressable by file name. If a directory device has a single
me directory (e.g., DEC tape, refer to Chapter 9), the device and the me name are sufficient information in determining which me is desired. If the device has a multiple file directory (e.g., disk), the name of the file directory
must also be specified in determining the correct file. The file, device, and directory names are specified as arguments to the LOOKUP, ENTER, RENAME, and FILOP. monitor calls.
7.2.1 Device Initialization
The OPEN monitor call (op code 50) and the INIT monitor call (op code 41) initialize a device and associate it with
a software I/O channel number. These calls perform almost identical functions; the OPEN call is a reentrant form of
INIT and is preferred for this reason. Their calling sequences are
OPEN channel, addr
error return
normal return

addr:

I

~\

INIT
channel, status
SIXBIT/ devicename/
XWD obut, ibuf
error return
normal return

EXP status
SIXBIT/devicename/

XWD obuf, ibuf
where:

channel is the 4-bit channel number (0 to 17) to be associated with the device.
addr is the address of a 3-word OPEN argument block.
status contains for OPEN the OPEN status bits in its left half (refer to Table 7-2) and the SETSTS bits in
its right half. status for INIT contains the SETSTS bits in its right half.

(

device is the logical or physical name of the device. More information concerning this argument is given
in paragraph 7.2.2.
obuf and ibuf(used only for buffered modes), if non-zero, specify the location of the first word of the
3-word buffer ring header block for output and input, respectively.

The normal return is taken if a device is selected and if the device is associated with a software I/O channel. The
error return is taken if the requested device is in use, if the requested device does not exist, or if the device is
restricted and has not been assigned to the job via the MOUNT command. (The MOUNT command is described in
DECsystem-lO Operating System Commands.) If a device is already associated with the specified channel, the device is released.
The symbols obuf and ibuf specify the location of the first word of the 3-worq buffer ring header blocks for output
and input, respectively. Buffered data mode utilizes a ring of buffers in the user area and the priority interrupt system to permit the user to overlap computation with his data transmission. Core memory in the user's area serves as
an intermediate buffer between the user's program and the device. The buffer storage mechanism consists of a 3-word
buffer ring header block for bookkeeping and a data storage area subdivided into one or more individual buffers
linked together to form a ring. During input operations, the monitor fills a buffer, makes that buffer available to the
user's program, advances to the next buffer in the ring, and fills that buffer if it is free. The user's program follows
the monitor, either emptying the next buffer if it is full or waiting for it to fill.
During output operations, the user's program and the momtor exchange roles; the program fills the buffers and the
monitor empties them. Only the headers that will be used need to be specified. For instance, the output header
need not be specified, if only input is to be done. Also, data modes 15, 16, and 17 require no buffer ring header
block.

(

If either the buffer headers or the 3-word block lies outside the user's allocated core area, the monitor will stop the
job and will print one of the following messages on the user terminal:

7-3

June 1976

I/O Programming

I

(

?ILLEGAL ADDRESS IN UUO AT USER addr
?ADDRESS CHECK FOR DEVICE device AT USER addr
?ILLEGAL ADDRESS AT xxxx
Note that the buffer headers cannot be in the user's AC; however, buffer headers may be in locations above .JBPFI.
The first and the third words of the buffer header are set to zero. The left half of the second word is set up with the
byte pointer size field in bits 6 through 11 for the selected device-data mode combination.
If the same device is INlTed on two or more channels, the monitor will retain only th~buffer headers mentioned in
the last INIT, OPEN or FILOP. (A zero specification does not override a previous buffer header specification,
though.) Other I/O operations to any of the channels involved act on the buffer mentioned in the INIT/OPEN/
FILOP. previous to the I/O operations.

Table 7-2
OPEN Status Bits

I

Bit

Mnemonic

0

UU.PHS

A search is made of physical device names only.

1

UU.DEL

Error logging is disabled. Normally, this bit ·should not be set by the user; it is used
for user-mode diagnostics.

2

UU.DER

Error retry is disabled. Normally, this bit should not be set by the user; it is used for
user-mode diagnostics.

3

UU.AlO

Non-blocking I/O will be performed. Refer to Section 7.3.4

4

UU.lBC

The monitor is prevented from zeroing buffers after each output.

S

UU.SIE

Synchronize on an I/O error. The monitor will not perform any more I/O for the
user program, until the error bits have been cleared.

(

Meaning

(

7.2.2 Device Names
The device name specified can be either a logical, physical, or generic name. Logical names take precedence over
physical device names. The method of device selection depends on the format of the specified SIXBIT device name;
it can be in one of the formats listed in Table 7-3.
Table 7-3
Format of Device Names
Format

Example

dddn

LPT6

The monitor will attempt to select device LPT6 specifically requested at the user's
current node/station.

dddnnu

LPT132

The monitof,will attempt to select device LPT2 at node/station number 13.

ddd

LPT

The monitor will attempt to select a device of the desired type (e.g., a line printer) at
the user's current node/station. If all devices of this type are in use, the error return
will be taken. If no device of the desired type exists at the user's current node/
station, the monitor will attempt to select a device of the same type from the central
station. If the desired type of device has already been assigned to the job at the appropriate station and it has not been INlTed on another channel, it will be selected instead
of an unassigned device.

dddnn

LPT01

The monitor will attempt to select any line printer at node/station number 01.

June 1976

(

Meaning

7-4

(

I/O Programming

(

7.2.2.1 File Structure Names - Each file structure has a SIXBIT name associated with it that is specified by the
operator at system initialization time. This name can consist of four or less alphanumeric characters, and it must not
duplicate any device name, unit name, existing file structure name or ersatz device name (or their abbreviations,
refer to section 7.2.2.6). The recommended names for the file structures in the public pool are
DSKA
DSKB

DSKn (in order of decreasing speed)
When a specific file structure is INITed (e.g., DSKA) subsequent LOOKUP and ENTER searches are restricted only
to that file structure. Usually a channel is INITed with the generic DSK, in which case all file structures in the active
search list of the job are searched (refer to Job Search List, section 8.2.2).
I

"I

7.2.2.2 Logical Unit Names - When a single file structure name is specified, the set of all units in that file structure
is implied; however, it is possible to specify a particular logical unit within a file structure (e.g., DSKAO, DSKAl,
and DSKA2 are three logical units in file structure DSKA).
The monitor deals with file structures rather than with individual units; therefore, when reading files, specifying a
logical unit within a file structure is equivalent to specifying the file structure itself. The monitor locates the file
regardless of which unit it is on within a file structure.

(

However, when writing a file, the monitor uses the logical unit name as a guide in allocating space and will, if possible, write the file on the unit specified. In this way, a user can apportion files among different units for increased
throughput.
7.2.2.3 Physical Controller Class Names - In addition to DSK, single file structure names (e.g;, DSKA) and logical
unit names (e.g., DSKAO), it is possible to specify a class of controller. If the system has one controller of the type
specified, the result is the same as if the user had specified the physical controller name. The controller classes supported by Digital are
FH
FS
DP
RP

;an RClO controller
;an RHlO controller
;an RPlO controller
;an RHlO controller

7.2~2.4

Physical Controller Names -It is possible to specify any of the units on a particular controller. The monitor relates that name to the file structure which contains at least one unit on the specified controller. More than one
file structure may be specified when a physical controller name is used. The controller names that Digital supports
are
FHA
DPA
FSA
RPA

FHB
DPB
FSB
RPB

FHC
DPC
FSC
RPC

FHD
DPD
FSD
RPD

7.2.2.5 Physical Unit Names - When a physical controller name is specified, all units on that controller are
implied. It is possible to specify a physical unit name on a particular controller. The physical unit names that Digital supports are listed in Table 7-4.
7.2.2.6 Name Abbreviations - Abbreviations may be used as arguments to the ASSIGN command, the INIT monitor
call, the OPEN monitor call, and the FILOP. monitor call. The name abbreviation is checked for a match when the

7-5

June 1976

I

I/O Programming

Table 7-4
Physical Disk Unit Names
Meaning

Name

I
I

I

(

FHAO, ... FHA3
FHBO, ... ,FHB3
FHCO, ... ,FHC3
FHDO, ... ,FHD3

A mixture of fixed head disk units (RDlOs) and drum units (RMlOB) on RClO controllers.

FSAO, ... ,FSA3
FSBO, ... ,FSB3
FSCO, ... ,FSC3
FSDO, ... ,FSD3

RS04"rlisk units on the first, second, third and fourth RHlO controllers.

DPAO, ... ,DPA3
DPBO, ... ,DPB3
DPCO, ... ,DPC3
DPDO, ... ,DPD3

A mixture of RP02 and RP03 disk packs on the first, second, third, and fourth controllers
(RPlO).

RPAO, ... ,RPA3
RPBO, ... ,RPB3
RPCO, ... ,RPC3
RPDO, ... ,RPD3

RP04 disk units on the first, second, third, and fourth RHlO controllers.

(

ASSIGN, INIT, OPEN, and/or FILOP. is executed. The file structure or device eventually represented by a particular abbreviation depends on whether a LOOKUP, ENTER, or FILOP. follows. A LOOKUP applies to as wide a class
of units as possible, and an ENTER applies to as restricted a class of units as possible to allow files to be written on
a particular unit at your option.

(

7.3 DATA MODES
Data transmissions are either unbuffered or buffered. (Note that unbuffered mode is sometimes referred to as dump
mode.) The mode of transmission is specified by a 4-bit argument to the INIT, OPEN, FILOP. or SETSTS monitor
calls. Buffered mode transmits data to the disk exactly as it appears in the buffer. Data consists of 36-bit words.
The data modes are listed in Table 7-5.

I

All disk buffered mode operations utilize a 2008 word buffer. Attempts to set up a non-standardbuffer size are
ignored on the disk. In particular, attempting to use buffer size smaller than 20 OR words for input will result in data
being read in past the end of the buffer. This destroys that information that was beyond the buffer (e.g., the buffer
header of the next buffer).
With unbuffered mode on the disk, data is read into or written from anywhere in the user's core area without regard
to the normal buffering schemes. Control for read or write operations must be via a command list in core memory.
The command list format is described in section 7.3.1. The disk control automatically measures dump data into
standard-length disk blocks of 2008 words each. The remainder of a disk block is wasted, unless the number of
words is an exact multiple of the standard-disk block length after each command word in the command list.
7.3.1. Unbuffered Data Modes
Data modes 15, 16, and 17 (refer to Table 7-5) are unbuffered data modes that utilize a command list to specify
areas in the user's allocated core area to be read or written. The address specified in an IN, INPUT, OUTPUT, or
OUT monitor call points to the first word of this command list. There are three types of entries that may be present within the command list:
1.

June 1976

IOWD n,loc
which causes n words to be transmitted from lac through lac + n - 1. The next command is obtained
from the location following the IOWD. The assembler pseudo-op generates the instruction: XWD -n,
lac-I.
7-6

(

I/O Programming

(
2.

3.

XWD O,Y
which causes the next command to be taken from location y. This inst~uction is referred to as a GOTO.
A maximum of three consecutive GaTOs are allowed in the command list; after which an IOWD that
transiersdata must be written.

°

which terminates the command list.
Table 7-5
Data Modes

Code

Mnemonic

°1

.I0ASC

ASCII MODE. Seven-bit bytes are packed left-justified, five characters per word .

.I0ASL

ASCII-LINE MODE. ASCII-line mode is eqUivalent to ASCII mode, except that
the buffer is terminated by a form-feed, vertical tab, line feed, or ALT MODE
character. This difference is pertinent only to terminals (half-duplex software).

2

.I0PIM

Packed image mode .

/

(
3-5

Reserved for Digital.

6-7

Reserved for customer definition.

10

.I01MG

IMAGE MODE. This is a device-dependent mode. The buffer is filled with data
exactly as it is supplied by the device, in 36-bit bytes.

11-12

(

Meaning

Reserved for Digital.

13

.I01BN

IMAGE BINARY MODE. This mode is similar to binary mode, except that no
automatic formatting or checksumming is performed by the monitor, data is
transmitted in 36-bit bytes.

14

JOBIN

BINARY MODE. This is block format consisting of a word count, n (i.e., the
right half of the first data word of the buffer), followed by n 36-bit bytes .

15

.I0IDP

IMAGE DUMP MODE. A device-dependent mode where data is transmitted in
36-bit bytes.

16

.I0DPR

DUMP MODE. Dumps data as records without core buffering. Data is transmitted between any contiguous blocks of core, and one or more standard-length
records on the device for each command word in the command list. Data is
transmitted in 36-bit bytes .

17

.I0DMP

DUMP MODE. Dumps one record of data without core buffering. Data is transmitted between any contiguous block of core, and one record of arbitrary length
on the device for each command word in the command list. Data is transmitted
in 36-bit bytes.

(

On dISk, every IOWD that causes data to be transferred writes a separate record. Therefore, for all devices (except
DECtape) the following two examples will produce the same result:
1.

OUTPUT D, [IOWD 70, BUFI
IOWD 70, BUF2

Z]
2.

(

OUTPUT D,[IOWD 70, BUFI

Z]
OUTPUT D,[IOWD 70, BUF2

Z]
For DECtape, the first example writes one block, and the second examples writes two blocks.
7-7

June 1976

I/O Programming

(
When the command list has been completely processed, the monitor returns control to the user. If an illegal address
is encountered while processing the command list, the monitor will stop the job and print the following message on
the user's terminal:
?ADDRESS CHECK AT USER addr
DUMP input is similar to dump output; below is an example of dump output of fixed-length records.
;SUBROUTINE TO OPEN DISK IN DUMP MODE
;CALL WITH:
PUSHJ
P,DMPINI
RETURN HERE
DMPINI:

I

OPEN
JRST
ENTER
JRST

DSK,OPNBLK
NOTAVL
DSK, FILE
FILBAD

POPJ

P,O

;OPEN THE DISK ON CHANNEL "DSK"
;DEVICE IS BUSY
;CREATE A NEW FILE
;CANNOT ENTER FILE NAME IN
;DISK DIRECTORY.
;RETURN-FILE IS NOW OPEN FOR
; DUMP MODE OUTPUT

(

;HERE IF DEVICE DSK: CANNOT BE OPENED
NOTAVL: OUTSTR [ASCIZ "?CANNOT OPEN DSK:
"]
;PRINT AN ERROR MESSAGE
EXIT
;RETURN TO THE MONITOR

I

;HERE IF CANNOT ENTER DUMP.BIN
FILBAD: OUTSTR [ASCIZ "?CANNOT CREATE DSK:DUMP.BIN
"]
;PRINT ERROR MESSAGE
EXIT
;RETURN TO THE MONITOR
OPNBLK: EXP
SIXBIT
EXP
FILE:

I

SIXBIT
SIXBIT
EXP
EXP

!DSK!
0
/DUMP/
/BIN/

0
0

;SELECT DUMP MODE
;DEVICE NAME
;NO BUFFERS
;FILE NAME
;EXTENSION
;DEFAULT PROTECTION
;DEFAULT DIRECTORY

;SUBROUTINE TO WRITE DATA IN BUFFER
;CALLWITH:
PUSHJ - P ,DMPOUT
RETURN HERE
DMPOUT: OUT
POPJ
OUTSTR
"]
EXIT

I

.IODMP

DSK,OUTLST
;WRITE THE DATA
P,O
;NO ERRORS - RETURN TO CALLER
[ASCIZ "?OUTPUT ERROR FOR DSK:DUMP.BIN
;PRINT AN ERROR MESSAGE
;QUIT

;1/0 LIST FOR THE OUTPUT
BUFSIZ,BUFFER
OUTLST: IOWD
EXP
0
BUFFER: BLOCK
BUFSIZ

June 1976

;WRITE BUFSIZ WORDS FROM BUFFER
;END OF I/O LIST
;OUTPUT BUFFER

7-8

(

I/O Programming

(

;SUBROUTINE TO CLOSE OUT FILE
;CALLWITH:
PUSHJ
P,DMPDON
RETURN HWERE
DMPDON: CLOSE
STATO
POPJ
OUTSTR

"]
EXIT

(

DSK,
;WRITE THE END OF FILE
DSK,IO.ERR
;ANY ERRORS?
P,O
;NO-RETURN
;ASCIZ "?ERROR CLOSING DSK:DUMP.BIN
;PRINT ERROR MESSAGE
;RETURN TO THE MONITOR

7.3.2 Buffered Data Modes
Data modes 0, 1,2, 10, 13, and 14 are buffered data modes (refer to Table 7-5). The address specified in an INPUT,
IN, OUTPUT, or OUT monitor call may be used to alter the normal sequence of buffer reference. If the specified
address is 0, the address of the next buffer is obtained from the right half of the second word of the current buffer.
If the specified address is non-zero, it is the address of the second word of the next buffer to be referenced.
The buffer pointed to by the specified address can be in a separate ring from the present buffer. Once a new buffer
location has been established, the following buffers are taken from the ring specified by address. Since buffer rings.
are not changed iflfO activity is pending, it is not necessary to issue a WAIT monitor call.

(

7.3.2.1 Buffered Input - If no input buffer ring was established (devices other than disk) when the first INPUT or
IN monitor call was executed, on buffered input a 2-ring buffer ring is set up. If no buffer ring was established for a
disk device when the first INPUT or IN monitor call was executed, the default number of buffers will be set up (this
default value is specified at monitor generation time via MONGEN). Buffered input may be performed either synchronously or asynchronously. If bit 30 of the status word is set, each INPUT and IN monitor call will perform the
following:
1.
2.
3.

(

4.

5.

6.

The use bit in the second word of the buffer is cleared, thereby making the buffer available for refilling
by the monitor.
An advance is made to the next buffer (by moving the contents of the second word of the current buffer
to the right half of the first word of the 3-word buffer header).
Control is returned to the user's program if an end-of-file or error condition is encountered. Otherwise,
the monitor will start the device, which fills the buffer and stops data transmission.
The number of bytes in the buffer is computed from the number of words in the buffer (right half of the
first data word in the buffer) and the byte size, and the result is stored in the third word of the buffer
header.
The position and address fields of the byte pointer are set in the second word of the buffer header, so
that the first data byte is obtained by an ILDB instruction.
Control is returned to the user's program.

In synchronous buffered mode, the position of a device, relative to the current data, is easily determined. The asynchronous input mode differs in that once a device has been started, successive buffers in the ring may be filled at the
interrupt level without stopping transmission until a buffer whose bit is 1 is encounted. Control is returned to the
user after the first buffer is filled. The position of the device, relative to the data currently being processed by the
user's program, depends on the number of buffers in the ring and when the device was last stopped.
7.3.2.2 Buffered Output - If the first word of the buffer header is 0, (i.e., no output buffer ring has been established, the following will occur when the first OUT or OUTPUT monitor call is executed the default number of
buffers will be set up. The default is established at monitor generation time via MONGEN.

(

NOTE
For non-disk devices, a 2-buffer ring will be set up.

7-9

I/O Programming

If the ring use bit (bit 0 of the first word of the buffer header) is 1, it will be set to O. The current buffer will be
cleared to zeroes, and the position and address field of the buffer byte pointer (i.e., the second word of the buffer
header) will be set, so that the first byte will be properly stored in an IDPB instruction. The byte count (i.e., the
third word in the buffer header) will be set to the maximum number of bytes that can be stored in the buffer, and
control will be returned to the user's program.

(

The first execution of an OUT or OUTPUT monitor call initializes the buffer header and the first buffer, but it does
not transmit data. Note that a dummy OUT or OUTPUT is required in buffered mode I/O. If the ring use bit contains 0 and bit 31 of the file status word is 0, the number of words to be in the buffer is computed from the address
field of the buffer byte pointer (i.e., the second word of the buffer header) and tIle buffer pointer (i.e., the first word
of the buffer header). The result will be stored in the right half of the third word of the buffer.
If bit 31 of the file status word contains 1, the monitor assumes that the user has already set the word count in the
right half of the third word. The buffer use bit (bit 0 of the second word of the buffer) is set to 1, which indicates
that the buffer contains data to be transmitted to a device.
If the device is not currently active (i.e., not receiving data), the device is started. The buffer header is then
advanced to the next buffer by setting the buffer pointer in the first word of the buffer header. If the buffer use
bit of the new buffer contains 1, the monitor places the j ob into a wait state until the buffer is emptied at the interrupt level. The buffer is then cleared to zeroes (provided that the OPEN bit was not specified), the buffer byte
pointer and the byte count are initialized in the buffer header, and control is returned to the user's program.

(

7.3.2.3 Synchronization of Buffered I/O - Sometimes it is desirable to delay a device until it completes its I/O
activities. An example of this would be when trying to recover from a transmission error. The WAIT monitor call
returns control to a user's program when all data transfers on a specific channel have been satisfied. The WAIT
calling sequence is
WAIT channel,
only return
Ifno device has been associated with the specified channel number control will be returned immediately. After the
device has been stopped, the position of the device, relative to the data currently being processed by the user's program, can be determined by the buffer use bit.
7.3.3 Buffer Structure
Buffers are used when transmitting data to account for the different speeds between a sending device and a receiving
device. Before performing any I/O, the device to be used must be associated with one of the 16 software I/O channels. All software I/O channels are bi-directional (i.e., they may be used to perform both input and output).

\

The size of the buffer is different depending on the type of device used. A buffer ring header must be declared in a
user program; it is a three words in length and is described in further detail in section 7.3.3.1. Buffers are created at
" the location specified by .JBFF in the Job Data Area; when buffers are filled, .JBFF will contain a value equal to the
number of words in the buffer plus one.
7.3.3.1 Buffer Ring Header Block - The location of the buffer ring header block is specified by an argument to
either of the INIT, OPEN, or FILOP. monitor call. The information stored in the buffer ring header block is placed
there by the monitor in response to user execution of certain monitor calls. The user program has access to the
information within the buffer ring header block, which is necessary information that is required to fill and empty
buffers.
The buffer ring header block is represented in Figure 7-1.

(
7-10

)
j

I/O Programming

(

o

1

use
bit

17

35

18
pointer to
current buffer

x

byte pointer

byte counter

universal device index (MPX only)

Figure 7-1. Buffer Ring Header Block

i

\
where:

the use bit (bit 0, BF.VBR) indicates whether or not there has been input into or output from the buffer
pointed to by pointer to current buffer. (If bit 0 equals 1, the buffer is available to the filler).
x if set (bit 1 = 1, BF .IBC) inhibits the buffer from being cleared.

pointer to current buffer (.BFADR) points to the second word of the current buffer.
byte pointer (.BFPTR) points to the byte within the current buffer which is the next input/output data.
(The byte size is determined by the data mode.)

(

byte counter (.BFCTR) is the count of the number of bytes remaining in the current buffer.
A user program cannot use a single buffer ring header block for both input and output. A single buffer ring header
cannot be used for more than one I/O function at the same time. Users cannot use the same buffer ring header block
for simultaneous input and output; only one buffer ring is associated with each buffer ring header block. Note
that the first word of the buffer ring header block (.BFADR) is zeroed on an OPEN/INIT/FILOP. monitor call.

(

7.3.3.2 Buffer Ring - The buffer ring is established by the INBUF and OUTBUF monitor calls, or if neither of
these exists, when the first IN, INPUT, OUT, or OUTPUT call is execute4 a 2-buffer ring will be set up. The address
specified in a INBUF or OUTBUF call specifies the number of buffers in the ring. The location of the buffer ring is
specified by the contents of the right half of .JBFF in the Job Data Area. The monitor then updates .JBFF to point
to the first location past the storage area of the buffers.
All buffers in a ring are identical in structure, refer to Figure 7-2.

o

17

35

18

.BFSTS

file status word
xl

size
bookkeeping
word

buffer 2

.BFHDR

word count

.BFCNT

data word 1

··
data word n
Figure 7-2. Buffer Structure
7-11

March 1976

I

I/O Programming

where:

file status word (.BFSTS) contains the status of the file when the monitor advances to the next buffer in
the ring. This word contains the errors received while working with buffered mode, they are not
recorded in the GETSTS word.

x (BF.IOU) is the use bit for the buffer which is a flag that indicates whether or not the buffer contains
active data. This bit is set to a 1 by the monitor when the buffer is full on output or it is being filled on
input (Le., if the use bit = 0, the buffer is available to the filler; if the use bit = 1, the bufferis available
to the emptier.) The use bit prevents the monitor and the user's program from interfering with each
other by attempting to use some of the same buffer simultaneously. Buffers are advanced by the monitor calls and not by the user's program. The use bit should never be changed by a user program.
size (BF .SIZ) is the size of the data area of the buffer plus one. The size of this data area is dependent
on the type of device being used.
word count (BF .CNT) is reserved for a count of the number of words that actually contain data.
bookkeeping word is reserved for bookkeeping purposes, depending on the particular device and the data
mode. This word contains the Universal Device Index (UDX) for MPX devices.

(

A user program can check the contents of the use bit in the current buffer by either of the following procedures:
MOVE ac, @RING
TLNE ac,400000

SKlPL @RING

if the user program
labeled the buffer
ring header block
RING.

which skips if the use
bit contains 1.

7.3.3.3 Monitor Generated Buffers - Each device has a specified buffer size associated with it. The INBUF and
OUTBUF calls set up a ring of n standard-size buffers associated with the input and output buffer headers, respectively, which are specified by the last OPEN/INIT call of the specified data channel. If the number of buffers is zero
for either an INBUF or an OUTBUF call, the default number of buffers for the specified device will be set up. If
the specified device has not been initialized by either an OPEN, INIT or FILOP. monitor call, the monitor will stop
the job and print the following message on the user's terminal;

(

?I/O TO UNASSIGNED CHANNEL AT USER addr
The storage space for a buffer ring is taken from successive locations, beginning with the location specified in the
right half of .JEFF of the Job Data Area. This location is set to the program break, which is the first free location
above the program area, by a RESET monitor call. If there is insufficient space to set up the buffer ring the monitor will automatically attempt to expand the user's core allocation. If this core reallocation fails, the monitor will
stop the job and print the following message on the user's terminal:

(

?ADDRESS CHECK FOR DEVICE device AT USER addr
The above message is also printed when an INBUF (or OUTBUF) is attempted when the last INIT (OPEN or FILOP.)
call on the specified channel did not specify an input (or output) buffer ring header block.
7.3.3.4 User Generated Buffers - The following code illustrates an alternative to the use of the INBUF operator.
Analogous code may replace OUTBUF. This code operates similarly to INBUF, size must be set equal to the greatest
number of data words expected in one physical record.
GO:

I
March 1976

OPEN
JRST
MOVE

I,OPNBLK
;INITIALIZE ASCII MODE
NOTAVL
0, [XWD 400000,BUF1+1]

7-12

(

I/O Programming

MOVEM
MOVE
MOVEM
JRST

;THE 400000 IN THE LEFT HALF
;MEANS THE BUFFER WAS
;NEVER REFERENCED>
O,MAGBUF
;SET UP NONSTANDARD
0, [POINT BYTSIZ,0,35]
;BYTE SIZE
0,MAGBUF+1
CONTIN
;GO BACK TO MAIN SEQUENCE

OPNBLK: 0
SIXBIT/MATO/
XWD O,MAGBUF
MAGBUF: BLOCK 3
BUF1:

;MAGNETIC TAPE UNIT 0
;INPUT ONLY
;SPACE FOR BUFFER RING
;HEADER
;BUFFER 1, FIRST WORD UNUSED
o
XWD
SIZE+ 1,BUF2+ 1 ;LEFT HALF CONTAINS
;DATA AREA
;SIZE+1, RIGHT HALF HAS
;ADDRESS OF NEXT BUFFER
;LEFT HALF CONTAINS DATA
BLOCK SIZE + 1
;AREA.

7A DEVICE TERMINATION AND REASSIGNMENT
7A.l RELEASE A Device (Op Code 071)
When all transmission between the user's program and a device is finished, the program may relinquish the device by
performing a RELEASE monitor call. Its calling sequence is

(

I

RELEASE channel,
If no device is associated with channel, RELEASE (op code 071) returns control immediately. Otherwise both input
and output sides of channel are CLOSEd, all locks created by ENQ/ENQ are released, and the correspondence
between channel and the device, which was established by an INIT/OPEN/FILOP., is terminated.

If the device is neither associated with another data channel nor assigned by the ASSIGN or MOUNT commands, it
is returned to the monitor's pool of available facilities. Control is returned to the user's program.

I

7A.2 The RESDV. Monitor Call (CALLI 117)
The RESDV. monitor call allows a program to reset a single channel. It is similar to the RELEASE call, except that
no files or buffers are closed. Its calling sequence is
MOVEI ac, channel
RESDV. ac,
error return
normal retu,rn
On a normal return, the channel is reset. Files that are being created on the channel are deleted; any older generation
with the same file name remains. All I/O transmissions on the channel are stopped; and device allocations made by
INIT or OPEN or FILOP. on the specified channel are closed. The device is returned to the monitor's pool of available devices unless it has been ASSIGNed by either the ASSIGN, ALLOCATE, or MOUNT commands (refer to
DECsystem-lO Operating System Commands).
On an error return, the AC will contain -1 if no device was associated with the specified channel. If the call has not
been implemented, the AC will be unchanged.

7-13

March 1976

I

I/O Programming

I

7.4.3 The REASSIGN Monitor Call (CALLI 21)
The REASSIGN monitor call will reassign a device under program control to a specified job. The device's logical
name assignment is not cleared, if the program doing the REASSIGN has JACCT or [1,2] privileges. REASSIGN's
calling sequence is
MOVEI
MOVE
{ MOVEI
MOVEI
REASSIGN

(

ac, job-number
ac+ 1, [SIXBIT/devicename/]}
ac+1, channel
ac+1, udx
ac,

only return
job number is the number of the job for which a device is to be assigned.
device is the physical or logical name of the device.
channel is the number of the channel on which the reassigned device has been initialized.
udx is the universal device index for the device.

where:

A device can be reassigned if it is assigned to the calling job, or if it is not assigned to any job and it is not detected.
A RELEASE is performed on the device unless
1.
2.

(

the job issuing the call is reassigning the device to itself (-1 in the AC), or
the job is reassigning the device by specifying 0 in the AC.

If the device is a restricted device and 0 is in the AC when the REASSIGN call is made, the device is returned to the
restricted pool of devices and it can then be reassigned to a non-privileged job by a privileged job.

On a return, if the contents of the AC is 0, it indicates that the specified job does not exist. If the contents of the
AC is -1 it indicates that
l.
2.
3.
4.

I

I

(

the device has not been assigned to the new job.
the device is the job's controlling terminal.
the logical name is a duplicate logical name, or
the device specified is connected to an MPX channel, and no UDX was specified.

7.4.4 The DEVLNM Monitor Call (CALLI 107)
The DEVLNM monitor call sets the logical name for a specified device. Its calling sequence is

(

ac, channel
}
ac, udx
ac, [SIXBIT/devicename/]
ac+1, [SIXBIT/logicalname/]
ac,
error return
normal return

MOVEI
{ MOVEI
MOVE
MOVE
DEVLNM

where:

devicename is the name of the device for which a logical name is desired.
channel is the channel number on which the specified device has been initialized.
udx is the universal device index for the specified device.
logical name is the logical name to be assigned to the device.

On a normal return, the AC and AC+ 1 are unchanged. On an error return, the AC will contain one of the error codes
listed in Table 7-6.

(

March 1976

7-14

I/O Programming

Table 7-6
DEVLNM Error Codes
Code

Mnemonic

Meaning

-1

DVLNBX%

A non-existent device or channel number has been specified.

-2

DVLIU%

The logical name specified is already in use.

-3

DVLBA%

The device specified has not been ASSIGNed or INITed.

7.5 DEVICE INFORMATION
7.5.1 The DEVSTS Monitor Call (CALLI 54)
The DEVSTS monitor call retrieves the device status word of the device data block (DDB) for a specified device. Its
calling sequence is
aC,channel
}
{ MOVEI
MOVE
ac, [SIXBIT/device/]
DEVSTS ac,
error return
normal return

where:

channel is the number of the software I/O channel associated with the device.
device can be one of the following:

CDR
CDP
DTA
PTR
PTP
DSK
LPT
PLT
The device status word is used by a device service routine to save the results of a CONI after each interrupt from the
device.
The DEVSTS monitor call is not meaningful and returns a word of zeroes under the following conditions:
1.
2,.
3.
4.

When an MPX channell device has been specified.
When a device controlled by a front-end has been specified.
When a magnetic tape or disk device has been specified.
When used in asynchronous buffered I/O mode. Unless a WAIT monitor call has first been issued to
ensure synchronization of the actual data transferred with the device status returned.

On a normal return, the contents of the device status word is returned in the AC. If the device service routine does
not store a CONI, useless information may be returned.
Note that the error return is not taken when the device service routine does not use the device status word for its
intended purpose. Devices with both a control and data interrupt will store the controller CONI (DTA, DSK, DSK2,
DPC, DPC2).
7.5.2 The DEVCHR Monitor Call (CALLI 4)
The DEVCHR Monitor Call will return the physical characteristics associated with a specified device. Its calling
sequence is
7-15

110 Programming

I

(

MOVE
ac, [SIXBIT/devicej]}
{ MOVEI
ac, channel
MOVEI
ac, udx
DEVCHR ac,
normal return,
where:

device is the physical/logical name of the desired device:
channel is the right-justified software I/O channel associated with the desired device.
udx is the universal device index associated with an MPX device.

If the specified device is not found or the specified channel has not been initialized, the AC will contain a zero on the
return from the call. If the device specified is found, the AC will contain the device's characteristics (refer to
Table 7-7).

7.5.3 The DEVTYP Monitor Call (CALLI 53)
The DEVTYP monitor call returns the physical properties associated with a specified device. Its calling sequence is

I {

,(

MOVE
ac, [SIXBIT/deVice/]}
MOVEI
ac, channel
MOVEI
ac, udx
DEVTYP ac,
e"orreturn
normal return

On a normal return, the device type bits will be returned in the AC, refer to Table 7-8. If the AC contains 0 on a
normal return, it is an indication that either the c device does not exist or the channel has not been initialized.

I

(

On an errOr return, the AC remains unchanged, indicating that the DEVTYP monitor call has not been implemented,
in which case, the DEVCHR monitor call may be used.
7.5.4 The DEVSIZ Monitor Call (CALLI 101)
The DEVSIZ monitor call is used to determine the buffer size for a device, if the user wants to allocate core. Its
calling sequence is
MOVEI
ac, addr
DEVSIZ ac,
error return
normal return

(

addr:
EXP data mode
addr+l:{SIXBIT/deVice/}
channel
udx

I

where:

addr points to a 2-word argument block.
data mode contains the bit settings the user set on an OPEN or INIT.
device is the physical/logical name of the device.
channel is the number of the software I/O channel associated with the device.
udx is the universal device index.

If the device exists and the data mode is legal, the AC will contain in bits 0-17, the default number of buffers, and
in bits 18-35 the default buffer size (including the first three words of the buffer).

March 1976

7-16

(

I/O Programming

Table 7-7
Device Characteristics

(
Mnemonic

0

DV.DRI

The DEC tape directory is in core. This bit is cleared by an ASSIGN call or a
DEASSIGN call to the specified DECtape unit.

1

DV.DSK

The device is a disk unit.

2

DV.CDR

The device is either a card reader (DVIN = 1) or a card punch (DVOUT

3

DV.LPT

The device is a line printer.

4

DV.TTA

The device is a terminal that is controlling ajob.

5

DV.TTU

TTY DDB is in use.

6

(

(

(

Meaning

Bit

= 1).

Reserved.

7

DV.DIS

The device is a display unit.

8

DV.LNG

The device has a long dispatch table (monitor calls other than INPUT, OUTPUT,
CLOSE, and RELEASE perform real functions).

9

DV.PTP

The device is a paper tape punch.

10

DV.PTR

The device is a paper tape reader.

11

DV.DTA

The device is a DEC tape unit.

12

DV.AVL

The device is available to this job, or this device is already assigned to this job.

13

DV.MTA

The device is a magnetic tape unit.

14

DV.TTY

The device is a terminal.

15

DV.DIR

The device is a directory device (disk or DEC tape).

16

DVJN

The device can perform input.

17

DV.OUT

The device can perform output.

18

DV.ASC

The device has been ASSIGNED.

19

DV.ASP

The device has been assigned via INIT/OPEN.

20

DV.MI7

Mode 17 - dump - JODMP

21

DV.MI6

Mode 16 - dump records - JODPR

22

DV.MI5

Mode 15 - Image dump - JOIDP

23

DV.M14

Mode 14 - Binary - JOBIN

24

DV.M13

Mode 13 - Image Binary - JOBIN

25

DV.MI2

Mode 12

26

DV.M11

Mode 11

27

DV.MI0

Mode 10 - image - JOIMG

28

DV.M7

Mode 7

29

DV.M6

Mode 6

30

DV.M5

Mode 5

31

DV.M4

Mode 4
Mode 3

32

DV.M3

33

DV.M2

Mode 2 - packed image - JPOIM

34

DV.Ml

Mode 1 - ASCII line - JOASL

35

DV.MO

Mode 0 - ASCII - JOASC
7-17

-

I/O Programming

(

Table 7·8
Device Type Bits
Bit

Mnemonic

0=1

TY.MAN

Meaning
LOOKUP/ENTER mandatory.
Reserved for the future.

1 - 11

,L

12 = 1

TY.AVL

Device is available to this job.

13 = 1

TY.SPL

Spooled on disk. (Other bits reflect properties of real device, except variable buffer
size.)

14 = 1

TY.INT

Interactive device (output after each break character).

15 = 1

TY.VAR

Capable of variable buffer size (user can get his own buffer lengths).

16 = 1

TY.IN

Capable of input.

17 = 1

TY.OUT

Capable of output.

18 - 26

TY.JOB

Job number that currently has device INITed or ASSIGNed.

(

Reserved for the future.

27·28
29

TY.RAS

Device is a restricted device (i.e., can be assigned only by a privileged job or the
MOUNT command).

30 - 35

TY.DEV

Device type code.
Code

Mnemonic

0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
20
21
22
23-57
60-77

.TYDSK
.TYDTA
.TYMTA
.TYTTY
.TVPTR
.TVPTP
.TYDIS
.TYLPT
.TYCDR
.TYCDP
.TVPTY
.TVPLT
.TYEXT
.TYMPX
.TVPAR
.TYVCR
.TVPAP
.TYLPC
.TVPCP

Meaning
Disk of some sort
DECtape
Magnetic tape
TTY or equivalent
Paper-tape reader
Paper-tape punch
Display
Line printer
Card reader
Card punch
Pseudo-TTY
Plotter
External task
Software MPX
PA611R on DC44
PCll(R) on DC44
PA611P on DC44
LPC-ll on DC44
PC-II (P) on DC44
Reserved for Digital
Reserved for customer

(

(

The error return is taken if the call is not implemented, in which case, the AC is unchanged. On an error return, one
of the error codes listed in Table 7-9 will be returned in the AC.

(
7·18

I/O Programming

(

Table 7·9
DEVSIZError Codes
ElTor Code

Meaning

Mnemonic

0

DVSDM%

Device exists, but the data mode is dump mode.

·1

DVSNX%

Nonexistent device.

·2

DVSIM%

Illegal mode.

7.5.5 The WHERE Monitor Call (CALLI 63)
The WHERE monitor call returns the physical node/station number of the specified device. Its calling sequence is

(

ac, [SIXBIT/device/]}
{ MOVE
MOVEI
ac, channel
WHERE ac,
error return
normal return

where: device is a SIXBIT device name.
channel is a right·justified software I/O channel number associated with the device.
If OPR is specified as the device name, the node/station number at which the job is logically located is returned. If
CTY is specified, the node/station number of the job's command decoder is returned. If TTY is specified, the node/
station number at which the job's terminal is physically located is returned.
On a normal return, the left half of AC contains the status of the node, and the right half of AC contains the node
number associated with the device. The status of the node is represented by the following bits:
BIT 13 = 1 if the node is dial.up (.RMSDU).
BIT 14 = 1 if the node is loaded (.RMSUL).
BIT 15 = 1 if the node is in the loading procedure (.RMSUG).
BIT 16 = 1 if the node is down (.RMSUD).
BIT 17 = 1 if the station is not in contact (.RMSUN).

(

The error return is taken if the monitor call is not implemented, the channel specified is not INITed, or the requested
device does not exist.
7.5.6 The NODE Monitor Call (CALLI 157)
The NODE monitor call performs different functions depending on the function code specified in the left-half of
the AC. The functions are described in Table 7-10.
Table 7·10
NODE Monitor Call Function Codes
Function Code

(

Meaning

1

Assigns the logical device name specified in the argument list to the
physical device specified.

2

Returns the node number in the specified AC, given the node name,
Returns the node name in the specified AC, given the node number.

7·19

June 1976

I/O Programming

Table 7-10 (Cont.)
NODE Monitor Call Function Codes
Function Code

Meaning

3

Performs special station control message transfers (privileged monitor
call).

4

Requests bootstrap messages from the remote node (privileged monitor call).

The calling sequence for the NODE monitor call is
MOVE ac, [XWD !unc-code,addr]
NODE ac,
error re turn
normal return
addr:

(

argument-list

Function code 1 assigns a logical device name to a physical device. Its argument list is:
XWD 0, count
SIXBIT/node-id/
SIXBIT /dev-name/
SIXBIT /log-name/
where:

count is the number of arguments.
node-id is the identification of the node on which the physical device exists.
dev-name is the physical device name.
log-name is a logical device name assigned by the user.

(

If log-name is omitted from the argument-list, the logical name is the same as the physical device name specified.
Function code 2 returns either the node name or node number; its argument list is

XWD 0,2
SIXBIT /node-name/
XWD 0, node-num
where:

(

node-name is the name of the node, and
node-num is a 2-digit node number.

For function code = 3, the job must be privileged and locked in core. This function performs special station control
message transfers. The argument list is
XWD O,count
SIXBIT /node-name/
XWD O,node-num
XWD #bytes,addr
XWD #by tes,addr
where:

count is the number of arguments.
# bytes is the number of 8-bit bytes in the transmit message
addr is the address of the block containing the message.
# bytes is the number of bytes that can be received.
addr is the address of the block into which the message is to be placed.

June 1976

7-20

(

I/O Programming

(

For function code = 4, the job must be privileged and locked in core. This function requests bootstrap messages from
the remote node. The argument list is

XWDO,count

o
o

; location function uses to return node number
; unused

XWD #bytes,addr
where: count is the number of arguments.
#bytes is the number of bytes to be received.
addr is the address of the block into which the message is to be placed.
If the monitor call is successful, the normal return is taken and the AC remains unchanged. If the block for the device
does not yet exist, a device block is built and communication is established with the remote device.
/

{

If the monitor cannot perform the logical assignment, the error return is taken and the AC contains an error code.
Refer to Table 7-11 for a list of error codes and their meanings.
The following example, upon normal return, causes all references to logical device LPTA to be associated with physical device LPT on node NOD EA.
MOVE AC, [XWD I,ADDR]
NODEAC,
JRSTNOGOOD
JRST GOOD

/

; four arguments in list
; 6-bit node-ID
; 6-bit device name
; 6-bit logical name

ADDR: XWD 0,4
SIXBITINODEAI
SIXBITILPT I
SIXBITILPT AI

Table 7-11
NODE Monitor Call Error Codes
Error Code

Meaning

1

Illegal argument list. Either an address error occurred
or the value is not within an acceptable range.

2

Illegal node number or illegal node name.

3

The user is not a privileged job.

4

Remote node control is not available.

5

The job is not locked in core.

7.5.7 The DEVNAM Monitor Call (CALLI 64)

(

The DEVNAM monitor call returns the SIXBIT physical name of a device. obtained through either a generic INITI
OPEN or a logical device assignment. Its calling sequence is

7-21

June 1976

I/O Programming

MOVE
{ MOVEI
MOVEI
DEVNAM

(

ac, [SIXBIT/device/]}
ac, channel
ac, udx
ac,

error return
normal return

where: device is the logical/physical name of the device for which the physical device name is to be returned.
channel is the channel number on which the device has been INITed.
udx is the physical device index for a device.
The normal return is taken if the specified device is found, and AC will contain the SIXBIT physical name. The error
return is taken if the call has not been implemented, in which case the AC is unchanged. The error return is also taken
if the specified channel has not been INITed or the specified device does not exist.

(

(

(

(
June 1976

7-22

CHAPTER 8
FILES

8.1 FILE DEFINITION
A file is an ordered set of data stored on a peripheral device. The extent of a file on input is determined by an endof-file condition, which is different depending on the device used. The extent of a file on output is determined by
the amount of information written by an OUT or OUTPUT monitor call, up through and including the next CLOSE
and RELEASE monitor call.
8.2 STRUCTURE OF DISK FILES
The file structure of a disk system minimizes the number of disk seeks needed for sequential and/or random access
to a file during I/O. The monitor automatically assigns physical space for file data, when a user program writes or
deletes a logical file.
Disk files may be any length, and each user can have as many disk files as disk space for that user will allow. Files
can be simultaneously read and updated, allowing shared data bases (refer to Enqueue/Dequeue, Chapter 16). A new
generation of a file may be recreated by one user while other users continue to read the old generation, allowing a
smooth replacement of shared data files and programs. All users may selectively update portions of the file, rather
than creating new generations.
NOTE
The file structure described in this section is generally
transparent to the user; therefore, detailed knowledge of
this material is not essential for effective user-mode utilization of the disk.
In the monitor there is one set of disk-independent routines for handling servicing of all disk and drum units. The
set of routines interprets and operates on file structures, processes disk monitor calls, queues disk requests, and
makes optimization decisions.

(

All queues, statuses, and flags are organized by logical disk unit rather than physical disk unit. The monitor primarily deals witn logical units within file structures, and it converts to physical units in the small device-dependent
routines just before issuing I/O commands. The device-dependent routines perform the I/O for specific storage
devices and translate logical block numbers into physical disk addresses. All references made to disk addresses refer
to the logical or relative addresses used by the system, and they do not refer to a physical addressing scheme (which
records sectors and tracks of a particular device). The basic addressable logical disk block is 200 (octal) 36-bit
words.
8.2.1 File Directories
A directory is a file which contains pointers to other files on the disk. There are three levels of directories in each
file structure:
1.
2.
3.

the master file directory (MFD),
the user file directory (UFD), and
sub-file directories (SFDs).

The master file directory consists of two-word entries, which are the names of the user file directories on the file
structure. The first word of the entry contains the project-programmer number of the user. The left half of the

8-1

Files
second word of the entry contains SIXBIT jUFDj; and the right half contains a pointer to the first cluster of the user
me directory (refer to Figure 8-1). The main function of the master me directory is to serve as a directory of individual user file directories. A continued MFD is the MFDs of all me structures in the job's search list.

L

I

1
UFO

-

10

10

UFO
20
UFO

20

DATA FILES

USER FILE
DIRECTORIES

MASTER FILE
DIRECTORY

(

FILE 1

V

EXT

I

FILE 2
EXT

J

FILE :3
EXT

···

I

·•

-------1

/

r--f--

·

1111

I

FILE X
EXT

I

EXT

I

FILEZ
EXT

I

···

r-----I

V

(

I

FILE Y

r---

10 -0543

Figure 8-1. Basic Disk File Organization for Each File Structure
The entries within a user file directory are the names of files existing in a given project-programmer number area
within the file structure. The first word of each entry contains the file name in SIXBIT. The left half of the second
word contains the file name extension in SIXBIT, and the right half contains a pointer to the first cluster of the file
(see Figure 8-1). This pointer specifies both the unit and the block number of the file structure in which the file
appears. The right half of the directory entry is referred to as a compressed file pointer (CPF). A continued UFD is
all the UFDs for the same project-programmer number on all file structures on the job's search list.

(

When the user logged-in, each file structure for which he has a quota contains a UFD for his project-programmer
number. Each UFD contains the names of all the user's files for that file structure only. UFDs are created only by
privileged programs (Le., LOGIN in response to a LOGIN command, and OMOUNTjUMOUNT in response to a
MOUNT command). A user is not prevented from attempting to read a file in another user's UFD on a file structure
for which he does not have a UFD. Whether or not the user is successful depends on the protection specified for the
me being referenced.

As an entry in the user file directory, the user can include a sub-file directory (SFD), The sub-file directory is similar to the other types of directories in that it contains as 'data all of the names of files within its directory. This
directory is pointed to by a UFD or a higher-level SFD nested in any arbitrary tree structure. The maximum number
of nested SFDs allowed is defined via a MONGEN question and can be obtained from a GETTAB table (GETTAB
Table .GTLVD, Item Number 17). Files can be written or read in SFDs nested deeper than the maximum, but SFDs
cannot be created. (There is an absolute maximum of six, including the UFD.) Unlike UFDs, a sub-file directory
can be created by any program. A continued SFD, or sub-directory, is all of the SFDs on all file structures in the
job's search list with the same name and path.
This third level of directory allows groups of files belonging to the same user to be separate from each other. This is
useful when organizing a large number of mes according to function. In addition, simultaneous batch runs of the
same program for a single user can use the same file names without conflicting with each other. As long as the files
are in different sub-file directories, they are unique. Refer to Figure 8-2.
8-2

(

~~

MASTER FILE DIRE:CTORY

~I

RIB

USER FILE DIRECTORY

r1 SysT +--V

I

4
UFO

I
1

DATA

RIB

I

I --l
~H

UFO ~

SYS

SWAP
UFO ~

SYS

T

I
I

MAINT

IUFDi

M

SYSl

--I-

BADBLK
SYS

I

IL.
~

to
UFO

I

~J

r1

FILEt

EXT

I

I

00

W

g

I
IL.-

--l---FILEN

sFDT

I

l...--

SFD DATA

ir1

SFD

~ EXT
FilEY
I

I

RIB

SFD DATA

SFD RIB

I rl

N
FILEY

EXTj

I

N
FILEZ

RIB
N

SFDT

~

-

~--l=r
-

FILEZ

-

,---r--

SFii"(
10- 0542

Figure 8-2. Disk File Organization

Files

A file is uniquely identified in the system by a file structure name, a directory path, a file name and an extension.
The directory path is an ordered list of directory names, starting with a UFD, which uniquely specifies a directory
without regard to a file structure. The PATH monitor call is used to set or read the default directory path for ajob
(refer to section 6.7). Default paths can be a job's UFD, an SFD in a job's UFD, a UFD different from the job's
UFD, or an SFD in another UFD. If a default path is not specified, it is the job's UFD. The notation
file.extension [ppn,A,B, ... ,nl designates the file named file.extension in the UFD ppn in the SFDn, which is in the
SFD ... , which is in the SFD A. A path to the file name file.extension is [ppn,A,B, ... ,nl.
To improve disk access and core searching times, only UFD names are kept in the MFD (project-programmer number 1,1). All system programs are contained in another project-programmer number directory called the system
library (SYS: [1,41). For convenience, both to users typing commands and to user programs, device name SYS:
is interpreted as the system library; therefore, no special programming is required to read a specified file from
device SYS:.
8.2.2 Job Search List
To a user, a file structure is like a device, that is, a file structure or a set of file structures may be specified by an
INITjOPENjFILOP. monitor call or by the first argument of the ASSIGN or MOUNT operating system command.
A console user specifies a file structure by naming the file structure and following it with a colon.
There is a flexible naming scheme that applies to file structures; however, most user programs IN IT device DSK:,
which selects the appropriate file structure, unless directed to do otherwise by the user. The appropriate file structure is determined by ajob search list. Ajob search list is divided into two parts:
1.
2.

an active search list (usually referred to as the job search list), and
a passive search list.

The active search list is an order list of the file structures that are to be searched on a LOOKUP or ENTER when
device DSK: is used. The passive search list is an unordered list of file structures maintained by the monitor for
LOGOUT time. At this time, LOGOUT requires that the total allocated blocks on each UFD in both the active and
passive search lists be below the logged-out quota. Each job has its own active search list (established by LOGIN)
with file structures in the order that they appear in the administrative control file AUXACC.SYS. Therefore, a user
has a UFD for his project-programmer number in each file structure in which LOGIN allows him to have files. With
the MOUNT command, mounted file structures may be added to the active search list. The following is an example
of a search list.

(

DSKB,DSKA,FENCE,DSKC
DSKB and DSKA comprise the active search list. These file structures are represented by generic name DSK for this
joe. DSKC is the name of a file structure that was previously in the active search list. FENCE represents the boundary between the active and the passive search lists.

(

Each file structure in a job search list may be modified by setting one or two flags with the JOBSTR monitor call:
1.
2.

Do not create in this structure if just generic DSK is specified.
Do not write in this file structure.

Setting the "do not create" flag indicates that no new files are to be created on this file structure unless explicitly
stated, For example, if the "do not create"flag is set
DSKA:FOO=
allows FOO to be created on DSKA, but

(

DSK:FOO=

8-4

Files

(

(

does not. For LOOKUPs on device DSK, the monitor searches the structures in the order specified by the job's
search list. For ENTERs where the file name does not exist (creating, see below), the file is placed on the first file
structure in the search list that has space and does not have the "do not create" flag set. For ENTERs when the
file name already exists on any file structure in the search list, the file is placed on the same structure that contains
the older file. If the write-lock bit is set for the file structure, a write-lock error (ERWLK%) is given. Because superseding is treated differently from creating, a user may explicitly place a file on a particular file structure, for
example, a fast one with the "do not create" flag set, so that subsequent supersedes will remain on that file structure
even though generic DSK is used.
8.2.3 Storage Allocation Table (SAT) Blocks
Unique to each disk structure is a file named SAT.SYS. This file reflects the current status of every addressable
block on the disk. Only the monitor can modify the contents of SAT.SYS as a result of file creation, deletion, or
space allocation, although this file may be read by any user. The SAT file consists of bits indicating both the portion of file storage in use and the portion that is available. To reduce the size of SAT.SYS, each bit can be used to
represent a contiguous set of blocks called a cluster. Monitor overhead is decreased by assigning and releasing file
storage in clusters of blocks rather than in single blocks.
If a particular bit is set, it indicates that the corresponding cluster is bad, nonexistent, or allocated to a file. It may
or may not contain data (Le., files may contain allocated but unwritten clusters). If the bit is cleared, it indicates
that the corresponding cluster is empty, or available to be written on.
It is recommended that cluster sizes should evenly divide blocks on a unit. The refresher truncates to the largest
number of full clusters. With truncation, the last few blocks are not included in the addressing space, but may be
used for swapping; therefore, they are not part of SWAP.SYS even though they are in the swapping space. In addition, any bad blocks in the extra blocks are not included in SWAP.SYS.

8.3 DISK FILE FORMAT
All disk files consist of two parts
1.
2.

pure data, and
information needed by the system to retrieve the data.

Each disk data block is 2008 36-bit words in length. If a user outputs a partially-filled buffer to a disk unit, a full
block of data will be written to the disk (Le., trailing zeroes will be appended at the end to fill the 2008 words). On
input at a later time, the block will appear to have 2008 words. The word counts associated with the individual disk
blocks are not retained by the monitor, except for the last block in the file.
The monitor references data on the disk by examining a chain com'posed of three links. The chain is transparent to
the user, but the chain may be thought of as being analogous to a DECtape directory. The first link in the chain is
a two word directory entry that points to a second link, which is the retrieval information block (i.e., RIB). The
RIB points to the third link, which is the first data block in the file.
The RIB contains pointers to the entire file. The information in the RIB is stored and accessed separately from the
file data, increasing system reliability because of the decreasing probability of destroying RIB information. The
number of positionings needed for random access is reduced, improving system performance.
When a file is CLOSEd, the monitor writes a copy of the RIB immediately after the last data block in the file. If the
first RIB is bad or lost, the monitor allows a recovery program to use the copied RIB. Consequently, a data file of
n blocks has two overhead blocks:

(

1.
2.

relative block number 0, which contains the primary RIB, and
relative block number n + 1, which contains the copied RIB.

\

8-5

June 1976

I

I

Files

(

8.4 ACCESS PROTECTION
8.4.1 File Access Privileges
Every me has a protection code associated with it indicating who mayor may not access the me. The protection
code is stored in 9-bits of the RIB. The 9-bits are divided into 3 classes:
1.
2.

I

3.

the first three bits refer to the owner of the file,
the second three bits refer to users with the same project number as the owner of the file (i.e., any user
logged-in under the same project number as the owner, regardless of programmer number), and
the last three bits refer to all other users.

Ordinarily, the owner of a me is the user whose programmer number matches the directory containing the me,
regardless of project numbers.
NOTE
Installations should not assign the same programmer number
to different users, even when the users are on separate projects. A user who works on several projects may retain his
programmer number and retain ownership of all of his mes
(regardless of their associated project number).

(
\

The definition of the me owner is determined at monitor generation time (via MONGEN). No matter what an
installation defines as the me owner, project numbers a through 7 are always independent of the project-programmer number. (I.e., a user having a programmer number of 1234,4 is not considered the owner of files in 1,4).
The access protection codes and their meanings are listed in Table 8-1.

(

Table 8-1
Access Protection Codes
Code

Mnemonic

Meaning

7

.PTNON

The greatest protection of me access, which means there are no access
privileges. The owner may LOOKUP the file to change the access code
(via RENAME). For the me owner, an access protection code of 7 is
equal to codes 6 and S.

6

.PTEXO

The me can only be executed. If any user, other than the file owner,
issues a LOOKUP, the error return will be taken. The only way to access
the me is via the RUN or GET operating system commands, and the
RUN monitor call.

S

.PTRED

The class of users can read and/or execute the me .

4

.PTAPP

The class of users can append to the me, read the file, and/or execute it.

3

.PTOPD

The class of users can update, read and execute the me,and/or append to the
me.

2

.PTWRI

The class of users can write, update, append to, read and/or execute the
file.

1

.PTREN

The class of users can rename the me, write, update, append to, read
and/or execute the file.

a

.PTCPR

The class of users can change the protection code of the file, rename the
file, write, update, append to, read and/or execute the file.

June 1976

8-6

(

Files

Figure 8-3 illustrates the 9-bit protection field of a file that has a protection code of 057.

owner

project members

others

I I
Figure 8 -3. Access Protection Code
The access protection code illustrated in Figure 8-3 indicates
1.
2.
3.

the owner of the file has complete file privileges (code 0),
the project members have read and execute privileges (code 5), and
all other users have no access privileges (code 7).

The greatest protection that a file can have is code 7, and the least protection is code O. Usually the owner's field is
However, it is always possible for the owner of a file to change the access protection code associated with the
file, even if the owner's protection is not set to O. Therefore, codes 0 and 1 are equivalent when they appear in the
owner's field. Access protection can be changed by executing the RENAME monitor call or by using the PROTECT
operating system command as follows:

o or 1.

PROTECT filename. extension {nnn>

(

where:

filename. extension is the name and extension of the file for which its protection code is to be changed.
{nnn> is the desired protection code for the file.

When an ENTER call is executed that specifies a protection code and the file does not exist, the monitor will substitute the standard protection code as defined by the installation. The normal system standard is 057. This protection prevents users in different projects from accessing another user's files; however, a standard protection of 055 is
recommended for in-house systems where privacy is not as important 3S the
sha
r;J,,:,
r"
ects. No program should be coded to assume knowledge of the standard protcclJOll code. If it 10 necessary cU
this standard, it should be obtained through a GETTAB monitor call, refer to Chapter 19.
To preserve files with KJOB, a protection code of 1 in the owner's field should be associated with the files. KJOB
preserves all files in a UFD for which the protection code for the owner is greater than zero. The PRESERVE
operating system command can be used to obtain a protection code of 1 in the owner's field.

8.4.2 Directory Privileges
The protection code associated with each file completely describes the access rights to that file, independent of the
protection code for the UFD. UFDs and SFDs can be read in the same manner as files, but they cannot be written
explicitly. For UFD and SFD privileges, users are divided into the same three classes as for files. Each class has
three independent bits which are listed in Table 8-2.
The owner is permitted to control the access to his own UFD and/or SFD. It is always legal for the owner to issue
a RENAME to change the protection of his directories. Any program can create or delete SFDs; however, only
privileged programs are allowed to create, supersede, or delete an UFD. The monitor checks for the following types
of privileged programs:
1.
2.

jobs logged-in under project-programmer number 1,2 (e.g., FAILSAFE), and
jobs running with the JACCT bit set in JBTSTS (e.g., LOGIN and LOGOUT).

8-7

Files

Table 8-2
Access Privileges to UFDs and SFDs

(

Access Privileges

Bit

4

Allow LOOKUPs in the UFD or SFD.

2

Allow CREATEs in the UFD or SFD.

1

Allow the UFD or SFD to be read as a file.

Privileged programs are allowed to

1.

2.
3.
4.

create UFDs (and SFDs),
delete empty UFDs (and SFDs),
set privileged arguments to LOOKUP, ENTER, and RENAME, and
ignore file protection codes.

UFD and SFD privileges are similar with the exception that SFDs can be RENAMEd and DELETEd by both privileged programs and the owner of the SFD, if the owner's protection field is 7.

8.5 FILE NAMES
Every file has a file name and, optionally, a file name extension written in the following format:

filename. ex tension
filename can be 1 to 6 characters in length.
extension can be 1 to 3 characters in length .

where:

. must always separate the file name from the file name extension, when the file name extension is
specified.

(

The name of the file is associated with a particular file when that me is created. At any time after that the name of
the file may be changed via the RENAME command (refer to DECsystem-lO OPERATING SYSTEM COMMANDS)
or the RENAME monitor call.

8.5.1 The RENAME Monitor Call (Op Code SO)
The RENAME monitor call performs the three function listed below:

1.
2.

3.

(

It alters the file's name, the file name extension, and/or the me access privileges associated with a
particular file.
RENAME can be used to change an SFD name, but an attempt to change the extension or projectprogrammer number associated with an SFD results in a protection error. Ali error also results if an
attempt is made to alter the name, extension, or project-programmer number associated with a UFD or
the project-programmer number of an ersatz device.
It deletes a me associated with a specified channel on a directory device.

a LOOKUP, an ENTER, or a FILOP. must be performed to identify the file for RENAME. The calling sequence for
the RENAME operator is

"'-';

RENAME channel,addr

error return
normal return
addr:

SIX BIT/filename/
SIXBIT/ ex tension/

(

mode, time,date
XWD project-no,programmer-no.
8-8

Files

channel specifies the channel number associated with the device on which the file resides.

where:

addr points to a two-word argument block (unless using the extended argument block, which is described
in section 8.6.1.2 and Table 8-4.
filename is a 1 to 6 character file name (specified in SIXBIT, left-justified).
extension (bits 0-17) is 1 to 3 SIXBIT characters, left-justified.
project-programmer number can be either 0, XWD O,addr, the default ppn, or not equal to the default
ppn. If 0 is specified, no change will be made in the directory of the file. If XWD O,addr is specified,
the file is renamed into a new SFD/UFD according to th.e path specified by addr. If the default ppn is
specified, the file will be renamed in that UFD. If something other than the above three alternatives is
specified, the monitor will delete the directory entry from the old directory (UFD/SFD) and will insert
the entry into the specified UFD.

The only way to RENAME a file into an SFD different from the one in which it currently resides is to give an
explicit path via an argument block.
To delete a file only after all read references have been made, specify 0 in addr+ 1 of the argument block.
To set the access protection code, bits 0 through 8 are used in addr+2 in the argument block.
If the file name and the file name extension specified in the argument block differ from the current name and extension, a search is made for the specified name and extension. If a match is not found, the following occurs:
1.
2.

(
3.
4.

the current file name is changed to the file name specified in the argument block.
the current file name extension is changed to the extension specified in the left half of addr+ 1 in. the
argument block.
the access protection code is set to the contents of bits 0-8 in addr+2 of the argllment block.
the access date is unchanged.

The error return is taken under the following conditions. An error code will be returned in the right half of
.RBEXT.
1.
2.
3.
4.
S.
6.

When no file has been selected on the channel specified.
When the specified file cannot be found.
When the file specified is currently in the process of writing, superseding, or renaming.
When the user does not have the appropriate privileges to RENAME the file.
When the file name and extension specified differ from the current file name and extension, a search is
made for the name and extension specified. If a match is found, the error return is taken.
The User File Directory (UFD) has been deleted.

If no device has been previously associated with the channel specified, the monitor stops the job and prints the
following message on the user's terminal:
?I/O TO UNASSIGNED CHANNEL AT USER PC LOC addr
A CLOSE is optional because RENAME performs a CLOSE. However, a CLOSE should not be issued between a
LOOKUP and a RENAME if the file is not in the default directory path or cannot be obtained from the default
path by scanning because CLOSE erases all memory of the path of the file. If a CLOSE is performed and the file is
not in the default path, the RENAME returns the FILE NOT FOUND error. In addition, disk accesses are minimized if a CLOSE does not precede a RENAME.

(

RENAME enters the information specified in addr through addr+ 3 (except for mode and access date) into the
retrieval information and proper directory. If addr contains zero, RENAME has the effect of deleting the file.

8-9

Files

Although only a privileged job can delete an empty UFD, any job can delete an empty SFD. If the directory is not
empty or if a job is currently using the directory, the RENAME returns the DIRECTORY NOT EMPTY error.
(Refer to Appendix E for the list of error codes.) Referto section 8.6.1.4 for a note on error recovery procedures.

(

8.6 FILE SELECTION
8.6.1 LOOKUP/ENTER A File
There are several methods for writing on the disk, If a user does an ENTER with a file name not previously existent
in his UFD, he is creating a file. If the file name was previously existent in his UFD, the user is superseding the file
(i.e., the old generation of the file stays on the disk and is available to anyone who wants to read it until the user
does the output CLOSE). At the time of a CLOSE, the user's UFD is changed to point to the new generation of the
me, and the old generation is either deleted immediately or marked for deletion at a later time if someone is currently reading it. The space occupied by deleted files is always reclaimed in the SAT tables. Finally, if a user does a
LOOKUP call followed by an ENTER using the same me name on the same channel, the user is able to modify
selected blocks of that file, using USETI and USETO (refer to section 8.8) without creating an entirely new generation; this third method of writing, called updating, eliminates the need to copy a file when making a small number
of changes. a LOOKUP followed by an ENTER and OUTPUT (in that order) writes the output to the beginning of
the file. To append information to a file, a USETI -1 should be used after the ENTER call.

"

(

A standard practice, user programs should read, create, and supersede (new file with the same file name) files on different software I/O (i.e., user channels). However, for compatibility with DECtapes, it is possible to read and create,
or read and supersede, two files on the same software I/O channel as long as a CLOSE monitor call is executed
before successive LOOKUPs and ENTERs unless updating is intended. Updating, superseding, creating, and writing a
me may be performed by one monitor call, FILOP., (instead of the LOOKUP, ENTER, USETI/USETO, INPUT/
OUTPUT sequence). Refer to paragraph 8.6.2.1 for a description of the FILOP. monitor call.
To select a file for input the LOOKUP operator (op code 076) is used; to select a file for output the ENTER operator can be used (op code 077). The FILOP. monitor call can be used for selecting a me for either input, output, or
update.

(

8.6.1.1 The LOOKUP Operator - The LOOKUP operator selects a file for input on a specified channel; its calling
sequence is
LOOKUP channel, addr
error return
normal return

addr:

where:

(

SIXBIT/[ilename/
SIXBIT/extension/
0,,0
XWD project-no,programmer-no.
channel specifies the channel number associated (via OPEN or INIT) with the device storing"the specified
file.
addr points top a four-word argument block described in Table 8-3.
filename is a 1 to 6 character, left-justified file name. (or, if a user me directory, it is the project number in the left half and the programmer number in the right half of the first argument word.)
extension isa 1 to 3 character me name extension, left-justified.
project-no.,programmer-no. can be a specified project,programmer number or it can be O. If 0, the
specified me will be searched for from the user's default directory (Le., it is the project-programmer

8-10

(

Files

(

number under which the user is logged-in). If a project-programmer number is specified, the directory
specified will be searched. An entire path will be searched only if the SCAN switch has been set via the
PATH. monitor call. Therefore, if a file's protection code permits reading and the UFD permits LOOKUPs, other user's files may be read. If project-programmer number contains XWD O,addr the file will
be read according to the path specified at addr. A path specification specified in the LOOKUP argument
block supersedes any default path specification made via the PATH. monitor call, refer to section 8.7.
On a normal return, the file has been found and the monitor returns information in the argument block as listed in
Table 8-3.
Table 8-3
LOOKUP Argument Block

(

Word

Bits

addr+l

18-20

Contents
the high order 3 bits of the date on which the file was originally created.
-

(

addr+l

21-35

the date the file was last accessed in the format used by the DATE
monitor call.

addr+2

0-8

the protection code for the file.

addr+2

9-12

the date mode of the file (e.g., ASCII, binary dump).

addr+2

13-23

the time that the file was originally created (represented as the number of minutes past midnight on the creation date).

addr+2

24-35

the low order 12 bits of the date on which the file was originally
created.

addr+3

0-35

the length of the file.

I

On an error return, an error code is returned in the right half of addr+ 1 (refer to Appendix E for a list of the possible
error codes).
If a device was not previously associated with the specified channel (via an INIT, OPEN, or FILOP.), the monitor will
stop the job and print the following message on the user's terminal.
?I/O TO UNASSIGNED CHANNEL AT USER LOC addr
8.6.1.2 The ENTER Operator - The ENTER operator causes the monitor to store a directory entry for later entry
into the proper UFD Oi SFD, when the specified channel is closed or released. ENTER's calling sequence is

channel,addr
error return
normal return
ENTER

where:

channel is the channel number associated with the device storing the specified file.
addr is the address of a four-word argument block which is illustrated in Figure 84.

(
8-11

June 1976

Files

(

filename

date]

extension

code

mode

date2

time

project-number

date3

programmer-number

Figure 8-4 ENTER Argument Block
where:

filename is a 1 to 6 character filename (specified as SIXBIT, left-justified).
extension (bits 0-17) is a 1 to 3 SIXBIT characters, left-justified.

(

date] (bits 13-20) contains the high order three bits of the creation date. If a nonzero date is obtained by
concatenating the high order three bits with the low order twelve bits in date3, the monitor will use that
value as the creation date of the file. If the date is zero, the monitor will supply the high order three bits
from the IS-bit value representing the current date.
date2 (bits 21-35) is the date that the file was last referenced. This date will be returned by the monitor;
it is ignored if changed by the user.
code (bits 0-8) is the protection code for the file. If the protection code is 0, the monitor will substitute
the installation standard as specified at monitor generation time (via MONGEN). If the code is 0 and this
ENTER is superseding a file, the protection code for the new file is copied from the old file. The RENAME
monitor call may be used to change the protection code of a file, after the file has been completely written and when the file is being closed.

(

mode (bits 9-12) is the data mode of the file, which is supplied by the monitor. The monitor obtains the
information for mode by what the user set via the last INIT or SETSTS monitor call on the channel specified.
time (bits 13-23) is the time at which the file was originally created, represented as the number of minutes
past midnight on the creation date. If time is 0, the monitor will supply the current time as the creation
time.

(

date3 (bits 24-35) is the low order 12 bits of the creation date. If date 3 and date 1 are 0, the monitor will
supply the current date as the creation date.
project-programmer number can be 0 or a specified project-programmer number.
If this word is 0, the file will be written in the default directory. For example, if the default path is
[10,10,A], the file will be written in SFDA which is on [10,10]. The default path is determined by the
PATH. monitor call. If the default path is not specified, the job's UFD will be used.
If this word contains a project-programmer number, the file will be written in the specified UFD (Le.,
sub-directories will not be scanned). This facility allows the user program to write in the disk area under
which the job is logged-in, although the default directory is different. Note that it is generally not possible
to create (Le., ENTER) files in another user's area of the disk, because UFDs are usually protected from
all but the owner when creating files.

June 1976

8-12

(
"

Files

If this word contains XWD O,addr, the file will be written according to the path specified by addr. The
argument block beginning at addr is the same as that specified in the PATH. monitor call, except that
the first two arguments are ignored. The scan switch (addr+ 1) is not needed since if the file is found in
the specified directory, it will be superseded; and if it is not found, it will be created at the end of the
path of the specified directory (even if the same name appears in an upper-level directory). A path specification in the ENTER block overrides any default path specification given in the PATH. monitor call.
On an error return, an error code will be returned in the right half of the extension word of the argument block.
Appendix E lists the possible error codes that may be returned.
When issuing an update ENTER (Le., an ENTER after a LOOKUP on the same channel), the user should check that
locations addr through addr+3 contain the appropriate information.

(

When an ENTER is executed on an existent file, a new file with the same name is written, the old file is deleted when
the CLOSE (or RELEASE) monitor call is executed (providing that bit 30 of the CLOSE is 0). I.e., the deletion of
the previous version of the file does not occur until output CLOSE time. Consequently, if the new file is aborted
while only partially written, the old generation remains. The normal return is taken; the monitor makes the file entry; and the monitor records the file information.
Unless a specific unit is INITed on the specified channel, the monitor will maximize the job's throughput by selecting
some unit in the file structure for which the job has no opened files, if such exists. Therefore, programs should LOOKUP
all input files before ENTERing output files.
If no device has been associa ted with the specified channel (via INIT or OPEN), the monitor will stop the job, and it
will print the following message on the user's terminal;

I

\

?I/O TO UNASSIGNED CHANNEL AT USER PC addr
8.6.1.3 Extended Arguments to LOOKUP, ENTER and RENAME - As an extension to the four-word argument
block, the user can specify the length of the argument block. To do so, if addr contains a 0 in its left half and a value
greater than or equal to 3 in the right half, the right half will indicate the count of the words in the argument block.
If the right half of addr is less than 3, the error return will be taken (FILE NOT FOUND). The arguments that the
user program is allowed to supply are returned to the monitor as values. If a user program supplies an illegal argument,
the monitor will ignore the user-supplied argument, and it will supply default values on the return. Table 8-4 lists the
arguments that can be supplied by a user program.

(

8-13

June 1976

Files

Table 8-4
Extended Arguments to ENTER, LOOKUP, and RENAME

(

s
L

0
0

ReI.
0

Mnemonic

K
U
P

.RBCNT

A

U
P
E
R
S
E

C
R
E
A
T
E

D
E
A

U
P

D
A
T
E
A

/

1

2

3

.RBPPN

.RBNAM

.RBEXT

AO

A

AO

A

AO

A

R
E
N
A
M
E

Arguments and VaIues
The count of the number of arguments which
follow.
Left half: unused, must be zero.
Right half: number of arguments following.
If bit 18 is set on an ENTER, that ENTER is a
non-superseding ENTER. (Refer to Section 8.6.1.5)

(

A directory name (Le., a programmer number) or a pointer.
Left half: Project Number
Right half: Programmer Number or path
The project-programmer number is for the.
user file directory in which the file is to be
LOOKed UP, ENTERed, or RENAMEd. To
LOOKUP a Master File Directory, .RBPPN
must contain a 1 in the left half and a 1 in
the right half, indicating that the filename
(Le., .RBNAM) is to be LOOKed UP in [1,I]'s
User File Directory (Le., the Master File Directory).

(

The SIXBIT filename, left-justified with
trailing nulls. If the Master File Directory or
the User File Directory is being LOOKed UP,
ENTERed, or RENAMEd, this location contains
the directory name. The argument can be 0
only on a RENAME, in which case the file
will be deleted.

A

A

A

Bits 0-17: The SIXBIT filename extension, leftjustified with trailing nulls. Null extensions
are discouraged because they convey no information.

V

AO

A

Bits 18-20: The high order three bits of the
15-bit creation date (Le., RB.CRX).

V

V

V

Bits 21-35: The access date.
If an error return is taken, bits 18-35 will contain the error code. Refer to section 8.6.1.4
for a special note on error recovery.

June 1976

8-14

(

(

Files

(

Table 8-4 (Cont.) .
Extended Arguments to ENTER, LOOKUP, and RENAME

L

0
0
K
ReI.
4

S
U
P
E
R
S
E

C
R
E
A
T
E

D

U
P
D
A
T
E

R
E
N
A
M
E

Mnemonic

U
P

.RBPRV

V

AO

A

Bits 0-8: protection codes.

V

V

A

Bits 9-12: Data mode in which the file was created (RB.MOD).

V

AO

V

Bits 13-23: creation time in minutes since midnight (RB.CRT).

V

AO

A

Bits 24-35: the low order 12 bits of the IS-bit
creation date in standard format (RB.CRD).

(

E

5

.RBSIZ

V

V

V

The written length of the words written into the
file. This argument is ignored, and it value is always returned .

6

.RBVER

V

A

A

The octal version number as in .1BVER.

7

.RBSPL

V

A

A

The filename to be used to label the output from
a spooled device. The filename is specified on an
ENTER to the spooled device, or it is 0 if an ENTER
has not been performed.

10

.RBEST

V

A

A

The estimated length of the file, in positive number of blocks. On the execution of an ENTER call,
the monitor uses this value as the number of blocks
to allocate for the file. If the requested number of
blocks cannot be allocated, partial allocation is performed, and the normal return is taken .. RBALC always contains the actual number of blocks allocated.

11

.RBALC

V

A

A

The number of contiguous 128-word blocks allocated
to a file when an ENTER or RENAME call is performed. The number of blocks includes the RIBs of
the file also, and it is equivalent to the last block
number of the file .

(

I

Arguments·and Values

~.

.RBALC equal to 0 does not change the allocation
of the file. All of the data blocks can be deallocated
by superseding the file and performing no output before the CLOSE. This argument can be used to allocate additional space onto the end of the file,

(

8-15

June 1976

Files

(

Table 8-4 (Cont.)
Extended Arguments to ENTER, LOOKUP, and RENAME
S
U

P
L
0
0
K
U
ReI.

Mnemonic

P

C
R
E
A
T
E

E
R
S
E
D
E

U

P
D
A
T
E

R
E
N
A
M
E

Arguments and Values
deallocate previously allocated but unwritten space,
or truncate written blocks.

(

The smallest unit of disk space that the monitor
can allocate is a cluster of l28-word blocks. Typically, small devices use a cluster size of I-block.
If the number of blocks allocated is not equal to
the last block of a cluster, the monitor will round
up, thereby adding a few more blocks than the
user requested. The partial allocation error (error
code 17) will be returned; however, a user may
still write the file.

(

NOTE
To create a file of prespecified length,
perform an extended ENTER with
.RBEST set and .RBALC cleared. To
create a file of prespecified length with
contiguous blocks, perform an extended
ENTER with .RBALC set and .RBEST
cleared. After an ENTER, .RBALC will
contain the accurate allocated file length.
12

.RBPOS

V

A

The logical block number of the first allocated
block for a new group of clusters appended to the
file. The logical block number is specified with
respect to the entire file structure, beginning with
block number O. Combined with the DSKCHR call,
this feature allows a program to allocate a file with
respect to tracks and cylinders for maximum efficiency when the program is executed.

A

(

/

13

.RBTF1

V

A

A

Reserved for Digital.

14

.RBNCA

A

A

A

Reserved for customer definition.

15

.RBMTA

V

Al

Al

A 36-bit tape label, if the file has been put onto
magnetic tape. If the allocated space is zero, the
file was deleted from the disk when it was copied
onto the magtape. The argument is accepted only
from privileged programs; otherwise, it is ignored.

June 1976

8-16

(

Files

Table 8-4 (Cont.)
Extended Arguments to ENTER, LOOKUP, and RENAME

s
U

P
L

0
0
K
U

C
R
E
A
T
E

E
R
S
E
D
E

U

P
D
A
T
E

R
E
N
A
M
E

Arguments and Values

Mnemonic

P

16

.RBDEV

V

V

V

The logical name of the unit on which the file is
located. This value is ignored as an argument, but
it is returned as a value.

17

.RBSTS

V

Al

Al

The File Status Word .

ReI.

(

Left Half: The status of the UFD.
Right Half: The status of the file.
Refer to Table 8-6, for the bit definitions of this
word.

(
\

20

.RBELB

V

V

V

The logical block number within the unit on which
the last data error or search error (IO.DTE) occurred, as opposed to the block within the file
structure. This value is set in the RIB by the monitor when a CLOSE is executed and the hardware
either detects a hard parity error or a search error
while reading or writing the file. Device errors,
checksum errors, and redundancy errors are not
stored in this location. This argument is ignored,
but a value is returned.

21

.RBEUN

V

V

V

Left half: The logical unit number within the file
structure on which the last bad region was detected.

(

Right half: The number of bad blocks in the last
detected bad region. The bad region may extend
beyond the file. This argument is ignored, and a
value is returned.
22

.RBQTF

V

Al

Meaningful for the UFD only .. RBQTF contains
the logged-in quota. This quota is the maximum
number of data and RIB blocks that can be in this
structure's directory while the user is logged-in.
The UFD and the UFD's RIB are not included in
this count. The argument is ignored unless it is
from a privileged program.

Al

(

8-17

June 1976

Files

Table 8-4 (Cont.)
Extended Arguments to ENTER, LOOKUP, and RENAME

s

ReI.

Mnemonic

L
0
0
K
U
P

23

.RBQTO

V

U
P
E
R
S
E
D
E

C
R
E
A
T
E
Al

U
P
D
A
T
E

R
E
N
A
M
E

Al

Meaningful for the UFD only .. RBQTO contains the logged-out quota. This quota is the
maximum number of data and RIB blocks
that can be left in this structure's directory
after the user logs-off. LOGOUT requires
that the user be below this quota to log-off.
The argument is ignored unless it is from a
privileged program.

24
25

26

Arguments and Values

Reserved.
.RBUSD

.RBAUT

V

V

Al

Al

Al

Meaningful for the UFD only .. RBUSD contains the number of data and RIB blocks in
this structure's directory when the user last
logged-off. LOGIN reads this word so that it
does not have to LOOKUP all files to set up
the number of written blocks. LOGIN sets
bit 0 of the file status word (see Table 8-5),
and LOGOUT clears it in order to indicate
whether LOGOUT has stored the quantity.
The argument is ignored unless it is from a
privileged program.
The project-programmer number of the creator or superseder of the file, as opposed to
the owner of the file. Usually the author and
the owner are the same. Only when a file is
created in a different directory are these different. This argument is used by MPB I to
validate queue entries in other directories.
The argument is ignored unless it is from a
privileged program.

Al

27

Reserved.

30

Reserved.

31

.RBPCA

V

Al

Al

Privileged argument reserved for customer
definition.

32

.RBUFD

V

V

V

The logical block number (not the cluster number) in the file structure of the RI B for the UFD
(in which the filename appears).

June 1976

(

8-18

(

(

(

Files

Table 8-4 (Cont.)
Extended Arguments to ENTER, LOOKUP, and RENAME

s

u

P

L

0
0
K
U
ReI.

E
R
S
E
D
E

C
R
E
A
T
E

U
P

D
A
T
E

R
E
N
A
M
E

Arguments and Values

Mnemonic

P

33

.RBFLR

V

V

V

The relative block number of the file to which the
first pointer of this RIB points; this is used for
multiple RIBs (e.g., 0 = prime RIB).

34

.RBXRA

V

V

V

The extended RIB address (i.e., the logical unit
number and the cluster address of the next RIB
in a multiple RIB file).

35

.RBTIM

V

V

V

The date and the time of creation of the file, in
the universal date-time standard.

(

Left half: the date of the creation.
Right half: the time of the creation.

A = an argument (supplied by either a privileged or unprivileged program) and returned by the monitor as a
value.
AO = an argument like A, except that a 0 argument causes the monitor to substitute a default value.

(

Al = an argument if supplied by a privileged program; if supplied by an unprivileged program, it is ignored.
V = the value returned by the monitor cannot be set even by a privileged program; the monitor will ignore the
argument.

8-19

June 1976

'Files

Table 8-5
.RBSTS Bit Definitions
Bit

Meaning

Mnemonic

0

RB.LOG

RB.LOG = 1 if the user is logged in; LOGIN sets this bit; LOGOUT clears it.

9

RB.UCE

RB.UCE = 1 if any file in this UFD has had a software checksum error or a
redundancy check error.

10

RB.UWE

RB.UWE = 1 if any file in this UFD has had a hard data error while writing.

11

RB.URE

RB.URE = 1 if any file in this UFD has had a hard data error while reading.

18

RB.DIR

The file is a directory file; this protects the system from a user trying to
modify a directory file. The protection error is given if the extension UFD
is specified on an ENTER or RENAME and this bit is not set.

19

RB.NDL

The file cannot be deleted, renamed, or superseded, even by a privileged
program.

21

RB.NFS

The file should not be dumped by disk backup programs because certain
files (e.g., SWAP.SYS, SAT.8YS) contain no useful data to write on the tape.

22

RB.ABC

The file always has bad checksums (because the monitor never recomputes
a checksum) e.g., SWAP.SYS, SAT.SYS.

25

RB.NQC

The file is a non-quota checked file.

26

RB.CMP

The UFD is being compressed.

27

RB.FCE

The file has a software checksum error or a redundancy check error (i.e., the
IO.IMP bit has been set).

28

RB.FWE

The file has had a hard data error while writing. An entry is made in the BAT
block so that the bad region is not reused.

29

RB.FRE

The file has had a hard data error while reading. An entry is made in the BAT
block so that the bad region is not reused.

32

RB.BFA

The file is bad because of a tape read error during a restore.

33

RB.CRH

The file was closed after a crash.

35

RB.BDA

The file has been marked as bad by a damage assessment program.

June 1976

(

8-20

(

(

(

Files

(

(

8.6.1.4 Error Recovery for ENTER and RENAME Monitor Calls - Error codes for the LOOKUP, ENTER, and
RENAME monitor calls are returned in the right half of location addr+ 1 of the four-word argument block, and in
the right half of location addr+3 (.RBEXT) in the extended argument block. The error code overwrites the high
order three bits of the creation date and the entire access date. Since most programs recover from these errors
either by aborting or by reinitializing the entire argument block, this overwriting of data does not cause any problems. However, a small number of programs may attempt to recover from an error by fixing just the incorrect part
of the argument and then reexecuting the monitor call. These programs should always restore the right half of
addr+l before reexecuting the ENTER or RENAME monitor call. (To eliminate problems when recovering from an
error in a file with a zero creation date, error codes are restricted to a maximum of 15 bits). The access date is forced
to be greater than or equal to the creation date, but never greater than the current date.
8.6.1.5 Non-Superseding ENTER - If bit 18 in the .RBCNT word is set (refer to Table 8-4) on an ENTER, that
ENTER is a non-superseding ENTER. In other words, if a file exists with the same filename as that filename specified in the current ENTER, that file cannot be superseded; and the ENTER will fail. The failure of the ENTER monitor call causes an error code to be returned. Error code 4 (ERAEF%) will be returned in location addr+l indicating
that an already existent filename was specified.
8.6.2 Data Transmission
The IN and INPUT operators transfPit data from the file selected on a specified channel to the user's core area. Their
calling sequences are
INPUT channel,addr
and
IN channel,addr
normal return
error return

(
where:

channel specifies a software I/O channel.
addr, if specified, is the effective address of the next buffer to be used. If not specified, the next buffer in
sequence is implied.

The OUT and OUTPUT operators transmit data from the user's core area to the file selected on the specified channel.
Their calling sequences are

(

OUTPUT channel,addr
and
OUT channel,addr
normal return
error return
If the specified channel has not been initialized, the monitor will stop the job, and print the following message:
?I/O TO UNASSIGNED CHANNEL AT USERaddr

(

If the device is a multiple-directory device, and no file has been selected on channel, bit 18 of the file status word is
set, and control will be returned to the user's program. Control always returns to the location immediately following
an INPUT (op code 066) and an OUTPUT (op code 067). A check of the file status for end-of-file and error conditions
must then be made by another monitor call.

8-21

June 1976

Files

Following an INPUT, the user program should check the word count of the next buffer to determine if it contains
data. Control returns to the location immediately following an IN (op code 056) if no end-of-file or error condition
exists (i.e., if bits 18 through 22 of the file status word are 0). Control returns to the location immediately following
an OUT (op code 057) if no error condition or end-of-file exists (i.e., if bits 18 through 21 and bit 25 are 0). Otherwise, control returns immediately to the second location following the IN/OUT. Note that IN and OUT are the only
calls where the error return is a skip and the normal return is not 'a skip.

(

8.6.2.1 The FILOP. Monitor Call (CALLI 155) - The FILOP. monitor call allows a user program to create, read,
write, update, append to, or close a file, or the user program may optionally request the monitor to update a RIB of
a file. FILOP.'s calling sequence is
MOVE ac, [XWD length,addr]
FILOP. ac,
errar return
normal return

(

length is the length of the argument block pointed to by addr.
addr is the address of an argument block represented in Figure 8-5.

where:

a
.FOFNC

17 18

X

channel

.FOIOS

35

function code

I/O Mode

.FODEV

(

device name (or UDX)

.FOBRH

address of
output buffer header

.FONBF

number of
output buffers

.FOLEB

0

.FOPAT

length of PATH.

address of
input buffer header
number of
input buffers
address of
LOOKUP/ENTER Block
address of
PATH. Block
Figure 8-5 FILOP. Argument Block

where:

a or 1; if 1 and the job is running with the JACCT bit set or the job is running under [1,2] then
file protection codes will not be checked. If a then protection will be checked even for [1,2] and JACCT
programs.

X can be

function code is one of the function codes listed in Table 8-6.
I/O mode is one of the data modes (refer to Table 7 -5).
device name is either the physical or the logical name of the device (or its UDX).
output buffer header is a pointer to the output buffer ring header.
June 1976

8-22

(

Files

input buffer header is a pointer to the input buffer ring header.
output buffers is the number of output buffers which are to be built. If this is 0, no buffers will be built.
If -I the default number of buffers will be built.
input buffers is the number of input buffers which are to be built. If this is 0, no buffers will be built. If
-I the default number of buffers will be built.
LOOKUP/ENTER Block is a pointer to the LOOKUP and ENTER blocks, refer to Table 8-3.
length is the length of the PATH. block, refer to section 8.7.
PATH. Block is a pointer to the PATH. block to be returned, refer to section 8.7.
Table 8-6
FILOP. Function Codes
Code

(

Meaning

Name

1

.FORED

The file is to be read only. No output will be done .

2

.FOCRE

A new file is to be created. If the file already exists then the error return will
be taken with error code 4 (ERAEF%) returned in the AC.

3

.FOWRT

The file is to be written. A new file is created or an old file is superseded .

4

.FOSAU

The file is to be updated in single access mode. Only one job may open a file
for single access update at anyone time.

S

.FOMAU

The file is to be updated in multi-access mode. Any number of jobs may read
or write the file at anyone time.

6

.FOAPP

The file is to be appended to .
NOTE
If the file is to be written in buffered mode and FILOP. is used to
build the output buffers, the last block of the file will be read into
the buffer and the byte-count and byte pointer set so that data will
be written immediately after the last word of the file.

j

\

7

.FOCLS

The file is to be closed. After the CLOSE a GETSTS is performed to read the
file status into the AC. If any error bits are set, the non-skip return is taken.

10

.FOURB

Checkpoint the file by writing all output buffers on the disk, updating directories and the end-of-file pointer. The file is still open and more I/O may be
done. This function is meaningful only for files that are being written.

On an error return, an error code will be returned in the AC (refer to Appendix E for a list of error codes). If the
error was encountered in the LOOKUP/ENTER block, the error code is also returned in the LOOKUP/ENTER
block.

June 1976

8-22.1

I

Files

8.7 THE PATH. MONITOR CALL (CALLI 101)
The PATH. monitor call sets or reads the default directory path or reads the current directory path on a channel. The
calling sequence for the PATH. monitor call is

(

MOVE ac, [XWD length,addr]
PATH. ac,
error return
normal return
where;

length is the length of the argument block.
addr is the address of an argument block, which is represented in Figure 8·6.

o
.PTFCN

17
job number

.PTSWT

.PTPPN

18

35

function code or channel no.

(

switches and flags

project number

programmer number

sfd-name

(

sfd-name

000000

000000

(

Figure 8-6 PATH. Argument Block

(
June 1976

8-22.2

Files

where:

job number is the number of the specified job (in the range 1 to the highest legal job number, or the
current job, if the job number is not in this range.)
function code is one of the functions listed in Table 8-7. (Optionally, this half-word can contain the
channel number of the desired device.)
switches and flags listed in Table 8-8.
project and programmer numbers specify the user file directory used in the PATR.

Table 8-7
PATH. Function Codes
Function
Code

Mnemonic

-1

.PTFRD

Read the default directory path .

-2

.PTFSD

Define the default directory path .

-3

.PTFSL

Define the additional path to be searched when the file is not
found in the user's directory path (i.e., set LIB:, NEW:, SYS:) .

-4

.PTFRL

Return the additional path to be searched when a file is not
found in the user's directory path (i.e., read LIB:, NEW, SYS:).

Meaning

Table 8-8
PATH. Switches and Flags
Bit{s)

Mnemonic

18-29

PT.SLT

Meaning
The type of search list.
code

mnemonic

meaning

1
2
3

.PTSU
.PTSLA
.PTSLS

JOB search
ALL
SYS: search

30

PT.IPP

The implied project-programmer number. A user-supplied
project-programmer number is ignored on an ENTER or
LOOKUP call, and the implied project-programmer number of
the device is used (e.g., [1,4] for SYS:). The implied projectprogrammer number is returned in addr+2.

31

PT.LIB

If there is a library, it is searched.

32

PT.SYS

The system directory (SYS:) is searched.

33

PT.NEW

The experimental system directory is searched (i.e., NEW:).

34-35

PT.SCN

The scan switch.
code

mnemonic

meaning

1
2

.PTSCN
.PTSCY

The switch is off.
The switch is on .

34

PT.SNW

Search /NEW on function codes -3 and -4.

35

PT.SSY

Search /SYS on function codes -3 and 4.

When defining a path with a User File Directory (i.e., function code = -2), addr+ 1 is the scan switch, addr+2 is the
default project-programmer number, and the rest of the argument (up to the first zero word) defines the default
directory path. The scan switch determines whether or not the monitor will scan for the file on a LOOKUP.

8-23

Files

If bit 34 contains 1 (.PTSCN), the monitor will examine the specified directory only; higher level directories will not
be searched. If bits 34 and 35 contain 2 (.PTSCy), the following occurs:
1.
2.

(

The monitor will search the User File Directory or the Sub-File Directory (either by the explicit path or
the default path). If the fIle is found, the scan will be terminated.
If the fIle is not found, the monitor will back up one directory along the path and will continue the scan
(i.e., it will scan the directory in which the current Sub-File Directory appears). The scan will be terminated when the User File Directory is searched or when the fIle is found.

Since any fIle not found in the current sub-fIle directory may be obtained automatically from a higher level directory scanning allows directories to be nested. Nesting of directories is useful when a user has a default directory in
use containing currently worked-on fIles and a higher level directory containing checked-out routines. Since sub-fIle
directories are continued across fIle structures but the depth of directory nesting is not always the same on each
structure, every scan searches the fIle structures that are
1.
2.

in the job's search list, and
have sub-fIle directories to the depth specified in the path.

(

The fIle structures are searched in the order that they appear in the search list.
When an ENTER is executed, the scan switch is ignored and if the fIle is found in the specified directory, the fIle will
be superseded. If the fIle is not found, the fIle will be created at the end of the path in the specified directory,
whether or not a fIle with the same name appears in a high level directory.
When an additional path is to be searched after the user's directory path is searches, addr+ 1 indicates whether SYS;
or NEW: is to be searched (bits 34 and 35); addr+2 contains the project-programmer number to be used for a user
library. These locations are used as follows:
1.

2.

If the fIle is not found in the user's directory path when a LOOKUP DSK: is executed, the directory
specified in addr+2 is searched for the specified fIle. (The contents of addr+2 must specify a User File
Directory, allowing users with different directory paths to share a common directory of fIles.)
If the fIle is not found in the library and bit 35 of addr+ 1 contains 1, SYS: is searched. When a
LOOKUP SYS: is searched, executed and bit 34 of addr+ 1 is set, NEW: is searched before SYS:.

When running a path, addr+1 contains the information listed in Table 8-8 and addr+2 through addr+n-1 contains the
path. If the path is less than n-l words in length, a zero is stored at the end of the path. If addr contains a device
name or a channel number when PATH. is called, the fIle structure name or ersatz device name is returned in addr,
depending on the name specified (e.g., SYS is returned only if addr contains SYS and the job number does not have
a device with the logical name SYS). If a LOOKUP or ENTER is performed on the specified device or channel
number, the following information is returned in the argument block:

addr:

(

(>

SIX BIT/ file-structure-name
SIXBIT/ ersatz-device-name

addr+ 1: scan switch
addr+2: project-programmer number
addr+ 3: actual path of the file

addr+m: 0

; indicating the end of the path
;if m is less than n-l.

If a LOOKUP or an ENTER has not been performed on the specified device or channel number, the following information is returned in the argument block:

8-24

(

Files

addr:

SIXBITjDSKj
SIXBIT jersatz-device-namej

addr+1: scan switch
addr+2: job's default project-programmer number
project-programmer number of ersatz device
addr+3: the default path to the file
addr+m: 0

; indicating the end of the path
; if m is less than n-l_

On an error return the following occurs:

1.

2.
3.

The AC is unchanged if the PATH. monitor call has not been implemented on the system. (The sub-file
directory will remain as a reserved extension, but all sub-file directory code will disappear). The
GETTAB returning the maximum number of SFDs will return 0 or it will fail when executed. The
default path is the user's project-programmer number.
The AC contains 0 if the device or the channel number is not a disk unit or associated with a disk unit,
respectively.
The AC contains -1 if a sub-file directory in the path specification is not found.

8.7.1 PATH. Examples
Example A
The following example sets the default path to [27,40n,sUB] with no scanning in effect.

(
A:

-2
1

XWD 27,41072
S I XB I T /S US /
0, ,0

Example B
Refer to Figure 8-7. The path plus the file name for file A is X.MAC [1 0,63]. The path plus the filename for file B
is Y.CBL[14,5]. The path plus the file name for file C is Z.ALG[14,5M] .
Example C
Refer to Figure 8-8. The job's search list is DSKAjN, DSKB, DSKC, and the default path is [PPN,A,B,C,D] .

1.
2.
3.
4.

(

5.

LOOKUP DSK: with no matches scans in order: DKSA:D(.SFD), DSKA:C, DSKB:C, DSKA:B,
DSKB:B, DSKA:A, DSKB:A, DSKA:PPN(.UFD), DSKB:PPN, DSKC:PPN.
LOOKUP DSK:file2 finds DSKA:file2[ppn,a,b,c].
LOOKUP DSKB:file2 or LOOKUP DSKC:file2 fails.
ENTER DSK:file9 receives an error since no file structure has both the no-create bit off and the directory structure [ppn,a,b,c,d] .
ENTER DSKA: file 1 creates the file at the end of the path on DSKA (the file designated by file I in the
diagram.

8-25

Files

(

X·MAC

Y'CBL

Z ·ALG

(

10-0837

Figure 8-7. Directory Paths on a Single File Structure

(

(

10-0838

Figure 8-8. Directory Paths on Multiple File Structures
The default path is [ppn,a,b,c] :

1.
2.
3.
4.

ENTER DSK:file6 creates DSKB:file6[ppn,a,b,c] (the file designated by file6).
ENTER DSK:file2 supersedes file2 in DSKA: [ppn,a,b,c] .
LOOKUP DSK:file4 fails.
ENTER DSK:file7 supersedes file7 in DSKB: [ppn,a,b,c].

8-26

Files

Example D
The user defines the following path:

(

MOVE
PATH.
HALT
MOVE
PATH.
HALT
A:
,;

1,[XWD5,A]
1,
1, [XWD 3,B]
1,

-2
2
10,,63
SIXBIT/NAME/

°-3

B:

3
10,,7

; define the default directory path
; scanning is in effect
; THE UFD [10,63]
; the SFD [NAME]
; the default path is [10,63,NAME]
; define an additional path
;both NEW: and SYS: are searched
; the user library is [10,7]

If the user is logged in as [10,10] and does a LOOKUP DSK: FILTST, the following directories are searched in
order:
NAME.SFD
[10,63] .UFD
[10.7] .UFD
[1,5] .UFD
[1,4] .UFD

(

system's search list

If the user is logged in as [10,10] and does a LOOKUP DSK: PRJFIL [10,155] , the following directories are"
searched:
[10,155] .UFD
[10,7] .UFD
[1.5] .UFD
[1,4] .UFD

(

job's search list

job's search list
system's search list

8.8 USETI AND USETO MONITOR CALLS
The USETI/USETO monitor calls select a relative block to be either read or written in subsequent INPUT/OUTPUT
calls to the specified channel number. The calling sequences are

USETI channel, block
USETO channel, block
where:

channel is the number of the software I/O channel associated with the device storing the me.
block is a block number relative to the beginning of the file; the action performed by a USETI (USETO)
depends on the value of block number, refer to Table 8-9.

The instruction sequence for reading

a file is

I

LOOKUP
USETI
INPUT

8-27

Files

The instruction sequence for writing a file is:
ENTER
USETO
OUTPUT
The instruction sequence for updating a file is
LOOKUP
ENTER
USETO
OUTPUT

;or USETI
;orINPUT

If an ENTER is not performed before a USETO, or a LOOKUP before a USETI, an illegal instruction trap will result.

The monitor will stop the job and will print the following message on the user's terminal:
?ILLEGAL INST. AT USER addr
Table 8-9
USETI/USETO Function Codes
When the
Block # is

ENTER USETO

LOOKUP USETI

current file
size 1 to
777777

IO.EOF is set in the file status word,
causing the end-of-file return on the
next INPUT.

data is appended to the end of the file. Monitor allocates the intervening blocks, writes
zeroes in the 1st new block number -1, and
writes the block.

0

the prime RIB is read.

the IO.BKT error bit is set in the file status
word.

-2 to -10(8)

the specified block of the RIB is
read.

an attempt is made to allocate a large number of blocks.

-1

IO.EOF is set in the file status word,
causing the end-of-file return on the
next INPUT.

the most recently input or output block
re-written on the next OUTPUT.

(

The USETI/USETO calls do not actually perform any input/output; they change the pointers to the current position of a file. Each input/output instruction also logically advances the files. A program can rewrite/reread the same
block by issuing a USETI/USETO before issuing an INPUT/OUTPUT. When a USETI/USETO is executed, the
monitor will write all output buffers that the program filled before it changes the pointer to the files position.
Since the monitor reads/writes as many buffers as it can when an INPUT/OUTPUT is executed, it is difficult to
determine which buffer the monitor is processing when a USETI/USETO is executed. Therefore, the INPUT/
OUTPUT following the USETI/USETO might not be reading/writing the buffer that contains block number. A
single buffer ring will read/write the desired block number since the device must stop after each INPUT/OUTPUT.
A device with a multiple buffer ring can be stopped after each bufferful of data by setting bit 30 (IO.SYN) in the
file status word via INIT., OPEN or SETSTS. USETI/USETO will then specify the buffer supplied on the next
INPUT/OUTPUT.

8-28

(

Files

(

Data can be appended to the last block of an append-only file provided that the protection does not prevent the job
from accessing the file, and the feature test switch FTDAIR is set equal to a at MONGEN-time, by using a USETO
to the last block followed by an OUTPUT. The monitor will read the block into the monitor buffer, copy words n + 1
minus 200 from the user's bufferinto the monitor buffer, and rewrite the block. On an INBUF, the byte count size
is set appropriately. The current length of the block can be obtained by examining the LOOKUP/ENTER block. It is
not necessary that a user program read the last block of a file before appending to it; any data in the file is not changed.

I

When appending to the end of a file with APPEND-only protection, the IO.BKT error bit is set in the file status word
and no output is performed when
1.
2.
3.

any block before the last block is written,
the last block already contains 200 words, or
fewer words are written than the current size of the block.

If the last block of the file is OUTPUT, the size of the last block becomes 200 and cannot be appended to.

(

(

Multiple channels of a single job and/or multiple jobs can update a single file simultaneously. The monitor imposes
no restrictions or interlocks when a file is being simultaneously updated; therefore, the user must insure that
separate jobs do not update the same block of the same file at the same time. The Enqueue/Dequeue Facility may
be used to insure that such interference does not occur, but it does not have to be used when simultaneously
updating files.
To update a file simultaneously, perform a FILOP. monitor call with a function code of 5. A file can be updated in
this manner when the file is idle, it is being read, or it is being simultaneously updated by other jobs. A file cannot
be simultaneously updated if it is in the single-access update mode (i.e., a LOOKUP and an ENTER have been performed, or a FILOP. has oeen performed with a function code of 4 or 6.)
NOTE
For simultaneous update, even though an extended
LOOKUP/ENTER block can be specified via FILOP., the
user cannot change the attributes of the file; the current
attributes will be returned in the extended argument
block on a LOOKUP, and those same values will be used
for the ENTER. In other words, FILOP., will use the
values on the ENTER.

(

Files that are to be simultaneously updated should be pre-allocated into contiguous blocks, if possible, To prevent
checksums from being changed while updating, allocate the file into one contiguous section and do not write block
number 1; or do not change the first word of any block in the file.
8.9 THE SEEK MONITOR CALL (CALLI 56)
The SEEK monitor call, used in conjunction with USETI/USETO, controls the time at which positioning operations
occur on an idle disk unit. The SEEK will position the disk to the cylinder containing the specified block number
within the previous USETI/USETO. SEEK;s calling sequence is
-

I

SEEK channel,
only return
The SEEK monitor call performs as a no-op if the disk is in any other state than an idle state.
SEEK may be issued for public and private file structures, allowing users to debug programs on a public pack and
later run the same program on a private pack. The following is the proper instruction sequence for issuing a SEEK
monitor call:

8-29

June 1976

Files

For output:

a.
b.

.c.
d.
For input:

a.

b.
c.
d.

I

perform a USETO to select a block,
perform a SEEK to request positioning,
perform computations, and
perform an OUTPUT to request actual output.

(

perform a USETI to select a block,
perform a SEEK to request positioning,
perform computations, and
perform an INPUT to request actual input.

8.10 THE CHKACC MONITOR CALL (CALLI 100)
The CHKACC monitor call provides a consistent and uniform method for determining whether or not a file may be
accessed. User programs should not make assumptions about the access rights of a file, but should employ CHKACC
to insure that access is permitted. This is especially true for privileged programs that are constrained by the access
privileges on a non-privileged project-programmer number for which they may be performing a task. For instance,
QUEUE must check the access right of the user issuing a PRINT command to verify that the user is actually allowed
to read the file.
CHKACC's calling sequence is

(

ac, addr
ac,
error return
normal return

MOVEI
CHKACC

addr: access code"protection

project-programmer number A
project-programmer number B

I

(

access code is the code for the type of access desired; the codes are listed in Table 8-10.

where:

protection contains the protection code in bits 27-35. Refer to Table 8-2 for UFD protection
(functions 7 and 10) codes and Table 8-1 for file protection codes.

project-programmer number A is the project-programmer number of the directory (UFD) containing the
file.

project-programmer number B is the project-programmer number of the user who desires access to the
specified file.
NOTE
For access codes 0 through 6, the monitor will ignore the
directory protection. For codes 7 and 10, the monitor
will ignore the file protection.
The error return is taken if the monitor call has not been implemented. On a normal return, the AC is set to zeroes
if access is allowed to the specified file, and it is set to -1 otherwise.
The right to access a file is determined by:
1.
2.
3.
4.

the
the
the
the

type of access desired to the file (e.g., read).
project-programmer number of the user desiring access to the file,
project-programmer number of the directory in which the file resides, and
protection field of the file or the protection field of the directory.

Note that access to a file is not dependent on the file name. However, the file name is needed if a LOOKUP is to be
performed (e.g., to obtain the protection field of the file).

June 1976

8-30

(

Files

Table 8-10
CHKACC Access Codes

(

(

Access
Codes

Mnemonic

0

.ACCPR

Caller would like to change the file's protection code .

1

.ACREN

Caller would like to RENAME the specified file .

2

.ACWRI

Caller would like to write the specified file .

3

.ACUPD

Caller would like to update the file (in old-style update mode).

4

.ACAPP

Caller would like to append to the end of the file .

S

.ACRED

Caller would like to read the specified file,

6

.ACEXO

Caller would like to execute the file.

7

.ACCRE

Caller would like to create the file in his UFD .

10

.ACSRE

Caller would like to read the directory as a file .

Meaning

The following sample code checks to see if user [36,402] has access rights to the file specified as PRIVAT.TXT
[1206,124] .

(

MOVEI
HRLM
LOOKUP
IRST

AC,ACRED.
AC,CHKLOC
CH,LKPBLK
ERROR

LDB

AC,[POINT 9,FILPRO,8]

HRRM
MOVE
MOVEM
MOVE
MOVEM
MOVEI
CHKACC

AC,CHKLOC
AC,FILPPN
AC,CHKLOC+ 1
AC,[XWD 36,402]
AC,CHKLOC+2
AC,CHKLOC
AC,

(

IRST
IUMPE

;GET CODE FOR "READ FILE"
;STORE TYPE OF ACCESS DESIRED
;LOOKUPPRIVAT.TXT
;ERROR RETURN HERE IF
;FILE CANNOT BE FOUND
;GET FILES PROTECTION
; FIELD
;STORE PROTECTION CODE
;GET PPN OF DIRECTORY
;STORE DIRECTORY PPN
;GET USERS PPN
;STORE USERS PPN
;SET UP FOR CHKACC
;GET ACCESS RIGHTS
;FROM MONITOR
;ERROR RETURN HERE WHEN
;CALL NOT IMPLEMENTED
;ACCESS IS ALLOWED
;IF AC CONTAINS 0, ELSE
;IF AC CONTAINS -1
;ACCESS IS NOT PERMITTED

NOTIMP
AC,ALLOWD

NOACCESS:
LKPBLK:
FlLNAM:
FILEXT:
FILPRO:
FILPPN:
CHKLOC:

SIXBIT/PRIVAT/
SIXBIT/TXT/
0
XWD 1206,124
BLOCK 3

(
8-31

Files

8.11 THE STRUUO MONITOR CALL (CALLI 50)
The STRUUO monitor call manipulates file structures, and it is intended primarily for monitor support programs.
The call is described within the STRUUO Specification in the DEC-system-lO Notebooks.
.

(
\

8.12 THE JOBSTR MONITOR CALL (CALLI 47)
The JOBSTR monitor call returns the name of the next file structure in the job's search list, along with other information about the file structure. This call is used by DIRECT to list a user's directory correctly and specify in which
file structure the files reside, as well as the order in which they are scanned. JOBSTR's calling sequence is
MOVE
ac, [XWD length,addr]
JOBSTR ac,
error return
normal return
addr:

where:

SIXBIT//ile-structure-name/
directory-name
status-bits

(

length specifies the length of the argument block.
addr points to the first word of the argument block.
file structure name (.DFJNM) can be a file structure name in SIXBIT, which will return the next file
structure name after the specified file structure name; or it can be 0 which will return the first file structure name in the job's search list; or it can be -1 which will return the file structure name immediately
following the FENCE (see section 8.2.2)
directory-name (.DFJDR) contains the directory name.
status bits specifies one of the status bits listed in Table 8-11.

Table 8-11
JOB/GOBSTR Status Bits
Bit

Mnemonic

0

DF.SWL

Software write protection is in effect for this job.

1

DF.SNC

Files are not to be created on this file structure, when a multiple
me structure name is specified in an INIT or OPEN monitor call.
Files can be created if a specific me structure or physical unit is
specified.

Meaning

On a normal return, the first word of the argument list contains either
1.
2.
3.
4.

the first me structure name in the search list (if 0 was specified),
the next file structure name appearing after the specified name or after the FENCE (if -1 is specified),
0 if the item after the specified name is FENCE, or
-1 is there are no more me structure names in the search list, or if the search list is empty.

The following is an example of reading ajob's search list.
SETOM
LOOP: MOVEI
JOBSTR
JRST

LOC
AC,LOC
AC,
ERROR

;PLACE -1 IN LOC TO GET FIRST
;NAME IN SEARCH LIST
;SETUP AC
;PERFORM THE MONITOR CALL
;ERROR RETURN LOCATION

8-32

(

Files

MOVE
JUMPE
AOJE

AC,LOC
AC,FENCE
AC,END

;GET FILE STRUCTURE NAME RETURNED
;JUMP IF IT IS THE FENCE
: JUMP IF END OF SEARCH LIST (-1)
;LOC HAS NEXT FILE STRUCTURE NAME

LOC:

JRST
-1

LOOP

o
o

;REPEAT WITH NEXT FILE STRUCTURE NAME.
;FlLE STRUCTURE NAME
;RESERVED FOR FUTURE USE.
;STATUS BITS

8.13 THE GOBSTR MONITOR CALL (CALLI 66)1
The GOBSTR monitor call returns successive file structure names in the job's or system's search list. Its calling
sequence is

ac, [XWD length,addr]
ac,
error return
normal return

MOVE
GOBSTR

(
addr:

where:

job-number
XWD project-no. ,programmer-no.
SIXBIT/file-structure-name/
directory-name
status-bits
length is the length of the argument list.
addr points to the fIrst word of the argument list.
job-number is the number of the job whose search list is desired; if the calling job's search list is desirerl.
job number should be -1. If job number is 0, the specifIed project-programmer number is ignored and
the system search list is used.
project-no.,programmer-no. is the project-programmer number under which the specifIed job number is
running. If the project-programmer number is -1, the caller's project-programmer number is used.

file-structure-name can be a file-structure-name in SIXBIT which will return the search list beginning

(

with the me structure name after the name specified; it can be -1 which will return the search list
beginning with the fIrst me structure name in the list; or it can be 0 which will return the search list
beginning with the me structure name immediately following the FENCE.

directory-name is the directory name in which the file structure is found.
status bits which may be set are listed in Table 8-11.
On an error return, one of the error codes listed in Table 8-12 will be returned in the AC.
8.14 THE SYSSTR MONITOR CALL (CALLI 46)
The SYSSTR monitor call provides a mechanism to obtain all the file structure names in the system. To access all
mes in all User File Directories, the program should access the Master File Directory on each file structure separately. Monitor support programs use this call to access all of the files in the system. SYSSTR's calling sequence is

IGOBSTR is a privileged monitor call unless information being requested is either about the system search list or the jobs logged-in
under the same project-programmer number as the calling job's number. The privilege bits required are either JP.SPA or JP.SPM in
the privilege word (.GTPRV, refer to Chapter 18).

8-33

March 1976

I

I

Files

(

aC,n
ac,
error return
normal return
MOVEI
SYSSTR

n is either 0 or the last value returned by a previous SYSSTR; it cannot be a physical disk unit name or a
logical name.

where:

Table 8-12
GOBSTR Error Codes
Error
Code

Mnemonic

3

DFGIF%

file-structure-name is not either 0,-1, or a file structure name in
SIXBIT.

6

DFGPP%

The specified job number and project-programmer number do
not correspond to each other.

10

DFGNP%

The calling job is not a privileged job.

12

DFGLN%

The specified length of the argument list is invalid.

Meaning

(

The error return is taken if
1.
2.

the monitor call has not been implemented or
the argument is invalid.

On a normal return, the next file structure in the specified search list is returned in the AC. If there are no more file
structures in the search list, -I is returned in the AC. A return of 0 in the AC indicates that the list of file structure
names has been exhausted. If 0 is specified as an argument, the first file structure name is returned in the AC.

(

8.15 THE SYSPHY MONITOR CALL (CALLI 51)
The SYSPHY rnonitor call returns all physical disk units in the system. The SYSPHY call is similar to the SYSSTR
monitor call. SYSPHY's calling sequence is

aC,n
ac,
error return
normal return
MOVEI
SYSPHY

where:

(

n is 0 or the last unit name returned by the previous SYSPHY.

The first time a call to SYSPHY is made, the AC should contain 0 requesting that the monitor is to return the first
physical unit name. On subsequent calls, the AC should contain the previously returned unit name.
The error return is taken if the AC does not contain a physical disk unit name or zero. On a normal return,the
next physical unit name in the system is returned in the AC. If the monitor returns a 0 in the AC, the list of physical disk units has been exhausted.
8.16 THE DEVPPN MONITOR CALL (CALLI 55)
The DEVPPN monitor call allows a user program to obtain the project-programmer number associated with a disk
device. DEVPPN's calling sequence is

8-34

(

Files

I

ac, [SIXBIT/deVice-name/]}
ac, channel
•
ac,
error return
normal return

{ MOVE
MOVEI
DEVPPN

device-name can be either a logical, a physical, or an ersatz device name.

where:

channel may optionally be specified instead of device-name. It specifies the channel on which the
specified device has been initialized.
If a legal device is specified, the normal return will be taken and the project-programmer number associated with the
device will be returned in the AC. However, if the user has specified SYS: and has NEW: enabled in his search list,
the project-programmer number returned will be [1,5] .

The error return is taken under the following conditions:

(

1.

2.
3.

The monitor call has not been implemented; therefore, the contents of the AC are unchanged. In this
case, to obtain the appropriate project-programmer number follow one of the procedures listed below:
a.
Use the GETPPN monitor call for the user's area.
b.
Use the default project-programmer numbers appearing in Table 8-13 for the special ersatz devices.
If the device does not exist or the speCified channel has not been initialized, 0 will be returned in the AC.
If the device specified is not a disk device, the user's project-programmer number will be returned in the
AC.
Table 8-13
Ersatz Devices

Device
Name

(

Project-Programmer
Number

Device
Name

Project-Programmer
Number

ALG:

[5,4]

MUS:

[5,16]

ALL:

user's

MXI:

[5,3]

BAS:

[5,1]

NEL:

[5,20]

BD:

[5,5]

NEW:

[1,5]

COB:

[5,2]

OLD:

[1,3]

CRP:

[ 10,1]

POP:

[5,22]

DEC:

[10,7]

PUB:

[1,6]

DMP:

[5,21]

REL:

[5,11]

DOC:

[5,14]

RNO:

[5,12]

DSK:

user's

SNO:

[5,13]

FA1:

[5,15]

SYS:

[1,4]

FOR:

[5,6]

TED:

[5,10]

HLP:

[2,5]

TST:

[5,23]

DB:

set by user

UMD:

[6,6]

MAC:

[5,7]

UNV:

[5,17]

MFD:

[1,1]

The following is an example for reading an UFD if either device SYS: or the user's area is specified.

8-35

March 1976

Files

MOVEI
GETTAB
MOVE
MOVEM

A,16
A,
A,[l,l]
A,MFDPPN

;GETMFDPPN
;NO CHANGE IF NO GETTAB
; IN CASE OF LEVEL C
; STORE MFD DIRECTORY NUMBER

MOVE
MOVEM
DEVPPN
JRST

A,DEVNAM
A,MODE+l
A,
GETPPX

; GET DEVICE NAME TYPED BY USER
; STORE FOR OPEN

(

; NOT IMPLEMENTED

; BACK HERE WITH IMPLIED PPN IN A
GOTPPN: MOVEM
OPEN
JRST
LOOKUP
JRST
IN
JRST
JRST

A,PPN

; STORE PPN IMPLIED BY DEVICE NAME

I,MODE
ERROR
I,PPN
ERROR

; TRY TO OPEN DEVICE
; NOT AVAILABLE
; TRY TO LOOKUP UFD
;NOTTHERE
; READ FIRST BLOCK
; GO DO USEFUL WORK
; ERROR OR END OF FILE

USEIT
ERROR

(

; HERE IF DEVPPN FAILS
GETPPX: CAMN
JRST
GETPPN
JFCL
JRST
GETPPS:

MODE:

MOVE
GETTAB
MOVE
JRST

A, [SIXBIT/SYS/]
GETPPS
A,
GOTPPN

;SEE IF DEVICE NAME SYS:
;YES-GO HANDLE SYS:
; NO-GET OWN PPN
; (IN CASE OF JACCT)
; OK-PROCEED AVOVE

A,[1,,16]
A,
A,[l"l]
GOTPPN

; FIND SYS: PPN
; FROM MONITOR TABLES
;IN CASE OF LEVEL C
; OK-PROCEED ABOVE

14

o
O"INBUFH
PPN:

°
°1,,1

SIXBIT/UFD/
MFDPPN:

(

; BINARY READ
; DEVICE NAME
; BUFFER HEADER
; DIRECTORY NAME
; EXTENSION

(

; LOOKUP UFD IN MFD

8.17 THE DSKCHR MONITOR CALL (CALLI 45)
The DSKCHR monitor call provides disk characteristics, which are necessary information for allocating storage
efficiently on different types of disk units. DSKCHR's calling sequence is
MOVE
ac, [XWD length,addr]
DSKCHR ac,
error return
normal return
addr:
where:

argument
addr pomts to the first word of the argument block, which is represented in Table 8-14.
length is the length of the argument block.

March 1976

8-36

(

Files

(

argument can be the name of a file structure (e.g., DSKA), a type of controller (e.g., DP), a controller

name (e.g., DPA), a logical unit name (e.g., DSKA3), a physical unit name (e.g., DPA3), or a logical
device name (e.g., ALPHA). If more than one unit is specified, the values returned in the AC are for
the first unit specified. If more than one file structure (i.e., DSK of logical device name disk) is specified, the first unit of the first file structure is returned in the AC.
On a normal return, the monitor returns the information listed in Table 8-14 in the argument block. All but the
first word are set up by the monitor; the user sets up the first word. Status information (see Table 7-2) is returned
in the AC.
Table 8-14
DSKCHR Argument Block
Location

(

(

Mnemonic

Meaning

addr

.DCNAM

The argilment name in SIXBIT that the user program
supplies.

addr+l

.DCUFT

The number of blocks left of the logged-in job's quota before
the User File Directory of the job IS exhausted on the unit
specified in addr. If .DCUFT contains a negative value, the
user file directory contains 400000,000000), the user file
directory has not been accessed since LOGIN-time; therefore, the monitor is not aware of the user's quota.

addr+2

.DCFCT

The number of blocks on a first-come-first-serve basis left
for all users on the specified file structure.

addr+3

.DCUNT

The number of blocks left for all users on the specified unit.

addr+4

.DCSNM

The file structure name to which this unit belongs~

addr+5

.DCUCH

The characteristic sizes as follows
bits

mnemonic

0-8
9-17
18-35

DC.UCC
DC.UCT
DC.UCY

meaning
blocks per cluster
blocks per track
blocks per cylinder

addr+6

.DCUSZ

The number of 128-word blocks on the specified unit.

addr+7

.DCSMT

The mount count for the file structure, which is the number
of jobs that have performed a MOUNT command for this
file structure without executing a DISMOUNT command.
(LOGIN performs an implied MOUNT of DSK: for all
logged-in users.)

addr+l0

.DCWPS

The number of words containing data bits per SAT block on
this unit.

addr+ll

.DCSPU

The number of SAT blocks per unit.

addr+12

.DCK4S

The number of K allocated for swapping.

addr+13

.DCSAJ

The file structure mount word, which will contain either 0,0
if more than one job has this file structure mounted.
-l"n if only job has this file structure mounted, but the
file structure is not single-access.
O"n if job has this file structure mounted, and the file
structure is single-access.

addr+14

.DCULN

The unit's logical name.
8-37

March 1976

I
I

Files

(

Table 8-14 (Cont.)
DSKCHR Argument Block
Location

Mnemonic

addr+15

.DCUPN

The unit's physical name.

addr+16

.DCUID

The unit's ID .

addr+17

.DCUFS

The first logical block used for swapping on this unit.

addr+20

.DCBUM

The number of blocks per unit (including maintenance
cylinders).

addr+21

.DCCYL

The current cylinder number.

addr+22

.DCBUC

The number of blocks per unit in PDP· 11 compatibility
mode.

addr+23

.DCLPQ

The length of the position wait queue.

addr+24

.DCLTQ

The length of the transfer wait queue.

Meaning

(

Table 8-15
DSKCHR Status Bits
Bit

Mnemonic

Meaning

0

DC.RHB

The monitor must reread the home block before the next
operation, to ensure that the pack ID is correct. The monitor
will set this bit when a disk pack goes off-line.

1

DC.OFL

The unit is off-line.

2

DC.HWP

The unit is hardware write-protected.

3

DC.SWP

The unit belongs to a file structure that is write-protected by
the software for this job.

4

DC.SAF

The unit belongs to a single-access file structure.

5

DC.ZMT

The unit belongs to a file structure with a mount count that
has gone to zero (i.e., no one is using the file structure).
Reserved.

6
7-8

DC.STS

(

The unit status, either
code

mnemonic

meaning

0
2

.DCSTP
.DCSTN

A pack is mounted .
No pack is mounted .

3

DC.STD

The unit is down.

9

DC.MSB

The unit has more than one DAT block.

10

DC.NNA

The unit belongs to a file structure for which the operator
has requested no new INITs, LOOKUPs, ENTERs, or
FILOP.'s; set by a privileged STRUUO function, see the
STRUUO Specification in the DECsystem-1O Software
Notebooks.

11

DC.AWL

The file structure is write-locked for all jobs.
Reserved.

12-14
15-17

DC.TYP

The type of argument passed to monitor in addr, either

8-38

(

(
\

Files

Table 8-15 (Cont.)
DSKCHR Status Bits
Bit

Meaning

Mnemonic
code

mnemonic

0

.DCTDS

a generic name

1

.DCTAB

a subset of file structures
because of file structure
ab brevia tion

2

.DCTFS

a file structure name

3

.DCTUF

a unit within a file
structure

4

.DCTCN

controller class name

5

.DCTCC

controller class

6

.DCTPU

physical unit

meaning

18·20

DC.DCN

The data channel number that the software believes the hardware is connected to; the first data channel is O.

21-26

DC.CNT

The controller type:
code

mnemonic

meaning

1
2

.DCCFH
.DCCDP

RClO controller
RPlO controller

27·29

DC.CNN

The controller number; first controller of each type starts
with O.

30-32

DC.UNT

The unit type; a controller-dependent field used to distinguish various options of a unit on its controller.
code

mnemonic

0

.DCUFD

RD 10 Burroughs disk
(if bits 21-26= 1).

1

.DCUFM

RMlOB Bryant disk (if
bits 21-16=1).

2

.DCUD2

RP02 disk pack (if bits
21-26=2).

3

.DCUD3

RP03 disk pack (if bits
21-26=2).

(

33-35

DC.UNN

meaning

The physical unit number within the controller; first unit
number is O.

8.18 THE DISK. MONITOR CALL (CALLI 121)
The DISK. monitor call sets and examines the parameters associated with disk and file systems. It allows the user to
assign a priority level for disk operations (e.g., data transfers and head positionings) either for a user I/O channel or
for ajob (Le., all user channels). When this priority level has been set, the disk operation request with the highest
priority level, the request most satisfying disk optimization is chosen. The DISK. monitor call's calling sequence is

(

I

MOVE ac, [XWD function, addr]
DISK. ac,

error return
normal return
8-39

March 1976

I

Files

(

function is one of the function codes listed in Table 8-16.

where:

addr is appplicable only when specifying. function code 0; it points to a word that contains the priority
level desired and the channel(s) for which this priority level is to be associated with.

Table 8-16
DISK. Function Codes
Function
Code

Mnemonic

0

.DUPRI

Set the priority level to that specified at addr, refer to
Figure 8-8 .

1

.DUSEM l

Set the PDP-II (i.e., 22-sector) mode on the RP04.

2

.DUSTM l

Set the PDP-lO (i.e., 20-sector) mode on the RP04.

3

.DUUNL l

Unload the RP04.

4

.DUOLS l

The specified channel/controller will be set off-line.

S

.DUOLN l

The specified channel/controller is off-line now.

6

.DUONL l

The specified channel/controller is back on-line.

----

Meaning

(

lThis is a privileged function.

o

17

(

18

priority level

N

can be set from -3
to +3; +3 is the
{
highest priority
level.

r

A

........

(

n = x = set priority for channel x (x = 0 to 17)
n =-1

=set priority for all channels OPENed or INITed
by the callingjob.

n = -2 = set the priority for the entire job.

Figure 8-9. DISK. Priority Level

The range of priority levels may be specified from -3 to +3, with 0 being the normal timesharing level of priority.
Ajob can request a priority that is lower than the normal priority; this lower priority would be used when the associatedjob is a background job.

8-40

(

Files

The maximum priority level that a job may assume is set in bits 1 and 2 (JP.PRI) of the privilege word, .GTPRV.
When a priority level is set for a channel, that priority level overrides any other priority level set for any job associated with that channel. That priority level remains in effect until it is changed or until that channel is RELEASEd.
When a priority level is set for a job, that priority level remains in effect until reset by another DISK. monitor
call or until the DSKPRI command is executed, refer to DECsystem-10 Operating System Commands.
The possible error codes that may be retumedin the AC are listed in Table 8-17.
Table 8-17
DISK. Error Codes
Code

Mnemonic

Meaning
DISK. monitor call has not been implemented.

0
-1

DUILF%

Illegal function has been specified.

-2

DUILP%

An illegal priority level has been specified.

8.19 FILE STATUS
This section describes the file status word, its initial setting, and how a user can examine, test, and change it.
The status of a file, including its data mode, is set initially to the contents of the file status word. After these bits are
initially set by the monitor, the user can test and reset the bits by using the STATZ, STATO, and SETSTS monitor
calls. Bits 30-35 of the file status word are normally set by the monitor on the execution of an INIT, OPEN, or FILOP.
monitor call. If the indicated data mode is not legal for the specified device, the monitor will stop the job and print
the following message on the user terminal:
?ILLEGAL DEVICE DATA MODE FOR DEVICE devicename AT USER addr
where: devicename is the physical name of the device.
addr is the location of the INIT, OPEN or FILOP. monitor call.

(

The right half of the file status word (Le., bits 18-35) reflects the current state of a file transmission. Table 8-2 lists
the file status bits for disk files; refer to Chapters 9, 10, 11, and 12 for the file status bits for files on other devices.
All bits, except the end-of-file bit, are set by the monitor as a condition occurs, rather than being associated with the
buffer currently used. However, the file status bits are stored with each buffer, enabling the user to determine which
buffer produced the error.
The end-of-file bit is set when the user attempts to read past the last block of data. Therefore, when this bit is set, no
data has been placed in the input buffer.
The file status can be returned to the user via the GETSTS monitor call; it can be tested via the STATZ monitor Calli
or the STATO monitor call; and the file status may be changed via the SETSTS monitor call.

8.19.1 The GETSTS Monitor Call (Op Code 62)
The GETSTS monitor call returns the file status bits associated with a specified device, its calling sequence is
GETSTS channel,addr
only return

841

March 1976

Files
where:

channel is the channel number associated with the desired device.
addr is the location in which the me status bits will be stored on a return (Le., O"bits)

.(

If a device has not been associated with the specified data channel, the monitor will stop the job and print the following message on the user's terminal:
?I/O TO UNASSIGNED CHANNEL AT USER addr

Table 8-18
Disk File Status Bits
Bit

Mnemonic

Meaning

18

10.IMP

Improper Mode. Attempt to write on a software write-locked me structure, or a
software redundancy failure occurred. This bit is usually set by the monitor. The
user cannot set this bit.

19

IO.DER

Hardware device error. The disk unit is in error, rather than the data on the disk.
However, data read into core or written on the disk is probably incorrect. The
user does not usually set this bit.

20

IO.DTE

Hard data error. The data read or written has incorrect parity as detected by the
hardware. The user's data is probably unrecoverable even after the device has been
fixed. This bit is usually not set by the user.

21

IO.BKT

Block too large. A disk data block is too large to fit into the buffer; or a block
number is too large for the disk unit; or DSK has been mled; or the user's quota
on the me structure has been exceeded. This bit is usually not set by the user.
This error is also returned when the user tries to close a me that has open locks
associated with it (via Enqueue/Dequeue).

22

10.EOF

End-of-me. The user program has requested data beyond the last block of the
file with an IN or INPUT call; or USETI has specified a block beyond the last
data block of the me. When 10.EOF is set, no data has been read into the buffer. This bit is usually not set by the user.

23

10.ACT

I/O Active. The disk is actively transmitting or receiving data. This bit is always
set by the monitor.

29

10.WHD

Write disk pack headers. This is used in conjunction with the SUSET monitor
call to format a disk pack.

30

IO.SYN

Synchronous mode I/O. Stop disk after every buffer is read or written.

31

IO.UWC

User word count, supplied by the user in each buffer.

32-35

IO.MOD

Data mode of the device.

(

(

(

(
842

Files

(

8.19.2 STATO/STATZ (Op Codes 61 and 63)
The STATO/STATZ calls test the bits in the file status word. STATO will skip if any file status bits specified are 1;
STATZ will skip if all file status bits specified are O. Their calling sequences are:
STATO channel,bits
normal return
skip return
where:

STATZ channel,bits
normal return
skip return

channel is the channel number associated with the desired device.
bits are the bits in the file status word that are to be tested.

If a device has not been associated with the specified data channel, the monitor will stop the job and print the following message on the user's terminal:

?I/O TO UNASSIGNED CHANNEL AT USER addr

(

8.19.3 The SETSTS Monitor Call (Op Code 060)
The SETSTS monitor call allows a user to change the bit setting in the file status word. Its calling sequence is:
SETSTS channel,bits
return
where: channel is the channel number associated with the desired device.
bits specifies those bits which are to be changed in the file status word.

(

Ifno device has been associated with the specified channel number, the monitor will stop the job and print the following message on the user's terminal:
?I/O TO UNASSIGNED CHANNEL AT USER addr
If the user is attempting error recovery, bits 18, 19, 20, and 21 must be cleared by this call. SETSTS can be called to
clear the end-of-file bit (bit 22, 10.EOF); but this alone is not enough to clear the end-of-file condition. Further input
to the file cannot take place until the end-of-file has been cleared by a CLOSE, USETI, MTAPE., TAPOP., LOOKUP,
or INIT monitor call.

(

SETSTS will wait until the specified device is inactive before changing the file status bits. If a new data mode is specified that is not legal for the device, the monitor will stop the job and print the following message on the user's terminal:
?ILL DEVICE DATA MODE FOR DEVICE devicename AT USER addr
If a user changes the data mode (bits 32-35), he will also have to change the byte size for the byte pointer in the input buffer header (if any) and the byte size and item count in the output buffer header (if any). The output item
count should be changed by using current count and dividing/multiplying by the appropriate conversion factor
(rather than assuming the length of the buffer). If the data mode change requires a different buffer size, but the size
is not changed, incorrect I/O will probablY result. The mode specified in an INIT call determines the buffer size, even
though the buffer ring has not yet been created.

843

June 1976

I
I

Files
8.20 TERMINATE A FILE
The CLOSE monitor call (op code 070) terminates file transmission. Its calling sequence is

(

CLOSE channel,option

return
where: channel is the channel number on which the specified file is to be closed.
option is usually zero, but individual options may be selected independently to control the effect
of the CLOSE. The possible options are:

Option
0

I

Meaning
The output side of the specified channel is closed (bit 35 = 0). In unbuffered data modes,
the effect is to execute a device-dependent function. In buffered data modes, the following
operations are performed:

1. All data in the buffers that has not been transmitted to the device is written.
2. Device dependent functions are performed.
3. The ring use bit (bit 0 of the first word in the buffer header) is set to a 1 indicating
that the buffer ring is available.
4. The buffer byte count (the third word in the buffer header) is set to O.
5. Control returns to the user program when transmission is complete.
The input side of the specified channel is also closed (bit 34 = 0). The end-of-file flag is
always cleared. Further action depends on the data mode in unbuffered data modes. The
effect is to execute a device dependent function. In buffered data modes, if a ring buffer
exists, the following operations are performed:

I

(

(

1. Wait until the device is inactive.
2. The use bit of each buffer is cleared indicating that the buffer is empty.
3. The ring use bit of the buffer header is set to 1 indicating that the buffer ring is
available.
4. The buffer byte count is set to O.
5. Control returns to the user program.
On output CLOSE, the unwritten blocks at the end of the disk file are automatically deallocated (bit 33 = 0). On input CLOSE, the access date of a disk file is updated (bit 32 =
0).
1

The closing of the output side of the specified channel is inhibited. Other actions of
CLOSE are unaffected. (Bit 35 = 1, CL.OUT).

2

The closing of the input side of the specified channel is inhibited; other actions of
CLOSE are unaffected. (Bit 34 = 1, CL.IN).

41

The unwritten blocks at the end of a disk file are not deallocated. This capability is
provided for users who specifically allocate disk space and wish to retain it. (Bit 33 = 1,
CD.DLL).

lUse of this option is meaningful only with disk fIles, and it is ignored with non-disk fIles.

June 1976

(

--------------------------

(

-

---~-----~

-- - -

-----

----- ----

-~-

-_ ..- - - - - - - - -

.~----

----- --

-----.~-.------------

.. "---------_.- ---

Meaning

Option
101

The updating of the access date on CLOSE input is inhibited (bit 32=1, CL.ACS). This
capability is intended for use with FAILSAFE, so that files can be saved on magnetic
tape without causing the disk copy to appear as if it had been accessed.

201

The deleting of the NAME block and the access tables in monitor core on CLOSE input
is inhibited, if a LOOKUP was done without a subsequent INPUT (bit 31 =1, CL.NMB).

40 1

The deleting of the original file, if any, is inhibited, if an ENTER which creates or
supersedes was done (bit 30=1, CL.RST). The new copy of the file is discarded.

100 1

The NAME block and access tables are deleted from the disk data base, and the space
is returned to free core (bit 29=1, CL.DAT).

(

(

(

(
1 Use

of this option is meaningful only with disk files,and it is ignored with non-disk files.

845

June 1976

(

(

(

(

CHAPTER 9
I/O PROGRAMMING FOR DECTAPE

This chapter explains the unique features of I/O programming using a DECtape unit. DECtape devices accept the
calls described in Chapter 7, unless indicated otherwise. Table 9-1 summarizes the characteristics of a DECtape unit.
Buffer sizes are given in octal and include 3 bookkeeping words. The physical characteristics of a device may be
obtained by issuing the DEVCHR call (refer to paragraph 7.8.2).
Table 9-1
DECtape Devices

(
Device
DECtape

Physical
Name

Controller
Number

Unit
Number

DTAO,DTAl,
... ,DTA7
DTBO,DTBl,
... ,DTB8

TDlO
551 (PDP-6)

TU55
555 (PDP-6)

(

Special
Monitor
Calls

Data Modes
for
DECtape

Buffer
Sizes
(Octal)

MTAPE,
UGETF,
USETO,
USETl,
UTPCLR

Ascii
Ascii Line
Image
Binary
Image Binary
Dump Record
Dump

202

9.1 DECTAPE
The device mnemonics for DECtape devices are:
DTAO
DTAI
DTA2
DTA3
(

"
DTA7
The buffer size is 202 octal words: 177 octal user data and 200 octal transferred. On systems with dual DECtape
controllers, the drives on the second controller have the mnemonics DTBO, ... ,DTB7 where the B indicates the
second controller.

9.2 DATA MODES
Two hundred words are written. The first word is the link plus word count. The following 177 octal words are
data supplied to and from the user program.
9.2.1 Buffered Data Modes
Data is written on DECtape exactly as it appears in the buffer and it consists of 36-bit words. No processing or
checksumming of any kind is performed by the service routine. The self-checking of the DECtape system is sufficient assurance that the data is correct. Refer to paragraph 9.1.2 for further information concerning the blocking
of information.

9-1

I/O Programming for DECtape

9.2.2 Unbuffered Data Modes
Data is read or written from anywhere in the user's core area without regard to the standard buffering scheme.
Control for read or write operations must be via a command list in core memory. The command list format is
described in paragraph 7.3.1. On the KIlO/KLlO, if the IOWD list is modified as the result ofI/O performed (i.e.,
an INPUT reads into the IOWD list) and the word count of any of the IOWDs read into the list is greater than the
following value:

(

(maximum word count specified in angina/list - 2) /512+2

the monitor will stop the job and print the following message on the user's terminal:
?ADDRESS CHECK AT USER addr
File-structured dump mode data is automatically blocked into standard-length DEC tape blocks by the DECtape
service routine. Each block read or written contains link word plus 1 to 177 octal data words. Unless the number
of data words is an exact multiple of the data portion of a DEC tape block (177 octal), the remainder of the last
block written after each OUTPUT call is wasted. The INPUT call must specify the same number of words that the
corresponding OUTPUT call specified to skip over the wasted fractions of blocks.

(

9.3 DECTAPE FORMAT
A standard reel of DECtape consists of 1102 octal pre-recorded blocks each capable of storing 200 octal 36-bit
words of data. Block numbers that label the blocks for addressing purposes are recorded between blocks. These
block numbers run from 0 to 1101 octal. Blocks 0,1, and 2 are normally not used during timesharing and are
reserved for a bootstrap loader. Block 10010 is the directory block, which contains the names of all files on the
tape and information relating to each file. Blocks 1-143 octal and 145-1 01 octal are usable for data.
1

If, in the process of DEC tape I/O, the I/O service routine is requested to use a block number larger than 1101 octal
or smaller than 0, the monitor will set the IO.BKT bit in the file status word (refer to paragraph 7.6.1).

(

9.3.1 DECtape Directory Format
The directory block (block 144 octal) of a DEC tape contains dire'ctory information for all files on that tape; a
maximum of 22 files can be stored on anyone DEC tape (refer to Figure 9-1).
Words 0 through 8310 of the directory block contain slots for blocks 1 through 577 on a DECtape. Each slot
occupies five bits (seven slots per word) and represents a given block on the DECtape. Each slot contains the number
of the file (1-26 octal) occupying the given block. This allows for 581 slots (83 words x 7 slots per word). The
four extra slots represent non-existent blocks 1102 octal through 1105 octal.
Bit 35 of words 0-6510 of the directory block contains the high order three bits of the IS-bit creation date of each
file on the DECtape. (Note that the low order 12 bits of the creation date of each file are contained in words 105
through 126 10 . This split format allows for compatibility among monitors and media as old as 1964. The high
order 3 bits of the IS-bit creation data for file 1 are contained in bit 35 of words 0, 22, and 44. Word 44 contains
the first (i.e., most significant) bit;· word 22 contains the second and word 0 contains the third. The high order
digits for file 2 are contained in bit 35 of words 1, 23, and 45 with the digits in the same order as described for
file 1. The high order digits for the remaining files are organized in the same fashion.
Words 8310 through word 104 10 of the directory block contain the file names of the 22 files that reside on the
DECtape. Word 83 contains the file name for file 1, word 84 contains the. file name for file 2; file names are stored
in SIXBIT.
Words 10510 through 126 10 contain the file name extensions and the low order part of the creation date of the
22 files that reside on the DECtape, in the same relative order as their file names. The bits for each word are
described in Table 9-2.

9-2

(

I/O Programming for DECtape

BLOCK

1

2

3

o *1*1

4

5

6

7

1 1 1 1 1

;:'

,-

83 WORDS

I

1 1 1 1

82

(

22 WORDS

I I .1 1 1 1

65
66

I I I

1 1 1+1+1+1+1

83

FILENAME 1

84

FILENAME 2

105

EXTENSION 1

LOW DATE 1

106

EXTENSION 2

LOW DATE 2

-----

--

BIT 35 CONTAINS
HIGH ORDER DIGITS
OF CREATION DATES

BIT 35 UNUSED

22 WORDS
126
127

10

TAPE

LABEL

(
NOTES'
Res.erved for system, contains 36 as does block 1448 for the
directory.

*

+

Represents blocks 1102 through 1105, which are not available
contains 378 ,
10-0572

Figure 9-1. DECtape Directory Format

(

Table 9-2
Format of Words 105 - 126 in the
DECtape Directory Block
Meaning

Bit
0-17

The file name extension in SIXBIT.

18 - 23

Zero.

24 - 35

The low-order 12 bits of the creation date. (Note that the high
order digits are encoded in bit 35 of words 0 through 65 10,)
The creation date is computed using the following formula:
((((year-1964)x12)+(month-1 )x31 +(day-1 )))=date

Word 127 10 of the directory block is the tape label.

(
9-3

I/O Programming for DECtape

The message

(

?BAD DIRECTORY FOR DEVICE DTAn:EXEC CALLED FROM USER LOC addr
is typed when one of the following conditions is detected:
1.
2.
3.

A parity error occurred while reading the directory block.
No slots are assigned to the file number of the file.
The tape block, which may be the first block of the file (i.e., the first block for the file encountered
while searching backwards from the directory block), cannot be read.

User programs should never manipulate DEC tape directories explicitly since the LOOKUP and ENTER calls (refer
to paragraphs 7.5.1.1 and 7.5.1.2) automatically record all of the necessary entries in the directory for the user.
These calls have all of the capabilities needed to process the name and the creation date of a file. However, a small
number of special purpose programs do process directories by explicit action, rather than using the LOOKUP and
ENTER calls. For such programs, the following examples illustrate methods for
1.
2.

assembling the IS-bit creation date, and
storing the IS-bit creation date. The number of the file (1 to 22) is in register PI and the directory
block begins at the location DIRECT.

(

The example below shows the special assembly for the creation date.
DPB
MOVEI
ANDCAM
TRNE
IORM
ANDCAM
TRNE
IORM
ANDCAM
TRNE
IORM

Tl, [POINT 12,DIRECT+-D 104(pl ),3S]
T2,1
T2,DIRECT-l(Pl)
Tl,IB23
T2,DIRECT-l(Pl)
T2,DIRECT+1)21(Pl)
Tl,IB22
T2,DIRECT+1)21(Pl)
T2,DIRECT+1)43(pl)
Tl,IB21
T2,DIRECT+1)43(pl)

;SAVE LOW PART
;SET UP TO MARK LOW BIT
;CLEAR DIRECTORY BIT
;IF BIT IN DATE SET,
;SET DIRECTORY BIT

(

;REPEAT FOR EACH BIT IN
;HIGH PART OF DATE

The example below shows special purpose storage of the creation date.
LDB
MOVEI
TDNE
TRO
TDNE
TRO
TDNE
TRO

Tl, [POINT 12,DIRECT+1) 104(Pl ),3S]
T2,1
T2,DIRECT-l(Pl)
Tl,lB23
T2,DIRECT+1)21(pl)
Tl,IB22
T2,DIRECT+-D43(pl)
Tl,IB21

;GET LOW PART
;SET UP TO TEST LOW BIT
;IF SET IN DIRECTORY
;THEN SET BIT IN DATE
;REPEAT FOR EACH BIT IN
;HIGH PART OF DATE

(

9.3.2 DECtape File Format
A file consists of any number of DEC tape blocks. Figure 9-2 represents the format of a file on a DECtape.
Each block contains the following information:
Word 0

Left Half:

The link, which is the block number of the next block in the file. If the link
is zero, this block is the last block in the file.

9-4

(

I/O Programming for DECtape

Right Half:

(

Words 1 - 177 octal

Bits 18 through 27 contain the block number of the first block in the file.
Bits 28 through 35 contain a count of the number of words in this block that
are used (maximum is 177 octal).
The data packed exactly as the user placed it in this buffer, or in dump mode
files, the next 177 words of memory.

'? . . . . .
END

N

B

B

B

L
K
1

L
K

L
K

2

3

DIRECTORY.J

.......{
BEGIN
10-0573

Figure 9-2. Format of a File on a DECtape
(

Figure 9-3 illustrates the format of a DECtape block.

1st block
number

link

word
count

data

(-

Figure 9-3. Format of a DECtape Block
9.3.3 Block Allocation
Normally, blocks are allocated by starting with the first free block nearest the directory and going backwards to the.
front of the tape (block 0). When the end of the tape is reached, the direction of the scan is reversed. Blocks are
not written contiguously; rather, they are separated by a spacing factor. This allows the drive to stop and restart to
read the next block of the file without having to back up the tape. The spacing factor is normally four, but for
dump mode and UGETF followed by an ENTER, the spacing factor is two.

(

9.4 I/O PROGRAMMING
DECtape is a directory device; therefore, file selection must be performed by the user before data can be transmitted
to or from the file. File selection is accomplished via the LOOKUP, ENTER, or FILOP. calls. Refer to paragraph
7.5.2 for a description of FILOP.
9.4.1 The Lookup Operator
On DECtape the calling sequence for LOOKUP is

channel,addr
error return
normal return
LOOKUP

where:

channel specifies the software I/O channel associated with the device on which the file resides.
addr points to, a four-word argument block with the format illustrated in Figure 9-4.

A detailed description of the argument block is given in Table 9-3.

9-5

I/O Programming for DECtape

Word 0

file

Word 1

ext

Word 2

0

Word 3

-n

hi

blk #

I

0

I

# blk

I

lo-date
addr-l

o

17

18

35

Figure 9-4. LOOKUP/ENTER/RENAME Argument Block
Table 9-3
LOOKUP Parameters
On Call
Word

Bits

(

On Return

Use

Contents

Word

Bits

Use

Contents

0

0-35

A

The file name in SIXBIT.

0

0-35

V

The file name in SIXBIT.

1

0-17

A

The file name extension
in SIXBIT.

1

0-17

V

The file name extension
in SIXBIT.

1

18-20

I

1

18-20

V

The high order 3 bits of
the creation date.

1

21-25

I

1

21-25

V

Zero.

1

26-35

I

1

26-35

V

The first block number.

2

0-35

I

2

0-17

V

Zero.

2

18-23

V

Zero.

2

24-35

V

The low order 12 bits of
the creation date.

3

0-17

V

The negative word length
of the zero-compressed
file.

3

18-35

V

The core address of the
first word of the file
minus 1.

3

0-35

I

A = argument for user program, V

= value returned from monitor, I = ignored.

LOOKUP sets up an input file on the specified channel. The contents of the argument block are matched
against the filenames and file names extensions in the DECtape directory. (Words 1 and 2) if no match is found,
the error return is taken, and an error code is returned in the RH of word 1, refer to Appendix E. If a match
is found, the 4-word argument is filled in by the monitor, and the normal return is taken.
On a normal return, the first block of the file is as follows:
1.

The first 83 words of the DECtape are searched backwards, beginning with the slot immediately before
the directory block, until the slot containing the desired file number is found.

9-6

(

I/O Programming for DECtape

2.

f
\

The block associated with this slot is read in and bits 18-27 of the first word of the block are
checked (Le., the bits containing the block number of the first block of the file). If the bits are
equal to the block number of this block, then this block is the first block; if not, then the block with
that block number is read as the first block of the file.

9.4.2 The ENTER Operator
The ENTER operator sets up an output file on the specified channel, its calling sequence is
ENTER channel, addr

error return
normal return
where:

channel specifies the software I/O channel associated with the device containing the desired file.
addr points to a four-word argument block (with two 0 words) shown in Figure 104 (word 0 and 1).

(

Table 94 describes the ENTER parameters needed for the call and those returned from the monitor on a normal
return from the call.
Table 94
ENTER Parameters
On Call
Word

(-

Bits

On Return

Use

Contents···

Word

Bits

Use

Contents

0

0-35

A

The file name in SIXBIT.

0

0-35

V

The file name in SIXBIT.

1

0-17

A

The file name extension
in SIXBIT.

1

0-17

V

The file name extension in
SIXBIT.

1

18-35

I

1

18-20

V

The high orqer 3 bits of
the creation date.

1

21-35

I

2

0-35

I

2

0-35

I

A = argument from user program, V = values returned from monitor, I = ignored.
(

The DECtape directory is searched for a file name and a file name extension matching the argument supplied in
word 0 and word 1 (LH) of the argument block. If no match is found, and there is room in the directory, the monitor records the information in the first three words of the DECtape directory. If a match is found, the new entry
replaces the old entry, the old file is reclaimed immediately, and the monitor records the file information. This
process is called superseding and differs from the process on the disk, in that because of the small size of DECtapes,
the space is reclaimed before the file is written rather than after.
9.4.3 The RENAME Operator
The RENAME operator alters the file name or the file name extension of an existing file, or deletes the file directory
from the DECtape associated with the specified channel. The calling sequence for RENAME is
RENAME channel, addr

error return
normal return

(

Refer to Figure 94 for a description of the argument block; refer to Table 9-5 for a detailed description of the
RENAME-parameters.

9-7

I/O Programming for DECtape

Table 9-5
RENAME Parameters
On Call
Parameter

Use

word 0

A

word 1

A

On Return
Contents

Parameter

SIXBIT /FILE/ or 0
LH

RH

= SIXBIT/EXT /
=high order 3 bits

Use

Contents

E

V

SIXBIT /FILE/

E+l

V

LH = SIXBIT /EXT /
RH = high order 3 bits
of IS-bit creation date
(bits 18-20).

E+2

V

RH = low order 12
bits of IS-bit creation
date (bits 24-35).

E+3

I

of IS-bit creation date
(bits 18-20).
word 2

A

word 3

I

RH = low order 12
bits of IS-bit creation
date or 0 (0 implies
current date).

A = argument from user program, V

(

= value from monitor, I = ignored.

Unlike on a disk RENAME, a DECtape RENAME works on the last file LOOKUPed or ENTERed for the device,
not the last file for the specified channel. The calling sequence required to successfully RENAME a file on DECtape
is as follows:
LOOKUP channel, addr
CLOSE channel,
RENAME channel, addr 1

(

or
ENTER channel, addr
CLOSE channel,
RENAME channel, addr 1
9.4.4 INPUT, OUTPUT, CLOSE, RELEASE
When performing input operations, the DECtape service routine reads the links in each block to determine what
block to read next and when to raise the EOF flag.

(

When an OUTPUT is given, the DECtape service routine examines the left half of the third word in the output buffer
(the word containing the word count in its right half). If this word contains -1, it is replaced with a 0 before being
written out, and the file is terminated. If this half word is greater than 0, it is not changed and the service routine
uses it as the block number for the next OUTPUT. If this half word is 0, the DECtape service routine assigns the
block number of the next block for the next OUTPUT.
For both INPUT and OUTPUT, block 100 decimal (the directory block) is treated as an exceptional case. If the
user program issues
USETI channel, -D 100
to read block 100 decimal, it is treated as a I-block file.
The CLOSE operator places a -1 in the left half of the third word in the last output buffer, thus terminating the
file.

9-8

(

I

I

I
I
I

I/O Programming for DECtape

(

I

The RELEASE operator writes the copy of the directory, which is normally kept in core onto block 100 decimal,
but only if any changes have been made. Certain console commands, such as KJOB or CORE 0, perform an
implicit RELEASE of all devices and, thus, write out a changed directory even though the user's program failed to
give a RELEASE.
9.5 SPECIAL MONITOR CALLS
Several monitor calls are provided for manipulating DECtape. These calls allow the userio manipulate block numbers and to handle directories.

(

9.5.1 USETI Channel, Addr
USETI sets the tape on channel to input block addr next. Since the monitor reads as many buffers as it can on input,
it is difficult to determine which buffer the monitor is processing when the USETI is given. Therefore, the INPUT
following the USETI may not obtain the buffer containing the block specified. However, if a single buffer ring is
used, the desired block is retrieved since the device must stop after each INPUT~ Alternatively, if bit 30 (IO.SYN) of
the file status word is set via an INIT, OPEN, or SETSTS monitor call, the device stops after eachbuJferful of data
on an INPUT so that the USETI will apply to the buffer supplied by the next INPUT.

9.5.2 USETO Channel, Addr
USETO sets the DECtape on channel to output block addr next.
9.5.3 UGETF Channel, Addr
UGETF places the number of the next free block of the file in addr.
If UGETF is not preceded by an ENTER, the monitor modifies its algorithm in the following manner:

1.
2.

The first block is written nearest the front of the tape instead of nearest the directory.
The spacing factor is changed to 2 instead of 4 so that very large programs can fit almost entirely in a
forward direction.

If no LOOKUP or ENTER has been done, UGETF returns a -1. If a LOOKUP has been done, UGETF gives the same
results as if an ENTER has been done. UGETF returns a block number; it neither marks the directory nor sets a
particular block to be written, and is a no-opfor any device except DECtape.

(

9.5.4 UTPCLR AC, (CALLI 13)
UTPCLR clears the directory of the DECtape on the device channel specified in the AC field. A cleared directory
has zeroes in the first 83 words except in the slots related to blocks 1,2, and 100 decimal and nonexistent blocks 1102
through 1105 octal. Only the directory block is affected by UTPCLR. This programmed operator is a no-op
if the device on the channel is not a DECtape.
9.5.5 MTAPE Channel, 1 And MTAPE Channel. 11
MTAPE channel, 1 (MTREW.) rewinds the DECtape and moves it into the end zone at the front of the tape. MTAPE
channel, 11 (MTUNL.) rewinds and unloads the tape, pulling the tape completely onto the left-hand reel, and clears
the directory-in-core bit. These commands affect only the physical position of the tape, not the logical position.
When either is used, the user's job can be swapped out while the DECtape is rewinding; however, the job cannot be
swapped out if an INPUT or OUTPUT is done while the tape is rewinding.
9.5.6 DEVSTS Monitor Call Mter Each Interrupt
The DECtape service routine stores the results of a CONI in the DEVSTS word of the device data block. The
DEVSTS call is used to return the contents of the DEVSTS word to the user (refer to paragraph 7 .8.l).
9.6 FILE STATUS
The file status of the DECtape is shown on the next page.

9-9

March 1976

I

I

I/O Programming for DECtape

(

Standard Bits

18

27

24

21

SET BY USER

SET BY MONITOR

30

33

35

1111111111111111111111111111111111111

\lljjjjj,WIIIIIIIIIII.l.Lljj,ljlWIIIIIIIIIII=IIIIIIIIIII.wL...-1111- - - - L - - - ' - - . . . . L . . . - . . . . . .

10-0576

Bit 18 = IO.IMP

An attempt was made to read block 0 in nonstandard dump mode.

Bit 19 = IO.DER

Data was missed.

Bit 20

=10 .DTE

(

Parity error.

Bit 21 = IO.BKT

Block number is too large or tape is full on OUTPUT.

Bit 22 = IO.EOF

EOF mark encountered on input. No special character appears in buffer.

Bit 23 = 10.ACT

Device is active.
18

21

UNUSED

24

27

30

35

33

1111111111111111111111111
10- 0577

Device Dependent Bits
18

21

24

27 28 29 30

33

35

SET BY USER
I

1111111111111
10-0578

Bit 28

=10.SSD

DECtape is in semi-standard I/O mode. The setting of this bit is
recognized only if bit 29 (nonstandard I/O mode) is on. Semistandard mode is similar to nonstandard mode except

1.
2.
3.
Bit 29

=10.NSD

(

Block numbers are checked for legality, and
The tape is started in the same direction as it was previously
going.
Dead reckoning is done.

DECtape is in a nonstandard I/O mode format as opposed to standardI/O mode. No file-structured operations are performed on the tape .
. Blocks are read or written sequentially; no links are generated (output) or
recognized (input). The first block to be read or written must be set by a
USETI or USETO. In nonstandard I/O mode, up to 200 octal words per
block are read or written as user data (as opposed to the standard mode of
1 link plus word count followed by 177 octal words). No dead reckoning
is used on a search for a block number as the tape may be composed of
blocks shorter than 200 words. The ENTER, LOOKUP, and UPTCLR
calls are treated as no-ops. Block 0 of the tape cannot be read or written
in dump mode if bit 29 is on, because the data must be read in a forward
direction and block 0 normally cannot be read forward.
9-10

(

I/O Programming for DECtape

(

9.7 IMPORTANT CONSIDERATIONS
The DECtape service routine reads the directory from a tape the first time it is required to perform a LOOKUP,
ENTER, or UGETF; the directory image remains in core until a new ASSIGN command is executed from the
console. To inform the DECtape service routine that a new tape has been mounted on an assigned unit, the user
uses an ASSIGN command. The directory from the old tape can be transferred to the new tape, thus destroying the
information on that tape unless the user reassigns the DECtape transport every time he mounts a new reel.
When positioning to a desired block on DECtape, the technique of dead reckoning is used. This means that the
DECtape service routine starts the DECtape spinning and computes the time it should take to reach the desired
block. Meanwhile, the service routine performs a service for another user, if any, and then returns just before the
computed time has elapsed. If the desired block has not been reached, this process is repeated until it is successful.
This technique is used to keep the controller free for other uses while the DECtape is spinning.
When an attempt is made to write on a write-locked tape or to access a drive that has no tape mounted, the message
DEVICE DTAn OPERATOR zz ACTION REQUESTED

(

(
r-.

is given to the user. When the situation has been rectified, CCONT may be typed to proceed. However, if this
message is output because of an attempt to write on a write-locked tape and any operation that causes a RESET to
be performed (e.g., a GET or RUN command) is then executed, a RELEASE will be done on the DECtape. This
RELEASE causes any attempt to write the directory to output the same message. To avoid the second output of
the message, the user should ASSIGN,. the DECtape again thus causing the DECtape service routine not to write the
directory on the RELEASE.
Although DECtape is a file-structured block device, there is a limit to the number of files that may be opened simultaneously on a single DECtape. A given DECtape may be OPENed or INITed on two software channels (maximum)
at the same time, once for INPUT and once for OUTPUT. An attempt to INIT on two channels for INPUT or two
channels for OUTPUT generates no error indication, and only the most recent INIT is effective.

(

9-11

March 1976

I

(

(

(

(

,

(

CHAPTER 10
I/O PROGRAMMING FOR MAGNETIC TAPE

1-

Magnetic tape format for the DECsystem-10 is industry compatible. The tapes are unlabeled, 7- or 9-track; 200,556,
800, or 1600 bpi. The device mnemonic is MTAx (MTAO, MTA1, MTBO, etc.), and the buffer size is 203 8 words
(including 3 bookkeeping words). (Refer to the DECsystem-10 System Reference Manual for further information on
-10 magnetic tape systems.)
The user may change the density and/or block size of a magnetic tape by using the SET DENSITY and SET BLOCKSIZE commands. (Refer to the DECsystem-10 Operating System Commands Manual).

(

As far as the user is concerned, the tape contains only records and tape marks signaling the end of the record or the
end of the file. A file consists of an integral number of physical records, separate from each other by inter-record
gaps (an area on tape where no data is written). There mayor may not be more than one logical record in each
physical record. Write and read operations on files are performed sequentially. Tape marks are used in the following
manner:

1.
2.
3.

A tape mark follows every file.
Two tape marks follow a file if that me is the last or only 'file on the tape. (A double tape mark is
also known as the logical end-of-tape.)
No tape mark precedes the first me on a tape.

When an output file is closed the I/O service routine automatically writes two tape marks and backspaces over one
of them. If another meis opened, the second tape mark is written over leaving one tape mark between files. At
the end of the used portion of the tape, a double tape mark appears (defined as the logical end of the tape).
Normally, all data is written with odd parity at 800 bpi (1600 bpi for TU70/TU43 magnetic tape systems); the
,default format can be changed by the system administrator at MONGEN-time. A maximum of 2008 words per
record is read or written if the monitor has set up the buffer ring. If the user specifies a buffer size (via SET BLOCKSIZE), a maximum of 4094 words may be realized. If the user builds his own buffers, the 4094 limit may be
bypassed.
(

"

The word count is not written on the tape. Ifan I/O error occurs, reading ahead ceases on input and output is
terminated.
Below are some statistics concerning DECsystem-lO magnetic tape units:

(

Physical Name:

MTAO,MTA1,
MTBO,MTB1,
MTCO,MTC1,
MTDO,MTDl,

Controller Name:

TM10A/B,TX01
TC10C

Unit Name:

TUl 0/20/30/40/41/43/70/71

Programmed
Operators:

INPUT
IN

OUTPUT
OUT

MTA7
MTB7
MTB7
MID7

MTAPE
TAPOP.

10-1

MTCHR.
MTAlD.

I/O Programming for Magnetic Tape

Data Modes:

ASCII
ASCII Line

Buffer Size:

203 8 *

Image
Image Binary

Binary
Dump Record
Dump

(

10.1 DATA MODES
Table l-llists the data modes available to magnetic tape users.
Table 10-1
Magnetic Tape Data Modes
Mode

Code

Meaning

ASCII

0

Data is written on the magtape exactly as it appears in the buffer. No processing of any kind is performed by the service routine. Parity checking by the
magnetic tape system is sufficient assurance that the data is correct.

ASCII
LINE

1

Same as ASCII.

IMAGE

10

This mode is the same as ASCII, but the data consists of 36-bit words.

IMAGE
BINARY

13

Same as IMAGE.

BINARY

14

Same as IMAGE.

DUMP
RECORDS
(DR)

16

Data is in the form of standard, fixed-length records (128 words is the standard unless changed by the installation when generating its monitor or
specified differently by the user with the SET BLOCKSIZE commands).
Records read into or written from the user's core area are unbuffered. Control for read or write operations must be via a command list (described in
paragraph 7.3.1) in core memory. For input operations, a new record is read
for each word in the command list (except GOTO words); if the record
terminates before the command word is satisfied, the service routine reads the
next record. If the command word runs out before the record terminates, the
remainder of the record is ignored. For each output command word, exactly
enough standard-length records are followed by one short record to write,all
of the words on the tape. If an I/O error occurs or the EOT is reached, no
additional commands are retrieved from a dump mode command list, and I/O
is terminated. When the file mark is read, the user receives the standard
end-of-file return (the error return from the IN call) and the IO.EOF bit is set
in the file status word. (This bit can be retrieved with GETSTS monitor call,
refer to paragraph 7.6.1). The EOF character is read into the user's buffer.
The next INPUT or IN call will read the next record on tape. Must not use
READ backward.

DUMP
(D)

17

Variable-length records are read into or written from anywhere in the user's
core area without regard to the buffering schemes. Control for read or write
operations must be via a command list (described in paragraph 7.3.1) in core
memory. For input operations a new record is read for each word in the
command list (except for GOTO words); if the record terminates before the
command word is satisfied, the service routine skips to the next command
word. If the command word runs out before the record terminates, the
remainder of the record is ignored. For each output command word, one
record is written. Handling of EOF is the same as for DUMP RECORD (DR)
as described above.

*The buffer size may be changed by using the SET BLOCKSIZE command.

10-2

(

I/O Programming for Magnetic Tape

(

10.2 SPECIAL MONITOR CALLS FOR MAGNETIC TAPE
There are several monitor calls that are available for magnetic tape users to perform certain functions. They are
discussed in the following paragraphs.
10.2.1 The MTAPE Monitor Call
The MTAPE monitor call provides functions such as rewind, backspace a record, etc. Its calling sequence is

I

MT APE channel, function
return
where:

channel is the number of the software I/O channel on which the tape unit is initialized.
function is one of the function codes listed in Table 10-2.

Table 10-2
MTAPE Functions
Function
Code

(

(

Meaning

Mnemonic

0

M1WAT.

A no-op which waits for spacing and I/O operations to finish.

1

MTREW.

Rewinds the magnetic tape to the load point.

3

MTEOF.

Writes a tape mark on the magnetic tape.

6

MTSKR.

Skips one record on the magnetic tape.

7

MTBSR.

Backspaces one record on the magnetic tape.

10

MTEOT.

Spaces to the logical end of the tape. Terminates two consecutive
tape marks.

11

MTUNL.

Rewinds and unloads the tape. (Refer to paragraph 10.2.11).

13

MTBLK.

Writes 3 inches of blank tape.

16

MTSKF.

Skips one file, causing a series of skip record operations.

17

MTBSF.

Backspaces files, causing a series of backspace record operations.

100

MTDEC.

Initializes for DIGITAL-Compatible 9-track tape. 1

101

MTIND.

Initializes for industry-compatible, 9-track tape. 2

200

MTLTH.

Read next record at low threshold (TMlO Only).

I

lDiGITAL-Compatible mode writes (or reads) 36 bits in five frames of a 9-track magnetic tape. The tape can be any density or
parity· and is not industry-compatible. This mode is in effect until a RELEASE channel, or a MTIND. channel is executed.
2Industry-compatiblemode writes (or reads) 32 bits in four frames of a 9-track tape and ignores the low-order four bits of a word.
It must be 800 bpi density and odd parity.

MTAPE waits for the magnetic tape to complete the action in progress; bits 18-25 of the status word are then
cleared, the indicated function is initiated (including the no-op) and control is immediately returned to the user
program.
It is important to remember that the I/O service routine can be reading several blocks ahead of the user's program
when performing buffered I/O. MTAPE affects only the physical position of the tape and does not change the data
that has already been read into the buffers. Therefore, an INPUT or OUTPUT following an MTAPE call may not
retrieve the buffer containing the block requested. However, a single buffer ring retrieves the expected block, since
the device must stop after each INPUT/OUTPUT call. Alternatively, if bit 30 (IO.SYN) of the file status word is
set via the INIT call or the SETSTS call, the device will stop after each buffer is filled on an INPUT or OUTPUT.
The MTAPE will then apply to the buffer supplied on the next INPUT/OUTPUT.

10-3

March 1976

I/O Programming for Magnetic Tape

Issuing a backspace file command to a magnetic tape unit will move the tape in the reverse direction until the tape has
1.
2.

passed a tape mark, or
reached the beginning of the tape.

The end of the backspace file operation positions the tape heads either immediately in front of a tape mark or at the
beginning of the tape. In most cases, it is desirable to skip forward over this file mark up to the beginning of the file.
In this case, giving a skip file command would skip the entire first file on the tape, stopping at the beginning of the
second file rather than leaving the tape positioned at the beginning of the first file. Therefore, a correct sequence for
"backspace file" would be:
MTBSF.
MTWAT.
STATO
MTSKF.

MT,
MT,
MT,4000
MT,

;BACKSPACE FILE
;WAIT FOR COMPLETION
;BEGINNING OF TAPE?
;NO, SKIP OVER FILE MARK

Since it is necessary to wait after the MTBSF, (i.e., backspace file) instruction to ensure that the move is completed
before testing to see whether or not this is the beginning of the tape, the instruction WAIT MT, cannot be used for
this purpose; it waits only for the completion of I/O transfer operations and backspace file is a spacing operation not
an I/O operation.

(

The device service routine must wait until the magnetic tape control is free before processing the MTW AT., which
tells the tape control to do nothing. The service routine achieves the waiting period necessary for the completion
of the previous operation and the proper positioning of the tape.
10.2.1.1 Function 11, Rewind and Unload - MT APE Channel, 11 (MTUNL.) initializes all automatic error reporting. Therefore, reel-specific errors can be summarized regardless of the method used to change reels. An entry into
the system error log file (refer to the SYSERR Specification) will be written as follows:
drive number (e.g., MTxn)
SIXBIT/reelid/
number of characters read since last MTUNL.
number of characters written since the last MTUNL.
number of soft-read errors since the last MTUNL.
number of hard-read errors since the last MTUNL.
number of soft-write errors since the last MTUNL.
number of hard-write errors since the last MTUNL.

These numbers will be output on both the operator's terminal and the user's terminal in the following format:
[MTxn:reelid READ (c/h/s)

where:

=albic WRITE (c/h/s) =die/!]

x is an alphabetic representing the tape controller,
n is a number representing the drive number.
reelid is the reel identification.
a is the number of characters read.
b is the number of hard-read errors.
c is the number of soft-read errors.
d is the number of characters written.
e is the number of hard-write errors.
f is the number of soft-write errors.

When a, b, and care 0, the information pertaining to READ will not be printed.
When d, e, and fare 0, the information pertaining to WRITE will not be printed.

104

(

I/O Programming for Magnetic Tape

To prevent this message from being printed, the user can type the following command:
.SET WATCH NO MTA
10.2.2 The MTCHR. Monitor Call (CALLI 112)1
MTCHR. enables the user to obtain a set of data from which the current state of a specified magnetic tape drive can
be determined. The calling sequence for MTCHR. is

I

{ MOVE ac, [XWD n, addr] }
MOVE ac, [SIXBIT/devicej]
MOVEI ac, channel
MTCHR.ac,
error return
normal return
where:

I

n is the number of words in the optional argument block pointed to by addr.
addr contains a left-justified SIXBIT physical/logical device name.
device is a physical/logical device name.
channel is the software I/O channel on which the device has been initialized.

On a normal return, the monitor will return values in the first n locations of the argument block as described in
Table 10-3. The monitor will also return the information listed in Table 10-4 in the AC.

I

Table 10-3
MTCHR. Returned Values

(
Word

Mnemonic

1

.MTRID

SIXBIT / ree lid /

2

.MTFIL

The number of files from the beginning of the tape .

3

.MTREC

The number of records from last end-of-file .

4

.MTCRD

The number of characters read since last reload .

5

.MTCWR

The number of characters written since last reload .

6

.MTSRE

The number of soft-read errors since last reload .

7

.MTHRE

The number of hard-read errors since last reload .

10

.MTSWE

The number of soft-write errors since last reload.

11

.MTHWE

The number of hard-write errors since last reload .

12

.MTTME

The number of total media errors since last unload .

13

.MTTDE

The number of device errors since system load .

14

.MTTUN

The number of unloads since system load .

15

.MTRTY

The number of retries as a result of last error.

16

.MTCCR

Character count of last record read or written.

17

.MTPBE

The right half contains the record number; and the left half contains the
position before the last error in the file.

20

.MTFES

The final error state (refer to the SYSERR specification) .

21

.MTTRY

The number of retries to resolve the last error, bit 1=1 hard error .

Meaning

I

1 On a multi-processor system, MTCHR. runs only on CPUo.

10-5

March 1976

I/O Programming for Magnetic Tape

The error return is taken if
1.
2.
3.

(

the specified device is not a magnetic tape unit,
the specified device is not present, or
the MTCHR. monitor call has not been implemented.

If the specified device is not a magnetic tape unit or is not present, a -1 is returned in the AC. If the call has not been
implemented, the contents of the AC are unchanged.
In determining the value of the density identifier to be returned to bits 33-35 of the AC (see Table 104), the moni-

tor will examine the file status bit initialized by the INIT call and will return any INIT -specified density identifier.
If density was not specified by an INIT, the monitor will then determine if the user has specified density using the
SET DENSITY command, and it will return any user-supplied density identifier in the AC. If the SET DENSITY
command has not been issued, the monitor will return the system default identifier in the AC. If no density is
specified by an INIT, the GETSTS call will return a 0 in bits 33-35 of the AC. If GETSTS is used, the system default
density identifier is not returned.

(

Table 10-4
Values Returned to the AC After MTCHR.
Bit(s)

Mnemonic

0-17

MT.AWC

The actual word count for the last record read or written.

18-26

MT.CRC

The last cyclic redundancy character (CRC), if a 9-track NRZI tape is being
used; otherwise, 0 (TU70s) return O.

27-29

MT.NCR

The number of characters read from the tape into the last addressed location
during the last read operation.

30

Meaning

(

Zero.

31

MT.7TK

The unit is a 7-track unit.

32

MT.WLK

The transport is write-locked.

33-35

MT.DEN

The density identifier:
code

mnemonic

1
2
3

.MTDN2
.MTDN5
.MTDN8
.MTDI6

4

meaning
200 bits per inch (bpi)
556 bpi
800 bpi
1600 bpi

(

10.2.3 The TAPOP. Monitor Call (CALLI 154)
The TAPOP. monitor call allows a user program to control, examine, and modify information concerning any tape
unit connected to the system. Many of TAPOP.'s functions are duplicates or extensions to the MTAPE and MTCHR.
monitor calls. TAPOP.'s calling sequence is
MOVE ac, [XWD n, addr]
TAPOP.ac,
error return
normal return

addr: function
SIXBITldeVicel}
{ channel
udx

March 1976

(
10-6

I/O Programming for Magnetic Tape

channel
udx
argumentO

(

argument n
where:

n is the number of words in the argument block.
addr points to the first word of the argument block.
function is one or more of the function codes listed in Table 10-5.
device, channel, and udx are alternative arguments specifying which device is to be used.
argument is different depending on the function code specified, refer to Table 10-5.
Table 10-5
TAPOP. Function Codes
Function
Code

(

Mnemonic

Meaning

1

.TFWAT

Wait for I/O to stop .

2

.TFREW

Rewind the tape to the load point.

3

.TFUNL

Rewind and unload the tape .

4

.TFFSB

Skip forward 1 block .

5

.TFFSF

Skip forward 1 file .

6

.TFSLE

Skip to the logical end of the tape.

7

.TFBSB

Skip backward 1 block .

10

.TFBSF

Skip backward 1 file .

11

.TFWTM

Write a tape mark.

12

.TFWLG

Write three inches of blank tape .

13

.TFDSE

Data security erase (blank the entire tape) TXO 1 only .

14

.TFWLE

Write the logical end of the tape .

151

.TFLBG

Get the tape label device data block .

16 1
17 1

.TFLRL

Release the label device data block .

.TFLSU

Swap units.

20 1

.TFLDD

Destroy the tape label data base .

21

.TFFEV

Force the end of volume processing .

22

.TFURQ

User request for label processing.

1000

.TFTRY

Return in the AC the number of retries on the last error .

1001
2001

.TFDEN

Obtain (or set) the density indicator, either:
code
0
1
2

(

mnemonic
.TFDOO
.TFD20
.TFDSS

meaning
unit default bpi
200 bpi
556 bpi

1Performed by tape label manager, privileged for use by label processor.

10-7

110 Programming for Magnetic Tape

(

Table 10-5 (Cont.)
TAPOP. Function Codes
Function
Code

1002

Meaning

Mnemonic

.TFKTP

code

mnemonic

meaning

3
4
5-17

.TFD80
.TFD16

800 bpi
1600 bpi (TU70/43 only)
Reserved.

The controller type, either:
code
0
1
2
3

mnemonic

meaning

.TFKTA
.TFKTB
.TFKTC
.TFKTX

TMlOA(TUlO/20/30/40/41)
TMlOB(TUlO/20/30/40/41)
TClOC(TU43)
TX01(TU70/71)

1003
2003

.TFRDB

Read backward (TXOI only): Refer to paragraph 10.2.3.2 .

1004
2004

.TFLTH

Read next record at low threshold (TMlO only) .

1005
2005

.TFPAR

Set or obtain status of the even parity bit (7 -track only) .

1006
2006

.TFBSZ

Set or obtain the block size.

1007
2007

.TFMOD

Set or obtain the data mode, either:
code

.TFMDD

1
2

.TFM9T
.TFM8B

3
4
5

.TFM6B
.TFM7B
.TFM7T

(
meaning

mnemonic

0

(

DEC-compatible core dump
(7-track and 9-track).
Core dump format (9-track) .
Industry-compatible, 8-bit mode
(4 bytes/word).
6-bit mode (9-track, TU70 only) .
7-bit mode (TU70 only) .
7 -track core dump (SIXBIT) .

(

Refer to paragraph 10.2.3.1.
1010
2010

.TFTRK

Set or obtain the track status bit (1=7-track, O=9-track). It is a
privileged function to set this bit.

1011

.TFWLK

The write-lock bit (set =1, off = 0) .

1012

.TFCNT

The character count of the last record (the actual record length) .

1013
2013

.TFRID

Set or obtain the reel I.D. (bits 0-35). It is a privileged function
to set this word.

1014

.TRCRC

The last Cyclic Redundancy Character (CRC) (9-track NRZI only) .

1015

.TFSTS

The unit status word:

10-8

(

I/O Programming for Magnetic Tape

Table 10-5 (Cont.)
TAPOP. Function Codes

(
Function
Code

Mnemonic

Meaning
bit
18
19
20
21
22-32
33
34
35

1016

.TFSTA

/

(

TF.UNS
TF.BOT
TF.WLK
TF.REW

Unit is not to be scheduled.
Beginning-of-tape mark.
Unit is write-locked.
Unit is rewinding.
Reserved.
Unit is started.
Unit is selected.
Unit is off-line.

TF.STA
TF.SEL
TF.OFL
mnemonic

0
1
2
3
4
5
6
7
10

.TSFIL
.TSREC
.TSTCR
.TSTCW
.TSSRE
.TSHRE
.TSSWE
.TSHWE
.TSESU

11

.TSTDE

12

.TSUNL

meaning
Number of mes since BOT .
Number of records since EOF .
Number of characters read .
Number of characters written.
Number of soft-read errors .
Number of hard-read errors .
Number of soft-write errors .
Number of hard-write errors .
Total errors since unload
(MOUNT).
Total device errors since
system startup.
Total number of unloads.

1017

.TFIEP

Initial error pointer .

1020

.TFFEP

Final error pointer .

1021

.TFIES

Initial error status.

1022

.TFFES

Final error status .

1023

.TFFED

Final error disposition.

1024

.TFLBL

The type of label processing .
code
0
I
2
3
4
5
6
7

(

meaning

The unit statistics to arguments 0 through 12:
code

~-

mnemonic

mnemonic

meaning

.TFBLP
.TFLAL
.TFLAU
.TFLIL
.TFLIU
.TFLTM
.TFLNS
.TFLNL

Bypass labeled processmg .
ANSI labels .
ANSI labels with user labels .
IBM labels.
IBM labels with user labels.
Leading tape mark.
Non-standard labels .
No labels.

1025

.TFPLT

The same as function code 1024 (.TFLBL) except that .TFPLT
is privileged function to set 0 (.TFBLP.)

1026

.TFLTC

Label termination code .

10-9

I/O Programming for Magnetic Tape

Table 10-5 (Cont.)
TAPOP. Function Codes
Function
Code

Mnemonic

Meaning
code
1
2
3
4

5
6
7
10
11

mnemonic

meaning

.TFTCP
.TFTRE
.TFTLT
.TFTHL
.TFTTL
.TFTVL
.TFTDV
.TFTDE
.TFTWL

Continue processing .
Return EOF .
Label type error.
Header label error.
Trailer label error ..
Volume label error.
Device error.
Data error .
Write-lock error.

(
On an error return, one of the error codes listed in Table 10-6 will be returned in the AC.

Table 10-6
TAPOP. Error Codes
Error
Code

Mnemonic

-1

TPACS%

Address check storing answer.

0

TPIFC%

An illegal function code was specified.

1

TPPRV%

Function code specified requires special privileges.

2

TPNMT%

Device is not a magnetic tape unit.

3

TPVOR%

Value specified is not in the legal range.

4

TPACR%

Address check while reading arguments.

5

TPCBS%

Specified parameter cannot be set.

6

TPNIA%

The tape unit has not been INITed or ASSIGNed.

Error Condition

(

(

The function codes are defined within the following ranges:
0000-0777
1000-1777
2000-~777

3000-3777

perform a specific action
read a parameter
set a parameter
reserved for DEC customers

The READ functions (codes 1000-1777) and the SET functions (codes 2000-2777) are parallel; i.e., if function 1002
reads a particular parameter, function 2002 sets the same parameter. The values for the READ functions are
returned in the AC; arguments to the SET functions are supplied by the user program in addr+2. One bit quantities
are not range-checked; instead, bit 35 of addr+2 is stored. Those functions in Table 10-5 that have codes in both the
1000-1777 and the 2000-2777 ranges have parallel SET and READ functions.

10-10

{
\

I/O Programming for Magnetic Tape

10.2.3.1 Function .TFMOD (Data Modes) - The legal data modes are described below.

o (.TFMDD) -

7-track
(6-bit bytes)

9-track

DEC-compatibility core dump format for 7-track and 9-track (default).

0

5 6

11 12

18

I

I

I

I

23

30

I

35

I

I

0

7 8

15 16

23 24

31

I

I

!

I

I

35

I

1 (.TFM9T) - Core dump for 9-track (see 9-track code 0).
2 (.TFM8B) - Byte Mode (9-track only) Industry-compatible.

0

7 8

15 16

23 24

I

I

I

I

31

35

I

I

4 8-bit bytes/word, bits 32-35 are zero on a read from TU70.
3 (.TFM6B) - SIXBIT Mode (9-track, TU70 only).
0

5 6

11 12

17 18

I

I

I

I

29 30

35

II

I

I
\

4 (.TFM7B) -7-bit mode (TU70 only) Industry-compatible mode.
0

6 7

13 14

20 21

27 28

I

I

I

I

I

34 35

II

4 7 -bit characters
1 8-bit character folded (bit 35)
5 (.TFM7T) - 7-track core dump mode.

o

5 6

11 12

17 18

10-11

24

30

35

I/O Programming for Magnetic Tape

10.2.3.2 Read Backwards (TXOI only) - In reading a tape backwards, data is read forwards (Le., inverted) into
the buffer. If the buffer is larger than the record, a zero-fill will result at the beginning of the buffer. For example:
BUFSIZ - WRDCNT

(
\

= first word of data

If the user program contains a multiple IOWD I/O list, the I/O bit must be reversed by the user program, in order to
enable read forward. Reading backwards into BOT will set EOF or the BOT bit. Note that a tape cannot be read backwards if mode 16 is used.
Reads backwards must be set after the OPEN, as the read backwards function is cleared on an OPEN or a RELEASE
monitor call.
10.2.4 The MTAID. Monitor Call (CALLI 126)1
The MTAID. monitor call is used by OMOUNT to associate a SIXBIT tape reel identifier with a specific magnetic
tape drive. The calling sequence for MTAID. is
MOVE ac, [SIXBIT/deVicelJ }
{ MOVEI ac, channel
MOVEI ac, udx
MOVE ac+l, [SIXBIT/reelidlJ

(

MTAID.ac,
error return
normal return

where:

device is the physical/logical name of the device.
channel is the software I/O channel number associated with device.
udx is the universal device index associated with the device.
reelid is the tape reel identifier.

(

The error return is taken if the caller does not have the appropriate privileges, if the device specified does not exist
or is not a magtape device, or if the call has not been implemented. A -1 is returned in the AC if the error was a
privilege or device-type error, otherwise the AC is unchanged.
On a normal return, the reel identification (reelid) will be stored in the monitor, and it will be included in media
error reports.
REELID may be cleared by using the MTAPE function MTAPE II (MTUNL.) UNLOAD. All reel-specific error
counts will be cleared by MTAID. in order that all accumulated data for the specific reel will be accurate, which
is important when the previous user has forgotten to issue the UNLOAD command.

(

10.3 FILE STATUS
The file status of the magnetic tape is shown below.
Standard Bits
18
SET BY USER

21

24

27

I
18

30

33

35

111111111111111111111111111111111111

21

24

SET BY MONITOR II11111111111111111111111111111111111
10-0556

(
IThis is a privileged monitor call.

March 1976

10-12

I/O Programming for Magnetic Tape

(

Unit was write-locked when output was attempted, or illegal operation was
specified to the magnetic-tape control.
Data was missed, tape is bad, or transport is hung.
Parity error.
Record read from tape exceeds buffer size.
Tape mark encountered.
Device active.

Bit 18 - 10.IMP
Bit 19 Bit 20 Bit 21 Bit 22 Bit 23 -

IO.DER
IO.DTE
IO.BKT
IO.EOF
10.ACT

Device Dependent Bits

18
SET BY USER

21

24

26 27

35

33

30

L...-.I--'--....1...-1....IIWI1111111IIWI.Wi11l111l1111lWllL11111I~~---'
10-0557

(
Bit 26 - 10.PAR

Bit 27 -28 - 10.DEN

Bit 29 - 10.NRC

I/O parity; 0 for odd parity, 1 for even parity. Odd parity is preferred. Even
parity should be used only when creating a tape to be read in binary coded
decimal (BCD) on another computer.
I/O density, OO=System standard. Defined at MONGEN-time and can be
changed with the SET DENSITY command.
01=200 bpi
10=556 bpi
11=800 bpi
If any density other than 200/556/800 bpi need be specified, use the appropriate TAPOP. (.TFDEN). A code 0[00 will select the system standard,
which may be other than 200/556/800 bpi.
I/O no read check. Suppress automatic error correction if bit 29 is 1.
18

SET BY MONITOR

21

24 25 27

30

33

35

IL---..L.----WWII\\\\~IWL...JI\\IIL---..L.~----If
10-0558

(

Bit 24 - IO.BOT
Bit 25 - IO.EOT

I/O beginning of tape. Unit is at beginning of tape mark.
I/O tape end. Physical end of tape mark encountered.
NOTE
If bits 18, 19, 20, and 21 contain one, an error was
detected by the tape labeling process and a TAPOP.
can be used to determine the actual error (.TFLTC).

10-13

(

(

(

(

(

(
CHAPTER 11

I/O PROGRAMMING WITH TERMINALS

11.1 INTRODUCTION
Asynchronous communications equipment and terminals cover a broad range of applications within the DECsystem-lO. Asynchronous equipment is used for interactive program development, for operator control of the
system, for program production and control, and for running data entry, program preparation, interactive problemsolving, student instruction, and information storage and retrieval. Asynchronous communications terminal
equipment is of two types: hard copy, such as the LA30 and LA36 DECwriters, and CRT terminals such as the
VT05 and VT50 DECscopes.

(

Local terminals within 1500 feet of the computer site can be connected or dedicated direct electrical connections.
Terminals located beyond this distance are designated as remote terminals. Remote terminals are connected via
dial-up telephone lines to the central computer site.
Table 11-1 lists some of the characteristics of Digital-supported terminals.
Table 11-1
Terminals

E--

Name
TIYO
TTYI

TTY777

(

Controller
Number

Unit
Number

Monitor Calls

Data Modes

Buffer Size

DC72-L
DClO-A
DClO-B

LA36
LA30
LT33A

INPUT
IN
OUTPUT

ASCII
ASCII Line
Image

23 8

DClO-C
DCI0-D
DC76

LT33B
LT35A
LT37AC
VT06
VT50
VT05
GT40

OUT
TTCALL
TRMNO.
GETLIN.
TRMOP.

PIM

11.2 TERMINAL MONITOR CALLS
11.2.1 The TTCALL Monitor Call (Op Code 051)
TTCALL is used for terminal operations. TTCALL operations are performed for a physical terminal (not a TTY
with a logical name), and most operations reference the terminal controlling the job that executed the TTCALL.
(There are exceptions, such as in using GETLCH). TTCALL's calling sequence is
TTCALL Code, Addr
where:

(

Code is one of the function codes listed in Table 11-2.
Addr points to an argument, if one is desired.

11-1

I/O Programming With Terminals

Table 11-2
TTCALL Functions

(

Function
Code

Mnemonic!

0

INCHRW

Input a character into the low-order seven bits of addr. If
the user has not yet typed a character, the program will wait
until one is typed.

I

OUTCHR

Output the character stored in addr to the user's terminal.
Only the low-order seven bits are used, but the remaining
bits do not have to contain zeroes.

2

INCHRS 2

Input a character into the low-order seven bits of addr. If
the user has not yet typed a character, the skip return is
taken. INCHRS will not wait until the user types a character,
as will INCHRW.

Meaning

3

OUTSTR

Output a string of ASCIZ characters to the user's terminal.

4

INCHWL~

INCHWL is the same as INCHRW, except that INCHWL
determines whether or not to wait on the basis of lines
rather than characters. INCHRW causes a swap to occur for
each character rather than each line. Therefore, INCHWL
returns the next line if a break character is typed. If a break
character has not been typed, INCHWL waits. Repeated
uses of INCHWL return each of the successive characters
of the line. Note that a CTRL/C in the input buffer satisfies
the condition of a pending line. When the input is finished,
the CTRL/C is interpreted and the job is stopped.

5

INCHSL 2

Input a line to addr. If the line has not yet been typed, a skip
is made.

6

GETLCH

Get the line characteristics of the specified line. The user
supplies a line number in the right half of addr. If the line
number is greater than those defmed in the system, a zero
answer is returned. The monitor will return, in the left half
of addr, the line characteristics associated with the specified
line number. The possible line characteristics are listed in
Table 11-3.

7

SETLCH

Set the "line characteristics for a specified line. The user supplies a line number in the right half of addr, and the line characteristics to be set in the right half of addr. Bits may be changed
only when issued for the job's controlling TTY. Table 11-3
lists the possible line characters, note that only bits 13, 14,
15, and 16 can be modified.

11-2

(

(

I/O Programming With Terminals

Table 11-2 (Cont.)
TTCALL Functions

(
Function
Code

MnemonIc

10

RESCAN

The input buffer is scanned from the point where the last
command began. If bit 35 of addr contains 1, the error return
is taken if there is a command in the input buffer. If the input buffer is empty, the skip return is taken. If RESCAN is
issued after the first input, it may no longer be in the buffer.
The address of addr is checked, but it is not used. RESCAN
is intended for use only by the COMPIL program.

11

CLRBFI

Clear the input buffer in the same manner as though the user
had typed CTRLjUs. CLRBFI can be used when the user
program detects an error.

12

CLRBFO

Clear the output buffer in the same manner as though the user
had typed a CTRLjO. This TTCALL is used infrequently,
since most users would like to see all output to the terminal
up to the point of an error.

13

SKPINC 2

Skip if the user has typed at least one character. SKPINC
does not skip if the user has not yet typed any characters;
however, it never inputs a character. SKPINC is useful for
a compute-bound program that wants to occasionally check
for input and, if any, go off to another routine to perform
the input.

• 1

(

Meaning

Note that the skip occurs whether or not the character has
been echoed (examined for echoing if NO ECHO has been
set). But, an attempt to input will input only those characters that have echoed, and it will wait if no characters have
yet echoed.
14

(

SKPINL2

Skip if the user has typed at least one line.
Note that SKPINL skips only if the line has been echoed
(examined for echoing if NO ECHO has been set).

15

IONEOU

Output the low-order eight bits of addr as an image character.

1

The TTCALL mnemonics are defmed in a separate MACRO assembler table, which is scanned if an undefmed
Op Code is found. If the symbol is found in the TTCALL table, it will be defined as if it had appeared in an
appropriate OPDEF statement.
2 This function clears the effect of the last to.

11.2.1.1 TTCALL_ Examples - Read One Character: The INCHRW TTCALL will input a character into the loworder seven bits of the specified location, addr. If no character has been typed, the program will wait until a
character is typed.

11-3

March 1976

I

I/O Programming With Terminals
INCHRW CHAR
JRSTDONE

(

Type One Character: The OUTCHR TTCALL outputs the character stored in addr to the user's terminal. The
low-order seven bits of addr are used; the remaining bits, though, do not have to contain zeroes.
OUTCHR OUTADR
JRSTDONE
Type a String: The OUTSTR TTCALL outputs a string of characters in ASCIZ format to the terminal;
OUTSTR TXT
JRSTDONE
TYPE THIS OUT would be printed at the terminal if the following was stored in location TXT:
TXT: ASCIZ/TYPE THIS OUT/

(

Table 11-3
Terminal Line Characteristics

I

Meaning

Bit

Mnemonic

0

GL.ITY

The line is a pseudo-TTY.

1

GL.CTY

The line is a CTY.

2

GL.DSP

The line is a display console.

3

GL.DSL

The line is a dataset data line.

5

GL.HDP

The line is a half-duplex line.

6

GL.REM

The line is a remote TTY.

7

GL.RBS

The line is a remote Batch TTY.

11

GL.LIN

A line has been typed-in by the user.

13

GL.LCM

Lower case input mode is ON.

14

GL.TAB

The terminal has TAB capabilities.

15

GL.LCP

The terminal input is not echoed because the device is localcopy only.

16

GL.PTM

The CTRL/Q (paper-tape) switch is on.

(

11.2.2 The GETLIN Monitor Call (CALLI 34)
The GETLIN monitor call will return the SIXBIT physical name of the terminal to which the calling job is attached.
Its calling sequence is
GETLIN ac,
The physical name of the terminal is returned left-justified in the AC. If the calling job is currently detached, the
left half of the AC will contain zeroes. The right half of the AC contains the right half of the physical name of the
terminal to which the calling job was most recently attached. A job can determine whether or not it is attached to
a terminal by examining the left half of the AC.
March 1976
11-4

(

I/O Programming With Terminals

(

11.2.3 The TRMNO. Monitor Call (CALLI 115)
The TRMNO. monitor call is used to obtain the number of the terminal currently controlling a specified job. Its
calling sequence is
MOVE
ac, job-number
TRMNO, ac
error return
normal return
where:

job-number is the number of the job for which its controlling terminal's number is desired.

On a normal return, the right half of the AC contains the universal I/O index for the terminal (in the format
.UXxxx). The range ofvalues of 2000008 to 2007778. The symbol.UXTRM (2000008) is the offset for the terminal indices.
On an error return, the AC is unchanged if the monitor call has not been implemented. If the AC contains a zero,
one of several error conditions occurred. The possible error conditions are

(

1.
2.
3.

The job is currently detached (Le., there is no controlling terminal).
The job number specified is unassigned (Le., there is no such job), or
The job number specified is illegal (Le., out of range).

The particular condition which caused the error may be obtained by using the JOBSTS monitor call. An example
of this follows.
MOVEI ac, job-number
TRMNO,ac,
JRST .42
JRST OK
JUMPN ac,
;CALL NOT IMPLEMENTED
MOVNI ac, job-number
JOBSTS ac,
JRST ILLNUM
JUMPL ac, DETJOB
JRST NOJOB

(

11.2.4 The TRMOP. Monitor Call (CALLI 116)
The TRMOP. monitor call allows the user to control, examine, and modify informatitm regarding any terminal
connected to the system. Many TRMOP. functions are extensions to the TTCALL input and output functions
(refer to Paragraph 11.2.1). TRMOP.'s calling sequence is
MOVE ac, [XWD n, addr]
TRMOP,ac,
e"orreturn
normal return
addr:
addr+l:

where:

function code
udx

n is the length of the argument block, which must be at least 2 words.
addr is the address of the argument block.
function code is the desired TRMOP. function; all function codes are listed in Table 11-4.
udx is the universal device index of the terminal (.UXTRM + line number).

11-5

I/O Programming With Terminals

Table 114
TRMOP. Function Codes
Code

(
Effect

Mnemonic

1

.TOSIP

Skip if the terminal's input buffer is not empty.

2

.TOSOP

Skip if the terminal's output buffer is not empty .

3

.TOCIB

Clear the terminal's input buffer.

4

.TOCOB

Clear the terminal's output buffer .

5

.TOOUC

Output the normal mode character in addr+2 to the terminal.

6

.TOOIC

Output the image mode character (8 bits) in addr+2 to the
terminal.

7

.TOOUS

Output the ASCIZ string in addr+2 to the terminal.

10

.TOINC

Input the the normal mode character from the terminal to the AC.

11

.TOIlC

Input the image mode character from the terminal to the AC.

12

.TODSE

Enable the modem for outgoing calls .

13

.TODSC

Enable and place outgoing calIon a modem with a dialer. A phone
number of up to 17 digits is stored in 4-bit bytes in addr+2 and
addr+3. The phone number is terminated by a 17 byte. If the
caller must wait for a second dial tone (e.g., after dialing 9),
a 16 byte results in a 15 second wait.

14

.TODSF

Disconnect a call (Le., hang up modem) .

15

.TORSC

Set the terminal element to the element number stored in addr+2;

16

.TOELE

Perform a rescan.

17

.TOEAB

Enable automatic baud direction.

1000

.TOOlP

Output is in progress if bit 35 = 1.

1001

.TOCOM

Terminal is in monitor mode if bit 35 = 1.

1002
2002

.TOXON

Set or obtain the status of the paper-tape bit (if bit 35 = 1, the
terminal is in paper-tape mode).

1003
2003

.TOLCT

Set or obtain the lower-case capabilities of the terminal (If bit 35 = 1,
the terminal has no lower case capabilities.)

.TOSLV

Set or obtain the slave characteristic of this terminal (if bit 35 = 1,
the terminal is slaved).

1004
2004

11-6

(

(

(

I/O Programming With Terminals

(

(

t--

(

Table 11-4 (Cont.)
TRMOP. Function Codes
Effect

Code

Mnemonic

1005
2005

.TOTAB

Set or obtain the TAB capabilities of the terminal (if bit 35
the terminal performs TABs).

1006
2006

.TOFRM

Set or obtain the value of the FORM switch (if bit 35 = 1, the
terminal performs formfeeds; if bit 35 = 0, the terminal performs
linefeeds only).

1007
2007

.TOLCP

Set or obtain the value of the local copy switch (if bit 35 contains
1, characters will not be echoed).

1010
2010

.TONFC

Set or obtain the value of the CR/LF switch (if bit 35
carriage returns/linefeeds will not be performed).

1011

.TOHPS

Read the value of the horizontal position of the carriage (a value
from 0 to 377 is returned in the AC).

1012
2012

.TOWID

Set or obtain the carriage width (this value may be set from 16
to 200).

1013
2013

.TOSND

Set or obtain the TTY GAG switch (if bit 35

1014
2014 1

.TOHLF·

Set or obtain the half-duplex characteristics of this terminal
(if bit 35 = 1, the terminal is in half-duplex mode).

1015
2015 1

.TORMT

Set or obtain the remote status of this terminal (if bit 35
the terminal is remote).

1016 1
2016

.TOmS

Set or obtain the display characteristic of this terminal (if bit
35 = 1, the terminal is a display device).

1017
2017

.TOFLC

Set or obtain the filler class code associated with this terminal.
(The filler class code may be set from 0 to 3).

1020
2020

.TOTAP

Set or obtain the status of the paper-tape (if bit 35
has been enabled).

1021
2021

.TOPAG

Set or clear the paged display mode (if bit 35 = 1, paged display
mode is cleared). Paged display mode can also be set and cleared
by the SET TTY PAGE command).

1022

= 1,

= 1, free

I
I
I

I

= 1, NOGAG) .

= 1,

= 1, paper-tape

Reserved to Digital.

1023
2023

.TOPSZ

Set or obtain the number of lines to a page in the range 0 to
63. The size of a page may also be changed by the SET TTY PAGE
command.

1024

.TOPCT

Set the value of the page counter in the range 0 to 63.

11-7

I

June 1976

I/O Programming With Terminals

(

Table 11-4 (Cont.)
TRMOP. Function Codes

1

Code

Mnemonic

1025

.TOBLK

Set or clear the capability to suppress blank lines on output (if bit
35 = 1, normal output is performed, if bit 35 =0, multiple linefeeds
are suppressed and vertical tabs are changed to linefeeds).

1026
2026

.TOALT

Set or clear the capability of converting ALTmodes on input (if bit
35 =0, 175 and 176 are converted to 033; ifbit 35 = 1, no conversion is performed).

1027
2027

.TOAPL

Set or clear APL mode (if bit 35

1030
2030

.TORSP

Set or obtain the received speed; refer to Table 11-5 .

1031
2031

.TOTSP

Set or obtain the transmit speed; refer to Table 11-5 .

1032
2032

.TODBK

Set or clear debreak capabilities (if bit 35

1033
2033

.T0274

Set or clear 2741 terminal characteristics (if bit 35 = 1, the terminal
is a 2741). Refer to Appendix K for more information on 2741s.

1034

.TOTDY

Obtain the status of the TIDY word .

1035
2035

.TOACR

Set or clear the automatic carriage return facility. If bit 35 = 1, the
first space after the specified column is automatically converted to
a carriage return.

1036
2036

.TORTC

Obtain or set the status of CTRL/R and CTRL/T compatibility
mode.

1037

.TOPBS

Effect

= 1, APL mode is in effect) .

(

= 1, debreak is enabled) .

PIM mode break set (4 9-bit bytes) .

This is a privileged function.

On an error return, the AC will either contain an error code or will be unchanged if the call has not been implemented. The possible error codes are listed in Table 11-6. Some TRMOP. functions are privileged functions or
they require that the user have the specified terminal ASSIGNed. Generally, any function is legal for the calling
job's terminal. In addition, any READ or SKIP function is legal for any terminal if the calling job
1. has the privilege bit JP.SPM set.
2. is running with the JACCT bit set, or
3. is logged in with the project/programmer number 1,2.

June 1976

11-8

(

(

I/O Programming With Terminals

A SET or output function is legal for any terminal if the job
1. has the privilege bit JP.POK set,
2. is running with the JACCT bit set, or
3. is logged in with the project/programmer number 1,2.

The function codes are defined in the following manner:
perform a specific action; refer to Table 11-4
read a parameter; refer to Table 11-4
set a parameter; refer to Table 11-4
are reserved for DEC customers

function codes 0000-0777
function codes 1000-1777
function codes 2000-2777
function codes 3000-3777

(

The READ (1000-1777) and SET (2000-2777) functions are parallel; i.e., if function 1002 reads a particular
parameters, then function 2002 sets the same parameter. Values for the READ functions are returned in the AC;
arguments to the SET functions are passed in addr+2. One-bit quantities are not range-checked; instead, bit 35 of
addr+2 is stored. If a Innn and 2nnn code appear in the first column of Table 11-4 within braces, the Read function
has a corresponding SET function.
Table 11-5
Transmit/Receiving Speeds
Code

Speed

Code

Speed

Code

Speed

Code

Speed

1

50

5

150

11

1200

15

9600

2

75

6

200

12

1800

16

External A

3

110

7

300

13

2400

17

External B

4

134.5

10

600

14

4800

Table 11-6
TRMOP. Error Codes

(

Code
0
1
2
3
4
6

Meaning

Name

TOPRC%
TORGB%
TOADB%
TOIMP%
TODIL%

The call has not been implemented.
User is not privileged to perform this function.
Argument is out ofrange.
Argument list length or address is illegal.
Dataset activity to a non-dataset terminal.
Sub function failed (e.g., call not properly completed from dialer).

11.3 DATA MODES
ASCII (American Standard Code for Information Interchange) is a standard character set encoded in 7 bits (8 bits
including a parity bit). The ASCII set consists of 128 characters, 33 of which are non-printing control characters.
The following table describes how the characters are handled.

11-9

March 1976

I

I/O Programming With Terminals

I

I

000

NULL

Ignored on input; suppressed on output.

001

tA

No special action.

002

tB

No special action.

003

tC

Not passed to program. The user's terminal is switched to monitor mode the
next time input is requested by the program. Two successive t Cs cause the terminal to be immediately switched to monitor mode. Performs a tu and at O.
For user program control of tc, refer to Paragraph 3.1.3.2.

004

tD

Not echoed; therefore, typing in a control-D (EOT) does not cause a full-duplex
data phone to hang up.

005

tE (WRU)

No special action.

006

tF

No special action.

007

tG (Bell)

Echoes as Bell and is a break character.

010

t H (Backspace) Echoes as backspace. This is not passed to the program unless APL or special editor
mode has been set, instead it functions like RUBOUT.

011

tI (TAB)

Echoes as a TAB or an equivalent number of spaces. Refer to the SET TTY TAB
command.

012

t J (Linefeed)

Echoes as a linefeed and is a break character.

013

t K (Vertical Tab) Echoes as a vertical tab or four linefeeds. Refer to the SET TTY FORM
command.

014

tL (Form)

Echoes as a FORMFEED or eight linefeeds. Refer to the SET TTY FORM
command.

015

tM

Passed to program if terminal is in a paper-tape input mode; otherwise, supplied
a linefeed echo, is passed to program as a CR and LF, and is a break character
due to the LF.

(

016

tN

No special action.

017

to

Not passed to program. Complements output suppression bit allowing users to
turn output on or off. INPUT, INIT, and OPEN clear the output suppression
bit. This bit is also cleared by any other INPUT-class operation, such as DDTIN
and TTCALLS 0, 2, 4, and 5, by input test rTCALLS 13 and 14, and by returning to monitor command level via t C or EXIT operations. Echoed as to
followed by carriage return/linefeed.

020

tp

No special action.

021

tQ (XON)

Starts paper-tape mode if TTY TAPE command has been given.

022

tR

Retype the line currently being input, including the effect of any edits to the
line.

023

ts (XOFF)

Ends paper-tape mode.

March 1976

(

11-10

(

(

(

I/O Programming With Terminals
(
\

024

T

Gives job status and timing information.

025

U

.Deletes input line back to last wakeup character. Echoed as U followed by a
carriage return/line feed ; is a break character. Passed to program if special editor
mode is true.

026

V

No special action.

027

W

No special action.

030

X

No special action.

031

Y

No special action.

032

Z

Acts as EOF of TTY input. Echoes as Z followed by carriage return/linefeed. Is a
break character.

033

[ (ESC)

The standard ASCII escape. Echoed as $; is a break character.

(

(

034

No special action.

035

No special action.

036

No special action.

037

No special action.

040-137

Printing characters, no special action.

140-174

Lower case ASCII; translated to upper case, unless lower case mode is on.
Echoes as upper case if translated to upper case.

175 and 176

Old versions of altmode; converted to the standard escape (033) unless in
special editor mode (INIT or TRMOP.UUO) or no altmode conversion is
specified (TRMOP.UUO or SET TTY NO ALT command).

177

RUB OUT or DELETE:
1. Completely ignored if in paper-tape mode (XON).
2. Break character, passed to program if either DDT mode or special editor
mode is true.
3. Otherwise (ordinary case) causes a character to be deleted for each
rub out typed. All the characters deleted are echoed between a single pair
of backslashes. If no characters remain to be deleted, echoes as a carriage
return/linefeed.

On output, all characters are typed just as they appear in the output buffer with the exception of TAB, VT, and
FORM, which are processed the same as on type-in. Programs should avoid sending D, because it may hang up
certain data sets.
Image mode (octal code 10) is legal for TTY input and output except for pseudo-TTY's (refer to Paragraph 5.9).
Image mode is especially convenient for users of display devices, light pens, etc., since any sequence of input
characters is allowed. The user must use the ASSIGN command before the INIT command can be used in image
mode. (The user's own TTY is always assigned by logging in.) An attempt to do input to an unassigned terminal

11-11

I/O Programming With Terminals

results in an error return. Since any sequence of characters must be allowed, Control-C and Control-Z will not
cause their usual functions. If the user program accepts all characters, and does not release the terminal from
image mode, no user input will release the user from this state. The terminal would effectively become dead to the
system. Because of this situation, an image input state is defined. The image input state begins when the program
starts waiting as a result of an INPUT UUO in image mode. It ends when the program executes any non-image
mode terminal output operation. If no output is desired, a rTCALL UUO can be executed to output a null character. If no input characters are received for 10 seconds the EOF is forced. After another 10 seconds, the image input
state is terminated by the monitor and a Control-C is simulated. If the user should be in this situation, he should
.stop typing until the Control-C appears.

(

Packed Image Mode (octal code 2) is legal for TTY input and output (.PIM is not a legal mode for pseudo-TTYs).
PIM is designed for high efficiency character throughput between programs and external devices. This is accom·
plished by minimizing the monitor's character manipulation and testing.
In Packed Image Mode, characters are maintained as 8-bit quantities (Le., 7 data bits and 1 parity bit), which are
stored in buffers at the rate of 4 characters per word. The User program may set a "break" consisting of one to
four break characters for each line INITed in Packed Image Mode. The break set is defined via the TRMOP. monitor

(

call.
When the monitor receives a character from a Packed Image Mode line with a pending IN or INPUT, the character
is compared to each field in the break set. If no match occurs, the character is put in the buffer and the interrupt
is dismissed. In the case where a match does occur, the character is put into the buffer, the buffer is then terminated
and the controlling program is awakened. To avoid the possibility of a terminal setting stuck in PIM mode, and to
allow for the case where the user wishes to be awakened on each character, the user program specifies an empty
(0,,0) break set. In general operation, ALL characters, including control characters are passed by PIM with no
monitor intervention (e.g., fill, CR/LF; etc.) with the follOWing exceptions: if PAGE mode is set,the characters
XON and XOFF react in the normal PAGE mode sense.

(

11.4 FILE STATUS
The

me status of the terminal is shown below.

Standard Bits
16
SET BY USER

21

I

24

J

27

30

J

33

35

·1111111111111111111111111111111111111

23
SET BY MONITOR 1111111.

1111111

(

J
10- 0566

Bit 18

=IO.IMP

TTY is not assigned to a job (for image mode input processing).

Bit 23

=IO.ACT

Device is active
16

UNUSED I

22 24

25

111111[1111111111111111
10- 0567

(
11-12

. 1

I/O Programming With Terminals

Device Dependent Bits
18
SET BY USER

21

27

24

30

35

33

1L....---"'---'------'IIIIIIIIIWoIIIIIIIIIII...........
111111 ~~
10 -0568

Bit 27 - IO.TEC

This bit causes 001 through 037,175, and 176 (octal) to echo the character exactly
as received by the monitor. THERE IS NO SPECIAL ECHO (E'G" $ OR X).

Bit 28 - IO.SUP

Suppresses echoing on the terminal.

Bit 29 - IO.SEM

Special editor mode. Pass all characters except lower case and C. Lower case is
controlled by the SET TTY LC command and corresponding TRMOP. function.

'f

(

181921
SET BY MONITOR

24

28

30

33

35

-'---'-------'-~~

I,......,WIIIIIIIIIIIWIIIIIIIIIIIIIIII.L...-III

10-0569

(-

Bit 19 - IO.DER

Ignore interrupts for three-fourths of a second.

Bit 20 - IO.DTE

Echo failure has occurred on output.

Bit 21 - IO.BKT

Character was lost on typein.

\

11.5 PAPER-TAPE INPUT FROM THE TERMINAL (FULL-DUPLEX SOFTWARE)
Paper-tape input is possible from a terminal equipped with a paper-tape reader that is controlled by the XON ( Q)
and XOFF ( S) characters. When commanded by the XON character, the terminal service reads paper tapes, starting
and stopping the paper tape as needed, and continuing until the XOFF character is read or typed in. While in this
mode of operation, any RUBOUTS will be discarded and no free line feeds will be inserted after carriage return.
Also, TABS and FORMFEEDS will not be simulated on a Model 33 to ensure output of the reader control charactercharacters. To use paper-tape processing, the terminal with a paper-tape reader must be connected by a fullduplex
connection and only ASCII paper tapes should be used.
The correct operating sequence for reading a paper tape in this way is as follows:

• !:IET TTY TI{~PE: ~
.I:~ F' I P.)

X· I" • 1::"1' 1 I::' 'l"y' '( •
*"'C~THI!:;
J!:) 'WH(.IT
<:' \.
.I ,.)

" ...... -+-

• ...-")

I!:) DN TAF:'E~

~iDF~E OF THE nAME..)
"d"'Y'
1.....'1' NI'"::. ....-'}
1... 1"1,:)

''''z
*I'\B/'\C~

(

11.6 PAPER-TAPE OUTPUT AT THE TERMINAL (FULL-DUPLEX SOFTWARE)
Paper-tape output is possible on any terminal-mounted paper-tape punch, which is controlled by'the TAPE, AUX
ON ( R) ANDAUX OFF ( T) characters. The punch is connectedin parallel with the keyboard printer and, therefore, when the punch is on, all characters on the keyboard are punched on tape.
11-13

I/O Programming With Terminals

LT33B or LT33H terminals can have the reader and punch turned off and on under program control. When
commanded by the AUX ON character, the TTY service punches pap\tapes until the AUX OFF character is read
or typed in. The AUX OFF character is the last character punched on tape.

(

When writing programs to output to the terminal paper-tape punch, the user should punch several inches of blank
tape before the AUX OFF character is transmitted. This last character may then be torn off and discarded.
11.7 PSEUDO-TTYS (pTYs)
The device mnemonic is PTYO,PTYI ,... ,PTYn. (The number of pseudo-TTYs is specified when the monitor is
generated for a specific installation.) The buffer size is 238 (208 data) words.
11.7.1 Concepts
Each job in the DECsystem-lO is usually initiated by a user at a physical terminal. Except in the case of a DETACH
operation, the job remains under the control of the user's terminal until it is terminated by either the KJOB
command or the LOGOUT monitor call. For each physical terminal there is a block of core in the monitor, containing information about the physical terminal and including two buffers as the link between the physical terminal and the job. It is through these buffers that- the terminal sends input to the job, and the job returns output
to the terminal.
Sometimes it is desirable to allow a job in the DECsystem-l0 to be initiated by a program instead of by a user.
Since a program cannot use a physical terminal in the way a user can, some means must be provided in the monitor
for the program to send input to and accept output from the job it is controlling. The monitor provides this capability via the pseudo-TTY (PTY). The PTY is a simulated terminal and is not defined by hardware. Like hardwaredefined terminals, each PTY has a block of core associated with it. This block of core is used by the PTY in the
same manner as a hardware-dermed terminal uses its block of core. Figure 11-1 shows the parallel between a
hardware-defined terminal and a software-defined PTY.

(

r----,
USER-

PHYSICAL
TERMINAL

.I
I

r---.J
CONTROLLING
PROGRAM

-!-I

DEVICE TTY,
OR
DEVICE TTYn

I

CONTROLLED
JOB

MONITOR

DEVICE TTY.
OR
DEVICE TTYm

DEVICE PTY

I

I
I

CONTROLLED
JOB

(

L ________ .J

10-0545

Figure 11-1 Pseudo-TTY

~I

The controlling program, most commonly the batch processor, uses the PTY in the same way a user uses a physical
device. It initiates the PTY, inputs characters to and waits for output from the PTY, and closes the PTY using the
appropriate programmed operators. The job controlled by the program performs I/O to the PTY as though the PTY
were a physical terminal.

(

11-14

I/O Programming With Terminals

A controlled job may go into a loop and not accept any input from its associated buffer; therefore, it is not possible
for the controlling program to Simply rely on waiting for activity in the controlled job. A controlling program
may also wish to drive more than one controlled job, and be able to respond to any of these jobs; therefore, the
controlling program cannot wait for any particular PTY. For these two reasons, the PTY differs from other devices
in that it is never in an I/O wait state. Timing is accomplished by the HIBER monitor call and the status bits of
the PTY.

(

11.7.2 The HIBER Monitor Call
The HIBER call allows the controlling program to temporarily suspend its operation until either there is activity
in the controlled job or the specified amount of sleep time runs ('ut, whichever occurs first. If bit 12 in the AC is
set in the HIBER call, any PTY activity since the last HIBER causes the controlling program to be awakened. If
no PTY activity occurs before the limit of sleep time is reached, the controlling program is activated, and it checks
the controlled job's run time or other criteria to determine whether the job should be interrupted. If the job should
be interrupted, the controlling program may output two control-C characters to stop the job. (A timesharing user
stops a running job in the same way). If the job should not be interrupted, the controlling program should repeat
the HIBER. Refer to Section 4.1.3.2.
If bit 12 in AC is not set, unnecessary delays might result if activity occurred on a PTY while the controlling job
was sleeping. To avoid these delays, a check is made when a PTY status bit changes to determine if the controlling
program is in a sleep. If it is, the sleep time is cleared so the controlling program can service the PTY.

11.7.3 File Status
The file status of the pseudo-TTY is shown below.
Standard Bits
(-~
18

I

SET 8Y USER

SET BY MONITOR

I

21

24

27

30

33

35

111111111111111111111111111111111111

21

23

I11111

1111111

10-0570

Bit 21 - 10.BKT

(

Bit 23 - IO.ACT

Device is active

Device Dependent Bits
18
SET BY MONITOR

I

21

24

27

30

33

35

1111111111111111111

10 - 0571

Bit.24 - IO.PTY

Job is in !l TTY input wait. The controlling job should perform an OUTPUT
to the PTY.

Bit 25 - 10.PTO

The TTY buffer has output to be read by an INPUT from the PTY.

Bit 26 - IO.PTM

Any characters typed into the TTY buffer (by OUTPUT to the PTY) are read
by the monitor command decoder instead of by the controlled job (Le.,
the controlled job is in monitor code
11-15

I/O Programming With Terminals

(
11.7.4 Special Monitor Calls

I

11.7.4.1 OUT, OUTPUT
RELEASE monitor call.

The first OUTPUT operation after an INIT or OPEN causes the special actions of the

1.

Characters from the controlling program's buffer ring are placed in the input buffer of the TTY
linked to the PTY.

2.

The IO.PT! bit is cleared.

3.

The IO.PTM ibit is set or cleared as determined by the state of the TTY.

The following are exceptions to the normal output actions;

(

1.

NULLS (ASCII 000) are discarded.

2.

If more OUTPUTs are performed than are accepted by the controlled job and if the limit on this excess
is exceeded, the IO.BKT bit is set and the remainder of the controlling program's buffer is discarded.

3.

Lower case characters sent to the controlling job are translated to upper case if the appropriate
bit in the TTY is set.

11.7.4.2 IN, INPUT - Characters are read from the output buffer of the TTY and are placed in the buffer ring
of the controlling program. If there are no characters to read, an empty buffer is returned. INPUT does not cause a

~~

(

All the available characters are passed to the controlling program. If there are more characters to read than can fit
in the buffer of the controlling program, the IO.PTO bit remains set and another INPUT should be done. If the
output buffer of the TTY is exhausted by INPUT the IO.PTO bit is cleared.
11.7.4.3 RELEASE Monitor Call -

RELEASE causes the following special actions:

1. Any characters in the output buffer of TTY are discarded.
2. Jf the controlled job is still attached to TTY, it is detached.

(

3. The PTY is disassociated from the software channel.
NOTE
Haphazard use of the PrY and subsequent RELEASE operations
may leave detached jobs tying up core and other system resources.
11.7.4.4 JOBSTS Monitor Call - JOBSTS provides status information about device TTY and/or the controlled
job in order to allow complete and accurate checking of a controlled job. The calling sequence is

I

}
{ MOVE! ac, channel
MOVNI ac, job-number
JOBSTSac,
error return
normal return

AC contains a number n specifying the job and/or the TTY to be checked. If n is from a to 17, the specified TTY
and job are those currently INITed on the user's channel n. If n is negative, the job to be checked is job number
(-n).

March 1976

11-16

(

I/O Programming With Terminals

The error return is given if one of the following is true:
1. the call has not been implemented. If this is the case, check the I/O status word,
2. n is out of range, or
3. there is no PTY INITed on channel n.
Otherwise, the normal return is given and AC contains the following status information.
Table 11-7
JOB Status Bits
Name
JB.UJA

Bit 0 = 1

Job number is assigned.

JB.ULI

Bit 1 = 1

Job is logged in.

JB.UML

Bit 2 = 1

TTY is at monitor level.

JB.UOA

Bit 3 == 1

TTY output is available.

JB.UDI

Bit 4 = 1

TTY is at user level and in input wait, or TTY is at
monitor level and can accept a command. In other
words, there is no command awaiting decoding or
being delayed, the job is not running, and the job is
not stopped waiting for operator device action.

1-\

(

Explanation

Bit

JB.UJC

Bit 5 = 1

JACCT is set. In particular, tc tc will not work.

JB.UJN

Bits 18-35

Job number being checked or 0 if no job number is
assigned.

I

I

11.7.4.S CTLJOB Monitor Call - CTLJOB (CALLI 65) is used to determine the job number of the program Gob)
that is controlling the specified job, if any. Its calling sequence is:

\

MOVE ac, job number
CTLJOBac,
error return
normal return

I

On a normal return, AC contains the job number of the program Gob) that is controlling the controlled job. If
AC= 1, the specified job is not being controlled via a PTY.
An error return is given if the call has not be implemented or the job number is too large.

11-17

March 1976

(

(

(

(

(

CHAPTER 12
IjOPROGRAMMING WITH UNIT RECORD DEVICES

This chapter explains unique features of each of the following standard non-directory I/O devices.

(

the card punch
the card reader
the display unit
the line printer
the paper tape punch
the paper tape reader
the plotter

refer to
refer to
refer to
refer to
refer to
refer to
refer to

12.1
12.2
12.3
12.4
12.5
12.6
12.7

Each device accepts the monitor calls described in Chapter 7, unless otherwise indicated. Table 12-1 summarizes the
characteristics of these devices. Buffer sizes are given in octal and include three bookkeeping words. The user program may obtain the physical characteristics associated with any device by using the DEVCHR monitor call (refer to
Section 7.5.2).
Table 12-1
Summary of Some Non-Directory Devices

(
\

Device
Name

Physical
Name

Controller
Number

Card Punch

CDP

-

Card Reader

CDR
CDRl

Console TTY

CTY

-

Display

DIS

-

Line Printer

LPT
LPTl
LPT2

Paper·Tape
Punch
Paper·Tape
Reader
Plotter

PTP

-

PTR

-

-

(

PLT
PLTl

LPIO·F
LPIO·H

XYIO

Unit
Number
CPIOA
CRIO·D
CRIO·E
CRIO·F
LA36
LA30
LT33A/B
LT37AC
LT35A
VT06/05/50
GT40
VR30
VPIO
340B
30
LSPIOLA
LSPIO·LB
LPIO·FA
LPIO·FB
LPIO·FC
LPlO·FD
LPIO·HA
LPIO·HB
LPIO·HC
LPIO·HD
PC09
PC04
XYIO·A
XYIO·B

Monitor
Calls

Data
Modes

Buffer
Sizes l

OUTPUT
OUT
INPUT
IN

A,AL,I,
IB,B
A,AL,I,
IB,B,SI

35

A,AL,I

23

. INPUT
IN
OUTPUT
OUT

INPUT
OUTPUT
IN
OUT
OUTPUT
OUT

OUTPUT
OUT
INPUT
IN
OUTPUT
OUT

ID

36

Dump Only

A,AL,I

37

A,AL,I
IB,B
A,AL,I
IB,B
A,AL,I
IB,B

43
43
46

lBuffer sizes are subject to change and should be obtained via the DEVSIZ monitor call.

12-1

June 1976

I

I/O Programming With Unit Record Devices

12.1 THE CARD PUNCH (CDP)
The header card is the first card of an ASCII file and identifies the card code used (refer to Appendix C). This card
is not punched for data modes other than ASCII. The header card has the same punches in all columns. This punch
depends on the card code used; for example, in 026, the header card has 12-24-8 punched in columns 1 through 80.

(

The end-of-file (EOF) card is the last card of each output file. This card is punched for all data modes; it has a
12 -11-0-1-6-7 -8-9 punch in columns 1 through 80.
12.1.1 Data Modes and Buffer Zones
The buffer sizes for the card punch are data-mode dependent.
ASCII
code 0
Buffer Size:23 8
(80 7 -bit ASCII characters)

ASCII characters are converted to card codes and punched (up to 80
characters per card). Tabs are simulated by punching from 1 to 8 blank
columns; form-feeds and carriage returns are ignored. line feeds
cause a card to be punched. All other non-translatable ASCII characters
cause a question mark to be punched.
Card can be split between buffers. Attempting to punch more than 80
columns/card causes the error bit (IO.BKT) to set in the file status
word. The CLOSE Call will punch the last partial card and punch an
EOF card.
Cards are normally punched with DEC026 card codes. If bit 29(100 8)
of the status word is on (from an INIT, OPEN, or SETSTS), cards will
be punched with DEC029 codes (refer to Appendix C). The first card
of any file (the header card) indicates the card code used (12-0-24-6-8
punched in column 1 for ANSI card codes; 12-24-8 punched in column
1 for DEC026 card codes).

ASCII line
Code 1
Buffer Size:23 8
(80 7-bit ASCII characters)

Same as ASCII mode.

IMAGE
Code 10
Buffer Size: 36 8
(80 12-bit bytes)
IMAGE BINARY
Code 13
Buffer Size:36 8

Each buffer contains 2710 words, each of which contain three 12-bit
bytes. Each byte corresponds to one card column. Since there is room
for 81 columns in the buffer (3 x 27) and there are only 80 columns on
a card, the last word contains 2 bytes of data; the third byte is thrown
away. If the byte size is set by the user program to be 12-bit bytes (the
monitor normally set up 36-bit bytes), the program must skip the last
byte in the buffer. Image binary causes exactly one card to be punched
for each buffer output. A program should not force an output every
80 columns since, if the program is 1ll spooled mode, it will waste a
large amount of disk space. The CLOSE will punch the last partial card
and punch an EOF card.

BINARY
Code 14
Buffer Size: 35 8

Column 1 contains the word count in rows 12 through 3. A 7-9
punch is in column 1. Column 2 contains a checksum as described for
the paper-tape reader (refer to paragraph 11.7.1.5); columns 3 through
80 contain up to 26 data words, 3 columns per word. Binary causes
exactly one card to be punched for each output. The CLOSE call
punches the last partial card and then punches an EOF card.

12.1.2 Monitor Calls
Following a CLOSE, an EOF card is punched. Columns 2 through 80 of the header card and the EOF card contains
the same punches that appear in column 1 for each file identification. These punches are ignored by the card
reader service routine.

12-2

(

(

I/O Programming With Unit Record Devices

(

After each interrupt, the card punch stores the result of a CONI in the DEVSTS word of the device data block. The
DEVSTS call is used to return the contents of the DEVSTS word to the user.

12.1.3 File Status
The file status of the card punch is as follows.
Standard Bits
18

24

21

27

SET BY USER

(

Bit 19 - IO.DER
Bit 21 - IO.BKT
Bit 23 - IO.ACT

21

23
111111&...-1111_______________....&.--.....II

Punch error
Reached end-of-card with data remaining in buffer
Device is active
20

I111111111111

22 24

27

1111111111111111111111111111111111111

Device Dependent Bits

(

29
SET BY USER

Bit 29 - IO.D29

35

l"'-oI IOI.I I I~l l l w. . . .&.IOl l

18
UNUSED

33

1111111111111111111111111111111111111

19

SET BY MONITOR

30

.I

111111

If 1, punch DEC029 card codes in ASCII mode
If 0, punch DEC026 codes

(

(

12-3

I/O Programming With Unit Record Devices

12.2 THE CARD READER (CDR)
For ASCII input, a header card can be the first card of the file and identifies the card code used (026 or ANSI
standard). The header card is used only when changing from (or back to) installation standard on ASCII input. The
header card must not be present with any other data modes; if present, the header card is treated as an incorrect
format or read as data. Refer to Appendix C for the card codes.

,
(

An EOp' card (end-of-file) has a 12-11-0-1-6-7-8-9 punched in columns 1 through 80. Columns 2 through 80 are
ignored. The EOF card has the same effect as the EOFkey on the card reader. This key must be depressed or the
end-of-file card must be present at the end of each input file for all data modes.
To be compatible with PDP-II operating systems, the DECsystem-lO card reader service accepts several other header
card codes and EOF cards.
Only column 1 is looked at; columns 2 through 80 are ignored.

ANSI

Punched by DECsystem-l0

Also Accepted

12-0-2-4-6-8

12-11-8-9

(

12.2.1 Data Modes
12.2.1.1 ASCII, Octal Code 0 - All 80 columns of each card are read and translated to 7-bit ASCII code. Blank
columns are translated to spaces. At the end of each card a carriage return/line feed is appended. As many complete
cards as can fit are placed in the input buffer, but cards are not split between the buffers. Using the standard-sized
buffer, only one card is placed in each buffer.
Cards are normally translated as ANSI card codes. If an 026 header card is encountered, any following cards are
translated as 026 codes (refer to Appendix C) until the 026 conversion mode is turned off. The 026 is turned off by
a RELEASE command or by an ANSI header card. Columns 2 through 80 of both of these cards are ignored.

('

12.2.1.2 ASCII Line, Octal Code 1 - This mode is the same as ASCII mode.
12.2.1.3 Image, Octal Code 10 - All 12 punches in all 80 columns are packed into the buffer as 12-bit bytes. The
first byte is in column 1. The last word of the buffer contains columns 79 and 80 as the left and middle bytes,
respectively. The EOF button is processed as in ASCII mode. Cards are not split between two buffers.
12.2.1.4 Image Binary, Octal Code 13 - This mode is the same as Image.
12.2.1.5 Binary, Octal Code 14 - Card column 1 must contain a 7-9 punch to verify that the card is in binary
format. Column 1 also contains the word count in rows 12 through 3. The absence of the 7-9 punch results in
setting the IO.IMP (bit 18 of the status word) flag in the card reader status word. Card column 2 must contain a
12-bit checksum as described for the paper-tape binary format. Columns 3 through 80 contain binary data, 3 columns
per word for up to 26 words. Cards are not split between two buffers. The EOF button is processed the same as in
ASCII mode.

(

12.2.1.6 Super-Image, Octal Code 1102 - Super-image mode may be initialized by setting bit 29 of the card reader's
lOS word. This mode causes the 36 bits read from the I/O bus to the BLKI'd directly to the user's buffer. For this
mode, the default size ofthe input buffer is 8110 words (8010 data words).
12.2.2 Monitor Calls
The card reader, after each interrupt, stores the result of a CONI in the DEVSTS word in the device data block. The
DEVSTS call is used to return the contents of the DEVSTS word to the user.

(
124

I/O Programming With Unit Record Devices

12.2.3 File Status
The file status of the card reader is shown below.

(

Standard Bits
18

21

24

18

21

24

27

30

33

35

SET BY USER
11111111111111111111111111111111111

SET
BY MONITOR
1111111111111111111111111111111
10-0548

Bit 18 = IO.IMP

7·9 punch absent in column 1 of a presumed binary card. The card reader is
stopped.
Photocell error, card motion error, data missed. The card reader is stopped.
Computed checksum is not equal to checksum read on binary card. The card
reader is stopped.
EOF card read or EOF button pressed.
Device is active.

Bit 19 = IO.DER
Bit 20 = IO.DTE

(

Bit 22 = IO.EOF
Bit 23 = IO.ACT

18

21

24

27

30

33

35

UNUSED
111111

11111111111111111111111111111111111
10-0549

(

Device-Dependent Bits
--

18

21

1

1

SET BY USER

24

27 29 30

1

33

35

111111
10-0549

Bit 29= IO.SIM

Super-image mode.

(

12-5

I/O Programming With Unit Record Devices

12.3 DISPLAY WITH LIGHT PEN
The device mnemonic is DIS; there is no buffer because the display uses device-dependent dump mode only.
12.3.1 Data Modes
For IMAGE DUMP, Octal Code 15, an arbitrary length in the user area may be displayed on the scope. The
command list format is as described in Chapter 7 with the addition for the Type 30, VR30 and VPlO display, that,
if RH = 0, and LH = 0, then LH specifies the intensity for the following data (4 to 13).

"
12.3.2 Background
During timesharing on a heavily.loaded system, the monitor service routine for the Type 30, VR30, and VPlO
guarantees a flicker-free picture on the display if the job is locked in core. To maintain this picture, the picture data
must be available for the display at least every two jiffies. If the system is lightly loaded, it is not necessary to keep
the job in core. When the job is swapped, a minimum amount of flicker may occur, but the job has high priority to
the swapped-in again.
12.3.3 Display Monitor Calls
The I/O Monitor calls for both displays operate as follows:
INIT channel, 15
SIXBIT /device /

o
error return
normal return
CLOSE channel,
or
RELEASE channel,

(

;MODE 15 ONLY
;DEVICE NAME
;NO BUFFERS USED
;DISPLAY NOT AVAILABLE
;STOPS DISPLAY AND
;RELEASES DEVICE AS
;DESCRIBED IN CHAPTER 7

(

12.3.3.1 INPUT channel, addr - If a light pen hit has been detected since the last INPUT, addr is set to the location of last light pen hit. If no light pen hit has been detected since last INPUT command, then addr is set to -I.
12.3.3.2 OUTPUT channel, addr - addr specifies the first location of a table of pointers. This table is composed of
pointers with the following format:

o

17 18

35

LH

RH

(

For the Type 30, VR30 and VPI0 Display:
If LH = 0 and RH = 0,
If LH = 0 and RH = 0,
If LH = 0 and RH = 0,
IfLH=OandRH=O,

o

then this is the end of the command list.
then LH is the desired intensity for the following data or commands. The
intensity ranges from 4 to 13, where 4 is the dimmest and 13 is the brightest.
then RH is the address of the next pointer. Successive pointers are interpreted
beginning at RH.
then -LH words beginning at address RH+l are output as data to the display. The
format of the data word is the following:
7 8

I

17 18
Y-COORD

I

12-6

25 26

I

35
X-COORD

I

{

\.

I/O Programming With Unit Record Devices

For the Type 340B Display:

(

IfRH=O
If LH = 0 and RH = 0,
If LH = 0 and RH = 0,

then this is the end of the command list.
then RH is the address of the next pointer. Successive pointers are interpreted
beginning at RH.
then -LH words beginning at address RH+ 1 are output as data to the display. The
format of the data word is described in the Precision Incremental CRT Display
Type 340 Maintenance Manual.

An example of a valid pointer list for the VR-30 display is:

"
D,LlST

LIST;

XWD
IOWD
IOWD
XWD
IOWD
IOWD
XWD

5,0
1,A
5,SUBP1
13,0
1,C
2,SUBP2
O,LlST!

LIST!:

10,0
XWD
1,B
IOWD
I,D
IOWD
0,0
XWD
OUTPUT D,LlST

A:
B:
C:
D:

XWD
XWD
XWD
XWD

6,6
70,105
105,70
1000,200

;INTENSITY 10 (NORMAL)
;PLOT B
;PLOT D;END OF COMMAND LIST
;OUTPUT DATA
;POINTED TO BY LIST
;Y=6,
X=6
;Y=70,
X=105
;Y-105,
X=70
;Y=1000, X=200

SUBP1:
SUBP2:

BLOCK
BLOCK

5
2

;SUBPICTURE 1
;SUBPICTURE 2

(

(-

;OUTPUT DATA
;POINTED TO BY LIST
;INTENSITY 5 (DIM)
;PLOT A
;PLOT SUBPICTURE 1
;INTENSITY 13 (BRIGHT)
;PLOT C
;PLOT SUBPICTURE 2
;TRANSFER TO LIST 1

OUTPUT

An example of a valid pointer list for the Type 340B Display is:

(
LIST:

,~

'"
LIST!:

(

OUTPUT

D, LIST

;OUTPUT DATA POINTER
;TO BY POINTER IN LIST

IOWD
IOWD
IOWD

1,A
5,SUBP1
1,C

IOWD
IOWD

5,SUBP1
1,B

IOWD
IOWD

2,SUBP2
O,LlST!

;SET STARTING POINT TO (6,6)
;DRAW A CIRCLE
;SET STARTING POINT TO
(70,105)
;DRAW A CIRCLE
;SET STARTING POINT TO
(lOS ,70)
;DRAW A TRIANGLE
;TRANSFER TO LIST!

IOWD

I,D

IOWD
IOWD
IOWD
XWD

5,SUBP1
1,A
2,SUBP2
0,0

;SET STARTING POINT TO
;(100,-200)
;DRAW A CIRCLE
;SET STARTING POINT TO (6,6)
;DRAW A TRIANGLE
;STOP

12-7

I/O Programming With Unit Record Devices

A:

X=6

B:

X=105

C:

X=70
X=lOOO

Y=105

D:
SUBP1;
SUBP2:

BLOCK
BLOCK

5
2

Y=6
Y=70

(

Y=-200

;DRAW A CIRCLE
;DRAW A TRIANGLE

The example shows the flexibility of this format. The user can display a sub picture by setting up a pointer. He
can also display the same sub picture in many different places by setting up pointers to the subpicture, each preceded
by a pointer to commands for the display to reset its coordinates.
12.3.4 File Status
The me status of the display is shown below.
Standard Bits
18

21

24

27

30

33

35

SET BY USER

(

11111111111111111111111111111111111

23
SET BY MONITOR
111111

10-0552

Bit 23 = IO.ACT

Device is active
18
UNUSED

21

I I I I I I I I I~I I I I I I

24

27

30

33

35

(

I11111111111111111111111111111111111

10-0553

Device-Dependent Bits - None

(

12-8

I/O Programming With Unit Record Devices

12.4 LINE PRINTER
The device mnemonic is LPT;the buffer size is 378 (36 8 data) words.

(

12.4.1 Data Modes
12.4.1.1 ASCII. Octal Code 0 - ASCII characters are transmitted to the line printer exactly as they appear in the
buffer. Refer to the DECsystem-IO System Reference Manual for a list of the vertical spacing characters.
12.4.1.2 ASCII Line, Octal Code 1 - This mode is exactly the same as ASCII and is included for programming
convenience. All format control must be performed by the user's program; this includes placing a LINE-FEED at
the end of each line (note that a carriage return is not necessary).
12.4.1.3 Image, Octal Code 10 - This mode is the same as ASCII mode.
12.4.2 Monitor Calls
The first output programmed operator of a file 'and the CLOSE at the end of a file cause an extra form-feed to be
printed to keep fIles separated if IO.SFF is not set.

(

Mter each interrupt, the line printer stores the results of a CONI in the DEVSTS word of the device data block. The
DEVSTS monitor call is used to return the contents of the DEVSTS word to the user.
12.4.3 File Status
The fIle status of the line printer is shown below.
Standard Bits
1B

(

SET

Bit 29 = IO .SFF

BY

USER

21

24

27

29 30

'1

33

35

IIIIIII!IIIIIIIIIIIIIIIIIIIIIIIIIIIIIIIII

Suppress FORM FEEDS on an OPEN or CWSE.
23

SET BY MONITOR

I11111
10-0554

Bit 23 = IO.ACT

(

Device is active.

UNUSED

I1111111111111111111111111111 I1111111111111111111111111111 1
10-0555

Device-Dependent Bits - None

','

12-9

I/O Programming With Unit Record Devices

12.5 THE PAPER-TAPE PUNCH
The device mnemonic is PTP; the buffer size is 43 8 (40 8 data) words.
12.5.1 Data Modes
12.5.1.1 ASCII, Octal Code 0 - The eighth hole is punched when necessary in order to make even parity. Tapefeed without the eights hole (000) is inserted after form-feed. A rubout is inserted after each vertical or horizontal
tab. Null characters (000) appearing in the buffer are not punched.
12.5.1.2 ASCII Line, Octal Code 1 - The mode is the same as ASCII mode. Format control must be performed
by the user's program.
12.5.1.3 Image, Octal Code 10 - Eight-bit characters are punched exactly as they appear in the buffer with no
additional processing.
12.5.1.4 Image Binary, Octal Code 13 - Binary words taken from the output buffer are split into six 6-bit bytes
and punched with the eighth hole punched in each line. There is no format control or checksumming performed
by the I/O routine. Data punched in this mode is read back by the paper-tape reader in the IB mode.
12.5.1.5 Binary, Octal Code 14 - Each bufferful of data is punched as one checksummed binary block as
described for the paper-tape reader. Several blank lines are punched after each bufferful for visual clarity.
12.5.2 Monitor Calls
The first output programmed operator of a file causes approximately two fanfolds of blank tape to be punched as
leader. Following a CLOSE, an additional fanfold of blank tape is punched as trailer. No EOF character is punched
automatically.
After each interrupt, the paper-tape punch stores the results of a CONI in the DEVSTS word of the device data
block. The DEVSTS monitor call is used to return the contents of the DEVSTS word to the user.

(

12.5.3 File Status
The file status for the paper-tape punch is shown below.
Standard Bits
18
. SET BY USER

SET BY MONITOR

I
I

21

24

27

30

33

35

I11111111111111111111111111111111111

23

I1IIII
10-0559

Bit 23 - IO.ACT

Device is active.

UN USED

11111111111111111111111111111

I11111111111111111111111111111111111

10-0560

Device Dependent Bits - None.

12-10

{
\

I/O Programming With Unit Record Devices

(

12.6 THE PAPER-TAPE READER
The device mnemonic is PTR; the buffer size is 43 8 (408 data) words.
12.6.1 Data Modes (Input Only)
NOTE
To initialize the paper-tape reader, the input tape must be
threaded through the reading mechanism and the FEED
button must be depressed momentarily.
12.6.1.1 ASCII, Octal Code 0 - Blank tape (000), RUB OUT (377), and null characters (200) are ignored. All
other characters are truncated to seven bits and appear in the buffer. The physical end of the paper tape serves as an
EOF, but does not cause a character to appear in the buffer.
12.6.1.2 ASCII Line, Octal Code 1 - Character processing is the same as for ASCII mode. The buffer is terminated
by LINE FEED, FORM, or VT.
12.6.1.3 Image, Octal Code 10 - There is no character processing. The buffer is packed with 8-bit characters
exactly as read from the input tape. Physical end-of-tape is the EOF indication but does not cause a character to
appear in the buffer.
12.6.1.4 Image Binary, Octal Code 13 - Characters not having the eighth hole punched are ignored. Characters
are truncated to six bits and packed six to the word without further processing. This mode is useful for reading
binary tapes having arbitrary blocking format.

(

12.6.1.5 Binary, Octal Code 14 ~ Checksummed binary data is read in the following format. The right half of the
first word of each physical block contains the number of data words that follow and the left half contains half a
folded checksum. The checksum is formed by adding the data words using 2's complement arithmetic, then splitting the sum into three 12-bit bytes and adding these using 1's complement arithmetic to form a 12-bit checksum.
The data eror status flag is set in the status word if the checksum miscompares. Because the checksum and word
count appear in the input buffer, the maximum block length is 40. The byte pointer, however, is initialized so as
not to pick up the word count and checksum word.
Again, physical end of tape is the EOF indication, but does not result in putting a character in the buffer.
12.6.2 Monitor Calls
After each interrupt, the paper-tape reader stores the results of a CONI in the DEVSTS word of the device data
block. The DEVSTS call is used to return the contents of the DEVSTS word to the user.
12.6.3 File Status
The file status of the paper-tape reader is shown below.
Standard Bits
18
SET BY USER

I

18

21

24

27

30

33

35

1111111111111111111111111111111111111

20

SET BY MONITOR I1111111111111

22

23

11111I11111
10-0561

(
12-11

\)

I

I/O Programming With Unit Record Devices

Bit 18
Bit 20
Bit 22
Bit 23

-

IO.IMP
IO.DTE
IO.EOF
IO.ACT

l

Binary block is incomplete.
Bad checksum in binary mode.
Physical end-of-tape is encountered. No character is stored in the buffer.
Device is active.
1819

I

21

UNUSED I 11111111111111

111111111111111111111111111111111111
10-0562

Device Dependent Bits - None.

(

•
(

(

12-12

",.

".

IjOProgramming With Unit Record-Devices

(

12.7 PLOTTER
The device mnemonic is PLT; the buffer size is 43 8 (408 data) words. The plotter takes 6-bit characters with the
bits of each character decoded as follows:

-x
~

PEN
LOWER

PEN
RAISE

+X
DRUM
DOWN

DRUM
UP

+y
CARRiAGE
LEFT

-y
CARRIAGE
RIGHT
10-0563

Do not combine PEN RAISE or LOWER with any of the position functions. (For more details on the incremental
plotter, refer to the DECsystem-lO System Reference Manual.)
12.7.1 Data Modes
12.7.1.1 ASCII, Octal Code 0 - Five 7-bit characters per word are transmitted to the plotter exa-ctly as they
appear in the buffer. The plotter is a 6-bit device; therefore, the leftmost bit of each character is ignored.
12.7.1.2 ASCII Line, Octal Code 1 - This mode is identical to ASCII mode.
12.7.1.3 Image, Octal Code 10- Six 6-bit characters per word are transmitted to the plotter exactly as they appear
in the buffer.
12.7.1.4 Image Binary, Octal Code 13 - This mode is identical to Image mode.
12.7.1.5 Binary, Octal Code 14 - This mode is identicalto Image mode.

(

12.7.2 Monitor Calls'
The first OUTPUT operator causes the plotter pen to be lifted from the paper before any user data is sent to the
plotter. The CLOSE operator causes the plotter pen to be lifter after all user data is sent to the plotter. These two
pen-up commands are the only modifications the monitor makes to the user output file.
After each interrupt, the plotter stores the results of a CONI in the DEVSTS word of the device data block.
DEVSTS is used to return the contents of the DEVSTS word to the user.
12.7.3 File Status
The file status of the plotter is shown below.

(

\

Standard Bits
18

24

21

SETByUSERL____L-__

- L__

27

30

33

35

~~ ~~~~~~
I I I I ~I I I I I I I I I I I I I I
__

23
1111111

I
10-0564

Bit 23 - IO.ACT

Device is active.

UN USE D 1111111111111111111111111111111

1111111111111111111111111111111111111

10-0565

Device Dependent Bits - None.

12-13

(

(
CHAPTER 13
THE MULTIPLEX CHANNEL FEATURE

The MPX channel is a software I/O channel on which an INIT/OPEN has been performed for device MPX:; INIT
defines to the monitor ~ multiplexed channel. Without the MPX channel feature, a program is restricted to referencing sixteen (one for each software I/O channel) simultaneously active devices. An MPX channel connects a
large number of devices to one software I/O channel, allowing a program to support a large number of devices simultaneously on one channel. Any job can create an MPX channel, and each job may create as many MPX channels as
required within the normal constraints on the maximum number of channels per job.
To each INITed.MPX channel the user connect devices that he wishes to control via the MPX channel. He may connect as many devices (in any order and in an arbitrary mix of device types) to a single MPXchannel as long as each
qevice connected has the predefmed characteristic of being controllable via an MPX channel. (The DEVTYP monitor call may be used to determine whether or not a device can be controlled by an MPX channel.) From a user's
point of view, I/O is performed into and out of buffers similar to the buffer ring described in paragraph 7.3.3.1. .
The buffer ring concept is slightly extended allowing all devices connected to one MPX channel to share the same
buffer ring.

(

The IN and OUT operators are utilized in about the same way as required for devices other than MPX devices. However, the format of buffers and buffer ring headers is modified to provide a unique device I. D. (a universal device
index), designating the source/destination of the data in each buffer.

(

13.1 BUFFER RING EXTENSION
For each MPX channel, one input and one output buffer ring can be defined via INIT/OPEN and INBUF/OUTBUF
as described in paragraphs 7.1 and 7.3.2. However, the buffer ring header block is 4-words in length for each device
rather than 3 words. INIT/OPEN defines the four-word headers for input and output. INBUF and OUTBUF are
then used by the user to create an arbitrary number of buffers for each ring with the buffer header in each buffer
appropriately initialized. Figure 13-1 illustrates a 4-word buffer ring header block.

o

(

WORD 0

1

35

17 18

I

Xl

CURRENT BUFFER

BUFFER POINTER
BYTE COUNTER
.<

UNIVERSAL DEVICE INDEX

Figure 13-1. MPX Buffer Ring Header Block

"

(

The input ring contains buffers chained together in an endless fashion with pointers in each buffer ring header block
to the next buffer in the ring. As in the conventional input buffer ring, input data is stored in consecutive buffers
in the ring, and data is retrieved in the same order for the user via the IN operator. The MPX channel stores additional information pertaining to the data in each buffer's 4-word header area. The fourth word of the ring header
is loaded with a value identifying the specific device which stored the data: the universal device index.

13-1

The Multiplex Channel Feature

The user must store a value identifying the device for which the data is destined. This value is stored in the fourth
word of the buffer ring header before the OUT operator is issued to output the data. With the exception of the
fourth word in the buffer ring header block, the MPX channel user can perform I/O operations in a way that is
virtually identical to the buffered I/O described in paragraph 7.3.2.

(

MPX utilizes buffer rings for input; for output the format is slightly modified to form one or mora device chains and
a free chain.
13 .1.1 Device Chains
Device chains are created when an OUT operator causes a buffer of data to be output on a particular device. A control block in the monitor address space maintains pointers to the beginning of the device chain for each device. The
chains are linked via the normal buffer link pointer (the right half of the second word of each buffer) and are terminated by a zero pointer value. Using the chain for output allows the monitor to treat each device connected to an
MPX channel separately.
After the device service routine empties the buffer it is placed on a free chain available for reuse. The free chain
begins with a pointer in the right half of the first word of the ring header. Buffers are linked via the normal pointer
in each buffer header area, and the chain is again terminated with a pointer value of zero.

(

As OUT operators are issued, buffers are removed from the free chain and added to a device chain. The ring header
is updated to the next buffer in the free chain for return to the user from the OUT. Buffers on a device chain are
returned to the free chain by the monitor when output has been accomplished. A facility exists to allow the user to
force an output buffer off a device chain and back to the free chain, when the user wishes to abort the output.
13.2 DATA MODES
All I/O performed on the MPX channel is in buffer I/O mode; thilt is, I/O is performed to and from buffer rings only.
All buffered I/O modes are legal for MPX as long as they are legal for all of the devices connected to MPX at execution time (refer. to paragraph 7.3).

(

13.3 DEVICE IDENTIFICATION
Devices that can be controlled by an MPX channel are identified by the user in one of two ways. Devices are identified by name (logical or physical) or by their universal device index (UDX). An UDX is associated with a device via
the CNECT. or 10NDX. monitor call.
13.4 MPX MONITOR CALLS
13.4.1 The CNECT. Monitor Call (CALLI 130)
The CNECT. monitor call connects and disconnects individual devices from a particular MPX channel. CNECT. can
only be used for devices which can be controlled by an MPX channel, such as terminals, line printers, etc. Its calling
sequence is
MOVEI aC,addr
CNECT. ac,

error return
normal return
addr: XWD operation, channel
SIXBIT/ devicename/
where:

;orUDX

,.

addr points to the two-word argument block.
operation is one of the operation codes listed in Table 13-1.
channel is an INITed MPX channel number.
devicename is the SIXBIT physical, logical or generic name of the device to be connected or disconnected.
UDX is the universal device index for the device to be connected or disconnected.

13-2

(

The Multiplex Channel Feature

Table 13-1
CNECT. Operation Codes
Code

Mnemonic

Meaning

1

.CNCCN

Connect the device to an MPX channel.

2

.CNCDC

Equivalent to a CLOSE and disconnect .

3

.CNCDR

Equivalent to a RESET and disconnect.

A device must be connected to an MPX channel before input or output can occur for that device on that MPX
channel. One CNECT. call must be issued for each device to be controlled by an MPX channel, and the CNECT.
call should be issued after the channel has been INiTed and after any desired INBUF or OUTBUF monitor calls
have been issued. On a normal return, if a generic name was specified in the argument block, its UDX will be
returned in the AC.
On an error return, an error code will be returned in the AC. The possible error codes are listed in Table 13-2.
Table 13-2
CNECT. Error Codes
Code

(

(

Name

Meaning

1

CNCNM%

Channel is not OPEN on device MPX:

2

CNCUD%

Device does not exist in the system.

3

CNCCM%

Device cannot be connected to device MPX.

4

CNCNF%

The monitor ran out of core to build the control blocks.

5

CNCNC%

Device is not connected and the requested operation is conditional
or unconditional disconnect.

6

CNCNO%

Channel is in some way illegal or not open.

7

CNCII%

An invalid I/O index was specified (UDX).

11

CNCDU%

Device is already assigned, INiTed, or connected by this or some
other job.

10

CNCUF%

Operation code is invalid (less than 1 or greater than 3).

12

CNCSD%

Device is a spooled device.

13.4.2 The ERLST. Monitor Call (CALLI 132)
The ERLST. monitor call may be used to find out if any devices have encountered a device error, how many devices
have encountered errors, and what these device errors are. The user may optionally specify that ERLST. only return
the above data for those devices which have not been previously reported during an earlier ERLST. monitor call. Its
calling sequence is
MOVEI ac, addr
ERLST. ac,
error return
normal return

i

\

addr: words, ; channel
number of devices
UDXl " GETST8-word

13-3

The Multiplex Channel Feature

where:

addr points to the first word of the device error block.

(

words is the number of words contained within this block.
channel is the MPX channel associated with the devices which have encountered error conditions.
number of devices is the number of devices associated with the channel which have encountered device
error conditions.
UDX1 is the universal device index associated with the first device reported on in this block.
GETSTS-word is the status bits associated with the device identified in the left half of this word.

The monitor performs this device error reporting by returning data in the device error block. The user must first
have declared space for this block by using the BLOCK pseudo-op. The ERLST. monitor call will fill this block with
data until all of the space allocated has been filled. If ERLST. does need more space, a flag will be set on return to
indicate to the user that the device error list is incomplete because of lack of space.
On an error return, an error code will be returned in the AC. The possible error codes are listed in Table 13-3.

(

Table 13-3
ERLST. Error Codes
Code

Mnemonic

1

ERLBC%

Bad channel; not in the range 0-17(8).

2

ERLNM%

Channel specified is not an MPX channel.

Meaning

13.4.3 The SENSE. Monitor Call (CALLI 133)
The SENSE. monitor call will return the status bit settings associated with a device connected to an MPX channel.
Its calling sequence is

(

MOVE ac, [XWD length,addr1]
SENSE. ac,
error return
normal return
}
addr1:{udx
channel
SIXBIT/device/
block, , addr2
addr2: SIXBIT/ name /
0, , GETSTS bits
DEVSTSword

where:

(

length is the length of the argument block pointed to by addr1.
addr1 points to an argument block.
addr1: contains the device identification, which can be either the Universal Device Index, the channel
number associated with the device, or the SIXBIT name of the device.
block is the length of the status block which will be filled in by the monitor. The size of this block is
determined by:

I

((length)/2)

* 3=words in block

addr2 points to the first word of the status block.

March 1976

134

(

The Multiplex Channel Feature

(

The monitor will return the status bits associated with each specified device. These status bits will be returned in the
status block, beginning with addr2.
On an error return, an error code will be returned in the AC. The possible error codes are listed in Table 13-4.
Table 13-4
SENSE. Error Codes
Code

Mnemonic

Meaning

1

SNSBD%

A bad device has been specified.

13.4.4 The CLRST. Monitor Call (CALLI 134)
The CLRST. monitor call allows the user to clear the status bits which were returned to the monitor as a result of
the SENSE. monitor call. By clearing the status bits associated with a device, that device may be continued after
a device error condition has occurred. The calling sequence for CLRST. is

(
MOVE ac, [XWD n, addr]
CLRST. ac,
error return,
normal return

addr:

SIXBIT/ device / }
{ channel

addr+l:

(

where:

I

udx
0, ,setsts value

n is the length of the argument block pointed to by addr.
addr points to an argument block containing one or more two-word entries.
device is the logical/physical name of a device.
channel is the software I/O channel number associated with the device.
udx is the universal device index associated with an MPX device.
setsts value specifies those bits which are to be cleared.

On an error return, an error code will be returned in the AC. The possible error codes are listed in Table 13-5.
Table 13-5
CLRST. Error Codes
Code

Mnemonic

Meaning

1

CLRID%

An illegal device has been specified.

2

CLRNO%

The device specified belongs to another job.

13.4.5 The IONDX. Monitor Call (CALLI 127)
The 10NDX. monitor call return the Universal Device Index associated with an MPX device. Its calling sequence is

I

ac, [SIXBIT/device/]}
{ MOVE
MOVEI
ac, channel
IONDX.
ac,
error return
normal return
where:

device is the logical/physical name of the device for which its UDX is desired.
channel is the software I/O channel number associated with the device.

13-5

March 1976

The Multiplex Channel Feature

The error return is taken on the following conditions:
1.
2.
3.

(

When the call has not been implemented,
When the device specified does not exist, and
When SIXBIT/MPX/ is specified as the device name.

(

(

(

13-6

CHAPTER 14
REAL-TIME PROGRAMMING

14.1 THE RTTRP MONITOR CALL (CALLI 57)
The real-time trapping monitor call (RTTRP)can be set by a timesharing user
1.
2.
3.
4.
5.

to dynamically connect real-time devices to the priority interrupt system,
to respond to these devices at interrupt level,
to remove the devices from the interrupt system,
and to remove the devices from the interrupt system,
to change the priority interrupt level on which the devices are associated.

(
The RTTRP monitor call can be called from UUO level or from interrupt level. This is a privileged momtor call
that requires the calling job to have real-time privileges (granted by LOGIN) and the job be locked in core
(accomplished via the LOCK monitor call). These real-time privileges are assigned by the system administrator
. and are obtained by the monitor from ACCT.SYS. The privilege bits required for using the RTTRP monitor call are
JP.LCK (bit 14) which allows the job to be locked in core, and
JP.RTT (bit 13) which allows the RTTRP monitor call to be executed.
NOTE
Improper use of features of the RTTRP monitor call can
cause the systeJIl to fail in a number of ways. Since
design goals of this monitor call were to give the user as
much flexibility as pOSSible, some system integrity had to
be sacrificed. The most common errors are protected
against since user programs run in user mode with all
ACs saved. It is recommended that no debugging of
real-time programs be done when system integrity is
important. However, once these programs are debugged,
they can run simultaneously with batch and timesharing
programs.

(

Real-time jobs control devices one of two ways:

1.
2.

block mode, or
single mode.

In block mode, an entire block of data is read before the user's interrupt program is run. In single mode, the user's
interrupt program is run every time the device interrupts.
Furthermore, there are two types of block modes: fast block mode and normal block mode. These differ in
response time only. The response time provided to read a block of data in fast block mode (assuming that nothing
else is running on the system) is 6.5 microseconds per word, arid in normal block mode it is 14.6 microseconds per
word. (The CPU time to complete each data transfer.)
In ali modes, the response time measured from the receipt of the real-time device interrupt to the start off the user
control program is 100 microseconds.

14-1

"
Real-Time Programming

. The RTTRP monitor call allows a real-time job to either put a BLKI or BLKO instruction directly on a priority
interrupt level (block mode) or add a device to the front of the monitor priority interrupt channel CaNSO skip
chain (single mode). Since the BLKI and BLKO instructions are executed in exec mode, a KI-lO/KL-lO system
requires that the job be mapped in exec virtual memory, in addition to being locked (via the LOCK monitor call).

(

When an interrupt occurs from the real-time device in single mode or at the end of a block of data in block mode,
the monitor will save the current state of the machine, set the new user virtual memory and APR clock flags, and
trap to the user's interrupt routine. The user services his device and returns control to the monitor to restore the
previous state of the machine and to dismiss the interrupt.
In fast block mode, the monitor places the BLKI or BLKO instruction directly in the priority interrupt trap
location, followed by a JSR to the context switcher. This action requires that the priority interrupt channel be
dedicated to the real-time job during any transfers. In normal block mode, the monitor places the BLKI or BLKO
instruction in the CaNSO skip chain.
Any number of real-time devices using either single mode or normal mode can be placed on any available priority
interrupt channel. The average extra overhead for each real-time device on the same channel is 5.5 microseconds
per interrupt.
The calling sequence for the RTTRP monitor call is
MOVEI ac,block
RTTRP ac,

error return
normal return
where:

block points to the RTTRP data block, which is different depending on whether single mode or block
mode is used.

(

On an error return, an error code is returned in the AC. The possible error codes are listed in Table 14-1. The
error return will not be taken until RTTRP scans the entire data block to find as many errors as possible.
On a normal return, the job is given user lOT privileges. These privileges allow the user to execute all restricted
instructions including the necessary I/O instructions to control his device. The lOT privileges must be used with
caution because improper use of the I/O instructions could halt th~ system (Le., HALT on the KA10; CONO APR,
0; DATAO APR, 0; CONO PI, 0 on the KAlO, KIlO, and KI,.-lO; and CONO PAG, 0 or DATA PAG, 0 on the
KIlO and KLlO). Note that a user can obtain just the user lOT privileges by issuing the RTTRP monitor call with
PICHL equal to O.
In single mode, the data block appears as follows:
RTBLK:

XWD
EXP
CaNSO

o
where:

PICHL,TRPADR
APRTRP
DEV,BITS

;PI CHANNEL (1-6) AND TRAP ADDRESS.
;APR TRAP ADDRESS.
;CONSO CHAIN INSTRUCTION.
;NO BLKI/BLKO INSTRUCTION.

trpadr is the location trapped to by the real-time interrupt (JRST TRPADDR). Before the trap
occurs, all ACs are saved by the monitor and can be overridden without concern for their contents.
piehl is the priority interrupt level on which the device is to be placed. Levels 1 through 6 are legal
depending on the system configuration. If pichl is 0, all occurrences of the device whose device code
is specified in the CaNSO instruction are removed from all levels. When a device is placed on a
priority interrupt level, normally all other occurrences of the device on any priority interrupt level are
removed. If the user desired the same device on more than one priority interrupt level simultaneously.

14-2

(

Real-Time Programming

(

(

(

Table 14-1
RTTRP Monitor Call Error Codes
Code

Value

Mnemonic

Bit 24=1

4000

RTJNP%

Job is not privileged.

Bit 25=1

2000

RTNCO%

This call is not runnable on CPUO.

Bit 26=1

1000

RTDIU%

Specified device is already in use by another job.

Bit 27=1

400

RTIAU%

An illegal AC was used during the RTTRP monitor
call at interrupt level.

Bit 28=1

200

RTJNL%

Job was not locked in core when RTTRP call was
executed.

Bit 29=1

100

RTSLE%

System limit for real-time devices has been exceeded.

Bit 30=1

40

RTILF%

Illegal format for CONSO, BLKO, or BUG instructions.

Bit 31=1

20

RTPWI%

The block address or pointer word was specified in an
incorrect format.

Bit 32=1

10

RTEAB%

The specified error address is out of bounds.

Bit 33=1

4

RTTAB%

Specified trap address is-out of bounds.

Bit 34=1

2

RTPNB%

Specified PI channel is not currently available for
BLKIs/BLKOs.

Bit 35=1

1

RTPNA%

PI channel not available.

Meaning

(Le., a data level and an error level), he can issue the RTTRP call with piehl negative. This indicates to
the system that any other occurrence of this device (on any priority level) is not to be removed. Note
that this addition to a priority interrupt level counts' as a real-time device, occupying one of the
possible real-time device slots.
aprtrp is the trap location for all APR traps. When an APR trap occurs, the monitor simulates a JSR
APRTRP. The user gains control from an APR trap on the same priority level that his real-time
device is on. The monitor always traps to the user program on illegal memory references, non-existent
memory references, and push-down list overflows. This allows the user to properly turn off his realtime device if needed. The monitor also traps on the conditions specified in the APRENB monitor
call (refer to Chapter 5). No APR errors that cause an interrupt are detected if the interrupt routine
is on a priority interrupt level higher than or equal to the APR interrupt level.
dev is the real-time device code.
bits is the bit mask of all interrupt bits of the real-time device and must not contain any other bits. If
the user desires control of this bit mask from his user area, he may specify one level of indirection in
the CONSO instruction (no indexing is allowed) Le., CONSO dev, @mask (where mask is the location
in the user area of the bit mask). The mask must not have any bits set in the indirect or index fields
on the instruction.
The data block for fast block mode is as follows:
RTBLK:

XWD PIXHL,TRADR
EXP APRTRP
BLKO DEV,BLKADR

o

;PI AND TRAP ADDRESS WHEN BLKO DONE.
;APR TRAP ADDRESS.
;BLKI OR BLKO INSTRUCTION
;BLKADR POINTS TO THE IOWD OF BLOCK TO BE SENT.

(
14-3

Real-Time Programming

where:

pichi, trpadr, and aprtp are the same as above.
blkadr is the address in the user's area of the BLKI/BLKO pointer word. Before returning to the user,
the monitor adds the proper relocation factor to the right half of the pointer word. Data can only be
read into the low segment above the protected job area, i.e., above location 114.

(

Since the pointer word is in the user's area, the user can set up a new pointer word when the word count goes to 0
at interrupt level. This allows fast switching between buffers. When the user desires to set up his own pointer
word, the right half of the word must be set as an exec virtual instead of a user virtual address. The jobs relocation
value is returned from both the LOCK monitor call and the first RTTRP monitor call executed for setting the
BLKI/BLKO instruction.
If this pointer word does not contain a legal address, a portion of the system might be overwritten. A check should
be made to determine if the negative word count in the left half of the pointer word is too large. If the word
count extends beyond the user's own area, the device may cause a non-existent memory interrupt, or may overwrite
a timehsaring job. If all of the above precautions are taken, this method of setting up the pointer word is much
faster and more flexible than issuing the RTTRP monitor call at interrupt level.
The data block for normal block mode is as follows:
RTBLK:

XWD PICHL,TRPADR
EXP APRTRP
CONSO DEV,BITS
BLKI DEV,BLKADR

;CHANNEL AND TRAP ADDRESS.
;APR TRAP ADDRESS
;CONTROL BIT MASK FROM USER AREA
;BLKI INSTRUCTION

On a multiprocessor system, the real-time trap monitor call applies only to the processor specified by the job's CPU
specification (refer to the SET CPU command description in DECsystem-lO OPERATING SYSTEM COMMANDS,
or the SETUUO monitor call description in Chapter 4). If the specification indicates more than one processor,
the specification is changed to indicate CPUO. Note that the priority interrupt channel (pichI) and processor traps
(aprtrp) are only for the indicated CPU.

(

14.1.1 Interrupt Level Use Of RTTRP
The format of the RTTRP monitor call at interrupt level is similar to the format at user level except for two
restrictions:
I.
2.

AC 16 and AC 17 cannot be used in the monitor call (i.e., CALLI 16,57 is illegal at interrupt level).
All ACs are overwritten when the monitor call is executed at interrupt level. Therefore, the user must
save any desired ACs before issuing the RTTRP monitor call. This restriction is used to save time at
interrupt level.
NOTE
If an interrupt level routine executes a RTTRP monitor
call that affects the device currently being serviced, no
additional calls of any kind (including RTTRP and WAKE
monitor calls) can be executed eluring the reaminder of
the interrupt. At this point, any subsequent call
dismisses the interrupt.

14.1.2 Restrictions
Devices may be chained onto any priority interrupt channel that is not used for BLKI/BLKO instructions by the
system or by other real-time users using fast block mode. This includes the APR channel. Normally, priority
interrupt levels 1 and 2 are reserved by the system for magnetic tape and DECtapes. Priority interrupt level 7 is
always reserved for the system. Each device must be chained onto a priority interrupt level before the user program
issues the CONO device, PIA to set the device onto the interrupt level. Failure to observe this rule or failure to set
the device on the same priority interrupt level that was specified in the RTTRP monitor call could hang the system.

14-4

(

Real-Time Programming

(

If CaNSO bit mask is set up and one of the corresponding flags iil a. device is on, but the device has not been
physically put on its proper priority level, a trap may occur to the user's interrupt service routine. This occurs
because there is a CaNSO skip chain for each priority level, and if another device interrupts whose CaNSO
instruction is further down the chain than that of the real-time device, the CaNSO associated with the real-time
device is executed.
If one of the hardware device flags is set and the corresponding bit in the CaNSO bit mask is set, the CaNSO skips
and a trap occurs to the user's program even though the real-time device was not causing the interrupt on that
channel. To avoid this situation that user can keep the CaNSO bit mask in his user area. This procedure all<\ws the
user to chain a device onto the interrupt level, keeping the CaNSO bit mask zero until the device is actually pht on
the proper priority interrupt level with CaNSO instruction. This situation never arises if the device flags are '
turned off until the CaNSO device, PIA can be executed.
The user should guard against putting programs on high priority interrupt levels which execute for long periods
of time. These programs could cause real-time programs at lower levels to lose data.

(

The user program must not change any locations in the protected job data area (locations 20-114, refer to
Chapter 3), because the user is running at interrupt level and full context switching is not performed.

If the user is using the BLKI/BLKO feature, he must restore- the BLKI/BLKO pointer word before dismissing any
end-of-flck interrupts. This is accomplished with another RTTRP monitor call or by directly modifying the
absolute pointer word supplied by the first RTTRP monitor call. Failure to reset the pointer word could cause the
device to overwrite all of memory.

(

14.1.3 Removing Devices from a Priority Interrupt Channel
When pichl equals 0 in the data block, all occurrences of the device specified in the CaNSO instruction are
removed from the interrupt system. If the user removes a device from a priority interrupt chain, he must also
remove the device from the priority interrupt level (CONO dev, 0).
A RESET, EXIT, or RUN monitor call from the timesharing levels removes all devices from the interrupt levels.
These calls cause a CONO dev, 0 to be executed before the device is removed. Monitor commands that issue
implicit RESETs also remove real-time devices (e.g., R, RUN, GET, CORE 0, SAVE, SSAVE, OSAVE, OSSAVE,
NSAVE, and NSSAVE).
14.1.4 Dismissing the Interrupt
The user program always dismisses the interrupt in order to allow the monitor to properly restore the state of the
machine. The interrupt may be dismissed with any monitor call other than the RTTRP or WAKE monitor call,
or on the KAlO, any instruction that traps to absolute location 60. The standard method of dismissing th~
interrupt is with a UJEWN instruction (op code 100). This instruction gives the fastest possible dismissal.
14.2 THE TRPSET MONITOR CALL (CALLI 25)
The TRPSET feature may be used to guarantee some of the fast response requirements of real-time users. In order
to achieve fast response to interrupts, this feature temporarily suspends the running of other jobs during its use.
This limits the class of problems to be solved to cases where the user wants to transfer data in short bursts at predefmed times. Therefore, because data transfers are short, the time during which timesharing is stopped is also
short, and the pause probably will not be noticed by the timesharing users.
The TRPSET monitor call allows the user program to gain control of the interrupt location. If the user does not
have the TRPSET privileges (JP.TRP, bit 15), the error return will be taken, and the user program will remain in
user mode. Timesharing is turned back on. If the user has the TRPSET privileges, the central processor is placed
in user I/O mode.

(
14-5

Real-Time Programming
If the AC contains zero, timesharing is turned on if it was turned off. If the left half of the AC is within the range
40 to 57 of the central processor, all other jobs are stopped from being scheduled and the specified PI location
(40-57) is patched to trap directly to the user. In this case, the mohitor moves the contents of the relative location
specified in the right half of the AC, converts the user virtual address to the equivalent exec virtual address, and
stores the address in the specified executive PI location. On a KI-lO based system, this requires the user segment
access during the interrupt to be locked and mappt:d contiguously in the exec virtual memory (refer to the LOCK
monitor call). If the segment does not meet these requirements the error return is taken.

(

On a multiprocessor system, the TRPSET monitor call applies to the processor specified by the job's CPU
specification (refer to the SET CPU command or the SETUUO monitor call). If the specification indicates only
CPUl, the error return is taken if the job is not locked in core. When the specification indicates more than one
processor, the specification is changed to indicate CPUO (the master processor).
The user can set up a priority interrupt trap into his relocated core area. On a normal return, the AC contains the
previous contents of the address specified by the left half of the AC, so that the user program may restore the
original contents of the PI location when. the user is through using this monitor call. If the left half of the AC is
not within the range 40 to 57, the error return is taken just as if the user did have the proper privileges.

(

The calling sequence for the TRPSET monitor call is
MOVE
ac, [XWD n,addr]
TRPSET ac,
error return
normal return

addr:

JSR

TRAP

TRAP:

o

;INSTRUCTION TO BE STORED IN EXEC PI LOCATION AFTER
;RELOCATION ADDRED TO IT.
;HERE ON INTERRUPT FROM EXEC.

The monitor assumes that address contains either a JSR U or BLKI U, where U is a user virtual address.
Consequently, the monitor adds a relocation to the contents of location U to make it an absolute IOWD (i.e., an
exec virtual address). Therefore, a user should reset the contents of U before every TRPSET call. A RESET
monitor call returns the user to normal user mode. To maintain compatibility between KAI O-based systems and
KIlO-/KLlO-based systems, the interrupt routine should be executed in exec mode. However, for convenience,
the routine can be executed in user mode in order to avoid relocation to exec virtual memory. This is possible on
KAlO-based systems if care is taken when dismissing the interrupt. On KIlO-/KL-lO-based systems, if there is a
possibility that the interrupt may occur during the job's background processing, the interrupt routine must be
executed in exec mode (and therefore must be locked and exec-mapped with the LOCK monitor call). In
particular, if the job is executing a monitor call at background level, the user of UJEN at interrupt level may cause·
an error. On KIlO-based systems and KLlO-based systems, it is recommended that the TRPSET interrupt routines
always be coded to run in exec mode (refer to the RTTRP monitor call for programming techniques).
On KAlO-based systems, the interrupt routine can be coded to run in user mode if the following procedure is
observed. If the interrupt occurs while some other part of the user's program is running, the user may dismiss
from the interrupt routine with a JEN XITINT. However, if the machine is in exec mode, a JEN instruction
issued in user mode does not work because of memory relocation. This problem is solved by a call to UJEN
(op code 100). This monitor call causes the monitor to dismiss the interrupt from exec mode. In this case, the
address field of the UJEN instruction is the user location when the return PC is stored (i.e., UJEN XITINT).

14-6

(

(
(,

Real-Time Programming

(

14.2.1 UJEN (Op Code 100)
This op code dismisses a user I/O mode interrupt of one is in progress. If the interrupt is from user mode, a JRST
12 instruction dismisses the interrupt. If the interrupt came from executive mode, however, this operator is used
to dismiss the interrupt. The monitor restore~ all accumulators, and executes JEN @U where user location U
contains the program counter as stored by a JSR instruction when the interrupt occurred.
14.2.2 The HPQ Monitor Call (CALLI 71)
The HPQ monitor call is used by privileged users to place their jobs in a high priority scheduler run queue. These
queues are always scanned by the scheduler before the normal run queues, and any runnable job in one of these
queues is executed before all other jobs in the system.
In addition, these jobs are given preferential access to sharable resources (e.g., shared device controllers). Therefore,
real-time associated jobs can receive fast response from the timesharing scheduler.
Jobs in high-priority queues are not examined for swap-out until all other queues have been scanned. If a job in a
high-priority queue must be swapped, the lowest priority job is transferred first, and the highest priority job last.
If the highest priority job is swapped, then that job is the first to be swapped in for immediate execution.
Therefore, in addition to being scanned before all other queues for job execution, the high-priority queues are
examined after all other queues for swap-out and before all queues for swap-in.

(

The HPQ monitor call requires as an argument the high-priority queue number of the queue to be entered. The
lowest high-priority queue is 1, and thf: highest-priority queue is equivalent to the number of queues that the
system is built for. The calling sequence for HPQ is
MOVE ac,hpq#
HPQ
ac,

(

error return
normal return
If the user does not have HPQ privileges, the error return is taken and a -1 is returned in the AC. The privilege
bits 6 through 9 in the privilege word (.GTPRV). These four bits specify a number from 0 to 17 octal, which is
the highest priority queue attainable by a user.
On a normal return, the job is in the desired high-priority queue. A RESET or EXIT monitor call returns the job
to the high-priority queue specified in the last SET HPQ command. A queue number of 0 as an argument places
the job back to the timesharing level.

(
\

-,.;

14-7

(

..

(

I\

CHAPTER 15
INTER-PROCESS COMMUNICATION FACILITY

,"

The Inter-Process Communication Facility (IPCF) makes it possible for jobs to communicate with one another and
with system processes. This communication takes place by sending and receiving packets of information. Each
sender and receiver has a Process I.D. (PID) assigned to it for communication identification.
When a process sends a packet to another process, the packet goes into the receiver's input queue, and it remains
there until the receiver checks his input queue and retrieves the packet. If the receiver is enabled via the Software
Interrupt System (refer to Chapter 5, Section 5.1), an interrupt will occur when a packet is received in the job's
input queue.

(

(

There is a send packet quota and receive packet quota per job which can be set by each installation per user. The
default send packet quota is two per job; the default receive packet quota is five per job. These quotas pertain to
outstanding sends and receives only. For example (assuming the default limit of two), if ajob sends two packets,
no more packets can be sent by that job until one or both of its previously sent packets have firsfbeen retrieved by
the intended receiver. If the receiver has five (assuming the default limit) packets in its receive queue that it has not
yet retrieved, it cannot receive any more packets until it has retrieved at least one of the five waiting packets.
There are two system processes utilized by IPCF: [SYSTEM] INFO and [SYSTEM] IPCC. SYSTEM [INFO] acts as
the information center for IPCF and performs several functions related to PIDs and names. [SYSTEM] IPCC is the
IPCF controller, and it performs many packet controlling functions. A j ob can send a packet to both of these system
processes.
15.1 PACKETS
A packet is divided into two blocks:
•
•

the packet descriptor block, which is four to six words long, and
the packet data block, which is the message portion of the packet.

The general format of a packet is represented in Figure 15-1.
'(

Each of the words in the figure is described within the following paragraphs.
15.1.1 Flags
The flags that can be set within the packet descriptor block are divided into two categories. Those that may be set
in the left half of word a (.IPCFL) are instructions to the monitor concerning the packet communication. Those
that may be set in the right half of word a describe the data message. The bits in the right half of the flag word are
those returned within the associative variable, and those returned in the status word when a software interrupt
occurs (refer to Chapter 5, Table 5-4, entry -24). The possible flags that can be set in the flag word are listed in
Table 15-1.
15.1.2 PIDs
A PID must be obtained for any job that wants to send or receive a packet. PIDs can be obtained by

(

1.
2.
3.

making a request for a PID to [SYSTEM] INFO, or
making a request for a PID to [SYSTEM] IPCC (only if the requester has the IPCF privilege).
using its job number for a PID.

15-1

Inter-Process Communication Facility

o

17 18

35

WORD 0

FLAGS

.IPCFL

WORD 1

SENDER'S PID

.IPCFS

WORD 2

RECEIVER'S PJD

.IPCFR

WORD 3

LENGTH

I

ADDR

.IPCFP

WORD 4

PPN OF SENDER

.IPCFU

WORDS

CAPABILITIES OF SENDER

.IPCFC

ADDR:

DATA BLOCK WORD 1

•
•
•
DATA BLOCK WORD N

(

Figure 15-1. Representation of an IPCF Packet
Normally, ajob will request its PID from [SYSTEM] INFO, obtaining a name associated with the new PID.
In summary, ajob should send a packet to [SYSTEM] INFO (whose PID is 0) requesting that a PID be assigned to
that job.
The job must also include, in the PID assignment request, a name that will be associated with the newly assigned
PID. The PID will then be associated with both the j ob number and the symbolic name.
The association between a PID and ajob number and name is released either 1) on a RESET, 2) when the job logs
off the system, or 3) when a release is requested from [SYSTEM] INFO (depending on the type of request).
[SYSTEM] INFO will not allow the assignment of a name which is already associated with another PID. (Unless
the owner of the name makes the request-)
A PID can have only one name associated with it, but ajob may have several PIDs (and therefore, several names)
associated with it. After a PID has been used, it will never be used again until monitor is reloaded. This action protects against messages being sent to the wrongjob by accident.
The symbolic name is limited to 29 characters, and it can contain any characters as long as the name is terminated
by a zero word. In order to initiate communication between jobs, there should be a mutual understanding between.
the jobs as to the symbolic name(s) to be used. This mutual agreement frees the communication procedure from

(
15-2

','

,)

j
j
I
il

Inter-Process Communication Facility

J

(

(

Table 15-1
Packet Flags
Bit

Mnemonic

o

IP.CFB

Use the indirect sender's PID. (PID is found at the address specified
in the word 1, .IPCFS).

2

IP.CFR

Use the indirect receiver's PID. (PID is found at the address specified
in word 2, .IPC~R).

3

IP.CFO

Allow one send request above the send quota. (The default send
quota is two.)

4

IP.CFT

Truncate the message, if it is larger than the reserved space.

IP.CFP

The packet is privileged. (This bit can be set only if the sending/
receiving job is a privileged job.) If a privileged sender sets this bit,
IPCFR. and IPCFQ. will return this. Bit = 1 in any reply. If this bit
was not set, the bit will contain 0 when the packet is placed in the
receiver's queue. If this job is not privileged and this bit is set, an
error code will be returned.

19

IP.CFV

The packet is a page of data (512 decimal words). Both the sender
and the receiver must have virtual memory capabilities. A page must
have been reserved (by using the PAGE_ monitor call) before a page
can be passed using IPCF.

IP.CFE

The error code is returned in these bits, if an error is encountered on
a receive or a send. The possible error codes are codes 70 to 77 listed
in Table 15-5.

30-32

IP.CFC

The system and sender code; this code can be set only by a privileged
job.

IP.CFM

Code

Mnemonic

1

.IPCCC

Sent by [SYSTEM] IPCC .

2

.IPCCF

Sent by system-wide [SYSTEM] INFO .

3

.IPCCP

Sent by receiver's local [SYSTEM] INFO .

Return the packet to the sender.
Code

Mnemonic

Meaning

.IPCFN

Packet in the job's input queue is one that
was sent to another PID but returned to
the sender due to the receiver's PID being
dropped before the packet was received.

~

1

(

Meaning

This bit cannot be set by an unprivileged job; the monitor will fill it
in for examination by an unprivileged job.

15-3

June 1976

!

l

\

\,

J,

Reserved.

24-29

!
',

I

18

33-35

I

Reserved.

20-23

(,

Do not wait for message if the queue is zero. If bit 0 is set on a receive
and there is no packet in the queue, the error return is taken with error
code 3 returned in the AC.

IP.CFS

5-17

(

Meaning

I

Inter-Process Communication Facility

any dependencies on system characteristics (such asjob numbers) that might change between job executions.
Four examples of symbolic names used in an IPCF communication are listed below.

(

[SYSTEM] PHOTOCOMP
FILEPROCESSOR[1O,1521]
PHOTOCOMP [SYSTEM]
TESTPROGRAM ['ANY' ,151]
The symbolic name within square brackets may be specified in one of the following forms:

project number" programmer number
string" programmer number
string" string
project number"string
string
(where string is restricted)
If a project-programmer number is used, it must be the project-programmer number under which the job is currently running. Ajob may specify [SYSTEM] as part of its symbolic name, only if the job is privileged (Le., the
JACCT bit has been set, or the job is running under project-programmer number [1,2]). When specifying the name
associated with any PID or job number, you must be sure that the name is specified exactly as it appears, character
for character.

(

Before a job can send a packet to another job, the sender must know either the intended receiver's name or its PID.
If only the receiver's name is known, the sender must ask [SYSTEM] INFO for the PID associated with that namesince all communication takes place on a PID-basis only.

I

[SYSTEM] INFO keeps a list of all PIDs and their associated names currently assigned to each job.

(

15.1.3 Length of the Packet Data Block
The length of the packet data block is specified in word 3 (.IPCFP). The value specified will be one of two types,
depending on the type of message contained in the packet data block. The message can be either a short form message or a long form message.
The short form message can be one to n words in length, where n is defined by the individual system installation
(the default is ten words). The maximum length of the message can be obtained by examining .GTIPC (GETTAB
Table Number 77, item number 0). The length specified in .IPCFP must be the actual word length of the message
to be sent.
The long form message indicates that the length of the packet data block is one page (1000 8 words). When
using the long form message, the left half of word 3 in the packet descriptor block must contain 10008. Note that
in order to send or receive a long form message, the sending and receiving jobs must be running on a system with the
virtual memory option, also bit 19 (IP.CFV) of the flag word in the packet descriptor block must be set, or an error
code will be returned. If large amounts of data are to be set, the message portion of the packet may be used as a
pOinter to a file containing the data.
15.1.4 Address ofthe Packet Data Block
Word a of the packet data block is pOinted to by the right half of word 3 (.IPCFP) in the packet descriptor block.
The va:lue specified within the right half of lPCFP is either an address or a page number, depending on the type of
message contained in the packet data block. If the message is a short form message, the address of word a of the
message should be specified; if the message is a long form message, the page number of the message should be
specified.

June 1976

15-4

(

Inter-Process Communication Facility

15_1.5 Sender's Project-Programmer Number
Word 4 (.IPCFU) is an optional portion of the packet descriptor block. If .IPCFU is present within the block on a
receive, the monitor will fill in the sender's project-programmer number . .IPCFU is ignored on a send request.

(

15.1.6 Capabilities of Sender
Word 5 (.IPCFC) is an optional portion of the packet descriptor block. If .IPCFC is present within the block on a
receive, the monitor will fill in the capabilities of the packet sender_ This word is ignored on a send request. The
possible capabilities of a sender are listed in Table 15-2.
Table 15-2
IPCF Capabilities of a Sender

,.,:'

Bit

Mnemonic

0

IPJAC

The sender has the JACCT bit turned on.

1

IPJLG

The sender is logged-in.

2

IP.SXO

The sender is an execute-only job.

3

IP.POK

The sender has POKE privileges.

4

IP.lPC

The sender is an IPCF privileged job.

..

(

(

Meaning

--

15.1.7 . Packet Data Block
The packet data block contains the message portion of the packet. This portion can be in one of two forms: short
form or long form. The short form message can be one to n words in length, where n is defined by the individual
system installation (the default is ten). When ajob sends a message to either [SYSTEM] IPCC or [SYSTEM] INFO,
it always uses the short form. The long form message is one page in length (51210 words). When transmitting a long
form message, both the sending and receiving jobs must be running on a system with the virtual memory option.
Also, bit 19 (IP .CFV) of the flag word in the packet descriptor block must be set, or an error code will be returned.
15.2· S.ENDING A PACKET
To send a packet, the sendingjob must set up the packet descriptor block. When the IPCFS. monitor call is executed by the job, the message is sent to the intended receiver. When sending a packet with the sender's PID equal to
0, it indicates that the sender is the originator of the request. If sending a request to [SYSTEM] INFO and the
second word of the packet data block contains another job's PID.
For example, to send a message to [SYSTEM] INFO requesting a PID, the following could be written:
MOVE T1 ,[ 4" [0

o
o
3"NAME] ]

IPCFS. TI,

;length"noflags
;sender did not specify its PID
;default PID for [SYSTEM] INFO
;length"addr
;packet will be sent

JRST ERROR

NAME: O".IPCII

o

;addr: code"function name
;no duplicate copy to be sent

ASCIZ/CORPWORD/ ;specified name to be associated
;with PID

(
15-5

Inter-Process Communication Facility

15.3 RECEIVING A PACK,ET
To receive a packet, the receiving job must set up a packet descriptor block. When the IPCFR. monitor call is
executed by the receivingjob, a packet will be retrieved from the input queue, if there is one. If there are no
packets in the queue, the job will block until one arrives, unless IP;CIB was set in the flag word. The receive queue
is emptied on a first-in, first-out basis. An example to receive a packet is
SETTI: MOVE T2,[6,,[0

o
o
4"DATA

o

0]]
IPCFR. T2,

(

;set up descriptor block
;monitor fills in sender's PID
;monitor fills in receiver's PID
;length"addr
;monitor fills in sender's ppn
;capabilities of sender
;packet is retrieved from input queue

JRST ERROR2

DATA: BLOCK4

(

;packet data block

15.4 rSYSTEM]INFO
The [SYSTEM] INFO facility acts as the central information utility for IPCF and performs several functions conn~cted with names and PIDs. [SYSTEM] INFO will assign a PID, find a name associated with a PID, assign a name,
or drop all PIDs associated with names. The IPCFS. monitor call is used to send packets to [SYSTEM] INFO with
the message portion of the packet containing the request. The request must be in the general format shown in
Figure 15-2.

o
WORD 0 (.IPCIO)

17 18

I

CODE

35

FUNCTION

WORD 1 (.IPCIl)

PID

WORD 2 (.IPCI2)

FUNCTION ARGUMENT

Figure 15-2. Request to [SYSTEM] INFO
where:

(

(

code is a user-declared quantity associating the answer with the appropriate request. If the user does
not expect an answer, it is not necessary to specify a code; for consistency, the code field should contain
zero if no answer is expected.

[unction is one of eight operations that a user may request [SYSTEM] INFO to perform. These functions are described in Table 15-3.

PID is the PID or job number of the job that is to receive a duplicate of the response from [SYSTEM]INFO. Ifword 1 contains zero, the response is sent only to the originator of the request.

junction argument is different depending on the function specified. Function arguments are described
in Table 15-3 pertinent to each function.
All responses from [SYSTEM] INFO will be in the form of a packet, which is sent to the function requester. The
message portions of the responses packets will be in the general format shown in Figure 15-3.

(
15-6

Inter-Process Communication Facility

Table 15-3
Functions

(

[SYST~M] INFO

Function
Code

Mnemonic

Request Format

Meaning

1

.IPCIW

code".IPCIW
PIb!or copy
name

INFO will fmd the PID associated with
the name specified in the request.

2

.IPCIG

code".IPCfG
PID!orcopy
PID

INFO will find the name associated with
the PID specified in the request.

3

.IPCn

code".IPCII

INFO will assign the name specified in
the function argument to the job
number making the request. (This
name will be disassociated from the
job number when the job performs a
RESET call.)

4

.IPCIJ

code ".IPCIJ
PID!orcopy
name in ASCIZ

INFO will assign the name specified in
the function argument to the job
number making the request. (This
name will be disassociated from the
job number when the job logs off the
system.)

5

.IPCID

code".IPCID

INFO will disassociate the specified PID
from its job number. This function can
only be requested by the owner of the
specified PID, unless the requester is
an IPCF privileged user.

PID !o~copy
name in ASaZ

(

-_ .. - -

(

PID !or copy
PID to be
dropped
6

.IPCIR

code".IPCIR

PID!orcopy
job number

(

(

7

.IPCIL

15

.IPCIS

code ".IPC LQ
PID!orcopy
job number

INFO will disassociate all PIDs that
were created by function 3 and are
associated with the specified j ob number. This function can be requested
only by the owner of the specified job,
unless the requester is an IPCF privileged user.
INFO will disassociate all PIDs that
were created by function 4 and are
associated with the specified j ob number. This function can only be
requested by the owner of the specified
job, unless the requester is an IPCF
privileged user.
Function 15 is used only by
[SYSTEM] IPCC on the execution of
the LOGOUT or RESET monitor call.

15.5 [SYSTEM]ICPP
The IPCF controller ([SYSTEM] IPCC) supports a number of functions, including enabling (disabling) jobs to receive
packets, assigning a PID to [SYSTEM] INFO and destroying a PID. The IPCFS. monitor call is used to send a packet
to [SYSTEM] IPCC with the message portion of the packet containing the request. The request must be in the
general format shown in Figure 15-4.
15-7

Inter-Process Communication Facility

o

17

CODE

WORD 0 (.IPCIO)

18

I

WORD 1 (.IPCIl)

RESPONSE

WORD 2 (.IPCI2)

RESPONSE

35

(

FUNCTION

Figure 15·3. [SYSTEM] INFO Response Format

o

17 18

I

CODE

WORD 0 (JPCSO)

35

FUNCTION

WORD 1 (.Ipest)

FUNCTION ARGUMENT

WORD 2 (.IPCS2)

FUNCTION ARGUMENT

WORD 3 (.IPCS3)

FUNCTION ARGUMENT

Figure 15·4. Request to [SYSTEM] IPCC

code is a user·declared quantity that will associate the answer with the appro/riate request.

where:

function is one of the functions that a user may request [SYSTEM] IPCC to perform. The functions

(

are listed in Table 15·4.

function argument is different depending on the function requested. Function arguments are described
in Table 15·4 along with the functions.
All responses from [SYSTEM] IPCC will be in the form of a packet, which is sent to the function requester. The
message portion of the response packet will be in the general format shown in Figure 15·5.
Table t54
[SYST,EM] IPCC Functions
Function
Code

Mnemonic

Request Format

(
Meaning

1

.IPCSE

' code".IPCSE
job number

IPCC will allow the specified job number to receive
packets. If the requester is not the owner ofthe job
specified, it must have IPCF privileges.

2

.IPCSD

code".IPCSD
job number

IPCC will disable the specified job's ability to receive
packets. If the requesting job is not the owner ofthe
specified job number, it must have IPCF privileges.

3

.IPCSI

code".IPCSI
PID or job number

IPCC will return the PID associated with
[SYSTEM] INFO. The value returned will be for the
local [SYSTEM] INFO (if there is one) or secondly,
the global [SYSTEM] INFO. (GETTAB Table Number
77, item number 1 contains the PID for the system·
wide [SYSTEM] INFO.)
15-8

(

Inter-Process Communication Facility

Table 15-4 (Cont.)
[SYSTEM] IPCC Functions
Function
Code
4

Mnemonic
.IPCSF

Meaning

Request Format
code".IPCSF
m
n

IPCC will create a PID for [SYSTEM] INFO. The
requestingjob must have IPCF privileges to request
this function. The n should be equal to 0 to create a
global [SYSTEM] INFO, and not equal to 0 to create
a local [SYSTEM] INFO. Local [SYSTEM] INFOs
are valid only if another local or a global does not exist.
m is the PID which is to become SYSTEM [INFO] , 0
will delete [INFO] .
n=O indicates global [INFO]
n=j make local [INFO] for job number j.
Local [INFO] can be made only by local or global
INFO, if either exists (sending PID=local on global).
If no [INFO] then any privileged job can create it.
Global INFO can be changed or destroyed only if
sender PID is [INFO] .

5

.IPCSZ

code".IPCSZ
PID to be destroyed

IPCC will destroy a PID. The requesting job' must have
the IPCF privilege to request this function.

6

.IPCSC

code".IPCSC
type"job number

IPCC will create a PID for the specified job number.
The requesting job must have IPCF privileges to request
this function. Type can be 0 or 1; 1 indicates that the
PID is valid until RESET; 1 indicates that the PID is
valid until LOGOUT.

7

.IPCSQ

code".IPCSQ
PID or job number

IPCC will set a send and receive quota for the speCified
job number. The requestingjob must have the IPCF
privilege to request this function . The send quota will
be returned in bits 18-26 of the response word; the
receive quota in bits 27-35.

10

.IPCSO

code".IPCSO
PID
new job number

IPCC will change the job number associated with the
speCified PID. The requesting job must have the IPCF
privilege to request this function.

11

.IPCSJ

code".IPCSJ
PID

IPCC will return the job number associated with the
specified PID. The job number is returned in .IPCS2.

12

.IPCSP

code".IPCSP
job number

IPCC will return all of the PIDs associated with the
specified job number. Starting with .IPCS 1, IPCC will
return the PIDs. The number of PIDs returned depends
on the length of the block.

13

.lPCSR

code".IPCSR
job number PID

IPCC will respond with the send and receive quotas
associated with specified job number or PID. The
send quota will be returned ip bits 18-26 of .IPCSI;
the receive quota will be returned in bits 27-35 of
.IPCSl.

14

.IPCSW

code".IPCSW
job number

Wake ajob sleeping from JPCSS.

15

.lPCSS

code".IPCSS
job number

If equal to 1, job is resetting. If equal to -1,job is
logging out.

(

15-9

Inter-Process Communication Facility

(

Table 15-4 (Cont.)
[SYSTEM] IPCC Functions
Function
Code

Mnemonic

Request Format

Meaning

16-23

Reserved to Digital.

24

.IPCWP

code ".IPCWP

IPCC will write the SYSTEM PID table.

25

.IPCRP

code".IPCRP

IPCC will read the SYSTEM PID table.

26

.IPCSU

code ".IPCSU

IPCC sends a message to [SYSTEM] QUASAR.

27

.IPCSL

code".IPCSL
job

Logout message sent to [SYSTEM] QUASAR .

o

WORD 0 (.!PCSO)

------._.--- - ..

..

17 18

~_ _ _ _O_'O_'/J_E_ _ _ _

WORD 1 (.IPCS1) .

35

(

--II

F_U_'NI_C_TI_O_W_ _ _

....LI _ _ _ _

RESPONSE

.

Figure 15-5. Response from [SYSTEM] IPCC
15.6 STATUS OF AN INPUT QUEUE
The IPCFQ. monitor call will return information regarding the status of a job's IPCF input queue. Its calling
sequence is

(

MOVE ac,[length"addrJ
IPCFQ. ac,

error return
normal return
where:

length is the length in words of the packet descriptor block (in the range 4 to 6).
addr is the first address of the block to store the packet descriptor block (i.e., IPCFQ. returns the

(

same block as.IPCFR. minus the packet data block.
On an error return, an error code will be returned in the AC indicating that the query failed; the error codes are
listed in Table 15-5. On a normal return, the status of the input queue is returned in addr.
The IPCFQ. monitor call will check the status of the next packet in the receiver's queue. It is wise to query IPCF
(with IPCFQ.) before a job tries to receive its first packet, in order to determine whether or not the first packet
contains a long form message. (The job could also check bit 19 of word 0 in the packet descriptor block.) If the
message in the queue is a long form message, the receiver must set bit 19 in word 0 of the receiving packet descriptor
block.
f

After the job receives its first packet, it is not necessary to use IPCFQ., as IPCFR. will return an associated variable
describing the next packet (if there is one) in the input queue. The associated variable (which is also the word
returned when a software interrupt occurs) is represented in Figure 15-6.

(
15-10

Inter-Process Communication Facility

(
o

17 18
LENGTH OF THE
MESSAGE

35
RH OF THE FLAG

WORD

Figure 15-6. An Associated Variable
15.7 RETRIEVE AN IPCF PACKET
The IPCFR. monitor call retrieves an IPCF packet from the job's receive queue. Its calling sequence is
MOVE ac,[length"addrj
IPCFR. ac,

error return
normal return

(

length is the length in words of the packet descriptor block (in the range 4 to 6).
addr is the address of the packet descriptor block.

where:

On an error return, the error code will be returned in the AC; the error codes are listed in Table 15-5. On a normal
return, the packet is retrieved.
Before a job retrieves a packet, the job must

(

1.
2.

know whether or not the packet data block will contain a long form message, and
.
set up a packet descriptor block.

The packet descriptor block is shown in Figure 15-1. Bit 19 of Word 0 (IP.CFV) must be set if the expected packet
data block contains a page of data. The length to be specified in bits 0-17 of Word 3 (.IPCFP) can be n or 10008 , If
the packet data block is ashort form message, set the length to n; if the packet data block is a long form message,
set the length to 1000. The length speCified for n (short form message) may be greater than the length of the message
so that the maximum limit may always be speCified. If the specified length is less than the actual message length,
the monitor call will take the error return unless the IP.CFT but was set in the flag word. If IP.CFT (bit 4) is set the
message will be received correctly, but it will be truncated.

(
'.

On a normal return from the IPCFR. monitor call, the AC contains the associated variable relating to the next packet
in the receive queue (refer to Figure 15-6). If the AC is 0, there is no packet in the queue. The packet data block
will be filled in as follows:
Word 0 Word 1 Word 2 Word 3 Word 4 Word 5 -

the left half remains the same, the right half contains the flags
the sender's PID is filled in by the monitor
the receiver's PID is filled in by the monitor
remains the same
filled in by the monitor
filled in by the monitor

15.8 SEND AN IPCF PACKET
The IPCFS. monitor call is used to send an IPCF packet. Its calling sequence is
MOVE ac,[length"addrj
IPCFS. ac,

error return
normal return
15-11

Inter-ProcessCommunication Facility

length is the length in words of the packet descriptor block (in the range 4 to 6).
addr is the address of the packet descriptor block.

where:

(

On an error return, an error code will be returned in the AC; all error codes are listed in Table 15-5. On a normal
return, the packet is sent to the intended receiver. Refer to section 15.1 and its subsections for information regarding the packet descriptor block.
Table 15-5
IPCF Error Codes
Error Code

Mnemonic

Meaning

1

IPCAC%

An address check was encountered.

2

IPCNL%

The block is not long enough.

3

IPCNP%

There is no packet in the receive queue.

4

IPCIU%

Reserved.

5

IPCTL%

The data is too long for the user's buffer.

6

IPCDU%

Destination unknown (the receiver's PID is unrecognized).

7

IPCDD%

The destination has been disabled.

10

IPCRS%

The sender's quota has been exceeded.

11

IPCRR%

The receiver's quota has been exceeded.

12

IPCRY%

There is no room in system storage.

13

IPCUP%

Sender specified invalid page number, or receiver specified an existent page.

14

IPCIS%

Sender's PID is invalid as specified.

15

IPCPI%

Cannot perform function, because privileges are insufficient.

16

IPCUF%

Unknown function was specified.

17

IPCBJ%

Bad job number has been specified.

20

IPCPF%

PID table is full; new PIDs cannot be assigned at this time.

21

IPCPR%

Bit 19 was set in the flag word, but first packet was not a page or vice versa.

22

IPCIE%

Paging II 0 error.

23

IPCBI%

A bad index has been specified for system PID table.

24

IPCUI%

Undefined ID in system PID table.

(

Reserved.

25-67
70

IPCFU%

[SYSTEM] INFO has an unknown, internal error.

71

IPCCF%

[SYSTEM] IPCC request from [SYSTEM] INFO failed.

72

IPCFF%

[SYSTEM] INFO failed to complete a request to assign a PID or a name.

73

IPCQP%

The PID quota has been exceeded.

74

IPCBP%

Unknown PID has been specified; if [SYSTEM] INFO should crash and
restart, all existing PIDs will be lost.

75

IPCDN%

A duplicate name has been specified.

76

IPCNN%

An unknown name has been specified.

77

IPCBN%

The name specified has illegal characters. (Square brackets perhaps were
not used properly.)

15-12

(

Inter-Process Communication Facility

15.9 IPCF EXAMPLE

;EXAMPLE INITIALIZATION OF AY IPCF USER
,CALLED WITH A ~LOCK OF SIX WORDS FROM NAME
CONTAINING AN ASCIZ STRING TO BE
SIGNED UUT BY THIS PROCESS
IF ERHOR, NON-SKIP WITH Tl=ERHOH CODE
SKIP RETURN IF SUCC~SSFUL
IPCINI: PUSHJ
MOVEI
MOVEM
SETZM
MOVE

IPCFS,
POPJ

(

P, ,SAVE4##
T 1, , IPC 11
'£1, , NAME-2
NAME-l

:PRESERVE PI-4
,SIGN OUT UNTIL RESET
:SAVE AS FUNCTION
,CLEAR WHO WANTS ANSWER
T1,[4,,[0
:NO FLAGS
o
:SEND FHOM ME
o
:SEND TO [SYSTEM]INFO
"08" NAME-2]] : POINT TO ARGUMI;i;NT
,SEND REQUEST
:ERROR, GIVE UP WITH CODE IN 11

:NOW BLOCK AND WAIT FOR AN ANSWER
;NOTE, THAT JUNK MUST BE DISCARDED

(

INILP2: MOVE
MOVEI
MOVE
IPCFR,
POPJ
MOVE
LDB
CAIE
CAIN
CAlE
JRST
LOB
JUMPN
MOVE
MUVEM
JRST

Tl, [4"P1]
~POINT TO ARGUMENT BLOCK
Pi,o
J CLEAR fLAGS
P4,[-D8"DBLKJ
~POINT TO DATA
Tl,
:RECEIVE
P,
~GlVE UP IF FAIL RETURNING ERROR IN T1
Tl,DBLK
~GET FUNCTION CODE
T2,[POINT 3,Pl,32]
JGET SENDERPS CODE
T2"IPCCF ~SEE IF FROM 'SYSTEM (SYS'iEM]INFO
T2"IPCCP JOR IF FROM LOCAL [SYSTEM]INFO
Tl"IPCII :YES--SEE IF INFO NAME MATCH
INILP2
~NO--TRi AGAIN
Tl,[POINT 6,Pl,29J
;GET MESSAGE ER~OR CODE
Tl"POPJ##
1ERROR IF SET, RETURN TOCALL£R IN Tl
Tl,DBLK+l :GET PIO ASSIGNED
Tl,PIDUS ;SAVE FOR TRANSACTIONS
,POPJ1## ;GIVE OK RETURN

;ROUTINE TO IDENTIFx A RECEIVER
:CALLED WITH NAME Of RECEIVER IN SIX WORDS
FROM NAME IN ASCIZ
NON-SKIPS IF ERHOR WITH CODE IN 11
.GT,O IS IPCSER ERROR CODE
,
-1 IF RECEIVER UNKNUWN
~SKIP RI::TURNS WITH PIO IN PIDHIM
lDRCVR: PUSHJ
P"SAVE4#.
:PRESERVE PI-4
MOVE I
Tl"IPCIW :ASK wHO IS MOVE;M
Tl,NAME-2 ;SAVE AS FUNCTION
SETZM
NAME-l
;CLEAR WHO WANTS ANSWER
MOVE
Tl,[4"lO :LENGTH, NO FLAGS
o
:SEND FROM US
o
;SEND TO [SYSTEM]INFO
-D8, ,NAME-2]] :PUINT 10 ARGUMENT
IPCFS. T1,
;SEND REQUEST
POPJ,
:CAN'T SEND MESSAGE

.

(

IDRLP2: MOVE
MOVEl
MOVE
IPCfR,
POPJ

Tl,[4"PlJ
Pl,O
P4,l-08"DBLKJ
T1,
p,

~POINT TO ARGUMENT BLOCK
:CLEAR l"LAGS
:POIN'l' '1'0 DATA
;RECEIVE
:GIVE UP IF FAIL WITH ERROR IN T1

15-13

Inter-Process Communication Facility

MOVE
LDB
CAlE
CAIN
CAIE
JRS'f
LOB
JUMPN
SKIPN
GVERR$
MOVEM
JRS1'

Tl,DBLK
;GET fUNCtION CODE
T2,[POINT 3,Pl,32J
:GET 5ENDER'S CODE
T2"IPCCF ;5EE IF FROM SYSTEM [5YSTEMJINfO
T2"IPCCP JOR IF fROM LUCAL [SYSTEMJINFO
Tl"IPCIW ;SEE IF INFO NAME MATCH
JDRLP2
:NO--TR~ AGAIN
Tl,[POINT 6,Pl,29J
7ISOLAT~ ~RROR CODE
Tl"POPJ##
:IF SET, ERROR--RETURN IN T1
Tl,DBLK+l :GET PID ASSIGNED
-1
JIF NOT-SET, ERROR
Tl,PIDHIM :SAVE FOR TRANSACTIONS
.POPJ1## :GIVE OK RETURN

(

:ROUTINE TO SEND A MESSAGE OF 8 WURDS IN MSG
:IT-IS SENT TO THE PIO IN PIDHIM
:NON-SKIP ON ERROR WITH CODE IN T1
,SKIP IF OK
SNDMSG: MOVE

IPCFS,
POP,,]
JRST

Tl, [4" LIP.CFR

o

T1,
P,
,POPJ1##

:INDIRECR RECEIVER
rSEND FROM US
,SEND TO HIM
:POINT TO DATA

PIDHIM
-D8"MSB]]
:SEND
:ERROR--RETURN WITH CODE IN Tl
:GOOD

(

:ROUTINE TO BLOCK UNTIL A MESSAGE IS RECEIVED
:IT CAN HANDLE UP TO 8 WORDS, STORED IN MSG
:NON-SKIP RETURNS IF ERROR WITH ERROR IN T1
,SKIPS WITH T1=LENGtH AND WITH SENDER IN PIDHIM
RCVMSG: PUSHJ
MOVE
MOVEl
MOVE
IPCFR'
POPJ
MOVEM
HLRZ
JRS'l'

JPRESERVE Pl-4
:POINT to ARGUMENT BLOCK
~CLEAB fLAGS
:POINT TO DATA AREA
:BLOCK wAITING
p,
:ERROR, GIV~ UP WITh ERROR COOE IN Tl
P2,PIDHIM :STORE SENDI:;R
Tl,P4
,GET ACTUAL LENGTH
.POPJl ## ;GOOD RETURN

P"SAVE4U
'fl,[4"PIJ
Pl,O
P4, (~D8"MSG]
Tl,

;ROUTINE fO ISSUE A FATAL IPCr ERROR MESSAGE AND START OVER
:ENTERED wITH ERROR CODE IN Tl
IPCERR: MQVEM
TLNE
MOVE I
CAIL
CALLE
JRST
SUBl
JRST
IPCERl: CAlLE
JRST
IPCER2: OUTSTR
JRST

T2,Tl
,GET P05ITIVE FuRMAT
12,-1
;SEE IF STUFF IN LEFT HALF
Tl,O
~YES--CALL MUST NOT BE IMPLEM~NTED
Tl,INFERR ~SEE IF INFU ERROR
Tl,77
:(RANGE INFERR TO 77)
IPCERl
:ND--TRY NORMAL IPCf ERRORS
Tl,lNfERR-MAXERR-l
~YES--REMOVETAHLE OFFSET
IPCER2
:AND ISSUE MESSAGE
Tl,MAXERR ;SEE IF ERROR WE UNDERSTAND
UNKERR
:NO--GO HANDLE SEPARATELY
@ERRTBL(Tl)
:OUTPUT TEXI
FINERR
:fINISH UP

UNKERR: OUrSTR
PUSHJ

[ASCIZ \1 UNKNOWN IPC ERROR CODE \J
P"TOCTW##
~ISSUE iN OCTAL

FINERR: DUTSTR
\J
EXIT

[ASCIZ \

15-14

(

Inter-Process Communication Facility

1TABLE UF ERROR MESSAGES
DEFINE M(SMES),<
[ASCIZ \?$MES\J

>
M
ERRTBL: M
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M
M

(

UNKNOWN RECEIVER
IPCF NOT IMPLEMENTED
ADDRESS CHECK
BLOCK NOT LONG ENOUGH
NO PACKET IN QUEUE
PAGE IN USE
DATA TOO LONG FOR BUFFER
DESTINATION UNKNOWN
DESTINATION DISABLED
StNDING QUOTA EXCEEDED
RECEIVING QUOTA EXCEEDED
SYSTEM STORAGE EXCEEDED
UNKNOWN PAGE (SEND), EXISTING PAGE (RECEIVE)
INVALID SlNDEA
INSUFFICIENT PRIVILEGES
UNKNOWN FUNCTION
BAD JOB NUMBER
PID TABLE FULL
PAGE REQUESTED WITH NON-PAGE PACKET NEXT
M
PAGING 1/0 ERROR
MAXERR==, + %ODPRA

Table 18-8
LEVEL-D Parameters
(.GTLVD, GETTAB Table Number 16)
Item No.

Mnemonic

0

%LDMFD

The project-programmer number for UFDS only [1,1] .

1

%LDSYS

The project-programmer number for device SYS: [1,4] . (In 4-series
monitors [1,1] .

2

%LDFFA

The project-programmer number for FAILSAFE [1,2] .

3

%LDHLP

The project-programmer number of SYSTAT and HELP [2,5] .

4

%LDQUE

The project-programmer number for spooling programs [3,3] .

5

%LDSPB

Left Half:

The address of the first PPB.

Right Half:

The address of the next PPB to be scanned.

Left Half:

The address of the first file structure data block.

Right Half:

The relative address of the next file structure data blocks,
i.e., the address within the data block which points to the
actual address of the next data block.

6

7

10

%LDSTR

%LDUNI

%LDSWP

Contents

Left Half:

The address of the data block for the first unit in the
system.

Right Half:

The relative address of the data block for the next unit in
the system.

Left Half:

The address of the first unit for swapping in the system.

Right Half:

The relative address of the next unit for swapping in the
system.

11

%LDCRN

The number of 8-word core blocks for disk systems which were
allocated at ONCE-ONLY time.

12

%LDSTP

The standard file protection code (057), which can be changed by
individual installations. In 4-series monitors the standard protection
code is 055.

13

%LDUFP

The standard UFD protection code (775), which can be changed by
individual installations. In 4-series monitors, the standard UFD protection code is 055.
18-14

(

(

GETTABS

Table 18-8' (Cont.)
LEVEL-D Parameters
(.GTLVD, GETTAB Table Number 16)

(

Item No.

Mnemonic

14

%LDMBN

The number of monitor buffers allocated at ONCE-ONLY time. In
4-series monitors, the number of monitor buffers is one.

15

%LDQUS

The SIXBIT name of the file structure containing the UFD for spooling
and OMOUNT queues [3,3]. In 4-series monitors, this is DSK.:.

16

%LDCRP

The UFD used for storage of system crashes [10,1] .

17

%LDSFD

The maximum number of nested SFDs that the monHor allows to be
created at one time.

20

%LDSPP

The protection code for spooled output files (stored in bits 0-7).< <

21

%LDSYP

The standard protection code for files on SYS: (155) for those files
with an extension of .SYS.

22

%LDSSP

The standard protection code for files on SYS: with an extension of
.SYS (157).

23

%LDMNU

The maximum negative argument that can be supplied for USETI, which
reads extended RIBS.

24

%LDMXT

The maximum number of blocks transferred with one I/O operation
(Le., one 10WD). Normally this value is 100000, but it can be changed
at MONGEN to be smaller so that a job doing high priority disk I/O
will be locked out for a shorter period of time (since it can be locked
out for as long as the channel is busy).

25

%LDNEW

The project-programmer number foJ' experimental SYS:, [1,5] .

26

%LDOLD

The project-programmer number for the library of superseded programs,
[1,3] .

27

%LDUMD

The project-programmer number for user mode diagnostics, [6,6] .

30

%LDNDB

The default number of disk buffers in a buffer ring.

31

%LDMSL

The maximum units in the active swapping list.

32

%LDALG

The project-programmer number for the ALGOL library, [5,4].

33

%LDBU

The project-programmer number for the BUSS-lO library, [5,5].

34

%LDFOR

The project-programmer number for the FORTRAN library, [5,6] .

35

%LDMAC

The project-programmer number for the MACRO source library, [5,7] .

(

(

Contents

36

%LDUNV

The project-programmer number for the universal library , [5,17] .

37

%LDPUB

The project-programmer number for the public user software library,
[1,6] .

40

%LDTED

The project-programmer number for the text editor library, [5,10] .

41

%LDREL

The project-programmer number for the REL file library, [5,11] .

42

%LDRNO

The project-programmer number for the RUNOFF library, [5,12] .

43

%LDSNO

The project-programmer number for the SNOBOL library, [5,13] .

44

%LDDOC

The project-programmer number for the DOC file library, [5,14] .

45

%LDFAI

The project-programmer number for the FAIL library, [5,15].

46

%LDMUS

The project-programmer number for the music library, [5,16] .

18-15

GETTABS

Table 18-8 (Cont.)
LEVEL-D Parameters
(.GTLVD, GETTAB Table Number 16)
Item No.

Mnemonic

47

%LDDEC

The project-programmer number for standard DEC software, [10,7].

50

%LDSWP

The pointer to the active swap list.

51

%LDBAS

The project-programmer number for the BASIC library, [5,1].

52

%LDCOB

The project-programmer number for the COBOL library, [5,2].

53

%LDMXI

The project-programmer number for the PDP-II library, [5,3].

54

%LDNEL

The project-programmer number for the NELIAC library, [5,20].

55

%LDDMP

The project-programmer number for DUMP, [5,21] .

56

%LDPOP

The project-programmer number for POP2, [5,22].

57

%LDTDT

The project-programmer number for the TEST library, [5,23].

(

Contents

Tahle 18-9
GETTAB Immediate Word Entries
(.GTSLF, GFTTAB Table Number 23)

(

(

\..
Meaning

Bit(s)
0-8

The maximum item number in the table, if the table is indexed by item
number.

9-11

A code which identifies the type of table.
code

meaning

0

non included in this configuration (e.g., .GTVM in a
non-vm system)

1

index by item number

2

index by job number (maximum is given in the right
half of %CNSJN)

3

index by job number or segment number (maximum
is given in the left and right halves of %CNSJN)

4

index by job number (data in PDB)

14-17

A monitor AC number.

18-35

The executive mode address of the table if the code (bits 9-11) is 1, 2, or 3,
offset to PDB if code (in bits 9-11) is 4.

(
18-16

GETTABS

Table 18-10
Spooling Control Table
(.GTSPL, GETTAB Table Number 36)
Bit

Mnemonic

0-17

Input spooling me name (three characters).

24-26

JS.PRI

Disk priority.

27

JS.DFR

Deferred spooling (meaningful only in
GALAXY-l 0 systems, refer to the SET
SPOOL command).

28-30

(

Meaning

Unused.

31

JS.PCR

Card reader spooling.

32

JS.PCP

Card punch spooling.

33

JS.PPT

Paper-tape punch spooling.

34

JS.PPL

Plotter spooling.

35

JS.PLP

Line printer spooling.

Table 18-11
Time and Batch Status Table
(.GTLIM, GETTAB Table Number 40)

(
Bits

Mnemonic

0-9

JB.LCR

The core limit for the job.

10

JB.LBT

The job is a batchjob.

11

JB.LSY

The job was run from SYS:.

12-35

JB.LTM

The time limit to go in jiffies.

Meaning

18-17

GEITABS

Table 18-12
Hardware Status After A Crash
(.GTCRS, GETTAB Table Number 44)
Item No.

Mnemonic

0

CR.SAP

The APR CONI.

I

CR.SPI

The PI CONI.

2

CR.sSW

The APR DATAl switches.

(

Contents

3n

Reserved to Digital.

Table 18-13
System Wide Data Table
(.GTSYS, GETTAB Table Number 51)
Item No.

Mnemonic

0

%SYERR

1

%SYCCO

Obsolete.

2

%SYDEL

The count of unlogged hardware errors (error reporting disabled).

3

%SYSPC

Left Half:

A three letter name for the last STOPCD.

Right Half:

The address plus one of the last STOPCD.

Meaning
. The system wide hardware error count.

4

%SYNDS

The number of DEBUG STOPCDS.

5

%SYNJS

The number of job related STOPCDS.

6

%SYNCP

The number of commands processed.

7

%SYSJN

The job number related to the last STOPCD.

10

%SYSTN

The TTY name related to the last STOPCD.

11

%SYSPN

The program name related to the last STOPCD.

12

%SYSUU

The monitor call related to the last STOPCD.

l3

%SYSUP

The user pc related to the last STOPCD.

(

(

(
18-18

GETTABS

Table 18-14
CPUQ Control Data Block Constants Table l
(.GTCOC, GETTAB Table Number 55)

(
Item No.

a

Mnemonic
%CCPTR

Meaning
Left Half:

Pointer to the next control data block. If
this is the last CDB, the value of item
number a is zero.

Right Half:

Unused.

1

o/oCCSER

The APR serial number.

2

%CCOKP

The number of jiffies equal to the amount of time this CPU
has been stopped. If this value is less than or equal to zero,
the CPU is running o.k. If this value is greater than zero,
this CPU has stopped running correctly.

3

%CCTOS

The trap offset for KAlO interrupt locations (this value will
be either a or 100).

4

%CCLOG

The logical CPU name in SIXBIT (e.g., CPUN).

5

o/oCCPHY

The physical CPU name in SIXBIT (e.g., CPAN, CPIN,
CP6N).

6

%CCTYP

The type of processor (1 H is for customers; RH is for
Digital).
Value

Mnemonic

Meaning

1
2
3

.CC166
.CCKAX
.CCKIX
.CCKLX

PDP-6
KAlO processor
KIl a processor
KLlO processor

(

4
7

%CCMPT

The relative GETT AB pointer to the memory parity bad
address subtable.
bits 0-8
bits 18-35

(

are the maximum relative entry in the
subtable.
are the relative address of the first word in
the subtable.

10

%CCRTC

The device data block for the real-time clock (DKlO). If
the value of this word is zero, there is no real-time clock.

11

%CCRTD

The device data block for the real-time clock if there is to be
high precision run time accounting. If the value of this
word is zero, there is to be no high precision run time
accounting on this CPU.

12

%CCPAR

The relative GETTAB pointer to the memory parity subtable. The bit definitions for this word entry are the same
as for item number 7 (%CCMPT).

13

%CCRSP

The relative GETTAB pointer to the response subtable. The
bit definitions for this word are the same as for item
numbers 7 and 12.

lThe items within the table correspond to the items in the constants table for each processor (e.g., entries for
CPUl CDB constants are found in GETTAB table .GTCIC, table 57).

18-19

GETTABS

Table 18-15
CPUO Control Data Block Variable Table
(.GTCOV, GETTAB Table Number 56)
Item

Mnemonic

Meaning

5

o/oCVUPT

Uptime in jiffies for this CPU.

12

o/oCVLST

Last time in jiffies for this CPU.

14

o/oCVTPE

Total memory parity error words detected during all CPU sweeps on
this CPU while the processor was in exec or user mode. If the system
halts, this location has already'been updated.

15

%CVSPE

The total number of spurious memory parity errors detected on this
CPU (i.e., errors which did not reoccur when the CPU swept through
core). This can occur on a read-pause-write which rewrites memory
or on a channel-detected parity error not found on the sweep (refer
to item number 11 in table number 19-17).

16

%CVMPC

Multiple memory parity errors for this CPU. That is, the number of
times the operator pushed continue after a serious memory parity
halt. The left half of the word contains 1 if a serious error on this
bad parity (must halt). The left halt is cleared on a continue or
STARTUP.

17

o/oCVMPA

Memory parity address for this CPU. That is, the first bad physical
memory address found when the monitor swept through core after
the processor or channel detected the first parity error.

20

o/oCVMPW

Memory parity word for this CPU. That is, the contents of the first
bad word found by the monitor when it swept through core after
the processor channel detected the first bad parity error.

21

o/oCVMPP

Memory parity PC for this CPU. It is the PC of the last memory
parity (not counting the sweep through core).

27

%CVABC

Address break count on this CPU.

30

O/oCVABA

Address break address on this CPU.

31

%CVUR

The last job run on this CPU including the nulljob.

32-34

(

Obsolete. Refer to item numbers 20-23 in table number 19-16.

35

o/oCVSTS

Stop timesharing on this CPU. This item number contains the
number of the job that last performed the TRPSET monitor call.

36

o/oCVRUN

Operator-controlled scheduling for this CPU (OPSER:SET RUN
command).
bit 0

(CV%RUN)

=1

(

(
"-

(

indicates that jobs are not to be run
on this CPU.

37

O/oCVNUL

Null time (in jiffies) for this CPU.

40

o/oCVEDI

LH

= exec PC so that offending instruction can be corrected.
RH = number of exec "do not care" interrupts (i.e., user enabled
apr interrupts which monitor causes (AOV, FOV).

41

o/oCVJOB

Current number of the job running on this CPU (0 is the null job).

42

o/oCVOHT

Overhead time (in jiffies) for this CPU. This value includes clock
queue processing, short command processing, swapping and scheduling decisions, and software context switching. This value does not

18-20

!

.,

e

GETTABS

Table 18-15 (Cont.)
CPUO Control Data Block Variable Table
(.GTCOV, GETTAB Table Number 56)

(
Item

Meaning

Mnemonic

include monitor call execution or I/O interrupt times, since these
times are not considered overhead.

(

43

%CVEVM

KIlQ/KLlQ only. The maximum amount of exec virtual address
space to be used for mapping user segments on a LOCK monitor call.

44

o/oCVEVU

KLlO/KIIQ only. The current amount of exec virtual address space
being used for mapping user segments on a LOCK monitor call.

45

o/oCVLLC

On a dual-processor system, the count of the number of times a CPU
has looped in the CPU interlock while waiting for it to be relinquished
by the second CPU.

46

o/oCVTUC

The total number of monitor calls executed on this CPU from exec
and user mode.

47

o/oCVTJC

The total number of job context switching switches from one job to a
a different job, including the nulljob, on this CPU.
Table 18-16
Response Sub table

Item No.

(

,

Mnemonic

Use

Q

%CVRSO

Accumulated TTY output for monitor call responses. This is the total
number of jiffies users have spent waiting for their jobs to do a TTY
output (on CPUQ) after either a command was issued which ran a job
Cir terminal input was given that removed the job from a TTY input
wait state.

1

o/£VRNO

The number of TTY output monitor call responses for this CPU.

2

o/£VRHO

The high-order sum of the squares of TTY output for monitor call
responses. This value is used for computing the standard deviation.

3

o/oCVRLO

The low-order part of the sum of the squares of TTY output for
monitor call responses.

4

o/£VRSI

The accumulated TTY input monitor call responses for this CPU. This
is the total number of jiffies users have spent waiting for their jobs
to do a TTY input monitor call (on CPUQ) after either a command was
issued that ran a job or terminal input was given that removed the job
from a TTY input wait state.

5

o/£VRNI

The number of TTY input monitor call responses for this CPU.

6

o/£VRHI

The high-order sum of the squares of TTY input monitor call responses.
This value is used for computing the standard deviation.

7

%CVRLI

The low-order part of the sum of the squares of TTY input monitor
call responses.

10

o/£VRSR

The accumulated CPU quantum requeue responses. This is the total
number of jiffies users have spent waiting for their jobs to exceed the
CPU quantum on this CPU after either a command was issued that run
ajob or terminal input was received that removed the job from a TTY
input wait state.

~

(
\

18-21

GETTABS

Table 18-16 (Cont.)
Response Subtable

(

Item No.

Mnemonic

11

%CVRNR

The number of CPU quantum requeue responses for this CPU.

12

o/oCVRHR

The high-order sum of the squares of CPU quantum requeue response.
Used for computing standard deviation.

13

o/oCVRLR

The low-order part of the sum of the squares of CPU quantum requeue
response.

14

o/oCVRSX

The accumulated response terminated by the first occurrence of one of
the above three events (TTY output, TTY input, or CPU quantum
requeue).

15

o/oCVRNX

The number of such responses in %CVRSX.

16

%CVRHX

The high-order sum of the squares of responses in o/oCVRSX. This is
used for computing the standard deviation.

17

o/oCVRLX

The low-order part of the sum of squares of responses in o/oCVRSX.

20

o/oCVRSC

The accumulated response on this CPU. The total number of jiffies that
users spent waiting for their jobs to run after either a command was
issued which ran ajob or terminal input was supplied that removed the
job from a TTY input wait state.

21

o/oCVRNC

The number of CPU responses for all users waiting for their jobs to run.
Dividing this value into the value of %CVRSC gives the average response
time since the system was started.

22

%CVRHC

The high-order part of the sum of the squares of CPU responses on this
CPU.

23

o/oCVRLC

The low-order part of the sum of the squares of CPU responses of this
CPU.

Use

(

(

Table 18-17
Parity Sub table
Item No.

Mnemonic

Use

00

%CVPLA

Highest bad memory parity address on last sweep of memory. Used to
tell operator the range of bad addresses.

1

o/oCVPMR

Relative address (not virtual address) in the high or low segment of
the last memory parity error.

2

%CVPTS

Number of parity errors on the last sweep of core. Set to 0 at beginning of the sweep.

3

o/oCVPSC

Number of parity sweeps by the monitor.

4

%CVPUE

Number of user-enabled parity errors.

5

o/oCVPAA

The and of bad addresses on the last memory parity sweep.

6

%CVPAC

The and of bad contents on the last memory parity sweep.

7

%CVPOA

The or of bad addresses on the last memory parity sweep.

10

O/OCVPOC

The or of bad contents on the last memory parity sweep.

11

o/oCVPCS

Number of spurious parity errors. (The APR sweep found no bad parity
but the channel had requested the sweep rather than the processor).
This indicates a channel memory port problem.
18-22

(

(

GETTABS

Table 18-18
Feature Table
(.GTFET, GETTAB Table Number 71)

(

Item No.

Mnemonic

Bit

Meaning

0

%FTUUO

22
23
24
25
26
27
28
29
30
31
32
33
34
35

Enqueue/DEQUEUE is implemented (F%EGDG).
Galaxy-lO features are implemented (F%GALA).
PSISER is implemented (F%PI).
IPCF is implemented (F%IPCF).
CTRL/C intercept (F%CCIN).
JBTSTS and CTLJOB monitor calls are implemented (F%PTYU).
PEEK monitor call is implemented (F%PEEK).
POKE. monitor call is implemented (F%POKE).
Job continue (F%JCON).
Spooling is supported (F%SPL).
Job privileges are supported (F%PRV).
DAEMON is supported (F%DAEM).
GETTAB exists (F%GETT).
System has 2-register relocation (F%2REL);

1

%FTRTS

Real time and scheduler features

(

2

%FTCOM

(

25
26
27
28
29
30
31
32
33
34
35

6.02 (and later) scheduler is implemented (F%NSCH).
System has virtual memory (F%VM).
Swapper is implemented (F%SWAP).
Shuffler is implemented (F%SHFL).
DKlO service is implemented (F%RTC).
The LOCK monitor call is implemented (F%LOCK).
The TRPSET monitor call is implemented (Fo/oSLEE).
Real-time traps are implemented (F%RTTR).
The sleep monitor call is implemented (F%SLEE).
The HIBER and WAKE monitor calls are supported (F%HIBW).
High priority queues are supported (F%HPQ).

20
21
22
23
24
25
26
27
28
29

SAVE and SSAVE commands will create .EXE files (F%EXE).
Memory can be set off-line (F%MOFF).
Memory can be set on-line (F%MONL).
COMPIL commands are implemented (F%CCL).
COMPIL-class command are implemented (F%CCLX).
Queue is implemented (F%GCOM).
SETUUO and SET command are implemented (F%SET).
VERSION command is implemented (F%VERS).
Batch control file commands are implemented (F%BCOM).
SET DAYTIME and SET DATE commands are implemented
(F%SEDA).
WATCH command has been implemented (F%WATC).
FINISH and CLOSE commands have been implemented (F%FINI).
REASSIGN command has been implemented (F%REAS).
E and D commands have been implemented (F%EXAM).
SEND has been implemented (F%TALK).
ATTACH has been implemented (F%ATTA).

30
31
32
33
34
35
3

%FTACC

Accounting information
31
32

I

Time and core limits (F%TLIM).
Charge number (F%CNO).

18-23

GETTABS

Table 18-18 (Cont.)
Feature Table
(.GTFET, GETTAB Table Number 71)
Item No.

Mnemonic

4

%FTERR

%FTDEB

%FTSTR

%FTDSK

System has a two segment monitor (F%2SEG).
Response time measurement (F%RSP).
Why reload code (F%WHY).
Patch space left in table (F%PATT).
Back-tracking information left in common (F%TRAC) ..
Monitor halts on error (F%HALT).
Redundancy checking for internal errors (F%CHK).
Monitor is write-protected (F%MONP).
Monitor check summing (Fo/oCHEC).

(

File structure parameters.
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

7

NXM error recovery codes (F%MNXM).
System is a KLlO (F%KLlO).
System is a KA10 (F%KAlO).
22 bit channel, DF10C (F%22BI).
'Swapping process data block (F%PDBS).
KIlO features at startup time (F%KIlO; always since 5.06).
METER. monitor call is supported (F%METR).
Execute-only files (F%EXON).

Debugging features.
27
28
29
30
31
32
33
34
35

6

User name (F%UNAM).
Kilo-core ticks accumulation (F%KCT).
Run-time computation (F%TIME).

Error Control and internal options
22
23
24
25
26
27
28
29

5

Meaning

Bit
33
34
35

(

System has high availability features (F%DHIA).
System has multiple access update feature (F%DSIM).
NUL device (F%NUL).
LIB/SYS/NEW (F%LIB).
Disk priority transfers (F%DPRI).
Append to last block (F%APLB).
Append implies read (F%AIR).
Generic device search (F%GRSC).
Rename cross directories (F%DRDR).
SEEK monitor call is supported (F%DSEK).
Super useti/useto are supported (F%DSUP).
Disk quotas (F%DQTA).
Multiple file structures (F%STR).
5-series monitor calls (F%5UUO).
Physical-only i/o (F%PHYO).
Sub-file directories (F%SFD).
STRUUO functions (F%MOUN).

Internal disk parameters
19
20
21
22

Debug search list code (F%SLCK).
Two-part access blocks (F%2ATB).
DEBUG CB interlock (F%CBDB).
LOGIN system (F%LOGI).

18-24

(

GETTABS

Table 18-18 (Cont.)
Feature Table
(.GTFET, GETTAB Table Number 71)
Item No.

Mnemonic

Bit
23
24
25
26
27
28
29
30
31
32
33
34
35

10

%FTSCN

11

%FTPER

Disk system (F%DISK).
Race-condition prevention in filfnd (F%FREE).
Swap read error recovery (F%SWPE).
Bad block marking (F%DBBK).
UFD compressor (F%DUFC).
Disk error simulation (F%DETS).
Extended ribs supported (F%DMRB).
Smaller allocation for disk core blocks (F%DSMC).
Allocation optimization (F%DALC).
Disk usage statistics (F%DSTT).
Hung disk recovery (F%DHNG).
Disk off-line recovery (F%DBAD).
Latency optimization (F%DOPT).

Scanner options.
22
23
24
25
26
27
28
29
30
31
32
33
34
35

(

Meaning

2741 on a DCI0 is supported (F%DCXH).
Unusual vertical positioning is allowed (F%TVP).
TYPESET-lO features in DC76 (F%TYPE).
2741-like terminals supported (F%2741).
DC76 (F%CAFE).
TTY BLANK command is supported (F%TBLK).
Page and display knowledge (F%TPAG).
Automatic dialer supported (F%DT AL).
Special line control (F%SCLC).
Hardware scanner (DClOor DC8 (F%SCNR).
Modem control (F%MODM).
Single scanner (F%630H).
U.K. modem supported (F%GP02).
Real half-duplex terminals (F%HDPX).

I/O parameters
23
24
25
26
27
28
29
30
31
32
33
34
35

System supports DAS 78.
System supports DA28-C networks.
MSGSER implemented mpx device (F%MSGS).
High-speed logical device search (F%HSLN).j
CDP trouble intercept (F%CPTR).
CDR trouble intercept (F%CRTR).
CTYL supported (F%CTYL).
Remote station supported (F%REM).
LPT error recovery (F%LPTR).
Device errors to operator (F%OPRE).
CDR super-image mode (F%CDRS).
MTA density and buffer size (F%MTSE).
TMPCOR area (F%TMP).

18-25

GETTABS

Table 18-19
Scanner Table
(.GTSCN, GETTAB Table Number 73)
Item No.·

Mnemonic

(
Use

0

%SCNRI

Number of RCV interrupts.

1

%SCNXI

Number of XMT interrupts.

2

%SCNEI

Number of echo interrupts.
(subset of o/oSCNXI).

3

%SCNMB

Maximum buffer size.

4

o/oSCNAL

Number of active lines.

Table 18-20
SEND-ALL Text
(.GTSND, GETTAB Table Number 74)

(
Use

Item No.

Mnemonic

0

o/oSCNAE

Byte pointer to the end byte in the message.

1

o/oSCNAS

Byte pointer to the first byte In the message.

2

%SCBAN

First word of data in the message.

Table 18-21
IPCF Miscellaneous Data
(.GTIPC, GETTAB Table Number 77)
Item No.

(
Use

Mnemonic

0

%IPCML

Maximum packet length.

1

%IPCSI

PIO of system-wide [SYSTEM] INFO.

2

%IPCDQ

Default quota.

3

%IPCTS

Total number of packets sent.

4

%IPCTO

Total number of packets outstanding.

5

%IPCCP

PIO of [SYSTEM] IPCC.

6

%IPCPM

PIO mask.

7

%IPCMP

Length ofPIO table.

10

%IPCNP

Number of PIO's now defined.

11

%IPCTP

Total number of PIO's defined since reload.

Table 18-22
IPCF Statistics Per Job
(.GTIPA, GETTAB Table Number 104)
Bit(s)

Mnemonic

Use

18-35

IP.CGC

Count of receives since LOGIN.

1-17

IP.CQD

Count of sends since LOGIN.

18-26

GETTABS

(

Table 18-23
IPCF Flags and Quotas
(.GTIPQ, GETTAB Table Number 107)

I

Use

Bit(s)

Mnemonic

0

IP.CQX

Quotas disabled.

1

IP.CQQ

Quota has been set.

18-26

IP.CQS

Send quota.

27-35

IP.CQR

Receive quota.

Table 18-24
General Virtual Memory Data
(.GTVM, GETTAB Table Number 113)

(

(

Item No.

Mnemonic

0

%VMSWP

Swap count.

1

%VMSCN

Scan count.

2

%VMSIP

Count of swaps in progress.

3

%VMSLE

Count of swap list entries.

4

%VMTTL

Total virtual memory in use.

5

%VMCMX

Maximum value of %VMTTL allowed.

6

%VMRMX

Paging rate max for system.

7

%VMCON

Constant used in swap rate computation.

10

%VMQJB

Job to requeue to PQV (-1 if all).

11

%VMRMJ

Paging rate maximum per job.

12

%VMTLF

Time of last fault.

13

%VMSPF

System page fault counts:

Use

Ih=not in working set.
rh=in working set.

f

{
'--

14

%VMSWI

Address ofSWPlST.

15

%VMSW2

Address of SW21 ST .

16

%VMSW3

Address of SW31 ST.

18-27

GETTABS

(

Table 18-25
Scheduler Statistics
(.GTSST, GETTAB Table Number 115)
Item No.

Mnemonic

Use

0

%SSOSO

The number of the job which was run out
of order in order to allow that job to give
up a resource for swap out.

1

%SSORJ

The number of jobs which were run out
of order in order to have them give up a
resource required to run another job.

2

%SSNUL

The amount of swapper null time.

3

%SSLOS

The amount of swapper lost time.

4

%SSRQC

The total number of requeues.

5

%SSICM

The interval of time required to compute
minimum core utilization.

6

o/oSSMSI

The medium term scheduling interval.

7

o/oSSAJS

The average job size.

10

%SSTQT

The total quota time.

11

%SSEAF

The exponential averaging factor.

12

%SSEAT

Exponentially averaged user time.

13

%SSRSS

The total user run time since the last
SCHED. monitor call.

(

(

Table 18-26
Special PID Table
(.GTSID, GETTAB Table Number 126)
Item No.

Mnemonic

Use

0

%SIIPC

PID for [SYSTEM] IPCC.

1

%SIINF

PID for [SYSTEM] INFO.

2

%SIQSR

PID for [SYSTEM] QUASAR.

3

%SIMDA

PID for the mountable device allocator.

4

%SITLP

PID for the magtape labeling process.

(

(
18-28

GETTABS

Table 18-27
ENG./DEQ. Statistics
(.GTENQ, GETTAB Table Number 127)
Item No.

Mnemonic

Use

0

%EQMSS

The maximum string size.

1

%EQNAQ

The number of active queues.

2

%EQESR

The total number of ENQ.S since reload.

3

%EQDSR

The total number of DEQ.S since reload.

4

%EQAPR

Active pooled resources.

5

%EQDEQ

The default ENQ. quota.

(

(

(

18-29

(

(

(

APPENDIX A
COMPARISON OF DISK DEVICES

Table A-I
Disk Devices
RP02

RP03

RP04

RHS04

Disk Drive Capacity

5.12 million words

10.24 million words

20.48 million words

256K words

Transfer Rate

15/-ls/word

15/-ls/word

5.6/-ls/word

4.0/-ls/word

Track-to-track

12 msec

7.5 msec

7 msec

Average

35 msec

29 msec

28 msec

8.5 msec

Maximum

60 msec

55 msec

50 msec

8.5 msec

Access Time:
0

Organization:

(

128 words/sector

128 words/sector

128 words/ sector

128 words/sector

10 sectors/track

10 sectors/track

20 sectors/track

64 sectors/track

20 tracks/cylinder

20 tracks/cylinder

19 tracks/ cylinder

64 tracks/drive

200 cylinders/pack 400 cylinders/pack

411 cylinders/pack

Number of Heads

20

20

19

64

Number of Recording Surfaces

20

20

19

1

Number of Disks

11

11

12

1

Number of Drives/
Controller

8

8

8

8

Number of Drives/
System

32

32

32

16

Maximum Storage/
System

0.98 billion
characters

1.96 billion
characters

A-I

3.92 billion
characters

12 million
characters

(

(

(

(

(
APPENDIX B
COMPARISON OF MAGNETIC TAPE SYSTEMS
Table B-1
Magnetic Tape Systems

Tape Speed

TUlOA-E

TUlOA-F

45 ips

45 ips

TU40
150 ips

TU41
150 ips

TU70
200 ips

TUn
200 ips

Transfer Rate at:

/

220 bpi

9 K chari
sec

9 K chari
sec

556 bpi

25 K chari
sec

25 K chari
sec

800 bpi

36 K chari
sec

36 K chari
sec

"

1600 bpi

(

-

Recording Technique

NRZI

Nominal InterRecord Gap:
9-track

0.6 inches

7-track
Rewind Time
(2400 ft)

-

195 seconds

30 K chari
sec

83.4 K chari 83.4 K chari
sec
sec
120 K chari
sec

-

NRZI

-

-

NRZI

0.6 inches

0.75 inches
195 seconds

30 K chari
sec

-

66 seconds

(
B-1

120 K chari
sec
-

NRZI

-

0.75 inches
66 seconds

-

40 K chari
sec

-

111.2 K chari
sec

160 K chari
sec
320 K chari
sec
PE/NRZI

0.6 inches
-

45 seconds

160 K chiLrl
sec
-

. NRZI

-

0.75 inches
45 seconds

(

(

(

(

APPENDIX C
CARD AND TAPE CODES
Table C-l
ASCII Card Codes
ASCII
Character

(

Octal
Code

Card
Punches

ASCII
Character

Octal
Code

Card
Punches

NULL

00

12-0-9-8-1

@

100

8-4

CTRL-A

01

12-9-1

A

101

12-1

CTRL-B

02

12-9-2

B

102

12-2

CTRL-C

03

12-9-3

C

103

12-3

CTRL-D

9-7

D

104

12-4

CTRL-E

04
05

0-9-8-5

E

105

CTRL-F

06

0-9-8-6

F

106

12-5
12-6

CTRL-G

07

0-9-8-7

G

107

12-7

CTRL-H

10

11-9-6

H

12-8

TAB

11
12

12'9-5

I

110
111

K

FF

13
14

0-9-5
12-9-8-3
12-9-8-4

J
L

112
113
114

CR

15

12-9-8-5

M

115

11-2
11-3
11-4

CTRL-N

16

12-9-8-6

N

116

11-5

CTRL-O

17

12-9-8-7

0

117

11-6

CTRL-P

20

12-11-9-8-1

P

120

11-7

CTRL-Q

21

11-9-1

Q

121

11-8

CTRL-R

22

11-9-2

R

122

11-9

CTRL-S

23

11-9-3

S

123

0-2

CTRL-T

24

9-8-4

T

124

CTRL-U

25

9-8-5

U

125

0-3
0-4

CTRL-V

26

9-2

V

126

0-5

CTRL-W

27

0-9-6

W

127

0-6

CTRL-X

30

11-9-8

X

130

0-7

CTRL-Y

31

11-9-8-1

Y

0-8

CTRL-Z

32

9-8-7

Z

131
132

ESCAPE

33
34

0-9-7
11-9-8-4

1

LF
VT

CTRL-\

\

C-l

133
134

12-9
11-1

0-9
12-8-2
0-8-2

Card and Tape Codes

(

Table C-1
ASCII Card Codes (Cont.)
ASCII
Character
CTRL-]

Octal
Code
35

Card
Punches

ASCII
Character

Octal
Code

Card
Punches

11-9-8-5

]

135

11-8-2

-

136

11-8-7

-

137

0-8-5

\-

140

8-1

CTRL--

36

11-9-8-6

CTRL-_

37

11-9-8~7

SPACE

40

!

41

12-8-7

a

141

12-0-1

"
#

42

8-7

b

142

12-0-2

43

8-3

c

143

12-0-3

$

44

11-8-3

d

144

12-0-4

%

45

0-8-4

e

145

12-0-5

&

46

12

f

146

12-0-6

,

47

8-5

g

147

12-0-7

(

50

12-8-5

h

150

12-0-8

)

51

11-8-5

i

151

12-0-9

*

52

11-8-4

j

152

12-11-1

+
,

53

12-8-6

k

153

12-11-2

54

0-8-3

1

154

12-11-3

-

55

11

m

155

12-11-4

56

12-8-3

n

156

.12-11-5

/

57

0-1

0

157

12-11-6

0

60

0

p

160

12-11-7

1

61

1

q

161

12-11-8

2

62

2

r

162

12-11-9

3

63

3

s

163

11-0-2

4

64

4

t

164

11-0-3

5

65

5

u

165

11-0-4

6

66

6

v

166

11-0-5

7

67

7

w

167

11-0-6

8

70

8

x

170

11-0-7

9

71

9

y

171

11-0-8

72

8-2

z

172

11-0-9

,

73

11-8-6

[

173

12-0

<

74

12-8-4

174

12-11

=

75

8-6

175

11-0

>

76

0-8-6

I
}
{

176

11-0-1

?

77

0-8-7

DEL

177

12-9-7

C-2

(

(

(

. L

(

Card and Tape Codes

NOTE
The ASCII character ESCAPE (octal 33) is also CTRL- [ on
a terminal.

(

The ASCII characters and (octal 17 5 and 176) are treated
by the monitor as ALT-MODE and are often considered
the same as ESCAPE.
Table C-2
ASCII Codes and BCD Equivalents
Character

(

(

Character
Symbol

ASCII

Symbol

BCD

-ASCII

040
041
042
043
044
045
046
047

blank

20
52
17
32
53
77
35
14

074
075
076
077

<

100
101
102
103
104
105
106
107

@

!

"
#
$

%
&

,

050
051

(

052
053
054
055
056
057

*

060
061
062
063
064
065
066
067
070
071
072
073

)

+
,

/
0
I

2
3
4
5
6
7

34
74
54
60
33
40
73
21

110
111
112
113
114
115
116
117

12
01
02
03
04
05
06
07

8

10

9

11

,

15
56

120
121
122
123
124
125
126
127

(
C-3

=

>
?

A
B
C

D
E
F
G
H
I
J

K
L
M

N
0

P

Q
R
S
T
U
V

W

BCD

76
13
16
72
57
61
62
63
64
65
66
67
70
71
41
42
43
44
45
46
47
50
51
22
23
24
25
26

(

"

(

(

APPENDIX D
COMPARISON OF TERMINALS

Each DECsystem-lO is capable of supporting 511 interactive terminals. A wide variety of EIA and 20 rnA Current
Loop compatible terminals is supported by the DEC system. The principle characteristics of some of these terminals
is shown in Table D-l.
Table D-I
Terminals
Hard Copy

LA30

LA36

Speed

110-300 baud

110-300 baud

Form width

80 columns

132 columns

9 7/8 inches wide

3 to 147/8 inches wide

Form types

1 part only

Up to 6 part

Character set

128-character keyboard

128-character keyboard

64-character output

96-character output

Upper case only

Upper & lower case

Character generation

5x7 dot matrix

7x7 dot matrix

Options

None

Work Surface
Paper stacking tray

CRT

VT05

VT50

Speed

110-2400 baud

75-9600 baud

Character/Line

72

80

Lines/Screen

20

12

Character Set

128-character keyboard

64-character keyboard

64-character output

64-character output

Upper case only

Upper case only

5x7 dot matrix

5x7 dot matrix

Character Generation

D-1

(

(

(

(
APPENDIX E
ERROR CODES

The error codes in Table E-1 are returned in AC on RUN and GETSEG monitor calls, in the right half of location
E + Ion 4-word argument blocks of LOOKUP, ENTER, and RENAME monitor calls, and in the right half of
location E + 3 on extended LOOKUP, ENTER, and RENAME monitor calls.
Table E-!
Error Codes

(

Symbol

Code

ERFNF%

0

File not found, illegal filename (0,*), filenames do not match (UPDATE),
or RENAME after a LOOKUP failed.

ERIPP%

1

UFD does not exist on specified file structures. (Incorrect projectprogrammer number.)

ERPRT%

2

Protection failure or directory full on DT A.

ERFBM%

3

File being modified (ENTER, RENAME).

ERAEF%

4

Already existing filename (RENAME), different filename (ENTER after
LOOKUP) or supersede (on a non-superseding ENTER).

ERISU%

5

Illegal sequence of monitor calls (RENAME with neither LOOKUP nor
ENTER, or LOOKUP after ENTER).

ERTRN%

6

L Transmission, device, or data error (RUN, GETSEG only).

Explanation

2. Hardware-detected device or data error detected while reading the
UFD RIB or UFD data block.
3. Software-detected data inconsistency error detected while reading
the UFD RIB or file RIB.

(

(

ERNSF%

7

Not a saved file (RUN, GETSEG only).

ERNEC%

10

Not enough core (RUN, GETSEG only).

ERDNA%

Devicy not available (RUN, GETSEG only).

ERNSD%

11
12 .

ERILU%

13

Illegal monitor call (GETSEG only). No 2-register relocation capability.

ERNRM%

14

No room on this file structure or quota exceeded (overdrawn quota not
conSidered).

ERWLK%

15

Write-lock error. Cannot write on file structure.

ERNET%

16

Not enough table space in free core of monitor.

ERPOA%

17

Partial allocation only.

ERBNF%

20

Block not free on allocated position.

ERCSD%

21

Cannot supersede an existing directory (ENTER).

ERDNE%

22

Cannot delete a non-empty directory (RENAME).

ERSNF%

23

Sub-directory not found (some SFD in the specified path was not found).

No such device (RUN, GETSEG only).

E-1

•

Error Codes

Table E"1 (Cont.)
Error Codes
Symbol

Code

Explanation

ERSLE%

24

Search list empty (LOOKUP or ENTER was performed on generic device
DSK and the search list is empty).

ERLVL%

25

Cannot create a SFD nested deeper than the maximum allowed level of
nesting.

ERNCE%

26

No file structure in the job's search list has both the no-create bit and
the write-lock bit equal to zero and has the UFD or SFD specified by
the default or explicit path (ENTER on generic device DSK only).

ERSNS%

27

GETSEG from a locked low segment to a high segment which is not a
dormant, active, or idle segment. (Segment not on the swapping space.)

ERFCU%

30
31
32

The file cannot be updated.

ERLOH%
ERNLI%

(

The low segment overlaps the high segment (GETSEG).

(

The user is not logged in (RUN).

(

?,

E-2

APPENDIX F
DECSYSTEM-IO AT-A-GLANCE

Table F-l
DECsystem-l0

1040

{
\

1055*

1050

1060

1070

1077*

1080

Relative Performance

1

1.5

2.8

2.5

3.5

6.5

5.0

Avg. Number of Users

5-15

10-40

20-70

20-60

30-80

40-100

40-100

No.ofCPUs

1

1

2

1

1

2

1

Memory Size in Kwords
(min.-max) (K-1024)

64-256

64-256

128-256

128-4096

128-4096

128-4096

128-4096

No.ofInstructions:

366

366

366

378

378

378

386

Instruction Look-ahead

No

No

No

Yes

Yes

Yes

Yes

Virtual Memory

No

No

No

Yes

Yes

Yes

Yes

Memory Interleaving

2or4
way

2 or 4
way

2 or 4
way

2or4
way

2 or 4
way

2or4
way

2 or 4
way

Index Registers

15

15

15 each
CPU

4x 15

4 xiS

4 xIS
each
CPU

8 xiS

Accumulato'rs

16

16

16 each
CPU

4x 16

4x 16

4x 16
each
CPU

8 x 16

Fixed Point Add

2.8

2.8

2.8

1.5

1.5

1.5

0.7

Fixed Point Multiply

9.8

9.8

9.8

4.1

4.1

4.1

2.4

Jump

1.5

1.5

1.5

1.1

1.1

1.1

0.5

Single Precision
FloatingPoint Add

9.8

9.8

9.8

3.6

3.6

3:6

1.9

Double Precision
Floating Point Add

59.4

59.4

59.4

7.6

7.6

7.6

5.0

I/O Bus Band width
(words/ second)

200K

200K

200K

370K

370K

370K

370K

Memory Bus Band width
(words/ second)

4000K

4000K

4000K

4000K

4000K

4000K

4000K

Instruction Times
(microseconds)

(

* Dual-processor systems execute two instructions simultaneously.

F-l

(

(

(

\

(
APPENDIX G
MEMORIES

Table G-l
Core Memories

,.

(

MDlO

MElO

MFlO

Word Size

36 bits plus parity

36 bits plus parity

36 bits plus parity

Minimum Memory Size

64K

16K

32K

KAlO

256K

256K

256K

KIlO

256K

256K

1024K

-

1024K

Maximum Memory Size

KLlO

-

Module Sizes

(

16K words

No·

Yes

No

32K words

Yes

No

Yes

64K words

Yes

No

Yes

Typical

800ns

550 ns

550 ns

Maximum

880 ns

610 ns

610 ns

Cycle Time

1.81ls

LOlls

950 ns

Interleaving

2 or 4 way

2 or 4 way

2or4way

External Only

External Only

External Only

Read Access Time

(
G-1

(

(

(

'(

!

(

.
APPENDIX H
FILE RETRIEVAL POINTERS

Sequential and random file access are handled more efficiently by the monitor if all the information describing the
file can be kept in core at once. To understand this effect, it is necessary to know how the monitor accesses files.
With each named file, UFD, and MFD, the monitor writes a special block containing necessary information needed to
retrieve the data blocks that constitute the file. This block is called a retrieval information block, or RIB.

(

Retrieval pointers in the RIB describe contiguous blocks of file storage space called groups. Each pointer occupies
one word and has one of three forms:
1.
2.
3.

A group pointer
An EOF pointer
A change of unit pointer.

H.t A GROUP POINTER
A group pointer has three fields:
1.

(

2.
3.

A cluster count
A folded checksum
A cluster address within a unit. The width of each field maybe specified at ONCE-only time; therefore,
the same code can handle a wider variety of sizes of devices.

The cluster count determines the number of consecutive clusters that can be described by one pointer. The folded
checksum is computed for the first word of the first block of the group. Its main purpose is to catch hardware or
software errors when the wrong block is read. The folded checksum is not a check on the hardware parity circuitry.
The size of the--cluster address field depends on the largest unit size in the file structure and on the cluster size. A
cluster address is converted to a logical block address by multiplying the number of blocks per cluster.

(

H.l.t Folded Checksum Algorithm
This algorithm takes the low order n-bit byte, repeatedly adds it to the upper part of the word, and then shifts. The
code is:
LOOP: ADD
LDB
LSH
JUMPN
DONE

Tl,T
T,LOW ORDER N BITS OF Tl
Tl,-N
,RIGHT SHIFT BYN BITS
Tl,LOOP
,ANSWERINT

This scheme eliminates the usual overflow problem assosicated with folded checksums and terminates as soon as
.there are no more bits to add.
H.2 END-OF-FILE POINTER
The EOF is indicated by a zero word.

(
H-l

File Retrieval Pointers
H.3 CHANGE OF UNIT POINTER
A file structure may comprise more than one unit; therefore, the retrieval information block must indicate which unit
the logical block is on .. Because a me can start on one device and move to another, a method of indicating a change
from one unit to another in the middle of the me is necessary. To show this moveinent, a zero count field indicates
that the right half of the word specifies a change in unit. A zero count field contains a unit number with respect to
the me structure. The first retrieval pointer, with respect to the RIB, always specifies a unit number. Bit 18 is 1 to
guarantee that the word is non·zero; otherwise, it might be confused with an EOF pointer.

(

H.4 DEVICE DATA BLOCK
The monitor keeps a copy of up to six retrieval pointers in core at once. Therefore, if a me is allocated in six or less
contiguous blocks (i.e.; described in six or less pointers), all of the retrieval information can be keptin core and no
additional accesses to the RIB are necessary.
H.5 ACCESS BLOCK
For each active me, the monitor keeps eight words of storage called an access block. These access blocks remain
dormant in monitor core after a file is closed and are reclaimed only when the core space is needed. Therefore, if
a 4·word LOOKUP is done after afile has been active, access to the UFD and RlS-blocks will not require I/O.

(

(

H-2

(

APPENDIX I
DATA COMMUNICATIONS

Table 1-1
Communication Systems

Number
supported
by
standard
software

Maxi
mum
number
of lines Maxiper
mum
DECsys- throughtem-lO
put

DClO
Data Line
Scanner

1

128

3000
chars/sec

up to
2400
baud

full duplex; yes
full duplex
with local
copy; half
duplex

yes

I/O bus

DC HJ will also support
Telegraph (long distance lines); 8-bit
character

DSlO
Single-line
Synchronous
Interface

2

2

9600
bits/sec

up to
9600
bps

full duplex

yes

yes

I/O bus

7-, 8-bit character

DCn
Remote
Station

32

16 each
station
plus
operator's
console

9600
bits/sec

up to
2400
baud

full duplex; yes
full duplex
with local
copy

no

DSlO
or
DC75

Handles 300-card/minute reader and up to
245-line/minute printer;
PDP-8/E processor;
8-bit character

1
DC75
Synchrono us
Communications
Multiplexer
System

64

160K
bits/sec

up to
9600
bps

full duplex

yes

no

I/O bus
and
memory
bus

Up to four PDP-II
processors; will also
support up to three
DC76-D asynchronous
multiplexers

I
DC76
Asynchrono us
Communications
Multiplexer
System

512

6000
chars/sec

up to
9600
baud

full duplex; yes
full duplex
with local
copy

yes

I/O bus Programmable character of 7 or 8 bits; auto
and
memory baud rate detection; up
to four PDP-II probus
cessors; will also support up to three DC75D synchronous multiplexers

(

(

Transmission
speeds

Data
modes

(
1-1

Attachment to
Line types
DECsysLocal Modem tem-lO
Comments
control via

(

(

(

\

(
APPENDIX J

UUOSYM.MAC

A complete copy of UUOSYM.MAC is in this chapter.

~.-

(

(

J-1

UUOSYM.MAC

SUBTTL

UUO PARAMETERS IOAL

.XCRFF
IFDE' %,.c,
:***rapyrlght ee) 1971,1972,1973,1974,1975

Digital Equipment Corp" Maynard, Mass,***
,THI8 IS THE DEFINITION FILE OF ALL PUBLISHED MONITOR
HmD PAR.H1ETERS t-1BICfl DO NOT RE:QU!RE Tf"E JACCT PRIVIllEGE. IT
:EXClUDFS VARIOUS PA~A~~TERS WHICH CAN S[ "SPY!D« IF THE USER
:HAS Spy PRIVILEGE STNCE THOSE LOCATIONS CHANG~ WITH MONITOR
: DFVF.VJPMI;:;Wr. THF.:'S"~ SYi¥l80J~S AREH,L DErINt;D TN THE
'i'1nr~Tl'OH

~rH1S

CtlCT.,S MANnAJA.

DEP[VES

:VERRION

~RnM

tHE OLD C.MAC FILE. IT IS ONLY A UNIVERSAL

(

j~F0R~ATI0~

AST t··H) [) r f r r. R
r,1AJOR VEPSION

ll'iJO i,~HO::;O

:

UU(]V~H=;;11

UU[)t,l r N:::O

f

OA I)'! (] R VE R5 ION

uuor:;n!;;;;225

, ED I T II EV Ell

• CR r:r
SAtL

J-2

1~

UUOSYM.MAC

~UBl'TL

TABLE OF CONTENTS
TABLE OF CONTENTS FOR UUOSYM

SE:CTION
PAGE
2
TABLE
OF
CONTENTS,.,.,
••••••
,
•••••
~
••••••••
,
•••••••••
,
1"
2. FlE:VrSl0N HISTORy.",,,.,, ••• ,,,,,,,,,,,,,,,,,,, •• , •• ,,,,,, ••••• ,,.,,.,,
3. r A~' I NG CON VE·N T JON S • , •• " " • , " , •• , ••••• " •• , 41 , • " • • " • " , , • ,

4" UPDATE AND CRECKDUT INSTPUCTIONS, •••• , ••••••••••••••••
5. ALL JOBDl! SyMBOLS ••••••• , ••••••••••••••••••••••••••••
6. GTMSG" MACFO ••• """.,", ••• "'" •••• ",,.,.,,",, •••• , •••• , ••• t
7 • OPOEF.'S
7.1BASIC UUOS,.", ••••• , •• , •• ,., II !I t • • • , • • , • • • , •. , • ,
7,2
MTA!?! FUNCTIONS ••••••• , •••• , •••••• , •••••••• ,.,
7.3
TTCALL FUNCTIONS., ••••••••••• ~, •••• '.'.'e •• '.'
7,4
CALL! F.'U~CTIONS, •• "." •••••• , •••••• ",., •••• ,
GETTAB crNST!l'UE~:TS. I ~ • " • • • • • • • • • • • • • • • , • • • , • • • , • • • , • •
MISC. NON-I/O

(

T /Vi PC 0 R , •••• , •••••••••• "

I, OC K• , •••••• ,' , ..... ,

<;I,S

H I.BER. , •••• , •••• , ................ , •• " ••• ,,'

9,6
9.7
9.8

APRENB. , .... , •••••• , •••• , , , • " ••• , • " ••• , • , •

,
J

,

10,
, 1•
12"
1. 3 ,
t 4:"

PTTRP •• , ......... ,

•

i • • • , • , • , • • • , • • \I " • • • , • I

l'., • , • • , • • • • • • , • • , • • • • • • • •

t • • • , • • • • , • , . . . . . . . " • , ... , • • • , , • •

~10ASTS, •••• , • , ..... ~ •

It" •••••••• , •• ,. ~ ••• ""',"
It , .... ,
II ,

• ,

•

SAVE/GET LOCATIONS., ••• " ............. , ••••••••
S~:TUUO •• , , •• , , •••

111" • • ,

.... ,

••••• "

•• , . . . . . . . . . . ,

Al'TACh

FNQU~UF

A~O

7
8
9

10
11
11

12
15

33
33
33
34
34
34

35
36
37
40
41
42
43
46

49

•

51
53

DEQUEUE SyMBOLS ••••••••••••••••• " ••• ,.,.,

55

1 5 , DA E 1'1\ 0 N C l r~ 1. S • , t , • , , , . . . . . . , •
1.6. 1,' El'E P U U0 • , • • • • • • ~ ; • ~ , • • ~ • ,

17 "

~

SCHED, •• , _ • , •••• t • • • • • • , • • • • • • " • • • • • • • , • • , • • "
••• , • , , , • , ••• , ••• ~ ••• , ••••••••••••••••••
UNIVERSAL DEVICE INDEX., •• , •••••••• , •••••• " , •••••••••
.JBINT INTERCEPT BLacK, •••• , ••••• , •••• , •••• ~ .. , ••••••••
PST SOFTWARE INTERRUPT SySTEM •• , ••••• " •••••••••••• " .
IPCF INTERPROCESS COMMUNICATION FACIIJIT'i •• " ••••• ".,.,
PAGE AND VM VIRTUAL MEMORY FACILITy •• " •• " ••••• ,.".
q. Q
9.10

\,

(

9,1

9.2
9.3
9,4

4

6

J-3

,

• ,

p "

•

• , •••••• " , ••••• ,

, •• , ,

•

,

•

,

•

•• ,

,

"

•

•

•

•

"

•

•

,

~

•

•

,

• ,

II "

UUOSYM.MAC

f

,
J

18. MISC. 1/0
61
1~ "1
DEVe H~ " • " II II II 41 , • " • • II , , • " , • , • , II • " .. , " • , .. , , , , , • , • •
18,2
DEVTYP, , • , " , •• , ., •• , • , , , • , , , ••• , , •• , • , •• II , • , • ,
62
19.3
M'rC HR , ••• , • , , , • " , •• , , , , , , ••• " , " •• , • , •• , , , •• , ••
63
18.4
r APO P , • , • , • II " ' f II • • • W II II -, , , , • • " , , -. , , " , , II I • • , • , • • - 64
18,5
~1 Hl£ R~: , • , , •• , II , II • • , • , II , • , , II , • , , • , • • II , , • 111 , • " , -, • •
68
19,6
68
CAL11",.i4l",.,.,.,~" ••• "., •• ", ••• t""""
18,7
GE"I~CH AND IRMO?" , • , • II • , • • • , ,. , , \0 ~ • • • I • , , • " • , • •
69
GETSTS A\JO SETSTS •• , ••••• , , •• , ,. ~ " , • _ II , • • I • • • • ,
18.8
71
p~,

9

18,10
18. t1

18,12
1 B .13

18.t4
t

,
J

18,15
U~ ,16

OPE~N

AND C!.OSE, " , , ••• , •• , , ••• " • , • , •• ,

F I LO P • ,. ,. •• , , •• , • , • , •••

11 • ,

••• t ,

t • ,. • • • • ,. •

• , •• , , • " , •••• , ••

BUFf8R HEADER FORMATS. , •• , • , ••• , •••• !I ,
~1VHDR

19,5
3.9,6

19.7
19.9

73
74

8 • • • , , • • , • \0 . . . . . . . . . I , • , " • • • • , , • , , • • " , , , • •

74

, II , " , • • It •

75

, •••• , , • "

76

••• , .... ,

M'fAIO •••••••••••••• ,., •• , ••••• , ••• , •••••••••••
19. nrSK UUOS
19 , 1
nSKCHR, •• , ., .!t • • • • • , • • • , • • • • , " ' I • • • • • • , . , II"'"
19.~
CHKACC ••• , •• , , •• , ,-... , •• , , , ••• , ••• , •• , • , •• " , , , t_

19.3
19.4

72

• • • \0 • I • •

CNFCT" SE~JSE", CTJ RS T , • II " • , • ,-• • , • • • • , •
DF~ VL NM• , , •• ,-. , , •••••••••••• , II , I' " -It , • , ,
DEVSrZ.,., ••• " ••• " . , . , . , . ~"""'!t."

DISK, •••••••••••••••• ,. , ••• ". ,-, , • ". , ,-".

..10!3 ST R ~ , , • , •• " ••• , ••
GUBSTR. , , • " ••

5USF.:T, •

• to " " II , " " to • • ,

~

,

• , " " • • " III " • • ,

• • • , , , • , , • • , • III • •

'to" ••• , .," , " .. " • -, , • , " " •••••••• ,._" ". , , ~ " III

PATH. , " , •• , • " •

S T PUua

to ,

to . . . . to to , " , , • • " • , •

,~ ~.

•, •, •

I

to , • , • • to , " • " , • , " • • , • • • , • , • , "

to • • , • to • " , , " , • • to . . . to " , • "

~

, , , •

•• , , , " , , " , •

20. L,QOKlJP/E;l'lTF;F/fn::NAME •• , •••• -" ••• ", •• , •• ,'"."',, •••

t,.",

(

76
76

(

77
78
79

80
80

SO
81

82
84

(

(

c
J4

UUOSYM.MAC

SUB TTL

(
'%3(~7'

PEVISION HISTORY

MAY, 1972

COPRECT MOVX TO INCLUDE <>
ADD MACRO STORE TO GENERATE SLT
MAKE USEAeLE AS A UNIVERSAL FILE
,73
COPRECT MOVX, TXYYTO HANDLE RELOCATABLE MASKS
,74
HAVE MOVX GENERATE HRLOI, HRROI
,75
HAVE TXY GENERATE ORCMI, ANDI, EOVI
,76
ADD CAXYY, ADDX, ETC.
,77
ADD PJRSTF
,100
UPDATE TO 50434 (505) B¥ ADDING ADDITIONAL
,
SYMAOLS, CHANGE %LOSXS TO %LONEW, F%ABLB TO FUPLB
,101
ENHANCE ADOX, ETC., TO ~OTICE SMALL NEGATIVES
:102
ADO PATH AREA
,103
ADD METER. BITS AND PIECES
,104
ADD ALL OLD CALLI MNEMONICS FOR OOTISAV
:105
ADD SUBTITLES AND INDEX
,1Q6
UPDATE RESPONSE SUBTABLE
'107
CORRECT BUGS IN UNIVERSAL SETUP
'110
ADO OPPEF FOR PORTAL
..
:%4(110) JULY, 1972
,70
,71
,72

J

t-

rl11
CHANGE GL,NEC TO GL,Lep (SPR 10-7553)
,112
CHANGE SY.FRR ~ND SY.CCO TO %IYEBR AND %syeeo.
t113
CORRECT SUG IN STORE MACRO TO ALLOW MORE GE~EPAL USE
,114
ADO 5.06 ~EF~NITtONS
'115
CO~PLETE ,ReSTS BITS.
, %5 (15) NOV 72

(

,116
,117
,120
:121
,122
,123
:124
,125

SUPPORT OATE75 BY CHANGING RR.ACD AND ADDI~G RB,CRX
CLEAN UP PAGE 1 LISTING
ADD .STOFL
ADD LKNEM%
(10-9627) ALLOW FLAG=O IN TX?? MACROS
(10-9725) CHANGE CAXNE TO CAXN
ADD OPEN BLOCK
ADD ~ACROS MASK. RGHBT, LFT8T, FILIN. ALIGN, rXNO~ TXNI. JUMPI, JUMPN,
'12~
ADD MACRO BTSWP.
'127
ADD INFO-RFDEF.
,130
ADD SN%LOK, CORRECT .BFSrS
'131
(10-11609) FIX STORE MACRO FOR RELOC. 0
,%6(131) DEC 73

(

J-5

UUOSYMMAC

:112
r133
:134

:142
:143
:144
:145

UPDATE TO 50644 (6.01/5,07) Mca 4072
CORRECT BUG IN %FT?I? DEFINITIONS
IF UNIVERSAL, MAKE ~JB41, ETC" BE EXTERNAL
ADD ALL 6,01 JO~DAT SYMBOLS
ADD ,SGDDT
ADD GIMSG.
upnATE TO 50645
D~DATE TO 50646
uprATE TO 50650
CORRECT MISSING ,CREF IN TX? MACROS
UP0ATE Tn 50657
FESERVE Q SYMBOLS TO QPHM.UNVJ %DIGITS AND U,.??? TO E.UNV

'146

UPDATE TO 50660

:147
;150
:151
:152
;153
:154
s155
:156
,157
1160

ADD LOCK UDOB!T!, DEVLNM+DEVSIZ+DISK, ERRORS
UPDATE TO 50662
R~SERVF SYMBOLS OF THE FORM ???1? TO OTHER FILES
R~5ERV~ FS.M??
FX~???, T5.???, AND .rX??? TO SCNMAC.UNV
ADD ST,W??, AND "ALL" BITS SETS: JW.WAL, ST,WAL, JS.PAL, RB,ERP
ADD .SG41
~DO BOXES FOR FUNNY FORMATS: RE-OBPER CL,??? FOR CONSISTENCY
COPRECTOEFINITIONS OF ,BFSTS, .BFHDR, AND ,BrCNT
OBSOLETE IO,FCS, AnD IO,LEM
~Dn .1NF!N AND .MI~FT
UPDATE TO 50664
UPDATE TO 50666
DEFINE INSVL.

~135

:136

:137
1140
:1 4 1

,161

J162

t163
,%7(163)

~(iAY

74

(

(

(

SPLIT INTO M~CTEN.MAC AND UUnSYM.~AC
APD P~MATNING 5.07/6.01 SYMBOLS
ADD WOPDS IN ,FSDEF PRIVILEGED fUNCTION OF STRUUQ
:204
UPDATE TO 5.07A/6.01A
:205
CHANGE WAY UUOS ARE DEFINED
:206
CORRFey BUG I~ REFERENCE TO VRSN.
;%!O(206) MARCH 1975
,201
,202
:203

,207
,
:210

FIX UP SUBTTL STATEMENTS SO TOC OUTPUT CAN BE USED FOR
TABLE OF CONtENTS,
DELETE SYMBOLS FOR CHANNEL DATA BLOCK SINC~ CCB IS ONLY
J
AVAIL. VIA SPY UUO
,211-225 ADD 6,02 SYMBO~S TO Mea 5478

r'·.

J~

UUOSYMMAC

SUB TTL
,PATTERN

NAMING CONVENTIONS
USAGE

.GGSSS
GG.SSS
UUUUU.

NUMBER OF GENERAL CATEGORY GG, SPECIFIC USE sSS
BYTE OF GENERAL CATEGORY GG, SPECIFIC USESSS
UUO OR FUNCTION OB MACRO
GETTAB INDEX (WORC"TABLE)
IN A SPECIFIC GETTAB
ERROR CODE OF CATEGORY GG, SPECIFIC

%GGSSS
J GG%SSS
f

BYT~

, GGEEF%

ER~OF

EEE

'SPECIAL CAS'FS"·
f%AAAA

RH=BYTE OF FEATURE TEST NAMED FT~AAA
IN LH=FEATURE DEFINED
IN RH=FEATURg TUPNfD ON
LH=LH or GETTAS IN ,GTrET CONTAINING INFO

(--

'RESEPV~O

rOR OTH~P THAN C~MAC, C,UNV ••

:ALL SYMBOLS C0NTAING $ ARE RESERVED TO TH~ USER
J
(CUSTOMER, HIS USEP, OF SPECIFIC PROGRAMS)

(

J

RES(RVED TO OTHEB PAPAMETEP FILES

?11??

,ALL SYMBOLS OF THE FORMS: GABCDE, .QABCD, %QABCD
(I.E, WITH FIBST ALPHABETIC "G") APE RESERVE" TO
,
QPRM,~AC, QPRM.UNV fOR THE GMANGR PARAMETER ABEA, ETC.
fALL
:

OF THE FCRMSr %N~NNN, U•• NNN, E.,AAA
ARE RESERVED TO E,MAC, E,UNV fOR tHE ERROR HANDLER

SY~BOts

:~LL

SYMBOLS Of THE FORMS: fS,M??, FX,???, IS.???, AND ,rx???
r A R E R£SERVFD TO SCNMAC,MAC, SCNMAC,UNV fOR SCAN AND WILD

J-7

UUOSYM.MAC
SU~TTL

11.
,2,
:3.
:4.

UPDATE AND CHECKOUT INSTRUCTIONS

J5.

COMPARE eRE'S OF F% IN C V5. FT IN OATMAN
VEPIFY NO $ INCREF IN C AND THAT O~LY LEGAL PATTERNS ~XIST
UPDATE CALLI TABLE FROM UUOCON
UPDATE GETTAB LIST OF TABLES (,GTABe) FROM UUOCON, DEFINE
~NTFTES/BYTES IN NEW TABLES
FINO NEW ENTRIES IN OLD TABLES (ESP, ,GTCNF, .OTLVD, ,GTSYS,

'6~

FIND NEW BYTES IN OLD wORDS (ESP •• GTPRV, %CNDBG, ,GTWCH,

.GTenc,

,

(

.GTCOV)

%CllJST2)

fIND Ngw ERRORS AND FUNCTIONS FOR UUOS (ESP. DEVTYP, OPEN/CLOSE,
:
PATH" LOOKUP)
,B. FIND NEN DAFMO~ FUNCtIONS, E~ROPS,FOR~AT5.
~9.
VENIFV NO DUPLICATES BY SCANNING CREF FON ONLY· SINGLE REFERENCES
,10. VERIFY ~HAT ALL USER JOBDAT SYMBOLS APPEAR
:11, VERIFY THAT SYM~OLS RFSERVED TO OTHEF FILES Db NOT APPEAB:
1.?1?1
Q1?1?1, %G11??, .Q?1??
%NNNNN, U.,NNN, E,,???
,s.~??, FX.???, T$81?1, ,FX???
~7,

(

(

(
J-8

UUOSYM.MAC

(

SUBTTL
EXTt:f(N
EXTERN
EXTERN
EXTl::RN
~:XTF.;RN

ALL JOBOAT SYMBOLS
.JBAP~,.J8BLT,.JBCHN"J8CNI,.J8COR

,JRDA,.JRCDT,.JBERR,.JBFF,.JBH41,.JBHCR,.JBHDA,.JBHGA
,JBHGH"JBHNM,.JBHRL,.JBHRN,.JAHSA,.JBHSM,.JBHVR"JBINT,.JBOPC
.JBOVL"JBPFH,.JBPFI"JBREL,.JBSA,.JBSYM"JaTPC,.JBUSY,.JBUUO
,JB41"JBCST,.JBOPS,.JBREN,.JBVEB

(

(

1-9

.,

UUOSYM.MAC

SUB TTL
'MACRO TO

G~T

(

GTMsa. MACRO
ERROR MESSAGE CODE AND

CL~AN

IT UP

'CALL:

GTMSG. AC
WHERE AC WILL END UP WITH IT IN BYTE JW,WMS
DEFAULT IS IMESSAGE:CPFEFIX,FIRST)
tf IMESSAGF;CONTINUATION, THEN IHESSAG~:rIRST
IS ASSUMED

DEFINE

GTMSG.

(AC),<

HRPOI

AC,.GTWCH

'1SUPPRESS REDUNDANT eREF
"IT'S IN THE WATCH TABLE

.CREF
GETTAtI
.X('Rl-:P'

Ae,

"GET FROM MONITOR

.XCREf

~OVEI

TX-tif~

1'XO
TXt\!E
TXCl

AC,O
. 110EFAULT TO 0
I
AC,JW.WMS
::IF O.
AC"JWWPO.J'ITCk

OPDbF

RE:ASSI

r!PDn~

TH'ifR

opp~:~"

t,~

OPDEf
QPnEF
OPD~:F

GETPPpj
TBPSPT
TRP,]F't\j
RUf\iJJM

OPDE:F

PdOB

("lPD b~F'
OPD1:;;F
OPN:F'

SLEE:P

S 'T' IIV1E:

SF,TPOV
PEF:K

GErLT ~,;
RUN
M~Tu~\rp

REMM'

GPDr~F

GErSfG
GE; T'I'A B

()i?D~~!'­

Spy

['I PDEP'

SETl'lA i':
n:PCflF

OPDE:F
(JPD2,;F

OPDEr

:ODT MODE CONSOLg INPUT
:SFT .JBDOT
:DDT MODE CONSOLE OUTPUT
,GFT DEVICE CHARACTERISTICS
:(HISrORTCAL)
:SAVF AS 4
~ (HISTORICAL.)
:~AIT FOR DEVICE INACTIVE

rC~LLI

OPDEF
OPDt:f
OPDf-F"
OPDEr
OPDEf

OPOEF

1)

GF~TCHR

flOTOTJT

OPDEF
CPDEF
OPf"IE;F
OPDEF
OPDEF

: .RF,SET

DDTfU;

SE;TDDT

OPDf'~F

[' SKClotP
SYSSTR
,1(JRSTH

;OTSPLAY IN LIGHTS

01

rCAr,lLl
(CALIIJ1
(CALIJ!
(CALIJI
rC.ALLl
(CALLI

OPt'EF

OPDt;F

[CAf.,JT..JI -1 )
[CALI,l

2)
3)
4)
5)
6)
7J

loJ
11 )
12)
1,12)

COP~

13J

14J

:GFT [)A,H:

15)
16 J
17 J
20]

:LOGIN

211
22.1

23 J
24J

[CALl;!
[CALIi r
(CALLl
(CALlI!

251

26)
27.J
30]

(CALLI 31 J

rC~,IiLI

rAIJIJOCl\TE
: STOP ,JOB

:i,AO!\IITOR HEIIJRN
:CLEAP OECTAPE DIRECTORY

(C ALL!

[CAUJI
(CALLI
(CAll,!
rCALl,!
[Cr..LLl
(CALT.,I
(C Ai.!T.! I
(CALT".!l
(C ALiT..!!
rCA.LIJI

Pf~OGRA.M

3::?J
33)
34 J
35)
36J

37)
40)
41)

42]
43J
44)

rCA lJ J... I 45)
[CAt,til 46J
[CALY,.I 47)

'FNABl.,~

TRAPS

:[,OGOU1 OR EXIT
:BEAD CONSOLE S~ITCHES
,REASSIGN DEVICES
:RFAD TIME OF nAY IN rrCKS
,READ TIME OF DAY IN MSEC,
:kE:TURN PPN OF THIS ,JOB
f Ef',il\.6LE I/O 1'100E:
: (1 LT.!EGAL·)
:RFTUPN ~S~C lIME THIS JOB
:REIUR~ JOB NUMBER
:SLEFP
:(HISTORICAL)
:RfAD A8S0t. CORE ADDRESS
:GFT NA~E nF TERMINAL

:DIODLF USER ~RrT£ PROTECT
:REMAP LOW TO HIGH SEG
:GFT NEW HIGH BEG
:BFAO MONITOR TARLE
,SPy ON MONITOR
,CHANGE NAME OF PROGRAM
: ACCESS TYiPCOH
rRETURN DISK CHAPACTERISTICS
: RETURN AIJL Sit.
: RETIJRN ,JOB SlrJ

J-13

UUOSYM.MAC

OPDEF
QPN:r
OPDEF'

OFDEF'
OPDE:P
OPDEF
OPDSF
OPDEF

STH\JIJO
SYSPHY
F'HECHN

DE:VTYP
DEVSTS
flEVPPN
SEFl<
R'1' T f< P

[C Al,ld 50 J
rCAIJ f... I 5 1 )

nHDDLE STRS
:RETURN ALL DISK UNITS

(CAL·tll 52)

1 (fUTURE)

(CALLI 5.3J
(CAIJ!,.I54J
(Cr.!;l!I55)
rCf\lJLI 56)

7RFTDRN D~VICE PROPERTIES
:RFTURN LAST CONt
,R~TURN PPN Of ERSATZ DEVICE

reAL!..!! 57)

:cnNNECT RT DEVICE
~LI)CK TN CORE
:REfUPN ,JOB STATUS
,CHANGE LOGICAL STATION
:RETUPN PHYSICAL STATION
:8ETURN PHYSICAL NAMF

OPOF~F'

LeCK

OPDU~

,JCPSTS

rCAIJLI 60)
(CALT.,I 61)

oprEF

T,UCAH:

rC.l'd,.lT;I62)

r:?Df~F

~!HE:RE

OPDEf
oFr'£~

DE;Vt-' AI"
CTL,)Oe

OPDE;F

GOBS'1'P

C1 f'T' t: F'

rCr.LLI
(CALLI
( CAJ.lll r
(CAt,t,l

ACTIVAT

(CAL!;I 67 J

OH'i~F

DEACTI
HPQ
HIBER

I")PDU"

OPPEr
fJPDt;r

(-JAKE,

PD t~F

CHGPP,\)

DFeu"

SETUTJD

QPDEF
OPOE:r

rnl-lUSR

(1

eSVGEf"

C1 PPEF
(:P0EF
ClPDt.:F

CHKACC

C PI') E:F'

,HJBPEK

nPDEF
C!pI) J;:, r

opr1~F

OPDfF
(lPDC:Fi'

OPDEF
OPDb:F

nEVSIZ
DAE~'nN

ATTACH
OAFF T f'i

FRCUUO
DEVl,Nl"\
PATH.
Ml':TE'R •
TCl-! R ,
~l.t'Sr;T •

'.j

OPOE:r
()PCfF
Op[,rr

POKE.

OFDEF

TRt.I(JP.

op Dr: f"

T R M r~ 0

•

RESQV.

(3)
64)
65 ]
66)

(CALIJI 70)

I 71J
(CAI,T,.I172J
(CALI.. l 73)
rC,lI.j,4LI 74J
rc,aX,!.,l75J
( CALI T~

rCllI,!;I 76)
( C A 7. . T..J I 7 7 J
(CAl.T,I100J
rcnU.!l 101)
(Cp.LLI 102]
rCA L II I 103 J
rCld,lLI 104)
(Cl'II.)I!l )05)
(Cn.;!!I 1061
[C l\ II T..! ! 1071
t c.~ L T,J I 1 1 (l J

~sn:K

DISK

: PF.'TtI RN CON TROYILI NG \.108

,RETURN NEXT JOB SIL
:(FUTURE)
: (FUTURE)
: SF'T HP(~ RUN
: SU2EP ON EVENT
,w,ll,KE SOt,1b: JOB

:CI1.A"i\lGE PPN
:GENERAL SET SYS PANAMS
:(FUTUPE)
:C~EC¥ fOR ANOTHER USER
:VALIDATE FIL~ ACCESS
rGET bUFFER SIZES

,RYC;;UBST

DAt~t<10N

FUNCTION

:8fAD/WRITF ANOIHER JOB
~

A T T ACH TTY I ,J (j 8

:DAEMUN INDICATES DUNE
IFOBrE COMMAND ON JOB
,SrT 1,l1G!C . A.1.! i'j,A1vlE

,DEAL WITH DIRECTORY PATHS

(CALLI 1111

JP~R'ORMANC~

(CAI~l,r

MAG TAPE CHARACTERISTICS
:5FTUUO fOR ~RBITRARY JOB

1J2]
(C~,Ltr 113)
(ep.,LLI 114)
(C.HILI U5]
( CAL ~,I I 1 1 6 J
((l\l,!... 1117J

(

METERING

1G~r

~C:HANGF;

1"OJllITOR

:JOB'S TERVINAL NUMBER

:TF,8MJNAL I)PERATIO'M
: PfSET CHANNEL·

1-14

(

UUOSYM.MAC

ofJT) EF'

(

OPDEF
('lPf)Ef'
OPDEF
OPDEF
OPDI!;F

VNLOK.
DISK.
OVRST.
DVURS.
XTTSK.
C'AJJlt,
MTAtD,
IONDX.

OPDEP"
OFDE:f'

(NEe! •
r-~V}4DR •

(JPOEF

ERLST.

OP1)E;F

SENSF'.

C'PN~f

CLRST.

OPDEF
OPt'l!:F'

(\

--

PI IN

C1 P DEf<'

PISYS.

OPDt:F

OPDEf

rn:BRK.
PISAV.

()PDEP'

PIRST,

OPI)EF

IPCf'P.

OPI)EF

IPCfS,
IPC'F"O,
PAGE.
SUSt:T.

OPOE;F
OPN:r
OPl)t:r:

(

r•

OFt"tF

OPf'JE:f
OPDfF"
OPDEf

C01'--1P'l' ,

(1POE;f'

DECJ.

O~Dr:P"

E:~IQC

(.1 PDF.:~ F

1'APOP,
FJIJOP.
CAIJ78.

OPOEF
,OPJ1t:F
'OPDI':r
'r;PDEF
~ OPN;F
OP()~~F

SCHEf'J.
ft, Q.
•

NODt'.
Ef\lJS==46" ;.6
%i~DOF'C::::::;47" 16
%iJ l) S l' P =S 0 , , 1 6
%LOBAS==51,,'"
%LOCDr,::=52, , 16
%Lt'lr.1X 1==5 3, , t 6

=

:TFXT EDITOR LIBRAR¥ PPN (5,10]
:RELfILE LiBRARY PPN [5,111
:RUNOFF LI8RARY PPN [5,12J
:SNOBOIJLII3RAPY PPN (5,13]
,one fILE LIBRARY PPN [5,14]
, F' A1.1; IJ I BRA. RY P Pill

r5 ,

:PDP-U 1,18
f~~LTAC

PPN

(5,31

LIB PPN [5,20)

:POP2 LIB PPM (5,2']

%Lf)TST==57"t6

:TESl' LI:B PPN

%LT1LSO==60"t6

%Lr1rHH<==61, , 16

%LDBBP==62,,16

15 ]

:MUSIC LIBRARY PPN [5,16]
:STANDARD c~r SOFTWARE [10,71
;P0INTER TO ACTIVE SWAP LIST
fBASIC LIB PPN (5, \]
;COBOL LIB PPN (5,2]

%.I."DN~L==54" 1.6
%L () 0 r,j p = S 5 , • 1 \')
%1:"DPCH?==56, , 1 "

=

(

H)Uf11:' PPN

[5,21)
[5,23J

:LOG SOFT OVFRRUNS (CALL DAE~ON) IF OVERRUN
1 IS RFCOVEk~D ON 1 RETRY AND %LDLSO .NE. 0
: MASS-BUSS HFG. tH=(')FfSt:T 1NTO KI)B OF # OF
: RP~GlSTER, RH=OffS:e:t INTO liDS OF Rf.;GS.
:LH=POINTER.TO BYTE POINTSR TO , LEFT IN BAT
,RH=OFFSET (IN uns) OF CHA~ TERM FAIL CNT

(

(

<

J-22

UUOSYM.MAC

(

(--

(

.GTRCI=:!7
:DISK BLOCKS READ
.GTWCT==20
,DISK BLOCKS WRITTFN
.GTDBS==11
1DISK BLOCK SECONDS
,GTTD8==22
:TIME OF L~ST ALLOCATE ANb SIZE
,GTSLF==23
:GETTAB IMMEDIATE (SFLF)
.GTDEV==24
1DEVICE OR STRUCTURE (SEGMENTS ONLY)
.GTWSN==25
:NAMES OF WAIT STATES
.GTLOC==26
:REMOTE STATION NUMBER
.GTCQR==27
:COBE TA~LE
,GTCOM==30
:MONTTOR cnMMANO NAMES
.GTN M1==31
,USER NAME
.GTN M2==32
: ••
,GTe NO=:33
:CHARGE NUMBER
,GTTMP==34
:TMPCOR POINTERS
,GTWCH==35
,WATCH BITS
JW,WDY==lBl
1DAYTIME AT STAHT
JW,wRN==1B2
:RUN TIME
Jw.wwt==lB3
,WAIT TIME
JW,WOR==tB4
,DISK READS
JW.WD~==lB5
;DISK WRITES
JW.WVR==IB6
:VERSIONS
Jw,~~r=~IB7
:MTA STATISTICS
JW.WAL==376ij8
,WATCH ALL
JW.W~S==7B11
,/MESSAGE LEVEL
.JWwPR=~l
:PREFIX
.JWWOL==?
:ON~ LINE
,JWWPQ:=3
:PRIPIX,fIN5T
.JWWLG==6
:LONG, NO PREFIX
.JriWPL==7
JPR~fIX A~n LUNG
JW.WCN==lB9
:IMESSAGE:CONTJNUATIDN
JW,WFL==lBl0
:/MESSAGE:FIPST
Jw,WPR==tBl1
'/~ESSAGE:PREFIX

(

(:-

(
J-23

UUOSYM.MAC

,GTSPL;:36

,SPOOLING CONTROL
,DISK PRIORITY
JS,DFR==lB2?
:DEFERED SPOOLING (MrS.r STYLE)
JS.PCP==lB3l
,gPOOL CDP
JS.PCP==1832
rSFOOL COP
JS,PPt==IB33
:SPOOL PTP
JS,PPL==lB34
rSPOOL PLT
JS.PL~==la35
,SPOOL LPT
JS,PAL==37
:SPOOL ALL
,GTRTD==37
:REAL TI~E STATUS
,GTLTM==40
:TIME AND BATCH STATUS
Jb.LCP==777S9
:CORE LIMIT
JB~LBr==lBl0
:BATCH JOB
JB,L~Y==lbl1
:GOTTEN FROM SIS:
~.Jb.LTN==7777;777
,TIME J,IMIT TO GO TN JIFFIES
.GTQOQ==41
,SCHEDULING QUEUg HEADERS
,GTOJb==42
:JOB QUEUE LINK
.GTC M2==43
:MONITOR SET COMMAND NAMES
.GTCRS==44
,HARDWARE STATUS FROM CRASH
CR.SAP=~O,,44
,APR CONI
CR,SPl==1,,44
:PI CONI
CR,SS~==2,,44
,APR DATAl (SWITChES)
JS.PRl==7B2~

(

/,

(

(
J-24

UUOSYM.MAC

(

(

.GTISC==45
,SWAP IN SCAN TABLES
.GTOSC==46
,SWAP OUT SCAN
,GTSSC==47
,SCHEOULER SCAN
,GTRSP==50
,RESPONSE COUNTER TABLE
,GTSYS==51
,SYSTEM WIDE DATA
,SYERR==O,,51
,SYSTEM WIDE HARDWARE .ERROR COUNT
,SYCCO==t,,51
,NUMBER .OF TIMES COMCNT WAS OFF
%SYDEL==2"S1
,D!SABLED HARDWARE ERROR COUNT
,SYSPC==3,,51
,LH=3 LETTER CODE OF LAST STOPCD,RH=ADDRESS+l OF LAST STOPCD
,SYNDS==4,,51
,NUMBER OF DEaUG STOPCnS
'SYNJS==5,,51
,NUMBER OF JOB STOPCDS (INCLUDING DEBUG
, STOPCD'S IF A JOR IS STOPPED]
%SYNC~==6,,51
,NUMBER OF COMMANDS PROCESSED
\SYSJN==7,,51
.LAST STOPCD·-JOB NUMBER
'SYSTN==lO,,51 ,LAST STOPCD-·TTY NAME
,SYSPN==tt,,51 ,LAST S!OPCD--PROGRAM NAME
\SYSUU==12,,51 ,LAST STOpeD-.UUD
%SYSUP==13,,51 ,LAST STOPCD~-USER PC
,SYSPP==14,,51 'LAST STOPCD •• USER PPN
,GTWHY==52
,OPERATOR WHY COMMENTS IN ASCIZ
,GTTRQ==~3
,TOTAL TIME IN RUN QUEUES WHETHER OR NOT RUNNING
,GTSPS==54
,SECOND PROCESSOR STATUS
SP,SCO==tB29
rSET CPU COMMANO (0$ TO USE)
SP.CRO==1835
,SET CPU UUO (OK TO USE)
,OTHERS BY SHIFTING LEFT 1 BIT/PROCESSOR
,GTCOC==55
,CPUO CDe CONSTANTS
.GTCOV==56
,CPUO CDe VARIABLES
.GTC1C==57
,CPUl CDB CONSTANTS
,GTCIV==60
,CPUI CDa VARIABLES
.GTC2C==61
,CPU2 COB CONSTANTS
,GTC2V==62
,CPU2 CDa VARIABLES
,GTC3C==63
,CPU] CD8 CONSTANTS
,GTC3V==64
,CPU] COB VARIA~LES
.GTC4C==65
,CPU4 CD5 CONSTANTS
,GTC4V:=66
,CPU4 CD~ VARIABLES
.GTC5C==67
,CPUS COB COr.,rSTANTS
,GTC5V::70
:CPU5 COB VARIABLES
,CCPTR==O,,55
rLH=POINTER TO NEXT COB
%CCSER==l"S5
:APR SERIAL NUMBER
%CCO~P==2,,55
.CPU O~ IF LE 0, JIFFIES DEAD IF GT 0
\CCTOS==3,,55
,TRAP OFFSET FOR KA10 INTERRUPT LOCATIONS
\CCLOG==4,,55
,LOGICAL NAME (CPUN)
%CCP~Y==5,,55
,PHYSICAL NAME (CPXN)
%CCTYP==~,,55.
;TYPE"OF PROCESSOR (LH-DEC, RH-CUST)
.CC166==1
,PPP-6
,CCKAX==2
,KA-l0
.CCKIX==3
,KI-l0
,CCKLX==4
,KL-l0
%CCMPl==7,,55
,REL. GETTAB POINTER TO BAD ADDRESS TABLE
%CCRTC==10,,55 ,REAL TIME CLOCK (DK10)ODB

(
J-25

UUOSYM.MAC

%CCHT'O:=11,,55
%CCPAB==12,,55
\CCRSP==13,,55
%CCDKX=;:14,,55
%CCf:eS==1.5, ,55
%ccrvj~S==16,,55

\CVLlPT==5,,56
~CVLS-r==12,,56

%CVTP€==14,,56
%CVSPE==lS,,56
%CvtA PC == 1. 6 , , 5 6
%CVt"iPA==17, ,56
%CVMP~i==20"
%CV~iPP==21

56

,,56

, HOLE:S
%CVAP.C==27,,56

%CVARA==30,,56
%CV1H JR==31, ,56

,REAL TIME CLOCK DQB IF HI PREC. TIME ACCT,
,REL. GETTA~ POINTER TO PARITY SUMMARY
1REL. GETTAB POINTER TO RESPONSE SUMMARY
,NUMAER OF DK10'S ON THIS CPU
:NUMBER Of ESOX rICKS PER SECOND ON KL10
,NUMBER OF MBOX TIC~S PER SECOND ON KL10
,UPTIME
.
,LPST TIME
:TOTAL MEMORY PARIT¥ ERRCRA
:SPURIOUS ~EMORY PAP!TY ERRORS
:HtTIJTIPLE MEMORY PARITY ERRORS
:MEMORY PARITY ADDRESS
:MEMORi PARITY WORD
,MEMORY PARITY PC
AROVE HERE BECAUSf or ,GTNSW COMPATAaILITY
:AOORESS BREAK COONT
:ADDRESS BREAK ADDRESS

(

: LAST ~1OB RUN

: (OBS01,ETE:)
%CVSTS==35,,56 :STOP TIME·SHARING THIS CPU
%CVRD~==36,,56
,OPERATOR CONIROLL~D SCHEDULING
CV%fiUN==1BO
:DON'! Bl1r1 JOBS
%cvrHlL==37,,56 ,NULL Tlf"E
'CVED!==40,~56
rLH=PC,BH=COUNT OF EXEC nON'T CAR~ INTERRUPTS,
%CVJOb==41,,56 1CURR~Nr JOB
%CVOHT==42,,56 :OVERH€AD TIME TN JIFFIES (EXC. UUOS)
%CVEVh==43,,56 :MAX EVM fOR LOCK DUO MAPPING
%CVEVU==44,,56 :USED EVM FOR LOCK VUO MAPPING
%CVfJl,C==45,,56 : LOCK LOOP Ct'UHT
tCVIUC==46,,56 ,TOTAL UUO cnUNT
%CVTJC==47,,56 :TOTAL JOB CONTEXT SWITCH COUNT
%CVTN~==50,,56
:TOTAL HXM EFROPS
%CV~NE==51,,56
:TOTAL NON-REPPODUCIBLE HXM ERROFS
%CVN.JA==52, ,56 JNUtvl~ER OF JOBS AfFECTED BY THIS NXM
%CVMNA==53,,~6
:FIRST MEMORY ADDPESS WITH NXM
%CV£TJ==~4,,56
,EPDX TICKS PER JIFfY (COMPUTED)
%CV~TJ==54"S6
1~BOX TICKS PER JIFfY (COMPUTEn BY ONCE)

J-26

(

UUOSYM.MAC

%CVRSO==O
%CVK!liO=::l
%CVRHO==2
%CVRLO==3
%CVRSl==4
%CVRNI:::=5
*CVRHl==6
%CVRLJ==7
* C V R8 R:: :: j 0
%CVRI"R==1 1
%CV~HR==12

%CV.RY,R==1 3
%CVRSX::=14
%CVRtJX==1 0
%CVHHX=::16
%CVkLX==17
%CVHSC=::20
%CVRYC==21

%CVRHC::::?2
%CVRLC==23
%CVPLJ;==O
%CVPMR=::1
%CVPTS=:::~

(

%CVPSC==3
%CVPUE==4
%CVPAA==5
%CVFAC::::F
%CVPf')A::::::7
%CVPOC=:::10
%,CVPCS=::l 1

·•• ( RE:I< • )

SUM TTY OUT UUO R~SPONSE
NUMBER TTY (jur LJUO HEspmJSF
: (PEI.!t ) HI-SUM SO TTY our Hun RESPONSE
,• CREL~) T.JO-SUM so TTY OUT lIUO RESPONSE
r (RET...I • ) SUM TTY INP UUO RESPONSE
•• (REI),) ~UMBER TTY INP UUO RESPONSE
J (PEL.) HI-SUM SQ TTY INP UUO REspnNSE
•, CRr.;L.
to-SUM so TTY INP DUO RESPONSE
•• (Rf::tl' ) SUM QUANTUM REQ RESPONSE
•• (PETJ, ) NtJ~1BER ()UAN'l1JM REO HF~SPONSF
,• (HE'L, ) Hl~SUM SQ QUANTUM PEO RESPONSE
•, (HE:L. ) r.,C"'SUr,1 SGI QUANTUM PEQ PESPf')NSE
•• ( RE~rH ) SU~ ONE Of ABOVE RESPONSE
• (HEla) NUMBER ONE OF ABOVE R~spnNSE
(REf,). ) HI·SUM so ONE OF ABUVE RESPONSE
•• (REIH ) LO-SUM S0 aGE Of ABUVE RESPONSE
•• (kEl;.) SUM CPU RESPONSE
•• (REL, ) NUMBER CPU PESPONSE
• (REL. HI-SUM so CPU RESPONSE:
•, cr~ E.lJ , ) LO .. SUM SO CPU RESPonSE
•.' ( R E f< • ) HIGhEST ADDRESS OF PARITY ERPOR
•, (RET'! • ) ADDRESS IN SEGMENT OP PARITY ERROR
•, (H2:J.I') NUMBER Of PARITIES THIS SWE~P
•• (RF1! • ) NUMBER OF P4RITt S~~EPS
;

(REt, • )

,

·,

,

·

• (REtJ') NljWBrR OF lISEP ENARJ.;ED PARITY ERRORS
t

,• (PEL. )

, (REI, •

·•••

)
(RE.:l, • )

(PEL, • )
•• (PET,.)

A~D

Of BAD AnDRESS THIS SWEEP
BAD CONT~NTS THIS SW~EP
BAD ACORfSS THIS SWE~P
BP.D c()nn~r,TS THIS SI'!EEP
OF SPURIOUS CHANNEL ERRORS

AND Of
JOR OF
lOR OF
NUMBER

(

J-27

UUOSYMMAC

.GTfET==71
,FEATURE TEST SETtINGS
,UUOS
\fTUUQ==O,,71.
F%EQOQ==O"lB22 :ENQ./DEO.
F%GALA==O"lB23 ,GALAXY-l0 fEATURES
F%Pt==OOO,,1824 ,SOfT. PI SYS
F%IPCr==O"lB25 11PCF
F%CCIN=~O"lA26 :CONTROL~r INTERCEPT
F%PTYU==O"lB27 rJOBST! AND CNTLJ08 UUOS
F%PEEK==O,,1828 ,PEEK UUO
F%POKE==O,,1829 :POKE. UUO
F%JCON==O"lB30 :JOB COWT1NUR
F%SPL==OO,,1831 :SPOOLING
F%PRV==OO,,1832 ,Joe PR1VS
f%OAEM==O"lB33 :DAEMON fUNCTIONS, ~TC.
r%GETl==O"lB34 :GETrAR uun
F%2REL==n"lB35 :2·R~GISTE~ RELOCATION
%fTRTS==1,,71
,FEAL TIME AND SCHEDULER
F%NSCH==1"lB25 ,NEW SCHEDULER
F%VM==OOl,,1826 :VIRTUAL MEMORY
f%SWAP==1"lB27 ,SWAPPER (n~flNED IN S)
F%SHFL==\"lB2B ,SHUFFLER
F%RTC==Ol"lB29 ,UKLO SERVICE
F'%T!OC'K==1,,1830 'LOCI< UUO
f~TBPS==\"lB31 :TRPSET uun
F%RTTR==1,,1832 :RTTRAP DUO
F%SLEE==1,,1831 :SLE~P UUO
F%HIB~==11,lB34 ,HISER/WAKE UUOS
P%HPQ==Ol,,1835 ;HIGH PRIOPITY RUN QUEUES
%fTCOM==2,,71
,COMMANDS
F%[XE==02,,1820 ~.EXE FORMAT fILES SUPPORT~D
F\MOFf==2"lB21 :SET MEMORY OFF LINE
F%MONL==2"lR22 :SET MEMORY ON LINF
f%CCL==02,·,lB23 :cnMPIL COM~ANOS (DEFINED IN S)
F%CCLX==2,,1824 ;COMPIL-CLASS
F%ocnN==2,,1825 7QU~UE AND fRIE~DS
f%SET==02"lB26 ,SEl UUO/CU~MANO
F%VERS==2"lB27 :V€HSION
F%BCOM==2"lB28 :BATCH CONTHOL FILE
f%SprA==2"lB29 :5£T DAYTIME AHO SFT DATE
F%WATC;=7"lB30 'W~TCH
F%F"Hl!==2,,1831 ,FINISH A;~n CIJ OSF.:
F%PEA5==?"lB32 :PEASSICN VUO/COMMAND
F%FXAM==2,,1833 ,E ANO D
F%TALK==2"lB34 :SEND
F%ATtA==2"lB3S :ATTACH COM~ANQ/UUD
,FrAce=;3,,?1
:AccnUNTING INfO
F%TLIM==3,,1831 JTIME/COPE LIMITS, ETC.
r%~NO==03"lB32 :CHA~G! NUMBFR
F%UNAM==3"lBJ3 .,U5ER NAME
P%~CT==03"lB34 ,KILO-CORE-TICKS
F%TIME==1,,1835 ,RUN TIME

(

t·

{

(

r

I

r,

(
1-28

UUOSYM.MAC

(

%fTERk==4,,71
1ERROR CONT~OL AND OPTIONS
F%MNXM==4"lB22 :NXM ERROR RECOVERY CUDE
F%KL10==4,,1823 ITSIS IS A KGIO
F%KA10==4,,1824 :TBIS IS A KAIO
r%22BI==4,,1825 :22 BIT CHANNEL (DFI0C)
F%PDBS==4,,1826 ,SWAPPING PDB
F%KI10==4"lR27 rTHIS IS A ~II0
F%M~TR==4"lB2e ,MEIFB. DUO
F%EXON==4"lR29 rEXECUTE ONLY FILES CAtWAYS 1 SINCf 5,06)
F%KII==04,,1830 ,KI-tO INSTF CHECK ON KAIO
F%POOT==4,,1~31'BOOTS BOOTSTRAP
F~2SWP==4,,1932 tMULT
SWAPPING DEVICES
F%EL==n04,,1~33 ,CAEMON ERROR LOGGING
I

F%~S==004,~lB34

(

(

(

J~ULTl·PROCE5S0RS

F%MfMP==4"lB35 :MEMORY PARITY RECOVERY CODE
%rTDn~==5, ,71
; DEBUGGING. n':ATURES
F%2S~G==5"lB27 ,2 S€GM~NT MONITOR
F%RSP==05"lB28 :BESPONSE Tr~s
F%WHY==05"lR29 :~Hr R~LQAD
F%PATT==~,,1930 ,PATCH SPACE IN TABLES
F%TRAC==5"lB31 ,BACK TRACKING FEATUPES
F%HALT==5"lA32 ,HILTS IN MONITOP
F%PCHK==5"tB33 ,INTERNAL PEDLNDANCY CHECKS
F%MONP~=5,,1334 tMO~ITOR ~RITE PROTECTED
F'C~EC==~"lR35 :~O~ITOP CHECKSUMMED
%FTSTR==b,,71
~FILE STRUCIURE PIBAMS
F%DHIA==6"lB19 ,HIGH AVAIL, fEATURES
f%DSI~==~"lB20 JMULTI. ACCESS UPDATE
F%NOT..==Ob,,1821 :t'jIjL
F%LIB==O~"lB22 :Lte/SYS/CLC/NE~ ETC,
F%DPRI==6"lB23 :DISK PRIORITY rRANSF~RS
F%APL8==6"lB24 :APPEND TO LAST BLOCK
f%AIR==O~"lB25 ;APPEND IMPLIES PE~D
F%GSRC==6"lB26 :GENERIC DEVICE StARCH
F%DRDR==6"lB27 :REN'~E ACPOSS OIR~CTORIES
F%DSEK==6"lB28 :SEEK UUQ
F%OSUP==6,,1829 ,SUPER USETI/U
f%OQTA==F"lB30 :DIS¥ QUOTAS
F%SIR==Of., , 1 B31 : fV:ULT IPI.i~: STPUCTVRES
F%5UUO==6"lR32 :MISC, 5~SEBrES UUDS
~'P~YO==~"lB33 :PHYSICAL n~LY
F%SfO==06,,1834 ,SUB FJLE OIR~CTORIES
F%~OUN==6"lB35 :STPuun FUNCTIONS

(
J-29

UUOSYM.MAC

iINTERNAL DISK PARAMS
F%ppn4==7"lB18 ,INCLUDE RP04 SUPPORT
F%SLCK==7"lB19 :DEBUG SFARCB LISl CDOE
P%2ATS==7"lB20 ,2 PABT AC~ESS BLOCKS
F%CBDB==7,,1821 :DEBUG CB IN~ERLOCK
F%LOGI==7"lB22 ,LOGIN (DEFINED IN S)
F%DlSK==7"lB23 :DISK S¥STE~ (eEFI~ED IN S)
f%fFR£:::==7" t B24 ,PREVENT PACES IN FITJF'MD
F%SWPE=='.,1~25 ,SWAP READ ERROR RECOVERY
F%nBB~=='"lB26 :&lO-BtOCK MARKING
F'%f'lUFC==7, , 1H27 --:U~FD, ¢'Of>iPR'ESSOR
r%DETS==7"leis ,DISK ERROR SIMULATUR
F%D~RB==7;~lB29 f~ULTI RIBS
F%~SMC==7"lA30:~MALLEN ALLOC. OF DISK CORE BLOCKS
f%DALC==7"lBlt :AL~OCATION OPTIMISATIONS
P%DSTT~=1"friJ2 :DISK USAGE STATISTICS
. F%OHNG==~,jlB33 ,HUNG DISK RECOVERY
y%OaAD==',~lB34 ,DISK OfF-LINE RECOVERY
f"%DDPT:::'7,,1R35 :LATENC¥ OPTIMIZATION
*fTSCt,f=::lD, ,_71
:SCANNER OPTIONS
Y%DCXH=::10,,1822,OCIO-H (2741 ON D(10) SUPPORTED
F%TVP:=010"tB23:F'ANCY VrRTICAL POSITIONI~G
'rTDSK~=7,,7t

F%T¥PE==10,,1B24'TYP~~SE'T-10

{

B"E;ATtlH'S IN DC76

F%2741==10,,1B25:SUP P ORT 2741-LIYE TER~INALS
F%CAfE==10,/1826rDC76
F%TBLK==10"lB27:TT¥ BLANK CO~VAND
F%TPAG==10,,1B28:PAGE AND nJ5PLAY KNOWLEDGE
F%DIAL==10"tB29,AUTO DIALER
F%SCtC==10"lB30:SPECIAL LINE CONTROL
f%SCNR==tO"lB31:HAROWARE SCANER
F%MODM==lQ"tB32,MODFM CQ~T~OL
F%630H==1Q"lB33,SINGLE SCA~NER 630
F%GP02==1Q,,1B34,U.K. MODEM SUPPORT
F%HDPX==10,,1S3S,TRULY HALF bUPLEX TERMINALS
%fTPF8==11,,71 ~l/O PARAMS
F%RDBA==11"lB19~REAO BAC~WARDS ON lU70
F%TLA~==11"lB20;TAP~ LABEL SUPPORT
F%TAPO==11,,\B21:TAPQP. UUO
F%TASK==11"lB22:TASK TO TASK NtTWORK SUPPORT
F%DA57==11"lB23:DAS78 (REMOTE 360/370/2780) SUPPORT
F%XTC==011"lB24:DA28-C N~TwnpK SUPPORT
F%MS~S==tl"IB25,MSGSER (MPX DEVICE)
F%HSLN==11"lB26JHIGH·SPEE~ LOGICAL D~VICE
F%CPTR==11, I tB27 ,CDP TRCUbr)f~ INTERCEPT
F%CRTR==11,,\R28:CDR TROUBLE INTERCt~1
r%CTY1==11, itB29:SUPPQPT CTYl
F%PEM==O\1,,1830:REMOTE STAttQN SOFTWABE
F%LPTR==11"lB31:LPT DEVICR ERROR RECOVERY
F%OPRE==11,,1832~CEVICE ERPS TO OP[R
F%COBS==11"tB33,CDR SUPER I¥AGE MODE
F%MTSE==11"lB34,~TA DENSITY/BLGCK COMMANDS
F%TMP=~011"lB35:TMPCOB AREA

1-30

(

(

UUOSYM.MAC

,ERSATZ DEVICE NAMES
:SCA~NER DATA
%SCNRI==O,,73
:NVMBER OF PCV I~TFRRUPTS
tSCNXl==1,,73
rNUMBER OF XMT INTERRUPTS
%SC~EI==2,,73
:NUMBER OF ECHO I~TERRDPTS (IN XI)
%SCNM8==3,,73
:MAX BUFFER SIZE
%SCN ft t==4,,73
:NUMAER OF ACTIVE LINES
%SCNPS==5,,73
:SlZE OF BUFn:p FOP PIM ~IODE:
%SCNRA==6,,73
:ADORESS OF PECINT
%SCNXA==7,,73
:ADDRESS OF XMTINT
%SCNTA==10,,73
~ADDRESS OF TYPE
.GTSNA==74
~LAST SEND ALL IN 9-AIT
%SCNAE==n,,74
:BYTE POINTER TO E~D BYTE IN MESSAGE
%SCNA5==1,,74
fBYTE POINTER TO FIFSr-l BYTE IN MESSAGE
%SCNAM==2,,74
fEIRsr WORD Of DATA IN MFSSAGE
.GTCMT==7S
:S£1 TTY COMMAND NAMES
.GTPTO==75
:PROCESS cnMMUNICATIO~ 10 CIP(F)
.GTIPC::77
,IPCP MISC. OATA
%lPCML==O,~77
:MAX, PACKET LENGTH
%IPCSl==1,,77
:PIC OF SYST~M-WIDv [SYSTEMJTNFQ
,GT~DN=:'2

.GTSC~==73

%IPCiH,l==2, ,77

:DF:F'AUT,! GUOTA

%lPCTS==3,,77
%IPCTO==4,,77
,IPcrp==5,,77

,TOTAL PACK~TS SENT
flOTAL PACKlTS OUTSTANDING
;PIC OF rSYSTEMJIPCC
:PTD MASK
:LENGTH OF PIO TAbLE

%[PCF~:=6,,77

%lPC~P==7,,77

(

%1 PC 1'1 F == 1 0 " 7 7
: N IH,j B F, R 0 r p r D .. S N0 'J, CE f r NF [}
%IPCIP==tl,,77
:T01AL PID'5 DEfINED SINCE 8ELOAD
~GTUPM==IJO
:USSR PAGE MAP PAGE
.GTC~~==101
:5ET wATCH COMMAND NAMES
.G T CVL==l02
:ClJRFP·iT VH~T I,lMIT, ,CUkRE:IT FHi LH,Ir

=

• G'PW L::: 1 ,) 3

, MAXf/v1 Ui'vl VI HT T., Jl"1 IT, , tv: r.. X.I [''tn l PH Y L H; I T

1I P CF STATTSTICS PEP JOB
IP,CGD==-l"O
,cnUNT OF SEnDS SINCE

~GTIPA=~t04

-1

,(,OU~J!

:lPCF

POI~TER5

J2.CO(:,:0"

(

.GTIPP==105

LOGl~

OF RE,51==6,,115 ,MFOIUH TERM 5CHEOtTLTNG tNTk;PVAl,
%SSAJ5==7,,115 :AVERAGE JOR SIZE
%55101==10,,115 :TOTAL QUOTA TIME
'55EAF==11"t15:EXPONENTI~L AVERAGING fACTOR
%5SFAT==12,,115 fEXPONENTIALY AVFPAGFD USEP TIME
%SSPS5==13,,'15 fTOTAL USER RUNTIME SINC! SCHfD. UUO
: SET (LAbS PARAM~TERS
.GTDCF==lJ6
,CESIFED CHAN. USE fRACTION (INDEX BY CHAN)
.~TST2==117
:SfCO~D JOB STATUS WORD
.GTJTC==120
,JOB TYPE AND SCHEDULER CLASS
.GTCap=:121
,CLASS QUOTA IN P~RCENT (INDEX BY CLASS)
.GTCQJ==122
:CLASS QUOTA IN JIFFIES (INDEX BY CLASS)
;GTCPT==t23
,CLASS RUNTIME SINCE QUOTAS SET (INDEX BY CLASS)
.CTSOH==124
,SUB QUEUE HEADERS
,GTSQ=: 125
,soe GUEUE: '1d."lRD FOR EACH ,JOB

(

(

c-

1/

(
J-32

UUOSYM.MAC

.GTSID==126
;SPECIAL PIO TABLE
%SrrpC::=O,,126 ,[SYSTEM1!PCC
%SIINf==1,,126 ,(SYSTEM] INFO
%SIQSR==2,,126 , [S¥STEM]QUASAR
%SIMDA==3,,126 ,MODNTABLE DEVICE ALLOCATOR
%SITLP==4,,126 :MAGTAPE LABELING PROCESS
,GTENQ==127
,ENG./DEG, STATISTICS
%EOMSS==O,,127 ;MAXIMUM STRING SlZf
%EOruAQ==1,,127 rNUMBER OF ACTIVE QUEUES

(

%E: Q E: S R=:: 2·, , 1 ? 7

%ECDSR==3,,1'7
%EGAPR==4,,127
~EQDEQ==5" 121
,GTJLT==ll0

.GTEBR==132
,C,TMRT==133

:JIfFIES OF KL10

.GT~BR=:134

rJIF'Y REMAINDER MOD RTUPS OF 133

.GT~eI==t31

(

, TO 7' AI,i EN Q • S I I\l C E: Hl'~ {J 0 A!l

,TOTAL CEQ. SINCF RELOAD
,ACTIVE POOLED BESnUpc~s
fDEfAUJ/£ EJJQ. QUOTA
:JOB LOGIN TIME T~ UNrVERS~L F~RMAT
:JIfFIES OF KLI0 EhOX TI~E
rJIFFY REMAINDER MOD RTUPS OF 131

(

(

(

J-33

~!BOX

TIME

UUOSYM.MAC

SUBITL
,lCRF"5==O
.TCRRf==t

MISC. NON-riC _. TMPCOR
,COUNT OF F'HEE SPACE

:READ rILe.:

.TCHDf:::=2
• TC P vJ f ==3

: DELETE F lIJt

.TCPPD==4

HJ P=;; 1, Br,
H8.IPC==lB10
I1B"RICJ==t811

;fOkCE IMMEDIATE SWAP OUT
:IPCF

J-je,RPT==U~12

:PT'X ACTIVITY
:TT~ LINf ACTIVITY
:TTY CHAPACTER ACTIVITY

HB wfoi'!L==,b13
HB,RTC==LS14
'-n3.RWJ==lB15
J.. 2

; IJ,LF:::GAL

)1, P ,

:NO~-EXISTE~T

'P.P.HEN::::::l£lt8

(

MISC. NON-I/O •• JOBSTS

NX1-1 ==1 B 2 3

AP,PAR==lB24
AP.Cl,K=='B26
!,p,fnv==tB29
AP.Aov==UB2

~IFlI'jOHY

MEMQRY

, P A.P r T t E RP 0 R 'f" LAG
f C (!ClC /<,

:fLOAlING OVERPLOW
'ARITH~ETIC OVERFLOW

(

(
1-35

UUOSYM.MAC

SUA TTL
• SGN lH,1==O
.Sr,?PN==7
.5GDEV==11
.SGLnW==17
.SG41==l?2
.5GD01==114

MISC~

NON-I/O

~.

SAV!/GET tOCATIONS

(

,FILE NAME fROM RUN uue
,DIRECTORY FROM RUN UDO
:DEV1CE FROM RUN UUO
:EXTENSION OF LOW SEG FROM RUN UUO
,LOCAtION IN SAVE FI~E CONTAINING COpy OF .J841
,LOCATION IN SA V! FILE CONTA1NING COpy Qf ,JBDDT

:BLOC~ TYPES IN .EXf FILE DIRECTORY
.SVENO==1777
,END OF DIRECTORY
,SVOJP==1776
,DIRECTORY BLOCK

;,EXE FILE DIRECTOPY ~NTRrES
.SvFPf==n
:fILE PAGE AND FLAGS
SV%hTS==lBO
:PAGE IS PART Of BIBEG
5V%SHR==181
JPAG~ IS SHARABLE
SV%WRT==tB2
:PAGF IS WRITAB~E
SV%CON==IB3
:PAGE IS CONCEALED
SV%SYM==184
:PAGE IS PART Of SYMBOL TABLE
SV%FPN==1777
:fILF PAGE NUMeER
.SVPPC==1
JfROC~SS PAGE AND PEPEAT COU~T
SV~REP:=777Be
,REPEAT CQU~T
SV%PP~==777
,PPOCESS PAGE NU~BER

(

.(

(
J-36

UUOSYM.MAC

SUBTTL

MISC. NON-lID •• SETUUO

,STCMX==O
_STCMN==t

,COR~

MAX

:CORE

~lN

.STD~Y==2

:DAYTl~E

,STSCH==3
,STC0R==4
,STS P{,==5

1SChED WORD (SAME AS %CNSTS)
,CDR SPOOL NAME
r SPOOL I NG FH 'fS (SAME AS • GTSPL)

.ST~:TC==6

:i~ATCH

ST,~D¥==lB19
ST~WRN==lB20
ST.~WT==lB21
5T.~DP=='B?~

(

(

(

BITS
:~ATCH DA~TIME AT StART
:WATCH RUN TIME
:~ATCH WAIT TIME
:wATCH DISK READS
:wATCH DISK WRllfS

5T.WDw==lB23
ST,v.;VR==1824
ST,WMT==1S25

:WATCH MIA STATISTICS

ST,~iAL==376ti26

:~JArCH

HiATCH VERSlONS
j,HAL

:DATE
.STCPR==10
tOPk DEVICE
.5TKSk==11
:YSYS TIMER
.STCL~==12
:CORE LI~lT
.ST1LM==13
:TTMP: LIMJT
.STCPU==14
:CPU SPECIFICATIO~
.5TCRN==15
:CPU BU]\iArHLtTY
SP.CR5==lb30
:CPUS
SP.CR4==lB31
:CPU4
SP.CP3==lB32
:CPU3
SP,CR2~=lB33
:CPU2
SP.CFl==lB34
,CPUt
:CPUO(SAM~ 81T DEfINED EARLIER)
:SP.CRO==1835
• &TLI,IX== 1"
:GOGMAX
~STB~X==17
:BATMAX
,fiTBMN==?O
:BATMIN
.5TDFL==21
:D5~FUL
.DFPSE==O
:PAUSE
,Of~RR==l
:ERROR
~STDAr==7

,':;TMVi';==22

,MAX \,iM

.STMVR==?3

,MAX VM RATE
.STUVN==2~
:USFR VM MAXIMA rVJRT"PHY)
.STCVM==25
:US~p CURRENT VM MAXIMA (VIRT"PHYl
ST.VSG==lB16
1stT IF PHYS LTMIT IS GUIOFLINE
.STTVM==2b
~US~w VIR! TI~E INTSRRUPTS
.STA8~==27
JAnDR~SS aR~AK (HOW? 'ORMAT~ 183 BREAKS VUO REFERENCES)
.STP~~==30
:S~T PROGRAM TO PUN
.STDfR==31
:S~T C~FERFD SPOOLING

(
J-37

UUOSYMMAC

SUBTTL

MISC. NOM.I/O •• SCHED.

(

11AC CONTAINS N"ADDR WHERE ADDR CONTAINS:

"

J:

!=======================================================1
FUNCTION 1

BLOCK 1

FU\lCT!ON 2

BLOCK 2

: :
: :

!.~- •• - •• -- •••• --~ •• ---.-~ ...... ~--.--.--.-~ ••• - •• - •• -~ ··1
I
I
I
I

; ;

I

:7

!~================================================~=== ==1

f:

I

fn.F~CTTON

('DOES:

,SCRSL==QUOOOO 1R~AD SCHEDULING INT~RVAL
,5(,531==400000 rSET
SCHEDULING INTERVAL
:BLOCK CONTAINS:
.SCdSl==O
~SCHFDULING INTEPVAL

(

:R~AD Meu INTERVAL
,SET MCU INTERVAL
,BLC)C'K CONTAINS:
.SCBMI==O
1MCU INTE~VAL

.SCR~I==OOOOOl

.scsvr==40n001

,SCRCQ==oon002

,5C5CG==400002

,,::

:~HLOCK

SIZ~~

I
I

J;

I

..

DF i3LOCK

I

QUnTA.

BITS+CI,JASS

::
: :

•, ,•

(

1=====================================1

::
•, ,•

,• ,•

:READ CLASS QUOTAS AND fLAGS
:SEt CLASS QUOTAS AND FLAGS
CONTAINS:

I
I
I

S!TS+CLASS

,: !:~=======;===============~===========1
.scaCT==O
;WOBDCODNT
.scaCQ==l
~CLASS QUOTA
:******DEFINE FLAGS HERE******

'CONTI~UKD

ON NEXT

PAG~

J-38

UUOSYMMAC

,P:Ai) TH~E SIJlCE
,SCS'l'S==400003 J SET T Hi£:; St, ICE
,;BLOCK CONTAINS:
,.5C8CT==0
,WORD COUNT
,SC6Pl==1
:TIME SLICE FOR PQI
.SCBP2==2
,TIME SLICE FOP PQ?

.• SCRTS=::OOOOO.3.

(
.,

.SCR~F==n00004
:READ DESIRED CHAN USE FRACTION
.SCSUf==40n004 ,SET DESIRED CHAN USE fRACTION
:;BLOCK CONTAINS:
:
1=====================================1
••
lIJORD COON'!
••
;-·----·-··----~·---··------··
•r ,
CHAN #
DeUF ~~·-·--1
•, ,•
!-·-···-·-·-~---·--····-····--·--·"·-·1

,
,

I'

,

I

••

I

I

::
,• ,•

/

I
I

,

(

.

·
I

I

f ,

·,•• ,,

•
•

CHAN

~,SCBCT==O

: \'iORD COUNT

.SCBOP'==l

JCHAN"USE FRACTION IN %

,SCRJC==000005
.SCS,TC==40000S
~:BLQCK

(

,:
:=
f'
,• ,•

,;
: :
: :

,R8Ae JaR'S CLASS
JO~'S CLASS
CONTAINS'
,Sf!'

!====::~===============================I

WORD COUNT

1-·---·--·~·----~---·--·----------'···!
CLASS
I

/
I
I

·,.
·

(

DClJF

#

1============================:========1

• ,•

I
I

dOB

#

'~-------------------~--------------_-I
.~----------------------------------~-.
:,5(8C1'==0
: !iORD COUNT

.SC8JC:=1

:~10B"CL,ASS

:cnNTINUED ON NEXT PAGE

t.

(
J-39

UUOSYM.MAC
~SCPMC==000006· :REAO MCV CONSTANT
.SCSMC==4000n6 :5E1 MCV CONSTANT
,SlJQCK COi\ITA INS
.SCBMC==O
,MCU CONSTANT

(

JREAD CLASS USAGE
,:BLOCK CONTAINS:

.SCR~V==000007

::'J

1==:=:==~==========:==================!

WORD COUNT

f:
:;

! ••••• -- •• ~-~-.- •• - •• -.-.-~-.- •• _-._ •• !

J:

CLASS 1 RUNTIME
1
!···"·-·······-····~···-------·-···-··1

•, ,•
,• ,•
,• ,•
,:

I

I
I

I

I

"
•, ,•

::

CLASS 0 RUNTIME

I

CLASS N

(

PU~TIME

1============================:========1
,WORD CCJUNT
,CIIAS! 0 USb.:D

:SCSCT::O

.SC8CU==1

:READ EXPONENTIAL FACTOR
:SET EXPON!NTIAL FACTOR
:RlIOCK CDNTAlkS:
.SCH~r==O
,EXPONENTAIL fACTOR

_srREF==000010
.5~S~F=='00010

(

.SCR¥M==000011

,REAO MCU MULTIPLIER
~SCSMM~=400011
,SET MCU MULTIPLIER
,fH,OCK C('INTAINS:
.SCBMM==O
:Meu MULTIPLIEP

,S('HED,

UUO ERROR COIH~S

S<.,'!JAC%==l

~AD.DRJ:o;::;S

SCHUP'%==2
SCHJJ%=:3

:UNKNOWN FUNCTION

SCH1'l.P%==4

,NO'f PRIVIl!EGED

SCH[JC%==5

:llNf'(NOlr1N CL,A5S
: llNfNOWN QUEUE

SCHNC%==7
r:.CHEP%==1. ()

JNO~·~XISTANT
:~:XPONF.NTIAL P'ACTOP

sc;n,l:%==11

:ATTEMPl TO SET

Be !oJ l: Q%==~

f

CI-lf!.:CK

UN"NmaJN JOB

!

ChANNEL
P~Ol

J40

BAD
WH~N

UUOSYM.MAC

(
T, Ut,1M== I BO
AT,UUivl==181

~

(

1FLACE IN MONtTOP MODE
:?IlACe: IN USER MODE

..

(

(

(

f·

(
J41.

UUOSYMMAC

SUB1TL

UNJVEFSAL DEVICE INDEX

(

.UX(;HN=:O

:l/DCHA"lNEL NUMBER
:00JOOO-077777 ARE PHYSICAL DEVIC~S
lJX.JYP==77B26
:DEVICE TYPE (SA~~t: AS Dt::VTYP)
UX,UN!==777
rUNIT WITHIN TYPf
.UXTRM==?OnoOO :TERMINALS
.UXPRC~=30nooo
:PPQCESS

(

(

J-42

UUOSYM.MAC

SURTTL

(

.JBINT INTERCEPT

BLOC~
~ ___ - - I

, ·, .-------------------------------------------------------.
,• ,
PC
BLOCK
I ______________________________ -

·

,• ,•
t
~

,•

,•

•

!_~

__________________

NE\~
Lt~NG't'H
____ __ •• _____
_____ ._" ______ ._ • • _____ •
~

~w

______ ._ • • •

nLD PC AND Fl.:AGS

,

·
I

:•
I

CLASS Of INTERRUPT

!=======================================================1

.ERNPc==n
~LH=LFNGTH, RH=NEW PC FOR INTE~RUPT
.ERCLS==l
lCLASSES or EBROR r~TERCEPTING
ER.MSG==lBO
,SUPPRESS ERROR MESSAGE
P~.EIJ==1B29
:~RROR IN JOB
fR.TLX==lB1Q
,TIME LIMIT EXC~€DED
FP.QEX==1811
1QUOTA EXHAUSTED
F:l<.FUL==lB'32
,rILE STPUCl'UflF nnL
F~,OFL==1B33
:DISK UNIT OFF-LINE
F.R,ICC==tb34
,CONTROI.!""C INTERC.r~Pl
fR,IDV==lb35
'"PR~BLEM ON DEVJCE" ERRORS
.~papc==,
fOLD PC
.BRCCL==3
:R~=CHlNNtL, LH=CLASS OF INTERRUPT

(

(

(

-_I

!.

i

(
J43

UUOSYM.MAC

SUBTTL

PSI

SOF1WA~E

INT€RRUP1 SYSTEM

(

:lNTERAUPT VECTOR
: SETS Of 4-WORD ~LOCKS
•, ,•
!============~==============~==:====================== ==1
•, •,
,,
,,
,• •,
,.
,• •
:

NEW PC

A~iP

P'Y.I.AGS

··. .
OLD PC Af>lD·fo'L4GS
·-1
1/0 REASON
·.. !!-------------.~.-.--- ... --.---.--.--.-------.--.----.
!----..• -----~--.--.---.---•• -.---.• --•• ---.---.-~.-- --1
,
INTERRUPT STAtUS
,,

·.

I

ID1R!A!0!~!1!

!======-========:================:==========~======:== ==1

.PSVNP==n

1NEW PC

.PSVOp·=::1

fOLD PC ?HiD FLAGS

.1-'5 VF'IJ==1.
,fT.l4GS
PS.VPO==161
PS.VTO==1R2
PS.VAl==tt~3

PS.VDS==1e.4
PS. VP,vl==lb5
PS.Vffl==1t'>6

AN~

FLAGS

(
:TURN PERMANENTLY OFr, NO RESTORE
: TURN OfF, f/.ESTOPf ON OEBKJ<.
:ALLOW AOOITIONAL I~TERPUPT
: D rSCARD SOCCeSSI VE HlTERRlJPTS WHHIE INTERRUPTED
,PRINT STANDARD ~SSSAGE
:I~TEHRUPTS IN PRJGRESS FOR THIS BLOCK

(HSFD bY PSISEP)

PS,RID==lBt9

PI), HOD:= t b2 0
~S.HEf==lB21

:REASO.N .... rNP1.]T DONr'
'Rf.ASON ...... OtJTPl.JT T')ONr:;

p~~pnF=:,p?5

:RFASON·-END FILE
:REASON·-INPUT 8PROR
: REASON ...... OlJIPUT E, ;H~OR
:REASON· .. OEVICf nFF-LI~E
:~PASON--DEVICf FULL

PS • ROE:::; 18 26
PS.k~T=::1~27

~ REASON .... (~UO"T A ~,XCE:E:DEI)
:R~A50N~-rO WAIT

PS,HJf==lB22

00. [-WE=: 1 htl 3

PS.RDO==IB24

.PSVJS==3

(

STATUS (AUX~ WORD)
JIO DEVICES RETURN
UDX"GETSTS

:JNr~RRUPl

,<,

J44

UUOSYM.MAC

(

:NnN-DEVTCE CONDITIONS
• peTIE=:-1
.PCAPT==-2
• PCSTP==,.,,3
.PCUUU=="4
• Fe I Ul)== ... S
.pcrMk=="'6
~pct.(:t<== ... 7
.FCP,R1.=="'10
.prF'DL:::::;"1.1
.PCTT3=::::"12

,TIME LIMIT ExctEDED (NON-BATCH ONL¥)
:ARURT (-A); RETURNS lBO=1 If TI ~AIT; (FUTURE)
:STI,)P C"'C), Rt:TLlFNS 190=1 IF 'II ItJAtT
1ANy' ~HJlr 0: RET 1I HNS UU0
:ILLEGAL UU~, RETURNS UUD
,ILLEGAL MEMORY P~fERENCF
:AOCRESS CHECK: RETURNS n~VICE NAME
,ARITHMETIC EXCEPTION
,PDL UVC;PFLOl.oJ

.PC'APC;=="'14

:TRAP TYPE 3 (FUTURE)
,NDN-EXISTFNT ME~ORY
:APR CLarK: PETUPNS MSTIM~

• PC (JF;d=::::,..15

!(JISF~H

.PCXB\T=:: .. lf.,

J~XTERNA~

.PC!J S r A r lJ $

-lOR TTY UDX
i~ A 1< r-: R

:IPCf RECEIVE; RETURNS LE~GIH"PLAGS
rPEMDTF COMPUTER CQND!Tln~
: f N (j I f) E: 0 RF SOU PC SA v.A. r Il A P L., F:

(

(
J-45

UUOSYM.MAC

(

:INTERPUPT ENABLE REGUEST BLOCK
t SgTS OF 3-WORD BLOCKS
• PSEC~j==O
• i?St:OR== t
, PSr..:PR==2

tCONDITION OR DEVICE
,OFFSET"REASQN BITS
,PRIOPI1Y"RESERVED

:PISYS. FUNCTION BITS
j:'S.fC'lf==181
ps.rO~==162

r s • ~'C p == 1 B3
PS.fC6==lEl4
PS.H1C:=tB5
PS.fAC==18~

,TUHN OFF'
. , TUf:N ON

1CLSAR ALL PENDI~G INTEkHUPTS
:CLEAR SELECTED INTERRUPT
:R~MOVE CONDItION OF DEVICE
,POD CONDITION OR DEVICE

:PISAV./PIRST. FLAGS

(

.PSSFC==O
:FLAGS"COUNT
PS • SO £Ii == 1 8 0
: SYSTE1·( IS o!II
.P5SIV:=1
,ADDRESS OF I~T€RRUPT VECTOR
.PS5BL=~2
:START or 3-WORD BLOCKS
~PTSYS.

FkHORS

PSTM.A>i;==O
PS~':fSS;;==l

PSUIo(F%==2
psn(jf%=~3

PStiKC~==4
PS!)~lO%==5

PSPRV%==f;
PSJVO%==7
PSlJf:.C';CF.:%:;;:I;3
PtG~lCTYD==l.
~CHAN~EL
~C~STS==17777B12

(

COOt:
ID

.iv"tCTYI~::;O

,MCSTS==3

(,

STATUS
~STATUS MASK
;USER SEGM€~T

ADDRESSED

JOB NUMBEP

,DTSPLAY CHANNEL ARGS
,!V:CTcn==5

• f'~C P'i'R==6

'AV~RAGING TIME tONSTANT
1DEPOSIt BYTE POINTER

,

'j

(
I-54

UUOSYM.MAC

(

:YRAC£ CHANNEL ARGS
,ueaR ADDRESS OF
MC.WAK==lBO
:ENA8LED
,~CBUF==6
,USER ADDPESS OF
,1\1CIOX==7
:USE:R .~Dl)RESS op·
.MCCNT==10
:USER ADDRESS Of
.MCBFL==11
:BUfFER LENGTH
,~CFtG==5

J ARGmiEN T BLOCK F'CJR

• l"lPFlrN=;;O
.MPAPP==l
• "'1 PN !J;-'>== 2
.MPADR==3
,,-VlPERR==4

(

~,~a;TER.

fLAG AND STATUS WORD
FOR WAKEUP
IRACE BUfF~R
BUFn;R INDEX
~AKEUP

PO INT FUNCTIONS

,UUC fUNCTION CODE
,NUM ARGS PER POINT IN LIST
:NU~H~R OF POINTS IN LIST
,AnDR~SS OF POINT LIST
:AODRESS OF ERROR POINT

:IAG DISPLACEMENTS PER POINT IN POINT LISt
:POINTNAME
,URER POINT 10
rPOINT PARAMETER
rJoe NUMBER
,POINT STATUS
~P.ST5==11777B12 :POINT STATUS MASK
MP,ENB==1BO
,POINT IS ENABLED
MP.USA==t81
:US~R SEG~ENT ADDRESSED
,MPPRT==5
,POINT ROUTINE TY~E
~MPRN==OO·
~NULL ROUTINE
.~PHV==Ol
,INTRINSIC VALUE
.MPRT==02
:TIME INTERVAL
.MPRVI==3
:INTRINSIC VALUEtPOINT 10
1T1ME+por~T ID
,MPRTI==4
.MPPRP==6
;POINT ROUTINE PARA~ETER
,1',1PCII.>==7·
,USER CHANNE't, ID
.MPNA~==O

.MPPID==l
.MPPAR==2
,MPJOB==3
.MPSTS==4

(

COUNTER

(

I-55

UUOSYM.MAC

SUBTTL

ENQUEUE AND DEQUEUE SYM80LS

(

'JI=======================================================1
It CJ F'
OC KIS
LENGTH OF THIS BLOCK
r~

:: !
"

•

HEQUEST ID

_____________________________________ 8

________________ _

'.' ,-------------~--------------------------------~--------1
,U:': VEL "

::!Sld! PESERV!D 1

..- ,
,

,:

bYTE PQINT~R TO STRTNG OR U5EP CODE
!~----.--.--------~-----.--~~.-.--~-

'"

:;!

.it

nf HES,

III. POOL

.. -.-.-..
# WANTED

.. -----.--1

Or< GROUP /I

r:I
~

/

:/

3 WORDS FOR EACH LOCK

I

I

: : I

::!S!Bl R~SE~V~O!
:; :--.-.--.----- •• -.-----~-----.------.-.-.---" •• -~.--.- --I
'1!
POINTER Tn STRING OR 5b2+USfP COCE

"I·_· __ •• ___ __ ___ ___ •__ ••• ___
·~~

,:1
f:

·~·

~·

• nF PFS 1M POOL

~"·_·~_·

WANT~O

______ ··w •• -1

DR GBOUP

~

I
!=;==================~==================================1

• ENUT.,L=::O

/I

1 NU,'jBF;f/. Of LOCKS AN£) Lf.tlGTH

,NUMBER Of LOCKS
'LE~GTH Of BLOCK

BQ~L~G:=777777R17

EQ.LtB==777777B35

.E'JGfL,.:0

,nLIl.GS,

1,~:VF;L,

(

CHAN

EG.fSR==lB0
, (;j • f" e1.1 :: =1b 1

,SHARED REQUf5T
, t'l YPAS S TJE VEf, CIi e: CKIN G

fQ.FLV==777~17

:G~VEL

#

:CHAN. NUMBER OR CODE
.EQFJ8==777777 ;CUDE FUF THIS JOB ONLY
,~GFGL==177776
,GLOBAL LOCK
.EQFPL==777775 ,PRIV. GLOBAL LOCK
~E~QBP==1
:BYIE POINTER OR USER CODE
~Q,8UC==5B2
;8E1 IF 33 BIT USER CODE IS USEP
.~NQPS==2
,POOL SIZ~
EQ.f~C==777777

EQ~PPS==777777H17

~TOVd,,1

FQ_PPP~=777777U35

f N11i1 B k; B RE: QUE: S l' EDF HOM POOL

SIZE Of' PrJUfJ

(
],56

UUOSYM;MAC

(

: Ii: fI; Q. f Utl CT ION

CODF~S

,ENQ8L==n
• EtH.lA!I== 1
.ENQ51=='-

,ENG, 8LOCK TILL AVAILABLE
JEN(J • ALLOCATE ONLY If AVAILABLE
,e;Nq, SOFTWARE INTERRUPT ~H~N AVAIL.

.ENG~~A:::=.3

:E:"!C~,

, DE Q. FUN C T 1 0 I~
.r:n·;GPR==O
,Df:~(}f) A== 1

.OEGILJ==2

MOD 1 FY A.CCESS

CODES
:DF.:Q, RESOIJf{CE
'DE\~I! ALL

,DEQ. BY R8QUEST 1.0,

, EN OC. F tJ NC '1' J 0 >.) COD.ES
,ENQC.s==O
~R11:l'URN

,ENQCG==l
,r~NQr.C==2

• f: ~I or. (;:'::: 3

STATUS
:GET USER'S QUOTA
rtHANGE USFRS QUOTA
,CUMP THr DATA 8ASE

(

(

I-57

UUOSYM.MAC

,:FORMAT OF ENQC. STATUS BLOCKS (FUNCTION 1)
,,1=========================================================================1
'Ill 10 lQ!X!
I
LEVEL #
!
JOB' OF OWNER OR ERROR,
1

(

"1···-·--·----·--·-.·--'·-~-···-··-··-····~---·--------~··-·-·--·-··--·····-1
J:l
TI~E·STA~P OF LOCK
'Jl··----·------··~-.·~-·-.·.-·~--~-··-··-·--.-·-·-·-- ··

.. ···_-_·.··········1!

'1!
RESERV~D TO DEC
~EQUEST ID OF CALLER/O~NER
:,!---.-~-----.----.-.----TWO WORDS FOR EACB LOCK IN ~NQC. REQUEST

.. ---------------.--.---.. -_····_··_············-1I
I
I

.ENQCf==O
:FLAG
EQ,CFl==lBO
FQ.CFO==1B1

WORD
.LOCK IS INVALID
,THIS USER IS THE OWNER
fQ.CFQ==lB2
,TBIS USER IS IN THE aUEUE
~Q.CFX==lB3
JTHE OWNER HAS EXCLUSIVE ACC~SS
fQ.CFL==777B17 ,LEVEL NUMBER
FQ.CFJ==777777 ,JOB # OF OWNER (OP ERROR CODE)
.ENaCt=='
:TIME-STAMP CTIME LOCK WAS GRANTED TO OWNER
IN UNIVERSAL FORMAT)
:REQUEST
OWNER/CALLEP

.ENQCI==2

10 OF

(

(

I-58

UUOSYM.MAC
'~FORMAT

FOR ENQC, DUMP

:,!=====================:=================================!
NUMBER OF WORDS IN THIS BLOCK

~:1=================================================== ====1

J11
: J!

LOCK-SLOCK FOR LOCK

•, ,• litI

•, •r •I

..

1

I

..... --..

.. -.-- ----1

,:!--~--~-----.--~-.---.--.~---~--:;1
OUEU~ BLOCK FOR FIRST ~NTPY Of LOCK 1
,•

,I

•I

·,, ,," .
'"

!)UE1Jr~

• • ,,.!

(

: i I
, :I
: ; I

lWO

~ORO

Bl)OCl< FOR SE:CCHIiD
QU~UE-BLOCK

ENTRY

or

LOCI< 1

FOR EACH WAITER FOR LOCK 1

I
I
/

'1~======:===;====================:=:===:=~:=======:== ====1
• •,- t'I

,

•, I, l'r-I

:,!

LOCK BLOCK FOR LOCK #2

: : 1

..

-.-.-~---~-~ ··--1
,,:,!.-.-.-.---.q---".-.--~-.-------.----,, ,
OUEUE ... BIIJCK fOR FIRST WAIIEF HlP LrJCK #2

·.,
.. --------~---~--- ----I
·,,:!.------.-------~-.----~----.----., ,
~

,

,

I!<

.,.,

, ;!

: 1/
=: I
, : I

::/

(

QutUE-BLOCK fOR SECOND WAITER FOR LOCK .2

I

LOCK-BLOCKS AND QUEU~ BLOCKS FOR THE ENTIRE
ENO./DEG, DlTJ BASE

/
I

: ; I

/
I

J:I

I

1-59

UUOSYM.MAC

"FORMAT OF EACH LOCK·ALOCK
,,1=========================================================================1
,,1 li OITIOIOI
1
LEVEL #
I
LOCK I.D.
1

..

(

•• •·····•••• •• 1I

"1···.·.·······-·-·~·--.-.~.·.·······-·-.-·.-··.·.- ·.~·.····
# IN POOL OR 0
1
# REMAINING OR 0

r,1

'JI···--···.-·-.··~·····-··············-··-·········.- ······················1
JrI
TIME~STAMP
I
'Jl··~··---·.-.·-~-··-~··~·-····.··

•• ·-···.·--·······. ··················_···1

1f!

ASCIZ STRING (MAY BE SEVERAL WORDS) OR USER CODE

"1===~========:====================================== =====================&1

J,rORMAT OP EACH QUEUE-BLOCK
'J!============================================~=~==== ==================s===l

:: 1

OlL010IXIBl

JOB II

r:l~-·-·--·-····--.-·.-·--·-····-···-·-·.-···-··-.···-~.···-····~············1
IJI
GROUP. OR • REQUESTED'
REQUEST 1.0.
1

,,1=========================================================================1

:FLAGS IN FIRST

EQ.DU!==180
EQ. OLO=:;! S 1 .
EQ.DLT==182
F,Q.DXIl==IB3
E:Q.DJloJ==t84

WORD Dr EACH BLOCK TYPE:
IT~IS IS A ~OCK BLOCK
,THIS IS THE LOCK OWNER (QUEUE-BLOCK ONLY)
,THIS LOCK HAS TEXT (LOCK.SLOCK ONLY)
rEXCLUSIVE ACCESS (QUEUE·BLOCK ONLY)
,THIS JO~ fS BLOCKED WAITING FOR LOCK (QUEUE-BLOCK ONLY)

,FORMAT Of LOCK·SLOCK
.EQDFL==O
,FLAGS AND LEVEL
FQ.DFL==777Bl1 ,LEVIL.
~Q.DFI==777777
:LOCK I.D •
• EQDPP==t
rPOOLf,D PEQUtST COUNTS
EQ.DP~==777777B17 ,SIZE Of POOL
~Q.DPL==777177B35 :NUMBER LEFT
.EOOTs==2
,TIME~STAMP
.EOOSU==l
,STRING DR UStR CODE

(

(

rfnRMAT Of A OUEUE~BLOCK
.EQDFJ==O
,FLAGS A~D JOB #
EQ.DJN==777B35 ,JOB NUMBER
.EQDGI==l
,GROUP # AND REQUEST 1.0.
EQ.DGR==777777B17 ,GROUP OR • REQUESTED
EQ.ORI==777777B35 ,REQUEST 1.0.

(

(
J-60

UUOSYM~AC

ENQRU%==l
EN08P%==2
ENQBJ%==3
-' ENQBA%==4
ENQST%==5
ENQSF%==6
!NQBL%==7
• ENQIC%==10
ENQBC%==11
ENQPI%==12
ENQNC%==13
ENQFN%==14
ENQIN%==15
ENONO%==16
FNQw$%==17
( ENQCC%==20
ENQQE%==21
ENGPO%==22
ENQOR%==2]
ENQNF%==24
ENQLO%==25
ENQED%==26

,SOME RESOURCE(S) REQUEST WERE UNAVAILABLE
,ILLEGAL # OF RESOURCES REQUESTED (POOLED R~SOURCES)
:BAD JOB NUMBER
,BAD BYTE SIZE IN TEXT STRING
1STRINGTOO LONG
,BAD fUNCTION CODE
,ILLEGAL ARGUMENT SLOCK LENGTH
fILLFGAL NUMBER OF LnCKS SPECIFIED
fB~D CHANNEL NUMBER
:OPERATOR/JACCT PRIVILEGE REQUIRED
:NO COPE AVAILABLE
JFILE NOT OPEN ON SPECIfIED CHANNEt, OR DEVICE NOT A DISK
,INDrRECT OR INDEXED BYTE POINTER NOT ALLOWED
'NO RESOURCES WERE OWNED
'LEVEL SEQU~~CING ERROR (LEVFL # TOO LOW)
,CAN'T CHANG~ ACCESS
fQUOTA EXCEED~D
:# OF PESOUPCES IN POOL NOT SAME AS r~ LOCK
;DUPLICATE REQUEST FOR RESOURCE (LOCK AL~EADY REQUFSTED)
,NOT [NQ'~D ON THIS LOCK
:LEVEL • IN REQUEST DOES NOT MATCH LOCK
~ENQ/DEQ PRIVILEGES REQUIRED

(

(

(
J~l

UUOSYM.MAC

SUB TTL
DV .DrU==H~O
DV.DSK==lBt
DV,CD.R==LB2
DV,LPT==tB3
DV~lTA==lB4

DV.l'TU==l.85
DV.JTB==lB6
DV.DIS==lB7
DV.t,NG==tBB
DV.PTf=.:lB9
DV,P'1'B:-:=1810
DV.D'tA==1811
DV,AVL==UH2
OV,tilTA.:;-::1i:313

DV,11'1=;;1I311
DV.OTR=;;lBl'5
nV.IN==lR16
DV.OUT;;=lB17
DV.ASC::::;1B18
DV.ASP:::::1B19
DV .f'.H 7.:':1820
DV.~~16:::1B21

DV.l'i15:::;;1,822
DV,lvi14.:;;Uj23

DV,M13==lB24

nv .1"112:;;' b25

DV,il<'ll==lb?6
DV II (\"10==lB27
DV.M7.:=182A

DV.N\6;::=1829
DV.!v15;:::U"30
DV.~:4:;;::l£1.H

OV,f'l3==lP·32
nV"M?==1R.33
DV,Ml=:1834
. DV"I~O=;::Ud5

M1 Be·.

1/0 "' ... DEVCHR

;DTA wITH DIRECTORY IN COPE
,DEVICE IS A fILE S'IRUCTtJPE
:IF' DVOUT=l DEVICE IS A CDP
,• If DVIN=l Dh:VrCE IS A CDR
'DEVICE IS A llINE PRINTER
:DEV!CE IS A TTY CONTFOLING A JOB
:TTY DDB IS :eN USE
:fREE BIT LE~F'T fRQI-' SCNSRF'
,DEVICE IS A. DISPLAY
:DEVICl': HAS A LONG DISPATCH TABLE
: uf<:V!CF: IS A PAPEIol TAPE PUNCH
: DEVICt~ .IS A PAPF:F< TAPE RF ..AD.EP.
:DF-VICE IS A D1':C TAPE
,DEVrCF IS A.VA ILASLE TO THIS JOB
:DEVrcr.~ IS A MAG TAPF:
:DEVTCE IS ,.. TTY
:DFVrCF' l-lA.S A fHRECTOPY
:DEVICF CAN 1)0 INPUT
1DI':VTCE ('AN 00 OUTPllT
rDEV:r:C~: ASSIGNED BY ASSIGN COlv1MAND
,DF'VIC~ ASSIGNE.:O BY IN!T (IF OPEN UUO

(

(

:DEV!CE C' AN r'o MODE 17
,DEVICE; CAN DO MODE 16

rDEVICE

CAN DO ~1ODE 15
CAN DO HODE 1,4
MODF 13
1 DEV rc~: CAN
fDf.V!CF~ CAN ,no MOD~: 12
,pf:vrCE CAN f)U IQODF. j 1
1DF.VrCr~

no

(

no MODE 1 0
,OFvrCE CAN DO MODE 7
J DEV ICr~ CMJ 00 MODE 6
1PEVICE CAN no MODE 5

;DEVICE CAf<,1

,Df-VICE CAN DO HODF. 4
'DEVICE CAN DO MODE 3
:DEVICE CAN DO MODF 2·
,DEV reF eMi DO tviODP~ 1
:DF:VICE (:f.;N no r>10Dfi: t')

J-62

(

UUOSYM.MAC

MISC. 1/0 .- DEVTYP
;FIHST THE TYPE CODe;s
,TYDS.K==O
:DEVICE IS A DISK
,TYDTA=:!
:DEVICE IS A DEC TAPE
,TYMTA==2
:OFVICE ts A MAG TAPE
.TYITY==)
:DFVrC8 15 A TTY
,TYPTR==4
,OEVICg IS A PTR
,TYPTP==S
1D~VJCE IS A PTP
,TYDTS==6
,DEVICE IS A DISPLAY
,TYL?T==7
:DEVTCE IS A LINE PRINTEP
,TYCDR==10
:Df,VICE IS A CARD READER
.TYCDP==11
,DEVICE IS A CARD PUNCH
.TYPTY==t2
,DEVICE IS A PTY
.TypeT==l)
,Of,VTCF. IS A PLOTTER
,TYEX'l'== 1.4
,EXTERNAL TASK (DA28C)
IITYNPX==15
:1.;ULTIPLEXOR
• TYPAf<==-16
:PA611R o~~' DC44
.TYPCf<==17
: f'C 11 ( R) ~ N DC 44
.TYPAP==:?O
:PA611P 0
DC4:4
.TYLPC==21
:LPC"11 O. DC44
.TYP.CP==~2
:PC-l1(P) ON De44
,NOW THE CHARACTFBISTICS
TY,MAN==l~O

TY.MDA==lSQ

(

TX.E~F==lB10

TY,MPX~~la11

=

T Y • A V-L = 1 8 1 2

(

T¥.SPL==lB13
TY,INT==1614
TY.VAR==lBt5
TY,IN==lB16rY,OU1==1a17
TY.JQB==777B26
TY.RAS==tS29
TY.DEV==77B35

IS REGUIFED
,OEVICE IS CONTHOLL~D BY ~OUNTABLE DEVltE
: ALLOCATOR
:EXTEND~D HARDWARE fEATURES:
:IF LPT THEN HAS LOWER CASE
.D~VICE CAN BE USED VIA MPX:

;LOOKUP/~NTEP

: D~; VIC E 1 5 F REE
:O~VICE IS SPOOLED
,DEVICE 15 INTFRACTIVE
:O~VICE HAS VAPIA8LE BUFFEP SIZE
fDF..~VICF CAN DO INPUT
,DEVICE CAN DO OUTPUT
:JQ8 NUM8EP OWNING DEVICE
,FESTRICTED DEVICE
,DEVICE TYPE

J-63

UUOSYM.MAC

SUBTTL

MISC, 1/0 •• MTCHR.

(

MT,AWC==777777B17
~ACTUAL WORD COUNT
~T.CPC==777B26
JCRe LAST READ
MT.NCR==7829
:NlIt18ER CHARACTERS READ IN L,AS! WORD
MT.7TR==1831
17 TRAC~
MT.WLK==lB32
:WRITE LOCKEO
MT.D~N==7B35

:DENSIT~

.MTDN2==1
,YITD~'18==3

,200
:556
:800

•.~1T[J 1. b==4

:l~OO

.~!jTDNS==2

.N1TRJD==l

,MT\>,.RD==2
.MTW\\lT==)
• MTS~E==4
,i'nHRE==';

.MTSi.-Ji!.==n
• !iI:! h ~!f==7
., i'v1 T T r.,~ ~: : .1 0

=

.MTTDf~==11

,{If;T'TU!'i:::= 12
.MTNP"B=='3
.M'TNRF===t4

.iv1TICC==1!:)
.MTrC'C==17
,t~TFCS===20,

.i~TlPY==21

f FF:Er~ 10
r~ORDS BEAD

(CHARS IN 6.02)
,wnROS WRITTEN (CHARS TN 6,02)
,SOfT READ ER~aRS
:HARD READ ERknRS
;SGfT WR;T~ SRRORS
,HARD WRIT~ ~RRORS
,IOTAL M~DIA ~RRORS
:InIAL DFVICE ERRORS
,TOTAL UNLOAns
:NUMRER OF FtLES FROM eOT
,NUMRER nF R~CPRDS fROM Eor
:lNITIAL ERPOR CO~I MIC
flNITIAL FRROH CONI MIS
rFINAL ERROR CONI MTC
:FINAL ERROR CONI MrS
,BEtRIES TO RESOLVF LAST ERROR

(

(

(
J-64

UUOSYM.MAC

SUB TTL

(

MISC. 1/0

-~

TAPOP.

:;TAPOP, UUU TAKFS N"BLOCK IN At WHERE BLOCK CONTAINS:

"
:~
n

n

: 1

fJ
, 1

(

(

(

FUNCTION CODE
.I====~==================================================1
----•. ----•••
~----.--- ••.••. --••.• -.-.----.•••• ---I
,
DEVICE NAME, CHAN, OR UDX
.!---..
I

! •••• ~.-.--.-.-.--~.-------.- ••••••• ~--- •• -.-.--- •• - •• ·-1

ARGUMEl'JT 0

,,• ,:•

J- •• --~- •• ~-.---- •• -.----- •• ~.- ••• - •• -~- ••• --.----.-.- ·-1
ARGUMENT 1

J:
f :

I
I

I

,• •,
,• ,•

I
I
I
1··········---·--··--~-·-················~-····.·-·-·· ·-1

J:
;

!=======================================================1

,

,TAPOP, 'UNCTIONS:
:WAl! FOR 1/0 TO STOP
,"('FiAiAT==t
:R!WIND TO LOAD POINT
• TFBFl,'i==2
:RE~rNn AND DNLOAD
• Tnl~IL=="3
:5KIP FORWARD 1 ALOCK
,1'F"fSB==4
1S~IP FOP~ARDI F1LE
,TFfSf==C;
:S~IP TO LOGICAL END OF TAPE
,T'FSLi£==6
,SKIP eAC~wARD 1 BLOCK
.'fF'BSB=:;7
:SKIP BAC~WAPB 1 fILE
,1'F'8S.F==10
,wRITE lAPE MARK
,TF'WTM==11
,WRITE 3" OF BLANK rAPE
,l'FWLG==12
:CAIA SECURITY ERASE (~LAN~· WHOLE TAPE) TU70
,TFfJSE==13
:~RITE LOGICAL ENOOF TAPE (~TM, ~TM, BSB)
.TnJLF:=::l·~
:LABEL GET crOR TAPE LABEL MGR.)
.l'FIJ!;lG==15
:LA~EL RELEASE (FOR TAPE LAbEL MOR.)
,TFLRL==16
1S~AP UIJITS (fOR TAPE LABEL MGR.)
.l'FUiU::::;l7
:DESTROY LABEL DDB(FOP TAP~ LABEL MGR,)
.1'FI!DD== 2Q
1fORCE END OF VOLUME PROCESSING
• TFn: V==21
: USt;;H RF;;~QLi8ST
• TF i1 H(J =: : 2 :2

(
J-65

UUOSYM.MAC

:READ PAPAM~TERS. PESULT TO AC~
.TFTRY==1000
,RETRIES ON LAST ERROR
.TFDEN==1001
:D~NSrTY
.TFOOO==O
~ :UNIT DEFAULT
.rr02o==t
~200 BPI
,IF055==2
:556 BPI
.lFDRO==3
:~OO BPI
,lFD16==4
~1~00 BPI
.fF062==5
J62~0 BPI
.TFKTP==100~
:CONTROLLER TYPE
,IFKTA==O
:TMI0A
.TFKfb==l
1TMI0E
.T~KTC==2
:lCI0C
,rp~TX==3
:TXOI
,RFAD BACK~ARDS (1U70 ONLY)
,IFROB==1003
.TFLTH==1004
:LOWrHPFSHOLD PEAD (TM10 ONLY)
,IFPAR==l005
f~VEN PAPITY (7IRK ONLY)
.rF6SZ==100~
.TF~OD==1001

:bLGC~

(

(

SIZ~

:MOOE

.rF~OD=;O

,TfMI0==1
.lP,:·i88==2

:DFC COMPA!, CORE CUP?
:lNDUSTRY CaMPA!, CORE DUMP
fa-BIT MODE (4 BYTES/v·jORD)

.rF~6B=;3

,6-BI! MODE (9-TRACK 1U70

.TFH7B==4

:7-BIr MOOI':

ONL~)

(Tt)70 ONLY)

:7-TPACK CORE DUMP (SIXBl!)
J7-TRACK aIr
~wRIT£ LOCK Cl=YES, O=NO)
rCHAR. COUNT OF LASt RECOPD
:RFELID
rLAST CRe (9-IRACK NRZI ONLY)

~1'~17T==5

.TFTPK==1010
,TFWLK==1011
~rFCNT==1012

.TFRJD==J013
.TFCPC==1014
.TFSTS==~.()1.5

rUNIT STl\TOS
,UNIT IS NOT TO BE

1'f,tJNS;='B18
Tf,80T==1819
Tf wWLK:='S20
TF.RE~:=lB21

Tf.STA==lB33
TF.SEL==lb34
Tf.OFL==1835

(

SCH~:DULF~D

,BOT
~~R!TE

:UNIT
:UNIT
:UNIT
,UNIT

LOCK
IS REWINDING
IS S1ARTEO
IS SELECTED
IS OFF-LINE

J-66

(

UUOSYM.MAC

(

.TFSTA==10161UNIT STlTISTICS TO ARGS 0 TO 12
.TSFIL==O
:NUMEN OF FILES SINCE BOT (fIL~ #)
.TSREC==j
;NUMBgp or RECORDS SINCE Eor (BECORD #)
.TsrCR==2
:TOTAL CHAPS. READ
.1srcw==]
:TOTAL CHAPS, WBITTEN
,ISSR~==4
:SOfT READ ERRORS
.TSH?E==5
,HARD READ ERRORS
,lSS~g==6
:SGFT WROTE tHROBS
.TSHW~==7
,HARD WRllE FRRCRS
,TSESV==10
;TGTAL ERRORS SINCE UNLOAD (MOUNT)
.TsrDE==ll
:TOT~L DEVTC~ FRPOPS SINCE SYSTEM STARTUP
.TSUNL==12
:TOTAL UNLGAOS
.TFIEP==1017
~lNITIAL EPROR POINTER
.TFFff==1020
;fINAL ERROR POI~TER
.TFI~R==1021
1)NITIAL EPROR STATUS
.TFFER==1022
'~lNAL ~RRQR STATUS
.TFfFD==1023
:NUMBEP Of RETRIES
.TfL8L==1024
,TYPE Qr LABEL PROCESSING
.TFL8P==O
:BYPASS LABEL PROCESSING
.tFLAL==l
:ANSI LABELS
.TFLAU==2
:ANSI LABELS WITH USER LABELS
.TfL!L==3
:1bM LABELS
.TFLTU==4
:IRP LABELS WITH US~R LABELS
,TFGTM==5
JLFADING TAPE MARK
• TFT.;f-fS==h

(

(

~

NOt,"STANDAHD I.1I8ft,S

• TFLNL==7
~ rln I;A1H:I!S
,TFPL'I'::;:;:;tu'2S
.~SM1E AS .TFLBL EXCi,

(
J-68

UUOSYM.MAC

(

SUBTTL

MISC. I/O -- WHERE

RM,SUP==t7E17
,STATION UP STATUS
.RMSUN==l
,NCT IN CONTACT
.RMSUD==2
,DOWN
,PMSUG==4
:LOADING
, H/Ii S11 I~ ==1 0
; l./H\ DE:D
PM.• SDU=::QB13
,DIAl/-UP
SU~lTL

MISC. 110 .- CALli,

:FUNCTTON NOPD
Cl.1NO==777777B17 :WHICH -11
Cl.1FC==777777 :WHICH FUNCTION
.Cl1DP==O
,DEPOSIT fUNCTION
.Cl1EX==1
JEXAMINE FUNCTION
,Cl1GU==2
:QUEUE A BEyUEST
,C11NM==3
:RE1UBN NAME OF FRONT END PROG
.Cl1UP==4
'RETURN 0 IF DOWN, 1 IF UP
.C1.1~D==1
rAODR~SS or EXAMINEIDEPOSIT
.Cl1('I\j==2
,CONTENTS TO DEPOSIT
.C111O.:N==1
,STA~T OF QUEUE ENTRY
.CtlFC~=O

{

(

r vI LEG E'P

Cl1NP%==l

nW T

ell. UF'%=::?
C1 t ND%:=.]
C 111 U%==4

rUNKNOWN FUNCTION

Cl.t~A%==5

C1.1,15%==6

Cl1NF.:%==7

(J R

rNO'I' OC76
,~XAM/DEP IN US~
rNO ANSWER Tn EXAM/DEP
,QUEUE ENTRY TOO 5HO~t
~~OT ENOUGH APGS

(

J-69

UUOSYMMAC

SUB TTL

MISC, 1/0

~-

GETLCH' AND TRMOP_

Cr.J, REr-1== t B6
Gr•• PBS== 1 B7
GII.T..:IN==l811
GL. LC r,l== 1 a 1. 3
GL,TAB==t814

:INVISIBLE TTY (P!Y)
,SYSTEt

IFt,<
ASUFPPESS>
IFNOEf %•• C,
:END UNIVEPSAL OF UUOSYM
IFDEF %.C,
:BIND OfF TO GET CLEAN LISTING

If~,

right square bracket

< or A [

left angle bracket

>or A]

right angle bracket

A/ or c

backslash (\)

A4

034 file separator

"5

035 file separator

"6

036 record separator

A7

037 unit separator

A3

left brace

Al

vertical bar

A2

right brace

A_

tilde

A/

accent grave

(

I

\

(

NOTE
Each occurrence of the Acharacter may be substituted with a
\ or a plus/minus character. If the circumflex character is
followed by any other non-alphabetic character, the circumflex
is ignored and the non-alphabetic character is output to the
buffer. (These translations do not occur in APL mode.)

(

K-2

March 1976

2741 Terminals

(
It is recommended that you use a 2741 with the Transmit Interrupt Feature (i.e., the ATTN key, IBM feature
number 7900). Although this feature is not required, it is strongly recommended. The ATTN key, with this
feature, unlocks a locked keyboard, enabling you to type. ATTN also locks an unlocked keyboard enabling
output to be printed from the system without user interference. The DC76 recognizes a 2741 through the use
of automatic baud detection (a 2741 's baud rate is 134.5).
K.1 USER INTERFACE
Alphanumeric characters (ASCII characters 40-176 ) will appear to be handled in the same manner as other type
terminals. For example, when you press the uppercase A key on a 2741, the ASCII character code 101 is received
by the system.
A special set of SET TTY commands can be utilized for Model 2741 terminals. Refer to DECsystem-10 Operating
System Commands for further information. The SET TTY ELEMENT command changes the 2741 typing element
number. The usable typing element numbers are listed in Table K-2.
Table K-2
Model 2741 Typing Elements
Element Number

(

TypeFace

987

APL correspondence

087

CALL 360 BASIC

938

BCD

029

Standard Correspondence

963

Extended Binary (EBCD)

988

APL(EBCD)

The SET TTY TIDY command specifies that every character is to occupy one print position. The 2741 terminal
normally types characters on the page the way in which they were typed. For example, assume a character on the
upper row of the keyboard had the characters: and 4 on it. If you type a 4, a 4 will be printed on the paper. If you
type a : (by pressing the SHIFT key and typing the 4/: key), a 4: will be printed on the paper. In TIDY mode, though,
if you press the SHIFT key with the 4/: key, a: will be printed on the paper.

I.

t

)
(

'\

I

t

l

K-3

March 1976

(

(

(

(

(

(
INDEX

2741 characteristics, 11-8

(

(

Header, 7-10, 13-1
Numbers, 9-2
Size,
change for magtape, 10-1
disk, 8-1, 8-5
magnetic tape, 10-1, 10-8
BATCON,4.-7
BATMAX,4-7
Baud rate, 11-16
Break characters, 11-9
Buffer,
Data mode, 7-3
Header block,
structure, 7-10, 13-1
specifying, 7-3
extension to, 13-1
Input,
clear, 11-3, 11-6
. MPX,13-2
scan, 11-3
terminal, 11-6
general, Chapter 7
Output, 7-9, 11-3, 11-6
Ring, 7-10, 13-2
Size,
DECtape, 9-1
Disk,7-6
Magentic tape, 10-1, 10-2
PTYs, 11-14
Terminals, 11-1

AC,
display contents in lights, 4-11
Access protection,
directory, 8-7
file, 8-5
Accounting file, 4-12
Accumulated,
error count, 3-1
run time, 4-9
Activate dormat file, 43
Address,
break condition, 4-8
highest legal, 3-2
space for program, 2-1
Allocation tables, 8-5
ALT Mode, 11-8
APL Mode, 11-9
Append to file, 8-10
APR,
clock, 4-10
traps, 4-2
ASCII
character codes, 11-9
Line Mode, 10-2
Mode, 7-7,10-2
ASCIZ string,
output a, 11-2, 11-6
ASSIGN command, 7-2
Associating
a UDX to a device, 13-2
Device to channel, 13-2
Automatic baud detection, 11-6
Awaken job, 4-4

CCONT command, 4-1
CDP spooling, 4-6
CDR spooling, 4-6
Chains, device, 13-1
Change,
mag tape block size, 10-1
mag tape density, 10-1
Channel,
connect devices to, 13-1, 13-2
MPX, Chapter 13
Character,
codes,
ASCII, 11-9
Break,11-9
Mag tape, 10-1

Background job, 4-3
Backspace,
a file, 10-3, 10-4
a record, 10-3
Batch,4-7
Binary Mode, 7-7
Block,
Allocation of, 9-5
Directory, 9-2
Format on DECtape, 9-5

(
Index-1

INDEX (Cont.)
Terminating, 11-9
input a, 11-2
output a, 11-2
Characteristics
line, 11-2
mag tape, 10-1
Clear,
PC flags, 4-2
REELID,1O-12
terminal buffers, 11-3, 11-6
write-prc-tect hit, 2-1
Clock,
APR,4-1O
DKlO,4-10
enter request in queue, 4-12
internal, 4-10
CLOSE monitor call, 9-8
Closing
magnetic tape file, 10-1
DECtape file, 9-8
files, 8-10
CLRST. monitor call, 13-2
Cluster,
af files, 8-2
sizes, 8-5
CNECT. monitor call, 13-2, 13-3
Commands,
ASSIGN,7-2
CCONT,4-1
CONT,4-1
CSTART,4-1
MOUNT,7-2
PRESERVE, 8-2
PROTECT,8-7
REENTER,4-1
RUN,4-1
START,4-1
Configuration information, 4-11
Connect device to MPX channel, 13-1, 13-2
CONT command, 4-1
Continue,
device after error, 13-5
program
after HALT, 4-1
automatically, 4-2
SFD,8-2
UFD,8-2
Control,
Flags, 5-7, 5-9
Job,4-1
Software Interrupt System, 5-9

Controller,
DECtape, 9-1
Mag tape, 10-1, 10-8
Physical class names, 7-5
Terminal, 11-1
Convert ALT modes, 11-8
Core,
guaranteed amount of, 4-5
highest relative location, 3-1
image file, 2-1
maximum amount of, 2-1
CPPC, 2-5
CPPL,2-5
CPU,
contents of switches, 4-11
runnability, 4-6
specification, 4-6
Create a file, 8-10
CSTART command, 4-1
CTUOB monitor call, 11-17
CTRLjC,4-1
CVPC, 2-5
CVPL,2-5
DAEMON monitor call, 4-12
Data,
Block,8-5
Modes,
DECtape, 9-1
Disk,7-6
Dump, 7-7, 10-2
General information on, 7-6
Mag tape, 10-2
MPX devices, 13-2
Terminals, 11-1
Switches, 4-11
Transmission, 8-14
DATE monitor call, 4-11
Date,
algorithm for, 4-10
_ set, 4-5
Daytime,
algorithm for, 4-10
set, 4-5
DDT,3-2
Debreak conditions, 11-8
DECtape,
Block allocation, 9-5
Block format, 9-5
Block numbers, 9-2
Buffered data modes, 9-1

Index-2

(

.(

(

(

"-

<

(
"

INDEX (Cont.)

(

(

{

(

Buffer size, 9-1
CLOSE call, 9-8
Controller number, 9-1
Data modes for, 9-1
Dead reckoning, 9-11
DEVSTS call, 9-9
Directory, 9-2, 9-3
ENTER,9-7
File,
Format, 9-4, 9-5
Status, 9-9
I/O, Chapter 9
INPUT,9-8
LOOKUP, 9-5, 9-6
Mnemonics, 9-1
MTAPE., 9-9
Number
of Blocks, 9-2
of files, 9-2
OUTPUT,9-8
Physical name, 9-1
positioninb,9-11
RELEASE, 9-8,
RENAME,9-8
Unbuffered modes, 9-2
Unit number, 9-1
UGETF,9-9
USETI, 9-8, 9-9
USETO, 9-9
UTPCLR,9-9
Default directory path, 8-3
Deferred spooling, 4-8
Delete,
a file, 8-9
empty SFD, 8-10
empty UFD, 8-10
Density, 10-1
Device,
Associate
to channel, 7-2
to MPX channel, 13-1, 13-2
with UDX, 13-2
Chains, 13-1
Connect to MPX channel, 13-1, 13-2
Continue after error, 13-5
Disconnect from MPX channel, 13-2
Errors, 13-3
Generic names, 7-2, 7-4
Identification, 13-2
Initialization, 7-2
Mag tape, 10-1

Names, 7-4
Physical names, 7-2, 7-4
Reassignment, 7-13
Selection, 7-2
Specification, 7-1
Termination, 7-3
Digital compatible mode, 10-3
Directory,
Access protection, 8-7
Block,9-2
Devices, 7-2
File, 8-1
Format, 9-2, 9-3
Multiple file, 7-2
Path,8-3
Disk,
Block size, 8-1, 8-5
Data modes, 7-7
Unit names, 7-6
DKlO clock, 4-10
Dormant job, 4-3
Double tape mark, 10-1
DPA,7-6
DSKFULL,4-7
Dump data mode, 7-7,10-2
Dump record data mode, 10-2
EBOX, 4-10
Enable modem, 11-6
ENTER monitor call,
Argument Block, 8-18
General description, 8-10, 8-11
Extended argument block, 8-10
Error recovery for, 8-14
DECtape, 9-7
Parameters for, 9-7
On existent file, 8-14
Enqueue/Dequeue, Chapter 16
ERLST. monitor call, 13-3, 13-4
Error
Continue device after, 13-5
Count, 3-1
Codes,
CLRST., 13-5
CNECT., 13-3
ERLST., 13-5
IPCF,15-12
PISAV., 5-11
PIRST., 5-12
PISYS., 5-10
TAPOP., 10-10

Index-3

INDEX (Cont.)

(

FORM Switch, 11-7
FSA,7-6

TRMOP, 11-9
Device, 13-5
File entry, 4-12
Intercepting, 5-2, 5-3, 5-4
Logging, 7-3
Mag tape status, 10-9
Recovery, 8-19
Retry, 7-3
EXE files, 4-1
Execution,
start, 4-1
stop, 4-1
suspend,4-2
Extended argument block, 8-10
Extension to file name, 8-8
EXIT monitor call, 4-2

Generation files, 8-1
Generic device names, 7-2, 7-4
GETLIN Monitor Call, 114
GETPPN Monitor Call, 4-9
GETSEG Monitor Call, 4-1
GPPL,2-5
GVPL,2-5
Half-duplex terminals, 11-15
HALT Instruction, 4-1
Header block, 7-10, 13-1
HIBER monitor call, 4-3, 44,11-15
Highest
relative case location, 3-1
Legal address, 3-2
Host computer time, 4-10

FACT file entry, 4-12
FHA,7-6
File,
access privileges, 8-5
backspace a, 10-3, 104
close on mag tape, 10-1
cluster, 8-2
create, 8-10
definition, 8-1
delete, 8-9
directories, 8-1 to 84
format,
on DECtape, 9-2
on disk, 8-5
generation, 8-1
length of, 8-1
names, 8-8
number of on DECtape, 9-2
owner, 8-6
status,
PTY, 11-15
Terminal, 11-12
structure,
addressing a, 7-2
names, 7-2, 7-4, 8-3
modifying, 8-4
referring to, 7-2
Filler class codes, 11-7
Foreground jobs, 4-3
Format,
DECtape, 9-2, 9-5
Directory, 9-2, 9-3
Disk files, 8-5
Mag tape, 10-1

I/O
interrupt conditions, 5-6, 5-7
General information, Chapter 7
Non-blocking, 74
With DECtape, Chapter 9
With Disk, Chapter 7
With Mag tape, Chapter 10
With Terminals, Chapter 11
Image Mode,
Disk,7-7
Character, 11-6
Mag tape, 10-2
Binary, 7-7,10-2
Dump, 7-7
INBUF Operator, 13-1
Industry compatible mode, 10-3
Initialization,
device, 7-2
job,7-1
software interrupt system, 5-5
IN monitor call, 8-19, 11-16
INIT monitor call, 7-3
Input,
a character, 11-2
a file, 8-10
a line, 11-3
buffers, 11-3
INPUT Operator, 9-8, 8-19,11-6,11-16
Internal clocks, 4-10
Interrupt,
allow additional, 5-9

Index4

(

(

(

INDEX (Cont.)

(

(

conditions, 5-6
control block, 5-7
definition of, 5-5
disable all,S-9
dismiss additional, 5-9
granting an, 5-6
1/0,5-6,5-7
in progress bit, 5-9
non-I/O, 5-6
Inter-record gap, 10-1
10NDX. monitor call, 13-5
IOWD,7-6
IPCF,
Address of Packet data block, 154
Association between PID and job no., 15-2
Awake on receival, 4-4
Capabilities of sender, 15-5
Default quotas, 15-1
Error codes, 15-12
Flags, 15-1
Indirect sender/receiver PID, 15-3
IPCFQ. monitor call, 15-10
IPCFR. monitor call, 15-11
IPCFS. monitor call, 15-11
Length of packet data block, 154
Long form message, 15-4
Name associated with PID, 15-2
Packet,
Data Block,IS-l, 15-5
Descriptor block, 15-1
Flags, 15-3
page, 15-3
privileged, 15-3
PID
definition, 15-1
of SYSTEM [INFO], 15-1
requesting a, 154
same asjob number, 15-1
Receive packet quota, 15-1
Receiving a packet, 15-6, 15-11
Send packet quota, 15-1
Sender's project-programmer number, 15-5
Sending a packet, 15-5, 15-11
Short form message, 15-4
Status of queues, 15-10
SYSTEM [INFO], 15-1, 15-6, 15-7
SYSTEM [IPCC], 15-1, 15-7, 15-8

Job,
Activate a dormant, 4-3
Amount of core for, 4-5
Awake when I/O complete, 44
Background,4-3
Control,4-1
Initialization, 7-1
Information, 44
Largest size of, 4-5
Maximum number of, 4-7
Name of,4-S
Number, 11-17
Obtain,
Number of, 4-9
PPN of,4-9
Search list, 8-4
Set parameters for, 4-5
Status bits, 11-17
Stop, 4-3
Suspend,4-2
Swap,44
Time limit for, 4-6
JOBSTS monitor call, 11-16
KSYS word, 4-6
Label processing, 10-9
Length,
logical disk block, 8-1
of files, 8-1
LIGHTS monitor call, 4-11
Line,
Characteristics, 11-2
Numbers, 11-4
Loading,
Core image file, 2-1
Relocatable binaries, 2-1
User programs, 2-1
LOCATE monitor call, 4-8
Logical,
Device names, 7-2
Disk unit, 8-1
End of tape, 10-1
Node, 4-8
Unit names, 7-5
LOGOUT Monitor Call, 4-2
LOOKUP Monitor Call, 8-10, 9-5
Lower case terminals, 11-6
.LOW files, 2-1
LPT spooling, 4-6

.JBOPC, 4-2
Job Data Area, Chapter 3
JOBDAT, Chapter 3

Index-S

INDEX (Cont.)
Magnetic tape,
Block size, 10-1, 10-8
Buffer size, 10-1, 10-2
Change
Block size, 10-1
Density, 10-1
Characteristics,. 10-1
Closing a, 10-1
Controller names, 10-1
Data modes, 10-1, 10-2
Double tape mark, 10-1
Error status, 10-9
File status, 10-12
Format of, 10-1
Logical end of, 10-1
Parity for, 10-1
Unit name, 10-1
Unit status word, 10-8
Master file directory, 8-1
MBOX, 4-10
Modes,
ALT,11-8
APL,11-9
ASCII, 7-7,10-2
ASCII Line, 10-2
Binary, 7-7
DECtape, 9-1
Disk,7-6
Magnetic tape, 10-2
MPX devices, 13-2
Terminals, 11-1
MOUNT Command, 7-2
MPPL,2-5
MPX channel,
Connect device to, 13-2
Data modes, 13-2
Disconnect from, 13-2
Status bits, 13-4
MSTIME monitor call, 4-11
MTAID. monitor call, 10-12
MTAPE. monitor call, 10-3
MTCHR. monitor call, 104
Multiple file directory, 7-2

(

Logical, 7-2, 7-4, 7-5
Physical, 7-2, 74
Set program, 4-4
Node, 4-8
Non-directory devices, 7-2
Non-blocking I/O, 7-4
Non-I/O Interrupts, 5-6, 5-8
Normal mode operation, 11-6
OPEN monitor call, 7-3,7-4
OTHUSR monitor call, 4-10
OUT Operator, 13-1
OUTBUF Operator, 13-1
Output,
ASCIZ string, 11-2, 11-6
Buffer, 11-3,11-6
Character, 11-2
OUTPUT monitor call, 9-8,11-16
OUT monitor call, 11-6
Packed image mode, 11-12
Page,
Definition, 2-3
Display mode, 11-7
Counter value, 11-7
Fault rate, 4-7
Fault handler, 3-3
Passive search list, 84
PC, 3-1,4-2
Physical,
DECtape names, 9-1
Device names, 7-2
Disk units, 8-1
Page limits, 2-5,4-8
Record separation, 10-1
Unit names, 7-5
PID,
association withjob number, 15-2
definition, 15-1
indirect sender/receiver, 15-3
name associated with, 15-2
of [SYSTEM] INFO, 15-1
requesting a, 15-1
same asjob number, 15-1
PJOB monitor call, 4-9
PIIN!. monitor call, 5-5
PISYS. monitor call, 5-5, 5-9
PIRST. monitor call, 5-12
PIM,ll-12
PLT,4-5
PRESERVE Command, 8-2
Project-programmer number, 4-9,8-2,8-9

Name,
Abbreviation, 7-5, 7-6
Controller, 7-5,10-1,11-1
DECtape, 9-1
Device, 7-4
Extension, 8-8
File, 8-8
File structure, 7-5, 8-4

Index-6

(

(

(

(

INDEX (Cont.)

c

(

(

{
\


Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : Yes
Has XFA                         : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c041 52.342996, 2008/05/07-21:37:19
Create Date                     : 2007:04:04 15:45:21Z
Modify Date                     : 2017:08:04 05:20:02-07:00
Metadata Date                   : 2017:08:04 05:20:02-07:00
Format                          : application/pdf
Document ID                     : uuid:556b8c70-a521-431b-85b7-42699dd1e8de
Instance ID                     : uuid:d1611fe3-c60b-224f-9b5a-dc2d81493bcf
Producer                        : Adobe Acrobat 9.0 Paper Capture Plug-in
Page Layout                     : SinglePage
Page Count                      : 436
EXIF Metadata provided by EXIF.tools

Navigation menu