AA 4166E TM_TOPS 20_Monitor_Calls_Reference_Ver_5_Dec82 TM TOPS 20 Monitor Calls Reference Ver 5 Dec82

AA-4166E-TM_TOPS-20_Monitor_Calls_Reference_Ver_5_Dec82 AA-4166E-TM_TOPS-20_Monitor_Calls_Reference_Ver_5_Dec82

User Manual: AA-4166E-TM_TOPS-20_Monitor_Calls_Reference_Ver_5_Dec82

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

DownloadAA-4166E-TM_TOPS-20_Monitor_Calls_Reference_Ver_5_Dec82 AA-4166E-TM TOPS-20 Monitor Calls Reference Ver 5 Dec82
Open PDF In BrowserView PDF
TOPS-20
Monitor Calls
Reference Manual
AA-4166E-TM, AD-4166E-T1

December, 1982
This manual describes all the monitor calls that exist in the
TOPS-20 operating system. For easy reference, the monitor
call descriptions are arranged alphabetically and presented
concisely.
Information in these pages updates the manual of the same
name and order no. AA-4166E-TM.

OPERATING SYSTEM:

TOPS-20 V5 (KS/KL Model A)
TOPS-20 V5.1 (KL Model 8)

Software and manuals should be ordered by 1itle and order number. In the United States, send orders
to the nearest distribution center. Outside the United States, orders should be directed to the nearest
DIGITAL Field Sale!; Office or representative.
NC)rtheastlMid-Atl~lntic

Region

Digital Equipment Corporation
PO Box CS2008
Nashua, New Hampshire 03061
Telephone:(603)884-6660

Central Flegion

Western Region

Digital Equipment Corporation
Accessories and Supplies Center
1050 East Remington Road
Schaumburg, Illinois 60195
Telephon':l:(312)64Q-5612

Digital Equipment Corporation
Accessories and Supplies Center
632 Caribbean Drive
Sunnyvale, California 94086
Telephone:(408)734-4915

digital equipment corporation. marlboro, massachusetts

C)

Digital Equipment Corporation 1982. All Rights Reserved.

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
only be used or copied in accordance with the terms of such license.
No responsibility is assumed for the use or reliability of software on equipment
that is not supplied by DIGITAL or its affiliated companies.
The following are trademarks of Digital Equipment Corporation:

~D~DD~DT¥
DEC
DECmate
DECsystem-10
DECSYSTEM-20
DECUS
DECwriter
DIBOL

MASSBUS
PDP
PiOS
Professional
Rainbow
RSTS
RSX

UNIBUS
VAX
VMS
VT
Work Processor

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.

UPDATE NOTICE
TOPS-20
Monitor Calls
F~eference Manual
AD-4166E-T1

December, 1982
Insert this Update Notice in the TOPS-20 Monitor Calls
Reference Manual to maintain an up-to-date record of changes
to the manual.
Changed Information
The changed pages contained in this update package reflect
changes to the monitor calls for TOPS--20, Version 5.1.
Tile instructions for inserting this update start on the next page.

© Digital Equipment Corporation 1982. All Rights Reserved.

~DmDDmD

wore

INSTRUCTIONS
AD-4166E-T1
The following list of page numbers specifies which pages are to be placed in the TOPS-20 Monitor
Calls Reference Manual as replacements for, or additions to, current pages.
[Title page
Copyright page

[3-285
3-294

[lndeX-1
Index-2

[Vii
viii

[3-415
3-416

[lndeX-11
Index-12

[X~ii
XIV

[3-469
3-470

[lndeX-15
Index-16

KEEP THIS UPDATE NOTICE IN YOUR MANUAL TO MAINTAIN AN UP-TO-DATE
RECORD OF CHANGES.
TYPE AND IDENTIFICATION OF DOCUMENTATION CHANGES.
Five types of changes are used to update documents contained in the TOPS-20 software manuals.
Cha.nge symbols and notations are used to specify where, when, and why alterations were made to
each update page. The five types of update changes and the manner in which each is identified are
described in the following table.
The Following Symbols and/or Notations

Identify the Following Types of Update Changes

1. Change bar in outside margin; version number and change date printed at bottom of
page.

1. Changes were required by a new version of
the software being described.

2.

Change bar in outside margin; change date
printed at bottom of pa']e.

2.

Changes were required to either clarify or
correct the existing material.

3.

Change date printed at bottom of page.

3.

Changes were made for editorial purposes
but use of the software is not affected.

4.

Bullet (e) in outside margin; version number
and change date printed at bottom of page.

4.

Data was deleted to comply with a new version of the software being described.

5.

Bullet (e) in outside margin; change date
printed at bottom of page.

5.

Data was deleted to either clarify or correct
the existing material.

December, 1982

CONTENTS

Page
PREFACE
CHAPTER 1
1.1

1.2
1.2.1
1.2.2
1.2.3
1.2.4
1.2.5
1.2.6
1.2.6.1
1.2.6.2
1.2.6.3
1.2.6.4
1.2.7
1.2.8
1.2.8.1
1.3
1.4
1.5
1.5.1
1.5.2
1.5.3
1.5.4
CHAPTER 2

INTRODUCTION
CALLING CONVENTIONS
MONITOR CALL ARGUMENTS
Addresses
Page Numbers
Section Numbers
Byte Pointers
File Handles and File Designators
Source/Destination Designators
File DeSignator
Byte Pointers and ASCII Strings
Special Designators
Numeric Designators
Device Designator
Process Handles
Process/File Handle
SYSTEM DATE AND TIME
PROCESSING ERRORS
CONVENTIONS USED IN THIS MANUAL
Number Bases
Abbreviations
Symbols
Unimplemented Features

1-9
1-9
1-9

1-10
1-11
1-11

1-12
1-12
1-12

FUNCTIONAL ORGANIZATION OF JSYS'S

2.1
ACCOUNTING FUNCTIONS
REFERENCING FILES
2.2
2.2.1
File Specifications
2.2.2
Logical Names
2.2.3
File Handles
2.2.4
File RE~ferences
2.2.4.1
Files and Devices
2.2.5
Sample Program
2.2.6
File Access
2.2.7
Directory Access
File Descriptor Block
2.2.8
2.2.9

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

Primary Input and Output Files

iii

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

2-10
2-20

CONTENTS (Con t . )

Page

2.2.10
Methods of Data Transfer
2.2.11
File Byte Count
2.2.12
EOF Limit
2.2.13
Input/Output Errors
2.2.13.1 Testing for End-of-File
2.3
OBTAINING INFORMATION
2.3.1
Error Mnemonics and Message Strings
2.3.2
System Tables
2.4
COMMUNICATING WITH DEVICES
2.4.1
Physical Card Reader (PCDR:)
2.4.2
Spooled Card Reader (CDR:)
2.4.3
Physical Card Punch (PCDP:)
2.4.4
Spooled Card Punch (CDP:)
2.4.5
Physical Line Printer (PLPT:)
2.4.5.1
PLPT: Status Bits
2.4.6
Spooled Line Printer (LPT:)
2.4.7
Physical Magnetic Tape (MTA:)
2.4.7.1
Buffered I/O
2.4.7.2
Unbuffered I/O
2.4.7.3
Magnetic Tape Status
2.4.7.4
Reading a Tape in the Reverse Direction
2.4.7.5
Hardware Data Modes
2.4.8
Logical Magnetic Tape (MT:)
2. 4. 9
Te r min a 1 (TTY:)
2.4.9.1
JFN Mode Word
2.4.9.2
Control Character Output Control
2.4.9.3
Character Set
2.4.9.4
Terminal Characteristics Control
2.4.9.5
Terminal Linking
2.4.9.6
Terminal Advising
2.5
SOFTWARE DATA MODES
2.6
SOFTWARE INTERRUPT SYSTEM
2.6.1
Software Interrupt Channels
2.6.2
Software Interrupt Priority Levels
2.6.3
Software Interrupt Tables
2.6.4
Terminating Conditions
2.6.5
Panic Channels
2.6.6
Terminal Interrupts
2.6.6.1
Terminal Interrupt Modes
2.6.7
Dismissing an Interrupt
2.7
PROCESS CAPABILITIES
2.7.1
Assigned Capabilities
2.7.2
Access Control
2.7.3
Processes and Scheduling
2.7.3.1
Process Freezing
2.7.3.2
Execute-Only Files and Execute-Only Processes
2.8
SAVE FILES
2.8.1
Format for Nonsharable Save Files
2.8.2
Format of Sharable Save Files
2.8.3
Entry Vector
2.8.4
Program Data Vector
2.9
INPUT/OUTPUT CONVERSION
2.9.1
Floating Output Format Control
2.9.1.1
Free Format
2.9.1.2
General Format Control
iv

2-20
2-20
2-21
2-21
2-22
2-24
2-24
2-24
2-32
2-33
2-34
2-35
2-35
2-36
2-38
2-38
2-39
2-40
2-41
2-41
2-41
2-42
2-45
2-45
2-45
2-48
2-48
2-51
2-53
2-53
2-54
2-57
2-57
2-58
2-59
2-59
2-60
2-60
2-62
2-62
2-63
2-64
2-65
2-67
2-67
2-68
2-70
2-70
2-71
2-74
2-75
2-75
2-76
2-76
2-76

CONTENTS (Con t . )

Page
2.9.2
2.10
2.11
CHAPTER 3

Date and Time Conversion Monitor Calls
ARCHIVE/VIRTUAL DISK SYSTEM
PRIVILEGED MONITOR CALLS
TOPS-20 MONITOR CALLS

ACCES
ADBRK
AIC

(552 )
( 570)
(131 )

ALLOC
ARCF
ASND
ASNSQ
ATACH
ATI

(520)
(247)
(70)
(752 )
(116 )
(137)

ATNVT

(274)

BIN
BKJFN

(50)
( 42)

BOOT
BOUT
CACCT
CFIBF
CFOBF
CFORK
CHFDB
CHKAC
CIS
CLOSF
CLZFF
COMND
CRDIR

2-79
2-81
2-82

( 562)
(51)
(4 )

(100)
(101 )
( 152)
(64)
(521 )
(141)
(22)
(34 )
(544)
( 240)

CRJOB
CRLNM
CVHST

(502)
(276 )

CVSKT

(275 )

DEBRK
DELDF
DELF
DELNF

(136)
(67)
(26)
(317)

DEQ
DEVST

(514)
(121 )

DFIN

(234)

( 2)

Specifies access to a directory
Controls address breaks
Activates software interrupt
channels
Allocates a device
Archive/virtual disk operations
Assigns a device
Assigns ARPANET special message queue
Attaches a terminal to a job
Assigns a terminal code to a
software interrupt channel
Creates ARPANET Network Virtual
Terminal Connection
Performs byte input
Backs up the source designator's
pointer by one byte
Performs functions required for
loading front-end software
Performs byte output
Changes account designator
Clears the input buffer
Clears the output buffer
Creates an inferior process
Changes a File Descriptor Block
Checks access to a file
Clears the interrupt system
Closes a file
Closes the process' files
Parses a command
Creates, changes, or deletes a
directory
Creates a job
Defines or deletes a logical name
Converts ARPANET host number to
primary name
Converts ARPANET local socket to
absolute form
Dismisses current software interrupt
Expunges deleted files
Deletes files
Retains specified number of
generations of a file
Removes request from resource queue
Translates a device designator to
a string
Inputs double-precision floating
point number

v

3-2
3-5
3-8
3-9
3-11
3-15
3-16
3-17
3-19
3-20
3-21
3-22
3-23
3-37
3-38
3-39
3-40
3-41
3-43
3-45
3-47
3-48
3-50
3-52
3-75
3-81
3-87
3-89
3-90
3-91
3-92
3-94
3-96
3-97
3-99
3-100

CONTENTS (Con t . )

Page
DFOUT

(235)

DIAG

(530)

DIBE

( 212)

DIC

( 133)

DIR
DIRST

(130)
(41 )

DISMS
DOBE

(167)
(104)

DSKAS
DSKOP

(244)
(242)

DTACH
DTI
DUMPI
DUMPO
DVCHR
EIR
ENQ
ENQC
EPCAP
ERSTR
ESOU'r
FFFFP
FFORK
FFUFP
FLHST
FLIN
FLOUT
GACCT
GACTF
GCVEC

(115 )
(140)
(65)
(66)
(117)
(126 )
(513)
(515)
(151 )
(11 )
(313)
( 31)
(154 )
(211)
(277)
(232)
( 233)
(546)
( 37)
(300)

GDSKC
GDSTS
GDVEC
GET
GETAB
GETER
GETJI
GETNM

(214)
(145)
(542)
( 200)
( 10)
( 12)
(507 )
(177)

GETOK%

(574)

GEVEC
GFRKH
GFRKS
GFUST

( 205)
(164)
(166)
(550)

GIVOK%

(576)

Outputs double-precision floating
point number
Reserves or releases hardware
channels
Dismisses until input buffer is
empty
Deactivates software interrupt
channels
Disables software interrupt system
Translates a directory number to a
string
Dismisses the process
Dismisses until output buffer is
empty
Assigns or deassigns disk addresses
Specifies disk transfers in hardware
terms
Detaches a terminal from a job
Deassigns a terminal code
Reads data in unbuffered data mod~
Writes data in unbuffered data mode
Retrieves device characteristics
Enables software interrupt system
Places request in resource queue
Obtains status of resource queue
Enables process capabilities
Converts error number to string
Outputs an error string
Finds first free page in file
Freezes processes
Finds first used page in file
Flushes an ARPANET host
Inputs floating-point number
Outputs floating-point number
Gets current account designator
Gets account designator of file
Gets entry vector of compatibility
package
Gets disk count
Gets device's status
Gets entry vector of RMS
Gets a save file
Gets a word from a monitor table
Returns the last error in a process
Gets specified job information
Returns the program name currently
being used
Requests access to a protected
resource
Gets entry vector
Gets process handle
Gets process structure
Returns author and last writer
name strings
Gr an ts access to a pr otec tE~d
resource
vi

3-101
3-102
3-106
3-107
3-108
3-109
3-110
3-111
3-112
3-113
3-115
3-116
3-117
3-119
3-121
3-123
3-124
3-130
3-134
3-135
3-136
3-137
3-138
3-139
3-140
3-141
3-142
3-143
3-144
3-145
3-146
3-147
3-148
3-149
3-152
3-153
3-154
3-156
3-157
3-162
3-163
3-164
3-166
3-167

CONTENTS

(Cont.)

Page
GJINF
GNJFN
GPJFN
GTAD
GTDAL
GTDIR
GTFDB
GTHST
GTJFN

( 13)
(17 )
(206)
(2:27)
(305 )
(241 )
(63 )
(273)
( 20)

GTRPI
GTNCP%
GTRPW
GTSTS
GTTYP
HALTF
HFORK
HPTIM

( 172)
(272 )
(171 )
(24 )
(303 )
(170)
(162 )
(501)

HSYS
IDCNV
IDTIM
IDTNC
IIC

(307)
(223 )
(2:21)
(231 )
( 132)

INLNM
JFNS
KFORK
LGOUT
LNMST
LOGIN
LPINI
MDDT%
METER%
MRECV
MSEND
MSFRK
MSTR

(503 )
(30 )

MTALN

(774 )

MTOPR
MTU%

("77)

( 6(0)

MUTIL
NIN
NODE
NOUT
NTM1\N%
ODCNV
ODTIM
ODTNC
OPENF
PBIN
PBOUT

(512)
(225 )
(567)
(224)
(604)
(222)
(220)
(230)
(21 )
(73)
(74)

( l~) 3 )
(3 )

(504)
(1 )
(547)
(777)
(766 )
(511)
(510)
( 312)
( 5 ~) 5 )

Gets current job information
Gets the next JFN
Gets the primary JFNs
Gets current date and time
Gets disk allocation of a directory
Gets information of directory entry
Gets a File Descriptor Block
Obtains ARPANET host information
Gets a JFN
Short Form
Long Form
Gets trap information
Obtains information about the NCP
Gets trap words
Gets a file's status
Gets the terminal type number
Halts the current process
Halts a process
Returns values of high precision
clocks
Halts the system
Inputs date and time conversion
Inputs date and time
Inputs date/time without converting
Initiates software interrupts on
specified channels
Lists job's logical names
Translates a JFN to a string
Kills a process
Kills a job
Converts a logical name to a string
Logs in a job
Loads VFU or translation RAM
Enters MDDT
Returns EBOX/MBOX clock values
Receives an IPCF message
Sends an IPCF message
Starts a process in monitor mode
Performs structure-dependent
functions
Associates magnetic tape drive
with logical unit number
Performs device-dependent functions
Performs various functions for
MT: devices
Performs IPCF control functions
Inputs an integer number
Performs network utility functions
Outputs an integer number
Performs network management functions
Outputs date and time conversion
Outputs date and time
Outputs date/time without converting
Opens a file
Inputs the next byte
Outputs the next byte
vii

3-168
3-169
3-170
3-171
3-172
3-173
3-175
3-176
3-179
3-187
3-194
3-195
3-197
3-198
3-199
3-200
3-201
3-202
3-203
3-204
3-205
3-207
3-209
3-210
3-211
3-214
3-215
3-216
3-217
3-218
3-219
3-220
3-222
3-224
3-229
3-230
3-247
3-248
3-277
3-279
3-285
3-286
3-292.1
3-292.2
3-294
3-295
3-297
3-298
3-303
3-304

CONTENTS (Con t. )

Page
PDVOP%
PEEK
PLOCK
PMAP
PMCTL
PPNST

( 603)
(311)
(561)
(56 )
(560)
(557)

PRARG
PSOU'l'
RCDIR
RCM
RCUSR
RCVIM

( 545)
(76 )
(553)
(134)
(554)
(751 )

RCVOK%

(575)

RDTTY

(523 )

RELD
RELSQ

(71 )
(753 )

RESET

(147)

RFACS
RFBSZ
RFCOC
RFMOD
RFORK
RFPOS
RFPTR
RFRKH
RFSTS
RFTAD
RIN
RIR

(161 )
(45)
(112)
(107 )
(155)
(Ill)
(43)
(165 )
(156)
(533)
(54 )
(144 )

RIRCM
RLJFN
RMAP
RNAMF
ROUT
RPACS
RPCAP
RSCAN

(143)
( 23)
(61 )
(35 )
(55)
(57)
( 150)
( 500)

RSMAP%
RTFRK

( 610)
( 322)

RTIW
RUNTM
RWM

(173 )
( 15)
(135 )

RWSET
SACTF

(176)
( 62)

Manipulates program data vectors
Obtains monitor data
Locks physical pages
Maps pages
Controls physical memory
Translates project-programmer
number to string
Reads/sets process argument block
Outputs a string
Translates string to directory number
Reads the channel word mask
Tr~nslates string to user number
Retrieves message from ARPANET
special message queue
Retrieves access request from GETOK
queue
Reads data from primary input
designator
Releases a device
Deassigns ARPANET special message
queue
Resets/initializes the current
process
Reads process' ACs
Reads file's byte size
Reads file's control character output
Reads a file's mode
Resumes a process
Reads terminal's position
Reads file's pointer position
Releases a process handle
Reads a process' status
Reads file's time and dates
Performs random input
Reads software interrupt table
addresses
Reads inferior reserved channel mask
Releases JFNs
Obtains a handle on a page
Renames a file
Performs random output
Reads a page's accessibility
Reads process capabilities
Accepts a new string or uses the
last string as input
Reads a section map
Returns the handle of a process
suspended because of a monitor call
intercept
Reads terminal interrupt word
Returns runtime of process or job
Reads waiting channel interrupt word
mask
Releases the working set
Sets account designator of file
viii

•

3-305
3-308
3-309
3-310
3-315
3-318
3-319
3-321
3-322
3-326
3-327
3-329
3-330
3-332
3-335
3-336
3-337
3-338
3-339
3-340
3-341
3-342
3-343
3-344
3-345
3-346
3-349
3-351
3-352
3-353
3-354
3-355
3-356
3-358
3-359
3-360
3-361
3-363
3-364
3-365
3-366
3-367
3-368
3-369

CONTENTS (Con t. )

Page
SAVE
SCTTY
SCVEC

(202 )
(324)
( 301)

SDSTS
SDVEC
SETER
SETJB
SETNM
SETSN
SEVEC
SFACS
SFBSZ
SFCOC
SFMOD
SFORK
SFPOS
SFPTR
SFRKV
SFTAD
SFUST

(146)
(543)
(336 )
(541 )
(210)
(506)
(204)
(160)
(46)
(113 )
(110)
(157)
(526)
(27)
(201)
(534)
(551)

SIBE
SIN
SINR
SIR

( 102)
(52)
(531)
( 125)

SIRCM
SIZEF
SJPRI
SKED%

(142)
(36 )
(245)
(577)

SKPIR

(127)

SMAP%

( 767)

SMON
SNDIM

(6 )

(750)

SNOOP
SOBE
SOBF
SOUT
SOUTR
SPACS
SPJFN
SPLFK
SPOOL

~ 103)
(175)
(53 )
f 532)
(60)
207)
314)
517)

SPRIW
SSAVE
STAD
STCMP

243)
203)
226)
540)

~516)

Saves a file as nonsharable
Changes controlling terminal
Sets entry vector of compatibility
package
Sets device's status
Sets entry vector of RMS
Sets the last error in a process
Sets job parameters
Sets program name
Sets system name for a process
Sets entry vector
Sets process' ACs
Sets file's byte size
Sets file's control character output
Sets a file's mode
Starts a process
Sets terminal's position
Sets file's pointer position
Starts process using its entry vector
Sets file's time and dates
Sets author and last writer
name strings
Skips if input buffer is empty
Performs string input
Performs record input
Sets software interrupt table
addresses
Sets inferior reserved channel mask
Gets the size of a file
Sets job's priority
Performs services relating to
the class scheduler
Tests the state of the software
interrupt system
Maps one or more contiguous
sections of memory
Sets monitor flags
Sends a message to ARPANET
special message queue
Performs system analysis
Skips if output buffer is empty
Skips if output buffer is full
Performs string output
Performs record output
Sets a page's accessibility
Sets the primary JFNs
Splices a process structure
Defines and initializes input
spooling
Sets the priority word
Saves a file as sharable
Sets system date and time
Compares two strings

ix

3-370
3-371
3-373
3-375
3-376
3-377
3-378
3-381
3-382
3-383
3-384
3-385
3-386
3-387
3-388
3-389
3-390
3-391
3-392
3-394
3-395
3-396
3-398
3-400
3-401
3-402
3-403
3-404
3-409
3-410
3-415
3-417
3-418
3-422
3-423
3-424
3-426
3-428
3-429
3-430
3-431
3-433
3-434
3-436
3-437

CONTENTS (Con t . )

Page
STDEV

( 120)

STI
STIW
STO
STPAR
STPPN

(114 )
(174)
(246)
(217)
(556)

STSTS
STTYP
SWJFN
SWTRP%

( 25)
( 302)
(47)
(573)

SYERR
SYSGT
TBADD
TBDEL
TBLUK
TEXTI

(527)
(16 )
(536)
( 535)
(537)
(524)

TFORK

( 321)

THIBR
TIME
TIMER
TLINK
TMON
TTMSG
TWAKE
UFPGS
USAGE

(770)
(14 )
(522)
(216)
( 775)
(771)
(525)
(564)

USRIO
UTEST
UTFRK

(310)
(563)
(323)

VACCT
WAIT

(566)
(306)

WFORK
WILD%
XGSEV%
XGTPW%
XGVEC%
XRIR%

(163)
( 565)
(614)
(612 )
(606 )
(601 )

(7 )

Translates string to device
designator
Simulates terminal input
Sets terminal interrupt word
Simulates terminal output
Sets terminal parameters
Translates string to
project-programmer number
Sets a file's status
Sets the terminal type number
Swaps two JFNs
Traps for arithmetic underflow
or overflow conditions
Writes data to the system error file
Returns information for a system table
Adds entry to command table
Deletes entry from command table
Looks up entry in command table
Reads input from a terminal or a
file
Sets and removes monitor call
intercepts
Blocks the current process
Returns time system has been up
Sets time limit for a job
Controls terminal linking
Tests monitor flags
Sends a message to a terminal
Wakes a specified job
Updates file pages
Writes entries into the accounting
data file
Places program in user I/O mode
Tests monitor routines
Resumes a process suspended because
of a monitor call intercept
Validates an account
Dismisses process until interrupt
occurs
Waits for processes to terminate
Compares wild and non-wild strings
Gets an extended entry vector
Returns the page fail words
Returns an entry vector
Reads the addresses of the channel
and priority level tables

x

3-438
3-439
3-440
3-442
3-443
3-444
3-445
3-446
3-447
3-448
3-450
3-451
3-452
3-453
3-454
3-457
3-461
3-464
3-465
3-466
3-468
3-470
3-472
3-473
3-474
3-475
3-478
3-479
3-481
3-48;2
3-483
3-484
3-485
3-487
3-488
3-489
3-490

CONTENTS (Con t. )

Page
XRMAP%
XSFRK%

(611 )
( 605)

XSIR%

(602)

XSSEV%

(613 )

XSVEC%

( 607)

Acquires a handle on a page
Starts a process in a non-zero
section of memory
Sets the addresses of the channel
and priority level tables
Allows setting of extended entry
vector
Sets or clears the entry vector

APPENDIX A

ASCII, SIXBIT, AND EBCDIC COLLATING SEQUENCES
P,ND CONVERSIONS

APPENDIX B

tJiONSYM

APPENDIX C

tJlACSYM

APPENDIX D

}l,CTSYM

3-491
3-493
3-494
3-495
3-496

TABLES
TABLE

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

A-I
A-2

P-Field Values for One-word Global
Byte Pointers
Source/Destination Designators
File Descriptor Block (FDB)
System Tables
Device Types
PCDR: Status Bits
PCDP: Status Bits
PLPT: Control Characters
PLPT: Status Bits
l'ITA: Sta tus Bi ts
~rFN Mode Word
Wake-up Classes/CCOC Word Bits
Terminal Characteristics
Software Interrupt Channels
Terminal Interrupt Codes
Process/Job Capabilities
Floating-Point Format Control
~~ime Zones
ASCII and SIXBIT Collating Sequence
and Conversion to EBCDIC
EBCDIC Collating Sequence and
Conversion to ASCII

xi

1-5
1-6
2-11
2-25
2-33
2-34
2-35
2-37
2-38
2-39
2-46
2-49
2-51
2-58
2-60
2-64
2-77
2-80

A-I
A-3

PREFACE

This manual is written for the assembly language programmer who
is
already familiar
with TOPS-20 monitor
calls.
For an introductory
discussion of sone basic monitor calls, refer to the TOPS-20
Monitor
Calls User's Guide.
For a more complete description of the monitor
calls that can b~ used to perform ARPANET functions, refer also to the
TOPS-20AN Monitor Calls User's Guide.
Chapter I introduces the conventions
to
follow when
using monitor
calls,
and describes
the
types of arguments used with the monitor
calls.
Chapter 2 presents the calls related to particular
functions
and
tasks,
such as
using the software interrupt system.
Chapter 3
contains, in alphabetical
order,
descriptions of all
the monitor
calls.
Appendix A contains the EBCDIC, ASCII, and SIXBIT collating sequences,
and converSlons between
these
three character set representations.
Appendix B is a listing of the system file MONSYM.MAC,
which defines
many of
the symbols used in this manual.
Appendix C is a listing of
the system file MACSYM.MAC, which contains symbols and macros
useful
in assembly-language programming.
Appendix D is a listing of the
system file ACTSYM.MAC, which defines the macros and symbols used with
the USAGE monitor call.
REFERENCES
The following publications are either referenced in this manual or are
recommended as supplements to this manual:

Referenced as

Title and Order Number

Monitor Calls User's Guide

TOPS-20 Monitor Calls User's Guide

ARPANET Manual

TOPS-20AN Monitor Calls User's Guide

ARPANET Handbook

ARPANET Protocol Handbook
Available from:
Network Information Center
SRI International
Menlo Park, California 94025

xiii

I

Referenced as

Title and Order Number

DECnet Manual

TOPS-20 DECnet-20 Programmer's Guide
OperatIons Manual
for DECnet-20 Version 2, and
DECnet-20 User's Guide
for DECnet-20 VerSIon 3

Assembler Manual

MACRO Assembler Reference Manual

Link Manual

TOPS-20 LINK Reference Manual

Hardware Reference Manual

DECsystem-lO/DECSYSTEM-20 Processor
Reference Manual

Commands Reference Manual

TOPS-20 Commands Reference Manual

SPEAR Manual

TOPS-IO/TOPS-20 SPEAR Manual

TOPS-20 User's Guide

TOPS-20 User's Guide

Installation Guide

TOPS-20 Software Installation Guide (for
KS/KL Model A)
or KL Model B Software Installation
Guide

Network Management Spec

Network Management Architecture
Specification

xiv

an~

December 1982

CHAPTER I
INTRODUCTION

The TOPS-20 Monitor Calls Reference Manual describes every monitor
call
in the TOl?S-~ystem.
Monitor calls for ARPANET systems and
DECnet systems are also described.
The use of these calls,
however,
is more completely described
in the ARPANET Manual and the DECnet
Manual.
TOPS-20 monitor calls invoke the TOPS-20 monitor by means of the JSYS
instruction
(op code 104).
The UUO-type monitor calls (op codes
40-77) invoke the TOPS-IO compatibility package, which
simulates
the
action of these UUO's in the TOPS-IO monitor.
Programs written for
TOPS~20 should use TOPS-20 monitor calls, not UUO's.
For easy reference,
monitor
call descriptions
in Chapter
3 ere
arranged alphabetically and presented concisely.
This concise format
begins with the monitor call name and numeric definition, followed
by
a
brief description of
the monitor
call
function.
The calling
sequence for the monitor call is next, indicated by statements in
the
formet
ACCEPTS IN ACn:

description

where n is an accumulator number.
Following the list of accumulators
and descriptions of their contents are statements of the form
RETURNS

+1:
+2:

condition
condition

These statements define where control
returns,
and
under
what
conditions,
after
execution of
the monitor
call.
The statement
RETURNS+l:
means that control
returns
to
the memory
location
immediately following the calling location.
The statement RETURNS+2:
means that control returns to the second memory location after calling
location.
Next, there is an optional description of the action
taken by the
monitor
call.
Finally,
a Jist of possible error mnemonics ends the
monitor call definition.

1.1

CALLING CONVENTIONS

Arguments for the monitor call are placed in accumulators (ACs),
then
the monitor
call
is executed.
The first argument is in ACl, the
second in AC2, and so forth, up to c maximum of four accumulators.
Many calls also require an argument block.
This
is a group of
contiguous words of memory that contain additional arguments.
If an
argument block is required, an AC must contain a
pointer
to
the
I-J

INTRODUCTION
argument block.
See the description of the GTJFN% monitor call for an
example of the use of argument blocks.
In addition, arguments in an argument block can point to other
argument blocks.
These other argument blocks can, in turn, contain
other groups of arguments.
For an example of this way of passing many
arguments to a monitor call, se~ the description of the GTJFN call in
Chapter 3.
(There are severa] exceptions to this convention;
refer
to the individual descriptions in Chapter 3.)
Data returned by the execution of a monitor call is often returned In
the AC's.
If a call returns more data than can be held in four AC's,
it returns the data to a data block. A pointer to the data block must
be passed as an argument to the monitor call.
Such a pointer can be
passed in either an AC, or an argument block.
When using a monItor call in a program, end the name of the call with
a percent
(%)
character.
This convention helps avoid conflicts
between monitor call names and symbols defined by your programs.
In
addition,
this convention is required by the newer monitor calls
(those defined in TOPS-20 Release 4 or later).
Although older calls
(those defined hefore TOPS-20 Release 4) do not require a percent
character at the end of their names, they will accept one.

1.2
~

MONITOR CALL ARGUMENTS

monitor call argument can be one of the following:
•

a word of data

•

the memory address word that contains deta

•

a page number

•

a section number

•

a byte pointer

•

a file handle

•

a source (or destination) designator that
obtain (or send) deta

•

a process handle

•

a file/process handle

defines

where

to

The following sections describe these arguments.

1.2.1

Addresses

On a DECsystem-20 addresses can be one of two types:
an 18-bit
address, or a 30-blt address. TOPS-20 supports 30-bit addressing, but
provides an address space of 32
(decimal)
sections, each of which
contains 256K words.
Thus although 30 bits ~re used to contain a
global address, the section number in such an address can be no longer
than 6 bits, making the largest possible address a total of 23 bits
long.

TOPS-20 Version 5

1-2

April 1982

INTRODUCTION
An l8-bit address is called a section-relative address.
With such an
address you can specify any word in a 256K-word section of memory, but
you cannot also specify a section number.
With a 30-bit,
or global,
address
you
can reference any word of any section of memory.
(Pefer
to
the
Hardware Reference Manual
for
a
description of
global
addresses.)
TOPS-20 allows you to use IS-bit or 30-bit addresses.
Some monitor
calls
require
one
kind,
some
the other~
some calls accept either
kind.
Some monitor calls use only 18 bit to hold an
address.
These calls
interpret
l8-bit addresses
as locations in the current section, the
same section as that of the code being executed (the same
section as
the
user
PC.) To form an unambiguous global address, these calls add
the section number of the PC to the section-relative address.
Monitor calls that use an entire word for an address can accept either
l8-bit or
30-bit addresses.
If the address is 30 bits (the section
number is not zero), it is a global address.
If the address is 18 bits (the section number is
zero),
the monitor
call
acts
in one
of two ways.
If the call existed in Release 4 or
earlier, it interprets the address as a section-relative address,
as
stated above.
BUT if the call is one of the extended-addressing calls
(if the call star~s with an X), the call interprets the
zero
in
the
section-number field as indicating section zero.

1.2.2

Page Numbers

TOPS-20 page number can be 9 bits or 18 bits long.
~
page
can refer to either a page of memory, or a page of a disk file.

~

number

The 9-bit number is called a section-relative page
number.
Such
a
page number can specify any page within a 256K-word section of memory,
or any page within a 256K section of a fiJe.
(A
file
section
is a
unit
of 512 pages within a file.
The first page of each such section
has a page number that is an integer multiple of 512.)
The left half of a section-relative (18-bit) address can be considered
to
be
a section-relative page number.
If a monitor call uses only 9
bits of a word to hold a page number, the monitor considers that
page
to be within the current section.
Most monitor calls that require page numbers as arguments use at least
half of
a
word to contain the page number.
Such calls allow you to
specify an l8-bit, or global,
page
number.
~
global
page
number
refers
to
both a
section of memory and a page within that section.
Page 23200, for example, is page 200 in section 23.

1.2.3

Section Numbers

A section number

is 6 bits long.
In
glohal
address,
2
section
a
number
occupies hits
through
17.
Because TOPS-20 supports 40
6
larger
than
(octal) sections of memory,
using
section numbers
37
causes an error.

TOPS-20 Version 5

1-3

April 1982

INTRODUCTION
1.2.4

Byte Pointers

Monitor
calls accept
two
kinds of byte pointers as arguments:
one-word
local
byte pointers,
and one-word global byte pointers.
One-word local byte pointers work in all sections, but one-word global
byte pointers cannot be used in section O.
The Hardware Reference Manual describes one-word local
byte pointers
in
detail.
The paragraphs below discuss one-word global
byte
pointers.
Any monitor calls
that accept source/destination designators
(See
Section 1.2.6.) also accept byte pointers, and the bytes can be from 1
to 36 bits long.
SIN and SOUT are examples of such monitor calls.
If a call cannot accept a source/destination designator, however, that
call only accepts byte pointers that point to 7-bit bytes.
Examples
of such calls are CACCT and PSOUT.
Note, however, that for historical
reasons
some monitor calls accept one-word global byte pointers that
point to bytes of other lengths.
TOPS-20 monitor calls do not accept the two-word local
byte pointers
or
the
two-word global
byte pointecs described
in
the Hardware
Reference Manual.
Local byte pointers can only point to a byte in the current section.
ThlS is because they use 18 bits to hold the address of the byte.
You
can use indexing with local byte pointers, however, to point to a byte
In another section of memory.

If,
for
example,
~C5
contains a
30-bit address,
the
following
instruction generates an
indexed
local
byte pointer in AC2.
The
pointer points to a byte
in another
section,
the
section of the
address in AC5.
MOVE 2, [POINT 7,0(5)]
Use of indirect addressing with local byte pointers is discouraged.
Global byte pointers use 30 bits to hold the address of the byte, thus
they can point
to a byte in any section of memory.
One-word global
byte pointers have the following format:
P

address

Table 1-1 shows how the KL-IO processor interprets the P field.

TOPS-20 Version 5

1-4

April 1982

INTRODUCTION
Table 1-1
P-Field Values for One-word Global Byte Pointers
P (octal)

Byte Size

Position of
the Fight-Most Bit
(count,
in octal, of the number
of bits to
the
right of
the
current pointer position)

Less than 45

a local byte pointer.

45
46
47
50
51
52
53

6
6
6
6
6

54
55
56
57
60

8
8
8
8

61
62
63
64
65
66

7
'7
'7
'7

7
7

44
35
26
17
10
1

67
70
71
72
73

9
9
9
9
9

44
33
22
11
0

74
75
76

18
18
18

44
22
0

77

unused

44
36
30
22
14
6
0

6
6

44
34
24
14
4

8

(causes an illegal instruction trap)

You cannot use indexing or indirect addressing with one-woro g]obel
byte pointers.
In
addition,
you cannot
use one-word global byte
pointers in section o.

1.2.5

File Handles and File Designators

file handle is also known as a job file number, or JFN.
It
is an
18-bit number that, within the context of a iob, uniquely identifies a
file.

A

An indexable file handle, or full-word JFN, has a JFN in the right
half and
flags
in
the
left half.
This file handJe is useful for
handling several files in sequence.
See Section 2.2.3
for
a
more
complete discussion of file handles.

TOPS-20 Version 5

1-·5

April 1982

INTRODUCTION
1.2.6

Source/Destination Designators

Some monitor calls act upon bytes or strings of
bytes,
or
transfer
bytes
from
one
place
to
another.
Such
calls often
use
source/destination designators to identify where the bytes are sent or
obtained.
A source/destination designator is a 36-bit quantity that can have the
formats
given
in
Table 1-2.
The
paragraphs
following the table
describe
each designator.
Note
that
byte
pointers
are
also
source/destination designators.
Table 1-2
Source/Destination Designators

-'-----------r---------------r----------------r--------------------------------------4
Symbol

I

Left Half

Fight Half

Meaning

(none)

a

JFN

a job file number.
The JFN
is
the
job's handle
on
a
file, and
is assigned
with
the
GTJFN
monitor
call.
(Refer to Section 2.2.3.)

.PRIIN

100

primary input designator

.PFIOU

a
a

101

primary output designator

.NULIO

a

377777

null clesiqnator

.TTDES

a

4xxxxx

universal

.CTTRM

a

777777

the
process's
terminal

.DVDES

6xxxxx

xxx xxx

universal
device designator
(for use only In section 0)

777777

address

implicit
byte
pointer.
TOPS-20
changes left half to
440700.
(Refer
to
Sections
1.2.4 and 1.2.6.2.)

terminal designator

777777

777777

universal default

5xxxxx

xxxxxx

numeric value

controlling

Note:
The designators .PFIIN ano .PRIOU are legal wherever a
JFN
is expected.
You cannot assign them as JFN's, however.
GTJFN and
GNJFN never assign 100 or 101.
The most commonly used source/destination designators are:
identifying a particular file.
Before a JFN
can
be
used, it must be obtaIned by means of the GTJFN monitor call.
(See Section 2.2.3.)

1.

A JFN,

2.

The primary input and output designators.
(Refer to
Section
2.2.9.) These designators are the ones recommended for use in
referring to the job's controlling terminal because they
can
be
changed to cause terminal input and/or output to be taken

TOPS-20 Version 5

••

1-6

April 1982

INTRODUCTION
from and/or
sent to a
file.
The controlling
terminal
designator
.CTTRM
(0,-1)
cannot be redirected in this way,
and its use is not recommended in normal situations.
3.

A byte pointer to the beginning of the string being
written.

read

or

1.2.6.1 File Designator - A file designator indicates that I/O to be
done by the monitor
call is to be done as though to a terminal.
A
file designator can be any of the fOllowing:
.PRIIN, .PRIOU,
.NULIO,
.TTDES, .CTTRM, or .DVDES.

1.2.6.2 Byte Pointers and ASCII Strings - Many monitor
calls
deal
specifically with ASCII strings.
The following conventions apply to
such strings.
1.

A file designator can be used if the file is in 7-bit
format.
This is the usual format for text files.

2.

One of the following is used to designate
caller's address space:

a

string

ASCII
in

the

a.

-l"ADR to designate a 7-bit ASCII string beginning
in
the leftmost byte of ADR.
This is for convenience,
maki~g
HRROI I,ADR
functionally
equivalent
to
MOVE 1, [POINT 7,ADR].

b.

A byte pointer with a byte size of 7 bits.
If the byte
size is not 7 bits, the results might be incorrect.
This
is
because monitor
calls use
the
ILDB
and
IDPB
instructions
to
reference byte strings,
and do no
additional checking to see that
the data
is
in the
correct format.
Note,
however,
that for
historical
reasons some monitor calls accept byte pointers with byte
sizes larger or smaller than 7 bits.
NOTE
Unless otherwise noted, the term "byte
pointer"
is used
in this manual
to
indicate an ILDB/IDPB byte pointer
that
points
to
an
ASCIZ
string.
The
following example generates such a
byte
pointer:
POINT 7, [ASCIZ/character string/]
The term "pointer" is usually used
to
refer
to
an
address,
except
in
discussions that must make
repeated
references
to
the t.erm "byte pointer".
In the latter
case,
some
of
the
occurrences of "byte pointer" will be
shortened
to
"pointer"
to
avoid
monotonous repetition.
In these cases,
however,
it will be clear
from
the
context
that
"pointer"
implies "byte
pointer".

1-7

I

INTRODUCTION
Normally, monitor calls assume that ASCII strings are terminated with
a
byte containing zeroes (an ASCIZ string).
A few calls terminate on
other ASCII characters because of context (the NIN call, for example),
and
some optionally accept an explicit byte count or allow you to
determine the terminating byte.
These latter
calls
(SIN and SOUT
calls,
for
example)
are generally those that can handle non-ASCII
strings and byte sizes other than 7 bits.
After a monitor call is used to read a string, the source byte pointer
argument
is updated
such
that an
ILDB would
read the character
following
the
terminating character;
an LDB would
reread
the
terminating character.
After a monitor call is used to write a string, the destination byte
pointer argument is updated to point to the character following the
last nonnull character written.
If there is room,
a
null
byte is
appended
to the string, but the byte pointer returned is such that an
rDPB will overwrite the null.

1.2.6.3 Special Designators - The universal default designator of -1
is used to indicate the current designator, such as the current job or
the connected directory.
For example, the GETJI monitor call accepts
an argument of -1 as the designator for the current job.

1.2.6.4 Numeric Designators - The designator 5xxxxx xxxxxx
(where a
numeric value is in bits 3-35) is used to supply a numeric designator
as an argument to a call.
Numeric designators are
used
to
identify
account numbers,
directory numbers, user numbers, and the like.
The
DIRST monitor call, for example, accepts a user number
as
5B2+33-bit
number.

1.2.7

Device Designator

Many monitor calls dealing with devices (refer to Section 2.4) take a
device designator as an argument.
A device designator can be either
LH:
RH:

.DVDES(600000)+device type number
unit number for devices that have units, arbitrary code for
structures,
or -1 for nonstructure devices that do not have
units

LH:
RH:

0
.TTDES (400000) + terminal number, or .CTTRM (777777)
controlling terminal

or
for

Thus, terminals can be represented in two ways;
the second way
provided Eor compatibility with the source/destination designator.

is

Because designators for structures contain an arbitrary code,
these
designators must always be obtained from the monitor (by means of the
STDEV call) and cannot be created by the program.
Section 2.4 describes the various devices and their type numbers.

1-8

INTRODUCTION
1.2.8

Process Handles

Several monitor calls accept an 18-bit argument called a
process
handle.
The following fork handles are defined within the context of
a job.
Value

Symbol

400000
400000+n
-1

-2
-3
-4
-5

.FHSLF
.FHSUP
. FH']'OP
.FHSAI
.FHINF
.FHJOB

Meaning
current process
process n, relative to the current process
superior proces!s
top-level process
current process and all of its inferiors
all of the current process' inferiors
all processes in the job

Use of the superior process argument (.FHSUP) is legal only if the
process has the superior process access capability (SC%SUP) enabled in
its capability word.
Meaningful operations may usually be performed
with
the
top level process argument (.FHTOP) only if the process has
WHEEL or
OPERATOR capability enabled
(SC%WHL or
SC%OPF)
in
its
capability word.
Refer
to Section 2.7.1
for
information on the
capability word.
Process handles in the range 400001
to
400777 are called
relative
process handles, and are generated by the monitor to refer to specific
processes.
(See the CFORK monitor call description.)
These handles
are valid only within
the context of the process to which they are
given.
Thus, they may not be passed between processes.
GFRKH may be
used to convert process handles for use by another process.

1.2.8.1 Process/File Handle - Some monl~0r
calls accept an 18-bit
is either a
argument called a
process/file handle.
This handle
process handle (as defined in Section 1.2.8), or a JFN.
Note that string pointers and terminal identifiers cannot be used
in
this context.
This
is not
a
limitation,
however,
because
the
operations that use the process/file handle are used for changing page
maps.
Such operations are not meaningful
for string pointers or
terminals.

1.3

SYSTEM DATE AND TIME

The internal system date and time is a 36-bit quantity.
It can be
passed
to a monitor call as an argument, or returned as a value.
The
internal date-\and-\time word has the following format:
day"fraction
where day is the number of days since November 18, 1858, and
fraction
is
the
fractional
part of the day elapsed since midnight, Greenwich
Mean Time.
The fraction is the numerator of a
fraction
that has a
denominator of 2**18.
Thus the fraction
fraction/2**18
represents the portion of the ~~y elapsed since midnight.
conforms to the Smithsonian Astronomical Date Standard.

1-9

This format

I

INTRODUCTION

I

Because the time is stored as Greenwich Mean Time,
the monitor adds
the value of the TIMEZONE offset to the internal date and time to
obtain your local
time.
The TIMEZONE offset is specified
in
name.typ.gen;attribute-l;attribut e-2 ...
Refer to the TOPS-20 User's Guide for the complete description of file
specifications.

2-1

FUNCTIONAL ORGANIZATION OF JSYS'S

If a field of the file specif1cation (or filespec) is omitted, it can
be
supplied by the program or from standard system values.
(Refer to
Section 2.2.3.)
Whenever an ESC 1S encountered in the file specification string,
the
system
looks
for a file whose specification matches the fields input
thus far.
A match is indicated if the
input
string either
exactly
matches an entry in the appropriate table, or is an initial substring
of exactly one entry.
In the latter case, the portion of the matching
entry not appearing
in
the
input
string is output to a specified
output file.
The field terminator is output also.
Recognition is done on
successive
fields
with
the
fields
being
defaulted
if need
be.
If the file specification cannot be uniquely
determined, the system recognizes as many entire fields as are unique,
and outputs a
bell
to
the terminal, signifying that more input is
required from the user.
If the input string cannot possibly match any
existing file specification, the system returns an error.
CTRL/F behaves like ESC except recognition
stops after
the current
field.
This allows
the filename to be recognized, for example, but
not the file type.
If recognition is not used,
then each
field
must be
included as
indicated
in
the general format above.
The input must exactly match
some eX1sting file specification unless the program specifies
in
the
STJFN call that new specifications are allowed (output files).
Without ESC or CTRL/F, no recognition is done.
The system substitutes
the default values supplied
by your program for fields completely
omitted from
the
file
specification.
The
file
specification
is
complete whenever all fields have been recognized or a terminator has
been input.
File specification terminators are described in the GTJFN
call description.
The following editing characters are recognIzed during
file specifications:

2.2.2

the

input

of

DELETE

erases one character.
If no more characters remain
the input, a bell is output.

in

CTRL/W

deletes back to the last punctuation character.
If no
more characters remain in the input, a bell is output.

CTRL/U

aborts the entire filename-gathering operation.

CTRL/R

retypes the entire input as specified so far and awaits
further input.

Logical Names

Logical names are user-specified default values for one or more fields
in a
file specification.
Through the use of logical names, the user
can override standard file specification fields
built
into TOPS-20
programs because
logical
name
fields
take precedence over default
f1elds set by a program.
However, the
user
can
still
specify any
fields
explicitly since a logical name defines values to be used only
If none are given by the user.
The user defines
logical
names with
the DEFINE com~and
or the CRLNM monitor call.
Refer to the TOPS-20
yser's Guide for the complete descriPtion of logical names.

2-2

FUNCTIONAL ORGANIZATION OF JSYS'S
2.2.3

File Handles

It is necessary to have file handles that can be contained
in a
few
bits and do not require extensive lookup procedures for each reference.
The file specification is the fundamental handle on a file, but
this
specification fits neither criterion above.
Therefore
in
TOPS-20, files
are
referenced by handles called JFNs
(Job File
Numbers) .
The JFN is a small number and is valid within the context
of the job (i.e., within any process of the
job to which it
is
assigned).
However,
the handle is not valid between jobs.
That is,
JFN 2 in job 11 will generally be a handle on a
completely different
file than JFN 2 in job 18.
A JFN is associated with a file with either the GTJFN or GNJFN monitor
call.
The GTJFN call accepts a file specification and returns a JFN
for the indicated file.
If a field of the specification is omitted,
it may be supplied by the program defaults or from standard system
values.
If the file specification refers to a group of files (because
of wildcard characters,
see below),
the GNJFN call can be used to
associate the JFN to the next file in the group.

logical name can apply to one or more fields of the
file
specification passed to the GTJFN call.
The logical name must be the
first identifier passed to GTJFN and must be terminated with a colon.

A

The GTJFN call uses a certain search order when obtaining a field in a
file specification.
This order is as follows:
1.

Use the field
explicitly typed by the
specified in the primary input string.

2.

Use the value for the field that is specified in the
name specification.

3.

Use the value for the field that is specified in the default
block by the program.
This is only for the long form of the
GTJFN call.

4.

Use the system default value if all
fail.

of

user

the

or

above

the

one

logical

searches

In the special case of a device field specification, where the device
name has been obtained from either the program default or the system
default, the device field is checked to see if
it is actually a
logical name.
If it is, then the values specified in its definition
become defaults for all fields, including the device field.
If the specific call to GTJFN permits, wildcard characters (either
an
asterisk or a percent sign)
can appear in the device, directory,
filename, type, or generation number fields.
(The percent sign cannot
appear
in the generation number
field.)
An asterisk matches any
occurrence of the field, including a null field.
An asterisk as part
of a
field matches 0 or more characters anywhere in the field.
A
percent sign matches any single existing character in the field.
Upon
completion of
the operation,
the JFN returned references the first
file found when s~anning in the following order:
In order by structure name
(PS: is first, arbitrary order for others)
In alphabetic order by directory name
In alphabetic order by filename
In alphabetic order by file type
In ascending numeric order by generation number

2-3

FUNCTIONAL ORGANIZATION OF JSYS'S
Note that for structures, only the construct DSK*:
means all available structures on the system.

can be used.

This

The GNJFN call can then be given to associate the JFN to the next file
that matches the file specification.
'rhe fullword JFN (flags, ,JFN) is termed an "indexable file handle"
because it accepts a generic file specification
(one including
wildcard characters) and can be successively associated
(by GNJFN)
with each file matching the specification. Thus the JFN is "indexed"
chrough a range of files.
The number and type of files in the range
are limited by the file specification, the privileges of the program,
and the protection of individual files and directories within the file
system.
A program with WHEEL capabilities enabJed can access any file
In the TOPS-20 file system.
The maximum number of JFN's allowed depends upon the space reserved
for JFN-r ela ted info rma tion in the Job Stor age Block (JSB).
Currently
the maximum number of JFN's allowed is 140 (octal).
The JFN's 100 (.PRllN) and 101 (.PRIOU) are reserved for
the primary
input and output designators, respectively, and are never returned by
the GTJFN (or GNJFN) call.
The JFN 377777 (.NULlO)
is reserved for
the null designator.
Ordinarily, the process of getting a file handle with
of the following:

I

GTJFN

consists

1.

The user specifies the file name string.

2.

GTJFN checks
correctness.

3.

GTJFN checks the file for validity
file actually exist?)

4.

If the file name passes these two checks, GTJFN returns a JFN
or handle for the file.

the

file

Thus a JFN is associated wIth an
system.

name

actual

string

for

(For

example,

file

in

the

grammatical
does

TOPS-20

the

file

It is sometimes desirable to skip the step of checking a JFN for
validity. This is necessary any time that the association between the
JFN and the physical file cannot be made, as happens when a JFN is
reauested for a file on magnetic tape. Also, it may be that the user
himself wishes to prevent the JFN/file association from being made in
crder to check the file specification for grammatical correctness and
then manipulate the file specification by adding or removing selected
fields, or comparing it against another file specification. This type
of JFN is termed a "parse-only" JFN.
As It is not associated with any
file, no file operations may be performed on it.
Only the following JSYS's will accept a parse-only JFN:
1.

JFNS
converts
characters)

a

JFN

2.

WlLD% - compares character strings and file specifications

2-4

to

its

file

specification

(in

FUNCTIONAL ORGANIZATION OF JSYS'S
2.2.4

File References

All file operations are initiated by acquiring a JFN on a
file
using
the GTJFN
(or GNJFN) call.
Some file operations, such as deleting,
renaming,
and status queries about the file,
may be performed
immediately
after
the
JFN
is acquired.
Certain operations,
particularly data transfers, require that the file be opened with an
OPENF calIon the JFN.
When the user opens a file, he specifies the byte size to be used
for
byte I/O operatIons and
the access requested to the file.
Several
implicit initialization operations, which affect subsequent references
to the file, are also invoked when a file is opened.
For example, a
file's position pointer is normally reset to the beginning of the file
such that the first
sequential input operation reads the beginning
data of the file.
Access to files on regulated structures (those being tracked by the
accounting system)
cannot be given until the mount count for that
structure is incremented with the .MSIMC function of the MSTR JSYS (or
with the TOPS-20 I~OUNT STRUCTURE command).
All JFN's must be released
before the mount count can be decremented with the .MSDMC function of
the MSTR JSYS (or the TOPS-20 DISMOUNT STRUCTURE command) .
All structures are regulated by default except the
(PS:) .

primary

structure

2.2.4.1 Files and Devices - Under TOPS-20,
most devices
may
be
treated as if
they were files.
For excmple, a GTJFN, OPENF, CLOSF,
etc. may be performed directly on magnetic tape device MTAI:
without
specifying a file name.
This is because the device name itself is the
file name.
Disk devices,
however,
have multiple directories and
multiple files,
and
the device name itself is not sufficient to
uniquely identify a file.
The general rule is that,
for
a
complete
TOPS-20
file
specification,
only those fields necessary to make the
file unique for that device are required to get a JFN for
the file.
Thus,
for most devices, the device name itself is sufficiently unique
to get a JFN for the file.
In this manual, when the phrase "opening a
device" is used, it is in reference to the feature described above.
For TOPS-20, disk devices are the only major exception to the
rule
that devices can be treated as files.
Labeled tapes on MT:
devices
may be referenced either by device name alone (which gives access to
all
files on the tape) or by device name and file name (which gives
access only to the specified file).

2.2.5

Sample Program

The following sample program acquires JFN's, opens both an
input and
an output file, and then copies data from the input file to the output
file in 7-bit bytes until the end of the input file is encountered.

2-5

FUNCTIONAL ORGANIZATION OF JSYS'S
~***

PROGRAM TO COpy INPUT FILE TO OUTPUT FILE. ***
(USING BIN/BOUT AND IGNORING NULL'S)
TITLE FILEIO
SEARCH MONSYM

~***

;TITLE OF PROGRAM
;SEARCH SYSTEM JSYS-SYMBOL LIBRARY

IMPURE DATA STORAGE AND DEFINITIONS ***

INJFN:
BLOCK I
OUTJFN: BLOCK I
PDLST:

PDLEN=3
BLOCK PDLEN

;STORAGE FOR INPUT JFN
;STORAGE FOR OUTPUT JFN
;STACK HAS LENGTH 3
;SET ASIDE STORAGE FOR STACK

TI==I
T2==2
T3==3
T4==4
T5==5

;JSYS AC'S

P==17

;PUSH DOWN POINTER

;TEMPORARY AC'S

;*** PROGRAM INITIALIZATION ***
START:

RESET%
;CLOSE FILES AND INITIALI~E PROCESS
MOVE P, [IOWD PDLEN,PDLST] ;ESTABLISH STACK

;*** GET INPUT-FILE ***
INFIL:
HRRO! TI, [ASCIZ /
INPUT FILE: /]
;PROMPT FOR INPUT FILE
PSOUT%
;ON CONTROLLING TERMINAL
MOVE TI, [GJ%OLD+GJ%FNS+GJ%SHT] ;SEARCH MODES FOP GTJFN
; [EXISTING FILE ONLY, FILE-NR'S IN B
; SHORT CALL ]
MOVE T2, [.PRIIN".PRIOU] ;GTJFN'S I/O WITH CONTROLLING TERMINAL
GTJFN%
;GET JOB FILE NUMBER (JFN)
ERJMP [ PUSHJ P,WARN
;IF ERROR, GIVE WARNING
JRST INFIL]
;AND LET HIM TRY AGAIN
MOVEM TI,INJFN
;SUCCESS, SAVE THE JFN

;*** GET OUTPUT-FILE ***
OUTFIL: HPROI TI, [ASCIZ /
OUTPUT FILE: /]
;PROMPT FOR OUTPUT FILE
PSOUT%
;PRINT IT
MOVE T], [GJ%FOU+GJ%MSG+GJ%CFM+GJ%FNS+GJ%SHT] ;GTJFN SEARCH MODES
; [DEFAULT TO NEW GENERATION , PRINT
; MESSAGE , REQUIRE CONFIRMATION
; FILE-NR'S IN B , SHORT CALL]
MOVE T2, [.PRIIN".PRIOU] ;1/0 WITH CONTROLLING TERMINAL
GTJFN%
;GET JOB-FILE NUMBER
ERJMP [ PUSHJ P,WARN
;IF ERROR, GIVE WARNING
JRST OUTFIL]
;AND LET HIM TRY AGAIN
MOVEM TI,OUTJFN
;SAVE THE JFN

2-6

FUNCTIONAL ORGANIZATION OF JSYS'S
;NOW, OPEN THE FILES WE JUST GOT
INPUT
MOVE Tl,INJFN
MOVE T2, [7B5+0F%RD]
OPENF%
ERJMP FA'rAL

;RETRIEVE THE INPUT JFN
;DECLARE MODES FOR OPENF [7-BIT BYTES + INPUT]
;OPEN THE FILE
;IF ERROR, GIVE MESSAGE AND STOP

OUTPUT
MOVE Tl,OUTJFN
MOVE T2, [7B5+0F%WR]
OPENF%
ERJMP FA'rAL

;GET THE OUTPUT JFN
;DECLARE MODES FOR OPENF [7-BIT BYTES + OUTPUT"
jOPEN THE FILE
;IF ERROR, GIVE MESSAGE AND STOP

;*** MAIN LOOP :COPY BYTES FROM INPUT TO OUTPUT ***
LOOP:

MOVE Tl,INJFN
BIN%
ERJMP DONE
JUMPE T2,LOOP
MOVE Tl,O[JTJFN
BOUT%
ERJMP FATAL
JRST LOOP

iGET THE INPUT JFN
iTAKE A BYTE FROM THE SOURCE
CHECK FOR END OF FILE.
jSUPRESS NULLS
iGET THE OUTPUT JFN
iOUTPUT THE BYTE TO DESTINATION
iIF ERROR, GIVE MESSAGE AND STOP
iLOOP, STOP ONLY ON A a BYTE (FOUND
i AT LOOP+2)

iIF ERROR,

j*** TEST FOR END OF FILE, ON SUCCESS FINISH UP ***

DONE:

GTSTS%
TLNN T2, (GS% EOF)
PUSHJ P,FATAL

iGET THE STATUS OF INPUT FILE.
iAT END OF FILE?
iNO, I/O ERROR

CLOSIF: MOVE TI,INJFN
CLOSF%
ERJMP FATAL

iYES, RETRIEVE INPUT JFN
jCLOSE INPUT FILE
iIF ERROR, GIVE MESSAGE AND STOP

CLOSOF: MOVE Tl,OUTJFN
CLOSF%
ERJMP FAT}\L
HRROI TI, [ASCIZ/
[DONE]/]
PSOUT%
JRST ZAP

iRETRIEVE OUTPUT JFN
iCLOSE OUTPUT FILE
iIF ERROR, GIVE MESSAGE AND STOP
jSUCCESSFULLY DONE
jPRINT IT
jSTOP

2-7

FUNCTIONAL ORGANIZATION OF JSYS'S

;*** ERROR HANDLING ***
FATAL:
?/]

HRROI TI, [ASCIZ/
PUSHJ P,ERROR
JRST ZAP

WARN:

;FATAL ERRORS PRINT? FIRST
;THEN PRINT ERROR MESSAGE,
;AND STOP

HRROI TI, [ASCIZ/

%/]

;WARNINGS PRINT % FIRST
; AND FALL THRU 'ERROR' BACK TO CALLER

ERROR:

PSOUT%
MOVE TI, [.PRIOU]
MOVE T2, [.FHSLF,,-l]
SETZB T3,T4
ERSTR%
JFCL
JFCL
POPJ P,

;PRINT THE? OR %
;DECLARE PRINCLPAL OUTPUT DEVICE FOR ERROR MESSAGE
;CURRENT FORK"
LAST ERROR
;NO LIMIT"
FULL MESSAGE
;PRINT THE MESS~GE
;IGNORE UNDEFINED ERROR NuMBER
;IGNORE ERROR DURING EXECUTION OF ERSTR
;RETURN TO CALLER

ZAP:

HALTF%
JRST START
END START

;STOP
;WE ARE RESTARTABLE
;TELL LINKING LOADER START ADDRESS

2.2.6

File Access

TOPS-20 provides a general mechanism for
protecting
flIes against
unauthorized access.
This mechanism includes the ability to protect
access to files on a directory-wide basis as well as on
an
individual-file basis.
Generally, access to a file depends on the kind of access desired and
the
relationship of the
user making
the access to the directory
contalning the file.
The possible relationships a user may have
to
the file's directory are:

I

1.

The dlrectory containing the file is the user's connected or
one of the user's accessed directories.
Users satisfying
this relationship have owner access to
the
files
in the
directory.

2.

The directory containing the file is in the same group as the
user.
Users satisfying this relationship have group member
access to the files in the directory.

3.

The dlrectory containing
the file
is outside the group
membership.
Users satisfying
this relationship have world
access to the files in the directory.

Both users and directories may belong
to groups.
The group-member
relatlonship is satisfied if both the directory and the user belong to
one or more of the same groups.
Groups are assigned
by the
system
manager or operator.
(Refer to the TOPS-20 System Manager's Guide.)

2-8

FUNCTIONAL ORGANIZATION OF JSYS'S
The type of access permitted
to a
file
represented by the value of a 6-bit field.
Value
40
20
10
4
2

Symbol

for
each
relationship is
The possible values are:
Meaning

FP%RD
FP%WR
FP%EX
FP%APP
FP%DIR

Read access
Write access
Execute access
Append access
Directory listing access.
If a
user does not have at least this
type of access, a GTJFN will
find
the file only if wildcards are not
used.
A GNJFN will not find
the
file.

The following table illustrates some useful combinations of the values
shown above:
Value

Symbol

12
42

FP%EX+FP%DIP
FP%RD+FP%DIR

60

FP%RD+FP%WR

Meaning
Execute-only access
Usual protection allowing users to
access a
file without being able
to modify it.
Good
for
hiding
files
that
specific programs can write to.
Programs should be execute-only
and
the program should
set the
"restricted" access bit in the
GTJFN so as not to
reveal the
filename.

The 6-bit field and the three relationships (owner,
group,
users)
are represented by an l8-bit code, with bits 0-5
owner, bits 6-11 being the group, and bits 12-17 being
the
users.
When a
particular bit is on, the corresponding
permitted for the particular relationship.

remaining
being the
remaining
access is

The access given to a group member includes the access given to all
members outside
the group.
Also,
the access given to the owner
includes the access given to group members.
Thus, the owner of a file
or a
user
in the owner's group cannot have less access than users
outside the group.

2.2.7

Directory Access

Access to a directory is protected
in a manner
similar
to,
but
distinct from, that of a file.
An l8-bit code, containing three 6-bit
fields, is associated with each directory.
Each of the
three
fields
controls access by users in the
same way that access to files is
controlled.
For directories, however, each 6-bit field can have one
of the following values.

2-9

FUNCTIONAL ORGANIZATION OF JSYSIS
Value

Symbol

Meaning

40

DP%RD

Accessing files in the directory
according to the access code on
the individual files is allowed.
A
GTJFN call for a file in the
directory will fail
if the user
does not have this access.

10

DP%CN

Connecting
the
directory
to
without
giving
a password is
allowed.
With this access,
a
group member can change the FDB
(a s the owner) CIS well as times,
dates,
and accounting information
for files in the directory. Other
operations
the
files are
on
subject to the access codes of the
files.
If the user is connected
to the directory, he has ownership
access to the files;
if he is not
connected, hE' has group membership
access.

4

DP%CF

Creating files in the directory is
allowed.

When a user reauests access to a file,
the monitor checks the
directory access code first.
If the directory code allows the desired
access, the monitor then checks the access code of the individual
file.
The access 2ctually granted to a file is specified when the user opens
the file with the OPENF call.
If the access specified in the OPENF
call is the same as or less than the access permitted by the IS-bit
access code, the user is granted access to the file.
Tbus, for a user
to be granted access to a specific fIle, two con~itions must be met:
1.

The access code (both directory and file)
must permit the
user to access the file in the desired manner (e.g., read,
wr i te) .

2.

The file must not be open for a conflicting type of access.

2.2.S

File Descriptor Block

Each file has an associated File Descriptor Block (FDB) that contains
various information about the file.
The format of the FDB is shown in
Table 2-1.
The description of each word or bit in the FDB indicates whether
user can change it, and if so, what types of access are required.
types of access are:
1.

WRITE - write access

2.

OWNER - owner access

3.

W/OPR - WHEEL or OPERATOR capabilities enabled

2-10

the
The

PUNCTIONAL ORGANIZATION OF JSYS'S

In some cases, separate JSYS's are required to read, set, and/or clear
various words or bits.
These functions are indicated by:
1.

(R)

-

read

2.

(S)

-

set

3.

(C)

-

cl(~ar

4.

(SC)

-

set/clear

Table :2-1
File Descriptor Plock
Word

Symbol

(FDB)
Meaning

,,'

0

.FBHDR

FDB header lNord.
follows:
80-B28

Individual fields are

as

Reserved for DEC
UNCHANGEABLE

B29-35(FB%LEN)
Length of this file's FDB
UNCRA.NGEABLE
1

.FBCTL

BO(FB%TMP)

File is temporary.
JSYS
CHFDB

BI(FB%PRM)

OWNER

W/OPR

N

Y

Y

File
The
is
permanent.
contents of
the
file may be
deleted, but the FDB may not.
JSYS
CHFDB

B2(FB%NEX)

WRITE

WRITE

OWNER

W/OPR

N

Y

Y

File does not yet have a file
file does not
really
type;
exist.
UNCHANGEABLE

B3(FR%DEL)

File is deleted.
,JSYS

CHFDB

WRITE
N

OWNER
y*

W/OPR
Y

*This bit may be changed by the
owner providing that bit FB%ARC
(in . FBCTL) is not set.
2-11

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-1 (Cant.)
File Descriptor Block (FDB)

--..

------~--------------_r--------------------------

Word

Symbol

Meaning

~'-------4--"-------------+---------

1

.FBCTL
(Cant. )

B4(FB%NXF)

File does not exist because it
has not yet been closed.
UNCHANGEABLE

B5(FB%LNG)

File is longer than 512 pages.
UNCHANGEABLE

B6(FB%SHT)

Reserved for DEC.
UNCHANGE2\BLE

B7(FB%DIR)

File is a directory.
UNCHANGEABLE

B8(FB%NOD)

File is not to be saved by
backup system.

JSYS
CHFDB
B9(FB%BAT)

the

WRITE

OWNER

W/OPR

Y

Y

Y

File may have one or more bad
pages.
This bit indicates that
I/O errors have occurred for
a
page
(or
pages) of a file and
the contents of these pages are
suspect.
This bit is set whenever
the
system has a disk I/O error on
a page of an open file.
The
faulty disk address
is also
added
to
the
list
in
the
system's BAT blocks
for that
disk structure.
If an EXPUNGE is performed
for
a
file for which bit FB%BAT is
set,
the
system performs an
addition21
function
as
it
releases the pages of the
file
back
to the available resource
pool:
it checks each
disk
address in the file against the
list of bad
regions
in
the
structure's BAT blocks and if
it finds
a
match,
it leaves
that page marked as "in use" in
the bit map of available disk
pages,
so that the faulty page
is not reused.
UNCHP-NGEABLE

2-]2

FUNCTIONAL ORGANIZATION OF JSYS'S

Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

Meaning

]

.FBCTL
(Cont.)

BIO(FB%SDR) Directory has subdirectories.
UNCHANGEABLE
Bll (FB%ARC)

B12(FB%INV)

File
has
archive
status.
Appropriate words
in the FDB
(below) specify where the file
is archived.
JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

File is invisible.
Invisible
files can be seen only by using
the Gl%IIN option to GTJFN.
JSYS
CHFDB

B13(FB%OFF)

WRITE

OWNER

W/OPR

N

Y

Y

File is offline.
This is set
by DELF when
it removes the
contents from disk and cleared
when ARCF restores the contents
to disk.
JSYS
DELF(S)
ARCF(C)

WFITE

OWNER

W/OPR

N

N

N

N

Y
Y

B14-B17(FB%FCF)
File class field.
If value of
field is 0 (. FBNRM), file is not
an FMS file.
If value of field
1.S
1 (. FBRMS),
file
is an RMS
file.
JSYS
CHFDB

WRITE

OWNER

W/OPR

N

Y

Y

BI8 (FB%NDL)

Do not delete
this
file.
Do
not delete even if overwritten
by a write or a rena~e.
,JSYS
CHFDB

TOPS-20 Version 5

2-13

WRITE

OWNER

W/OPP

N

N

Y

April 1982

FUNCTIONAL ORGANIZATION OF JSYSPS
Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word
2

Symbol
.FBEXL

Meaning
Link to FDB of next file with the same name
but different file type.
UNCHANGEABLE

3

.FBADR

Disk address of file index block.
UNCHANGEABLE

4

. FBPRT

File access code .
LH:
500000
UNCHANGEABLE
RH:

file access bits.

JSYS
CHFDB

I

5

.FBCRE

CHFDB
.FBAUT

GFUST(R)
SFU8T(SC)
. FBGEN

W/OPR

N

Y

N

WRITE

OWNER

W/OPR

N

N

Y

Pointer to string containing
the name of
the author.
This word is not under direct
user
control.
It
is
only
changed
indirectly,
when the file author string is
changed.
,JSYS

7

OWNER

Date and time
that
the
file
was closed
after the last write to the file.
Modified
when any program writes to the file.
JSYS

6

WRITE

WRITE

OWNER

W/OPR

Y
N

Y
Y

Y
N

Generation and directory numbers of file .
LH(FB%GEN):
generation number of the file.
UNCHANGEl\BLE
RH(FB%DRN):

monitor
internal
number of the file
of .FBCTL is on).
UNCHl\NGFABLE

2-14

directory
(only if B7

FUNCTIONAL ORGANIZATION OF JSYS'S

Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

10

.FBACT

Meaning
Account information.
This word contains a
byte pointer
to an alphanumeric account
designator;
it can be changed with the
SACTF monitor call.
.JSYS
SACTF

11

.FBBYV

WRITE

OWNER

W/OPF

Y

Y

y

I

File I/O information.
BO-B5(FB%RET)
Number of generations to retain
(retention
count) .
If two
generations of the same file
have
different
retention
counts, the count is taken from
the generation currently being
used.
JSYS
CHFDB

WRITE

OWNEF

W/OPR

Y

Y

Y

B6-Bll (FB%BSZ)
File byte size.
This field can
be changed by user with write
access.
.JSYS
CHFDB

WRITE

OWNER

W/OPR

Y

Y

Y

B14-B17(FB%MOD)
Data mode of last open of file.
This
field
can be changed by
user with write access.
JSYS
CHFDB

WRITE

OWNER

W/OPR

Y

Y

Y

B18-B35(FB%PGC)
Page count of file.
Note
that
the
monitor
keeps the page
count updated, so under
normal
circumstances a
user need not
and
should not
alter
this
count.

JSYS
CHFDB
~

WRITE

OWNER

W/OPR

N

N

Y

_ _ _ _. L . -_ _ _ _ _ _ _ _ _- ' - - _ _ _ _ _ _• _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _- - '

2-15

I

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

12

.FBSIZ

Meaning
Number of bytes in
Section 2.2.11.)
JSYS
CHFDB

13

.FBCRV

CHFDB

14

.FBWRT

CHFDB
.FBREF

CHFDB
.FBCNT

CHFDB
RH:

CHFDB

CHFDB
. FBBKI

Y

Y

WRITE

OWNER

W/OPR

Y

Y

Y

WRITE

OWNER

W/OPR

Y

Y

Y

WRITE

OWNER

W/OPR

Y

Y

Y

WRITE

OWNER

W/OPR

N

N

Y

WRITE

OWNER

W/OPR

N

N

Y

WRITE

OWNER

W/OPR

N

N

Y

Reserved for DEC .
UNCHANGEABLE

21

.FBBK2

nonwrite

access

Used by DUMPER for backup purposes .
JSYS

20

Y

number of references to file.

JSYS

. FBBKO

W/OPR

Count word.
LH:
number of writes to file.
.JSYS

17

OWNER

Date and time of last
file.
JSYS

16

WRITE

(Refer

to

Date and time that the file was opened when
the last write to the file was made.
JSYS

15

file.

Date and time of creation of file.
JSYS

I

the

Reserved for DEC
UNCHANGEABLE

2-16

to

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

22

.FBBBT

Meaning
The right half contains the number of pages
in the file when the contents were deleted
from disk.
UNCHANGEABLE
The left
flags:

half

Bl(AR%RAR)

B2(AR%RIV)

B3(AR%NDL)

B4(AR%NAR)

85(AR%FXM)

B6(AR%lST)

is

for

User request for
archived.

the
a

following

file

to

JSYS

WRITE

OWNER

W/OPR

ARCF

Y

Y

Y

be

I

System request for an involuntary
migration of a file.
JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

I

Do not delete the contents of the
file
from disk when the archival
is complete.
.JSYS

WRITE

OWNER

W/OPR

ARCF

N

Y

Y

Resist
involuntary
migration.
This bit is a note from the user
to
the system access
control
program asking that the file not
he moved offline if possible.
,JSYS

WRITE

OWNER

W/OPR

ARCF

N

Y

Y

File is exempt
migration.

from

involuntary

JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

First
pass
archival-collection
progress.
JSYS
CHFDB

2-17

used

of
run

is

WRITE

OWNER

W/OPR

N

N

Y

an
in

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-1 (Cant.)
File Descriptor Block (FDB)
~.------~---.----------~-----------------------------------------------.--~

W·ord
22

Symbol
.FBBBT
(Cant. )

I

Meaning
B7(AR%RFL)

Restore failed.
Set by ARCF to
to indicate that the restore it
is waiting for has failed.
JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

BIO(AR%WRN) Generate a message warning that
the file's off-line expiration
date is approaching.
7B17 (AR%RSN)
Reason file was moved offline:
.AREXP(l)
file expired
.ARRAR(2)
archiving was
requested
.ARRIR(3)
migration was
requested
WRITE
N
Y

~TSYS

I

ARCF (W)
GTFDB(R)

OWNER
N
Y

W/OPR
Y
Y

B18-B35(AR%PSZ)
The right half of .FBBBT is used
to store the number of pages in a
file when the
contents
were
removed from disk.
JSYS
ARCF (W)
GTFDB(R)

I
23

.FBNET

SFTAD
. FBUSW

CHFDB
.FBGNL

W/OPR

N
Y

Y

Y

Y

WRITE

OWNER

W/OPR

N

Y

Y

WRITE

OWNER

W/OPR

N

Y

Y

User-settable word .
JSYS

25

OWNER

N

On-line expiration date and time.
Specifies
the
date and
time at which a
tile
is
considered expired, or specifies an
interval
(in days) after which the file is considered
expired.
JSYS

24

WRITE

Address of FDB for next generation of file.
UNCHANGEABLE

26

.FBNAM

Pointer to filename block.
UNCHANGEABLE

~.------~------------~~--------------.------------------------------

TOPS-20 Version 5

2-18

April 1982

E'UNCTIONAL ORGANI ZATION OF JSYS' S

Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

Meaning

27

.FBEXT

Pointer to file type block.

30

.FBLWR

Pointer to string containing
the name of
the user who last wrote to the file.
This
name is read with the GFUST monitor
call
and can be changed with the SFUST monitor
call.

UNCHANGEABLE

Note that word .FBLWR may only be changed
indirectly
(by
specifying a
new naJTIe
string) .
This word
cannot be
changed
directly.
,JSYS

WRITE

GFUST(R)
SFUST (CS)
31

32

.FBTDT

. FBFET

34

.FBSSI

TOPS-20 Version 5

Y

Y
Y

N

JSYS

WRITE

OWNFR

W/OPR

ARCF

N

N

Y

I

Offline
expiration
date
and
tiJTIe .
Specifies the date and time (or interval)
after which a file in the archives or on
virtual disk
is considered expired.
Used
for tape recycling.
Modified by SFTAD.

SFTAD

.FBTPI

W/OPR

Archive or collection tape-write date and
time.
This
is
the date and
time
(in
interna} format) that file was last written
to
tape
(for
either
archiving
or
migration) .

JSYS

33

OWNER

WRITE

OWNER

W/OPR

Y

Y

Y

Contains the tape ID for the first
or collection run.
JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

archive

Contains the saveset and tape file
numbers
for
the first tape.
The left half is the
number of the saveset in which the file
is
recorded,
and
the
right half is the tape
file nUJTIber within that saveset.
JSYS

WRITE

OWNER

W/OPR

ARCF

N

N

Y

2-19

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-1 (Cont.)
File Descriptor Block (FDB)
Word

Symbol

35

.FBTP2

36

.FBSS2

Mea ning
3rchive or
collection
Tape ID for second
Otherwise simi lar to .FBTPI.
run.
JSYS

WRITE

0 WNER

W/OPR

ARCF

N

N

Y

Saveset and
tape
file
numbers
for
the
second
archive
or
collection
run.
Otherwise similar to .FBSSI.
JSYS

WRITE

0\~NER

W/OPR

ARCF

N

N

Y

The maximum length FDB block that TOPS-20 will create (37
be specified with the symbol .FBLEN.

2.2.9

octal)

may

Primary Input and Output Files

Each process in a job has a primary input file and
a
primary output
file.
Both files
are normally the controlling terminal, but can be
changed to other files (with the SPJFN call).
The primary Input and output files
are
referenced with designators
.PRIIN
(JFN 100) and .PRIOU (JFN 101), respectively.
Programs should
be coded to do their "terminal" I/O to these desiqnators, so that they
can be used with command files without modification.
Only in extreme
cases should a program reference
its controlling
terminal
(.CTTRM)
directly.

2.2.10

Methods of Data Transfer

The most slmpJe form of I/O is sequential byte I/O, as shown
in the
sample program.
(Refer to Section 2.2.5.) This form of data transfer
may be used with any file.
A pointer maintained
in the monitor
is
implicitly
initialized when a file is opened and advanced as data is
transferred.
For files on disk, there are two other methods of data
transfers.
First,
random access byte T/O is possible by using the
SFPTR call or the FIN/ROUT calls.
Second, entire pages of data may be
mapped with the PMAP call.

2.2.11

File Byte Count

For disk files, TOPS-20 maintains a file byte count
(.FBSIZ)
in the
FDB.
This count is set by the monitor when sequential output (e.g.,
BOUT, SOUT) occurs to
the
file
and
thus,
on sequential
output,
reflects the number of bytes written in the file.

2-20

FUNCTIONAL ORGANIZATION OF JSYS'S
When output occurs to the file using the PMAP call, the monitor
does
not set the file byte count.
In this case, the number of bytes in the
file may be different from the file byte count stored in the FOB.
To
allow sequential
I/O to occur later to the file, the program should
update the file byte count (.FBSIZ) and the file byte size (FB%BSZ) in
the FDB before closing the file.
This is done with the CHFOB monitor
call.
When output occurs to the file using random output calls
(POUT,
for
example), the file byte count is a number one greater than the highest
byte number in the file.
The file byte count is interpreted according to the byte
size
stored
in the FDB, not the byte size specified when the file is opened.
When
a new file is opened, the byte size stored in
the
FDB
is 36 bits,
regardless of the byte size
specified
in the OPENF call.
If the
program executes a CHFOB call to change the file byte count,
it must
usually change the byte size (FB%BSZ) so that both values reflect the
same size bytes.

2.2.12

EOF Limit

There is an EOF limit associated with every opening of a
file.
ThIS
limit
is the number of bytes that can be read with a seauential input
call (e.g., BIN, SIN).
When the program attempts to read beyond
this
limit using
sequential
input,
the call
returns a
0 byte and an
end-of-file condition.
This condition may generate a
software
interrupt (refer to Section 2.6) if the user has not included an ERJMP
or ERCAL as the
next
instruction following
the call.
(Refer
to
Chapter 1.)
The EOF limit is computed when the file is opened with the OPENF call.
The monitor
computes
this limit by determining the total number of
words in the file and dividing this number by the byte size given
In
the OPENF call.
The total number of words in the file is determined
from the file byte count (.FBSIZ) and
the
file
byte size
(FB%BSZ)
stored in the FDB.
Note that page-mode I/O JSYS's, such as PMAP, ignore the EOF limit and
can read any existing page of the file.
However, page-mode JSYS's can
only read pages within an existing file section (the address space of
a file delimited by I index block - 512 pages).

2.2.13

Input/Output Errors

While performing I/O or I/O-related operations,
it is possible
to
encounter one or more error conditions.
Some of these are user-caused
errors (e.g., illegal access attempts), and others are I/O device or
medium errors.
TOPS-20
indicates such error conditions by setting
error bits in the JFN status word (refer to the GTSTS call)
and by
initiating a software interrupt request (refer to Section 2.6) if the
user has not included an FRJMP or
ERCAL after
the call.
If
the
process
in which an I/O error occurs is not prepared to process the
Interrupt,
the
interrupt is changed
into a
process terminating
condition with
the expectation that the process' immediate superIor
will handle the error condition.
The TOPS-20 Command Language
is
prepared
to detect and diagnose I/O errors;
thus, a process running
directly beneath the process containing the Command Language need
not
do
its own
I/O error handling
unless
it chooses to do something
special.
2-21

FUNCTIONAL ORGANIZATION OF JSYS'S
I/O errors can occur while a process
is executing ordinary machine
instructions as well as JSYS's.
For example, if a PMAP operation is
performed that maps a page of a file into a page of a
process,
the
file
I/O transfer does not usually occur until a reference is made by
the process to that particular page of the file.
If there is
an
I/O
error in the transfer, it is detected at the time of this reference.

An attempt to do I/O to a terminal that is assigned to another job (as
a
controlling
terminal or with the ~SND call) normally results in an
error, but is legal if the process has the WHEEL capability enabled.

2.2.13.1 Testing for End-of-File - The
GTSTS
JSYS,
used
in
conjunction with ERCAL
(or ERJMP), is used to test for end-of-file.
The following code fragment illustrates this:
MOVE
Tl ,INJFN
BIN%
ERCAL EOFTST

;Get input JFN
;Read a byte
;Process byte

EOFTST: MOVE
GTSTS%
TLNN
PUSHJ
MOVE
CLOSF%
ERCAL
POPJ

Tl,INJFN
T2, (GS%EOF)
P,FATAL
Tl,INJFN

;Get input JFN
;Get status of that JFN
;Did end of file occur?
No, I/O error occurred
; Yes, close file

FATAL
P,

;If can't close,
;OK to ret.urn

F.z\Tl\L:

issue message

;Here to issue error messages
; on fatal file errors
HALTF%

;Halt on fatal error

In the example above, the EFCAL after the BIN IS executed only if a
file
error condItion arises.
The code that is entered as a result of
the ERCAL can then do a GTSTS for the appropriate file
and
test
for
end-of-file.
An alternat.e method to test for end-of-file is to use the
and determine
if the last error for the process is IOX4
reached) .

GETER JSYS
(end of file

The monitor calls used In referencing files are:
GT,JFN
GNJFN
JFNS
WILD%
SPJFN
GPJFN
SWJFN
RL.JFN

Assigns a JFN to a file
Assigns a JFN to the next file
Translates a JFN to a string
Compares a wild file specification against a
file specification.
Also compares strings.
Sets primary JFN's
Returns primary JFN's
Transposes two JFN's
Releases a JFN

OPENF
CLOSF
CLZFF

Opens a file
CJoses a file
Closes a process'

files

2-22

non-wild

FUNCTIONAL ORGANIZATION OF JSYS'S

BIN
BOUT
FLIN
FLOUT
NIN
NOUT
PSOUT
PBIN
PBOUT
SIN
SOUT
SINR
SOUTR
RIN
ROUT
DUMPI
DUMPO
PMAP

Reads the next byte
Writes the next byte
Reads a floating-point number
Writes a floating-point number
Reads a number
Writes a number
Writes string to primary output designator
Reads byte from primary input designator
Output byte to primary output designator
Reads a string
Writes a string
Reads a record
Writes a record
Reads a byte nonsequentially
Writes a byte nonsequentially
Reads data in unbuffered data mode
Writes data in unbuffered data mode
Maps pages

RSCAN
RDTTY
TEXTI

Reads and outputs rescan buffer
Reads data from primary input designator
Reads data from terminal or file

CRLNM
INLNM
LNMST

Creates a logical name
Writes logical names
Translates logical name to string

CHFDB
GTFDB
SFUST
GFUST
CHKAC
ACCES
DIRST
RCDIR
RCUSR

Changes a File Descriptor Block
Reads a File Descriptor Block
Changes the author or last writer name string
Reads the author or last writer name strinq
Checks access to a file
Specifies access to a directory
Translates directory or user number to a string
Translates directory name to number
Translates user name to number

SIZEF
SFBSZ
RFBSZ
SFPTR
RFPTR
BKJFN
RNAMF
SFTAD
RFTAD
STSTS
GTSTS
UFPGS

Obtains file's length
Sets file's byte size
Reads file's byte size
Sets file's pointer
Reads file's pointer
Backspaces file's pointer
Renames a fiJe
Sets file's time and dates
Reads file's time and dates
Sets file's status
Reads file's status
Updates file's pages

DELF
DELDF
DELNF

Deletes a file
Expunges deleted files
Retains specified number of generations of file

FFFFP
FFUFD

Finds first free file page
Finds first used file page

2-23

FUNCTIONAL ORGANIZATION OF JSYS'S
2.3

OBTAINING INFORMATION

The monitor calls in this group are used to obtain information from
the system,
such as the time of day, resources used by the current
job, error conditions, and the contents of system tables.
Several of these calls return time values (intervals and accumulated
times,
for example).
Unless otherwise specified, these values are
integer numbers in units of milliseconds.

2.3.1

Error Mnemonics and Message Strings

Each failure for a JSYS is associated with an error number identifying
the particular failure.
These error numbers are indicated in the
mcnual by mpemonics (DEVXI, for example), and are listed with the
appropriate calls.
Some calls return the error number in the right half of
an
accumulator,
usually in ACl: however, all calls leave the number in
tte Process Storage Block for the process in which the error occurred.
Thus, a process can obtain the number for the last error that occurred
(by means of the GETER call).
In addition to the mnemonic of six characters or less, each error
number has a text message associated with it that describes the error
in more detail.
The ERSTR call can be used to return the message
string associated with any given error number. This call should be
used for handling error returns.
Refer to Chapter 3 and Appendix B
numbers, mnemonics, and messages.

2.3.2

for

the

listing

of

the

error

System Tables

The contents of several system tables are available to programs for
such purposes as generating status reports and collecting system
performance statistics.
Each table is identified by a fixed name of
up to six characters, and consists of a variable number of entries.
The -1 entry in each table is the negative of the number of data
entrles in the table:
the data entries are identified by an index
that increments from O.
Two calls exist for accessing tables. The first,
SYSGT, accepts a
table name and returns the table length, its first data entry, and a
number identifying the table. The second, GETAB,
accepts the table
number returned by SYSGT, or obtained from the MONSYM file, and
returns additional entries from the table.
The system tables are as follows. Numeric table indexes are given in
octal.
Parallel
tables,
those for which a given index produces
related information, are indicated by "(Pn)" where n is a unique
number for that set of parallel tables.

2-24

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-2
System Tables
Name

Contents

Index

APRID

Processor serial number

BLDTD

Date and time system wa s generated

DBUGSW

Debugging information
state of operator cover age

0

0 = unattended

1 = attended
2 = debugging
s to tE' of BUGCHK handlin g
O=proceed
l=br E'a kpo in t.

1

DEVCHR

(PI)

DEVNAM

(PI)

DEVUNT

(Pl)

wo rd ,
as
Device characteristics
oescribed unoer the DVCHR JSYS in
Chapter 3, except that B5 (DV%AV) is
not meaningful.
I

SIXBIT device name
number, e. 9 • , MTA3
LH:

I RH:
~

in cluding

oevice
Job number t.o which
(wi th ASND)
or -1
assigned
or -2
device is not assigned
reserved for device all ocator.
unit number, or -1 if d evice has
uni t!:; (e.g. , DSK: )

unit
is
if
if
no

Information on drum err ors

DRMERR

number of recoverable e rrors
varies depending on t ype of
being used

0
I to n

drum

Information on disk err ors

DSKERR

number of recoverable d isk errors
varies depending on t ype of disk
being used

0
I to n
I

Downtime information

DWNTIM

date and time when sys tern will be
shut down next
will
dat.e and time when system
subsequently be up

0
1

HQLAV

i

High queue load average s

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-2 (Cant.)
System Tables

._---,-._--_._------y------------------------------,
Name

Index

Contents

-.-----------~---------------------------

IMPLTI

c (P2)
LH:

ARPANET -

I fuJlword for each link:

internal
for:

connection

number,

index

NETAWD
NETBAL
NETBTC
NETBUF
NETFSK
NETLSK
NETSTS
or -1 if control link
RH:

BlS-19

B20-27
B2S-35

00
10

receive
send
1]
freE'
01
delete
host number
link number
c (index)
is derived
bits 24-35 of NETAWD.

IMPLT2

c (P2)

ARPANET LH:
PH:

from

1 fullword for each link:

BO-9
flags
BI0-17 bytE' size of buffer
address of input buffer
c (i n de x) i s de r i v e d from bit s 24- 3 5
of NETAWD.

IMPLT3

c (P2)

ARPANET LH:
RH:

1 fullword for

each link:

address of output buffer
message saved for retransmission
c (index) is derived from bits 24-35
of NETAWD.

IMPLT4

c(P2)

ARPANET LH:
RH:

I

full word for each link

address of current buffer
message allocation in bits
c (index) is derived from bits 24-35
of NETAWD.

JBONT

Job #

Owning job for CRJOB-created jobs.

2-26

FONCTIONAL ORGANIZATION OF JSYS'S
Table 2-2 (Cont.)
System Tables
Name

Index

JOBNAM

Job #

JOBPNM

Job #

SIXBIT name of
this job

JOBRT

Job #

CPU time used by the job
if no such job)

JOB TTY

Job #

Contents
LH:
RH:

LH:
RH:

LOGDES

program

running

in

(negative

controlling terminal line number, or
-1 if none (i.e., job is detached)
reserved for DEC
Logging information

o

designator for logging information

1

designator
for
information

LQLAV
NETHST

reserved for DEC
index into the system program tables
for the system program being used by
this job
(determined
by the
last
SETSN call executed by the job)

job

0

and

error

Low queue load averages

c (P2)

l\RPl\NET
1
full
word
internal connection:

for

each

-1 if no foreign host, otherwise the
same as IMPLT5.
c (index) is derived from bits 24-35
of NETAWD.
NETAWD

c(P2)

ARPANET
1 full
word
internal connGction:
BO-8
B9-17
818-23

for

each

link number
unused
timeout countdown

824-35 index to link tables
c
(index)
is
internal
connection
(see IMPLTl).
NETBAL

c (P2)

ARPANET - number of bits allocated
to each internal connection
c
(index)
is
(see IMPLTl).

2-27

internal

connection

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-2 (Cont.)
System 'I'ables
Name

Index

NETBTC

c (P2)

NETBUF

Contents
ARPANET
byte count statistics:
the number of bits sent or received
over each internal connection
since
the socket was created.

c (P2)

LH:
RH:

c
( i n de x )
i s i n t ern a 1
(see IMPLTl).

connection

ARPANET
1
fullword
internal connection:

for

bytes per buffer
buffer location -1
c
(index)
is
(see IMPLTl).

NETFSK

c (P2)

c(P2)

connection

internal

connection

ARPANET - local
socket number
each internal connection
c
(index)
is
(see IMPLTl).

NETRDY

internal

ARPANET - foreign socket number
(32
bits) for each internal connection
c
(index)
is
(see IMPLTl).

NETLSK

each

Internal

for

connection

ARPANET operational status table

o
1
2
3
4

5
6
7

o

IMP down
.GT.O
IMP going down
-1
IMP up
o = network off, non-zero
network
on
flags for NETSER (not for user)
time of last NCP cycle up
last IMP GOING DOWN message
BO-15
reserved
B16-17 0 panic
1
scheduled hardware PM
2 software reload
3 emergency restart
B18-21
number
of
5-minute
intervals before
IMP goes
down
B22-31
number of 5-minute intervals
IMP will be down
time of last IMP ready drop
time of last IMP ready up
time of IMP GOING DOWN message

2-28

FUNCTIONAL ORGANIZATION OF JSYS'S
'J'able 2-2 (Cant.)
System Tables
Name

Index

Contents

NCPGS

One-word table containing number
of
pages of
real (physical) user core
available in system.
Note that this
value
includes
resident variables,
and thus not all of the pages can be
assigned to a user process.

NSWPGS

Default swapping pages

PTYPAR

Pseudo-TTY parameter information

o

LH:
RH:

number of PTYs in system
TTY number of first PTY

QTIMES

o

SNAMES

(P3)

SIXBIT name of system program, or
0
if
this entry is unused in this and
the corresponding four tables.

SNBLKS

(P3 )

Number of
samples
size integral

SPFLTS

(P3)

Total
number
of
system program

SSIZE

(P3)

Time integral of working set size

STIMES

(P 3)

Total runtime of system program

to n

Accumulated runtime of jobs on the n
scheduler queues

in
page

working

set

faults

of

SYMTAB

SIXBIT
table:;

SYSTAT

Monitor statistics.
The entries
this table are as follows:
0
1
2
3
4
5
6
7

10
11

12
13
14
L-________

~

________. _________

~

table

names

of

all

GETAB
in

time with no runnable jobs
waiting time with 1 or more runnable
jobs (waiting for page swapping)
time spent in scheduler
time spent processing pager traps
number of drum reads
number of drum writes
number of disk reads
number of disk writes
number of terminal wakeups
number of terminal interrupts
time integral of number of processes
in the balance set
time integral of number of
runnable
processes
exponential
I-minute
average
of
number of runnable processes
___________________________________________________

2-29

~

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-2 (Cant.)
System Tables

.....
Name

Index
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
40

41
42
43

44
45

46
47

Contents
exponential
5-minute average
of
number of r unnable processes
exponential
l5-minute average
of
number of run nable processes
time integral of number of processes
waiting for t he disk
time integral of number of processes
waiting for t he drum
number of ter minal input characters
number of ter minal output characters
number of
s ystem core management
cycles
time spent do ing postpurging
number of for ced balance set process
removals
time integral of number of processes
in swap wait
scheduler ov erhead
time
(same as
entry 2) in h igh precision units
Idle time (sa me as entry 0) in high
precision uni ts
lost time (sa me as entry 1) in high
precision uni ts
user time
time integral of number of processes
on high queu e.
(High queue is high
priority, low numerical value.)
time integral of number of processes
on
low queu e.
(Low queue is low
priority, hig h numerical value.)
sum of proces s dlsk-write waits
number of
f arced
adjustments
to
balance set
integral of n umber of reserve pages
of all proces ses in memory
integral
of number
of pages
on
replaceable queue.
The replaceable
Queue contain s pointers to all
free
memory pages.
high precisio n pager trap time
number of can text switches
time spent 0 n
background
tasks.
These
tasks
include low-level data
transfer betw een RSX20F and TOPS-20,
and moving d ata from'swappinq space
to file space
total system page tral?s
t-ota 1 saves f rom replacement queue.
Jl.
"save" occ urs when a desired page
is found on the
replacement queue
and need not be paged in.
number of pag es removed from memory
during
s ystem-wide
garbage
collection.
inteqral of n umber of working
sets
in memory

2-30

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-2 (Cont.)
System Tables
Name

Contents

Index

50

integral of number
of wait time
without swap waits
count of working set loads
count of runable processes
removed
from balance set
number of pages removed from memory
during
process-wide
garbage
collection.

51
52

53

NOTE
This
table
is subject
to
change
(usually additions)
as measuring
routines are
added to the system.
An ASCIZ
string
identifying
the
system name, version, and date.
The
string has the following format:

SYSVER

string, TOPS-20 Monitor n.m(o)-p
where
"string"
is
the
text
contained
in
the
file
structure:MONNAM.TXT,
"n"
is
the major version number
(1
to
3
digits),
"m"
is the minor
version
number
(0
to
2 dig its), "0" is the
edit number (1 to 6 digits),
and
"p"
is
the number of the group that last
edited the version (0 or 1 digit).
If "m" is zero, it and
its preceding
period are omitted.
If "p" is zero,
it and
its
preceding
hyphen
is
omitted.
Otherwise,
the period and
the hyphen are stored along with
the
other
information,
including
the
spaces and parentheses as shown,
in
the table.
One-word table containing
clock ticks per second.

TICKPS
T'rYJOB

line #

number

of

LH:

positive job number for which this
is
the controlling terminal, or
-1 for unassigned line, or
-2 for line currently being assigned,
or
job number
to which this line is
assigned.

RH:

-1 if no process is waiting for
input
from
this terminal;
other than -1 if
some process is waiting for input.

~----------~--------------

2-31

FUNCTIONAL ORGANIZATION OF JSYS'S
The system program being run by a specific job may be determined
SNAMES, using an index obtained from table JOBNAM.

from

The following monitor calls are used for obtaining information:
GETER
ERSTR
ESOUT
SYSGT
GETAB
GETNM
GETJI
GJINF
GTAD
TIME
RUNTM
HPTIM
GTDAL
GTRPI
GTRPW

2.4

Returns the last error condition
Translates an error number to a string
Returns an error string
Returns values for a system table
Returns a word from a system table
Returns the program name being used by the job
Returns job information for specified job
Returns job information for current job
Returns the system's date
Returns the time since the system was restarted
Returns the runtime of a job or process
Returns the high-precision clock values
Returns the disk allocation of a directory
Returns the paging trap information
Returns the trap words

COMMUNICATING WITH DEVICES

The monitor calls in this group are used
to communicate with the
devices on the system.
Some of these devices are line printers,
magnetic tapes, terminals, and card readers.
Many of the monitor calls in this group take a device designator as an
argument.
This designator can be either
LH: .DVDES(600000)+device type number
RH: unit number for devices that have units, arbitrary code
for structures, or -1 for non-structure devices that do not
have units
or
LH:
RH:

a
.TTDES(400000)+terminal number, or .CTTRM(O,,-l) for
controlling terminal

The STDEV monitor call
is used
corresponding device designator.
The various devices are as follows:

to

convert

a

string

to

its

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-3
Device Types
Name
DSK:
MTA:
MT:
LPT:
PLPT:
CDR:

PCDR:
FE:
TTY:
PTY:
NUL:
NET:
CDP:
PCDP:
DCN:
SRV:

Description
disk structure
magnetic tape
logical magnetic tape
spooled line printer
physical line printer
spooled card reader
physical card reader
front-end
pseudo-device
tenlinal
pseudo-terminal
null device
ARP1~ network
spooled card punch
physical card punch
DECnet active
component
DECnet passive
component

Type

Sym bol

Units

0
2
2

.D VDSK
.D VMTA
.D VMTA

no
yes
yes
yes
yes
yes
yes

7
7

-

10
10

-

11
12
13
15
16
21
21

.0 VFE

.D VLPT
.D VCDR

.D VCDP

no
yes
yes
no
no
yes
yes

22

.D VDCN

no

23

.D VSRV

no

.D VTTY
.D VPTY
.D VNUL
• DVNET
.

-

Device-designators may be formed for the devices shown above by taking
the given symbolic device-type and adding .DVDES (600000).
The null device is an infinite sink for unwanted output and returns an
EOF on input.
Device-dependent status bits are defined for some devices.
These bits
can be set or returned with the SDSTS or GDSTS call, respectively.
When an assignable device is assigned (by the ASND call) or opened
the OPENF call) by one job, other jobs cannot do the following:
1.

Assign the device with ASND.

2.

Execute an OPENF call
for
the
properly represents the device.

device,

even

if

Structures are not restricted to these limitations:
more
user
can
simultaneously execute the OPENF call
for
structures.

the

(by

JFN

than one
files on

The following sections describe each of the devices listed in the
table above.
The sections are in alphabetic order by generic device
type (thus PCDF: and CDR: are listed under "c").

2.4.1

Physical Card Reader

(PCDR:)

The following device-dependent status bits are defined
for
the card
reader.
These bits can be obtained with the .MOFST function of the
MTOPR call.

2-33

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-4
PCDR: Status Bits
Bit

Symbol

Me aning

BO

MO%COL

Device is on line.

BID

MO%FFR

This error generates
Fatal hardware error
an interrupt on s oftware channel .ICDAE.
(Refer to Section 2. 6.1. )

B12

MO%EOF

Card reader is at en d of file.

B13

MO%IOP

I/O in progress.

B14

MO%SER

Software
error.
(Would
generate
interrupt on an assi gnable channel.)

an

B15

MO%HE

Hardware
error.
(Would
generate
interrupt on softwar e channel .ICDAE.)

an

B16

MO%OL

Device is off line.

B17

MO%FNX

Device is nonexisten t.

B31

MO%SFL

Output stacker full.

B32

MO%HEM

Input hopper empt.y.

B33

MO%SCK

Stack check.

B34

MO%PCK

Pick check.

B35

MO%RCK

Read check.

1-'

2.4.2

Spooled Card Reader

(CDR:)

On most systems, the physical card reader devices (PCDR: devices)
are
under
the control
of
the card reader spooler, SPRINT, and thus the
ordinary user cannot open a PCDR: device,
and must instead open a
spooled card reader device (CDR:).
When a GTJFN is performed on device CDR:, the device characteristics
(returned by DVCHR)
are
the same as those for device PCDR:.
Thus,
CDR: devices have unIts, and a unit number may be specified
for
the
GTJFN.
When the OPENF
is performed,
However,
the device characteristics
become the same as device DSK:.
This is because data read from device
CDR: is actually read from a file in the spool directory .
The file is then spooled from the spool directory
to the PCDR: device by SPROUT.
Thus device CDP: is effectively a disk device,
and no monitor
call
that can be used only to set the characteristics of ~ PCDP: device can
be used for a CDP: device.
Also, disk-only operations (such as PMAP)
should not be done for a CDP: device.
Both ASCII and image mode are
supported for CDP: devices.

2- 3~)

FUNCTIONAL ORGANIZATION OF JSYS'S
2.4.S

Physical Line Printer

(PLPT:)

The line printer normally accepts the 128 7-bit ASCII character codes
(0-177 octal).
However, by specifying a byte size of 8 when opening
the printer, a program can transfer 8-bit bytes.
Thus,
the program
can take advantage of printers that have more than 128 characters.
Each code sent usually causes a graphic to be printed.
(Note that on
a
64-character printer,
lower case letters are represented as upper
case.) However, the carriage control characters do not cause a graphic
to be printed;
instead they cause specific actions to be taken.
The
actions taken are determined by the translation RAM and the Vertical
Formatting Unit.
These actions can be redefined by the installation,
and the method by which they are redefined depends on the type of
printer being used.
For the LP10 printer, which has a carriage control tape,
the
installation must change the tape to redefine the resulting actions.
For the LPOS and LP14 printers, which have a direct access Vertical
Formatting Unit and a programmable translation RAM, the installation
can redefine the resulting actions by:

1.

Reprogramming the VFU by changing the VFU file with
MAKVFU program and reloading this file and the RAM.

2.

Reprogramming the translation RAM by changing the
with the MAKRAM program and reloading this file.

Refer to the LPINI and MTOPR monitor calls for the functions
loading the VFU and RAM files.

RAM
used

the
file
in

The default actions taken on the carriage control
characters,
along
with the default channels that determine these actions,
are as
follows:

2-36

FUNCTIONAL ORGANIZATION OF JSYS'S

Table 2-6
PLPT: Control Characters
ASCII Character
Code

i

Default
Channel

Name

Default
Action

!

11

Tab

No
vertical
motion.
Skips to the beginning
of every 8th column on
the same line.

12

8

Line feed

Skips to column 1 on the
next line.
The last six
lines of each page are
skipped.

13

7

Vertical tab

Skips to column 1 on the
line at the next third
of a page.

14

1

Form feed

Skips to column 1 on the
top of the next page.

15

Carriage
return

20

2

Half page

21

3

1\lternate
lines

No
vertical
motion.
Returns to column 1 of
the current line
and
does
not advance
the
paper.
Skips to column I on the
next half page.
Skips to column 1 on the
next even line.

22

4

Three Jines

Skips to column 1 on the
next
of
every third
line.

23

5

Next line

Skips to column 1 on the
line
without
next
skipping the last six
lines on a page.

24

6

Sixth page

Skips to column 1 on the
next sixth of a page.

The association between the ASCII code and the channel
is determined
by the RAM.
The association between the channel and the default
action is determined by the VFU.
Therefore,
a
change in the VFU
changes the association between the channel and the action, which
causes the ASCII code to be associated with the new action.

2-37

I

FUNCTIONAL ORGANIZATION OF JSYS'S
2.4.5.1 PLPT: Status Bits - The following device-dependent
status
bits are defined
for
the line printer.
These bits can be obtained
with the .MORST function of the MTOPR call.
Table 2-7
PLPT: Status Bits
--.-------.~-----------,-------------------.---------------------------------------~

Bit

Symbol

BO

MO%LCP

Lower case printer

BID

MO%FER

Fatal hardware error.
This error generates an
interrupt on software channel .ICDAE (refer to
Section 2.6.1).

B12

MO%EOF

All data sent to the printer has actually
printed.

B13

MO%IOP

I/O in progress

814

MO%SER

Software error (e.g., Interrupt character, page
counter overflow)

B15

MO%HE

Hardware error.
Forms must be realigned.
This
error
generates
an
interrupt on software
channel .ICDAE.

B16

MO%OL

Device is off line

B17

MO%FNX

Device is nonexistent

B30

MO%RPE

RAM parity error

B3l

MO%LVU

Optical VFU

B33

MO%LVF

VFU error

B34

MO%LCI

Character
interrupt.
This
interrupt on channel .ICDAE.

835

MO%LPC

Page counter register overflow

2.4.6

Meaning

Spooled Line Printer

generates

been

an

(LPT:)

On most systems, the physical line printer devices
(PLPT:
devices)
are under
the control of the line printer spooler, LPTSPL and thus
the ordInary user cannot open a PLPT: device and must, instead, open
a spooled line printer device (LPT:)
When a GTJFN is performed on device LPT:, the device characteristics
(returned by DVCHR) are the same as those for device PLPT:.
Thus,
LPT: devices have units, and a unit number may be specified for
the
GTJFN.
However,
when
the
OPENF is performed,
the device
characteristics become the same as device DSK:.
This is because
data written to device LPT: is actually written to a file in the
spool directory PS:.
When device LPT: is closed, the file in

is closed and a message sent to the line printer spooler
LPTSPL causing it to print the file on the Jine printer.
2-38

FUNCTIONAL ORGANIZATION OF JSYS'S
Thus device LPT: is effectively a disk device,
and none of the
monitor calls that can be used only to set the characteristics of a
PLPT: device can be used for a
LPT:
device.
Also,
disk-only
operations (such as PMAP) should not be performed for LPT: devices.
Note that LPTSPL writes only 7-bit bytes, so opening a LPT:
device
with any other byte size will cause erroneous results.
Also, only
ASCII mode is supported for LPT: devices.

2.4.7

Physical Maqnetic Tape (MTA:)

The following device-dependent bits are defined for magnetic tape.
Table 2·-8
MTA: Status Bits
Bit

Symbol

Meaning

~---------r----------.-+-----------------.----.------------------------------------~

18

MT%ILW

Drive is write protected

19

MT%DVE

Device error

20

MT%DAE

Data error

21

MT%SER

Suppress automatic error recovery procedures

22

MT%EOF

Device EOF (file) mark

23

MT%IRL

Incorrect record length (not the same number of
words as specified by the read operation or not
a whole number of words)

24

MT%BOT

Beginning of tape

25

MT%EOT

End of tape

26

MT%EVP

Even parity

29-31

MT%CCT

Character counter if MT%IRL is on.
In the case
of an error generated by an incorrect record
length, this field contains the number of bytes
actually transferred.

32

MT%NSH

The selected data mode or density is not
supported
by the hardware
(such as using
ANSI-ASCII mode on a TM03 controller).

(hung or data late)

Data transfers to and from the magnetic tape can
either buffered or unbuffered I/O.

2-39

be

performed

using

FUNCTIONAL ORGANIZATION OF JSYS'S

I

2.4.7.1 Buffered I/O - The monitor
uses buffered I/O
when
the
sequential
I/O calls (e.g., BIN/BOUT, SIN/SOUT) are used to read from
or write to the magnetic tape.
When the tape is opened for sequential
I/O
(data mode .GSNRM on the OPENF call), the monitor reserves buffer
space large enough to hold two records of data.
The maximum size of
the records is specified with the SET TAPE RECORD-LENGTH command or
the .MOSRS function of the MTOPR monitor call.
The maximum record
lengths for magnetic
tapes supported by TOPS-20 are listed in the
description of the .MOSRS function of the MTOPR monitor call.
The
buffers reserved by the monitor allow the user's program to overlap
computation with the transfer of data to and from the tape.
The BIN monitor call is used to read one byte from the tape, with the
monitor
filling one buffer with data as the user program is reading
bytes from the other buffer.
A program reading data
from the tape
with successive BIN calls obtains a stream of bytes until a tape mark
is read.
The SIN monitor call is used to read a speciiied number of
bytes with the monitor again performing the double buffering.
Both
the BIN and the SIN calls read across record boundaries on the tape.
The SINR monitor call is used to read variable-length records from the
tape because each call returns one record to the user program.
If the
record on the tape contains more data than the SINR call requests, the
remaining bytes in the record are discarded.
'rhe SINR call never
reads across record boundaries on the tape.
Thus, each SINR call
begins reading at the first byte of the next record on the tape.
With
all
three calls, the specified record size must be at least as large
as the largest record being read from the tape.
The BOUT monitor call is used to write one byte on the tape.
A
program writing data on the tape with successive BOUT calls writes a
stream of bytes packed into records of the specified size.
The SOUT
monitor call
is used
to write a specified number of bytes into one
record equal to the given record size.
The SOUTR call
is used
to
write variable-length records on the tape because each call writes at
least one record.
The size of the record
is equal
to either
the
number of bytes specified
in the SOUTR call or the number of bytes
specified in the maximum record size, whichever is smaller.
If the
number of bytes requested in the call is greater than the specified
record size, then records of the maximum size are written,
plus
another
record containing the remaining bytes.
If the end of tape
marker is reached during sequential mode output, the data
is written
and an error
return is given.
Bit MT%EOT (bit 25) in the device
status word will be set to indicate this condition.
When a CLOSF monitor call is executed for a magnetic tape to which
buffered output is being done, any data remalning in the monitor's
buffers will be written to the tape.
The monitor writes two tape
marks after
the last record written and backspaces over the second
mark.
This allows a subsequent write operation to overwrite the last
tape mark,
and always leaves two tape marks (a logical end of tape)
after the last record written.
The monitor does not write records of less than four words long.
Thus
if the user requests less than four words to be written on a SOUTR or
DUMPO (see below)
call,
the monitor writes a
four-word
record,
completing it with zeros.
On a SOUT call, if less than four words
remain in the buffer at the time of the CLOSF call, the monitor again
f111s the record with zeros.

2-40

FUNCTIONAL ORGANIZATION OF JSYS'S
2.4.7.2 Unbuffered I/O - The DUMPI and DUMPO monitor calls are used
to read from or write to the magnetic tape without using buffered I/O.
(Unbuffered I/O is sometimes called dump mode I/O.)
Unbuffered I/O
uses a program-supplied command list to determine where to transfer
data into or out of the program's address space.
The command list can
contain three types of entries:
1.

IOWD n, loc transfers n words from loc through loc+n-l.
The
next command is obtained from the location following the
IOWD.
Each IOWD word reads or writes a
separate magnetic
tape record.

2.

XWD 0, Y takes the next command from location y.

3.

0 terminates the command list.

Refer to the DUMPI call description for more information.
On input, a new record is read for each IOWD entry in the command
list.
If the IOWD request does not equal the actual size of the
record on the tape, an error (IOX5) is returned.
The GDSTS monitor
call can then be executed to examine the status bits set and to
determine the number of bytes transferred.
In addition,
if a
tape
mark is read, an error (IOX4) is returned.
On output, a new record is
written for each IOWD entry in the command list.
There are two modes available in unbuffered I/O.
In the normal mode,
the monitor waits for the data transfer to complete before returning
control to the program.
In the no-wait mode,
the monitor
returns
control
immediately after queuing the first transfer so that the
program can set up the second transfer.
The monitor
then waits for
the first
transfer
to complete before queuing the second.
If the
first transfer is successful, the second one is started,
and control
is returned to the program.
If the first transfer is not successful,
an error is returned in ACl, and the second one is not started.
The
desired mode is specified by bit DM%NWT in ACI on the DUMPI or DUMPO
call.

2.4.7.3 Magnetic Tape Status - The status word of a magnetic tape can
be obtained with
the GDSTS call or individual status bits can be
obtained with the MTOPR call.
The GDSTS call waits for all activity
to stop during sequential mode output,
dump mode,
and spacing
operations before obtaining the status.
A GDSTS call executed during
sequential mode input returns the status of the current record.
Reading from or writing to a magnetic tape cannot be done if there are
any errors set in the device status word.
The program can clear
errors with the SDSTS call or the .MOCLE function of the MTOPF call.

2.4.7.4 Reading Gl Tape in the Reverse Direction - With
the
.MOSDF
function of the MTOPR call, the program can cause the tape to move in
the reverse direction (toward the beginning of the tape)
during read
operations.
The data in each record are returned in the forward
order, but the records themselves are returned in the reverse order.
The sensing-foil marking
the beginning of tape is treated as an EOF
tape mark.

2-41

FUNCTIONAL ORGANIZATION OF

JSYS~S

When the SIN call is used to read data in the reverse dIrection,
the
byte size and
record
length specified in the call should equal the
byte size and record length of the records on the tape.
If the record
characteristics specified in the call do not equal the characteristics
of the records on tape, the bytes are returned out of phase with
the
bytes in the tape record.
When the SINR call is used to read data in the reverse direction,
the
number
of bytes requested by the call should be at least as large as
the size of the record on the
tape.
If
the
requested
number
is
smaller
than
the number
of bytes in the tape record, the remaining
bytes In the recor~ are discarded from the beginning of the record and
not from the end of the record.

2.4.7.5 Hardware Data Modes - By using the
.MOSDM function of
the
MTOPR call,
the program can set the mode
for storing data on a
magnetic tape.
The
following descriptions
indicate how bits are
stored
In the
tracks and
the number of frames reauired to store a
36-bit word of data.
The parity bit is represented in the diagrams by "P".
NOTE
Data undergoes 2 transformations before
it is actually written to magnetic tape.
The first transformation occurs when a
word of data
is formed into frames by
the tape controller.
The
formats of
these
frames are
illustrated
in the
diagrams below.
A second transformation occurs when
the
tape drive receives a frame of data from
the controller,
and physically writes
that frame to tape:
the bIts within the
frame are rearranged and
then written.
This
final
format
is standardized
throughout the computer industry and
is
designed
to
(among other things) place
the parity bit in the center of the tape
(the
"safest"
part
of
the
tape).
Because
this
final
format
is
standardized, it is "invisible" and does
not affect user programs in any way.
Programmers who must deal
with
the
problem of transferring data between DEC
machines and
the machines of
other
vendors need only concern
themselves
with the formats
shown below.
Thus,
whIle
it
is
technically incorrect to
think of the diagrams below as
showing
the phYSIcal format of a word stored on
magnetic tape, it is convenient
to do
so,
and
this simplification is made in
this manual.

2-42

FUNCTIONAL ORGANIZATION OF JSYS'S

Unbuffered (Dump) Mode
This mode stores a word of data as a 36-bit byte in five frames of a
9-track tape. Note that the fifth frame is partially used. This mode
is normally the default mode.
TRACKS

FRAMES

9

8

7

6

5

4

3

2

1

BO
B8
B16
B24
0

Bl
B9
Bl:
B25
0

B2
BlO
B18
B26
0

B3
Bll
B19
B27
0

B4
B12
B20
B28
B32

B5
B13
B2l
B29
B33

B6
B14
B22
B30
B34

B7
B15
B23
B31
B35

P
P
P
P
P

1

2
3
4

5

Industry Compatible Mode
This mode stores a word of data as four 8-bit bytes in four frames of
a 9-track tape. On a read operation, four frames of 8-bit bytes are
read, left-justified, into a word. The remaining four bits of the
word are 0, or are copies of the parity bits, depending on the
hardware;
these bits are not data.
On a write operation,
the
leftmost four 8-bit bytes (i.e., bits 0 through 31) of the word are
wrItten in four frames on the tape. The rightmost four bits
(i.e.,
bits 32 through 35) of the word are ignored and are not written on the
tape. This mode is compatible with any machine that reads and writes
8-bit bytes.
TRACKS

FRAMES

9

8

7

6

5

4

3

2

1

BO
B8
B16
B24

Bl
B9
B17
B25

B2
BlO
B18
B26

B3
Bll
B19
B27

B4
B12
B20
B28

B5
B13
B2l
B29

B6
B14
B22
B30

B7
B15
B23
B3l

P
P
P
P

1

2
3
4

ANSI ASCII Mode
This mode stores a word of data as five 7-bit bytes in five frames of
a 9-track tape. On a read operation, five frames of 7-bit bytes are
read, left-justified, into a word. The remaining bits
(bits 35)
of
each frame are ORed together, and the result is placed in bit 35 of
the word. On a write operation, the leftmost five 7-bit bytes of the
word are written in five frames on the tape. Bit 35 of the word must
be zero to conform to ANSI standards.
It is written into the
high-order bit of the fifth frame, and the remaining high-order bits
of the first four frames are O. This mode is useful when transferring
ASCII data from 'rOPS-20 to machines that read 8-bit bytes. This mode
is avaIlable on any 9-track drive connected to a TM02 or DX20 tape
controller.

2-43

FUNCTIONAL ORGANIZATION OF JSYS'S
TRACKS

FRAMES

9

8

7

6

5

4

3

2

1

0
0
0
0
B35

BO
B7
B14
B21
B28

B1
B8
B15
B22
B29

B2
B9
B16
B23
B30

B3
B10
B17
B24
B31

B4
B11
B18
B25
B32

B5
B12
B19
B26
B33

B6
B13
B20
B27
B34

P
P
P
P
P

1
2
3
4
5

SIXBIT Mode
This mode stores a word of data as six 6-bit bytes in six frames of a
7-track tape.
This mode is the only supported hardware mode for
7-track tapes.
TRACKS

FRAMES

7

6

5

4

3

2

1

BO
B6
B12
B18
824
B30

B1
B7
B13
B19
B25
B31

B2
B8
B14
B20
B26
B32

B3
B9
B15
B21
B27
B33

B4
B10
B16
B22
B28
B34

B5
B11
B17
B23
B29
B35

P
P
P

1
2
3
4
5
6

p

P
P

Hi']h Density Mode
In this mode, two 36-bit words are stored in 9 frames.
High density
mode is available on any 9-track drive connected to a DX20 controller.
TRACKS

FRAMES

9

8

7

6

5

4

3

2

1

BO
B8
B16
B24
B32
B4
1312
B20
B28

B1
B9
B17
B25
B33
B5
B13
B21
B29

B2
B10
B18
B26
B34
B6
B14
B22
B30

B3
B11
B19
B27
B35
B7
B15
B23
B31

B4
B12
B20
B28
BO
B8
B16
B24
B32

B5
B13
B21
B29
B1
B9
B17
B25
B33

B6
B]4
B22
B30
B2
B10
B18
B26
B34

B7
B15
B23
B31
B3
B11
B19
B27
B35

P
P
P

2-44

P

P
P
P
P

P

1
2
3
4
5
6
7
8
9

F'UNCTIONAL ORGANIZATION OF JSYS' S
2.4.8

Logical Magnetic Tape (MT:)

Logical magnetic tape devices are used so that the system operator can
fulfill a MOUNT request with any available tape drive that meets the
requirements of the MOUNT request.
The user never knows and need not
know which physical drive (MTA:) is mapped to the logical drive (MT:).
Some JSYS functions available for MTA: devices are not available for
MT: devices.
Also,
MT: devices are commonly used in a tape-labeled
environment which causes further restrictions in the JSYS functions
available for
M~':
devices.
See the appropriate JSYS's for any
restrictions that may apply.

2.4.9

Terminal (TTY:)

Most monitor calls in this group return an error
if the device
referenced
is assigned to another job.
However, a process with WHEEL
capability enabled can reference a terminal assigned to another
job
(as controlling terminal or with ASND).
The monitor calls pertaining
to terminals have no effect, or return default-value information, when
used with other devices.
The following status bits are defined for TTY's.
Bit

Symbol

B35

GD%PAR

Meaning
The TTY will tolerate a parity bit.
Any program
producing binary output for a TTY should check
this bit to determine if it should apply parity.
If parity is to be applied, the TTY must be opened
with an 8-bit bytesize;
otherwise,
a
7-bit
bytesize must be used.
DECNET NVT's will not

acce~t

a parity bit.

2.4.9.1 JFN Mode Word - Each terminal in TOPS-20 is associated with a
mode word.
This word can be read with the RFMOD call and changed with
the SFMOD and STP}\R calls.
The SFMOD call affects only the modes that
are program-Irelated:
wakeup control, echo mode, and terminal data
mode;
thus a proqram can execute a SFMOD call without affecting
previously-I established device modes.
The STPAR call, on the other
hand, affects fields that describe device parameters
(mechanical
characteristics, page length and width, case conversion, and duplex
control).
Table 2-9 shows the format of the JFN mode word.

2-45

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-9
JFN Mode Word
~.------~--.----~------------~---.--------------------------------------------~

Bit

Symbol

I)

TT%OSP

SFMOD

1

TT%MFF
TT%TAB
TT%LCA
TT%LEN
TT%WID
TT%WAK

STPAR
STPAR
STPAR
STPAR
STPAR
SFMOD

SFMOD
STPAR
TLINK
TLINK
SFMOD

30

TT%IGN
TT%WKF
TT%WKN
TT%WKP
TT%WKA
TT%ECO
T'i'% ECM
TT%ALK
TT%AAD
T'l'%DAM
.TTBIN
. T'rASC
.TTATO
.TTATE
TT%UOC

31

TT%LIC

STPAR

32-33

TT%DUM
.TTFDX
.TTHDX
.TTLDX

STPAR

34

TT%PGM

STPAR

:2
:3

4-10
11-17
18-23

24
25
26
27
28-29

35

TT%CAR

Changed by

STPAR

Function
output
su~press
control
(l=ignore
output;
O=allow output)
has mechanical form feed
has mechanical tab
has lower case
page length
page width
wakeup control on:
B18: not used
B19: ignore the other TT%WAK bits
B20: formatting control character
B21: non-formatting control character
822: ~unctuation char~cter
823: alphanumeric character
echos on
echo mode
accept links
accept advice
terminal data mode
00:
no translation
01:
translate both echo and output
10 :
t ran s 1 ate 0 u t. pu ton 1 y
11:
translate echo only
upper case output control
0:
do not indicate
1:
indicate by 'X
lower case input control
0:
no conversion
1:
convert lower to upper
duplex mode
00:
Full duplex
10:
Character half duplex
11:
Line half duplex
01:
Reserved for DEC
pause-on-command
mode
(l=enable
pause-on-command
mode,
O=disable
pause-on-comm~nd mode.)
This
function
enables/disables
the
TOPS-20
feature
that allows a user to
manually stop TTY output with AS and
resume
it with AQ.
See MTOPR function
.MOXOF for pause-at-end-of-page mode.
system carrier state;
on if line
is a
dataset and the carrier is on.

Bit 0 (TT%OSP) implements the CTRL/O function.
If this bit is set,
all program output directed to the terminal is discarded.
When the
bit is off, program output is buffered and sent as usual.
The current
contents of
the output buffer are not cleared when this bit is set;
clearing the buffer must be done explicitly (by means of
the CFOBF
call)
if output is
to be stopped immediately.
Any input function
clE'ars this bit.

2-46

FUNCTIONAL ORGANIZATION OF JSYS'S
Bits 1, 2, and 3 (TT%MFF, TT%TAB, and TT%LCA) define several of the
mechanical capabilities of the terminal and affect character handling
on both input and output.
Form feeds and tabs are simulated if the
terminal does not have the required mechanical capability, or if
simulation has been requested by the SFCOC call.
Bits 4-10 (TT%LEN) determine the number of line feeds necessary to
simulate a
formfeed,
or
the number of lines to fit on the display
screen.
A 0 value means the declared length of the page is
indefinitely large.
Bits 11-17 (TT%WID) determine the point at which the output line must
be continued on
the next line by inserting a carriage return-line
feed.
If 0, no line folding occurs.
Bits 18-23 (TT%WAK) define the particular class of characters that,
when input from the terminal, will wake up a waiting program.
Refer
to Section 2.4.9.3 for the definitions of the wakeup classes.
Note
that the class-wakeup scheme is maintained for compatibility with
older programs.
Newer programs should use the .MOSBM function of the
MTOPR JSYS as it has more resolution and causes less system load.
Bit 24 (TT%ECO) defines if echos are to be given.
If this bit is off,
echoing is turned off.
This is useful when the program is accepting a
password or is simu].ating non-standard echoing procedures.
Blt 25 (TT%ECM) defines when the echo will occur.
If this bit is off,
the echo will occur when the program reads the character.
That is,
the echo occurs immediately if the program is waiting for input or
is
deferred
if the program is not waiting
for
input.
This is the
standard echo mode which produces a correctly ordered
typescript
(i.e.,
program input and output appear in the order in which they
occurred).
If this bit is on,
the echo occurs as soon as the
character
is typed.
Note that this mode may cause editing to appear
out of order on the typescript.
This occurs because editing
is
performed as the program reads the character and not necessarily when
the echo occurs.
Blts 28-29 (TT%DAM) define the terminal data mode.
data modes are:

The four

possible

00

Binary (.TTBIN), 8-bit input and output.
There is no format
control
or control group translation and no echoing.
However, ~S and ~Q are still under control of TT%PGM.

01

ASCII (.TTASC), 7-bit input and output, plus parity on for
control group output.
There is format control as well as
simulatl0n and translation of control group for input (echo)
and output according to the control words given on the SFCOC
JSYS.
This is the usual terminal data mode.

10

Disable the translation of
respects, same as .TTASC.

11

Disable the translation of output (.TTATE).
Obeys the CCOC
word on input only.
In all other respects, same as .TTASC.

echo

(. TTATO) .

In

all

other

The last two data modes allow the user
to selectively disable
the
translation
of
control characters for
input or output.
When
translation is disabled,
control characters
are
always
sent.
Simulation of formatting control characters
is still performed if
requested by the control words of the FFCOC or SFCOC JSYS or if the
device
does not have
the reauired mechanical capability.
The
translation
typically results in some control
characters
being
2-47

FUNCTIONAL ORGANIZATION OF JSYS'S
indicated by graphics instead of being sent as is.
For example,
disabling the translation of output characters is appropriate for some
display terminals when the program must send untranslated control
characters to control the display,
but require~: that the control
characters typed by the user be indicated in the usual way.
Bit 30 (TT%UOC) specifies that upper case terminal output is to be
indicated by 'X (single quote preceding character that is upper case)
if TT%LCA is not set.
This is primarily intended for
terminals that
are not capable of lower case output.
Bit 31 (TT%LIC) specifies that lower case terminal
input is to be
translated to upper case and that codes 175 and 176 are to be
converted to code 33.
This is useful for older
terminals that send
codes 175 or 176 in response to the ALT or ESC key.
Bits 32-33 (TT%DUM) define the three duplex modes presently available.
Full duplex
(.TTFDX) requires the system to generate the appropriate
echo for each character typed
in.
Character half duplex
(.TTHDX)
assumes the terminal will
internally echo each character typed but
will require an additional echo for
formatting characters such as
carriage return.
Line half duplex (.TTLDX) is similar to character
half duplex but does not generate a line feed echo after a
carriage
return.
Bit 34 (TT%PGM) specifies the output mode.
In display mode, the user
can create a pause in the output while he reads material that would
otherwi~e quickly disappear off the screen.
The output is stopped
with the CTRL/S character and
started with the CTRL/Q character.
Also, output automatically stops whenever a page,
as defined by
TT%LEN, has been output;
output is resumed with CTRL/O.
Bit 35 (TT%CAR) indicates the carrier
state.
dataset,
this bit is on if the carrier is on.
dataset, this bit is undefined.

2.4.9.2 Control Character Output
control character output control
2-bit bytes, one byte for each of
0-37).
The bytes are interpreted
00:
01:
10:
11:

If the line is a
If the line is not a

Control - Each terminal
has
two
(CCOC) words.
Each word consists of
the control characters (ASCII codes
as follows:

ignore (send nothing)
indicate by AX (where X is the character)
send character code
simulate format action

The RFCOC and SFCOC monitor calls read and manipulate the CCOC
Table 2-10 lists the ASCII code for each character.

words.

2.4.9.3 Character Set - The following
information describes
each
character
in the TOPS-20 character set that is pertinent to the
monitor calls in this group.
The wakeup class
(refer to TT%WAK in
Section 2.4.9.1) is abbreviated as follows:
F
C
P
A

formatting control character
non-formatting control character
punctuation character
alphanumeric character

2-48

FUNCTIONAL ORGANIZATION OF JSYS'S
Refer to Section 2.4.9.2 for the explanation of the control
output control (CCOC) words.

character

The following table lists the wakeup classes for the TOPS-20 character
set (ASCII):
Table 2-10
Wake-up Classes/CCOC Word Bits
ASCII
Code
0
1
2
3
4
5
6
7
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37
40
41
42
43
44
45
46
47
50
51
52
53
54

Wake-up
Class

CCOC
Word(bits)

C
C
C
C
C
C
C
C
F
P
F
C
F
F
C
C
C
C
C
C
C
C
C
C
C
C
C
all
C
C
C

1 (BO,l)
l(B2,3)
l(B4,5)
l(B6,7)
l(B8,9)
l(BI0,11)
l(B12,13)
l(B14,15)

F

P
P
P
P
P
P
P
P
P
p
p

P
p

Character or Control Character

CTRL/@ null,break
CTRL/A
CTRL/B
CTRL/C
CTRL/D
CTRL/E
CTRL/F
CT'RL/G bell
l(B16,17) CTRL/H backspace
l(B18,19) CTRL/I horizontal tab
l(B20,21) CTRL/J line feed
1(B22,23) CTRL/K vertical tab
l(B24,25) CTRL/L form feed
1(B26,27) CTRL/M carriage return
l(B28,29) CTRL/N
1(B30,31) CTRL/O
1(B32,33) CTRL/P
l(B34,35) CTRL/Q
2(BO,1)
CTRL/R
2(B2,3)
CTRL/S
2(B4,5)
CTRL/T
2(B6,7)
CTRL/U
2(B8,9)
CTRL/V
2(BI0,11) CTRL/W
2(B12,13) CTRL/X
2(B14,15) CTRL/Y
2(B16,17) CTRL/Z
2(B18,19) escape (al tmode)
2(B20,21) CTRL/backslash
2(B22,23) CTRL/right square bracket
2(B24,25) CTRL/uparrow
2(B26,27) CTRL/backarrow
space
!

"
#
$
%
&
I

(
)

*
,

+

2-49

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-10 (Cont.)
Wake-up Classes/CCOC Word Bits
i'\SCII
Code

_.

55
56
57
60-71
72
73
74
75
76
77
100
101-132
133
134
135
136
137
140
141-172
173(1)
174 (1)
175 (1)
1 76 (1)
177

Wake-up
Class

CCOC
Word(bits)

Character or Control Character

-

P
P
P

/

A

0-9

P

:

P

;

P
P
P
P
P
A

<
=
>
?
@

upper case letters A-Z

p

[

P
P
P
P

\
]
'"

-

P

accent (gr ave)
lower case le·tters a-z
left brace
vertica1 b ar
right brae e
tiJde
delete ( ru bout)

A
p
p

P
P

all

'--.

NOTE
DELETE (177)
be
in all

1.

8SC(33)
ane
considered
to
classes.

2.

If the terminal has B31(TT%LIC)
on
in the JFN mode word, codes 175 and
176 are converted
to code
33 on
input.

3.

The
class-wakeup
scheme
is
maintained
for
compatibility with
older programs.
New programs should
use the .MOSBM function of the MTOPR
JSYS as it has more
resolution
(it
allows a
4-word character mask to
specify
individual
wakeup
characters)
and causes less system
load (low-level moni tor I/O routines
are
subjected
to
fewer
wakeups).
Both SFMOD and .MOSBM set the
same
mask;
however SFMOD computes wakeup
classes from the mask while
.MOSBM
uses character-oriented wakeups.

2-50

are
wakeup

FUNCTIONAL ORGANIZATION OF JSYS'S
2.4.9.4 Terminal Characteristics Control - The
various
types
of
terminals
have dIfferent characteristics for
output processing,
depending on their type and speed.
The characteristics that can be
associated with terminals are:
1.

mechanical forrr. feed and tab

2.

lower case

3.

padding after carriage return

4.

padding after line feed

5.

padding after mechanical tab

6.

padding after mechanical form feed

7.

page width and length

8.

cursor commands

Instead of settIng each of these parameters for his line, the user can
specify
a
terminal
type number,
which causes
the appropriate
parameters to be set.
Refer to the STTYP monItor call.
The defined
terminal types, along with their characteristics, are listed below.
Table 2-11
Terminal Characteristics
Number

Terminal

Symbol

Characteristics

o

TTY model 33

.TT33

no mechanical form feed or tab, has
upper
case only, no padding after
carriage
return and
lIne
feed,
padding after
tab and form feed,
page width 72, page Jength 66

1

TTY model 35

.TT35

has mechanical form feed
and
tab,
has
upper
case only,
no padding
after
carriage
return and
lIne
feed,
padding after
tab and form
feed, page width 72, page length 66

2

TTY model 37

.TT37

no mechanical
form
feed
or
tab,
lower
case,
padding after
no
feed,
carriage
ret.urn and
lIne
padding after
tab and form feed,
page width 72, page length 66

3

TI/EXECUPORT

.TTEXE

no mechanIcal
form
feed
or
tab,
lower
case, padding after carriage
80,
page
return only page WIdth
1ength 66

4-7

reserved for customer

~--------~----.---.-------~---------~------------.------------------------------~

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-11 (Cont.)
Terminal Characteristics

_.
Number

Terminal

Symbol

10

Default

.TTDEF

no mechanical
form feed or
case,
full padding,
lower
width 72, page length 66

11

Ideal

.TTIDL

has mechanical form feed
and tab,
lower
case,
no
padding,
no
specified width and length

12

VT05

.TTV05

no mechanical
form
feed,
has
mechanical
tab,
has upper case
only,
no padding after carriage
return and tab, padding after line
feed and form feed, page width 72,
page length 20, has cursor commands

13

Vrr50

.TTV50

no mechanical form feed or tab, has
upper case only, no padding, page
width 80, page length 12,
has
cursor commands

14

LA30

.TTL30

no mechanical form feed or
tab,
has
upper case only, full padding, page
width 80, page length 66

15

GT40

.TTG40

no mechanical form feed or tab, lower
case, no padding, page width 80, page
length 30

16

LA36

.TTL36

no mechanical form feed or tab, lower
case,
no padding,
page width 132,
page length 66

17

VT52

.TTV52

no
mechanical
form
feed,
has
mechanical
tab,
lower
case,
no
padding, page width 80,
page length
24

20

VT100

.TTIOO

no
mechanical
form
feed,
has
mechanical
tab,
lower
case,
no
padding, page width 80,
page length
24, has cursor commands

Characteristics
tab,
page

When used in VT52 mode, the terminal
type should be set to • TTV52.
21

LA38

.TTL38

no
mechanical
form
feed,
has
mechanical
tab,
lower
case,
no
paddIng, page wIdth 132, page length
66

2-52

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-11 (Cont.)
Terminal Characteristics
Number

Terminal

Symbol

22

LA120

.TT120

has mechanical
form feed
and
tab,
lower case,
no padding, page width
132, page length 60

35

VT125

.TT125

mechanical
form
feed,
no
has
mechanical
tab,
lower
case,
no
padding, page width 80,
page length
24,
has cursor commands and graphics
capabilities

36

VKIOO

.TTKIO

form
no
mechanical
feed,
has
tab,
mechanical
lower
case,
no
padding, page width 80,
page length
24,
has cursor commands and color
graphics capabilities

Characteristics

The STTYP monitor call sets the terminal type number for a
the GTTYP monitor call obtains the terminal type number.

line,

and

2.4.9.5 Terminal Linking - It is possible to link the output of any
line to up to
four other lines.
The refuse/accept link bit TT%ALK
(bit 26) in the JFN mode word controls terminal linking.
If the bit
is off for a particular terminal, a user cannot link to that terminal
unless the user has WHEEL or OPERATOR privileges enabled.
Although
this bit can be read with the RFMOD monitor call, the bit can only be
set with the TLINK call.
Refer to the TLINK monitor call for a description of terminal linking.

2.4.9.6 Terminal Advising - It is possible to receive advice from any
terminal line in the system.
The refuse/accept advice bit TT%AAD (bit
27) in the JFN mode word controls terminal advising.
If this bit is
off for
a partIcular terminal, users cannot simulate typing on that
terminal by means of the STI monitor call unless the user has WHEEL or
OPERATOR privileges enabled.
Although this bit can be read with the
RFMOD monitor call, it can only be set with the TLINK call.
Refer to the
advising.

TLINK

TOPS-20 Version 5

monitor

call

2-53

for

a

description

of

terminal

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
The following monitor calls are used for device control:
ASND
RELD
SPOOL
LPINI
DVCHR
GDSTS
SDSTS
GDSKC
MSTR
MTOPR
MTU%

Assigns a device
Releases a device
Def1nes and initializes input spooling
Loads VFU or translation RAM
Returns device characteristics
Returns the device status
Sets the device status
Returns d1sk usage
Performs structure-dependent functions
Performs device-dependent functions
Performs functions for logical tape devices
(MT: devices)
Translates a string to a device designator
Translates a device designator to a string
Returns terminal type number
Sets terminal type number
Attaches controlling terminal to a job
Detaches controlling terminal from a job
Controls terminal linking
Returns the JFN mode word
Sets program-related f1elds 1n the JFN mode word
Sets device-related f1elds in the JFN mode word
Returns current pos1tion of the term1nal
Sets current pos1tion of the terminal
Returns control character output control words
Sets control character output control words
Clears terw1nal's 1nput buffer
Clears terminal's output buffer
Skips if input buffer is empty
Sk1ps if output buffer is empty
Skips if output buffer is full
D1smisses until terminal input buffer is empty
Dismisses until terminal output buffer is empty

STDEV
DEVST
GTTYP
STTYP
ATACH
DTACH
TLINK
RFMOD
SFMOD
STPAR
RFPOS
SFPOS
RFCOC
SFCOC
CFIBF
CFOBF
SIBE
SOBE
SOBF
DIBE
DOBE

.

2 [-)""

SOFTWARE DATA MODES

I/O may be performed in one of several modes, depending on the device.
(The mode 1S specified w1th the OPENF call.) The range of possible I/O
modes is from 0 to 17 (octal).
However, except
for
ARPANET devices
and
less common hardware devices (such as paper-tape punches/reacers)
the only meaningful modes are 0, 10, and 17.
The follow1ng discussion l1sts the major devices supported by
and the app11cable I/O modes:

I

DeV1ce

Mode

SymboJ

PCDP:

o

.GSNRM

I

.GSSMB

TOPS-20 Version 5

TOPS-20

Explanation
CDP:
Norma] mode
allows
unit-record output.
For
card ~unches,
this mode converts each
7-bit
ASCII
character
to
a
l2-bit
card-column
code
(Hollerith
code)
and
outputs that code to the device.
Small Buffer mode
allows small
data
segments
to be
transmitted
to terminals.
This mode is used by DECnet in communication
with terminals, SRV:, and DCN:
devices.

2-54

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
Device

CDR:
PCDR:

Mode

Symbol

10

.GSIMG

Image mode - sends an "image"
(rather
than
converting
to Hollerith)
of each byte.
These are l2-bit bytes and are assumed to be
in Hollerith code.
If the device is opened
with a byte size smaller than l2-bits,
each
byte sent is zero-padded on the left to form
a l2-bit byte.

o

.GSNRM

Normal mode - allows unit-record input.
For
card readers, this mode converts each l2-bit
card-column code (Hollerith code) to a 7-bit
ASCII
character
and
returns
the ASCII
character to the program.

10

.GSIMG

Image mode - returns an "image" (rather than
converting to ASCII) of the l2-b1t card-code
for
each character
read.
In order
to
receive
the
full 12 bits, the program must
use l2-bit bytes.

Explanation

Augmented image mode
this
is a
l6-bit
version of image mode.
The leftmost 4 bits
are returned by the card reader
controller.
The
first bit indicates that the column has
a Hollerith error (and thus the card
should
be
rejected).
The next
3 bits contain a
value ranging from 0 to 7.
If the value
is
from
1
to
7,
it indicates
that a punch
occurred in that row.
If the value is 0, 1t
indicates
that no punch occurred in columns
1 - 7.
Effectively, a zero value
indicates
that a
non-ASCII
character
was punched.
This mechanism allows conversion
to ASCII
using a
table with only
256
entries as
opposed to a table with
4096
entries
for
l2-bit characters.
This mode is available
on PCDR:
devices only and
1S used
by
specifying
mode
.GSIMG
with a
l6-b1t
bytes1ze.
DCN:

o

.GSNRM

Normal mode - allows byte I/O.
This device
may be opened with
7, 8 or 36-b1t bytes.
However, aJl
transfers are actually done
w1th 8-bit bytes,
and opening the device
with an 8-bit bytesize will
give
the
greatest
effic1ency.
ReaU1res
DECnet
software.

DSK:

o

.GSNRM

Normal mode - allows buffered byte,
string,
and
paged
I/O in 1 to 36-bit bytes. By
definition, a DSK:
device may be opened
1n
any I/O mode, however the effect is the same
as mode O.

LPT:
PLPT: 0 .GSNRM Normal mode - allows buffered
byte and string output.

2-55

FUNCTIONAL ORGANIZATION OF JSYS'S
Device

Mode

Symbol

PTY:

a

.GSNRM

Normal mode for
a PTY,
the "mode"
is
merely used to open the device.
The PTY
will receive data according to the I/O mode
of the TTY associated with it.

MTA:
MT:

a

.GSNRM

Normal
string
mode.

17

.GSDMP

Dump mode
th1s mode is unbuffered by
default
(it
can
be
set
up
for
double-buffering) and
is usually used
to
transfer blocks of data from tape to disk or
disk to tape.
For tape,
a dump-mode read
(performed by DUMPI JSYS) performs reads on
the basis of physical records.
If less than
a physical record
is read,
the data is
transferred and an error
is returned.
A
subsequent DUMPI will begin reading the tape
at the start of the next physical record.

NET:

NUL:

Explanation

mode
I/O.

allows
This is

buffered byte and
the most common I/O

For ARPANET systems only.
Allows buffered
or non-buffered byte and string I/O in 8,
32, or 36-bit bytes as follows:

a

Non-buffered send mode with wait.
Waits for
state
of
connect10n to be other
than
"request for
connection sent"
before the
OPENF returns.
Data is transmitted on every
JSYS.

5

Buffered send mode with wait.
Waits for
state
of
connection to be other
than
"request for
connection sent"
before the
OPENF returns.
Data is sent a buffer-load
(8000 bits)
at a
time.
The concept of
buffering does not apply to input.

6

Non-buffered send mode with no wait.

7

Buffered send mode with no wait.
Data is
sent a buffer-load
(8000 bits) at a time.
The concept of buffering does not apply to
input.

a
10
17

.GSNRM
.GSIMG
.GSDMP

Normal mode
Image mode
Dump mode
The NUL device is a pseudo dev~ce used
to
"throwaway" unwanted output from a program.
The device may be opened in any mode.

2-56

FUNCTIONAL ORGANIZATION OF JSYS'S
Device

Mode

Symbol

Explanation

SRV:

o

"GSNRM

Normal mode - allows byte I/O.
This device
may be opened with 7, 8, or 36-bit bytes.
However, all transfers are actually done
with 8-bit bytes,
and opening the device
with an 8-bit bytesize will
give
the
greatest
efficiency.
Requires
DECnet
software.

TTY:

o

.. GSNRM

Normal mode
allows buffered byte and
string I/O.
In this mode, format control
and simulation and translation of control
characters are performed by the monitor for
input (echo) and output.
(These services
can be turned off by setting the appropriate
bit in the JFN mode word.)
Using an 8-bit
bytesize in this mode implicitly changes the
mode to .GSIMG (see below).

10

.. GSIMG

Image mode - allows buffered byte and string
I/O,
but
disables
format control and
simulation and
translation
of
control
characters. On input, if the byte size is 8
bits, a parity bit (odd)
is returned with
the
character.
The ~arity bit is the
high-order bit.
On output,
attempting to
send an 8-bit byte that has incorrect parity
may cause a device error.
However,
most
terminals ignore a user-supplied parity bit.
This mode can cause some reduction in the
CPU time charged to a
job for doing TTY
output.
The reduction is small,
however,
for TTY input.
This is because the average
process outputs many more characters than it
inputs
(the average ratio 1S approximately
20 characters output for
each character
input) .

2. 6

SOFTWARE

INT1~RRUPT

SYSTEM

The monitor calls in this
interrupt system.
Note
after a monitor call that
ERJMP or ERCAL overrides
Calls User's Guide for an
interrupt system.

2.6.1

group are used for controlling the software
that if the program has an EFJMP or ERCAL
normally causes an interrupt on failure, the
the interru~t.
Refer to the TOPS-20 Monitor
overview and description of the software

Software Interrupt Channels

Each interrupt is associated with one of 36 software interrupt
channels below.
The user program can assign channels 0-5 and 23-35 to
various conditions, such as terminal
interrupts,
IPCF interrupts,
ENQ/DEQ interrupts,
PTY conditions,
and terminal buffers becoming
empty.
The remaining channels are permanently assigned to certain
error conditions.
Any channel may be used for program-initiated
interrupts (IIC call).

2-57

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-12
Software Interrupt Channels
Channel

Meaning

Symbol

Assignable by user program

0-5
6

. ICAOV

Arithmetic overflow (Includes NODIV)

7

. ICFOV

Arithmetic
floating
(includes FXU)

point

overflow

Reserved for DEC

8
9

.ICPOV

Pushdown list (PDL) overflow

10

.ICEOF

End of file condition

11

.ICDAE

Data error file condition

12

.ICQTA

Disk full or quota exceeded when creating
a new page 1

13-14

l

Reserved for DEC

15

.ICILI

Illegal instructionl

16

.ICIRD

Illegal memory read

17

.ICIWR

Illegal memory write

18

1
1

Reserved for DEC

19

.ICIFT

Inferior process
freeze

20

.ICMSE

System resources exhausted

21
22

23-35

termination

or

forced

1

Reserved Eor DEC
.ICNXP

Reference to non-eXIstent page
Assignable by user program

1
These channels are panic channels and
deactivated.
(Refer to Section 2.6.5.)

2.6.2

l

cannot

be

completely

Software Interrupt Priority Levels

Each channel is assigned
to one of three priority levels.
The
priority levels are numerically referenced as levell, 2, or 3 with
level 1 being the highest level interrupt.
Level 0 is not a
legal
priority level.
If an interrupt request occurs in a process where the
level associated with the channel
is 0,
the system considers the
process not prepared
to handle the interrupt.
The process is then
frozen or terminated according to the setting of SC%FRZ
(bit 17)
in
its capabilities word.
(Refer to Section 2.7.1.)

2-58

FUNCTIONAL ORGANIZATION OF JSYS'S
2.6.3

Software Interrupt Tables

Before using the software interrupt system, a process must set up the
following two tables and declare their addresses with the XSIR% or SIR
calls.
LEVTAB
A 3-word table, indexed by priority level minus 1.
forms of this table.

There are two

In the general form, each word contains the 3D-bit address of the
fIrst word of a two-word block in the process address space.
The
block addressed by word n of LEVTAB is used to store the global
PC flags and address when an interrupt of level n+l occurs.
The PC flags are stored in the first word of the PC block,
and
the PC address is stored in the second.
This form of the table
must be used with the XSIR% and XRIR% monitor calls, and can be
used In any section.
The older for~ of the interrupt level table can be used
in any
single-I section program,
and must be used with the SIR and RIR
calls.
ThIS table also contains three words,
indexed by the
priority level minus 1.
Each word contains zero in the left
half, and the 18-bit address of the word in which
to store the
one-word sectIon-relative PC in the right half.
CHNTAB
A 36-word table,
two formats.

indexed by channel number.

This table also

has

The general format, for use with the XSIR% and XRIR%
calls,
can
be used
In any section of memory.
Each word contains, in bits
0-5, the priority level (1, 2, or
3)
to assign
to
interrupts
generated on that channel;
and
in bits 6-35, the starting
address of the routine to process interrupts generated on that
channel.
In the older format, for use with the SIR and RIR calls by any
single-section program,
the left half of each word contains the
priority level (1, 2, or 3) for that channel.
The right half
contains
the address of the interrupt routine that will handle
interrupts on that channel.

2.6.4

Terminating Conditions

If an interrupt is received on a channel that is
Interrupt cannot be inItiated because

activated,

but

the

1.

the interrupt system for the process
is not
enabled
(ElR
JSYS)
and
the channel on which the interrupt occurred is a
panIc channel,

2.

the table addresses bave not been defIned

3.

no priority 12vel has been assigned
to
the channel
left half of channel's word In CHNTAB is 0), or

4.

the channel has been
"reserved"
by the
(refer to the SlRCM cal] cescription) ,

TOPS-20 Version 5

2-59

(SIR call),

superior

(i. e. ,

process

l~pril

1982

FUNCTIONAL ORGANIZATION OF JSYS'S
then the interrupt is considered a process termination condition.
In
this case the process that was to have received the interrupt is
halted or frozen according to the setting of SC%FRZ (bit 17)
in its
capabilities word, and a process termination interrupt is sent to its
superior.
The superior process can then execute the RFSTS call to
determine the status of the inferior process.

2.6.5

Panic Channels

Panic channels
(refer to Section 2.6.1)
deactivated by disabling the channel or the
A software interrupt received on a panic
deactivated will be considered a process
However, panic channels will respond normally
and read channel mask monitor calls.

2.6.6

cannot
be
completely
entire interrupt system.
channel that has been
terminating condition.
to the channel on/off

Terminal Interrupts

There are 36 (decimal) codes used to specify terminal characters or
conditions on which interrupts can be initiated.
A process can assign
a character or condition to anyone of the program-assignable interrupt channels with the ATI call.
Once the particular code is assigned
to a channel and the channel
is activated
(by means of AIC),
occurrence of the character or condition corresponding to the code
causes an interrupt to be generated.
The terminal codes,
along with
their associated conditions, are shown in the table below.
Table 2-13
Terminal Interrupt Codes
Terminal
Code
0
1
2
3
4
5

6
7
8
9

10
11
12
13
14
15
16
17
18

Symbol Character or Condition

.TICBK
.TICCA
.TICCB
.TICCC
.TICCD
.TICCE
.TICCF
.TICCG
.TICCH
.TICCI
.TICCJ
.TICCK
.TICCL
.TICCM
.TICCN
.Trcco
.TICCP
.TICCQ
.TICCR

2-60

CTRL/@
CTRL/A
CTRL/B
CTRL/C
CTRL/D
CTRL/E
CTRL/F
CTRL/G
CTRL/H
CTRL/I
CTRL/J
CTRL/K
CTRL/L
CTRL/M
CTRL/N
CTRL/O
CTRL/P
CTRL/Q
CTRL/R

or break

( tab)
(line feed)
(vertical tab)
(form feecl)
(carriage return)

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-13 (Cont.)
Terminal Interrupt Codes
Terminal
Code

Symbol Character or Condition

19
20
21
22
23
24
25
26
27
28
29
30
31
32
33-35

.TICCS CTRL/S
.TICCT CTFL/T
.TICCU CTRL/U
.TICCV CTRL/V
.TICCW CTRL/W
.TICCX CTRL/X
.TICCY CTRL/Y
.TICCZ CTRL/Z
.TICES escape (altmode)
.TICRB delete (rubout)
.TICSP space
.TICRF dataset carrier off
.TICTI typein
.TICTO typeout
reserved for DEC

The terminal code .. TICRF (3D) is used to generate an interrupt when
the dataset carrier state changes from on to off.
Although any
process can enable for this interrupt, only the top-level process in
the job is guaranteed to receive it when the carrier state changes.
If other processes enable for the interrupt, they can receive the
interrupt either when the carrier state changes to off or later when
the job is reattached after the detach caused by the carrier-off
condition.
In general, the occurrence of the change in the dataset
carrier state is usable only by the top-level process.
The terminal codes .TICTI (3l) and .TICTO (32) are used to generate
interrupts on receipt of any character
instead of a specific
character.
The
~TICTI
code generates an interrupt when
the
terminal's input buffer becomes nonempty (i.e., when a character is
typed and the buffer was empty before the input of the character).
The
.TICTO code generates an interrupt when the terminal's output
buffer becomes nonempty. Note that neither one of these codes
generates an interrupt if the buffer is not empty when the character
is placed into it.
The SIBE and SOBE calls can be used to determine
if the buffers are empty.
The frozen or unfrozen state (refer to Section 2.7.3.1) of a process
determines if the interrupt is initiated lmmediately.
Terminal
interrupts are effectively deactivated when a process is frozen,
even though the interrupts are indicated in the process' terminal
interrupt word (obtained with the RTIW JSYS).
When the process is
unfrozen, toe terminal interrupts are automatically reactivated.
When an operation is completed that explicitly changes the terminal
interrupt word for
the job
(e.g.,
a process freeze or unfreeze
operation), the interrupt word for the job
(and for
the terminal
line if the job is attached) is set to the inclusive OR (lOR) of all
the unfrozen processes in the job. When an interrupt character
is
received,
frozen processes are not considered when searching for a
process to interrupt.

2-61

FUNCTIONAL ORGANIZATION OF JSYS'S
The user cannot directly access the actual terminal interrupt word.
However,
by specifying a process identifier of -5 as an argument to
the RTIW or
STIW JSYS's,
he can
read or change
the
terminal
interrupt enable mask.
The
function of
this mask is to allow
processes
to
turn off 1nterrupt codes activated by
superior
processes.
Normally, the mask is -1, thereby enabling all terminal
interrupts to be activated.
A zero in any posItion of
the mask
prevents
the corresponding
terminal
interrupt from being active.
However, the fact that a code has been activated is remembered,
and
the code
is activated when the mask is changed with a one in the
corresponding position.
Note that
the process must have SC%CTC
enabled
in
its capabilities word
(refer
to Section 2.7.1) to
act1vate the terminal code for CTRL/C interrupts.
The SCTTY monitor call can be used to change the source of
terminal
interrupts for
a
process.
Note that the proces~ must have SC%SCT
enabled 1n 1tS capabilities word (refer to Section 2.7.1) to change
the source of terminal interrupts.
2.6.6.1 Terminal Interrupt Modes - TOPS-20 handles the rece1pt of a
term1nal
interrupt character
in either immediate mode or deferred
mode.
An interrupt character handled in 1mmediate mode causes
the
1nit1at1on of a software interrupt immediately upon its receipt by
the system (i.e., as soon as
the
user
types
it).
An
interrupt
character handled in deferred mode is placed in the 1nput stream and
1nitiates a software interrupt only when
the program attempts
to
read 1t from the input buffer.
In either case, the character is not
passed to the program.
If two occurrences of the
same deferred
1nterrupt character are received without any intervening character,
the interrupt has an immediate effect.
To detect
this
situation,
tte system maintains a
separate one-character buffer in case the
1nput buffer is otherwise full.
The system assumes that
interrupts
are
to be handled immediately unless the process has declared them
deferred with the STIW monitor call.
The purpose of deferred mode is to allow interrupt actions to occur
1n
sequence with other act10ns in the 1nput stream.
However, with
mult1ple processes, the deferred interrupt occurE when any process
of
the
job reads the interrupt character.
If this process is the
one enabled for the interrupt, it will
be
interrupted before any
more characters are passed
to the program.
If the process to be
1nterrupted is the top process, then
the 1nterrupt occurs before
more characters are passed to the program, unless another process is
also reading from the same source (usually an abnormal
condition).
If ne1ther
of the above situat10ns applies, then the process doing
terminal input continues to run and may receive
several
characters
before the interrupt can take effect.
This is unavoidable since the
process doing 1nput and the process to be interrupted are
logically
runn1ng 1n parallel.

2.6.7

Dismissing an Interrupt

Once
the process1ng of an 1nterrupt is complete,
the
user's
1nterrupt rout1ne
returns control
to
the interrupted process by
means of the DEBRK call.
When
the DEBRK call
is executed,
the
monitor
examines
the contents of the return PC word to determine
where to resume the process.
If the PC word has not
been changed,
the process
1S
restored to 1tS state prior to the interrupt.
For
example, 1f the process was dismissed waiting for I/O
to complete,
1t 1S restored to that state after execut10n of the DEBRK call.
If
the PC word has been changed, the process resumes execut10n at
the
new PC location.
2-62

FUNCTIONAL ORGANIZATION OF JSYS'S
The process can determine if an interrupt occurred during
the
execution of monitor code or user code by examining the user/exec
mode bit (bit 5) oE the return PC word.
If the bit is on,
the
process was executing user code;
if the bit is off, the process was
executIng monitor code (i.e., a JSYS).
If the
interrupt routine
changes the
return PC during the processing of an interrupt, the
user-mode bit of the new PC word must be on.
Note that the process
may be executing monitor code but that the address portion of the PC
is referencing a location in user code.
To return to that user code
location
(i.e.,
to interrupt the execution of a monitor call), the
process must turn on the user-mode bit.
The monitor calls for controlling the software interrupt system are:
SIR
XSIR%
RIR
XRIR%
EIR
DIR
CIS
SKPIR
AIC
IIC
DIC
RCM
RWM
SIRCM
RIRCM
DEBRK

ATI
DTI
STIW
RTIW
GTRPW
XGTPW%
SCTTY

2.7

Sets
the
interrupt
table
addresses
for
single-section process
Sets
the
interrupt
table
addresses
for
multiple-section process
Reads
the
interrupt
table
addresses
for
single-section program
Reads
the
interrupt
table
addresses
for
multiple-section program
Enables the interrupt system
Disables the interrupt system
Clears the interrupt system
Skips if the interrupt system is enabled
Activates interrupt channels
Initiates
interrupts on specific channels in
process
Deactivates interrupt channels
Reads activated channel word mask
Reads waiting channel word mask
Sets inferior reserved channel mask
Reads inferior reserved channel mask
Dismisses current interrupt
Assigns terminal code to channel
Deassigns terminal code
Sets terminal interrupt word
Reads terminal interrupt word
Returns trap words
Returns page-fail words
Changes source of terminal interrupts

a
a
a

a

a

PROCESS CAPABILITIES

The TOPS-20 system allows capabilities,
such as
the ability to
examine the monitor and to enable for CTRL/C Interrupts, to be given
to certain processes.
Each capability 1S separately protected and
actIvated.
The capabilities are assigned on a per-process basis,
and their status is kept in the process' PSB.
The number of capabilities is limited to 36, and two words are used
to store the status.
For each capability, there is a bit in the
first word that is set
if the capability is available
to
the
process.
If the corresponding bit in the other word is also set,
the capability is currentJy enabled.
This allows
the
user
to
protect
himself against accidental use without actually giving up
the capability.

TOPS-20 Version 5

2-63

April 1982

I

FUNCTIONAL ORGANIZATION OF JSYS'S
Inferior processes are created by superior processes
(by means of
the CFORK monitor call) with either no special capabilities or the
capabilities of the creating process.
Most capabilities relate
to
system functions and may be passed from superior to inferior process
only if the superior itself has the capability.
Some capabilities
relate
the inferior to the su?erior process, and may be given to an
inferior whether or not available in the superior.

2.7.1

Assigned Capabilities

The following table lists the capabilities available
and jobs.

for

processes

CTRL/C

software

Table 2-14
Process/Job Capabilities
Bit

Symbol

Meaning
BO-8 Job Capabilitles

o

SC%CTC

Process
can
interrupts.

1

SC%GTB

Process can
GETAB call.

enable
examine

for
monltor

tables

with

the

Note that
the possession of this capabl1ity
allows
the
process
to do a GETAB.
The
capability need not be enabled.
3

SC%LOG

Process can execute protected log functions
means of the LGOUT JSYS) .

(by

Note that the possession of this capability
allows
the
process
to do a LGOUT.
The
capability need not be enabled.
6

SC%SCT

Process can change the source
interrupts for other processes.

of

terminal

89-17 Capabilities that can be given to an
inferior whether or not the superior itself has
them.
Of these, SC%FFZ (817) cannot be changed
by a process for itself.
9

SC%SUP

Process can manipulate its superior process.

17

SC%FRZ

Unprocessed software interrupts can cause
process to be frozen instead of terminated.
B18-35 User capabilities

18

SC%WHL

User has wheel privileges.

19

SC%OPR

User has operator prlvileges.

20

SC%CNF

User has confidentlal informatlon access.

2-64

the

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-14 (Cont.)
Process/Job Capabilities
Bit

Symbol

21

SC%MNT

User has maintenance privileges.

22

SC%IPC

User has IPCF privileges.

23

SC%ENQ

User has ENQ/DEQ privileges.

24

SC%NWZ

User has ARPANET wizard privileges.

25

SC%NAS

User has absolute ARPANET socket privileges.

26

SC%DNA

User has access to DECNET

27

SC%ANA

User has access to ARPANET

Meaning

I

User capabilities are originally established when the userls logged-in
directory is created.
(Refer to the CRDIR monitor call.)
The capability word can be read with
the RPCAP monitor
Capabilities can be enabled with the EPCAP monitor call.

2.7.2

call.

Access Control

It is often necessary for an installation to have more control over
system resources
than
that offered by the process capability word.
The following JSYSls allow each
installation to write
its own
access-control program:

1.

GETOK%

2.

GIVOK%

3.

RCVOK%

4.

SMON

5.

TMON

The access-control faciJity works as follows:
1.

The Installation writes its own access-control program.
This
program uses
the SMON JSYS
(privileged) to (1) enable or
dIsable access checking for a variety of system resources and
(2)
allow or disallow access by default for those resources
that are not explicitly checked by the
access-control
program.

2.

The access-control program initializes itself and then iSEues
the
.SFSOK function of the SMON JSYS (privileged) to enable
various types of access checking and to define itself as the
access-control program.

TOPS-20 Version 5

2-65

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
3.

The access-control program issues a FCVOK% JSYS (privileged).
As the request queue is empty until a GETOK% request has been
made, the RCVOK% JSYS causes the access-control program to
block.

4.

A system program or the monitor issues a GETOK% JSYS, causing
an access request block to be appended to the GETOK% request
queue (maintained by the monitor) .
The system program or
monitor then blocks.

5.

the
The mon1tor wakes up the access-control program and
the
blocked RCVOK% JSYS completes execut1on,
retrieving
This
access request block from the GETOK%
request queue.
block contains information supplied by the GETOK% call, plus
certa1n job parameters.

6.

The access-control program determines whether
to allow or
deny the request and issues the GIVOK% JSYS (privileged) w1th
the
appropriate
response
for
thIS
request.
The
access-control program now 1ssues another FCVOK% JSYS, which
blocks or
co~pletes,
depend1ng on whether or not
any
cdditional requests are in the queue.

7.

The system program or the monitor
unblocks and gets a
+1
return from the original GFTOK% JSYS if the request has been
granted, or gets an illegal instruction trap if the
request
has been denied.

Note the following characteristics of the access-control facility:

1.

The GETOK% JSYS
is
imbedded
in the code that is being
protected
against
unauthorized
use.
For example,
a
DEC-supplied GETOK% function allows access-control of the
CRJOB JSYS;
thus the TOPS-20 code that implements CRJOB will
itself execute a GETOK% JSYS.
An installation can also place
GETOK% JSYS's
1n appropriate places
in other software to
provide additional access control.
However, this entire process is
invisible to
the ordinary
user program.
The only change such a program would encounter
1n an access-controlled environment would be the
illegal
1nstruct1on trap generated if the program attempted to use a
protected resource that it was not entitled to use.

2.

JSYS's performed by the access-control program or job 0
not invoke access control.

3.

After a system has been brought up, the first fork to execute
the
.SFSOK
function of the SMON JSYS def1Pes itself as the
access-control fork.
Any other fork that subsequently tries
to issue a RCVOK% JSYS, a GIVOK% JSYS, or an SMON JSYS with
function .SFSOK will receive an error.

4.

The access-control facility has two
1

timers

associated

w1ll

with

t:

1.) The t1me period between the execution of a GETOK% JSYS
and 1tS corresponding GIVOK% JSYS is measured.
If the period
exceeds a maximum, a BUGINF is generated on the CTY.

2-66

FUNCTIONAL ORGANIZATION OF JSYS'S
2.) The time period between the GETOK entry into the queue
and
the RCVOK% being executed is measured.
If the period
exceeds a maximum, a BUGCHK is generated on the CTY,
all
defaults are reestabl1shed,
the GETOK%
request queue is
flushed (the defaults are in effect for those requests also),
and the monitor will no longer place GETOK% requests in the
GETOK% queue.

2.7.3

Processes and Scheduling

These monitor calls deal with establishing and 1nterrogating the
process structure of a job.
Refer to the TOPS-20 Monitor Calls User's
GU1de for an overview and description of the process structure.

2.7.3.1 Process Freezing - A superior process can cause one or all of
1tS inferior processes to be frozen.
A frozen process is one whose
execution is suspended (as soon as it is stoppable from
the system's
point of view) in such a way that it can be continued at the point it
was suspended.
A process can be frozen directly or indirectly.
A
process is directly frozen when 1tS superior makes an explicit request
to freeze it.
A process is indirectly frozen when its superior is
frozen.
When a process is directly frozen,
all of its inferior
processes are indirectly frozen.
Therefore, a process can be both
directly frozen by its superior process and indirectly frozen if its
superior process is subsequently frozen.
The explicit unfreezing of a process clears both its direct freeze and
the
indirect freeze on all its inferior processes unless an inferior
process has a direct freeze.
The indirect unfreezing of a process
clears only the freeze on that process.
This means that an explicit
freeze of a process prevents the running of any of its inferior
processes,
and an explicit unfreezing of a process automatically
resumes its inferiors.
The FFORK and RFORK monitor calls are used
to freeze
and
unfreeze
processes,
respectively.
An argument of -4 to these calls directly
freezes or
resumes all
immediately inferior processes,
and any
processes below the immediately inferior ones are indirectly frozen or
resumed.
(The freeze and unfreeze operations are never legal on any
process that is not inferior to the one executing the monitor call.)
The frozen or
unfrozen state of a process can only be changed
directly.
Thus,
monitor
calls like SFORK and HFORK change other
states of a process but do not affect
the frozen
state.
If the
process 1S frozen and
a call
is executed that changes one of its
states, the process remains frozen and does not begin operating in the
changed state until it is resumed.
For example, a program can change
a frozen process' PC with the SFORK call, but the process will not
begin running at
the new PC until it is unfrozen.
S1milarly, the
HFORK call can be executed on a frozen process, but the process will
not be in the halted state until it is unfrozen.
The changed status
is always reflected 1n the information returned by the RFSTS call.
In
the f1rst example above, RFSTS would return the changed PC, and in the
second, 1t would return the halted code in the status word.

2-67

FUNCTIONAL ORGANIZATION OF JSYS'S
The monitor calls associated with capabilities and processes are:

I

RPCAP
EPCAP
RESET
CFORK
SFORK
XSFRK%
HFORK
HALTF
DISMS
WAIT
WFORK
KFORK
FFORK
RFORK
TFORK
RTFRK
UTFRK

I

RFSTS
SFACS
RFACS
PRARG
RFRKH
GFRKS
GFRKH
SPLFK
RMAP
SPACS
HPACS
RSMAP%
RWSET
ADBRK

Returns process capabilities word
Enables process capabilities word
Resets and initializes current process
Creates inferior process
Starts a process in section zero
Starts a process in a non-zero section
Halts an inferior process
Halts a process
Dismisses process for specified amount of time
Dismisses process until interrupt occurs
Waits for process to terminate
Kills one or more processes
Freezes one or more processes
Resumes one or more processes
Sets and removes monitor call intercepts
Returns the handle of the process suspended because of
a monitor call intercept
Resumes a process suspended because of a monitor call
intercept
Returns process' status
Sets process' accumulators
Returns process' accumulators
Sets or returns process argument block
Releases process handles
Gets current process structure
Gets process handle
Splices a process structure
Obta1ns a handle on a page in a process
Sets accessibility of page
Returns accessibility of page
Returns information about the mapp1ng of one section of
a process
Releases working set
Controls address breaks

2.7.3.2 Execute-Only Files and Execute-Only Processes - The
basic
def1nition of an execute-only f11e is one that cannot be copied, read,
or man1pulated in the usual manner, but can be run as a program.
An
execute-only f1le has the following characteristics:
1.

The f1le must be protected with execute access
w1th read access not allowed.

allowed,

but

2.

The f11e cannot be read or written using any of the
file-oriented monitor
calls
(SIN,
SOUT,
BIN, BOUT, PMAP,
etc. ) .

3.

The file can be mapped into a process (using GET),
but only
1n its entirety and only into a virgin process.
A process so
created 1S called an execute-only process.
NOTE
A v1rgin process is one that has
just been created
(using CFORK).
Furthermore, if a process is virgin,
no operations have been performed on the process.
This means no changes have been made to its address
space, PC, AC"s, interrupt system, or 'traps, and
the
process has not been mapped
to a file or another
address space.

TOPS-20 Version 5

2-68

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
4.

Only disk-resident files can be considered execute-only.

5.

A process with WHEEL or
OPERATOR capabilities enabled can
gain read access to any file and can thus circumvent the
execute-only features of an execute-only file.
p~ocess

An execute-only

has the following characteristics:

1.

An execute-only process can be
vector.

2.

A process that is created
by an execute-only process and
shares the same address space becomes execute-only itself.

3.

No other process can read
from
address space or accumulators.

4.

No other process can change any part of an execute-only
process'
context in such a way as to cause the execute-only
process ~o uni~tentionally reveal any part of
its address
space.

5.

An execute-only process can not be prevented
from mapping
pages of its own address space into an inferior process.
It
is the programmer's
responsibility to avoid
revealing
an
execute-only process through its inferior forks.

6.

No JSYS explicitly indicates
that a given process
is
execute-only.
However,
the RFACS JSYS will always fail for
an execu~e-only process and can be used
to determine
this
information, if it is required.

started

an

only

at

its

execute-only

entry

process'

A program is execute-only for
particular
users based on
its
file
protection.
If a user tries to run a file and can't read it, but does
have execute access, a process is created as usual.
The file
is
mapped
into this virgin process, circumventing the read protection on
the file.
This process is then an execute-only process.
Users may select a file to be execute-only by allowing execute but not
read
access
to the file.
This can be done by setting the protection
field for the desIred class of users
(owner,
group,
or world)
to
FP%EX+FP%DIR,
or
12 octal.
For example, to make a flle execute-only
for everybody except the owner of the file, the user
would
set the
protection to 771212 octal.
The following JSYS's do not work for execute-only programs:

1.

ADBRK -

2.

GET -

3.

PMAP - wIth either
process

4.

SCVEC -

referring to an execute-only process

5.

SDVEC -

referring to an execute-only process

6.

SEVEC -

referring to an execute-only process

7.

SMAP% - with either source
process

referring to an execute-only process

referring to an execute-only process

TOPS-20 Version 5

source

2-69

or

or

destination

destlnation

~n

execute-only

an

execute-only

April 1982

I

FUNCTIONAL ORGANIZATION OF JSYS'S

I

8.

SPACS -

9.

XGVEC% - referring to an execute-only process

10.

XSVEC% -

referring to an execute-only process

referring to an execute-only process

The START command cannot be used with a start address argument for
an
execute-only process.
A program that is execute-only must be written
to protect itself.
The program should not map itself out to inferior
processes unless
the entire address
space is mapped.
The program
should not do a GET and execute programs in
Its address space over
WhiCh it has no control.
Some programs cannot be made execute-only.

2.8

Some major examples are:

1.

Any object-time system, such as LIBOL or FOPOTS.
They must
be merged
into
the address space and
thus violate the
restriction of reaolng an execute-only
flle
into a vlrgin
address space.
Note that an execute-onJ.y process can merge
in an obiect-time system, however.

2.

The TOPS-IO compatibility package
(PAIOSO).
This
same restrlction that object-time systems have.

3.

Any program that uses the TOPS-IO RUN or GETSEG UUO's.
UUO's require mapping into a non-virgin address space.

These

4.

Any program that needs to be started at any location
than its entry vector (START or REENTER address).

other

has

the

SAVE FILES

A save flle is a method of storing an expcutable memory iroage on disk.
TOPS-20 handles
two
formats of save flIes:
nonsharable (primarily
intended for compatibillty with TOPS-lO) and sharable.
Save flIes use data compression to reduce the size of the on-disk
copy.
Non-sharable save files use word-oriented compression:
memory
words containing zero are not stored in the disk file.
Sharable save
flIes
use page-orienteo compression:
memory pages in which all words
contaln zero are not stored In the disk flle.
Sh2reable save flIes are generated with the TOPS-20
S~VE
command or
the SSAVE JSYS.
Non-sharable save files are generated with the
TOPS-20 CSAVE command or the SAVF JSYS.
The formats of the two
types
of save flIes are dlscussed beJow.

2.8.1

Format for Nonsharable Save Files

The format of a nonsharab]e save flle is as follows:
IOWD

length, adclress at WhICh to put. "length" data words

"length" data words

TOPS-20 Version 5

2-70

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
IOWD

length, address at which to put "length" data words

"length" data words

XWD

2.8.2

length of entry vector, pointer to first word of
entry vector

Format of Sharable Save Files

A sharable save file is divided into two main areas:
the directory
area contains
information about
the structure of the file, and the
data area contains the data of the file.
The following diagram illustrates the genera]
save f1le:
D1rectory
Area:

format

of

a

sharable

Directory Section

!

Entry Vector Section !

I

! Program Data Vector

Section
! Terminating Section
=======================-

Data Area:

Data Section

The d1rectory area of the save file has four sections:
the directory
section,
the entry vector section, the program data vector section,
and the terminating section.
The directory area may be from
1 to 3
pages long,
depending on the access-characteristics of the pages in
the data area of the save file.
Although SSAVE% creates a
d1rectory
area
that
1S only one page long, there is no limit to the Slze of a
d1rectory area created with the SAVE% monitor call.
Each of the four sect10ns in the directory area
begins wlth
a
word
containing
its identifier code in the left half and its length in the
r1ght half.
Each section is described in the paragraphs below.
The d1rectory section is the first of the three sections and describes
groups of contiguous pages that have identical access.
The length of
this section varies accord1ng to the number
of groups
that can be
generated from the data portion of the save file.
The more data pages
that can be comb1ned into a single group, the fewer
groups
required,
and the smaller the directory section.
TOPS-20 Version 5

2-71

April 1982

I

I

FUNCTIONAL ORGANIZATION OF JSYS'S
The format of the directory section is as follows:

o

17 18

8 9

Number of words
(including this word)
in directory section

Identifier code
1776

/
/
/

35

Access
bits

Page number in file, or 0 if group
of pages is all zero

Repeat
count

Page number in the process
additional word pairs (as necessary)
to describe each group of pages
in the process address space

/
/
/

!=======================================================!
!

Access bits

Page number in the file

!=======================================================!
!

Repeat count

Page number in the process

!

!=======================================================!
The access bits are determined from the access bits specified by
the
user
on
the SSAVE monitor call.
The bits currently deflned in the
directory sectlon are:

BI

The process pages in this group are sharable

B2

The process pages in this group are writable

The remalning access bits In the directory section are zero.
The repeat count is the number (minus 1) of consecutive pages In
the
group described by the word pair.
Pages are considered to be in a
group when the following three conditions are met:
1.

The pages are contlguouS.

2.

The pages have the same access.

3.

The pages either
readable.

are

all

zero

or

are

all

existent

and

page is considered to be all zero if It is nonexistent or
is not
readable.
A page containing all zeros is considered to be eXlstent.
A group of all zero pages is indicated by a file page number of O.
A

The word pairs are repeated for each group of
space.

2-72

pages

in

the

address

FUNCTIONAL ORGANIZATION OF JSYS'S
The entry vector section follows the directory section, and points to
the entry vector.
The format of the entry vector section is as
follows:

o

17 18

35

=======================================================

Identifier code
1775

Number of words
(including this word)
in entry vector section

=======================================================

Number of words in entry vector
=======================================================

Address of entry vector
=======================================================

This section contains the address of the entry vector.
Section 2.8.3 for a description of the entry vector.

Refer

to

The program data vector section follows the entry vector section.
The
program data vector
section contains the addresses at which the
program data vectors begin (PDVA's).
This section is optional,
and
only appears if the program declares some program data vectors.
The format of the program data vector section is as follows:

o
17 18
35
=======================================================1
Identi.fier code
1774

Number of words
(including thIS word)
in data vector section

=======================================================1
Address of data vector 1

=======================================================1
Address of data vector 2

=======================================================1
/
/
/

/
/
/

1=======================================================1
Address of data vector n

1=======================================================1
The terminating section follows the program data vector section.
format is as follows:

Its

1=======================================================1
1

Identifier code
1777

1

1

1=======================================================1
The remainIng words in the last page of the save file are fIlled
zeros and are ignored by the monitor.

TOPS-20 Version 5

2-73

WI

th

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
2.8.3

Entry Vector

The entry vector is a block of data that describes entry conditions to
be used when the program in the process is executed.
The first word
of the entry vector contains the program start instruction, the second
word contains the program reenter
instruction, and the third word
contains the program version number.
(The version number
format is:
BO-B2 containing
the group who last modified the program, B3-Bll
containing major version number,
B12-B17 containing minor version
number,
and B18-B35 containing edit number.) Subsequent words in the
entry vector can contain data applicable to the particular entry
(refer to the GCVEC and GDVEC monitor calls).
Typically, the entry vector looks like this:
JRST
~tart-addr
JRST
reenter-addr
version number

Each process has an entry vector word in its
The format of the entry vector word is:
LH:
RH:

process

storage

block.

length of the entry vector (1-777)
address of the first word of the entry vector.

The data for this word is obtained from the entry vector in
file when a GET monitor call is executed for the flle.

the

save

Note that if the left half of the entry vector (usually the length) is
254000 (octal), then there is no real entry vector.
The program start
address is in the right half of locat:ion 120, the reenter address is
in the right half of location 124, and the program version is in
location 137.
This format is not recommended, but is maintained
for
cornpatability with older monitors.
The following monitor calls are used in conjunction with save flIes:

I
I

GET
SAVE
SSAVE
SEVEC
XSVEC%
GEVEC
XGVEC%
SFRKV
XSFRK%
SCVEC
GCVEC
SDVEC
GDVEC

Obtains a saved flle
Saves a process as nonsharable
Saves a process as sharable
Sets the entry vector for a single-section program
Sets the entry vector for a multiple-section program
Gets process entry vector of a single-section program
Gets process entry vector
for
a
multlple-section
program
Starts process using its entry vector
Starts a process using a user-supplied, global PC
Sets compatibility package entry vector
Gets compatibility package entry vector
Sets RMS entry vector
Gets RMS entry vector

TOPS-20 Version 5

2-74

April 1982

E'UNCTIONAL ORGANI ZATION OF JSYS' S
2.8.4

Program Data Vector

The program data vector (PDV) is a block of data that LINK writes into
memory when loading and linking a program.
The PDV resides in memory
as a part of the program, and starts at a program data vector address
(PDVA) .
User programs can use this data.
Although TOPS-20 currently
does not use the data in the PDV, words 13, 14, and 15 of the PDV are
provided for possible future system use.
The format of the program data vector is as follows:
Word

Symbol

o
1

. PVCNT
.PVNAM

2
3
4
5

.PVSTR
.PVREE
.PVVER
.PVMEM

6
10
11
12
13

.PVSYM
.PVCTM
.PVCVR
.PVLTM
. PVLVR
.PVMON

14

.PVPRG

15

.PVCST

7

Meaning
Length of the PDV (including this word) .
Name of the program for which
this data
vector exists.
The name
is word-aligned
ASCII, which means that the characters in the
name are represented by seven-bit bytes, and
that the first byte in each word begins with
bit zero.
Program starting address.
Program reenter address.
Program version number.
Address of a block of memory that contains
data describing the program memory (a memory
map).
See the LINK manual, Appendix G, for a
description of this block.
Address of the program symbol table.
Time at which the program was compiled.
Version number of the compiler.
Time at which the program was loaded.
Version number of LINK .
Address of a monitor data block.
(Not
currently used.)
Address of a program data block.
(Not
currently used.)
Address of a customer-defined data block.

The PDVOP% monitor call manipulates PDV's.
When loading a program
into memory,
LINK executes a PDVOP% call to give the monitor the
addresses of the PDV's for that program.
The PDVA's are the only data
regard1ng PDV's that the monitor keeps in its data base.
Once the monitor knows the PDVA's for a program,
other programs and
other processes can use PDVOP%
to obtain those PDVA's from the
monitor.
An inquiring program or process must use the PDVA
(and
another PDVOP% call) to obtain the data in the PDV.
The PDVOP% call also allows you to add PDVA's to,
or delete PDVA's
from,
the monitor's data base.
Refer to Chapter 3 for a complete
description of PDVOP%.

2.9

INPUT/OUTPUT CONVERSION

The monitor
Calls are
(in core or
and TOPS-20

calls in this group perform input/output conversion.
available to convert in both directions between ASCII text
in a file) and integer numbers,
floating point numbers,
internal dates and times.

TOPS-20 Version 5

2-7:.

April 1982

FUNCTIONAL ORGANIZATION OF JSYS'S
2.9.1

Floating Output Format Control

2.9.1.1 Free Format - The most common format control used with the
FLOUT JSYS is free
format.
This is specified by setting B18-23
(FL%FST) of the format control word to O.
(Refer to Section 2.9.1.2.)
Normally,
the entire format control word
is set to 0:
however,
certain fields may be specified to force a particular output.
Most numbers greater than or equal to 10~-4 but less than 10~6
(with
some exceptlons)
are output in a typical FORTRAN F format.
If the
number is an exact integer, it is output with no terminating decimal
point unless B6(FL%PNT)
is on.
If the number is a fraction, it is
output as .xxxx with no leading a's.
Nonsignificant trailing zeros in
the fraction are never output.
A maximum of seven digits is output if
the second field (FL%SND) is not specified.
The sign of the number is
output only if negative.
If the number is outside the range above, it is output in a
typical
FORTRAN E format
(with some exceptions).
The exponent is output as
Esxx, where s is the sign output only on negative exponents and xx are
the digits of the exponent.
The above exceptions about outputting the
decimal point and suppressing trailing, nonsignificant zeros apply.
Another free format similar to that above is invoked by specifying a
nonzero value for
B13-l7
(FL%RND) of the format control word.
The
value in this field specifies the place at which rounding should
occur.
If this value is 7, the output is the same as if the value
were 0 as above.
If this value is less than 7, rounding occurs at the
specifled place,
but the output will be as above with a maximum of 7
dIgits (e.g., 12360 with a rounding specification of 3 will output as
12400).
If this value is greater
than 7, rounding occurs at the
specified position, but more than 7 digits are output.
In this case,
dlgits are output until either the rounding specification number is
reached or until trailing, nonsignificant zeros are reached.

2.9.1.2 General Format Control - The format control word specifies
the format for float~ng point output when free format is not desired.
The control word indicates the desired output for the three fields of
the number,
plus additional control for items such as rounding.
The
fIrst field of the number is up to the decimal point.
The second
fIeld
is from the decimal point to the exponent.
The third field is
the exponent.

2-76

FUNCTIONAL ORGANIZATION OF JSYS'S
The format control word is as follows:
Table 2-15
Floating-Point Format Control
Bit

Symbol

0-1

FL%SGN

Meaning
Sign control
for
first
field.
The
first
character position is always used for the minus
for negative numbers.
For positive numbers, the
first character position is defined according to
the values below:
Value

Symbol

0

.FLDIG
.FLSPC
.FLPLS
.FLSPA

1

2
3
2-3

FL%JUS

Meaning
First
First
First
First

character
character
character
character

is
is
is
is

digit.
space.
plus sign.
space.

Justification control for first field.
Value

Symbol

0

.FLLSP

1

.FLLZR

2

.FLLAS

3

.FLTSP

Meaning
using
justify number
Right
leading spaces.
uSlng
justify number
Right
leading O's.
using
justify number
Right
leading asterisks.
up
to
Left justify number
decimal
point using trailing
spaces after third field.

4

FL%ONE

Output at least one digit (0
first field.

5

FL%DOL

Prefix the number wi th a dollar sign ($) •

6

FL%PNT

Output a decimal point.

7-8

FL%EXP

Third

(exponent)

Value

Symbol

0
1

.FLEXN
.FLEXE

2

.FLEXD

3

.FLEXM

----

2-77

if

necessary)

in

field control.
Meaning
No exponent field.
Output E as flrst character of
exponent field.
Output D as first character of
exponent field.
*10"
as
flrst
Output
characters of exponent field.

FUNCTIONAL ORGANIZATION OF JSYS'S
Table 2-15 (Cont.)
Floating-Point Format Control

I

B1t

Symbol

9-10

FL%ESG

Meaning
Exponent sign control.
The first character
position is always used
for
the minus for
negative exponents.
For pos1tive exponents, the
first character pos1~1on is defined according to
the values below:
Value

Symbol

0

.FLDGE

1

.FLPLE

2

.FLSPE

3

.FLDGT

Meaning
First character after exponent
prefix is digit.
First character after pref1x
is plus s1gn.
First character after prefix
1S space.
First character after exponent
prefix is digit.

11

FL%OVL

Use free format on overflow of the first
f1eld
and expand exponent on overflow of the th1rd
field.
If this bit 1S not set,
no addltional
output occurs on column overflow.

13-17

FL%RND

Digit position at which rounding will occur.
If
f1eld
1S 0, rounding occurs at the 12th digit.
If fleld 1S 37, no rounding occurs.

18-23

FL%FST

Number of charact.er s In fIrst field, including a
($ )
dollar
sign
if FL%DOL is set.
(refer to
FL%JUS) .

24-29

FL%SND

Number of characters in second fleld.

30-35

FL%THD

Number of characters In third f1eld.

As an example, to output a number 1n the format xx.yy,
blts should be set In AC3 of the FLOUT monitor call.
B4(FL%ONE)
B6(FL%PNT)
B13-B17(FL%RND)
B22
B28

output
output
do not
output
output

following

at least one digit 1n the first fleld
a decimal p01nt
round the number
a maximum of two digits in the flrst field
a maximum of two dig1ts in the second fleld

Examples of numbers output in this format are:
43.86

the

4.24

0.43

2-78

FUNCTIONAL ORGANIZATION OF JSYS'S
2.9.2

Date And Time Conversion Monitor Calls

TOPS-20 internal date and time is maintained in a 36-bit word and is
based on Greenwich Mean Time.
The date is in the left half and is the
number of days since November 17, 1858:
the time is in the right half
ahd is represented as a fraction of a day.
This allows the 36-bit
value to be in units of days wIth a binary point between the left and
right halves.
The resolution is approximately one-third of a second:
that is, the least significant bit represents approximately one-third
of a
second.
The date changes at the transition from 11:59:59 PM to
12:00:00 midnight.
For converSIons between local and internal date and
time,
the time
zone in which the installation is located is normally used, with
daylight saving applied from 4AM on the next to last Sunday in April
to 3:59:59AM on the next to last Sunday in October.
Two monitor calls in this group, IDTIM and ODTIM,
convert date and
tIme between text strings (in core or in a file) and internal format.
These should satisfy most users.
However, there are four more calls,
which are subse1:s of IDTIM and ODTIM.
The calls ODTNC, IDTNC, ODCNV,
and IDCNV make available separately the conversion between internal
format date and time and separate numbers for local year, month, and
day, and the conversion between those numbers and text strings.
They
also provide additional options, which give the caller more control
over the conversion performed than IDTIM and ODTIM.
TIme zones occur in the calling sequences of the latter
four
JSYS's.
A time zone is represented internally as a number between -12 and 12
decimal, representing the number of hours west of GreenwIch.
For
example,
EST is zone 5.
Zones -12 and 12 represent the same time but
dIfferent days because the zones are on opposite sides of the
International da~e line.
The following are examples of valid dates and times:
6-FEB-76
FEB-6-76
FEB 6 76
FEB 6, 1976
6 FEB 76
6/2/1976
2/6/76
Below are examples of valid times:
1:12:13
1234
16:30
1630
1234:56
1:56AM
1:56-EST
l200NOON
l2:00:00AM
11:59:59AM-EST
l2:00:0lAM

(4:30PM)

(midnigh t)
(late mornin9)
(early morning)

"AM" or "PM" can follow a time specification that is not greater
12:59:59.
"NOON" or "MIDNIGHT" can follow 12:00:00.

2-79

than

FUNCTIONAL ORGANIZATION OF JSYS'S

Any time specification can be followed by a dash and a
time zone.
Table 2-16 lists the time zones defined within TOPS-20,
their
abbreviations, and the left half of the word generated or accepted by
the calls that read, write, or convert dates and times.
The right
half of the word ordinarily contains the time expressed as seconds
after midnight.
Table 2-16
Time Zones
Zone Name

Abbreviation

Left half

-----------------------4-----------------------+--------------~

GREENWICH DAYLIGHT TIME
GREENWICH MEAN TIME
GREENWICH STANDARD TIME
ATLANTIC DAYLIGHT TIME
ATLANTIC STANDARD TIME
EASTERN DAYLIGHT TIME
EASTERN STANDARD TIME
CENTRAL DAYLIGHT TIME
CENTRAL STANDARD TIME
MOUNTAIN DAYLIGHT TIME
MOUNTAIN STANDARD TIME
PACIFIC DAYLIGHT TIME
PACIFIC STANDARD TIME
YUKON DAYLIGHT TIME
YUKON STANDARD TIME
ALASKA-HAWAII DAYLIGHT TIME
ALASKA-HAWAII STANDARD TIME
BERING DAYLIGHT TIME
BERING STANDARD TIME
LOCAL DAYLIGHT TIME

GDT
GMT
GST
ADT
AST
EDT
EST
CDT
CST
MDT
MST
PDT
PST
YDT
YST
HDT
HST
BDT
BST
DAYLIGHT

700000
500000
500000
700004
500004
700005
500005
700006
500006
700007
500007
700010
500010
700011
500011
700012
500012
700013
500013
600000

All strings (e.g., months, time zones,
AM-PM-NOON-MIDNIGHT)
can be
represented by any nonambiguous abbreviation (e.g., D-DECEMBER, MMIDNIGHT) .
Spaces are Ignored before and between fIelds whenever they do not
termInate the input string.
This means spaces are not allowed before
colons, AM,PM,NOON, and MIDNIGHT, the dash before the time zone, or
the time zone.
A tab is also allowed between the date and time.
The input string can be termInated by any nonalphanumeric character.
Monitor calls relatIng to date and time are as follows:
ID,]~IM

OD']'IM
ID,]~NC

OD']'NC
IDCNV
ODCNV

Inputs date and tIme, converting to internal format
Outputs date and time, converting from internal format
to text
Inputs date and time without converting to internal
format
Outputs date and time In internal format
Converts from day, month, year to internal date and
tIme
Converts from internal date and time to day, month,
year
Gets current date and time in internal format

2-80

I~UNCTIONAL

2.10

ORGANIZATION OF JSYS' S

ARCHIVE/VIRTUAL DISK SYSTEM

The following section defines terms that are used in
of the archive/virtual disk system:

the

description

Virtual disk

A storage technique in which the contents of
some files reside on disk, while the contents
of other files may reside on tape.
When a
file is "migrated" to tape, a copy of its FDB
is left on disk and the file is deleted from
disk.
Note that the term "migration" applies
only to files transferred
to tape by the
virtual disk system.

Archived file

A file of unchanging data stored on magnetic
tape.
Although copies of the file may exist
on disk, the original is stored on magnetIc
tape.
When a file gains archive status, it
can no longer be changed.
If a writeable
copy is desired,
the COpy command must be
used.
When a file is archived,
the file contents
are usually deleted from disk, leaving only
the FDB on dISk.
However, it is possible to
override the deletion process.

OfflIne/online

A file is said to be offline if the file has
been moved to tape by either the virtual disk
system or the archive system.
A file is said
to be online if the original or a copy of it
is on disk.
A file may be offline,
online,
or both.
A file
that is offline and not
online will have only its FDB stored on disk.
In the last case,
the FDB will contain
pointers to the saveset and tape file number.
This provides a link between the FDB on disk
and the file on tape.

Invisible/visible

An invisible file is one that does not appear
in a
simple DIRECTORY listing, and is not
accessable to programs
(unless the GTJFN
specifically
sets
bit Gl%IIN)
and EXEC
commands.
A visible
fIle appears in
a
DIRECTORY
lIsting
and is accessable to
programs and EXEC commands.
The concept of an invisible file is primarily
designed
to
make
offline-only
files
transparent to the user.
However,
the
invisible/visible status of a
fIle may be
changed regardless of whether
the file
is
online,
offline,
archived,
not archived,
migrated, or not migrated.

The vIrtual disk system is designed to conserve disk space by moving
selected files
from disk to tape.
Files are marked for migration to
tape by the REAPER program.
At the
option
of
the
system
administrator,
REAPER may mark files in any of the following three
categories:

2-81

FUNCTIONAL ORGANIZATION OF JSYS'S

1.

Files that have not been referenced within a specified per10d
of time.

2.

Online copies of migrated or archived
files
that
been referenced within a specified period of time.

3.

Files 1n a directory that is over permanent disk quota.
If
the directory contains a
file named MIGRATION.ORDER, then
REAPER uses that file as an order
list for mark1ng
files.
Otherwise REAPER follows
the order given in the REAPER
command llSt.
Two REAPER passes are made with the first pass
using
the order
specified in MIGRATION.ORDER or the REAPER
command string.
If the
f1rst pass fails
to bring
the
directory under quota, the second pass will consider any file
in the directory for mlgratlon.

have

not

The actual mlgration of disk flIes to tape is performed by a
special
DUMPER run.
The actual run will occur periodically, with the length
of the period determined by the system administrator.
FLle archiv1ng IS designed to write unalterable "permanent" copies of
disk
files on tape.
The user voluntarily marks a file for archiving,
and the next archive/virtual disk DUMPER run will archlve the file.
For added security two tape copies of each arch1ved or
are made.
The followlng JSYS's are used to 1mplement
system:

the

migrated

file

archlve/virtual

disk

ARCF
CRDIR
DELDF
DELFN
GTJFN
GNJFN
JFNS
OPENF
RFTAD
SETJB
SFTAD
SMON
TMON

2.11

PRIVILEGED MONITOR CALLS

The following monitor calls are pr1vileged and require the process to
have WHEEL or OPERATOR capabll1ty enabled.
The JSYS's marked with an
ast:erlsk ("*") requ1re prlvlleges for specific functions only.
ACCES*
ALLOC
ARCF*
ASNSQ
ATACH*
BOOT
CRDIR*
CR~TOB *
DELDF*
DELF*
DIl\G
DSKAS

Accesses a directory
Allocates a device to a particular job
Performs archive/virtual-disk operations
Assigns ARPANET speclal message queue
Attaches job to new controlling terminal
Performs functlons requlred for loading front-end
software
Creates or modifies a directory
Creates a new job
Expunges deleted files
Deletes flIes
Reserves and releases hardware channels
Asslgns spec1flc disk addresses
2-82

FUNCTIONAL ORGANIZATION OF JSYS'S
DSKOP
EFACT
ENQ*
ENQC*
FLHST
GACCT*
GIVOK%
GTDIR*
HALTF*
HSYS
LGOUT*
LPINI
MDDT%
MRECV*
MSEND*
MSFRK
MSTR*
MTALN
MTOPR*
MTU%
MUTIL*
NODE*
PEEK
PLOCK
PMCTL
RCVOK%
SETJB*
SFTAD*
SFUST*
SJPRI
SKED%*
SMON
SNOOP
SPOOL
SPRIW
STAD*
STI*
SYERR
TTMSG*
USAGE
USRIO
UTEST

Allows hardware address specification in disk transfers
Makes entries to the FACT file
Places a request in ENQ/DEQ resource queue
Returns status of a resource
Flushes an ARPANET host
Returns job account information
Allows/denies access to a protected system resource
Returns directory information
Halts a process
Halts the monitor
Loqs a job out
Loads line-printer VFU
Enters MDDT program
Retrieves IPCF message
Sends IPCF message
Starts a process in monitor mode
Performs structure-related functions
Associates magnetic tape drive with logical unit number
Performs device-related functions
Performs MT-device functions
Performs IPCF functions
Performs DECnet functions
Reads monitor data
Locks physical pages
Controls physical memory
Services GETOK% requests
Sets job parameters
Sets file data/time
Sets file author
Sets job priority
Manipulates scheduler data base
Sets monitor flags
Performs system performance analysis
Performs spooling-related functions
Sets process priority
Sets system date/time
Simulates terminal input
Places information in the System Error file
Sends a message to a terminal
Makes entries in accounting file
Places program in user I/O mode
Monitors executed instructions

The capabilities for a process are be enabled by the EPCAP JSYS.

TOPS-20 Version 5

2-83

April 1982

I

I

CHAPTER 3
TOPS-20 MONITOR CALLS

3-1

TOPS-20 MONITOR CALLS
(ACCE:S)

ACCES

JSYS

552

Gives a particular type of access to a given directory.
types of accesses are:

The

possible

1.

Connecting to a directory on a given structure.

2.

Gaining owner and group access rights
to directories on a
structure without actually connecting to a directory on that
structure.

3.

Relinquishing owner and group access rights to directorIes on
a
structure without disconnecting from a directory on that
structure.

RESTRICTIONS:

I

some functIons requIre WHEEL or OPERATOR capabilities
enabled.
When th1S call is used
in any section other
than
sectIon zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

BO(AC%CON)

connect
the
job
to
the
specified
directory.
After successful completion of
the call, the job is connected to and has
owner
access to the directory.
The job's
default directory becomes this directory.

Bl(AC%OWN) gIve the job owner access to the specified
dIrectory and group access to directories
1n the same groups as
the
specified
directory.
The job's connected directory
IS unchanged.
This function cannot be
given for another jub or for a files-only
directory.

AC2:
RETURNS

+1:

B2(AC%REM)

relinquish the owner access (obtained with
the AC%OWN function)
to
the specified
directory and
the
group
access
to
d1rectorles in the same group.
The job's
connected directory is unchanged.
This
functIon cannot be given for another job
or
for
a
files-on]y
directory.
The
settings of BO and B1 are Igpored if B2 is
on and the job number
given is for
the
current job.

B18-B35

length of the argument block.

address of the argument block
always

Access cannot be given to a regulated structure unless the MSTR JSYS
has been fIrst used to Increment the mount count.
All structures are
regulated by default except the primary structure
(PS:
on most
systems)
or any structure that has been made nonregulated with the
MSTR JSYS.
Access rights and all JFNs on the regulated structure must
be released before the mount count can be decremented.

TOPS-20 Version 5

3-2

April 1982

TOPS-20 MONITOR CALLS
(ACCES)
The format of the argument block is as follows:
Word

Symbol

Mean1ng

a

.ACDIR

Byte pointer to ASCIZ string conta1ning the
structure and directory name or a 36-b1t
directory number.
The ASCIZ string must be
of the form structure:.

1

.ACPSW

Byte pointer to ASCIZ string
password of the specified
password is not required if:

2

.ACJOB

contain1ng
directory.

the
The

1.

the directory 1S on a domestic structure
and has the same name as the user's
logged-in d1rectory.

2.

function AC%CON is be1ng done and
the
directory does not require a password for
connecting.

Number (decimal) of job or -1 for the current
job.
The process must have WHEEL or OPERATOR
capability enabled to give a specific job
number other than its own.

The ACCES mon1tor call can be given for another job if the type of
access being requested is for connecting the job (AC%CON) and if the
process executing the call has WHEEL or OPERATOR capabllity enabled.
The ACCES monitor call is used to implement the CONNECT,
END-ACCESS commands of the TOPS-20 Command Language.

ACCESS,

an~

Generates an illegal instruction 1nterrupt on error conditions below.
ACCES ERROR MNEMONICS:
ACESXl:

Argument block too small

ACESX3:

Password is requ1red

ACESX4:

Function not allowed for another job

ACESX5:

No function specified for ACCES

ACESX6:

DIrectory IS not accessed

ACESX7:

DIrectory is "files-only" and cannot be accessed

CNDIXl:

Invalid password

CNDIX5:

Job is not logged in

STRXOl:

Structure is not mounted

STRX02:

InsuffIcient system resources

STRX03:

No such directory name

3-3

TOPS~20

MONITOR CALLS
(ACCES)

STRX04:

Ambiguous directory specification

STRX09:

Prior structure mount required

LGINX2:

Directory is "files-only" and cannot be logged into

CAPXl:

WHEEL or OPERATOR capability required

RCDIX2:

Invalid directory specification

]I,RGX07 :

Invalid job number

ARGX08:

No such job

3-4

TOPS-20 MONITOR CALLS
(ADBRK)

ADBRK

JSVS

570

Controls address breaks.
An address break is the suspension of
process when a specified location is referenced in a given manner.

a

RESTRICTIONS:

Not available on 2020 hardware.

ACCEPTS IN ACl:

function code in the left half and process handle in
the right half

RETURNS

AC2:

function-specific argument

AC3:

function-specific argument

+1:

always

This JSYS is useful when debugging a program.
For example,
consider
the problem of debugging a program consisting of a fork running
several inferior forks mapped to the same address space.
One
(or
more)
of the inferior forks is erroneously referencing a particular
address.
To find out which fork(s) are referencing that address,
do
the following:
1.

Set up the
channel 19.

software

interrupt

system

for

interrupts

2.

Perform the ADBRK .ABSET function for each inferior process,
using the handle of the inferior process and the address
being erroneously referenced.

3.

When a channel 19 interrupt occurs, perform an RFSTS JSYS for
each inferior process.
The interrupted process that caused
the address break will have a code 7 (.RFABK) returned in its
status word.

4.

Perform the ADBRK
.ABGAD function
for
each process that
caused an address break.
This returns the address of the
instruction that erroneously referenced the break address.

5.

Perform the RFORK JSYS to restart the process(es)
address break(s).

6.

Continue running the program and repeating
the last three
steps until the program completes execution, or it no longer
generates address breaks.

halted

on

by

The ADBRK JSYS can also be used to find which instruction in a process
references a wrong memory location.
The available functions are as
follows:
Code

Symbol

Meaning

o

.ABSET

Set address break.

1

.ABEED

Read address break.

2

.ABCLR

Clear address break.

3

.ABGAD

Return address of break instruction.

3-5

I

TOPS-20 MONITOR CALLS
(ADBRK)
Each function is described in the paragraphs below.
Setting address breaks -

.ABSET

This function initializes the address break facility for the specified
process.
When
the process references the location in the manner for
which the break has been set, it is suspended.
Its superior
receives
a software interrupt on channel 19 (.ICIFT) if it has enabled for that
channel.
After processing the interrupt,
the
superior
process can
resume the inferIor by executing the RFORK monitor call.
Only one address break can be in effect for a process at anyone time,
and
the break affects only the process for which it is set.
If
another process references the location on which a break is set, it is
not affected by the break.
When an address break is set in a page
shared among processes and each process is to be suspended when it
references
the location,
the ADBRK call must be executed for each
process.
Breaks cannot be specified for the accumulators.
The .ABSET function requires the following arguments to be given:
AC2:

address of location on which to break.

AC3:

flag word indicating the type of reference on which
break.
The following flags are currently defined:
BO(AB%RED)

Break on a read reference.

Bl(AB%WRT)

Break on a write reference.

B2 (AB%XCT)

Break on an
reference.

Reading address breaks -

execute

(instruction

to

fetch)

.ABRED

ThIS functlon returns the current address break
information for
the
specified
process.
It
returns
the
following
information on a
successful return:
AC2:

address of location on which a break is set

AC3:

flag word indicating the type of
reference
break will occur.
The following
flags
defined:

on which
the
are currently

BO(AB%RED)

Break will occur on a read reference.

Bl(AB%WRT)

Break will occur on a write reference.

B2 (AB%XCT)

Break will occur
on
fetch) reference.

an

execute

(instruction

If no address break has been set for the process, the contents of
and AC3 are zero on return.

3-6

AC2

TOPS-20 MONITOR CALLS
(ADBRK)
Clearing address breaks -

.ABCLR

This function removes any address break that was set for the specified
process.
A program can also remove a break by executIng the .ABSET
function with AC2 and AC3 containing zero.
Returning the address of the break instruction This function returns
process encountered
occurred is in a JSYS
not the address of
the JSYS by execu~ing

.ABGAD

in AC2 the address of the location on which
the
a
break.
When the location on which the break
routine, the address returned is a monitor
PC,
the JSYS.
The program can obtain the address of
an RFSTS monitor call.

Generates an illegal instruction interrupt on error conditions below.
ADBRK ERROR MNEMONICS:
ABRKXI:

Address break not available on this system

ARGX02:

Invalid function

FRKHXI:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

3-7

TOPS-20 MONITOR CALLS
(AIC)

Ale

JSYS

Activates specific software interrupt
2.6. )
ACCEPTS IN ACl:
AC2:
HETURNS

+1:

131
channels.

(Refer

to

Section

process handle
36-bit word
Bit n on means activate channel n
always

The DIC monitor call can be
interrupt channels.

used

to

deactivate

specified

software

Generates an illegal instruction interrupt on error conditions below.
AIC ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX8:

Illegal to man1pulate an execute-only process

3-8

TOPS-20 MONITOR CALLS
(ALLOC)

JSVS

ALLOC

520

Allocates a device to a job or to the device pool of
the monitor's
resource allocator.
A device under control of the monitor's resource
allocator cannot be opened or assigned by any job other than
the one
to which
it is
currently allocated.
When the allocated device is
deassigned, it is returned to the monitor's resource allocator.
RESTRICTIONS:

requires WHEEL or OPERATOR capabilities enabled.

ACCEPTS IN ACl:

function code (.ALCAL)

RETURNS

AC2:

device designator

AC3:

job number, -1, or -2

+1:

failure,

+2:

success

error code in ACI

If AC3 contains a job number, then the designated device is
to that job.

allocated

If AC3 contains -1, then the device is returned to the pool of devices
available to all
users of the
system
(the device
is no longer
allocated).
ThlS is the initial state of all devices.
If AC3 contains -2,
then
the device
resource allocator's pool of devices.

is

assigned

to

the

monitor

Once a job assigns or opens a nonallocated device (a device not
under
control of the resource allocator), the resource allocator cannot take
the device from the job.
The resource allocator
can allocate
the
devlce, however, to the job that currently has it.
Then, when the job
releases the device,
the
resource allocator gets control of
the
devlce.
When a job returns control of a device
to
the
system resource
allocator,
the allocator
receives an IPCF packet.
The flag word
(.IPCFL) of the packet descriptor block contains a code that indicates
the message was sent by the monitor.
This code is 1(.IPCCC) in the
IP%CFC field (bits 30-32).
The first word of the IPCF packet data block contains
.IPCSA,
which
means that
the
second and subsequent words contain designators for
devices returned to the control of the resource allocator .
. IPCFL/<.IPCCC)B32
DATA/.IPCSA
DATA+I/device designator
DATA+2/device deslgnator
The ALLOC monitor call requires the process to have WHEEL or
capability enabled.

3-9

OPERATOR

TOPS-20 MONITOR CALLS
(ALLOC)

ALLOC ERROR MNEMONICS:
ALCXl:

Invalid funct10n

ALCX2:

WHEEL or OPERATOR capability required

ALCX3:

Device 1S not assignable

AI. CX4 :

Invalid job number

ALCX5 :

Dev1ce already ass1gned to another job

ALCX6:

Dev1ce ass1gned to user job, but will be given to
when released

DEVXl:

Invalid device designator

3-10

allocator

TOPS-20 MONITOR CALLS
(ARCF)

ARCF

JSVS

247

Performs operations pertaining
to the archive and virtual disk
systems.
These include requesting archival and migration, requesting
retrieval, and setting archive status and tape information for a file.
RESTRICTIONS:

Some functions require WHEEL or OPERATOR capabilities
enabled.

ACCEPTS IN AC1:

JFN

Code

AC2:

Function code.
The available functions
argument blocks are described below.

AC3 :

(Function-dependent, normally 0)

Symbol

and

theIr

Function

o

.ARRAH

Sets/clears AR%RAR
(in
.FBBBT of the FOB),
activating or deactivating a user request for
archival.
The value .ARSET (1) in AC3 requests
an archive while .ARCLR (0) clears the request.
Specifying .ARSET in AC3 sets AR%NDL (in .FBBBT
of
the FDB) and requests that the contents of
the file not be flushed
from
disk
upon
archival.

1

.ARRIV

Sets/clears AR%RIV
(in
.FBBBT of the FDB),
activating or deactivating a system request to
migrate a file from disk to tape.
The value
.ARSET in AC3 requests migration while .ARCLR
clears the request.
This functIon
requIres
WHEEL or OPERATOR capabilities to be enabled.

2

.AREXH

Sets/clears AR%EXM
(in
.FBBBT of the FDB),
activating
or
deactivating exemption
from
involuntary migration.
Code .ARSET (1) in AC3
sets AR%EXM,
while code
.ARCLR
(0)
in AC3
clears AR%EXM.
This function requires WHEEL or
OPERATOR capabilities to be enabled.

3

.ARRFH

Request that the contents of a file be restored
to disk.
The contents of AC3 determine If
.ARRFR walts or returns without waIting for the
contents of the file to be restored to disk.
Options for AC3

4

.ARDIS

BO

AR%NMS

Do not wait for the fIle
restored.

Bl

AR%WAT

Wait until the file is restored.

to

be

DIscard tape information.
Clears FB%ARC
(if
set),
.FBTPl,
.FBTP2,
.FBTSN,
.FBTFN,
and
.FBTDT.
The file must be on line
for
the
function
to succeed.
Options for AC3 (which
require WHEEL or OPERATOR privileges enabled to
be used separately):

BO
Bl

AR%CRI
AR%CR2
3-11

Clear information for run 1.
Clear information for run 2.

TOPS-20 MONITOR CALLS
(ARCF)
Code
5

Symbol

Function

.ARSST

Set tape information for a file.
This function
is used
to set information for
the first,
second, or both tape runs.
AR%Ol and AR%02 are
used together when restoring files to disk.
It
requires enabled WHEEL or OPERATOR privileges.
AC3 contains a pointer to an argument block
follows:
Word
0

Symbol

Contents

.AROFL

Flags:

as

BO(AR%Ol)

Set information
run 1.

for

Bl (AR%02)

Set information
run 2.

for

B2(AR%OFL) Delete disk contents
of file when done.
Requires both run 1
and
run
2
tape
information to
be
set.
B3(AR%ARC)

Set FB%ARC in
FDB
(archive
file. )

the
the

B4(AR%CRQ) Clear archive and/or
migratlon
requests
(clear AR%RAR
and
AR%RIV. )
1

.ARTPI

Tape 1 identification.

2

.ARSFI

Tape saveset
TSN 1"TFN 1
number
in the left half and
tape file number in the
right
half.

3

.ARTP2

Tape 2 identification.

4

.ARSF2

TSN 2"TF'N
.ARSFI.

5

.ARODT

time and date of tape write
in
internal
format;
0 implies
present ti.me.

6

. ARPSZ

Number of pages in the
file .
This word can be set only if
AR%Ol and AR%02 are set first.

3-12

2

similar

to

TOPS-20 MONITOR CALLS
(ARCF)
Code

Symbol

Function

6

.ARRST

Restore contents of a
file
to disk.
AC3
contains a JFN for a temporary file (created by
DUMPER) that contains the data for an archived
file that is currently off-line.
After .FBADR,
.FBBSY, and .FBSIZ are copied,
the temporary
file
is deleted.
Both f1les must be on the
s~me device or structure, and enabled WHEEL
or
OPERATOR capabilities are required.

7

.ARGST

Get tape information for
file.
AC3 contains
the address of an argument block that has the
same format as the block for .ARSST.

10

.ARRFL

The restore for this file has failed.
Sets
AR%RFL in
.FBBBT to notify a waiting process
that the retrieval request cannot be completed.
Requires WHEEL or OPERATOR capabilities.

11

.ARNAR

Resist involuntary migration.
Sets or clears
AR%NAR in
.FBBBT.
Using .ARSET in AC3 causes
resist to be set, while using
.ARCLR clears
resist.

ARCF ERROR MNEMONICS:
CAPXl:

WHEEL or OPERATOR capabilities required

ARGX02:

Invalid function code

ARCFX2:

File already has archive status

ARCFX3:

Cannot perform
devices

ARCFX4:

File is not on line

ARCFX5:

Files are not on the same device or structure

ARCFX6:

File does not have archive status

ARCFX7:

Invalid parameter for .ARSST

ARCFX8:

Archive not complete

ARCFX9:

F1le not off line

ARCXlO:

Archive prohib1ted

ARCHIl:

Archive requested, modification prohibited

ARCH12:

Archive requested, delete prohibited

ARCX13:

Archive system request not completed

ARCX14:

Restore failed

ARCX15:

Migration prohibited

ARCF

functions

3-13

on

nonmultiple

directory

TOPS-20 MONITOR CALLS
(ARCF)
ARCX16:

Cannot exempt off-line, archived, or archive-pending files

ARCX17:

FDB improper format for ARCF

ARCX18:

Retrieval wait

ARCX19:

Migration already pending

canno~

be fulfilled for waiting process

3-14

TOPS-20 MONITOR CALLS
(ASND)

JSYS

ASND

70

Assigns a device to the caller.
The successful return is given if the
the device is already assigned to the caller.
ACCEPTS IN ACl:

device designator

RETURNS

+1:

failure, error code in AC]

+2:

success

The RELD call can be used to release devices assigned to the caller.
ASND ERROR MNEMONICS:
DEVXl:

Invalid device designator

DEVX2:

Device already assigned to another job

ASNDXl:

Device is not assignable

ASNDX2:

Illegal to assign this device

ASNDX3:

No such device

DSMXl:

File(s)

not closed

3-] 13

TOPS-20 MONITOR CALLS
(ASNSQ)

ASNSQ

JSYS

752

Assigns a special message queue to a job.
details.
RESTRICTIONS:

for
ARPANET systems
capabilities enabled.

ACCEPTS IN AC1:

mask

NET

WIZARD

+1:

failure, error code in ACI

+2:

success, special message queue assigned with
queue handle in ACI

special

AC2:
RETURNS

See ARPANET manual for more

only.

Requires

header value

ASNSQ ERROR MNEMONICS:
NTWZX1:

NET WIZARD capability required

ASNSX1:

Insufficient system resources

ASNSX2 :

Link(s)

(All special queues in use)

assigned to another special queue

3-16

TOPS-20 MONITOR CALLS
(ATACH)

ATACH

JSYS

116

Detaches the specified job from its controlling terminal (if any)
and
optionally
attaches
it
to
a
new
controlling terminal.
A
console-attached entry is appended to the accounting data file.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled.

ACCEPTS IN ACl:

BO(AT%CCJ) generate a CTRL/C interrupt to the lowest
process in the job that is enabled for a
CTRL/C interrupt if the job is currently
attached to another terminal.
If this bit
is not set or if the job is currently not
attached to another
terminal,
the job
simply continues running when
it
is
attached.
Bl(AT%NAT) do not
attach.
Prevents
both
the
detaching of the job from its terminal and
the attaching of a remote job to the local
terminal.
Is a no-op unless the remote
job has a controlling terminal,
in which
case
the remote
job is detached and
remains detached.
This bit in effect
makes ATACH like a remote DTACH.
B2(AT%TRM) attach the given job to the terminal
specified in AC4.
If this bit is not set,
the job is attached
to the controlling
terminal of the caller.
B18-B35
(AT%JOB)

RETURNS

job number of the desired job.

AC2:

user number under which the job to be attached
is
logged
in.
The user number can be obtained with the
RCUSR monitor call.

AC3:

byte pointer to an ASCIZ
caller's address space.

AC4:

number of the terminal
specified
job.
This
B2(AT%TRM) is set.

password

string

in

the

to be attached to
the
argument is required
if

+1:

failure, error code in ACI.

+2:

success.
If there
is a
logged-in job currently
attached to the specified terminal, it is detached
and primary I/O for
that
job is not redirected.
Thus,
if
a process has primary I/O from the
controlling terminal, it will block when it attempts
primary I/O and will continue when it is reattached
and a character is typed.
A job attached
to the
terminal but not logged in is killed.

3-17

TOPS-20 MONITOR CALLS
(ATACH)
It is legal to attach to a job that has a controlling terminal if
of the following conditions exists:
user

name

1.

The job is logged in under the same
executing the ATACH.

2.

The job executing the ATACH supplies the correct password
the job it is attaching to.

3.

The job executing the ATACH has WHEEL or OPERATOR
enabled.

4.

The job executing the ATACH has ownership of the job because
it created the job (and maintained ownership) with the CRJOB
call.

If the controlling terminal is a PTY, a password is
the following cases:
1.

The owner
enabled.

of

the

PTY

has

WHEEL

2.

The specified job is logged in with
owner of the PTY.

or
the

as

not

job
of

capability

required

OPERATOR
same

the

one

capability

name

The DTACH monitor call can be used to detach the controlling
from the current job.

in

as

the

terminal

ATACH ERROR MNEMONICS:

I

ATACXl:

Invalid job number

ATACX2:

Job already attached

ATACX3:

Incorrect user number

ATACX4:

Invalid password

ATACX5:

This job has no controlling terminal

ATACX6:

Terminal is already attached to a job

ATACX7:

Illegal terminal number

TOPS-20 Version 5

3-18

April 1982

TOPS-20 MONITOR CALLS
(ATI)

ATI

JSYS

137

Assigns a terminal code to a software interrupt channel.
(Refer
to
Section 2.6.)
This call also sets
the corresponding bit in the
process' terminal interrupt mask.
(Refer to the STIW and RTIW monitor
calls. )
ACCEPTS IN ACl:

terminal interrupt code, ,channel number
(Refer to Section 2.6.6.)

RETURNS

always

+1:

If there is no controlling terminal (if the
job is detached),
the
assignments are
remembered and are in effect when a terminal becomes
attached.
The DTI monitor call can be used to deassign a terminal code.
Generates an illegal instruction interrupt on error conditions below.
ATI ERROR MNEMONICS:
TERMXl:

Invalid terminal code

ATIXI:

Invalid software interrupt channel number

ATIX2 :

Control-C capability required

3-19

I

TOPS-20 MONITOR CALLS
(ATNVT)

ATNVT

JSVS

Creates the Network Virtual Terminal
ARPANET manual for more details.

274
(NVT)

connection.

RESTRICTIONS:

for use with ARPANET only

ACCEPTS IN ACl:

flag bits in the left half and the JFN of the
receive connection in the right half

AC2:
RETURNS

See

opened

JFN of the opened send connection

+1:

failure, with error code in ACI

+2:

success, with terminal designator
NVT in ACI

spE~ific

to

Flags for ACl:

I

Bit

Symbol

B2

AT%NTP

the

Meaning
If set, this bit indicates new TELNET protocol.
If clear, this bit indicates old TELNET protocol.

ATNVT ERROR MNEMONICS:
A1~NXI

:

Invalid receive JFN

A1~NX2

:

Receive JFN is not open for read

ATNX3 :

Receive JFN is not open

A1:'NX4 :

Receive JFN is not a network connection

A'rNX5 :

Receive JFN has been used

ATNX6 :

Receive connection has been refused

ATNX7 :

Invalid send JFN

ATNX8 :

Send JFN is not open for write

ATNX9 :

Send JFN is not open

A~rNXIO:

Send JFN is not a network connection

ATNXll:

Send JFN has been used

ATNX12 :

Send connection has been refused

A1'NX13 :

Insufficient system resources

3-20

(no NVTs)

this

TOPS-20 MONITOR CALLS
(BIN)

BIN

JSVS

50

inputs the next byte from the specified source.
When the byte is read
from a
file, the file must first be opened, and the size of the byte
given, with the OPENF call.
When the byte
is
read
from memory,
a
pointer to the byte is given.
This pointer is updated after the call.
ACCEPTS IN ACl:

source designator

RETURNS

always, with the byte right-justified in AC2

+1:

If the end of the file is reached, AC2 contains 0 instead of a
byte.
The program can process this end-of-file condition if an ERJMP or
ERCAL is the next instruction following the BIN call.
The BOUT monitor call can be used to output a byte sequentially
destination.
Can cause several
software
certain file
conditions.
description.)

interrupts
(Refer
to

a

or process terminations on
bit OF%HER of the OPENF call

BIN ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3 :

JFN is not assigned

DESX5 :

File is not open

IOXl:

File is not open for reading

IOX4:

End of file reached

IOX5:

Device or data error

3-21

to

TOPS-20 MONITOR CALLS
(BKJFN)

BKJFN

JSYS

42

Backs up the source designator's pointer by one byte.
ACCEPTS IN AC1:
RETURNS

source designator

+1:

failure, error code in ACI

+2:

success, updated string pointer in ACI, if pertinent.
(This return actually decrements the pointer.)

The BKJFN call, when referring to a terminal, can be executed only
once per TTY to back up one character. The BKJFN call cannot be
issued again for the same TTY unless the input buffer has been cleared
(with the CFIBF JSYS) or an input JSYS is executed for the TTY.
BKJFN, when referring to other designators, can be executed more
once in succession.

I

This call cannot be used with the DECnet devices SRV:
BKJFN ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX 3:

JFN is not assigned

DESX5 :

File is not open

BKJFX1:

Illegal to back up terminal pointer twice

SFPTX2 :

Illegal to reset pointer for this file

SFPTX 3:

Invalid byte number

T'I'YXOI:

Line is not active

3-22

or DCN:.

than

TOPS-20 MONITOR CALLS
(BOOT)

BOOT

JSYS

562

Performs basic maintenance and utility functions required for
loading
and dumping communications software.
The TOPS-20 system process that
performs these functions uses a DIGITAL-supplied protocol
to perform
them.
On 2040,2050, and 2060 hardware, the BOOT JSYS is used
to load
and
dump a
PDP-II connected to a DTE20.
On 2020 hardware, the BOOT JSYS
loads and dumps the KMCll microcode,
dumps line counters,
controls
DDCMP on a
line,
performs multidrop functions, and loads and dumps
front-end images.
RESTRICTIONS:

requires WHEEL or OPERATOR capabilities
Some functions are hardware specific.

ACCEPTS IN ACl:

function code

AC2:
RETURNS

+1:

enabled.

address of argument block
always

The available functions and their argument blocks are described below.
Note that in the discussion of each function, the applicable processor
is indicated as follows:
Group

Processor

A

2020

B

2040,2050,2060

BOOT JSYS Functions:
Code

Symbol

o

.BTROM

Meaning
Puts the
line
in MOP
(Maintenance-Operation
Protocol)
mode and activates the bootstrap ROM
in the front end.
Applicable Hardware:

processor group A, B

Processor Group A Argument Block

o

.BTPRT

Line number

Activates the hardware ROM
communications front end.

bootstrap

in

the

Processor Group B Argument Block

o

.BTDTE

DTE-20 number

I

.BTERR

Error status flags
returned
failure of the call

3-23

on

TOPS-20 MONITOR CALLS
{BOOT}
Code
I

Symbol
.BTLDS

Mec3ninq
Load a secondary bootstrap program into the
communications
front
end.
The secondary
bootstrap, with a maximum size of 256 PDP-II
words,
is loaded using the ROM bootstrap. The
data to be loaded must be packed as two 16-bit
PDP-II words left justified in each 36-bit
word. The entire bootstrap program must be
loaded at once, and the caller blocks until the
transfer is complete.
Applicable Hardware:

processor group A,B

Processor Group A Argument Block

o

.BTPRT

Not used, must be zero

I
2

Line number

.BTSEC

Address of bootstrap program
be loaded

to

Processor Group B Argument Block

2

.BTLOD

0

.BTDTE

DTE-20 number

I

.BTERR

Error status flags returned
failure of the call

on

2

.BTSEC

Address of bootstrap program
be loaded

to

Load the communications front-end memory using
the previously loaded secondary or tertiary
bootstrap program. The bootstrap program in
the front end must abide by the protocol for
DTE-20 transfers:
the first two bytes of data
supplied by the caller must be a count of the
remaining number of data bytes.
Applicable Hardware:

processor group A,B

Processor Group A Argument Block

a

. BTDTE

line number

1

Not used and must be zero

2

Not used and must be zero

3

Not used and must be zero

4

• BTCNT

Number of bytes to transfer

5

. BTLPT

Pointer to data to be loaded

3-24

TOPS-20 MONITOR CALLS
(BOOT)
Code
2

Symbol
.BTLOD
(Cont.)

Meaning
Processor Group B argument block

o

.BTDTE

DTE-20 number

1

.BTERR

Error status flags
returned
failure of the call
Not used and must be zero

2

3

.BTFLG

User-supplied flag word
BO (BT%BEL)

3

. BTDI1P

on

Send a doorbell
to
the
front end
to
indicate when
the
is complete
setup
and the transfer can
begin.

4

.BTCNT

Number of bytes to transfer

5

.BTLPT

Pointer to data to be loaded

Dump the communications front-end memory using
the ROM bootstrap program.
The caller must
activate the ROM bootstrap
(function
.BTROM)
before
dumping
memory.
Subsequent
.BTDMP
functions
to duwp memory start where
the
previous
dump
terminated
unless
the ROM
bootstrap is activated
again by a
.BTROM
function.
The caller blocks until the transfer
is complete.
~pplicable

Hardware:

processor group B

Argument Block

o

.BTDTE

DTE-20 number

1

.BTERR

Error status flags
returned
failure of the call

on

Not used and must be zero

2

3

.BTFLG

word.
This
User-supplied flag
word
is not used and must be
zero.

4

.BTCNT

Number of bytes to transfer

5

.BTDPT

Pointer to where the data is
be dumped in TOPS-20

3-25

to

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

4

.BTIPR

Meaning
Generates and
links a DDCMP Station Table.
Starts up lines and terminals not previously
known to the system.
(Must be issued once for
each multidrop terminal being started up.)
Applicable Hardware:
below for group B.)

Processor

group

A

(See

Processor Group A Argument Block

o

.BTPRT

Drop"line number

1

.BTPRV

version number of protocol to be
used

Processor Group A protocol types are:
Symbol
.VNDDC
.VNMOP
.VNCNL
.VNCBL
.BTIPR

Meaning
(2)
(3)
(4)
(5)

DDCMP protocol
MOP (DDCMP maintenance) mode
Controller loopback
Cable loopback

Initialize the protocol to be used with this
communications front
end.
After
successful
execution of this function,
TOPS-20 processes
interrupts from the given DTE-20.
Applicable Hardware:

processor group B

Processor Group B Argument Block

o

.BTDTE

DTE-20 number

1

.BTPRV

Version number of
to be used

the

protocol

Processor Group B protocol types are:
Symbol

Meaning

. VN20F (0)
.VNMCB (1)
5

.BTTPR

RSX20F protocol
MCB DECNET protocol

Stop the protocol
currently running on this
communications
front
end or
line.
After
successful execution of this function,
TOPS-20
ignores
interrupts from
the given DTE-20 or
line.
Applicable Hardware:

processor group A,B

Processor Group A Argument Block

o

.BTPRT

Line number

Processor Group B Argument Block

o

.BTDTE

3-26

DTE-20 number

TOPS-20 MONITOR CALLS
(BOOT)
Code
6

Symbol
.BTSTS

Meaning
Return the status type of the protocol
running
on
the
communications
front
end
to the
specified DTE or line.
Also returns the name
of the adjacent DECNET node for this front end.
Applicable Hardware:

processor groups A,B

Processor Group A Argument Block

o

.BTPRT

Line number

1

.BTCOD

Returned protocol version type.
If no protocol is running, this
word contains -1.

Processor Group A protocol types are:
Symbol
.VNDDC
.VNMOP
.VNCNL
.VNCBL

Meaning
(2)
(3)
(4)
(5)

DDCMP protocol
MOP (DDCMP maintenance) mode
Controller loopback
Cable loopback

Processor Group B Argument Block

o

.BTDTE

DTE-20 number

1

.BTCOD

Returned protocol version type.
If no protocol is running, this
word contains -1.

Processor Group B protocol types are:
Symbol

Meaning

.VN20F (0)
.VNMCB (1)
7

.BTBEL

RSX20F protocol
MCB DECNET protocol

Block until a signal (doorbell) to TOPS-20
is
initiated by the communications front
end.
This function is used to synchronize the caller
with the bootstrap program in the front end.
Applicable Hardware:

processor group B

Arqument Block

o

.BTDTE

3-27

DTE-20 number

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

10

.BTRMP

Meaning
Read data from the communications front end
using
the
previously loaded secondary or
tertiary bootstrap program.
Applicable Hardware:
below for group B.)

processor

group

A

(See

Processor Group A Argument Block

o

.BTRMP

.BTPRT

Line number

1

Not used and must be zero

2

Not used and must be zero

3

Not used and must be zero

4

.BTCNT

Number of bytes to transfer

5

.BTLPT

Pointer to where the data is
be dumped in TOPS-20

to

Read data from the communications front end
using
the
previously loaded secondary or
tertiary bootstrap program.
The
bootstrap
program must abide by the protocol for DTE-20
transfers. The first two bytes of data are
interpreted as a count of the remaining number
of bytes of data.
Applicable Hardware:

processor group B

Processor Group B Argument Block

o

.BTDTE

DTE-20 number

1

.BTERR

Error status flags returned
failure of the call
Not used and must be zero

2
3

on

.BTFLG

User-supplied flag word
BO(BT%BEL)

Send
a
signal
(doorbell)
to
TOPS-20 to indicate
the
transfer
is
finished.

4

.BTCNT

Maximum number of
bytes
to
transfer.
After
successful
execution of this function, this
word is updated to reflect the
actual
number
of
bytes
transferred.

5

.BTMPT

Pointer to where data is
placed

3-28

to

be

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

11

.BTKML

Meaning
Load a KMCll.
This function will optionally
load
the CRAM,
DRAM,
and
the four
UNIBUS
registers.
Before the KMCll
is loaded,
the
system
verifies
that each bit
in UNIBUS
registers can be set and cleared.
Before
the
DRAM
is loaded, the system verifies that each
bit in the entire DRAM can be set and
cleared.
After the CRAM, DRAM, and registers are loaded,
they are verified to ensure that the data was
properly loaded.
If the register data is not
supplied,
the UNIBUS
registers are cleared
before the KMCll is started.
Applicable Hardware:

processor group A

Argument Block
0

.BTKMC

KMCll address

1

.BTKER

Error
flags
in left
returned
half and bad data word ( 16 bi t)
returned in right half
BO

(BT%CVE)

CRAM verify error

Bl

(BT%DVE)

DRAM verify error

B2 (BT%RVE)

Register
error

2

.BTKCC

Count of CRAM data

3

.BTKCP

Pointer
data)

4

.BTKDC

Count of DRAM data

5

.BTKDP

Pointer
data)

6

.BTKRC

Count of register data

7

.BTKRP

Pointer to register data
data)

8

.BTKSA

If bit 0 of this word
then the right halfword
the
starting
otherwise, this word is
BO

3-29

to

to

(BT%KSA)

CRAM

DRAM

verify

data

(16-bit

data

(8-bi t

(16-bit
is set,
contains
address;
ignored.

Right halfword
is
start KMCll
set;

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

12

.BTKMD

Meaning
Dump a KMCll.
This function optionally dumps
the CRAM,
DRAM,
and
registers
if space is
provided.
The registers are SELO, SEL2,
SEL4,
SEL6,
INDATA,
OUTDATA,
INBA,
OUTBA,
and
MISC*400+NPR.
Applicable Hardware:

processor group A

Argument Block

o

.BTKMC

Not used, must be zero

1

13

.BTRLC

KMCll address

2

.BTKCC

Count of CRAM data

3

.BTKCP

Pointer
data)

4

.BTKDC

Count of DRAM data

5

.BTKDP

Pointer
da tal

6

.BTKRC

Count of register data

7

.BTKRP

Pointer
to area
for
storing
register data (16-bit data)

to

to

Return line counters.
positive numbers.
Applicable Hardware:

CRAM

DRAM

All

data

(16-bit

data

(8-bit

counters

are

processor group A

Argument Block
0

.BTPRT

Port number

1

.BTZTM

Time since
zeroed

2

.BTSCC

Number
return

3

.BTSCP

Pointer
to area
status counters

4

.BTRCC

Number
return

5

.BTRCP

Pointer to area to store receive
counters

6

.BTTCC

Number
return

7

.BTTCP

Pointer
to area
transmit counters

3-30

of

of

of

counters
status

receive

were
counts
to

counts
to

to

receive

counts

transmit

last

to

to

receive

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

14

.BTCLl

Meaning
Convert line id to port number
Applicable Hardware:

processor groups A,B

Argument Block

o
1

15

.BTCPN

.BTPRT
.BTLlD

Port number
Pointer to ASClZ line id

Convert NSP port number to line id
Applicable Hardware:

processor groups A,B

Argument Block

o
1

16

.BTSTA

.BTPRT
.BTLlD

Port number
Pointer to ASClZ line id

Set the station's polling state
to active
to
cause the
terminal to be polled, or set it to
idle to prevent the terminal from being polled.
Applicable Hardware:

VT62 on processor group A

Argument Block

o
I

.BTPRT
.BTCOD

Drop"Line number
Flags:

o
I

16

.BTD60

Send a message
front
end
(a
The argument
function sends

Set line active
Set line idle

.BTACT
.BTlDL

to or receive a message from a
DN60) using the .VND60 protocol.
block controls
whether
this
or receives a message.

Applicable Hardware:
processor

DN60

on

KL-IO

Model

B

Argument Block

o
I

TOPS-20 Version 5

.BT6DTE
.BT6ERR

3-31

DTE number
Error flags
30

D6%BDP

31

D6%ARD

32

D6%TRS

(returned):
byte
The data
pointer passed
in the argument
block is bad.
PDP-II
The
attempted
to
send data when
was
none
expected.
timed
DTESRV
out waiting for
response header
from the front
end.

April 1982

TOPS~20

Code
16

MONITOR CALLS
(BOOT)

Symbol

Meaninq

.BTD60 (Cant.)
33

D6%TDT

34

D6%TPO

35

D6%NT6

2

.BT6HBC

2

.BT6HDR

3

. BT6DBC

4

.BT6PTR

5

.BT6TMR

6

.BT6TAS

7

.BT6THQ

10 .BT6TRD
11 .BT6TDD
12 .BT6TFR

TOPS-20 Version 5

3-32

DTESRV
timed
out waiting for
data from the
front end.
DTESRV
timed
out waiting for
the DTE to be
free.
Another
job is
using
the DTE and is
probably hung.
The front
end
is not running
the
DN60
protocol.
Number of bytes
in
the
DN60
header
Address
at
which the DN60
header begins.
This
header
contains
4
words,
which
contain 4 8-bit
bytes each .
Number of bytes
of data.
Pointer to the
first byte of
the data
Time
the
request
was
made (returned)
Time DTE
was
assigned
(returned)
The
time
TOPS-20 queued
the header
to
the DTE
The time
The time
The
time
TOPS-20
satisfied
the
request

April 1982

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

17

.BTSSP

Meaning
Set the start-Iup priority value.
This value
specifies
the
relative frequency at which
start-Iups are attempted.
That is, for a value
of N, each active station is polled N times for
each DDCMP start.
This
is used
to prevent
unresponsive
stations
from
deteriorating
performance of a multidrop line.
N is a
4-bit
field
in which truncation occurs if the field
size is exceeded.
If N is zero,
stations in
start-up mode will be polled along with active
stations.
Applicable Hardware:

VT62 on processor group A

Argument Block

o
I

20

. BTS,]~P

.BTPRT
.BTSPR

Line number
Start priority count

Set the polling priority.
This parameter
is
maintained
in the Station Table to specify the
relative polling priority of a
station.
If
this feature
is not used, all priority values
default to 1 and polling proceeds
in a
round
robin manner.
Applicable Hardware:

VT62 on processor group A

Argument Block

o
1

.BTPRT
.BTPRI

Drop"line number
Priority value
Typical range:
( low)

21

.BTSDD

1

(high)

to

5

Send a DDCMP message.
A DDCMP message will be
queued for transmission on the specified line.
Applicable Hardware:

Processor group A

Argument Block

o
1

.BTPRT
.BTMSG

2

.BTLEN

3-33

Drop, ,line
Address of message
pointer to message
Byte count of message

or

byte

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

22

.BTRDD

Meaning
Receive a DDCMP message.
An
item from
the
DDCMP input queue is returned or .BTLEN is set
to zero if the queue is empty.
Items on the
queue
will
be
data segments,
completion
postings, or st2tus postings (station going
up
or down).
Applicable Hardware:

Processor group A

Argument Block

o
1

.BTPRT
.BTMSG

2

.BTLEN

Line number
Address of
buffer
pointer to buffer
Size of user buffer

or

byte

For data messages,
the
byte
count of the message is returned
in .BTLEN.
If the buffer is too
small,
the JSYS will fail.
For
completion
postings,
the
following
are
returned
in
.BTLEN:
ET%CTL
(lBO)
+
station came up

.BTSUP

(1 )

BT%CTL
(lBO)
+ .BTSDW
station went down

(2 )

BT%CTL
(lBO)
+ .BTCMP
transmit complete

( 3)

BT%CTL ( IBO) + .BTSSF
start-up failed

(4 )

a

.BTPRT will contain the drop
that this message pertains to.

23

.BTCHN

Set the
interrupt channel
so that
software
interrupts will be generated when input data is
ava LIable.
Applicable Hardware:

Processor group A

Argument Block

a
1

.BTPRT
.BTCOD

3-34

Drop"line number
Software interrupt channel

TOPS-20 MONITOR CALLS
(BOOT)
Code

Symbol

24

.BTS['S

Meaning
Set type of line service to be
synchronous communications line.
Applicable Hardware:

done

on

a

Processor group A

Argument Block

o
1

.BTPRT
.BTCOD

Drop"line number
Define protocol
Protocol values can be:

o
1

.BTNSP
.BTDCP

NSP protocol
DDCMP protocol

The error status flag returned in word .BTERR on failure
of
a BOOT
call
(for group B processors) contains front-end reload status bits
recorded in the system error file.
Refer to the SPEAR manual
for
an
explanation of these
status bits.
Note that error logging is not
performed for group A processors.

I

Generates an illegal instruction interrupt on error conditions below.
BOOT ERROR MNEMONICS:
BOTXOl:

For group A processors, this message
indicates an
illegal
line number.
For group B processors, this message indicates
an invalid DTE-20 number.

BOTX02:

Invalid byte size

BOTX03:

Invalid protocol version number

BOTX04:

Byte count is not positive

BOTX05 :

Protocol initialization failed

BOTX06:

GTJFN failed for dump file

BOTX07:

OPENF failed for dump file

BOTX08:

Dump failed

BOTX09:

To -10 error on dump

BOTXIO:

To -11 error on dump

BOTXll:

Failed to assign page on dump

BOTX12 :

Reload failed

BOTX13:

-11 didn't power down

BOTX14:

-11 didn't power up

BOTX15 :

ROM did not ACK the -10

BOTX16 :

-11 boot program did not make it to -11

BOTX17:

-11 took more than 1 minute to reload;

TOPS-20 Version 5

3-35

will cause retry
April 1982

I

TOPS-20 MONITOR CALLS
(BOOT)

I

BO'l'X18:

Unknown BOOT error

CAPXl:

WHEEL or OPERATOR capability required

ARGX02:

invalid function

TOPS-20 Version 5

3-36

April 1982

TOPS-20 MONITOR CALLS
(BOUT)

BOUT

JSYS

51

Outputs a byte sequentially to the specified destination.
When the
byte is written to a file, the file must first be opened, and the size
of the byte given, with the OPENF call. When the byte is written to
memory,
ACI contains a pointer to the location in which to write the
byte.
This pointer is updated after the call.
ACCEPTS IN ACI:
AC2:
RETURNS

+1:

destination designator
the byte to be output, right-justified
always

The BIN monitor call can be used to input a byte sequentially
source.
Can cause several
software
certain file
conditions.
description.)

interrupts
(Refer to

from

a

or process terminations on
bit OF%HER of the OPENF call

BOUT ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3 :

JFN is not assigned

DESX5 :

File is not open

IOX2 :

File is not open for writing

IOX5 :

Device or data error

IOX6:

Illegal to write beyond absolute end-of-file

IOXII:

Quota exceeded

IOX33 :

TTY input buffer full

IOX34:

Disk full

IOX35:

unable to allocate disk - structure damaged

TOPS-20 Version 5

I

3-37

I

April 1982

TOPS-20 MONITOR CALLS
(CACCT)

CACCT

JSYS

4

Changes the account for the current job.
RESTRICTIONS:

When this call is used in any section other than
section zero, one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACI:

byte pointer that points to the new account string in
the calling program's address space. This call reads
the string until a null byte is read, or until 39
characters are read.
If executed in section 0, this AC can contain a local
byte pointer or an account number.
The account
number must be in bits 3-35, and bits 0-2 must
contain 5.

RETURNS

+1:

failure, error code in ACI

+2:

success, updated string pointer in ACI

The CACCT call sets the current account for the job to the specified
account.
Subsequent session charges will be to this new account.
This call also validates the account given if the account validation
facility is enabled.
(Refer to the .SFAVR function of the SMON/TMON
monitor call.)
The GACCT monitor call can be used
current job.

to

return

the

account

for

the

CACCT ERROR MNEMONICS:
Ci\CTXl:

Invalid account identifier

CACTX2 :

Job is not logged in

Vl\CCXO:

Invalid account

V.1\CCXl:

Account string exceeds 39 characters

TOPS-20 Version 5

3-38

April 1982

TOPS-20 MONITOR CALLS
(CFIBF)

CFIBF

JSYS

100

Clears the designated file input buffer.
ACCEPTS IN ACl:

source designator

RETURNS

always

+1:

Is a no-op if the source designator is not associated with a terminal.
The CFOBF monitor call can be used to clear a designated
buffer.

file

output

Generates an illegal instruction interrupt on error conditions below.
CFIBF ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3 :

JFN is not assigned

DESX5 :

File is not open

DEVX2:

Device already assigned to another job

TTYXOl:

Line is not active

3-39

TOPS-20 MONITOR CALLS
(CFOBF)

CFOBF

JSYS

101

Clears the designated file output buffer.
ACCEPTS IN ACl:

destination designator

RETURNS

always

+1:

Is a no-op if the destination designator
tE?rrninal.

is

not

associated

with

The CFIBF call can be used to clear a designated file input buffer.
Generates an illegal instruction interrupt on error conditions below.
crOBF ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3 :

JFN is not assigned

DESX5 :

File is not open

DEVX2 :

Device already assigned to another job

TTYXOl:

Line is not active

3-40

a

TOPS-20 MONITOR CALLS
(CFORK)

CFORK

JSVS

152

Creates a process inferior to the calling process.
2.7. )
ACCEPTS IN ACl:

(Refer to

Section

I

BO(CR%MAP) make the inferior process' map the same as
the current process'
map by means of
indirect pointers.
If this bit is not on,
the inferior process will have no pages in
its map.
If desired, the creating process
can then use PMAP or GET to add pages to
the inferior's map.
Bl(CR%CAP) make the
inferior process'
capabilities
the same as the current process'.
If this
bit is not on, the inferior process has no
special capabilities.
B3(CR%ACS) set the inferior process'
ACs from the
block whose address
is in AC2.
If this
bit is not on, the inferior process'
ACs
are set to O.
B4(CR%ST)

B18-B35
(CR%PCV)
AC2:

RETURNS

set the PC of the inferior process to the
value
in the right half of ACI and start
the process.
If this bit is not on,
the
inferior
process is not started, and the
right half of ACI is ignored.
(Also see
the XSFRK% call.)
PC value for the inferior process if CR%ST
is on.

address of 20 (octal) word block
(optional).
This
block
contains the AC values for
the
inferior
pr ocess.
(Refer to bi t CR%ACS above.)

+1:

failure, error code in ACI

+2:

success, relative process handle in ACI

The inferior process receives the same primary input and output JFNs
as the current process.
However,
the primary input and/or output
files may be changed with the SPJFN monitor call.
The CR%MAP argument
space as that of
and write access to
shared, and changes

in ACI allows the inferior to see the same address
the superior.
The inferior process will have read
the superior's address space.
The pages are
made by one process will be seen by the other.

CFORK creates a nonvirgin process if:
1.

CR%ST is set and

2.

CR%ACS and/or CR%MAP is set.

CFORK creates an execute-only process if bit CR%MAP is set and
the
creating process
is an execute-only process.
This is the only other
way to create an execute-only process besides using the GET JSYS on a
virgin process.

TOPS-20 Version 5

3-41

April 1982

I

TOPS-20 MONITOR CALLS
(CFORK)
The KFORK monitor call can be used to kill one or more processes.
C~ORK

ERROR MNEMONICS:

FRKHX6:

All relative process handles in use

FRKHX8:

Illegal to manipulate an execute-only process

CFRKX3:

Insufficient system resources

3-42

TOPS-20 MONITOR CALLS
(CHFDB)

CHFDB

JSYS

64

Changes certain words in the file descriptor block
(FDB)
for the
specified file.
(Refer to Section 2.2.8 for the format of this
block.)
ACCEPTS IN ACl:

BO(CF%NUD) do not wait for the disk
directory to be updated.

copy

of

the

The specified changes are made to the
directory in memory and are written to the
disk as a part of the normal monitor disk
updating procedure.
(See below for more
information.)

RETURNS

B9-B17
(CF%DSP)

index into
changed

B18-B35
(CF%JFN)

JFN (for a disk file)

FDB

indicating

word

to

be

AC2:

mask indicating bits to be changed.
If
count value (in AC3), use -1 as a mask.

AC3:

new values for changed bits. These values must be
given in the bit positions corresponding to the mask
given in AC2.

+1:

changing

a

always

Because each CHFDB call changes only one word in the FDB,
several
calls must be executed to change several words. Each call causes disk
I/O. And to keep this I/O to a minimum, the program should set bit
CF%NUD on each call. The setting of this bit on each call permits the
program to run faster by allowing several changes to be made to the
FDB with minimum disk I/O.
To ensure that all the changes have been written to the disk,
the
program can issue the last CHFDB call with bit CF%NUD off. Also, if
the program requires the FDB on the disk to be updated after each
call, it should execute each CHFDB call with bit CF%NUD off.
There are a variety of calls used in manipulating the FDB;
see the
description of the FDB in Chapter 2 for information on these calls.
Generates an illegal instruction interrupt on error conditions below.
CHFDB ERROR MNEMONICS:
CFDBXl:

Invalid d"isplacement

CFDBX2:

Illegal to change specified bits

CFDBX3:

Write or owner access required

3-43

TOPS~20

MONITOR CALLS
(CHFDB)

I

CFDBX4:

Invalid value for specified bits

DESXl:

Invalid source/destination designator

DESX3 :

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

TOPS-20 Version 5

3-44

April 1982

TOPS-20 MONITOR CALLS
(CHKAC)

CHKAC

JSYS

521

Checks if a user is allowed access to files
in a given directory.
This monitor call determines if the user can access files that have a
specified protection code if the user is logged
in with the given
capabilities and connected to the directory.
RESTRICTIONS:

When this call is used
in any section other
than
section zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

length of the argument block in the right half.
If
BO(CK%JFN)
is on, word .CKAUD of the argument block
contains a JFN.

AC2:
RETURNS

address of argument block

+1:

failure, error code in ACI

+2:

success,
access check
is
completed,
with
ACI
containing -1 if access is allowed or 0 if access is
not allowed.

The format of the argument block is as follows:
Symbol

Word

Meaning

o

.CKAAC

Code of desired access to files.

1

.CKALD

Byte pointer to user name string,
or
36-bit
user
number of user
whose access is being
checked.

2

.CKACD

Byte pointer to directory name
string
(with
punctuation),
or
36-bit directory number to
which user whose access is being checked
is
connected.

3

.CKAEC

Enabled capabilities of user whose access
being checked.
(Refer to Section 2.7.1.)

4

.CKAUD

Byte pointer to directory name string
(with
punctuation),
or
36-bit directory number of
the directory containing
the files
being
accessed.
If BO(CK%JFN) of ACI is on, this
word contains a JFN for
the file
being
accessed.

5

.CKAPR

Protection of the
files
being
accessed.
(Refer
to Section 2.2.6.) This word is not
required if a JFN is supplied in word .CKAUD.

is

Access codes are as follows:

o
1
2
3

4
6

10
11

.CKARD
.CKAWR
.CKAEX
.CKAAP
.CKADL
.CKADR
.CKACN
.CKACF

TOPS-20 Version 5

read existing files
write existing files
execute existing files
append to existing files
obtain directory listing of existing files
read the directory
connect to the directory
create files in the directory

3-45

April 1982

I

TOPS-20 MONITOR CALLS
(CHKAC)

CHKAC ERROR MNEMONICS:
CKAXI:

Argument block too small

CKAX2:

Invalid directory number

CKAX3 :

Invalid access code

CKAX4 :

File is not on disk

3-46

TOPS-20 MONITOR CALLS
(CIS)

CIS

JSYS

141

Clears the software interrupt system for the current process.
all interrupts in progress and all waiting interrupts.

RETURNS

+1:

always

3-47

Clears

TOPS-20 MONITOR CALLS
(CLOSF)

CLOSF

JSYS

22

Closes a specific file or all files.
ACCEPTS IN ACl:

BO(CO%NRJ) do not release the JFN.
B6(CZ%ABT) abort any output operations
currently
being done.
Close the file but do not
perform any cleanup operations normally
associated
with closing a file.
(If
output is to a magnetic tape, for example,
do not output remaining buffers or write
tape marks.
If output is to a disk file,
do not change the end-of-file pointer.) If
output is to a new disk file that has not
been
closed
(and
is
therefore
nonexistent), the file is closed and then
expunged.
B7(CZ%NUD) do not update the copy of the directory on
the disk.
(Refer to CF%NUD of the CHFDB
call description for further information.)
B18-B35
(CO%JFN)

RETURNS

JFN of the file being closed

+1:

failure, error code in ACI

+2:

success

If ACI contains -1, all files (and all JFNs) at or below this process
(with the exception of the primary I/O files and files that cannot be
closed by this process) are closed. This action is identical to that
taken on a CLZFF call with ACI containing the process handle .FHSLF
(400000) .
The OPENF monitor call can be used to open a specific file.
CLOSF ERROR MNEMONICS:
DE:3XI:

Invalid source/destination designator

DE:3X2:

Terminal is not available to this job

DE:3X 3:

JFN is not assigned

DE:3X4 :

Invalid use of terminal designator or string pointer

CL:3Xl:

File is not open

CLSX2 :

File cannot be closed by this process

CLSX3 :

File still mapped

CLSX4:

Device still active

3-48

TOPS-20 MONITOR CALLS
(CLOSF' )

ENQX20:

Locked JFN cannot be closed

IOXII:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

I

All output errors can occur.

TOPS-20 Version 5

3-49

April 1982

TOPS-20 MONITOR CALLS
(CLZFF)

CLZFF

JSYS

34

Closes process' files.
Closes all files and/or releases all
and/or below a specified process.
ACCEPTS IN ACl:

RETURNS

+1:

files

JFNs

at

inferior.

of

BO(CZ%NIF)

do not
close
processes

Bl(CZ%NSF)

do not close files of this process.

B2(CZ%NRJ)

do not release JFNs.

B3(CZ%NCL)

do not close any
nonopen JFNs

B4(CZ%UNR)

unrestrict files opened with
restricted
access
for
specified process.
The
specified process must be the
same as,
or
inferior
to,
the process executing
the call.

B5(CZ%ARJ)

wait until
file
can be closed,
close it, and release JFNs.

B6(CZ%ABT)

abort any output operations currently
being done.
Close the file but do not
perform any cleanup operations normally
associated with closing a
file
(for
example, do not output remaining buffers
or write
tape marks
if output
to a
magnetic tape is aborted).
If output to
a new disk file that has not been closed
(file is nonexistent)
is aborted,
the
file is closed and then expunged.

B7(CZ%NUD)

do not update the copy of the directory
on the disk.
(Refer to CF%NUD of the
CHFDB call description
for
further
information. )

B18-B35
(CZ%PRH)

process handle

files;

only

always.
No action is taker. if the call
way illegal.

is

release

in

If ACI contains only the process handle
.FHSLF,
the action
identical to that taken on a CLOSF call with ACI containing -1.

then

any
is

Generates an illegal instruction interrupt on error conditions below.
CLZFF ERROR MNEMONICS:
FHKHXl:

Invalid process handle

FHKHX2 :

Illegal to manipulate a superior process

3-50

TOPS-20 MONITOR CALLS
(CLZFF)

FRKHX3 :

Invalid use of multiple process handle

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-51

I

April 1982

TOPS-20 MONITOR CALLS
(COMND)

COMND

JSVS

544

Parses one field of a command that is either typed by a user or
contained in a file. When this monitor call is used to read a command
from a terminal, it provides the following features:
1.

Allows the input of a command (including the guide words)
to
be given in abbreviated, recognition (ESC and CTRL/F), and/or
full input mode.

2.

Allows the user to edit his input with
CTRL/W, and CTRL/R editing keys.

3.

Allows fields of the command to be defaulted if an ESC or
CTRL/F is typed at the beginning of any field, or if a field
is omitted entirely.

4.

Allows a help message to be given if a question mark
typed at the beginning of any field.

5.

Allows input of an indirect file (@file)
that contains
fields for all or the remainder of the command.

6.

Allows a recall of the corr€ct portion of the last command
(up to the beginning of the field where an error was
detected) if the next command line begins with CTRL/H.
The
correct portion of the command is retyped, and the user can
then continue typing from that point.

7.

Allows input of a line to be continued onto the next line if
the user types a hyphen (-) immediately preceding a carriage
return.
(The carriage return is invisible to the program
executing the COMND call, although it is stored in the text
buffer.) The user can type the hyphen while he is typing a
comment. The comment is then continued onto the next line.
A hyphen not immediately followed by
parsed as ordinary text.

the

a

DELETE,

carriage

CTRL/U,

(? )

return

is
the

is

The COMND call allows comments in the commaDd line.
A command line
can contain a comment if the field before the comment has been
terminated and the comment is preceded by an exclamation point or a
semicolon.
If the comment starts with an exclamation point, COMND
ignores all text between the exclamation point and either the end of
the line or the next exclamation point.
If the comment starts with a
semicolon, COMND ignores all text on the remainder of the line.
A command line can contain the name of an indirect command file so
long as the file name comes at the beginning of a field.
It must,
however, be the last item on the line, and its contents must complete
the command.
The user must follow the name of the indirect command
file (after any recognition is performed) with a carriage return.
If a carriage return does not end the command line immediately after
the name of the indirect command file, the system outputs the message
?INDIRECT FILE NOT CONFIRMED. Also, if the user types a question mark
(instead of the file specification of the indirect file) after he
types the at-sign (@) character, the message FILESPEC OF INDIRECT FILE
is output.

3-52

TOPS-20 MONITOR CALLS
(COMND)
If the indirect file itself contains an ESC or
a
carriage
return,
COMND treats
them as spaces.
COMND places the contents of the
indirect file in the text buffer, but does not display them on the
user's terminal.
As the user types his command, the characters are placed in a
command
text buffer.
This buffer can also include the command line prompt.
Several byte pointers and counts reflect
the current state of
the
parsing of the command.
These pointers and counts are as follows:
1.

Byte pointer to the beginning of
the prompting-text buffer
(.CMRTY).
This pointer is also called the CTRL/R buffer byte
pointer, since a CTRL/R causes COMND to redisplay the prompt
contained
in this buffer, along with anything the user typed
on the command line before he typed the CTRL/R.
The buffer that contains the prompt need
not be contiguous
with the buffer containing the remainder of the command line.

2.

Byte pointer to the beginning of the buffer that contains the
user's
input
(.CMBFP).
This is the limit back to which the
user can edit.

3.

Byte pointer to the
beginning of
command line to be parsed (.CMPTR).

4.

Count of
the
( . CMCNT) .

5.

Count of the number of characters in the buffer that have not
yet been parsed (.CMINC).

space

remaining

in

the
the

next
text

field
input

of

the

buffer

The illustration below is a logical arrangement of the byte pointers
and
counts.
Remember
that
the prompting
text buffer need not be
adjacent to the text buffer.
.CMCNT

!==========================================-==--==-==--==!
!========================================================!

. CMR'rY

t~FP

\

.CMINC

• CMPTR

These byte pointers and other information are contained in a command
state block whose address is given as an argument to the COMND monitor
call.
The .CMINI function initializes these pointers.

3-53

I

TOPS-20 MONITOR CALLS
(COMND)
COMND Parses a command line field by field.
COMND substitutes default
values
for
missing
fields in the command line when the user types a
carriage return, ESC, CTRL/F, or question mark.
These characters are
called action characters because they cause the system to act on the
command as typed so far.
Other characters that terminate a field
are
space, tab, slash, comma, and any other nonalphanumeric character.
Normally, parsing does not begin, and the COMND call does
not
return
control
to
the program, until an action character is typed.
But if
B8(CM%WKF) is on in word .CMFLG when the COMND call executes,
parsing
begins after each field is terminated.
A program parses a command line by repeated COMND calls.
Each call
The
specifies
the
type of field the program expects to be parsed.
any
program supplies this information, placing a
function
code
and
On
data
needed
for
the
function
in a function descr~~tor block.
successful completion of each call, the byte pointers and counts are
updated
in the command
state block, and any data obtained for the
field is returned.
The program executing
the COMND call
should
not
reset
the byte
pointers
in the command
state block after it completes parsing a
command line.
It should set up the command
state block before
it
begins to parse any commands,
and then use the .CMINI function to
initialize the command state block before parsing each command
line.
This allows
the
.CMINI
function
to use the CTRL/H error-recovery
feature.
If the program resets the pointers and counts
in the command
state
block,
instead of using
the
.CMINI
function to do so, use of the
CTRL/H feature is not possible.
When a CTRL/H is typed,
the
.CMINI
function allows recovery from an error in the last command only if the
following are both true:
1.

The pointer to the beginning of the user's input (.CMBFP) and
the pointer
to the beginning of the next field to be parsed
(.CMPTR) are not equal.

2.

The last character parsed in the previous command is
end-of-line character.

not

an

The COMND call allows the user to delete his
typed
input with
the
DELETE,
CTRL/W,
and CTRL/U keys without regard to field boundaries.
When the user deletes part of a field that has already been parsed,
the COMND call
returns
to
the program with B3(CM%RPT) set in word
.CMFLG, or the program
resumes execution at
the
reparse address
contained
in word
.CMFLG of the command state block.
This address
should be the place in the program at which parsing of
the command
line begins.
If this address is zero, the program must test ACI for
this bit,
and
reparse
the command
line
from
the beginning,
if
necessary.
(See the description of word .CMFLG of the command state
block.)

3-54

TOPS-20 MONITOR CALLS
(COMND)
The calling sequence to the COMND call is as follows:
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

address of the command state block
address of the first alternative function
block

descriptor

always (unless a reparse is needed and the right half
of .CMFLG is nonzero), with
ACI containing flags in the left half and the address
of
the command
state block in the right half.
The flags are copied
from word
.CMFLG in the
command state block.
AC2 containing either the data obtained for the field
or
a monitor call error code if the field could
not be parsed (CM%NOP is on in ACI).
AC3 containing in the left half the
address of
the
function descriptor block given in the call, and
in the right half the address of the
function
descriptor
block
actually used.
Note that the
contents of the right half uniquely
identifies
the type of atom that was parsed.

The format of the command state block is shown below.

17 18
35
a
=======================================================
.CMFLG

Flag Bits

.CMIOJ

Input JFN

!

Reparse Dispatch Address
Output JFN

.CMRTY

Byte Pointer to CTRL/R Text

.CMBFP

Byte Pointer to Start of Text Buffer

.CMPTR

Byte Pointer to Next Input To Be Parsed

.CMCNT

Count of Space Left in Buffer

.CMINC

Count of Unparsed Characters in Buffer

.CMABP

Byte Pointer to Atom Buffer

.CMABC

Size of Atom Buffer

.CMGJB

Address of GTJFN Argument Block
=======================================================

3-55

I

TOPS-20 MONITOR CALLS
(COMND)

Command State Block
Word

o

Symbol
.CMFLG

Meaning
Flag bits in the left half, and the reparse
dispatch address in the right half. Some flag
bits can be set by the program executing the COMND
call;
others can be set by the COMND call after
its execution. The bits that can be set by the
program are described following the Command State
Block description.
The reparse dispatch address is the location to
which control is transferred when a reparse of the
command is needed. This happens when a user edits
characters in a field that was already parsed.
If this field
is zero,
the COMND call sets
B3(CM%RPT)
in the left half of this word, and
gives the +1 return when a reparse is needed. The
program must then test the left half of ACI to see
if CM%RPT is set.
If it is, the user must reenter
the code that parses the first field of the
command.
The code at the reparse dispatch address should
initialize the program's state to what it was
after
the
last
.CMINI
function.
This
initialization should include resetting the stack
pointer, closing and releasing any JFNs acquired
since the last .CMINI function, and transferring
control to the code immediately following the last
.CMINI function call.

I

.CMIOJ

Input JFN in the left half, and output JFN in the
right half. These designators identify the source
for the input of the command and the destination
for
the
output
of
the typescript.
These
des i g nat 0 r s are u sua I I Y . P RI IN
( for
i n put)
and
.PRIOU (for output).

2

.CMRTY

Byte pointer to the
text.

3

.CMBFP

Byte pointer to the beginning of the user's input.
The user cannot edit back past this puinter.

4

.CMPTR

Byte pointer to the beginning of the next field to
be parsed.

5

.CMCNT

Count of the space remaining in the
the .CMPTR pointer.

6

.CMINC

Count of the number of unparsed characters in
buffer after the .CMPTR pointer.

'7

.CMABP

Byte pointer to the atom buffer,
a temporary
storage buffer that contains the last field parsed
by the COMND call. The terminator of the field is
not placed in this buffer. The atom buffer is
terminated with a null.

3-56

beginning

of

the

prompting

buffer

after
the

TOPS-20 MONITOR CALLS
(COMND)
Word

Symbol

10

.CMABC

The size of the atom buffer in bytes.
The atom
buffer
should be at least as large as the largest
field the program must parse.

11

.CMGJB

Address of a GTJFN argument block.
This block
must be at least 16(octal) words long and must be
writable.
If a
longer GTJFN block
is being
reserved,
the count in the
right half of word
.GJF2 of the GTJFN argument block must be greater
than four.

Meaning

The GTJFN block is filled in by the COMND call
with arguments for the GTJFN call if the specified
COMND function requests a JFN
(functions
.CMIFI,
.CMOFI,
and
.CMFIL).
The user should store data
in this block on the .CMFIL function only.
The flag bits that can be set by the user in the left half of word
.CMFLG in the Command State Block are described below.
These bits
apply to the parsing of the entire command and are preserved by COMND
after execution.
See the end of the COMND JSYS discussion for the
bits that are returned by COMND in the left half of word .CMFLG.
Bits Supplied in State Block on COMND Call
Meaning

Bit

Symbol

6

CM%RAI

Convert lowercase input to uppercase.

7

CM%XIF

Do not recognize the at-sign (@) character as
indirect
file;
instead
designating
an
character
as
ordinary
consider
the
punctuation.
A program sets this bit to
prevent the input of an indirect file.

8

CM%WKF

Begin parsing after each field is terminated
instead of only after
an action character
(carriage return, ESC, CTRL/F, question mark)
is typed.
A program sets this bit if it must
change terminal characteristics in the middle
of a command.
Turning off echoing during the
input of a password is an example of a
use
for this bit.
Use of this bit is not recommended,
however,
because terminal wakeup occurs after each
field
is terminated,
thereby
increasing
system overhead.
The recommended method of changing
terminal
characteristics within a command is to input
the
field
requiring
the
special
characteristic on the next line with its own
prompt.
For example,
if a
program
is
accepting a password,
it should
turn off
echoing after the .CMCFM function of the main
command and perform the .CMINI function to
type the prompt requesting a password on the
next line.

3-57

TOPS-20 MONITOR CALLS
(COMND)
The format of the function descriptor block is shown below.

o

17 18

8 9

35

=======================================================
.CMFNP

function
code

function
flags

!

address of next function
descriptor block

.CMDAT

Data for specific function

.CMHLP

Byte pointer to help text for field

.C~DEF

Byte pointer to default string for field
Address of 4-word break mask

.C~BRK

=======================================================

Function Descriptor Block
Word

Symbol

o

.CMFNP

Function code and pointer to
next
function
descriptor block.
BO-B8(CM%FNC)
Function code
B9-BI7(CM%FFL)
Function-specific flags
B18-B35(CM%LST) Address of the
next
function
descriptor block, or zero if this
is the last function descriptor
block.

1

.CMDAT

Data for the specific function, if any.

2

.CMHLP

Byte pointer to the help text for this field.
This word can be zero if the program is not
supplying its own help text. CM%HPP must be set
(in word 0) in order for this pointer to be used.

3

.CMDEF

Byte pointer to the default string for this field.
This word can be zero if the program is not
supplying its own default string. CM%DPP must be
on in word 0 in order for this pointer to be used.

4

.CMBRK

Address of a 4-word break mask that specifies
which characters terminate a field. Word .CMBRK
is ignored unless CM%BRK (B13) is on in word 0 of
the function descriptor block.

Meaning

The individual words in the function descriptor block are described in
the following paragraphs.

3-58

TOPS-20 MONITOR CALLS
(COMND)
Words .CMFNP and .CMDAT of the function descriptor block
Word .CMFNP contains the function code for the field to be parsed, and
word
.CMDAT contains any additional data needed for that function.
The function codes, along with any required data for the functions,
are described below.
Code

o

Symbol
.CMKEY

Meaning
Parse a keyword, such as a command name.
Word
.CMDAT contains the address of a keyword symbol
table. The keyword table must be in alphabetical
order. See the TBLUK monitor call description for
more information on the format of the keyword
table.
The table entries point to argument blocks.
The
right half of the first word of each such block
contains the following bits, which can be set when
BO-B6 of that first word are off and B7(CM%FW) is
set:
B35 (CM%INV)

Suppress this keyword in the list
output on a question-mark (?). The
program can set this bit to include
entries in the table that should be
output as part of the help text
because
they are not preferred
keywords. This bit is also used
with the CM%ABR bit to prevent an
abbreviation from being output when
a question mark (?) is typed.
This bit can be set, for example,
to allow the keyword LIST to be
valid, even though the preferred
keyword may be PRINT.
The LIST
keyword is not listed in the output
given when a question mark (?) is
typed.

B34 (CM%NOR)

Do not recognize this keyword even
if an exact match is typed by the
user and suppress its listing in
the list output when a question
mark (?) is typed.
(Refer to the
TBLUK call description for more
information on using this bit.)

3-59

TOPS-20 MONITOR CALLS
(COMND)
Code
.0

Meaning

Symbol
.CMKEY
(Cont.)

I

B33(CM%ABR)

Consider this keyword
a
valid
abbreviation for another entry in
the table. The right half of this
table entry points to the command
table entry of the keyword for
which this is an abbreviation. The
program can set this bit to include
entries in the table that are less
than
the
minimum
unique
abbreviation.
For example, this bit can be set to
include the entry ST (for START) in
the table.
If the user then types
ST as a keyword, COMND accepts it
as a valid abbreviation for START
even though there may be other
keywords beginning with ST.
To suppress the output of this
abbreviation
in
the
list
of
keywords output when a question
mark (?) is typed, the program must
also set the CM%INV bit.

On a successful return, AC2 contains the address
of the table entry where the keyword was found.
Note that keywords in the table that contain
trailing spaces (such as FORTRAN literals) are not
recognized.
1

.CMNUM

Parse a number. Word .CMDAT contains the radix
(from 2 to 10) of the number. On a successful
return, AC2 contains the number.

2

.CMNOI

Parse a guide word string, but do not return an
error if no guide word is input. Guide words are
output if the user terminated the previous field
with ESC.
Guide words are not output, nor can
they be input, if the user has caused parsing into
the next field.
For COMND to input a guide word,
the guide word
field must be delimited by parentheses. Word
.CMDAT contains a byte pointer to an ASCIZ string
that contains the guide word. This string does
not contain parentheses.
An error is returned only if a guide word is input
that does not match the one expected by the COMND
call.

3-60

TOPS-20 MONITOR CALLS
(COMND)
Code
3

Symbol
.CMSWI

Meaning
Parse a switch.
A switch field must begin with a
slash, and can end with a colon or any legal field
terminator.
Word .CMDAT contains
the address of a
switch
keyword symbol table.
(Refer to the TBLUK monitor
call description for the
format of
the
table.)
Switch entries
in the
keyword
table must not
contain a slash.
If switch
requires a value,
however, its entry must end with a colon.
The data bits CM%INV, CM%NOR, and CM%ABR,
defined
for
the
.CMKEY function, can also be set on this
function.
On a successful return, AC2 contains
the address
of
the
table entry where the switch keyword was
found.

4

.CMIFI

Parse an input file specification.
This function
causes
the COMND call
to execute a GTJFN call,
which attempts to parse the specification for
an
existing file using no default fields.
Hyphens in
the file specification are treated as alphanumeric
characters.
The .CMGJB address (word 11 in the command
block)
must be supplied,
but the GTJFN
should be empty.
Data stored in the GTJFN
is overwritten by the COMND JSYS, and GTJFN
are set in the GTJFN block.
On a
successful
assigned.
See note following

5

.CMOFI

return,

AC2

contains

the

state
block
block
flags
JFN

.CMFIL function.

Parse an output file specification.
This function
causes the COMND call
to execute a GTJFN call,
which parses the specification for either a new or
an existing
file.
The default generation number
is the generation number of the existing file plus
1.
The
.CMGJB address must be supplied, but the
GTJFN block should be empty.
(Data stored in the
block will
be overwritten by the COMND JSYS.
Also,
certain GTJFN flags
are
set.)
On
a
successful
return, AC2 contains the JFN assigned.
Hyphens are treated as alphanumeric characters for
this function.
See note following

3-61

.CMFIL function.

TOPS-20 MONITOR CALLS
(COMND)
Code
6

Symbol
. CMFlL

Meaning
Parse a general
(arbitrary)
file
specification .
This
function causes the COMND call to execute a
GTJFN to attempt to parse
the
specification for
the
file.
The
.CMGJB address must be supplied,
but data stored in certain words of
the GTJFN
block is overwritten by the COMND JSYS and certain
GTJFN flags
are
set
(see note below).
On a
successful
return, AC2 contains the JFN assigned.
Hyphens are treated as alphanumeric characters for
this function.
Note that portions of
the GTJFN block used
by
functions
. CMOFl ,
. CMlFl,
and
. CMFlL
are
controlled by COMND.
The
following
list shows
which words are
under
the control of COMND and
which words are under the control of the user:
GTJFN
Word(s)

Controlled
by

.GJGEN

COMND

. GJSRC
.GJDEV .GJJFN

COMND
COMND/
USER

Characteristics
1.

.CMOFl sets flags GJ%FOU,
GJ%MSG,
and GJ%XTN and
clears all other flags.

2.

.CMlFl sets flags GJ%OLD,
and GJ%XTN and clears all
other flags.

3.

.GMOFl and
.GMlFl
zero
the
right half of word
.GJGEN.

4.

. CMFIL sets fl ag GJ%XTN
and clears GJ%CFM .
None

Functions
.CMlFl
AND
.CMOFl give COMND control
of these words.
.CMFlL
gives the user control of
these words .

. GJF2 .GJBFP

COMND

None

.GJATR

USER

Function .CMFlL gives the
user
control
of
this
word.
. GJATR is not used
for other functions.

3-62

TOPS-20 MONITOR CALLS
(COMND)
Code
7

Symbol
.CMFLD

Meaning
Parse an arbitrary field.
This function is useful
for fields not normally handled by the COMND call.
The
input,
as
delimited
by
the
first
nonalphanumeric character, is copied into the atom
Note the
buffer;
the delimiter is not copied.
following:
1.

This function will parse a null field

2.

Hyphens are treated as alphanumeric characters
for this function

3.

No validation is performed (such
validation)

4.

No standard help message is available
description of word .CMHLP, below)

5.

The FLDBK. and BRMSK. macros can be used for
including other characters in the field (such
as the asterisk (*) character)

as

filename
(see

10

.CMCFM

Confirm. This function waits for
the user to
confirm the command with a carriage return and
should be used at the end of parsing a command
line.

11

.CMDIR

Parse a directory name.
Login
directories are allowed.
Word
data bits for
this function.
defined bit is as follows:
BO(CM%DWC)

and files-only
.CMDAT contains
The
currently

Allow wildcard characters
typed in a directory name.

to

be

successful
return,
AC2
On
a
the
36-bit
directory
contains
number.
12

.CMUSR

Parse a user name.
Only login directories are
allowed. On a successful return, AC2 contains the
36-bit user number.

13

.CMCMA

Parse a comma. This function sets Bl(CM%NOP-no
parse)
in word .CMFLG of the command state block
and returns an error if a comma is not the next
item in the input. Blanks can appear on either
side of the comma. This function is useful for
parsing a list of arguments.

3-63

TOPS-20 MONITOR CALLS
(COMND)
Code

Symbol

14

.CMINI

Meaning
Initialize the command line by setting up internal
monitor pointers, typing the prompt, and checking
to see if the user typed CTRL/H.
This function
should be used before beginning of parsing a
command line, but not before reparsing a line.
Reinitializing the command line with this function
before starting to reparse the command
line
prevents the use of the CTRL/H feature.
To use this function, the user first moves the
needed data into the command state block and then
issues .CMINI.
If an error occurs while a line is
being parsed, .CMINI is issued again by the COMND
JSYS to reinitialize the line.
For the second and all subsequent .CMINI function
calls for a given line, the user should not alter
the byte pointers and character counts in the
command state block. To do so would disable the
CTRL/H feature.
This feature allows the user
program, on parsing a bad atom, to print an error
message, reissue the prompt, and parse the command
line again without forcing the user to retype the
entire line.
If .CMINI reads a CTRL/H character, .CMINI resets
all byte pointers and character counts except the
.CMINC count to their original state.
.CMINI sets
the
.CMINC count to the number of characters in
the buffer up to the bad atom.
These characters
are output to the terminal and parsed again.
Control then passes to the reparse address
(if
provided), and normal parsing resumes. The effect
on the program is as if the bad atom had never
been typed.

15

.CMFLT

Parse a floating-point number.
On a successful
return, AC2 contains the floating-point number.

16

.CMDEV

Parse a device name. A device name consists of up
to six alphanumeric characters terminated by a
colon (":"). On a successful return, AC2 contains
the device designator.

17

.CMTXT

Parse the input text up to the next carriage
return, place the text in the atom buffer, and
return.
If an ESC or CTRL/F is typed,
it causes
the terminal bell to ring (because recognition is
not availBble with this function) and is otherwise
ignored.
If a question mark
(?) is tYl?ed, an
appropriate response is given,
and the question
mark
(?)
is not included in the atom buffer.
(A
question mark can be included in the input text if
it is preceded by a CTRL/V.)

I

3-64

TOPS-20 MONITOR CALLS
(COMND)
Code

Symbol

20

.CMTAD

Meaning
Parse a date and/or time field
according
to the
setting of bits CM%IDA and CM%ITM.
The user must
input the field as
requested.
Any date
format
allowed by the IDTIM call can be input.
If a date
is not input, it is assumed
to be
the current
date.
If a time is not input, it is assumed to be
00:00:01.
When both the date and time fields
are
input,
they must be separated
by one or more
spaces.
If the fields are input separately,
they
must be terminated with a
space or
carriage
return.
Word .CMDAT contains bits
in the
left
half and an address in the right half as data for
the function.
The bits are:
BO(CM%IDA) Parse a date
BI(CM%ITM) Parse a time
B2(CM%NCI) Do not convert the date and/or time
to
internal
format.
(Refer
to Section
2.9.2. )
The address in the right half is the beginning of
a
three-word block in the caller's address space.
On a successful return, this block contains data
returned
from the IDTNC call executed by COMND if
B2(CM%NCI) was on in the COMND call (if the
input
date and/or time field was not to be converted to
internal format).
If B2(CM%NCI) was off
in the
COMND call,
on a successful return, AC2 contains
the internal date and time format.

21

. CMQST

Parse a quoted string up to the terminating quote .
The delimiters for
the
string must be double
quotation marks and are not copied
to
the atom
buffer.
A double quotation mark is input as part
of the string if two double quotation marks appear
together.
This function
is useful if the legal
field terminators and the action characters are to
be
included as part of a string.
The characters
?, ESC, and CTRL/F are not treated
as action
characters,
and are included in the string stored
in the atom buffer.
Carriage return is an invalid
character in a quoted string and causes BI(CM%NOP)
to be set on return.

22

. CMUQS

Parse an
unquoted
string
up
to one of
the
specified break characters.
Word .CMDAT contains
the address of a
4-word block of 128 break
character mask bits.
(Refer to word .RDBRK of the
TEXTI call description for an explanation of
the
mask.)
The characters scanned are not placed in
the atom buffer.
On return, .CMPTF is pointing to
the break character.
This function is useful for
parsing a string with an arbitrary delimiter.
The
characters ?,
ESC, and CTRL/F are not treated as
action characters (unless they are
specified
in
the mask)
and can be
included
in the string.
Carriage return can also be included if it is not
one of the specified break characters.

3-65

TOPS-20 MONITOR CALLS
(COMND)
Code

Symbol

23

.CMTOK

Parse the
input and
compare
it with
a
given
string.
Word .CMOAT contains the byte pointer to
the given string.
This function
sets Bl(CM%NOP)
in word
.CMFLG of
the
command state block and
returns if the next input characters do not match
the given string.
Leading blanks in the input are
ignored.
This
function
is
useful
for
parsing
single or multiple character operators (e.g., + or
**) •

24

.CMNUX

Parse a
number
and
terminate on
the
first
nonnumeric
character.
Word
.CMOAT contains the
radix
(from
2 to
10)
of
the
number.
On a
successful
return, AC2 contains the number.
This
function is useful for parsing a number
that may
not be
terminated with a nonalphabetic character
(e.g., 100PRINT FILEA).

Meaning

Note that nonnumeric identifiers can begin with
a
digit
(for example, lSMITH as a user name).
When
a nonnumeric identifier and
a number appear as
alternates
for a field, the order of the fun~tion
descriptor
blocks
is
important.
The
.CMNUX
function,
if given first, would accept the digit
in the nonnumeric identifier
as
a
valid
number
instead
of
as
the
beginning
character
of
a
nonnumeric identifier.

I

25

.CMACT

Parse an account string.
The input, as delimited
by
the first nonalphanumeric character, is copied
into
the
atom buffer;
the delimiter
is not
copied.
No verification is performed nor is any
standard help message available.
The length of
the
string
is checked,
and
if
it exceeds 39
characters, an error is generated.

26

.CMNOO

Parse a network node name.
A node
name
consists
of up to six alphanumeric characters followed by 2
colons ("::").
The node name must begin with
an
alphabetic
character.
Lowercase characters are
converted to uppercase characters.
The node
name
is copied into the atom buffer without the colons.

In addition to the function code in bits
0-8
(CM%FNC),
.CMFNP also
contains
function-specific
flag
bits in bits 9-17 (CM%FFL), and the
address of another function descriptor block in bits 18-35 (CM%LST).

3-66

TOPS-20 MONITOR CALLS
(COMND)
The flag bits that can be set in bits 9-17
Bit

Symbol

12

CM%NSF

13

CM%BRK

14

CM%PO

(CM%FFL) are as follows:

Meaning
Indicates that a suffix is optional.
This bit
is
meaningful
only
with
the
.CMDEV and
.CMNOD
functions.
If this bit is not set, the suffix
is
required.
Notifies COMND that word .CMBRK of
the
function
descriptor
block contains a pointer to a 4-word
break mask.
See description of word
.CMBRK
for
more details.
The field is to be parsed only,
and
the
field's
existence
is not
to be verified.
This bit
currently applies to the .CMDEV,
.CMDIR,
.CMNOD,
and
.CMUSR functions
and
is
ignored
for
the
remaining
functions.
On
return,
COMND
sets
Bl(CM%NOP-no parse) only if the field typed is not
in the correct syntax.
Also, data returned in AC2
may not be correct.

15

CM%HPP

A byte pointer to a program-supplied help

16

CM%DPP

byte pointer
to a program-supplied default
string
for this field is given in word 3 (.CMDEF)
of this function descriptor block.

17

CM%SDH

The output of the default help message
is
to be
suppressed
if
the
user
types a question mark.
(See below for the default messages.)

message
for this field is given in word 2 (.CMHLP) of this
function descriptor block.

A

The address of another function descriptor block can be given in
bits
18-35
(CM%LST) of the .CMFNP word.
The use of this second descriptor
block is described below.
Usually one COMND call is executed for
each
field
in
the command.
However,
for some fields, more than one type of input may be possible
(e.g., after a keyword field, the next field could be a
switch or
a
filename
field).
In these cases, all the possibilities for a field
must be tried in an order selected to test unambiguous cases first.
When the COMND call
cannot parse
the
field
function code, it does one of two things:

as

indicated

by

the

1.

It sets the current pointer and counts
such
that
the
next
call will
attempt
to parse the same input over again.
It
then returns with Bl(CM%NOP) set in the
left half of
the
.CMFLG word in the command state block.
The caller can then
issue another COMND call with a function
code
indicating
another
of the possible fields.
After the execution of each
call, the caller shoulJ test the CM%NOP flag to see that
the
field was parsed successfully.

2.

If an address of another function descriptor block
is given
in CM%LST,
the COMND call moves to this descriptor block
automatically and attempts to parse the field as indicated by
the
function code contained in BO-B8(CM%FNC) in word .CMFNP
of that block.
If the COMND call fails to parse
the
field
using
this new function code, it moves to a third descriptor
block if one is given.
This sequence continues until
either

TOPS-20 Version 5

3-67

April 1982

I
I

TOPS-20 MONITOR CALLS
(COMND)

the field
is successfully parsed or the end of the chain of
function blocks is reached.
Upon completion of the COMND
call, AC3 contains the addresses of the first and last
function blocks used.
By specifying a chained list of function blocks, the program can have
the COMND call automatically check all possible alternatives for a
field and not have to issue a separate call for each one.
In
addition,
if the user types a question mark, a list is output of all
the alternatives for the field as indicated by the list of function
descriptor blocks.
Word .CMHLP of the function descriptor block

This word contains a byte pointer to a program-supplied help text.
The COMND call outputs this help if the user types a question mark
when entering a command field.
Bit 15(CM%HPP) must be set in word 0
(.CMFNP) of the function descriptor block for this pointer to be used.
If B17(CM%SDH)
is set in this word, COMND outputs
only
the
program-supplied message.
If B17(CM%SDH) is not set, COMND appends
the default help message to the program-supplied message, and outputs
them both.
If .CMHLP is zero, COMND outputs only the default message.
The default help message depends on the particular function being used
to parse the current field.
The following table lists the default
help message for each function available in the COMND call.
Default Help Messages
Function

Message

.CMKEY (keyword)

one of the following
followed by the alphabetical list of valid
keywords.
If the user types a question mark
in the middle of the field, only the keywords
that
can
possibly
match the field as
currently typed are output.
If no keyword
can possibly match the currently typed field,
the following message is output:

keyword (no defined keywords match this input)
If there is only 1 keyword,
becomes the HELP message .
. CMNUM (number)

the

keyword

The help message output depends on the radix
specified in .CMDAT in the descriptor block.
If the radix is octal, the help message is
octal number
If the radix is decimal, the help message is
decimal number
If the radix is any other radix,
the help
message is
a number in base nn
where nn is the radix.

3-68

TOPS-20 MONITOR CALLS
(COMND)I
Function

Message

.CMNOI (guide word}

None

.CMSWI (switch)

one of the following
followed by the alphabetical list of valid
switch keywords. The same rules apply as for
.CMKEY function, above .

. CMIFI (input file)
.CMOFI (output file)
.CMFIL (any file)

The help message
output
depends on the
settings of certain bits in the GTJFN call.
If bit GJ%OLD is off and bit GJ%FOU is on,
the help message is
output filespec
Otherwise, the help message is
input filespec

.CMFLD (any field)

None

.CMCFM (confirm)

confirm with carriage return

.CMDIR (directory)

directory name

.CMUSR (user)

user name

.CMCMA (comma)

comma

.CMINI (initialize)

None

.CMFLT (floating point)

number

.CMDEV (device)

device name

.CMTXT (text)

text string

.CMTAD (date)

The help message depends on the bits set in
.CMDAT in the descriptor block. If CM%IDA is
set, the help message is
date
If CM%ITM is set, the help message is
time
If both are set, the help message is
date and time

.CMQST (quoted)

Quoted strinog

. CMUQS (unquoted)

Unquoted string if
otherwise none

.CMTOK (token)

None

.CMNUX (number)

Same as .CMNUM

.CMACT (account)

None

.CMNOD (node)

node name

3-69

n?n

is a break

character,

TOPS-20 MONITOR CALLS
(COMND)
Word .CMDEF of the function descriptor block
This word contains a byte pointer to the ASCIZ string to be used as
the default for
this field.
For this pointer to be used, bit 16
(CM%DPP) must be set in word 0 (.CMFNP) of the descriptor block.
The
string is output to the destination, as well as copied to the text
buffer, if the user types an ESC or CTRL/F as the first nonblank
character
in the field.
If the user types a carriage return, the
string is copied to the atom buffer,
but is not output to the
destination.
When the caller supplies a list of function descriptor blocks,
the
byte pointer for
the default string must be included in the first
block. The CM%DPP bit and the pointer for
the default string are
ignored when they appear in subsequent blocks.
However, the default
string can be worded so that it applies to any of the alternative
fields.
The effect is the same as if the user had typed the given
str ing.
Defaults for fields of a file specification can also be supplied with
the
.CMFIL function.
If both the byte pointer to the default string
and the JFN defaults have been provided, the COMND default is used
first, and then, if necessary, the GTJFN defaults are used.
NOTE
The function descriptor block, whose
address is given in AC2, can be set up
by the FLDDB. and FLDBK. macros defined
in MACSYM.
(See the end of the COMND
section for a description of
these
macros. )
Word .CMBRK of the function descriptor block
This word contains a pointer to a 4-word user-specified mask that
determines which characters constitute end of field.
The leftmost 32
bits of each word correspond to a character
in the ASCII collating
sequence
(in ascending order).
If the bit is on for a given
character, typing that character causes the COMND JSYS to treat the
characters typed so far as a separate field and
to parse them
according to the function being used.
CM%BRK (B13) must be on in the
first word of the function descriptor block, or COMND ignores word
.CMBRK.
Ordinarily,
the user
relies on COMND's default masks
(varying
according to function)
to specify which characters signal end of
field, and thus is not concerned with word
.CMBRK of the function
block.
But for
special purposes such as allowing n*n or n%n to be
part of a field, rather than a field delimiter, the user must specify
his own mask.
(In this example, the bits for n*n and n%n would be off
in the mask word.) The user may inspect COMND's default masks (defined
in MONSYM) for help in designing a custom mask.

3-70

TOPS-2D MONITOR CALLS
(COMND)
The following is a list of the COMND functions that use masks:
Mask
Symbols

COMND
Function

Changeable
by User

KEYBD. - KEYB].
DEVBD. - DEVB3.
FLDBD. - FLDB] .
EOLBD. - EOLB] .
KEYBD. - KEYB] .
User-specified
USRBD. - USRB3.
FILBD. - FI LB~:.
FILBD. - FILB] .
FILBD. - FILB~: .
internal
FILBD. - FI LB~:.
internal
ACTBD. - ACTB~: .

.CMKEY
.CMDEV
.CMFLD
.CMTXT
.CMSWI
.CMDAT
.CMUSR
.CMFIL
.CMIFI
.CMOFI
.CMNUM
.CMDIR
. Cr.1FLT
.CMACT

Yes
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
No
No
No

COMND will ignore any break masks that
that do not allow user-modified masks.

(only if parse-only)

are

specified

Note that specifying a zero mask with CM%BRK set will
line buffer to fill up and generate an error.

for
cause

functions
the

TTY

On a successful return, the COMND call returns flag bits in
the
left
half of ACI
and preserves the address of the command state block in
the right half of ACI.
These flag bits are copied from word .CMFLG in
the command state block and are described as follows.
Bits Returned on COMND Call
Bit

Symbol

Meaning

D

CM%ESC

An ESC was typed by the user as the terminator for
this field.

1

CM%NOP

The field could not be parsed because it did
not
conform to the
specified function(s).
An error
code is returned in AC2.
If this bit is set, bits
D (CM%ESC) and 2 (CM%EOC) might not contain valid
information.

2

CM%EOC

The field was terminated with a carriage return.

3

CM%RPT

Characters already parsed
need
to be
reparsed
because
the
user edited them.
This bit does not
need to be examined if the program has supplied
a
reparse dispatch address
in the
right half of
.CMFLG in the command state block.

4

CM%SWT

A switch field was terminated with a colon.
This
bit is on if the user either used recognition on a
switch that ends with a colon or typed a colon at
the end of the switch.

5

CM%PFE

The previous field was terminated with an ESC.

3-71

I

TOPS-20 MONITOR CALLS
(COMND)

I

When a field cannot be parsed, Bl(CM%NOP) is set in ACl, and one of
the following error codes is returned in AC2. Note that if a list of
function descriptor blocks is given and an error code is returned, the
error is associated with the function that had the largest atom buffer
after all function blocks have been tried without a successful parse
of the field.
NPXAMB:

ambiguous

NPXNSW:

not a switch - does not begin with slash

NPXNOM:

does not match switch or keyword

NPXNUL:

null switch or keyword given

NPXINW:

invalid guide word

NPXNC:

not confirmed

NPXICN:

invalid character in number

NPXIDT:

invalid device terminator

NPXNQS:

not a quoted string - does not begin with double quote

NPXNMT:

does not match token

NPXNMD:

does not match directory or user name

NPXCMA:

comma not given

COrvlX18 :

invalid character in node name

COrvlX19 :

too many characters in node name
Macros

Several macros (defined in MACSYM) are available to make
COMND JSYS more convenient. These macros are as follows:

using

the

FLDDB. (TYP,FLGS,DATA,HLPM,DEFM,LST)
where:
TYP
FLGS
DATA
HLPM
DEFM
LST

function type
function flags
function-specific data
help message
default text
additional invocations of the FLDDB. macro (used only if
multiple function blocks are required)

This macro generates function descriptor blocks for COMND.
example, the following code performs a .CMINI function:
MOVEI Tl,STEBLK
MOVEI T2, [FLDDB. (.CMINI)]
COMND

;Get address of COMND state block
;Get address of function block

3-72

For

TOPS-20 MONITOR CALLS
(COMND)
The following code performs a .CMKEY function
the keyword table started at address CMDTAB:

(assuming

that

MOVEI TI,STEBLK
;Get address of COMND state block
MOVEI T2, [FLDDB(.CMKEY,,CMDTAB,
,,)
Also,

the BRMSK. macro may be invoked within the FLDBK. macro:

FLDBK. (TYP,FLGS,DATA,HLPM,DEFM, [
BRMSK. (INIO,INII,INI2,INI3,ALLOW,DISALLOW)] ,LST)
The COMND call causes other monitor calls to be executed, depending on
the particular
function
that
is requested.
Failure of these calls
usually results in the failure to parse the requested field.
In these
cases,
the relevant error code can be obtained by the GETER and ERSTR
monitor calls.
Any TBLUK error can occur on the keyword and switch functions.
Any NIN/NOUT
functions.

and

FLIN/FLOUT

Any GTJFN error
except
specification functions.

error

for

can

GJFX37

can

occur

on

occur

the

number

on

the

file

directory

and

user

Any IDTNC error can occur on the date/time function.
Any RCDIR or RCUSR error can occur
functions.

on

the

Any STDEV error can occur on the device function.

3-73

TOPS-20 MONITOR CALLS
(COMND)

Generates an illegal instruction interrupt on error conditions below.
COMND ERROR MNEMONICS:
COMNX1:

Invalid COMND function code

COMNX2 :

Field too long for internal buffer

COMNX3 :

Command too long for internal buffer

COMNX5 :

Invalid string pointer argument

COMNX8 :

Number base out of range 2-10

COMNX9 :

End of input file reached

COMX10:

Invalid default string

COMXll:

Invalid CMRTY pointer

COMX12:

Invalid CMBFP pointer

COMX13 :

Invalid CMPTR pointer

COMX14:

Invalid CMABP pointer

COMX15:

Invalid default string pointer

COMX16:

Invalid help message pointer

COMX17:

Invalid byte pointer in function block

VlI,.CCX1:

Account string too long

3-74

TOPS-20 MONITOR CALLS
(CRDIR)

CRDIR

JSVS

240

Creates, changes, or deletes a directory entry.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled.

ACCEPTS IN ACI:

byte pointer to ASCIZ string containing the structure
and directory name. The string must be of the form:
structure:.

AC2 :

argument
in word

BO(CD%LEN)

set flags and length of the
block from the values given
.CDLEN.

Bl(CD%PSW)

set password from argument block

B:2 (CD%LIQ)

set working disk
argument block

B3(CD%PRV)

set capability bits from argument block

B4(CD%MOD)

set mode bits from argument block

B5(CD%LOQ}

set permanent disk
argument block

B6(CD%NUM)

set directory number from argument block
(valid only when creating a directory)

B7(CD%FPT)

set default file protection from argument
block

BB(CD%DPT)

set directory
block

B9(CD%RET)

set default retention count from argument
block

storage

limit

storage

protection

limit

from

from

from

argument

BIO(CD%LLD) set last LOGIN date from argument block
Bll(CD%UGP) set user groups from argument block
B12(CD%DGP) set directory groups from argument block
B13(CD%SDQ) set subdirectory
block

quota

from

B14(CD%CUG) set user groups assignable
directory from argument block

argument
by

this

B15(CD%DAC) set default account from argument block
B17(CD%DEL) delete this directory entry
B18-B35(CD%APB) address of the argument block
AC3:

TOPS-20 Version 5

byte pointer to ASCIZ string containing the password
of the directory.
This pointer is required when a
nonprivileged user is changing parameters for his
directory.

3-75

April 1982

I

TOPS-20 MONITOR CALLS
(CRDIR)
RETURNS

+1:

always, with directory number in ACI

This monitor call requires the process to have WHEEL or OPERATOR
capability enabled unless one of the following conditions is true:
1.

The specified directory is one to which the caller has owner
access,
and
the caller is changing anyone of the following
parameters:
password (.CDPSW)
default file protection (.CDFPT)
directory protection (.CDDPT)
default retention count (.CDRET)
default account (.CDDAC)
This feature is installation dependent and
is enabled
issuing function .SFCRD of the SMON monitor call.

2.

by

The specified directory is inferior to the one to which
the
caller
is currently connected,
and
the caller has owner
access to this inferior directory.

Refer to Section 2.2.6 for the description of owner access.
The format of the argument block is as follows:
Word

o

Symbol
.CDLEN

Meaning
flag bits in the left half, and length of the
argument
block
in the
right half.
The
following bits are defined:
BO(CD%NSQ)

Bl

When restoring this directory, do
not update its superior directory's quotas (permanent,
working,
and
subdirectory
quotas)
to
account for this directory.
If
this bit is off, the superior directory's quotas are
updated.
This bit is set by the DLUSER or
DUMPER program to
retain
the
superior directory's quotas when
restoring
its
subdirectories.
The process must have WHEEL or
OPERATOR capability enabled
to
set this bit.

(CD%NCE) When restoring or
reconstructing
this directory, do not change any
directory
parameters
if
the
directory
currently exists on
disk;
set the parameters only if
the directory does not exist.
If
this bit is off,
the directory
parameters as saved are restored
for the directory.
This bit is
set
by the DLUSER or DUMPER
program to restore or reconstruct
directories
from
out-of-date
files without causing existing
directories
to
revert
to older
parameters.
The process
must
have WHEEL or OPERATOR capability
enabled to set this bit.

3-76

TOPS-20 MONITOR CALLS
(CRDIR)
Word

o

Symbol
.CDLEN
(Cont.)

Meaning
B2 (CD%NED)

Set default on-line expiration
Currently
date from word .CDDNE.
not implemented.

B3(CD%FED)

Set default on-line expiration
Currently
date from word .CDDFE.
not implemented.

1

.CDPSW

byte pointer to password string, which
is a
string
from 1 to 39 alphanumeric characters
(including hyphens).

2

.CDLIQ

maximum number of pages that can be used
for
working disk storage (also known as logged-in
quota) .

3

.CDPRV

capabilities for
this user.
(Refer
Section 2.7.1 for the capability bits.)

4

. CD MOD

mode word .

to

BO(CD%DIR)

directory name can be used
to connect to (the directory
files-only directory).
If
bit
is off,
the directory
can be used for
logging
in
connecting to.

only
is a
this
name
and

Bl(CD%ANA)

accounts are alphanumeric.
This
bit
is not used and is provided
for
compatibility with
systems
earlier than TOPS-20 version 3.

B2(CD%RLM)

all messages
from
the
file
MAIL.TXT
are
repeated
each time the user logs
in.
If
this
bit
is
off,
only the
messages not previously printed
are output when the user logs in.

B7(CD%DAR)

If on, this bit
indicates
that
the
file
should be archived
rather than migrated
to virtual
disk when the on-line expiration
date has been reached.

5

.CDLOQ

maximum number of pages that can be used
for
permanent
disk
storage
(also known as
logged-out quota).

6

.CDNUM

directory number, valid only when creating
a
directory.
An error code is returned if the
user
changes the
number of
an
existing
directory
(CRDIX2)
or gives a
nonunique
number (CRDIXS).

7

.CDFPT

default
file
right-justified) .

TOPS-20 Version 5

3-77

protection

(IS

bits,

April 19S2

I

TOPS-20 MONITOR CALLS
(CRDIR)
Word

Symbol

10

.CODPT

directory
protection
right-justified) .

11

.CDRET

default number of generations of a file to be
retained in the directory (retention count).
Valid numbers are 0 to 63, with 0 being an
infinite number.

12

.COLLD

date of last login.

13

.CDUGP

address of
directory.

14

.CODGP

address of directory group list.

15

.CDSDQ

maximum number of directo~ies that can be
created inferior to this directory. This
parameter allows a user to create directories
with the BUILD command.

16

.CDCUG

list
This
address of user group list.
contains
the group numbers that can be
assigned to subdirectories.

17

.CODAC

byte pointer to default
this user.

20

.CDDNE

default on-line expiration date and time,
which can be an explicit date and time
(internal format) or an interval
(in days).
In either case, the specified date/interval
cannot exceed the system maximum.
This
parameter is read if CD%NED (lB2) or CD%FED
(1B3) in .CDLEN are set.
If a new directory
is
created
and
this parameter is not
specified, the system default is used.

.CODNE

An unprivileged user can modify his defaults
to be less than or equal to those that are
currently specified or the system maximum,
whichever is greater.

20

Meaning

user

list

account

This word is currently reserved
implemented.
21

.CODFE

bits,

( 18

for

this

string

and

is

and

not
time.

default off-line expunqe date and
Otherwise similar to . CDDNE (above) .
This word is currently reserved
implemented.

for

is

not

The format of each group list is a table with the first word
containing a count of the number of words (including the count word)
in the table and each subsequent word containing a group number.
When CRDIR is being executed to create a directory, bits 0-17 of AC2
can optionally be on or off.
If a particular bit is on, it indicates
that the corresponding argument in the argument block should be
examined.
If the bit is off, it indicates that the argument should be
defaulted.

3-78

TOPS-20 MONITOR CALLS
(CRDIR)

The following table lists the
defaults:
Bits
B2(CD%LIQ)
B3 (CD%PRV)
B4(CD%MOD)
B5 (CD%LOQ)
B6(CD%NUM)
B7(CD%FPT)
B8(CD%DPT)
B9(CD%RET)
BIO(CD%LLD)
Bll(CD%UGP)
B12(CD%DGP)
B13 (CD%SDQ)
B14(CD%CUG)
B15(CD%DAC)

bits

and

the

corresponding

argument

Argument Defaults
maximum working disk file storage to 250 pages
no special capabilities
directory name that can be used for logging in and
that lists the messages from MAIL.TXT only
once
maximum permanent disk file storage to 250 pages
the first unused directory number.
B6
should
normally be off.
default file protection to 777700
directory protection to 777700
default file retention count to 1
never logged in
no user groups
no directory groups
no ability to create inferior directories
no assignable user groups for inferior directories
no default account

When CRDIR is being executed to chonge a directory and any of
of AC2 is off, the corresponding parameter is not affected.

BO-B17

When CRDIR is being executed to delete a directory,
the settings of
BO-B17 of AC2 are ignored.
A CRDIR call cannot be given to delete a
directory that has directories inferior to it.
The GTDIR call can be used to obtain the directory information.
Generates an illegal instruction interrupt on error conditions below.
CRDIR ERROR MNEMONICS:
ACESX3 :

Password required

CRDIXl:

WHEEL or OPERATOR capability required

CRDIX2:

Illegal to change number of old directory

CRDIX3:

Insufficient system resources (Job Storage Block full)

CRDIX4 :

Superior directory full

CRDIX 5:

Directory name not given

CRDIX6 :

Directory file is mapped

CRDIX7:

rile(s} open in directory

CRDIX8:

Invalid directory number

CRDIX9:

Internal format of directory is incorrect

CRDIIO:

Maximum directory
expanding

CRDlll:

Invalid termin2ting bracket on directory

CRDII2:

Structure is not mounted

CRDI13:

Request exceeds superior directory working quota

number

3-79

exceeded;

index

table

needs

TOPS-20 MONITOR CALLS
(CRDIR)
CRDI14:

Request exceeds superior directory permanent quota

CRDIlS:

Request exceeds superior directory subdirectory quota

CRDI16:

Invalid user group

CRDI17:

Illegal
to
create
files-only directory

CRDI18:

Illegal to delete logged-in directory

CRDI19:

Illegal to delete connected directory

CRDI20:

WHEEL, OPERATOR, or requested capability required

CRDI2l:

Working space insufficient for current allocation

CRDI22:

Subdirectory quota insufficient for existing

CRDI23:

Superior directory does not exist

CRDI24:

Invalid subdirectory quota

nonfiles-only

3-80

subdirectory

under

subdirecto~ies

TOPS-20 MONITOR CALLS
(CRJOB)

CRJOB

JSYS

2

Creates a new job and optionally logs it in.
This monitor call causes
the functions
that are normally performed when a job is created (for
example, assignment of a JSB, the primary I/O designators, and the job
controlling terminal) to be performed for the new job.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled.
When this call is used
in any section other
than
section zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

RETURNS

flag bits"O

AC2:

address of argument block

AC3:

(optional) If CRJOB is to be used to release control
over a
job previously created with CRJOB (bit 17 in
ACI must be on), then AC3 contains the job number of
the previously-created job.

+1:

failure, with error code in ACI

+2:

success, with the number of the new job in ACI

The flag bits defined in the left half of ACI are as follows:
Bit

Symbol

o

CJ%LOG

Log in the new job.
If this bit is off,
job is created but not logged in.

1

CJ%NAM

Set the user name and password from
the argument
block.
If
this bit is off, the user name of the
caller is given to the new job.

2-3

CJ%ACT

Set the account of the new job to the following:

4

CJ%ETF

Meaning
the

new

Meaning

Code

Symbol

0

.CJUCA

Use current account of caller.

1

.CJUAA

Use account
block.

2

.CJUDA

user
Use default account of
whose job is being created.

from

the

argument

If set, place the TOPS-20 command processor in the
top-level process of the new job.
The command
processor reads its program argument block
(see
below) at the time it is started.
CJ%FIL and CJ%ETF interact in the following ways:
1.

TOPS-20 version 5

If CJ%FIL is on and CJ%ETF is on, then a job
is created with a top process consisting of
the TOPS-20 command processor and an
inferior
process consisting of the file to which word
.CJFIL points.
3-81

April 1982

I

TOPS-20 MONITOR CALLS
(CRJOB)
Bit

Symbol

4

CJ%ETF

Meaning
2.

IF CJ%FIL is off and CJ%ETF is on, then a
job
is created with a top process consisting of
the TOPS-20 command processor.
No
inferior
process is created.

3.

If CJ%FIL is on and CJ%ETF is off, then a
jnb
is created with a top process consisting of
the file to which word
.CJFIL points.
No
inferior process is created.

The format of the program
follows:

argument

block

is

as

Contents

Word

o

Count of words in block,
this word.

1

IBO+3B6+2B12+CR%PRA - indicates this
is
a program argument block created by the
CRJOB JSYS.

2

IBO + offsetl - offsetl is the offset in
this block of the first argument being
passed.

3

IBO + offset2 - offset2 is the offset in
this block of the second argument being
passed.

n

(offsetl) This argument is a copy of the
flag
bits from word 10 (.CJEXF) of the
CRJOB argument block, which contains the
flags
for
the
command
language
processor.

n+l

(offset2)
This
argument
contains
information
about
the process being
started:
the process handle in the left
half, and the entry vector offset in the
right half.
The entry vector offset
is
from word
.CJSVF (word 4) of the CRJOB
argument block.

not

including

The program argument block is created by the CRJOB
monitor
call
and
is passed to the process by a
PRARG monitor
call
(performed
internally
by
CRJOB) .
The user does not
specify any of the
information in the program argument block.
Only
the program at
the
top fork
level of the job
(usually the TOPS-20 EXEC)
can read
the PRARG
block.

3-82

TOPS-20 MONITOR CALLS
(CRJOB)
Bit

Symbol

5

CJ%FIL

Meaning
Move the file to which
a
word
in the
argument
block points
into a
process in the new job (by
means of a GET call).
If B4(CJ%ETF) is off,
the
file is placed in the top-level process of the new
job.
If B4(CJ%ETF) is on, the file is placed
in
the process designated
in the Command Language
Processor's PRARG argument block (see below).
If B5(CJ%FIL) is off, no file
is moved
into a
process of the new job, and the top-level process
of the new job is the Command Language Processor.

6

CJ%ACS

Load the ACs from the value in the argument block.
The ACs
are
loaded only if a program other than
the Command Language Processor is being run.

7

CJ%OWN

Maintain ownership of the
new job.
This means
that
the
new
job cannot be logged out until the
caller releases ownership of it.
If this
bit
is
off, control of the new job is released.

8

CJ%WTA

Do not start the new job until
it
is attached
(using ATACH JSYS) to a terminal.
If this bit is
off, the new job is starteo.

9

CJ%NPW

Do not check the password given when the
new job
is logged in.
If this bit is off, the password is
checked unless the new job is being logged in with
the same llser name as the caller, or with WHEEL or
OPERATOR capability enabled.

10

CJ%NUD

Do not update the date of LOGIN
for
the
user
logging
in
to
the new job.
If this bit is off,
the date of LOGIN is updated, unless the
user
is
logging
in with the same user name as the caller,
or with WHEEL or OPERATOR capability enabled.

11

CJ%SPJ

Set (by means of a SPJFN call) the primary
input
and output designators
from
the argument block
before starting
the
job.
The
primary
I/O
designators are not changed for a Command Language
Processor in the top-level process of the new job;
they are changed only for inferior processes.
If
this bit is off, the primary I/O designators of
the new job are the job's controlling terminal.

12

CJ%CAP

Set the allowed user capabilities of the
new job
(right half)
to be the
same as
the caller's
currently enabled capabilities, until the new job
is logged in.
If this bit is off, the new job has
the user capabilities associated with
the
user
whose job is being created.

13

CJ%CAM

Set the allowed user capabilities of the
new
to
the
combination
of
(AND function)
capability mask in the argument block and the
job's user capabilities.
If this bit is off,
new job has the capabilities associated with
user whose job is being created.

3-83

job
the
new
the
the

TOPS-20 MONITOR CALLS
(CRJOB)
Bit

Symbol

14

CJ%SLO

Meaning
Send an IPCF message to the PID supplied
in
the
argument block when the new job is logged out.
If
this bit is off, no message is sent when
the new
job is logged out.
The IPCF logout message has the following format:
Word

o
1
2

3
4
5
6

7
10

17

CJ%DSN

Contents
0, , . I PCLO
N,,# of job logged out.
N is the count
of
the
remaining words in this message
(currently 10 octal).
flags"reserved
Bits
Symbol
Meaning
BO
SP%BAT
job is controlled
by
batch.
SP%DFS
Bl
spooling is deferred.
SP%ELO
B2
the job executed LGOUT.
SP%FLO
the job was forced
to
B3
logout.
If this bit is
on, check word 10 of the
IPCF message (gives code
of most
recent monitor
call error).
B3 will be
on only if the
job has
an
interrupt
to
be
handled
by
MEXEC(Mini-EXEC) .
B4
SP%OLO
the job was logged out
by another job.
Word 6
of
the
IPCF
message
contains
the job number
of the job that did
the
logout.
job connect time
job CPU time
TTY number
of
job at
logout
(-1
if
detached)
job number
of
the
job that did
the
logout
reserved
code of the most
recent monitor call
error

Release ownership of the previously created
job
whose
number
is
in AC3.
If this bit is on, it
overrides the setting of all other
bits
in ACl;
and
no change
is made to the job's status other
than the change in ownership.

3-84

TOPS-20 MONITOR CALLS
(CRJOB)
The format of the argument block
follows:

(whose address is given in AC2)

is as

Word

Symbol

Meaning

0

.CJNAM

Byte pointer to the user name string.

1

.CJPSW

Byte pointer to the password string.

2

.CJACT

5B2 + numeric account number or byte pointer to
account string.

3

.CJFIL

the
file
to be
Byte pointer to the name of
moved (by a GET call) into a process of the new
the
The new job must have read access to
job.
the
into which
file is
file.
The process
placed depends on the setting of B4(CJ%ETF) .

4

.CJSFV

Offset in the entry vector to use as the
start
address of the
file
to which word
.CJFIL
the
points.
This offset is
the
argument to
SFRKV call used to start the process.

5

.CJTTY

Terminal
designator
of
the
new
job's
controlling
terminal.
This terminal must be
assigned by the caller.
The terminal
is then
released and assigned to the new job.
If the
new job is to be
detached,
the
.NULIO
designator (377777) is given.

6

.CJTH1

Connect-time for new
job before
a
forced on it;
0 indicates no limit.

7

.CJACS

Address of a 16-word block whose contents are
to be loaded in the new job's ACs if a program
other than the Command
Language Processor
is
being run.

10

.CJEXF

Flag bits to be passed to the Command Language
Processor
in the top-level process of the new
job.
The bits are:

LGOUT

is

BO

Suppress
the herald printed
Command Language Processor.

Bl

Move
the
file
to which word
.CJFIL
points
into the process whose handle is
in the PRARG block (see below).

B2

Start the process at the offset
in
the
entry vector given in word .CJSFV.
This
process is started
after
the Command
Language Processor is initialized.

B3

Output the text printed when a
LOGIN
command
is given ( system messages, job
number,
or
terminal
number,
for
example) .

by

the

This word is copied
into
the PRARG argument
block passed to the Command Language Processor
(see below).

TOPS-20 Version 5

3-85

April 1982

I

TOPS-20 MONITOR CALLS
(CRJOB)
II

Word

Symbol

11

.CJPRI

Primary input and output designators for the
inferior processes of the new job.
These
designators must refer to device designators.
The Command Language Processor in the top-level
process of the new job executes an SPJFN call
to set these designators.

12

.CFCPU

Run-time limit for the new job.
When this
limit is reached, an interrupt is generated (by
a TIMER call), and the
Command
Language
Processor executes a LGOUT call for the new
job. A zero in this word means there is no
run-time limit on the job.

13

.CJCAM

Capability mask for the new job.
used only if CJ%CAM is set.

14

.CJSLO

PIO to which an IPCF message is to be sent when
the new job is logged out.

Meaning

This mask

is

When CRJOB creates a new job, it also creates the top-level process,
which is always a virgin process. Thus, an execute-only program can
be run as the top-level fork.
The CRJOB call causes other monitor calls to be executed, depending on
the particular function that is performed.
Any GTJFN and OPENF errors can occur when obtaining the specified
file.
Any SFRKV error can
specified file.

occur

when

starting

the

program

in

the

Any LOGIN and account validation errors can occur when logging in
the job.
CRJOB ERROR MNEMONICS:
C.RJBXl:

Invalid parameter or function bit combination

CRJBX2 :

Illegal for created job to enter MINI-EXEC

CRJBX4 :

Terminal is not available

CRJBXS:

Unknown name for LOGIN

CRJBX6 :

Insufficient system resources

3-86

TOPS-20 MONITOR CALLS
(CRLNM)

CRLNM

JSYS

502

Defines or deletes a logical name assignment.
Logical names are
used
to specify a set of default values for each field requested by a GTJFN
monitor call.
When a logical name is passed to the GTJFN call,
any
fields
not specified by the user are supplied from the fields defined
in the logical name definition.
(Refer to Section 2.2.2 and
to
the
INLNM and LNMST monitor
call descriptions for more information on
logical names.)
ACCEPTS IN ACI:

RETURNS

function code

AC2:

byte pointer to the logical name (A terminating colon
is optional in the logical name.)

AC3:

byte pointer to the logical name definition string

+1:

failure, error code in ACI

+2:

success, updated string pointer in AC3

I

The codes for the functions are as follows:
0

.CLNJI

delete one logical name from the job

1

.CLNSI

delete one logical name from the system

2

.CLNJA

delete all logical names from the job

3

.CLNSA

delete all logical names from the system

4

.CLNJB

create a logical name for the job

5

.CLNSY

create a logical name for the system

CRLNM ERROR MNEMONICS:

I

ARGX09:

Invalid byte size

CRLNXl:

Logical name is not defined

CRLNX2 :

WHEEL or OPERATOR capability required

CRLNX3 :

Invalid function

GJFX4:

Invalid character in file name

GJFX5 :

Field cannot be longer than 39 characters

GJFX6 :

Device field not in a valid position

GJFX7:

Directory field not in a valid position

GJFX8 :

Directory terminating delimiter is not preceded by
beginning delimiter

GJFX9:

More than one name field is not allowed

GJFXIO:

Generation number is not numeric

GJFXll:

More than one generation number field is not allowed

TOPS-20 Version 5

3-87

a

valid

April 1982

TOPS-20 MONITOR CALLS
(CRLNM)
GJFX12:

More than one account field is not allowed

GJFX13:

More than one protection field is not allowed

GJFX14:

Invalid protection

GJFX15:

Invalid confirmation character

GJFX22:

Insufficient system resources (Job Storage Block full)

GJFX31:

Invalid wildcard designator

3-88

TOPS-20 MONITOR CALLS
(CVHST)

CVHST

JSVS

276

Converts a host number to a primary name.
RESTRICTIONS:

for use with ARPANET only

ACCEPTS IN ACl:

destination designator for the ASCIZ string

AC2:
RETURNS

host number

+1:

failure
(Use the GETER call to obtain the error code.)

+2:

success, host name string returned to area designated
by ACI

CVHST ERROR MNEMONICS:
CVHSTl:

No string for that host number

3-89

TOPS-20 MONITOR CALLS
(CVSKT)

CVSKT

JSVS

275

Converts a local socket number to absolute form.
RESTRICTIONS:

for use with ARPANET only

ACCEPTS IN ACl:

JFN

RETURNS

+1:

failure, error code in ACI

+2:

success, absolute socket number in AC2

CVSKT ERROR MNEMONICS:
CVHSTl:

No string for that host number

CVSKXl:

Invalid JFN

CVSKX2 :

Local socket invalid in this context

3-90

TOPS-20 MONITOR CALLS
(DEBRK)

DEBRK

JSYS

136

Dismisses the software interrupt routine in progress and resumes the
process at the location specified by the PC stored in the priority
level table.
(Refer to Section 2.6.7.)
RETURNS

+1:

only if no software interrupt is currently
in
progress and if an ERJMP or ERCAL instruction follows
the DEBRK

Generates an illegal instruction interrupt on error conditions below.
DEBRK ERROR MNEMONICS:
DBRKX1:

No interrupts in progress

3-91

I

TOPS-20 MONITOR CALLS
(DELDF)

DELDF

I

JSYS

67

Reclaims disk space by expunging disk files that have been marked for
deletion with DELF. This call first checks to see that the user has
connect access to the directory.
The calling process must have
connect access to the directory to expunge files from it.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled.

ACCEPTS IN ACI:

BO(DD%DTF) delete temporary files

(;T) also

BI(DD%DNF) delete nonexistent files that are not
open

now

B2(DD%RST) rebuild the symbol table
B3(DD%CHK) check internal consistency of directory.
If an error occurs,
the symbol table
should be rebuilt.
If B2(DD%RST) is also
set,
it is ignored;
and the DELDF call
must be executed again with B2(DD%RST) set
to rebuild the symbol table.
AC2:
RETURNS

I

+1:

directory number
always

The directory number given in AC2 must be that of the user's connected
or logged-in directory unless the process has WHEEL or OPERATOR
capability enabled, or the process has connect access to the directory
being deleted.
If errors still occur after the symbol table is rebuilt,
the process
should restore the directory from magnetic tape; or the user should
request help from the operator.
When a file with archive status is deleted and expunged, DELDF sends
an IPCF message to GALAXY. This message contains all archive status
information, which includes tape information, as well as the present
file name,
the user who expunged the file,
and the time it was
expunged.
Generates an illegal instruction interrupt on error conditions below.
DELDF ERROR MNEMONICS:

I

ARGX26:

File is off line

DELDXl:

WHEEL or OPERATOR capability required

DELDX2:

Invalid directory number

DELFX2:

File cannot be expunged because it is currently open

DE LFX4:

Directory symbol table could not be rebuilt

TOPS-20 Version 5

3-92

April 1982

TOPS-20 MONITOR CALLS
(DELDF)

DELFX5 :

Directory symbol table needs rebuilding

DELFX6 :

Internal format of directory is incorrect

DELFX7:

FDB formatted incorrectly;

DELFX8:

FDB not found;

file not deleted

file not deleted

3-93

TOPS-20 MONITOR CALLS
(DELF)

DELF

JSYS

26

Deletes the specified disk file and, if the file is closed,
releases
the JFN.
The file
is not expunged immediately, but is marked for
later expunging either by the system or with the DELDF or LGOUT
monitor calls.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled.

ACCEPTS IN ACl:

BO(DF%NRJ) do not release the JFN.
Bl(DF%EXP) expunge the contents of the file.
This
also
deletes
the
FDB entry in the
directory.
BO(DF%NRJ)
and
Bl(DF%EXP)
cannot be set simultaneously.
B2(DF%FGT) expunge the file but do not deassign its
addresses. The process must have WHEEL or
OPERATOR capability enabled to set this
bit.
This bit should be set only by an
operator or system specialist to delete a
file that has a damaged or inconsistent
index block.
B3(DF%DIR) delete and expunge a directory file.
The
process
must
have WHEEL or OPERATOR
capability enabled to set this bit.
This
bit should be set only by an operator or
specialist to delete a bad directory.
B4(DF%ARC) allow a file with
deleted.

archive

status

to

be

B5(DF%CNO) delete and expunge the contents of the
file but preserve the file's name and FDB
as they were (with the exception of the
page count and the page table address).
Setting this bit causes the DELF to fail
if bit AR%NDL is set in word .FBBBT of the
FDB, or if a complete set of tape back-up
information is not in the FDB.
B18-B35
JFN of the file being deleted.
(DF%JFN)
RE'rURNS

+1:

failure, error code in ACI

+2:

success, JFN is released unless BO (DF%NRJ)
the file is open.

is

on

or

By setting BO(DF%NRJ), the user can delete multiple files by giving a
JFN to GNJFN that represents a group of files and processing each file
in the group.
The DELF call takes the
nondirectory device.

+1

return

3-94

if

the

JFN

is

assigned

to

a

TOPS-20 MONITOR CALLS
(DELF)
DELF ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX4 :

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DESX9:

Invalid operation for this device

DELFXI:

Delete access required

DELFX2 :

File cannot be expunged because it is currently opened

DELFX3 :

System scratch area depleted;

DELFX4:

Directory symbol table could not be rebuilt

DELFX5 :

Directory symhol table needs rebuilding

DELFX6 :

Internal format of directory is incorrect

DELFX7:

FDB formatted incorrectly;

DELFX8:

FDB not found;

DELFX9 :

File is not a directory file

DELFIO:

Directory still contains subdirectory

DLFXIO:

Cannot delete directory;

DLFXII:

Cannot delete directory file in this manner

DELXl2 :

File has no pointer to offline storage

DELXI3:

File is marked "Never Delete"

WHELXI:

WHEEL or OPERATOR capability required

TOPS-20 Version 5

I

file not deleted

file not deleted

file not deleted

file still mapped

3-95

I

April 1982

TOPS-20 MONITOR CALLS
(DELNF)

DELNF

JSYS

317

Deletes all but the specified number of generations of a disk file.
The files
are marked for deletion and are expunged at a later time,
either automatically by the system or explicitly with
the DELDF or
LGOUT call.
ACCEPTS IN ACl:

BO(DF%NRJ) do not release the JFN
B4(DF%ARC) allow a file with
deleted.

archive

status

to

be

B5(DF%CNO) delete and expunge the contents of the
file
but preserve the file's name and FDB
as they were (with the exception of the
page count and
the page table address).
Setting this bit causes the DELNF to fail
if bit AR%NDL is set in word .FBBBT of the
FDB or if a complete set of
tape backup
information is not in the FDB.
B18-B35
AC2:
RETURNS

JFN of the file being deleted

the number of generations to retain

+1:

failure, error code in ACI

+2:

success, with the number of files deleted in AC2

Starting at the file specified by the JFN, the DELNF call
the generation number,
first
retaining
the specified
generations before deleting the remaining generations.

decrements
number of

DELNF ERROR MNEMONICS:

I

I

DELXI3:

File is marked "Never Delete"

DESXI:

Invalid source/destination designator

DESX3 :

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DELFXI:

Delete access required

TOPS-20 Version 5

3-96

April 1982

TOPS-20 MONITOR CALLS
(DEQ)

DEC

JSYS

514

Removes a request: for a specific resource from
the queue associated
with that resource.
The request is removed whether the process has a
lock for the resource, or
is only waiting
in the queue for
the
resource.
This call can be used to remove any number of requests.
If one of the
requests cannot be dequeued, the dequeueing procedure continues until
all requests that: can be dequeued have been.
An error return is given
for
the last
request found that could not be dequeued.
The process
can then execute the ENQC call to determine the current status of each
request.
HowevE~r,
if the process attempts to dequeue more pooled
resources than it originally allocated, the error return is taken and
none of the pooled resources are dequeued.
Refer to the TOPS-20 Monitor Calls User's Guide for
description of the Enqueue/Dequeue facility.

an

overview

and

RESTRICTIONS:

When this call is used
in any section other
than
section zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

function code

AC2:
RETURNS

address of argument
.DEQDR function)

block

+1:

failure, error code in ACI

+2:

success

(required

only

for

the

The available functions are as follows:
Code

Meaning

Symbol

o

.DEQDR

Remove the specified requests from the queue.
This function
is the only one requiring an
argument block.

1

.DEQDA

Remove all requests for this process from the
queues.
This action is taken on a RESET or
LGOUT call.
The error return is taken if the
process has not given an ENQ call.

2

.DEQID

Remove all requests that correspond
to the
specified
request
identifier(ID).
This
function allows
the process to release a
class of locks in one call without itemizing
each lock in an argument block.
It is useful
when dequeueing
in one call the same locks
that were enqueued in one call.
To use
this
function,
the process places the 18-bit
request ID in AC2.

identical
to
The format of the argument block for function .DEQDR is
that given on the ENQ call.
(Refer
to
the ENQ monitor call
is not
description.) However, the .ENQID word of the argument block
used on a DEQ call and must be zero.

TOPS-20 version 5

3-97

April 1982

I

TOPS-20 MONITOR CALLS
(DEQ)

DEQ ERROR MNEMONICS:
DESX5 :

File is not open

ENQXl:

Invalid function

ENQX2:

Level number too small

ENQX3 :

Request and lock level numbers do not match

ENQX4 :

Number of pool and lock resources do not match

ENQX6 :

Requested locks are not all locked

ENQX7:

No ENQ on this lock

ENQX9 :

Invalid number of blocks specified

ENQXIO:

Invalid argument block length

ENQXll:

Invalid software interrupt channel number

ENQX13 :

Indirect or indexed byte pointer not allowed

ENQX14:

Invalid byte size

ENQX15 :

ENQ/DEQ capability required

ENQX16:

WHEEL or OPERATOR capability required

ENQX17 :

Invalid JFN

ENQX18:

Quota exceeded

ENQX19:

String too long

ENQX20:

Locked JFN cannot be closed

ENQX21:

Job is not logged in

DESX8:

File is not on disk

3-98

TOPS-20 MONITOR CALLS
(DEVST)

DEVST

JSYS

121

Translates the given device designator
to
its corresponding ASCIZ
device
name
string.
The
string
returned contains only the
alphanumeric device name;
it does not contain a colon.
ACCEPTS IN ACl:
AC2:
RETURNS

destination designator
device designator

+1:

failure, error code in ACI

+2:

success, updated string pointer in ACl,

The STDEV monitor call can be used
corresponding device designator.

to

translate

a

if pertinent

string

to

its

DEVST ERROR MNEMONICS:
DEVXl:

Invalid device designator

DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3 :

JFN is not assigned

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-99

I

April 1982

TOPS-20 MONITOR CALLS
(DFIN)

DFIN
Inputs a
double-precision,
necessary.

JSYS

234

floating-point

number,

rounding

if

ACCEPTS IN ACl:

source designator

RETURNS

+1:

failure, error code in AC4 and updated string pointer
in ACl, if pertinent.

+2:

success, double-precision, floating-point
number
AC2 and AC3 and
updated string pointer in ACl,
pertinent.

I

DFIN ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3 :

JFN is not assigned

DESX5 :

File is not open

FLINXl:

First character is not blank or numeric

FLINX2:

Number too small

FLINX3:

Number too large

FLINX4:

Invalid format

3-100

in
if

TOPS-20 MONITOR CALLS
(DFOUT)

DFOUT

JSVS

235

Outputs a double-precision, floating-point number.
ACCEPTS IN ACl:

RETURNS

destination designator

AC2:

first word of
a
normalized,
floating-point number

double-precision,

AC3:

second word of a
normalized,
floating-point number

double-precision,

AC4:

format control word.

I

(Refer to Section 2.9.1.2.)

+1:

failure, error code in AC4 and updated string pointer
in ACl, if pertinent.

+2:

success, updated string pointer in AC1, if pertinent.

DFOUT ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5 :

File is not open

FLOTXl:

Column overflow in field 1 or 2

FLOTX2 :

Column overflow in field 3

FLOTX3 :

Invalid format specified

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-101

I

April 1982

TOPS-20 MONITOR CALLS
(DIAG)

DIAG

JSYS

530

Reserves a channel and either a single device or all devices attached
to that channel.
This call is also used to release the channel and
its devices. When the request is made, no new activity is initiated
on the requested channel, and the monitor waits for current activity
on all devices connected to the channel to be completed.
When the
channel becomes idle,
the process requesting the channel continues
running.
The DIAG JSYS can also be used to get and release memory. The .DGGEM
function is used by the system program TGHA for performing its spare
bit substitution.
RESTRICTIONS:

requires WHEEL, OPERATOR, or MAINTENANCE capabilities
enabled.

ACCEPTS IN ACl:

negative length of the argument block in the left
half, and address of the argument block in the right
half.

RETURNS

+1:

failure, error code in ACI

+2:

success

The available functions are as follows:
Function
1

Meaning

Symbol
.DGACU

Assign the channel and a single device.
Release
the device after the time limit specified.
Argument block:
Word

Contents

o

function code
device address
time limit in milliseconds

1
2
2

.DGACH

Assign the channel and all devices.
Argument block:
Word

Contents

o

function code
device address

1

3

.DGRCH

Release the channel and all assigned devices.
Argument block:
Word

Contents

o

function code
device address

1

3-102

TOPS-20 MONITOR CALLS
(DIAG)
Function
4

Symbol
. DGSCP

Meaning
Set up the channel program.
The data transfer can
be up to 50 pages.
This function locks in memory
the user page to which the channel
control word
points.
This function also causes the system to
update
the
Exec
Process
Table
location
corresponding
to the channel with the appropriate
channel control word (physical address).
Argument block:
Word

Contents

o
3

function code
device address
channel control word 0
channel control word 1

n+2

channel control word n

1
2

5

.DGRCP

Release the channel program.
The page
for
the
specified channel,
to which page
the channel
control word points, is unlocked.
This function
is not
required
before specifying a new channel
program.
ArgumE~nt

Word

Contents

o

function code
device address

1
6

.DGGCS

block:

Return the status of the channel.
The argument
block contains the logout area for the channel.
Argument block:
Word

Contents

o

function code
device address
4-word channel logout area

1
2-5

100

. DGGEM

Get memory (for TGHA) .
ArgumE~nt

block:

Word

Contents

o

function code
first page in user address space
first physical memory page
number of pages
user address of
AR/ARX
parity
routines

1
2

3
4

3-103

trap

I

TOPS-20 MONITOR CALLS
(DIAG)
Function
100

Symbol
.DGGEM

Meaning
(Cont.)

Upon successful return,
1.

TOPS-20 has requested that all of
the
front
ends refrain from accessing common memory.

2.

The hardware PI system has
no scheduling can occur.

3.

The time base and
turned off.

4.

All DTE byte transfers have been completed.

5.

All RH20 activity has ceased.

6.

The designated pages of
the process address
space
have
been set up
to address
the
designated physical memory.
Note that this is
not
the same
as
requesting
the pages with
PLOCK.
With the get memory function, the data
in
the
physical memory pages have been
retained,
and ownership of the pages
is
unchanged.

7.

The CSTO entries for each of
the
physical pages have been saved
follows:
A
B
C

101

.DGREM

this function accomplishes the following:

been

interval

timer

turned

off;

have

been

designated
and set as

The age is set to the present age of
the
requesting process.
The process use field is set to all ones.
The modified bit is set to one.

8.

The entire address
space of
the
requesting
process has been locked in memory.
(Actually,
only the pages that existed at the time of the
DIAG call are locked.
Therefore, the prucess
must ensure that all of
the pages
it needs
exist and are private when DIAG is executed.)

9.

The monitor has set up proper dispatch if TGHA
specified an AR/ARX trap address.

Release memory

(for TGHA)

Argument block:
Word

Contents

o

function code

3-104

TOPS-20 MONITOR CALLS
(DIAG)
Function
102

Meaning

Symbol

Inform the monitor
that a device
previously
unknown
to
it
is now available for use (is now
online).
This
functon
is used with
devices
interfaced
through
the DX20
(TX01, TX03, TX05,
TU70, or TU72).
Argument block:

.DGPDL

Word

Contents

0
1
2
3

function code
primary channel number
primary unit number
if
number
(-1
primary controller
controller)
alternate channel number
alternate unit number (should be same
primary unit number)
if
number
(-1
alternate controller
controller)

4
5
6

no
as
no

The device address given in some of
the argument blocks
is a
machine-dependent specification for
the channel
and device to be
assigned.
The devices that can be assigned must be attached
to the
RH20 controller
and must be mounted by a process with either WHEEL,
OPERATOR, or MAINTENANCE capability enabled.
The format of the device
address word is:
29 30
35
o
2 3
9 10
23 24
!============:===========================================!

!

address
type

!

device
code

O!

unit

!

subunit

!

!============:===========================================!
DIAG ERROR MNEMONICS:
DIAGXl:

Invalid function

DIAGX2 :

Device is not assigned

DIAGX3:

Argument block too small

DIAGX4:

Invalid device type

DIAGX5 :

WHEEL, OPERATOR, or MAINTENANCE capability required

DIAGX6:

Invalid channel command list

DIAGX7:

Illegal to do I/O across page boundary

DIAGX8:

No such device

DIAGX9:

Unit does not exist

DIAGIO:

Subunit does not exist

DIAGll:

Device is already on-line

3-105

TOPS-20 MONITOR CALLS
(DIBE)

DIBE

JSYS

212

Dismisses the process until the designated file input buffer is empty.
ACCEPTS IN AC1:

file designator

RETURNS

always

+1:

Returns immediately
terminal.

if

the

designator

is

not

associated

The DOBE monitor call can be used to dismiss
designated file output buffer is empty.

the

process

with

until

a
the

Generates an illegal instruction interrupt on error conditions below.
DIBE ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX 3:

JFN is not assigned

DESX5 :

File is not open

DEVX2 :

Device already assigned to another job

T'I'YXO 1 :

Line is not active

3-106

TOPS-20 MONITOR CALLS
(DIC)

Die
Deactivates the specified
Section 2.6.1.)
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

JSVS

software

133

interrupt

channels.

(Refer

to

process handle
36-bit word
Bit n means deactivate channel n
always

Software interrupt requests to deactivated channels are ignored except
for
interrupts generated on panic channels.
Panic channel interrupts
are passed to the closest superior process that has
the
specific
channel enabled.
The AIC monitor call is used to activate specified software
channels.

interrupt

Generates an illegal instruction interrupt on error conditions below.
DIC ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

3-107

TOPS-20 MONITOR CALLS
(OIR)

DIR

JSYS

130

Disables the software interrupt system for a process.
ACCEPTS IN ACl:

process handle

RETURNS

always

+1:

If software interrupt requests are generated while the interrupt
system is disabled, the requests are remembered and take effect when
the interrupt system is reenabled unless an intervening CIS call is
executed.
However,
interrupts on panic channels will still be
generated even though the system is disabled.

I

In addition, if the CTRL/C terminal code is assigned to a channel,
it
will still generate an interrupt that cannot be disabled with a DIR
call. CTRL/C interr~pts can be disabled by deactivating the channel
to which the code is assigned or by monitor action.
The EIR monitor call can be used
system for a process.

to

enable

the

software

interrupt

Generates an illegal instruction interrupt on error conditions below.
DIR ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

F'RKHX8:

Jllegal to manipulate an execute-only process

3-108

TOPS-20 MONITOR CALLS
(DIRST)

DIRST

JSYS

41

Translates the specified 36-bit user or directory number to its
corresponding string and writes it to the given destination. When a
user number is given, the string returned is the corresponding user
name without any punctuation. When a directory number is given, the
string returned is the corresponding structure and directory name
including punctuation (structure:name.typ.geniattributes
One or more fields of the specification can be defined
by a
logical
name.
(Refer
to Section 2.2.2.) If any fields are omitted from the
specification, the system will provide the values shown below.
device

connected structure

directory

connected directory
NOTE
If
neither
device
nor
directory
is
specified,
the default
is DSK:,
not the
user's connected directory.
If
either
device or directory is specified, the other
is the user's connected structure/directory.

name
type
generation
protection
account

no defaulti
this field must be specified
null
highest existing number if the
file
is an
input
file.
Next higher number if the file is an output
file.
protection of the next lower generation or
for
new
files, protection as specified in the directory.
account specified when user
logged
in,
unless
changed by the CACCT or SACTF call.

The JFNS monitor call can be used to obtain the
file
specification
string associated with a given JFN.
The flag
bits that can be
specified in ACI are described as follows.

3-179

TOPS-20 MONITOR CALLS
(GTJFN Short Form)
GTJFN Flag Bits
Bit

Symbol

o

GJ%FOU

The file given is to be assigned
the
next higher generation number.
This
bit indicates that a new version of a
file
is to be created, and is usually
set if the file is for output use.

1

GJ%NEW

The file specification given must
not
refer
to an existing file (the file
must be a new file).
This bit has no
effect on a parse-only JFN.

2

GJ%OLD

The file
specification given
must
refer
to an existing file.
This bit
has no effect on a parse-only JFN.

3

GJ%MSG

One of the appropriate messages is to
be
printed
after
the
file
specification is obtained,
if
the
system is performing
recognition on
the file specification and
the user
ends his input by typing an ESC.

I
I

Meaning

!NEW FILE!
!NEW GENERATION!
!OLD GENERATION!
!OK! if GJ%CFM (bit 4) is off
!CONFIRM! if GJ%CFM (bit 4) is on
4

GJ%CFM

Confirmation from
the user will be
required
(if GJ%FNS is on) to verify
that the file
specification obtained
is correct.
(See below for the valid
confirmation characters.)

5

GJ%TMP

The file
specified
temporary file.

6

GJ%NS

Only the first
specification in a
multiple logical name assignment is to
be searched for
the file
( do not
search beyond
the first
name
in a
multiple logical name assignment).

7

GJ%ACC

The JFN specified
is not
to
be
accessed by- inferior processes in this
job.
However,
another process can
access
the
file
by acquiring a
different JFN.
To prevent the
file
from
being
accessed
by
other
processes, the user's program should
set OF%RTD(B29) in the OPENF call.

8

GJ%DEL

Files marked as deleted
are to be
considered by the system when it is
searching for a file to assign to the
JFN.

TOPS-20 Version 5

3-180

is

to

be

a

April 1982

TOPS-20 MONITOR CALLS
(GTJFN Shor.t Form)
Bit

Symbol

Meaning

9-10

GJ%JFN

These bits are off in the
of the GTJFN call.

11

GJ%IFG

The file
specification
given
is
allowed to have one or more of its
fields specified with
a
wildcard
c h a r act e r
(* 0 r %).
Th is bit i sus e d
to process a group of files and is
generally used for input files.
The
monitor verifies that at least one
value
exists for each field that
contains a wildcard and assigns the
JFN to the first file in the group.
The monitor also verifies that fields
not containing wildcards represent a
new or old file according to the
setting of GJ%NEW and GJ%OLD. The
GNJFN call can then be used to obtain
the next file in the group.
(Refer to
Section 2.2.3 for more information on
wildcard
characters
in
file
specifications.)

12

GJ%OFG

The JFN is to be associated with the
given file specification string only
and not to the actual file.
The
string may contain wildcard characters
(* or !~) in one or more of its fields.
It is checked for correct punctuation
between fields, but is not checked for
the validity of any field.
This bit
allows a JFN to be associated with a
file specification even if the file
specification does not refer to an
actual file.
The JFN returned cannot
be used to refer to an actual file
(e.g., cannot be used
in an OPENF
call) but can be used to obtain the
original input string (via JFNS). The
fields in this string can then be used
in a GTJFN-long form call as program
defaults.
However,
if the original
string contains the temporary file
attribute (iT), this attribute is not
"remembered" and thus is not returned
on the JFNS call even though the bit
indicating temporary status (JS%TMP)
is set. All other fields
(including
the protection and account fields) can
be returned by JFNS.

3-181

short

form

TOPS-20 MONITOR CALLS
(GTJFN Short Form)
Bit

Symbol

12

GJ%OFG
(Cont. )

When both Bll(GJ%IFG) and
B12(GJ%OFG)
are on,
the GTJFN call parses
the
specification
given,
verifying
the
existence of each
field.
When
a
wildcard character appears in a field,
the GTJFN call checks the
remaining
fields
for
correct punctuation and
returns
a
JFN
for
the
file
specification string only.
That is,
once a wildcard character is seen, the
action taken
is
identical
to
that
taken when only B12(GJ%OFG)
is set.
If no wildcard
character appears in
the string, the action iu the same as
if both bits were off.

13

GJ%FLG

Flags are to be returned in the
left
half of ACI on a successful return.

14

GJ%PHY

Job-wide logical names (those defined
by the user) are to be ignored by the
monitor for this call.

15

GJ%XTN

This bit is off in the short
the G'I'JFN call.

16

GJ%FNS

The contents of AC2
interpreted as follows:

17

GJ%SHT

Meaning

are

form

of

to

be

1.

If this bit is on, AC2 contains an
input JFN in the left half and an
output JFN in the right half.
The
input JFN
is used to obtain the
file
specification
to
be
associated
with
the JFN.
The
output JFN is used to indicate the
destination for printing the names
of any fields
being
recognized.
To omit either JFN, specify .NULIO
(377777) •

2.

If this bit is off, AC2 contains a
byte pointer to an ASCIZ string in
memory that specifies the file
to
be associated with the JFN.

This bit must be on for the short form
of the GTJFN call.

3-182

TOPS-20 MONITOR CALLS
(GTJFN Short Form)
Bit

Meaning

Symbol

18-35

The generation number
of
the
file
(between 1 and 377777) or one of the
follovling:
O(.GJDEF)

to indicate that the next
higher generation number
of the file is to be used
if GJ%FOU (bit 0) is on,
or to indicate that
the
highest
existing
generation number of the
file
is to be used if
GJ%FOU
is off.
(This
value
is usually used in
this field.)

-1 (. GJ"NHG)

to indicate that the next
higher generation number
of the file is to be used
if no generation number
is supplied.

- 2 ( • GJrLEG)

to
indicate
that
the
lowest
existing
generation number of
the
file is to be used.

-3(.GJALL)

to
indicate
that
all
generation numbers (*) of
the file are to be used
and that the JFN is to be
assigned
to the
first
file
in the group.
(Bit
GJ%IFG must be set.)

The GTJFN monitor call always reads the
terminating character
after
the
file
specification string.
(This character can be obtained by
executing
the BKJFN call
followed
by a
BIN call.)
The
valid
terminating characters are:
line feed
CTRL/L
CTRL/Z
carriage return
exclamation point
double quotation marks
number sign
ampersand
single quotation mark

left parenthesis
right parenthesis
plus sign
comma
slash
equals sign
at sign (@)
space
ESC

All
of
these characters except for
ESC are also
confirmation
characters
(refer
to bit GJ%CFM above)
and are called confirming
terminators.
If a confirming terminator is typed after the string,
a
confirmation message will not be typed to the user nor will the user
be required to confirm the string obtained, regardless of the
setting
of GJ%MSG and GJ%CFM.
On a successful return, the following flags are
returned in the left half of ACI if flag bit GJ%IFG, GJ%OFG, or GJ%FLG
was on in the call.

3-183

TOPS-20 MONITOR CALLS
(GTJFN Short Form)
Bits Returned on Successful GTJFN Call
Bit

Symbol

o

GJ%DEV

The
device
specification
characters.

I

GJ%UNT

The
unit
field
of
the
file
specification
contained
wildcard
characters.
This bit will
never
be
set because wildcard
characters are
not allowed in unit fields.

2

GJ%DIR

The directory
specification
characters.

3

GJ%NAM

The filename
specification
characters.

4

GJ%EXT

The file
type
specification
characters.

5

GJ%VER

The generation number
field
of
the
file
specification contained wildcard
characters.

6

GJ%UHV

The file
used
has
the
highest
generation number because a generation
number of 0 was given in the call.

7

GJ%NHV

The file
has
used
the next higher
generation number because a generation
number of 0 or -1 was given
in the
call.

8

GJ%ULV

The
file
has
the
used
lowest
generation number because a generation
number of -2 was given in the call.

9

GJ%PRO

The protection field
of
specification was given.

the

file

10

GJ%ACT

The account
field
of
specification was given.

the

file

11

GJ%TFS

The file
specification
temporary file.

12

GJ%GND

Files marked
for
deletion were not
considered when assigning JFNs.
This
bit is set if GJ%DEL was not set
in
the call.

17

GJ%INV

Invisible files were not considered
when assigning JFNs.
This bit is
always on for the short form GTJFN.

Meaning

3-184

the
file
wildcard

field
of
contained

field
of
contained

the
file
wildcard

field
of
contained

the
file
wildcard

field
of
contained

the
file
wildcard

is

for

a

TOPS-20 MONITOR CALLS

(GTJFN Short Form)
GTJFN ERROR MNEMONICS:
GJFXl:

Desired JFN invalid

GJFX2 :

Desired JFN not available

GJFX3 :

No JFNs available

GJFX4:

Invalid character in filename

GJFX5 :

Field cannot be longer than 39 characters

GJFX6 :

Device field not in a valid position

GJFX7:

Directory field not in a valid position

GJFX8 :

Directory terminating delimiter is not preceded by
beginning delimiter

GJFX9:

More than one name field is not allowed

GJFXIO:

Generation number is not numeric

GJFXll:

More than one generation number field is not allowed

GJFX12:

More than one account field is not allowed

GJFX13:

More than one protection field is not allowed

GJFX14:

Invalid protection

GJFX15 :

Invalid confirmation character

GJFX16:

No suc i:) device

GJFX17:

No

GJFX18:

No suc::"! f i 1 ename

GJFX19:

No such file type

GJFX20:

No such generation number

GJFX21:

File was expunged

GJFX22:

Insufficient system resources (Job Storage Block full)

GJFX23:

Exceeded maximum number of files per directory

GJFX24:

File not found

GJFX27:

File already exists (new file required)

GJFX28:

Device is not on-line

GJFX30:

Account is not numeric

GJFX31:

Invalid wildcard designator

GJFX32:

No files match this specification

GJFX33:

Filename was not specified

suc~

a

directory name

3-185

valid

TOPS-20 MONITOR CALLS
(GTJFN Short Form)

I

GJFX34:

Invalid character "?" in file specification

GJFX35:

Directory access privileges required

GJFX36:

Internal format of directory is incorrect

GJFX37:

Input deleted

GJFX38:

File not found because output-only device was specified

GJFX39:

Logical name loop detected

GJFX40:

Undefined attribute in file specification

GJFX41:

File name must not exceed 6 characters

GJFX42:

File type must not exceed 3 characters

GJFX43:

More than one ;T specification is not allowed

GJFX44:

Account string does not match

GJFX45:

Illegal to request
attribute

GJFX46:

Attribute value is required

GJFX47:

Attribute does not take a value

GJFX48:

GTJFN input buffer is empty

GJFX49:

Invalid attribute for this device

GJFX51:

Byte count too small

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

DESX9:

Invalid operation for this device

STPX09:

Prior structure mount required

TOPS-20 Version 5

multiple

3-186

specifications

for

the

same

April 1982

TOPS-20 MONITOR CALLS
(GTJFN Long Form)

GTJFN

JSYS

20

Returns a JFN for the specified file.
Accepts the specification for
the file
from both a string in memory and from a file.
If both are
given as arguments, the string is used first, and
then the file
is
used
if more fields are needed to complete the specification.
This
form also allows the program to specify nonstandard values to be used
for omitted fields and to request the assignment of a specific JFN.
ACCEPTS IN ACI:

AC2:
RETURNS

a in the left half, and address of the beginning of
the argument table in the caller's address space in
the right half
byte pointer to ASCIZ file
specification
the caller's address space, or a if none

string

in

+1:

failure, error code in ACI

+2:

success, flags in the left half of ACl, and the JFN
assigned
in the right half of ACI.
(This word is
called an indexable file handle and is given to the
GNJFN call as an argument.) Updated string pointer in
AC2, if pertinent.

All I/O errors can occur.
These errors cause software
interrupts
process terminations, and only a single return (+1) is given.

or

The format of the argument table specified by the right half of ACI is
described below. Words a through 10 (.GJGEN-.GJJFN) must be supplied
in the long form of the GTJFN call.
The remaining words are optional,
and if they are supplied, B15(GJ%XTN) of word .GJGEN must be on.
Word

Symbol

Meaning

a

.GJGEN

Flag bits in the left half and generation
in the r igh thaI f.
(See below.)

1

.GJSRC

Input JFN in the left half and output JFN
in the
right half.
To omit either JFN, specify .NULIO

number

(377777) .
2

.GJDEV

Byte pointer to ASCIZ string
that
specifies the
default device to be used when none is given.
If
this word is 0,
the user's connected structure
will be used.

3

.GJDIR

Byte pointer to ASCIZ string that specifies the
default directory to be used when none is given.
The string should not include brackets around
the
name.
If this word is 0, the user's connected
will be used.

4

.GJNAM

directory

Byte pointer to ASCIZ string
that specifies the
default filename
to be used when none is given.
If this word is 0, either the string or the
input
JFN must supply the filename.

3-187

I

TOPS-20 MONITOR CALLS
(GTJFN Long Form)
Word

Symbol

Meaning

5

.GJEXT

Byte pointer to ASCIZ string that specifies the
default file type to be used when none is given.
If this word is 0, the null file type will be
used.

6

.GJPRO

Byte pointer to ASCIZ string that specifies the
default protection to be used when none is given.
If this word is 0,
the default protection as
specified in the directory or the protection of
the next lower generation will be used.

7

.GJACT

Byte pointer to ASCIZ string that specifies the
default account to be used when none is given.
If
this word is 0, the user's LOGIN account
(unless
changed) will be used.

10

.GJJFN

The JFN to associate with the file specification
if flag GJ%JFN is set in word 0 (.GJGEN) of the
argument block.

11

.GJF2

Extended argument block if B15(GJ%XTN)
is on in
the left half of .GJGEN. This word contains a
second group of flags in the left half and the
count of the number of words following this word
in the argument block in the right half.
The
flags in the left half specify additional control
over the GTJFN process. The following flags are
defined:
BO(Gl%RND) Return to the caller if the filename
buffer becomes empty, and the user
attempts to delete a character.
This
can occur if the user, when giving the
filename, types a CTRL/U or types a
DELETE or CTRL/W and there are no more
characters in the buffer.
B2(Gl%NLN) Filenames cannot be longer than
6
characters and file types cannot be
longer than 3 characters.
In addition,
the
generation
number,
temporary
status, protection, and account fields
cannot be specified in the string or
the input data.
B3(Gl%RCM) Return the confirmation message to the
caller by placing it in the destination
buffer.
B4(Gl%RIE) Return to the caller if the input
buffer becomes empty, and the user
attempts to delete a character.
B5(Gl%IIN) Files marked as invisible are to be
considered by the system when it is
searching for a file to assign to the
JFN.

3-188

TOPS-20 MONITOR CALLS
(GTJFN Long Form)
Word
11

Symbol
.GJF2
(Cont.)

Meaning
B6(Gl%SLN) Prohibit
the
expansion
of
logical
names.
If ,
for example,
user DBELL
defines
logical
name
ME:
to
be
PS:

TOPS-20 MONITOR CALLS
(IIC)

lie

JSVS

132

Initiates software interrupts on the specified channels in a
(Refer to Section 2.6.)
ACCEPTS IN AC1:
AC2:

RETURNS

+1:

process.

process handle
36-bit word
Bit n on means
channel n.

initiate

a

software

interrupt

on

always

Generates an illegal instruction interrupt on error conditions below.
IIC ERROR MNEMONICS:
FRKHX1:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8 :

Illegal to manipulate an execute-only process

3-209

TOPS-20 MONITOR CALLS
(INLNM)

INLNM

JSVS

503

Returns a logical name that is defined either for this job or for
the
system.
(Refer to Section 2.2.2 and CRLNM and LNMST monitor calls.)
ACCEPTS IN ACI:
AC2:
RETURNS

function code in the left half, and index into
table of defined logical names in the right half
byte pointer to the string for
name

storing

+1:

failure, error code in ACl

+2:

success, updated string pointer in AC2

the

the

logical

The available functions are:
Code

Symbol

Meaning

o

.INLJB

List the logical names defined for this job

1

. INLSY

List the logical names defined for the system

INLNM ERROR MNEMONICS:
INLNXI:

Index is beyond end of logical name table

INLNX2 :

Invalid function

3-210

--

TOPS-20 MONITOR CALLS
(JFNS)

JFNS

JSYS

30

Returns the file specification currently associated with the JFN.
ACCEPTS IN ACl:

RETURNS

destination designator where the ASCIZ string
be written

is

to

AC2:

indexable file handle (refer to GTJFN), or pointer to
string

AC3:

format control bits to be
str ing, or 0

AC4:

byte pointer to string
specification attribute

+1:

used

when

containing

returning
prefix

of

the
file

always, with updated string pointer, if pertinent, in
ACI

AC2 can have one of two formats, depending on B26(JS%PTR) in AC3. The
first format is a word with either 0 or the flag bits returned from
GTJFN in the left half and the JFN in the right half. When the left
half is 0, the string returned is the exact specification associated
with the JFN.
If the given JFN is associated only with a file
specification
(i.e., it was obtained with B12(GJ%OFG) on in the GTJFN
call), the string returned contains null fields for nonexistent fields
or fields containing wildcards, and actual values for existent fields.
When the left half is nonzero, the string returned contains wildcard
characters for appropriate fields and 0, -1, or -2 as a generation
number if the corresponding bit is on in the call.
The second format (allowed only if B26(JS%PTR) of AC3 is on)
is a
pointer to the string to be returned. This string is one field of a
file specification. The field is determined by the first nonzero
3-bit field in AC3 or by the setting of B27(JS%ATR) or B28(JS%ATl) in
AC3.
For example, if bits 6-8 (JS%NAM) of AC3 are nonzero,
then the
string is interpreted as a filename field.
If B27(JS%ATR) is on, the
string is interpreted as a file specification
attribute.
If
B28(JS%ATl)
is on, the string is concatenated to the string to which
AC4 points, and a colon is inserted between the two strings.
In all
cases,
the string is output to the destination designator, and the
appropriate punctuation is added.
AC3 contains control bits for formatting the string being returned.
BO-B20 are divided into 3-bit bytes, each byte representing a field in
the file specification. The value of the byte indicates the output
for that field.
The values are:

o
1
2

(. JSNOF)
(. JSAOF)
(. JSSSD)

do not output this field
always output this field
suppress this field if it is the system default

The bits that can be set in AC3 are as follows:
BO-B2 (JS%DEV;
B3-B5 (JS%DIR:I
B6-B8(JS%NAM)
B9-Bll(JS%TYP)
B12-B14(JS%GEN)

output
output
output
output
output

for
for
for
for
for

device field
directory field
filename field ( 2 is illegal)
file type field ( 2 is illegal)
generation number field

3-211

TOPS-20 MONITOR CALLS
(JFNS)

I

BO-BI4(JS%SPC)

output for all file specification fields named
above.
This field should have the same bits set
as would be set in the fields above.
(See
B35(JS%PAF) below.)
BI5-BI7(JS%PRO) output for protection field
BI8-B20(JS%ACT) output for account field
B21(JS%TMP)
return iT if appropriate
B22(JS%SIZ)
return size of file in pages
B23(JS%CDR)
return creation date
return date of last write
B24(JS%LWR)
B25(JS%LRD)
return date of last reao
B26(JS%PTR)
AC2 contains pointer to the string being returned
B27 (JS%ATR)
return
file
specification
attributes
if
appropriate
B28(JS%ATI)
return the specific specification attribute whose
prefix is indicated by the strLH:J to which AC4
points. This bit is used when a program is
processing attributes one at a time.
If JS%ATR
is also set, all attributes will be returned
(WHEEL capabilities are required to receive the
password). See the description of the long-form
GTJFN for a list of file attributes.
B29(JS%OFL)
return the "OFFLINE" attribute
B32(JS%PSD)
punctuate the size and date fields
B33 (JS%TBR)
tab before all fields returned, except for first
field
B34(JS%TBP)
tab before all fields that may be returned (i.e.,
fields whose value is given as 1 or 2), except
for first field
B35(JS%PAF)
punctuate all fields from device through iT

If B32-B35 are 0, punctuation between fields is not used.
If AC3 is 0, the string is output in the format
dev:name.typ.geni T
The temporary attribute
(iT)
is not returned if the JFN is a
parse-only JFN (refer to GJ%OFG in the GTJFN description) or the file
is not temporary.
The punctuation used on each field is shown below.
dev:name.typ.geniattribute
,size,creation date,write date,read date
The GTJFN or GNJFN monitor call is used to
given file specification string.

associate

a

JFN

with

a

Generates an illegal instruction interrupt on error conditions below.
JFNS ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3 :

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

TOPS-20 Version 5

3-212

April 1982

TOPS-20 MONITOR CALLS
(JFNS)

lOXII:

Quota

lOX34:

Disk fu11

lOX35 :

Unable to allocate disk - structure damaged

I

e~(ceeded

TOPS-20 Version 5

3-213

April 1982

TOPS-20 MONITOR CALLS
(KFORK)

KFORK

JSYS

153

Kills one or more processes. When a process is killed, all private
memory acquired by the process and its Process Storage Block are
released. Also, any JFNs the process has created are released, and
any terminal interrupt assignments that were acquired from another
process are passed back.
(Note that because the process is deleted
asynchronously, a page of a file mapped into a lower process may not
be unmapped before the KFORK call returns.)
ACCEPTS IN ACl:

process handle

RETURNS

always, -with unless the current
kill itself

+1:

proces~;

attempts

to

The KFORK call will not release a process handle that identifies a
process already killed by another process.
In this case, the RFRKH
call must be used to release the handle.
The CFORK monitor call can be used to create an inferior process.
Generates an illegal instruction interrupt on error conditions below.
KFORK ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

KFRKXl:

Illegal to kill top level process

KFRKX2 :

Illegal to kill self

3-214

TOPS-20 MONITOR CALLS
(LGOUT)

LGOUT

JSVS

3

Kills the specified
job and
appends an accounting
entry to
the
accounting data
file.
However, no entry is appended if the job was
never logged in (i.e., a CTRL/C was typed, but no login occurred).
RESTRICTIONS:

some functions require WHEEL or OPERATOR capabilities
enabled

ACCEPTS IN ACl:

number of the job to be logged out,
current job

RETURNS

+1:

failure, error code in ACI

+2:

success

or

-1

for

the

When a specific job number is given in ACl, it must refer to either
a
PTY
job controlled
by the current job or a job logged in under the
same user name as the current job.
Otherwise, to give a specific
job
number,
the process must have WHEEL or OPERATOR capability enabled.
An argument of -1 must be given if the current
job wishes
to
kill
itself
(i.e.,
the job number given cannot be the same as the current
job).
Note that this monitor call does not return if the argument
in
ACI is -1.
The LGOUT monitor call outputs the time used (both CPU and
console),
the
job number,
and the current date and time.
This information is
output on the terminal to which the job being logged out is attached.
LGOUT ERROR MNEMONICS:
LOUTXl:

Illegal to specify job number when logging out own job

LOUTX2 :

Invalid job number

LOUTX3 :

WHEEL or OPERATOR capability required

LOUTX4:

LOG ca?ability required

LOUTX5:

Illegal to log out job 0

3-215

TOPS-20 MONITOR CALLS
(LNMST)

LNMST

JSVS

504

Translates a logical name to its original definition
string.
(Refer
to Section 2.2.2 and the CRLNM and INLNM monitor calls d(~scriptions.)
ACCEPTS IN ACl:

I
I
RETURNS

function code

AC2:

pointer to the logical name.
The logical
not contain a terminating colon.

AC3:

pointer to the string where the original logical name
definition
is to be written.
The name returned
includes a terminating colon.

+1:

failure, error code in ACI

+2:

success, updated string pointer in AC3

name

The codes for the functions are as follows:

a
1

.LNSJB
.LNSSY

Obtain the job-wide definition of the logical name.
Obtain the system definition of the logical name.

LNMST ERROR MNEMONICS:
GJFX22:

Insufficient system resources

LNSTX1 :

No such logical name

LNSTX2 :

Invalid function

3-216

(Job Storage Block full)

must

TOPS-20 MONITOR CALLS
(LOGIN)

LOGIN

JSYS

1

Logs a job into the system.
Useful
for
terminal on which a CTRL/C has been typed.

logging

in

from

an

idle

RESTRICTIONS:

When this call is used
in any section other
than
section zero,
one-word global byte pointGrs used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

36-bit user number under which user will log in

RETURNS

AC2:

pointer to beginning of password string

AC3:

account number in bits
3-35
if bits 0-2 are
5.
Otherwise contains a pointer to an account string.
If a null byte is not seen, the string is terminated
after 39 characters are processed.

+1:

failure, error code in ACI

+2:

success, date and t.ime of
last login
(in
internal
system format;
refer to Section 2.9.2) in ACl, and
updated string pointers, if pertinent,
in AC2 and
AC3.

The LOGIN monitor call does not require a password if the controlling
terminal
is a pseudo-terminal and the controlling job either has the
WHEEL or OPERATOR capability enabled or is logged in as the same user
being logged in for this job.
If the call is successful, an accounting entry is appended
to
the
accounting data file.
If the account validation facility is enabled,
the LOGIN call verifies either
the
account given or
the default
account of the user being logged in.
LOGIN ERROR MNEMCNICS:
LGINXl:

Invalid account identifier

LGINX2 :

Directory is "files-only" and cannot be logged in to

LGINX3 :

Internal format. of directory is incorrect

LGINX4:

Invalid password

LGINX5:

Job is already logged in

LGINX6 :

No more job slots available for logging in

TOPS-20 Version 5

3-217

April 1982

I

TOPS-20 MONITOR CALLS
(LPINI)

LPINI

JSVS

547

Loads the direct access Vertical Formatting unit (VFU) or
translation
Random Access Memory
(RAM)
for
the
line printer.
This call is
executed at system startup by the program that configures the system.
RESTRICTIONS:

requires WHEEL or OPERATOR capabilities enabled

ACCEPTS IN ACl:

JFN of file containing VFU or RAM

AC2:

status bits in the left half, and
the right half

AC3:

unit number of line printer

RETURNS

+1:

code

in

always

The following status bit is
BO(MO%LCP)

function

c~rrently

defined.

Line printer is a lowercase printer.

The available functions are as follows:
Code

Symbol

32

. MOLVF

Load the VFU from the file indicated by the
JFN.

34

.MOLTR

Load the translation RAM from the
by the given JFN.

Meaning

file

given

indicated

The line printer must not be opened by any process when this call
is
executed.
If
a
condition occurs that prevents the VFU or RAM from
being loaded (e.g., the line printer is off line),
the
name of
the
file will be stored.
The VFU or RAM will then be loaded automatically
the next time a process performs output to the line printer.
Generates an illegal instruction interrupt on error conditions below.
LPINI ERROR MNEMONICS:
LPINXl:

Invalid unit number

LPINX2 :

WHEEL or OPERATOR capability required

LPINX3 :

Illegal to load RAM or VFU while device is OPEN

3-218

~OPS-20

MONITOR CALLS
(MDDT%)

J:5VS

777

Transfers control to the MDDT program while preserving the context of
the process
that
issued
the MDDT% JSYS.
The terminal keyboard is
activated and the user may enter commands to the MDDT program, or may
return to TOPS-20 command level by typing CTRL/C, or may return to the
issuing process by typing CTRL/Z.
RESTRICTIONS:

requires WHEEL or OPERATOR capabilities enabled

The MDDT% JSYS accepts no arguments.
MDDT% ERROR MNEMONICS:
WHELX1:

WHEEL or OPERATOF capability required

3-219

TOPS-20 MONITOR CALLS
(METER% )

JSYS

766

Returns the value of the execution accounting meter
or
the memory
reference
accounting meter.
These values do not represent time as in
"clock time";
rather, they represent the amount of time that the EBOX
was busy and how many times the MBOX was referenced by the EBOX.
RESTRICTIONS:

available only on KL10 hardware

ACCEPTS IN AC1:

function code

RETURNS

always, with 59-bit value in AC2 and AC3

+1:

Function Codes:
Code

Symbol

Meaning

1

.MEREA

Read
process
execution
accounting
meter
is EBOX busy time
doubleword.
Value
returned
(number of EBOX ticks).

2

.MERMA

Read process memory-reference accounting meter
doubleword.
Value
returned
is count of MBOX
references (number of MBOX ticks).

The accounting meters have bits that allow executive PI overhead and
executive non-PI
overhead
to be
included in the doubleword count.
These are turned off by default (the monitor must be rebuilt to set
them),
so
(by default)
the EBOX count does not include the monitor
overhead of paging, scheduling, or swapping.
The EBOX count primarily
includes only the EBOX
time spent executing the instructions and
JSYS's in the user's program.
Interrupts caused by 10,
paging,
swapping,
and
so on,
can cause
instruction restarts or require pager refills, and these are included
in the count.
Because these interrupts depend on a variety of
system
variables,
such as load average, subsequent timings of the same event
will
return varying
count values.
These fluctuations
can
be
"smoothed"
by timing
the event repeatedly and taking the average of
the values returned.
The MBOX reference count has
the
same specifications as
the EBOX
count,
and is subject to the same kind of fluctuations.
Cache hit/no
hit introduces an additional source of fluctuations.
Again,
timing
the event
r~peatedly
and
taking the averag~ of the values returned
will "smooth" the counts.
An event can be timed by an initial
execution of METER%,
a DMOVEM
instruction to
save
the start value, and (after the event) a second
execution of METER% followed by a DSUB instruction to find the elapsed
number
of
ticks.
For
added accuracy, the average overhead for the
timing sequence can be determined
and
subtracted
from
the average
count value for the timed interval.
The following diagram illustrates the format of the value returned:
AC2

AC3

!==============================================================!
High Order Part
!O! Low Order Part! Reserved!
!==============================================================!
23!24
35! O! 1
35!
!0
3-220

TOPS-20 MONITOR CALLS
(METER% )
Note that the following instruction changes the format of
the values
returned by the METER% call to form a right-justified doubleword value
in AC2 and AC3.
ASHC AC2,-"D12
METER% ERROR MNEMONICS:
ARGX02 :

Invalid function code

METRXl:

METER% not implemented for this processor

3-221

I

TOPS-20 MONITOR CALLS
(MRECV)

MRECV

JSVS

511

Retrieves an IPCF (Inter-Process Communication Facility) message from
the process'
input queue.
Refer to the TOPS-20 Monitor Calls User's
Guide for an ov~rview and
description
of
the
Inter-Process
Communication Facility.
RESTRICTIONS:

Requires WHEEL, OPERATOR or IPCF capability enabled

ACCEPTS IN ACl:

length of packet descriptor block

AC2:
RETURNS

address of packet descriptor block

+1:

failure, error code in ACI

+2:

success. The packet is retrieved and placed into the
block
indicated
by word
.IPCFP of the packet
descriptor block. ACI contains the length of the
next entry in the queue in the left half and the
flags from the next packet in the right half.
This
returned word is called the associated variable of
the next entry in the queue.
If the queue is empty,
ACI contains O.

The format of the packet descriptor block is as follows:
Word

I

Meaning

Symbol

o

· I PCFL

Flags.
(Refer
to
the
MSEND
call
description.)
If bit IP%CFB is set in this
word, MRECV does not block until a packet is
read.

1

.IPCFS

PID of sender. The caller does not supply
this PIDi
the system fills it in when the
packet is retrieved.

2

· IPCFR

PID of receiver. This PID can be one of
three values:
a specific PID, -1 to retrieve
this
messages for any PID belonging to
process, or -2 to retrieve me:3sages for any
PID belonging to this job. Whee! -1 or -2 is
supplied, messages are not retrieved in any
particular order except that me:3sages from a
i ':"1 the order in
specific PID are returned
which they were received.

3

· IPCFP

Pointer to block where message is to be
placed
(length of message in the left half
and address where message is to be placed in
the right half).

4

.IPCFD

User number of sender.

5

.IPCFC

Enabled capabilities of sender.

3-222

TOPS-20 MONITOR CALLS
(MRECV)
Word

Symbol

Meaning

6

.IPCSD

Directory number
directory.

7

.IPCAS

Account
string
of
sender.
The
caller
supplies a
pointer
to
the block where the
account is to be placed.

10

.IPCLL

Byte pointer
to
~rea
to
store
location (node name) of sender.

of

sender's

connected

logical

The caller (receiver) does not
supply
the
information
in words
4
through
7;
the
system
fills
in
the words when
the packet is
retrieved.
These words describe the sender at the
time
the message
was
sent
and
permit
the
receiver to validate messages.
If a byte
pointer is supplied in word .IPCLL, the monitor will use it to
return
the ASCIZ string for the logical location of the sender.
Refer to the MSEND call description for the flags that can be
word .IPCFL of the packet descriptor bJock.

set

MRECV ERROR MNEMONICS:
IPCFXI:

Length of packet descriptor block cannot be less than 4

IPCFX2:

No message for this PID

IPCFX3:

Data too long for user's buffer

IPCFX4:

Receiver's PID invalid

IPCFX5:

Receiver's PID disabled

IPCFII:

WHEEL or IPCF capability required

IPCF14:

No PID's available to this job

IPCFI5:

No PID's available to this process

IPCF16:

Receive and message data modes do not match

IPCF24:

Invalid message size

IPCF25:

PID does not belong to this job

IPCF26:

PID does not belong to this process

IPCF27:

PID is not defined

IPCF28:

PID not accessible by this process

IPCF29:

PID already being used by another process

IPCF31:

Invalid page number

IPCF32:

Page is not private

IPCF34:

Cannot receive into an existing page

3-223

in

TOPS-20 MONITOR CALLS
(MSEND)

MSEND

JSVS

510

Sends an IPCF (Inter-Process Communication Facility)
message.
The
message is in the form of a packet and can be sent to either the
specified PID or the system process INFO.
Refer to the
TOPS-20 Monitor Calls User's Guide for an overview and description of
the Inter-Process Communication Facility.

I

RESTRICTIONS:

Some functions require
capability enabled.

ACCEPTS IN AC1:

length of packet descriptor block

AC2 :
RETURNS

WHEEL,

OPERATOR,

or

IPCF

address of packet descriptor block

+1 :

failure, error code in ACI

+2:

success.
The packet is sent to the receiver's input
queue.
Word .IPCFS of the packet descriptor block is
updated with the sender's PID. This updating is done
in case the PID was being defaulted or created by
this call.

The format of the packet descriptor block is as follows:
Word

I

Symbol

Meaning

0

· 1 PCFL

Flags.

(See below.)

1

· IPCFS

PID of sender; or address of PID if IP%CFS
or IP%CFR is set in WORD .IPCFL; or 0 if no
PID exists for sender.
This word will be
filled
in by the monitor if the caller is
creating a PID (flag bit IP%CPD is on).

2

· I PCFR

PID of receiver,
INFO.

3

· I PCFP

Pointer to message block (length of message
in the left half and startjng address of
message in the right half). When a packet is
sent
to INFO,
the message block
contains the request being
made.
(See
below.)

or

0

if

receiver

is

The following
flaqs are defined in word
.IPCFL of the packet
descriptor block. These flags can be set on both the MSEND and MRECV
calls.
Flags Set By Caller
BO(IP%CFB)

Do not block process if there are no messages in the
queue.
If this bit is set, an error is given if there
ere no messages.

Bl(IP%CFS)

Use, as the sender's PID, the PID obtained from the
address specified in word .IPCFS. Settinq bit IP%CFS
notifies the monitor that word
.IPCFS contains an
address,
and the sender's PID is located at that
address.

3-224

TOPS-20 MONITOR CALLS
(MSEND)

B2(IP%CFR)

Use, as the receiver's PID, the PIO obtained
from
the
address
specified
in word .IPCFR.
Setting bit IP%CFP
notifies the monitor
that word
.IPCFR contains an
a~dress,
and
the
receiver's
PID
is located at that
address.

B3(IP%CFO)

Allow one send request above the quota.
send quota is 2.)

B4(IP%TTL)

Truncate the message, if it is larger
than
the
space
reserved.
If this bit is not set, an error is given if
the message is too large.

B5(IP%CPD)

Create a PID to use as the sender's PID and
return
it
in word .IPCFS of the packet descriptor block.
If flag
IP%CFS is set, this function returns the created PID in
the word to which the contents of .IPCFS points.

B6(IP%JWP)

Make the created PID be job wide (i.e., permanent until
the
job logs out).
If this bit is not set, the PID is
temporary until the process executes the RESET monitor
call.
If B5(IP%CPD) is not set, B6 is ignored.

B7(IP%NOA)

Do not allow other processes to use
the
If B5(IP%CPD) is not set, B7 is ignored.

(The

default

created

I

PID.

B18(IP%CFP) The packet is privileged.
(This bit can be set only by
When a
a
process with
IPCF capability enabled.)
privileged sender sets this bit, the MRECV and MUTIL
An error is given
calls
return
it set for any reply.
the
receiver
is
if this bit is set by the sender and
not privileged.

I

B19(IP%CFV) The packet is a page of data.
Word
.IPCFP of
the
packet descriptor block contains 1000 in the left half
and the page number in the right half.
The page
the
packet is being sent to must be private.
B21(IP%INT)

Reserved for Digital use

B22(IP%EPN)

Page number in word .IPCFP
block is 18 bits long.

of

the

packet

descriptor

NOTE
When a process sends a page of data with MSEND,
that page is removed from the process' map.

Flags Returned After Call
B20(IP%CFZ) A zero-length message was sent, and the packet consists
of only the packet descriptor block.
B24-B29
(IP%CFE)

Error code field for errors encountered by INFO
during a send or receive request.
Code Symbol Meaning
l~
J

16
67
7~
~

TOPS-20 Version 5

.IPCPI
.IPCUF
.IPCSN
.IPCFF

insufficient privileges
invalid function
INFO needs name
INFO free space exhausted
3-225

April 1982

I

TOPS-20 MONITOR CALLS
(MSEND)

74
75
76

77

I

B30-B32
(IP%CFC)

· IPCBP
· IPCDN
· IPCNN
· IPCEN

PID has no name or is invalid
duplicate name has been specified
unknown name has been specified
invalid name has been specified

System and sender code. This code can be set only by a
process with IPCF capability enabled.
The system
returns the code so that a nonprivileged user can
examine it.
Code Symbol
1
2
3

B33-B35
(IP%CFM)

· IPCCC
· IPCCF
· IPCCP

Meaning
sent by IPCF
sent by system-wide INFO
sent by receiver's INFO

Field for
return of special messages. This field can
be set only by a process with WHEEL capability enabled.
The
system
returns
the
information so that a
nonprivileged user can examine it.
Code Symbol
1

· IPCFN

Meaning
Process' input queue contains a packet
that could not be delivered to intended
PID.

When the MSEND call is used to send a packet to INFO,
the
message portion of the packet (i.e., the first three words) contains
the request. This request has the following format:
Word

Symbol

Meaning

o

.IPCIO

user-defined code in the left half and the
function
(see below)
INFO is to
perform in the right half. The user-defined
code is used to associate the response from
INFO with the appropriate request.

1

. I PC II

PID that is to receive a duplicate of the
response from INFO.
If this word is
0,
the response is sent
only
to
the
originator of the request .

2

. I PC I 2

argument for the
below. )

requested

function.

(See

The functions that can be requested of INFO, along with
arguments, are as follows:

their

Meaning

Function

Argument

. IPCIW

name

Return the PID
specified name.
word .IPCII.

.IPCIG

PID

Return the name associated with the
specified PID. The name is returned in
word .IPCII.

3-226

associated with
the
The PID is returned in

TOPS-20 MONITOR CALLS
(MSEND)

Function

Argument

.IPCII

name in
ASCIZ

Assign the specified name to the PID
belonging to the process making the
request.
The temporary or permanent
status of the PID is specified by flag
bit
IP%JWP(B6)
when
the
PID was
originally created.

.IPCIJ

name in
ASCIZ

Identical to the .IPCII function.

. IPCIK

PID

Inform a PID when certain other PID's
are deleted.
The PID to be "watched"
for deletion is placed in word
.IPCI2.
When that PID is deleted, SYSTEM INFO
sends a message to the requesting PID
with .IPCKM in the IP%CFE field, and the
deleted PID in word
.IPCII of
the
message.
This function requires WHEEL
or OPERATOR privileges.

. IPCIS

Meaning

Disassociates all PIDs with names.
Used
by the monitor on a RESET or LGOUT
monitor call.
This function
is not
available to user programs.

MSEND ERROR MNEMONICS:
IPCFXI:

Length of packet descriptor block cannot be less than 4

IPCFX4:

Receiver's PID invalid

IPCFX5 :

Receiver's PID disabled

IPCFX6 :

Send quota exceeded

IPCFX7:

Receiver quota exceeded

IPCFX8 :

IPCF free space exhausted

IPCFX9:

Sender's PID invalid

IPCFII:

WHEEL or IPCF capability required

IPCFI2:

No free PID's available

IPCFl3 :

PID quota exceeded

IPCFI4:

No PID's available to this job

IPCFI5:

No PID's available to this process

IPCFI9:

No PID for

IPCF24:

Invalid message size

IPCF25 :

PID does not belong to this job

IPCF26:

PID does not belong to this process

IPCF27:

PID is not defined

[SYSTEM]INFO

3-227

TOPS-20 MONITOR CALLS
(MSEND)

IPCF28 :

PID not accessible by this process

IPCF29:

PID already being used by another process

IPCF3l:

Invalid page number

IPCF32:

Page is not private

3-228

TOPS-20 MONITOR CALLS
(MSFHK)

MSFRK

,JSYS

312

Starts a process in monitor mode.
This call allows job a to create
multiple processes for handling various asynchronous monitor tasks.
RESTRICTIONS:

requires WHEEL or OPERATOR
execution from monitor mode

ACCEPTS IN ACl:

process handle

AC2:
RETURNS

+1:

capability

enabled,

or

36-bit PC word, with user mode and other flags in the
left half and the virtual address in the right half
always

Because the starting context of the process is undefined, the process
being started should execute the following sequence of instructions at
its starting address:
FBGN:

MOVSI 1,UMODF
MOVEM 1,FPC
MCENTR

;fake user PC
;simulate the JSYS call
;establish usual top-level JSYS context

Generates an illegal instruction interrupt on error conditions below.
MSFRK ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

CAPXl:

WHEEL or OPERATOR capability required

3-229

TOPS-20 MONITOR CALLS
(MSTR)

MSTR

JSYS

555

Performs various structure-dependent functions.
These
functions
include
mounting
and
dismounting structures,
incrementing and
decrementing mount counts for structures, and setting and obtaining
the status of structures.
For regulated structures, the mount count must be incremented before
access rights or JFNs can be given. All structures are regulated by
default except the primary structure (PS: on most systems)
or any
structure declared non-regulated with the .MSSSS function of MSTR.

RESTRICTIONS:

some
functions
require
WHEEL,
MAINTENANCE capability enabled.

OPERATOR,

ACCEPTS IN ACl:

length of the argument block in
function code in the right half

left

AC2:
RETURNS

+1:

the

or

half

and

address of the argument block
always, with some functions
argument
block.
(Refer
descriptions below.)

returning data in the
to individual function

Generates an illegal instruction interrupt on all error conditions.
The available functions are summarized below.
Function
Code

Symbol

Privileged

0

.MSRNU

Yes

Return the statU:3 of the
disk unit.

1

.MSRUS

Yes

Return the statU:3 of the given
disk unit.

2

.MSMNT

Yes

Mount the given structure.

3

.MSDIS

Yes

Dismount the given structure.

4

.MSGSS

No

Return the states of the given
structure.

5

.MSSSS

Yes

Change the status of the given
structure.

6

.MSINI

Yes

Initialize
structure.

7

.MSIMC

No

Increment the mount count for
the given structure for the
job.

10

.MSDMC

No

Decrement the mount count for
the given structure for the
job.

3-230

Meaning

the

next

given

TOPS-20 MONITOR CALLS
(MSTR)
Function
Code

Symbol

11

.MSGSU

No

Return the job numbers of the
users of the given structure.

12

.MSHOM

Yes

Modify the home block
given structure.

13

.MSICF

No

Increment the mount count for
the given structure for the
given fork.

14

.MSDCF

No

Decrement the mount count for
the given structure for the
given fork.

15

.MSOFL

Yes

Receive interrupt
comes on-line.

when

disk

16

.MElIIC

Yes

Ignore increment
structure use

check

for

Privileged

Meaning

of

the

I

Obtaining the Status of the Next Disk Unit - .MSRNU
This function returns the status of the next disk unit on the system.
The next disk unit is determined by searching the current channel and
looking for the next physical unit on that channel.
The .MSRNU function accepts the channel, controller, and unit numbers
in the first three words of the argument block. The first time this
function is executed, the value for each of these numbers is -1.
After successful completion of this function, the channel, controller,
and unit numbers are updated, and the software information about the
disk drive is returned in the argument block. To locate all drives
available for mounting structures, the channel, controller, and unit
numbers returned from one .MSRNU function call are supplied on the
next one until all units on all channels have been searched. When all
units have been searched, the MSTR monitor call returns error MSTX18.
The format of the argument
follows:
Word

block,

whose

Symbol

length

is

.MSRLN,

as

Meaning

o

.MSRCH

Channel number

1

.MSRCT

Controller number

2

.MSRUN

Unit number (0-7)

3

.MSRST

Returned software status of
unit.
following status bits are defined:
BO(MS%MNT)
B2(MS%DIA)
B3(MS%0FL)
B4(MS%ERR)

TOPS-20 Version 5

is

3-231

(0-7)

I
The

Unit is part
of
a
mounted
structure
Unit is being used by an on-line
diagnostic program
Unit is off line
Unit has an error
that
was
detected during reading

April 1982

TOPS-20 MONITOR CALLS
(MSTR)
Word
3

Symbol
.MSRST
(Cant. )

Meaning
B5(MS%BBB)

B6(MS%HBB)
B7(MS%WLK)
B9-B17
(MS%TYP)

Unit has a
bad BAT block.
If
this bit is on, the data returned
in word
.MSRSN
(word 4) and in
words
.MSRNS
through
.MSRFI
(words
6
through
20)
is
indeterminate.
Unit has a bad HOME block
Unit is write locked
Type of disk unit
1
5
6
7
11
24

I

I

. MSRP4
.MSRP5
. MSRP6
. MSRP7
.MSRM3
.MSR20

RP04
RP05
RP06
RP07
RM03
RP20

4

.MSRSN

Byte pointer to ASCIZ
string
in which
to
store
the
structure name.
This pointer is
updated on return.

5

.MSRSA

Byte pointer to ASCIZ
string
in which
to
store
the
structure alias.
The alias is
usually the same as the structure name.
The
alias
is
returned, and the pointer updated,
only if the structure is on line.

6

.MSRNS

Logical unit number within the
structure of
this
unit
in the
left half, and number of
units in the structure in the right half.

7

.MSRSW

Number
of
structure.

10-12

.MSRUI

Unit ID (3 words of II-formatted ASCII)

13-15

.MSROI

Owner ID (3 words of II-formatted ASCII)

16-20

.MSRFI

File
system
ASCI I)

21

.MSRSP

Number of sectors per page

22

.MSRSC

Number of sectors per cylinder

23

.MSRPC

Number of pages per cylinder

24

.MSRCU

Number of cylinders per unit

25

.MSRSU

Number of sectors per unit

26

.MSRBT

Number of bit words in bit table per cylinder

27

.MSRSE

Serial
number
of
the CPU for
which
structure is used in booting the system

pages

ID

for

(3

swapping

words

The length of the argument block in words is given
(30) .

TOPS-20 Version 5

3-232

of

by

this

on

II-formatted

symbol

the

.MSRLN

April 1982

TOPS-20 MONITOR CALLS
(MSTR)
The II-formatted ASCII mentioned above
is 7-bit ASCII
stored
bytes to a 36-bit word in a format similar to that of a PDP-II:

o

2

17

9 10

28 29

20

four

35

!XX!

CHAR 1

CHAR 0

!XX!

CHAR 3

CHAR 2

!XX!

CHAR 5

CHAR 4

!XX!

CHAR 7

CHAR 6

!XX!

CHAR 9

CHAR 8

!XX!

CHAR 11

CHAR 10

========~=================================================

The following errors are possible on the failure of this function.
MSTRX2:

WHEEL or OPERATOR capability required

MSTRX3:

argument block too small

MSTX14:

invalid channel number

MSTX15:

invalid unit number

MSTX16:

invalid controller number

MSTX18:

no more units in system

MSTX27:

specified unit is not a disk

CAPX2:

WHEEL, OPERATOR, or MAINTENANCE capability required

Obtaining the Status of a Given Disk Unit -

.MSRUS

This function returns the status of the given disk unit.
It
accepts
the channel, controller, and unit numbers in the first three words of
the argument block..
After successful completion of this function, the
channel,
controller, and unit numbers are unchanged, and the software
information about the given disk unit
is
returned
in the argument
block.
The difference between this function and the .MSRNU function
is
that
.MSRUS does not search for the next disk unit but rather returns the
status for the given unit.
The .MSRNU function searches for the
next
disk unit and returns the status for that unit.
The format of the argument block
and
the errors possible on the
failure
of
this
function
are
the same as described for the .MSRNU
function.
Mounting a Given Structure -

.MSMNT

This function brings the given structure on line and normally makes it
available
for
general
use.
Any structure other
than the public
structure (usually called PS:) must be brought on line with
this
function.
(The public structure is brought on line during the system
startup procedure.)

3-233

TOPS-20 MONITOR CALLS
(MSTR)
It is recommended that the .MSRNU (Read Next Unit) function be given
first
to locate all units in the structure.
Then the .MSMNT (Mount
Structure) function can be given to read and verify the HOME blocks of
each unit and to mount the structure.
If one or more units of the
structure are write-locked, the structure cannot be mounted and an
error is given.
The format of the argument block is as follows:
Word

Meaning

Symbol

o

.MSTNM

Pointer to the ASCIZ
string
name of the structure.

containing

the

I

.MSTAL

Pointer to the ASCIZ string
alias of the structure.

containing

the

2

.MSTFL

Flag bits in the left half, and the number of
units in the structure (.MSTNU) in the right
half.
The bits that can be set in the left
half are:
If one of the HOME blocks is
BO(MS%NFH)
incorrect, do not fix it, but do
return an error.
If one of the
HOME blocks is incorrect and this
bit is off, the correct block is
copied into the bad HOME block,
and
the
mounting
procedure
continues.
BI(MS%NFB)

If one of the BAT (Bad Allocation
Table)
blocks is incorrect, do
not fix
it and do return an
error.
If this bit is off and
one of
the
BAT
blocks
is
incorrect,
the correct block is
copied into the bad BAT block and
the mounting procedure continues.

B2(MS%XCL)

Mount the structure for exclusive
use by this job.
This bit is set
by a system program when
it
initializes
or
reconstructs a
structure.
If this bit if off,
the
structure is mounted for
general use.

B3(MS%IGN)

Ignore correctable errors in the
bit
table
and
in the root
directory on
this
structure.
This bit is set by a system
program when it reconstructs the
root directory on a structure or
rebuilds the bit table.
If this
bit
is off and an error
is
detected, this function returns
an error.

3-234

TOPS-20 MONITOR CALLS
(MSTR)
Word

3

Symbol
.MSTUI

Meaning
Beginning of unit information for
each unit
in the structure.
The information is 3 words
long per unit, and the symbol for this length
is
.MSTNO.
The first
3-word block is for
logical unit 0, and the last 3-word block
is
for
the last logical unit (.MSTNU-I).
The
offsets into the 3-word block are:

o

.MSTCH

Channel number of unit

1

.MSTCT

Controller
number
of
(currently must be -1)

2

.MSTUN

Unit number of unit

The number of argument words
given by symbol .MSTNO (3).

per

unit

unit

is

After successful completion of this function, the given structure is
mounted
and
available
for
general use (unless bit MS%XCL was on in
word .MSTFL of the argument block).
The following errors are possible
on the failure of this function.
MSTRX2:

WHEEL or OPERATOR capability required

MSTRX3:

argument block too small

MSTRX4:

insufficient system resources

MSTRX5:

drive is not on line

MSTRX6:

home blocks are bad

MSTRX7:

invalid structure name

MSTRX8:

could not get OFN for ROOT-DIRECTORY

MSTRX9:

could not MAP ROOT-DIRECTORY

MSTXIO:

ROOT-DIRECTORY bad

MSTXll:

could not initialize Index Table

MSTX12:

could not OPEN Bit Table File

MSTX13:

backup copy of ROOT-DIRECTORY is bad

MSTX14:

invalid channel number

MSTX15:

invalid unit number

MSTX16:

invalid controller number

MSTX17:

all units in a structure must be of the same type

MSTX19:

unit is already part of a mounted structure

MSTX20:

data error reading HOME blocks

MSTX23:

could not write HOME blocks

3-235

TOPS-20 MONITOR CALLS
(MSTR)
MSTX25:

invalid number of swapping pages

MSTX27:

specified unit is not a disk

MSTX30:

incorrect Bit Table counts on structure

MSTX34:

unit is write-locked

MSTX35:

too many units in structure

MONXOI:

insufficient system resources

Dismounting a Given Structure -

.MSDIS

This function indicates that the given structure can be removed
from
the system.
Any mounted
structure other than the public structure
(usually called PS:) can be dismounted with this function.
(The
public structure is dismounted at system shutdown.)
Files that are open at the
time this function
is executed become
inaccessible, and the jobs that had the files open receive an error if
they reference them.
Jobs that have mounted
the structure or have
connected
to or
accessed a directory on the structure receive an
informational message on the terminal.
This message is
[STRUCTURE name:

HAS BEEN DISMOUNTED]

The format of the argument block is as follows:
Word

o

Symbol
.MSDNM

Meaning
Pointer to ASCIZ string containing the alias
of the structure, or device designator of the
structure.

After successful completion of this function, the given structure
dismounted and can be physically removed from the system.

is

The following errors are possible on the failure of this function.
MSTRX2:

WHEEL or OPERATOR capability required

MSTRX3:

argument block too small

MSTX21:

structure is not mounted

MSTX24:

illegal to dismount the Public Structure

Obtaining the Status of a Given Structure -

.MSGSS

This function returns the status of a mounted structure.
The caller
supplies the designators for the structure and for the storage of the
structure's physical ID.
After successful completion of the call,
data is returned in the appropriate words in the argument block.

3-236

TOPS-20 MONITOR CALLS
(MSTR)
The format of the argument
follows:
Word

block,

whose

Symbol

length

is

.MSGLN,

is

as

Meaning

o

.MSGSN

Byte pointer to ASCIZ string containing
the
alias of the structure, or device designator
of the structure.

1

.MSGST

Returned status word.

The status bits are:

This structure
structure.

Bl(MS%DIS)

being
This
structure
is
dismounted and no further mount
count increments are allowed.

132 (MS%DOM)

This structure
structure.

is

a

133 (MS%PPS)

This structure
structure.

is

the

B4(MS%INI)

This
structure
initialized.

B5(MS%LIM)

Directories on this structure are
limited
to
the
size
of a
directory on a DECSYSTEM-2050 (30
pages) .

B6(MS%NRS)

is

public

BO(MS%PS)

a

domestic
public
being

is

Structure is non-regulated.

2

.MSGNU

Number of units in structure.

3

.MSGMC

This value
Mount count for this structure.
.MSIMC
is
determined
by the number of
(Increment Mount Count) functions given for
this
structure
by all
users since the
structure was mounted.

4

.MSGFC

Open file count (i.e., number of open
for this structure.

5

.MSGSI

Pointer to ASCIZ string in which to store the
structure's physical 10.

files)

The length of the argument block is given by symbol .MSGLN (6).
After successful completion of this function, the status of the given
structure is returned in the appropriate words of the argument block,
and the pointer to the physical 10 is updated to reflect the
returned
string.
The following errors are possible on the failure of this function.
MSTRX3 :

argument block too small

MSTX21:

structure is not mounted

TOPS-20 Version 5

3-237

April 1982

I

TOPS-20 MONITOR CALLS
(MSTR)
Changing the Status of a Given Structure -

I

This function changes the status of a mounted structure.
The caller
can change
four
of
the status bits in the structure's status word:
the status of being dismounted, the status of being domestic,
the
status of having read-after-write checking done in the swapping area
of the disk, and the status of having read-after-write checking done
in the data area.
The format of the argument block, the length of which is .MSSLN, is:
Word

I

.MSSSS

Meaning

Symbol

o

.MSSSN

Byte pointer to ASCIZ string containing
the
alias of the structure, or device designator
of the structure.

I

.MSSST

Word containing the new values for
being changed.

2

.MSSMW

Mask containing the bits being changed.
The
bits that can be changed are:
BI(MS%DIS)
Structure is being dismounted.

the

bits

B2(MS%DOM)

Structure is domestic.

B6(MS%NRS)

Structure is non-regulated.

B7(MS%RWS)

Read-after-write
checking
is
being done in the swapping area

B8(MS%RWD)

Read-after-write
checking
being done in the data area

is

After successful completion of this function, the status of the given
structure
is changed according to the data supplied in the argument
block.
The following errors are possible on the failure of this function.
MSTRX2:

WHEEL or OPERATOR capability required

MSTRX3:

argument block too small

MSTX21:

structure is not mounted

MSTX22:

illegal to change specified bits

Initializing a Given Structure -

.MSINI

This function creates a new structure or repairs an existing structure
during normal system operation.
The caller has the option of creating
a new file system, reconstructing the root directory,
writing
a
new
set of HOME blocks on the structure, or rebuilding the index block.

TOPS-20 Version 5

3-238

April 1982

TOPS-20 MONITOR CALLS
(MSTR)
The format of the argument block is as follows:
Word

Meaning

Symbol

o

.MSINM

Byte pointer to ASCIZ string
name of the structure.

containing

the

1

.MSIAL

Byte pointer to ASCIZ string
alias of the structure.

containing

the

2

.MSIFL

Flag bits in BO-Bll, function value
(MS%FCN)
in B12-B17, and number of units in structure
(.MSINU) in B18-B35.
The flag bits are:

1

3-5

BO(MS%NFH)

Do not fix HOME block if one
is
incorrect and do return an error.
This bit can be on only with
function .MSRRD.
(See below.)

Bl(MS%NFB)

Do not fix BAT block
if one
is
incorrect and do return an error.

B2(MS%XCL)

Mount
this
structure
for
exclusive use by this job.
If
this bit is off, the structure is
mounted for general use.

B3(MS%IGN)

Ignore errors in the bit table
and in the root directory on this
structure.
If this bit is on,
B2(MS%XCL) must also be on.

The function values that can be given are:
.MSCRE Create a new file system

2

.MSRRD

Reconstruct the root directory

3

.MSWHB

write a new set of HOME blocks

4

.MSRIX

Rebuild the index table

.MSISU

Beginning of unit information for
each unit
in the structure.
The information is 3 words
long per unit, and the symbol for this length
is
.MSINO.
The first
3-word block is for
logical unit 0, and the last 3-word block
is
for
the last logical unit (.MSINU-l).
The
offsets into the 3-word block are:

a

.MSICH

Channel number of unit

1

.MSICT

Controller
number
of
(currently must be -1)

2

.MSIUN

Unit number of unit

The number of arguments per unit is given
symbol .MSINO (3).
6

.MSIST

Status word

(reserved for future use).

7

.MSISW

Number of
structure.

pages

3-239

for

swapping

on

unit

by

this

TOPS-20 MONITOR CALLS
(MSTR)

I

Meaning

Word

Symbol

10

.MSIFE

Number of
system.

11-13

.MSIUI

Unit ID (3 words of ASCII)

14-16

.MSIOI

Owner ID (3 words of ASCII)

17-21

.MSIFI

File system ID (3 words of
for future use)

22

.MSIFB

Number of pages for the file BOOTSTRAP.BIN.

23

.MSISN

Serial number of the CPU for which
this
structure is used in booting the system.
You
must supply this word when creating a
system
structure that does not have the name PS:.

pages

for

the

front-end

ASCII)

file

(reserved

Words 6 through 16 (.MSIST through .MSIOI) of the argument block must
be supplied when the MSTR call is being executed to create a new file
system or to write a
new set of HOME blocks.
After
successful
completion of
the
.MSCRE function, the structure is initialized and
the following directories are created:

I








The following errors are possible on the failure of this function.
MSTRX2 :

WHEEL or OPERATOR capability required

MSTRX3:

argument block too small

MSTRX4 :

insufficient system resources

MSTRX5 :

drive is not on line

MSTRX6 :

horne blocks are bad

MSTRX7:

invalid structure name

MSTRX8 :

could not get OFN for ROOT-DIRECTORY

MSTRX9:

could not MAP ROOT-DIRECTORY

MSTXIO:

ROOT-DIRECTORY bad

MSTXll:

could not initialize Index Table

MSTX12 :

could not OPEN Bit Table File

MSTX13:

backup copy of ROOT-DIRECTORY is bad

MSTX14:

invalid channel number

MSTX15:

invalid unit number

TOPS-20 Version 5

3-240

April 1982

TOPS-20 MONITOR CALLS
(MSTR)
MSTX16:

invalid controller number

MSTX17:

all units in a structure must be of the same type

MSTX19:

unit is already part of a mounted structure

MSTX20:

data error reading HOME blocks

MSTX23:

could not write HOME blocks

MSTX25:

invalid number of swapping pages

MSTX26:

invalid number of Front-End-File system pages

MSTX27:

specified unit is not a disk

MSTX28:

could not initialize Bit Table for structure

MSTX29:

could not reconstruct ROOT-DIRECTORY

MSTX30:

incorrect Bit Table counts on structure

MONXOl:

insufficient system resources

Incrementing the Mount Count for the Job -

.MSIMC

Users
indicate that
they are actively using
a
structure
by
incrementing
the structure's mount count.
A nonzero mount count
informs the operator that the
structure should not be dismounted.
Also,
an IPCF message
is sent to the Mountable Device Allocator to
indicate that a user is using the structure.
The .MSIMC function
is
used to increment a structure's mount count.
Note that incrementing the mount count is a requirement for
files and directories on regulated structures.

accessing

The job receives an error if the given structure is in the process of
being dismounted
(i.e., a job has given the .MSSSS function with the
MS%DIS bit on), or if the job is not logged in.

I

The format of the argument block is as follows:
Word

Meaning

Symbol

o

.MSDEV

Device designator, or byte pointer
to ASCIZ
string containing the alias of the structure.

1

.MSJOB

(Optional) Number of
job
(other
than
the
current
job)
whose mount count
is to be
incremented.
This requires WHEEL or OPERATOR
caeability to be enabled.

After successful completion of this function, the mount count
given structure has been incremented.

of

the

The following errors are possible on the failure of this function.
ARGX18:

invalid structure name

CACTX2:

Job is not logged in

LOUTX2:

Invalid job number

I
3-241

TOPS-20 MONITOR CALLS
(MSTR)
MSTRX3:

argument block too small

MSTX21:

structure is not mounted

MSTX31:

structure already mounted

MSTX33:

structure is unavailable for mounting

MONXOI:

insufficient system resources

STDVXI:

no such device

STRXOI:

structure is not mounted

STRX02:

insufficient system resources

Decrementing the Mount Count for the Job -

.MSDMC

This function indicates that the given structure is no longer
being
used by the job executing the call.
If the job executing the call has
previously incremented the mount count for
this
structure via
the
.MSIMC
(Increment
Mount
Count)
function,
the mount count
is
decremented.
If the job has not incremented the mount count, the
job
receives an error.
If the structure is regulated, and the user has
any assigned JFNs on the structure, is accessing the structure or
is
connected to the structure, an error is returned.
The format of the argument block is as follows:
Word

Symbol

Meaning

o

.MSDEV

Device designator, or byte pointer
to ASCIZ
string containing the alias of the structure.

I

.MSJOB

(Optional) Number of
job
(other
than
the
current
job)
whose mount count
is to be
decremented.
This requires WHEEL or OPERATOR
capability to be enabled.

The resource allocator receives an IPCF packet when
the mount count
for
a structure is decremented.
The flag word (.IPCFL) of the packet
descriptor block has a code of 1(.IPCCC) in the
IP%CFC
field
(bits
30-32).
This code indicates the message was sent by the monitor.
The
first word of the packet data block contains the structure dismount
code
.IPCDS.
The second word contains the number of header words and
the number of the job decrementing the mount count.
ThE?
third word
contains the device designator of the structure.
Thus,
.IPCFL/<.IPCCC>B32
DATA/.IPCDS
DATA+I/number of header words (2)"
job number
DATA+2/device designator of structure
After successful completion of this function, the mount count of
the
structure has been decremented and the IPCF message has been sent.
'rhe following errors are possible on the failure of this function.
MSTRX3:

argument block too small

MSTX2l:

structure is not mounted
3-242

TOPS-20

MONI~~OR

CALLS

(MSTH)
MSTX32:

structure was not mounted

MSTX36:

illegal while JFNs assigned

MSTX37:

illegal while accessing or connected to a directory

ARGX18:

invalid structure name

MONXOl:

insufficient system resources

STDVXl:

no such device

STRXOl:

structure is not mounted

STRX02:

insufficient system resources

Obtaining the Users on a Given Structure -

.MSGSU

This function returns the job numbers of the
users of
the given
structure.
Users of a
structure are divided into three classes:
users who have incremented the mount count (SMOUNT command), users who
are connected
to the structure (CONNECT command), and users who have
accessed the structure (ACCESS command).
The caller
specifies
the
classes of users
for which information is to be returned by setting
the appropriate bits in the argument block.
The format of the argument block is as follows:
Word

Symbol

Meaning

o

.MSUAL

Byte pointer to ASCIZ string containing
the
alias of the structure, or device designator
of the structure.

1

.MSUFL

Flag bits in the left half and a in the right
half.
The bits that can be set are:
BO(MS%GTA)

Return users who
the structure.

have

accessed

Bl(MS%GTM)

Return users who have incremented
the mount count.

82(MS%GTC)

Return users who are connected to
the structure.

After successful execution of this function, word 1 through word
n+l
(where n
is the number
of
items
returned)
are updated with the
following information.
Word

Symbol

Meaning

1

.MSUFL

Right half contains the number of
items
being returned.
Left half is unchanged.

(n)

2

.MSUJI

Flag bits for the job in the left
number of job in the right half.

and

3-243

half,

TOPS-20 MONITOR CALLS
(MSTR)
Word

Symbol

n + 1

Meaning
Flag bits for the job in the left
number of job in the right half.
The bits returned for each
as:

job

half,
are

and

defined

BO(MS%GTA)

Job has accessed structure.

BI(MS%GTM)

Job has
incremented
count for structure.

B2(MS%GTC)

Job has connected to structure.

the

mount

The following errors are possible on the failure of this function.
MSTRXl:

invalid function

MSTRX3 :

argument block too small

STRXOl:

structure is not mounted

STDVXI:

no such device

ARGXI8:

invalid structure name

MONXOl:

insufficient system resources

Specifying Word and Bits To Be Modified -

.MSHOM

This function allows enabled WHEEL or OPERATOR program to specify word
of homeblock of mounted structure to be modified, which bits should be
modified, and what the new values should be.
The format of the argument block is as follows:
Word

Symbol

Meaning

o

.MSHNM

Handle on alias such as pointer to string, or
device designator.

I

.MSHOF

Offset
specifying
changed.

2

. MSHVL

Value for new bits .

3

.MSHMK

Mask showing which bits should be changed.

which

word

should

The following errors are possible on the failure of this function:
MSTRX2 :

insufficient privileges

MSTRX3:

argument block too small

MSTX2l:

structure not mounted

any errors "MODHOM" routine returns

3-244

be

TOPS-20 MONITOR CALLS
(MSTR)
Incrementing the Mount Count for the Fork -

.MSICF

This function and the next (.MSDCF) allow job forks to
independently
mount and dismount structures without contending with one another for
control of the structure.
(This is primarily intended
for
SYSJOB.)
Note that when either a job mount or fork mount is possible, the job
mount is preferred as it incurs less overhead.
This function indicates that a fork is actively using a structure.
If
the structure is being dismounted~ the job receives an error.
The
format of the argument block is:
Word

o

Symbol
.MSDEV

Meaning
Pointer to ASCIZ string containing the alias
of the structure, or device designator of the
structure.

The following errors are possible on the failure of this function.
MSTRX3:

argument block too small

MSTX21:

structure is not mounted

MSTX33:

structure is unavailable for mounting

ARGXI8:

invalid structure name

MONXOI:

insufficient system resources

STDVXI:

no such device

STRXOI:

structure is not mounted

STRX02:

insufficient system resources

Decrementing the Mount Count for the Fork -

.MSDCF

This function indicates that a fork is no longer using a structure.
Note that if a job-wide increment has been done, the fork may still
access the structure.
The format of the argument block is:
Word

o

Meaning

Symbol
.MSDEV

Pointer to ASCIZ string containing the alias
of the structure, or device designator of the
structure.

The following errors are possible on the failure of this function.
MSTRX3:

argument block too small

MSTX21:

structure is not mounted

MSTX32:

structure was not mounted

MSTX36:

illegal while JFNs assigned

MSTX37:

illegal while accessing or connected to a directory

ARGXI8:

invalid structure name

3-245

TOPS-20 MONITOR CALLS
(MSTR)
MONXOl:

insufficient system resources

STDVXl:

no such device

STRXOl:

structure is not mounted

STRX02:

insufficient system resources

Receiving Interrupt when Disk Comes On-line - .MSOFL
This function specifies who is to receive an interrupt when a disk
comes on-line.
It is provided for the Mountable Device Allocator in
order to control the disks and inform the operator of structure
status.
Only one process on the system will receive the interrupts.
The process using this JSYS must have WHEEL or OPERATOR capability
enabled. The argument block has the following format:
Word

o

Symbol
.MSCHN

Meaning
Place this process on a software interrupt
channel. An interrupt is then generated when
a disk comes on-line. If the channel number
is
given
as -1, a previously assigned
interrupt channel will be deassigned.

Ignoring Increment Check for Structure Use - .MSIIC
Allows a process to use a regulated structure without previously
incrementing the mount count. Entries are made to the accounting file
only on structure decrements, so this function will enable bypassing
of accounting.
There is no argument block.
The following errors are possible:
MSTRX2:

WHEEL or OPERATOR capability required

3-246

TOPS-20 MONrrOR CALLS
(MTALN)

JSYS

MTALN

774

Associates a given serial-numbered magnetic
tape drive with the
specified logical unit number.
The MTALN call is a temporary call and
may not be defined in future releases.
RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

slave type in left half;
magtape in right half

AC2:
RETURNS

logical

unit

number

of

decimal serial number of magnetic tape drive

+1:

always

All units are searched for the specified serial number and slave type.
When they are found, the drive is associated with the given logical
unit number.
The original unit is now associated with the logical
unit number that the specified serial-numbered drive had before it was
reassigned.
The slaves recognized are
.MTT45
.MTT70
.MTT71
.MTT72
.MTT77
.MTT78

TU45
TU70
TU71
TU72
TU77
TU78

(The system default)

I

Generates an illegal instruction interrupt on error conditions below.
MTALN ERROR MNEMONICS:
WHELXl:

WHEEL or OPERATOR capability required

DEVXl:

Invalid device designator

OPNX7 :

Device already assigned to another job

TOPS-20 Version 5

3-247

April 1982

TOPS-20 MONITOR CALLS
(MTOPR)

JSYS

MTOPR

77

Performs various device-dependent control functions.
This monitor
call requires either that the JFN be opened or the device be assigned
to the caller if the device is an assignable device.
Because of the device dependencies of the MTOPR call, programs written
with device-independent code should not use this call unless they
first check for the type of device.
RESTRICTIONS:

some functions require WHEEL or OPERATOR capability
enabled.
Some functions
require ARPANET or DECnet
software.

ACCEPTS IN ACl:

JFN of the device

RETURNS

AC2 :

function code (see below)

AC3:

function arguments or address of argument block
descriptions of individual devices)

+1:

(see

always

The functions listed for each device apply only to that device.
If a
function applies to more than one device, its description is repeated
for each applicable device.
ARPANET Functions
ARPANET MTOPR functions are described below.
For
a
complete
description of their application, refer to the ARPANET manual.
Code

Symbol

20

. MOACP

If a connection is in the RFCR state, use of this
function will cause an RFC to be sent to accept
the connection.

21

. MOSND

If a connection is operating
in buffered send
mode,
use of this function causes all currently
buffered bytes to be sent.

22

.MOSIN

Causes the INS/INR command to be sent.

24

.MOAIN

Assigns interrupt channels through which
the
program is interrupted on either a change of state
(of the connection F.S.M) or receipt of an INS or
INR message.
The INS/INR PSI channel is stored in
field MO%NIN (BO-5) of AC3 and the state change
PSI channel is stored in field MO%FSM (B12-17) of
AC3.
A value of 77 (octal)
in either of these
fields prevents assignment of a PSI channel.

Meaning

DECnet Functions
DECnet-20 MTOPR functions are described below.
For a complete
description of their application, refer to the DECnet manual.

3-248

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

24

. MOACN

Meaning
~llow

a network task to enable software
interrupt
channels for any combination of the following work
types:
•
•
•

connect event pending
interrupt message available
data available

This function requires that AC3 contain three
9-bit
fields
specifying the changes in the
interrupt assignments for this link.
These fields
are:
Field

Symbol

Used to Signal

BO-B8
B9-B17
B18-B26

MO%CDNI
MO%INA.
MO%DAV

Connect event pending
Interrupt message available
Data available

The contents of the fields are
Value

Meaning

nnn

The number of the channel to be enabled:
0-5 and 23-35 decimal
Clear the interrupt
No change

.MOCIA
.MONCI
25

. MORLS

Read the link status and return a 36-bit word of
information regarding the status of the logical
link.
AC3 contains flag bits in the left half and
a disconnect code
in the right half.
The flag
bits are
Symbol

Bit

Meaning

MO%CON
MO%SRV
MO%WFC

BO
Bl
B2

MO%WCC

B3

MO%EOM

B4

MO%ABT
MO%SYN
MO%INT

B5
B6
B7

MO%LWC

B8

Link is connected
Link is a server
waiting
for
Link
is
a
connection
Link
is
waiting
for
a
connection confirmation
Link has an entire message to
be read
Link has been aborted
Link has been closed normally
Link has an interrupt message
available
Link
has
been
previously
connected

The disconnect/reject codes are as follows:
Symbol

Value

.DCXO
.DCXl
.DCX2

0
1

.DCX3
.DCX4

3
4

2

3-249

Meaning
No special error
Resource allocation failure
not
Destination node
does
exist
Node shutting down
Destination process does not
exist

TOPS-20 MONITOR CALLS
(MTOPR)

25

.MORLS

(Cont.)
Symbol

Value

Meaning

.DCX5

5

.DCX7
.DCX8
.DCX9

7
8
9

Invalid name field Destination
process queue overflow
Unspecified error
Third party aborted link
User
abort
(asynchronous
disconnect)
Undefined error code
Connect initiate with
illegal
destination address
Connect confirm with
illegal
destination address
Connect
initiate or connect
confirm
with
zero
source
address
Flow control violation
Too many connections to node
Too
many
connections
to
destination process
Access not permitted
Logical link services mismatch
Invalid account
Segment size too small
Process aborted
No path to destination node
Link aborted due to data loss
Destination process does not
exist
Confirmation
of
disconnect
initiate
Image data field too long

.DCXll
.DCX21

11
21

.DCX22

22

.DCX23

23

.DCX24
.DCX32
.DCX33

24
32
33

.DCX34
.DCX35
.DCX36
.DCX37
.DCX38
.DCX39
.DCX40
.DCX41

34
35
36
37
38
39
40
41

.DCX42

42

.DCX43

43

If a disconnect code does not apply to the current
status of the link, the right half of AC3 will be
zero.
26

. MORHN

Return the ASCII name of the host node at the
other end of
the logical
link.
This function
requires that AC3 contain a string pointer to the
location where the host name is to be stored.
(If
the byte size exceeds eight bits,
bytes are
truncated to eight bits.)
The monitor call returns with an updated pointer
in AC3, and the host name stored as specified.

27

. MORTN

Return the unique task name
that is associated
with your
end of
the logical link.
If you had
defaulted
the task
name
in the network
file
specification,
the
call
returns
the
monitor-supplied task name.
In DECnet-20,
the
default task name is actually a unique number.
This function requires that AC3 contain a
string
pointer
to the location where the task name is to
be stored.
(If the byte size exceeds eight bits,
bytes are truncated to eight bits.)
The monitor call returns with an updated pointer
in AC3 and the task name stored as specified.
3-250

TOPS-20 MONITOR CALLS
(MTO:PR)
Code

Symbol

30

. MORUS

Meaning
Return the
source
task
user
identification
supplied
in the connect initiate message.
This
function
requires that AC3 contain a
string
pointer
to
the
location
where
the
user
identification is to be stored.
(If the byte size
exceeds eight bits, bytes are truncated to eight
bits. )
The monitor call returns with an updated pointer
in AC3 and
the user
identification stored as
specified.
If no user identification was supplied
by the source task, AC3 continues to point to the
beginning of the string, and a null is returned as
the only character.

31

. MORPW

Return the source task's password as supplied
in
the
connect
initiate message.
This function
requires that AC3 contain a string pointer to the
location where
the password
is
to be stored.
(Passwords are binary:
therefore,
the string
pointer should accomodate 8-bit bytes.)
The monitor call returns with an updated pointer
in AC3 and
the source task's password stored as
specified.
AC4 contains the number
of bytes
in
the string:
a
zero value
indicates
that no
password was supplied by the source task.

32

. MORAC

Returns the account string supplied by the
source
This'
task
in the connect
initiate message.
function
requires
that AC3 contain a
string
pointer
to
the location where the account string
is to be stored.
(If the byte size exceeds eight
bits, bytes are truncated to eight bits.)
The monitor call return with an updated pointer in
AC3 and the source task's account number stored as
specified.
If no account string was supplied
by
the
source task,
AC3 continues to point to the
beginning of the string, and a null is returned as
the only character.

33

. MORDA

Return the optional data supplied in any of
the
connect or disconnect messages.
This function
requires that AC3 contain a string pointer to
the
location where
the optional
user data is to be
stored.
(This file is binary:
the string pointer
should specify 8-bit bytes.)
The monitor call returns with an updated pointer
in AC3 and the optional data stored as specified.
AC4 contains the number
of bytes
in
the data
string:
a
zero value indicates that no optional
data was supplied.

3-251

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

34

. MORCN

Meaning
Return the object type that was used by the source
task to address this connection.
The result
indicates whether the local task was addressed by
its generic type or its unique network task name.
The monitor call returns with the object type
in
AC3.
A zero object type indicates that the target
task was addressed by its unique network task
name;
a nonzero value indicates that it was
addressed by its generic object type.

35

.MORIM

Read interrupt message.
This function requires
that AC3 contain a byte pointer to the receiving
buffer.
(If the byte size exceeds eight bits,
bytes are truncated to eight bits.)
The maximum
message length is 16 bytes, and the buffer size
should be at least 8 bits.
The monitor call returns with an updated pointer
in AC3, the message stored in the buffer, and the
count of bytes received in AC4.

36

.MOSIM

Send an interrupt message.
This function requires
that AC3 contain a byte pointer to the message
(eight bytes maximum) and that AC4 contain a count
of the bytes in the interrupt message (sixteen
bytes maximum).

37

• MOROD

Return the unique
identification of the source
task.
This identification is in the format of
object-descriptor, and the contents depend on the
DECnet implementation on the remote host.
In
addition, if the source task
is running on a
system that provides for group and user codes,
this information is also returned.
If the source
task name
is on a DECnet-20 host,
the data
returned is TASK-taskname.
This function requires
that AC3 contain a string pointer to the location
where the object-descriptor of the source task
is
to be stored.
(If
the byte size exceeds eight
bits, bytes are truncated to eight bits.)
The monitor call returns with an updated pointer
in
AC3
and the object-descriptor stored as
specified.
In addition, if the source host system
uses group and user codes (sometimes referred to
as project and programmer number or p,pn), AC4
contains the group code in the left half and the
user code in the right half.
If the source host
system does not provide for group or user codes,
AC4 contains zeros.

3-252

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

40

.MOCLZ

Meaning
Reject
a
connection
either
implicitly
or
explicitly.
If the target task closes its JFN
(via the CLOSF monitor call) before accepting the
connection either
implicitly or explicitly, the
local NSP assumes that the connection is rejected
and sends a connect reject message back to the
source task.
The reason given is process aborted
(reject code 38,
.DCX38).
The target task must
then reopen its JFN in order to receive subsequent
connect initiate messages.
In order to explicitly
reject a connect and at the same time return a
specific reject reason and set up 16 bytes of user
data, the target task must use the .MOCLZ function
of the MTOPR monitor call.
The .MOLCZ function
does not close the JFN.
This function requires that
AC2 contain a reject code in the left half
and
.MOCLZ
in the right half.
The reject
code is a 2-byte, NSP-defined decimal number
indicating the reason that a target task is
rejecting a connection.
Refer
to
the
description of code 25, .MORLS, for a list of
disconnect/reject codes.
AC3 contain a string pointer to any data to
be returned.
(If the byte size exceeds eight
bits, bytes are truncated to eight bits.)
AC4 contain the count of bytes in the data
string
(maximum=16) .
A zero indicates no
data.

41

.MOCC

Accept
a
connection
either
implicitly
or
explicitly.
Under certain conditions, the local
NSP assumes that the connection is accepted and
sends a connect confirm message back to the source
task.
These implicit conditions are
The target task attempts to output to the
logical link (issues a SOUT or SOUTR monitor
call to the network).
The target task submits a read request to the
logical link
(issues a SIN or SINR monitor
call to the network).
The target task is in input wait state
(has
enabled
itself
for
a
"data available"
software interrupt).
In order to explicitly accept a connect and also
return a
limited amount of data, the target task
must use the .MOCC function of the MTOPR monitor
call.
This function requires that AC3 contain a
string pointer to any data to be returned.
(If
byte size exceeds eight bits, bytes are truncated
to eight bits.)
AC4 must contain the count of
bytes in the data string to a maximum of 16 bytes.
A zero indicates no data.

3-253

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

42

.MORSS

I

Meaning
Returns the maximum segment size that can be sent
over
this link.
This value is the minimum of the
maximum segment size supported by the
remote NSP
task,
the segment size supported by the remote
network task, and the segment size supported by
the local NSP task.
The local task can use this
value
to optimize
the format of data
being
transmitted over the link.
The monitor call returns the maximum segment size,
in bytes, in AC3.

43

. MOANT

Attach network terminal.
This function passes a
DECnet logical link from the DECnet backround job
(MCBNRT) to TOPS-20 so that TOPS-20 can control
terminal
I/O to and from the DECnet logical link.
The MCBNRT program must establish the logical link
and exchange the necessary DECnet protocols before
this function of the MTOPR call is executed.
The JFN accepted by this function in
JFN of the DECnet logical link.
This call returns the line number
logical link in AC2.

of

ACI
the

is

the

DECnet

The TOPS-20 job is associated with
the DECnet
logical link until one of the following occurs:

44

.MOSNH

1.

The logical link is broken by the foreign host
or by DECnet.

2.

The job logs out, more data comes through
the
logical
link, and the first character of that
data is not a CTRL/C.
If the first character
is a CTRL/C,
a new job is created using the
same logical link.

Sets the network host.
This function
causes the
terminal
specified
in the argument block to send
data to and receive data from the DECnet logical
link.
The link connects the terminal on the local
host to a job on a
foreign host.
The DECnet
logical
link
to
the
foreign host must be
established by the user process before this MTOPR
function can be executed.
This function requires the JFN of the logical link
in ACl,
and the address of the argument block in
AC3.
The argument block has the following format:
Word Symbol

Contents

o

The length of the argument block
including this word.
Identifier of the terminal that is
controlling the local job.
Flags
in the left half,
ASCII
escape character in the right half.
The flags defined are:

I

.SHTTY

2

.SHESC

SH%LPM
TOPS-20 Version 5

3-254

local page mode
April 1982

TOPS-20 MONITOR CALLS
(~OPR)

Front-End Functions
Code

Symbol

3

. MOEOF

Meaning
Causes TOPS-20 to flush its buffers and send all
data to the front end.
Optionally, it will notify
the front end of the end-of-file condition.
If
AC3
is zero, the buffers are flushed and the end
of file status is sent to the front end.
If AC3
is non-zero, only the buffers are flushed.
This function is used for synchronization between
a program running on TOPS-20 and a program running
on the front end.

4

. MODTE

Assign the specified device to the DTE controller
on the front end.
This function, which must be
performed before I/O is allowed
to the device,
requires AC3 to contain the device type.
The
process must have WHEEL or OPERATOR capability
enabled.
Unless otherwise noted, the JFN must be opened
befcire the MTOPR function can be performed.

MTA/MT Functions
The functions available for physical magnetic tape drives
(MTA)
and
logical magnetic tape drives (MT) are described below.
Some of these
functions accept arguments
in AC3
(refer
to
the
individual
descriptions) .
In the following descriptions, a labeled tape is one
acquired via a MOUNT command and has one of the following
attributes:
ANSI, TOPS20, or EBCDIC.
Code

Symbol

Meaning

o

.MOCLE

Clear any error flags from a previous MTOPR call.

I

. MOREW

Rewind the tape.
This function waits for activity
to stop before winding the tape.
If sequential
data is being output, the last partial buffer
is
written before the
tape
is
rewound.
Control
returns to caller when rewinding begins.
For
labeled tapes,
this function causes the first
volume in the set to be mounted and positioned
to
the first file
in the file set.
Since a volume
switch may be required, this function could block
for a considerable amount of time.
Use function .MORVL to rewind the current volume.

2

.MOSDR

Set the direction of the tape motions for
read
operations.
This function requires AC3 to contain
the desired direction.
If AC3
0,
the tape
motion is forwards;
if AC3 = 1, the tape motion
is backwards.
This function is not available for
labeled
tapes
and will
return an MTOXI error if used for that
purpose.

3-255

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

3

.MOEOF

Meaning
Write a tape mark.
This function
requires that
the magnetic tape be opened for write access.
If
sequential data is being output, the last partial
buffer is written before the tape mark.
For labeled tapes,
issuing
this function will
terminate the data portion of the file, write EOF
trailer labels and leave the
tape positioned
to
accept user
trailer
labels.
It is possible at
this point to write user trailer labels or close
the file.
A second .MOEOF function issued without
positioning the tape backwards will
"close"
the
file (subsequent writes will create a new file).

4

.MOSDM

Set the hardware data mode
to be used
transferring data
to and
from the tape.
function requires AC3 to contain the desired
mode:

o

when
This
data

2
3

.SJDDM
.SJDMC
.SJDM6
.SJDMA

default system data mode
dump mode (36-bit bytes)
SIXBIT byte mode for 7-track drives
ANSI ASCII mode (7 bits in 8-bit
bytes)

4
5

.SJDM8
.SJDMH

industry compatible mode
High-density mode for TU70 and TU72
tape drives only (nine 8-bit bytes
in two words).

1

For labeled tapes, this function is allowed only
if the file is opened in dump mode (.GSDMP).
If
this is not the case, an MTOXl error is returned.
5

.MOSRS

This function
Set the size of the
records.
requires AC3
to contain the desired number of
is allowed
This function
bytes in the records.
only if no I/O has been done since the JFN was
opened.
For labeled tapes, this function is allowed only
if the file has been opened in dump mode.
If the
file has not been opened in dump mode,
an MTOXl
error is returned.
The maximum size of the records
follows:
Hardware
I/O Mode

(in bytes)

is

as

Maximum
Record Size (bytes)

system-default
dump
(dump is usual default)
SIXBIT
ANSI ASCII
industry compatible
high density

8192
49152
40960
32768
8192

The above values can be exceeded in the execution
of
.MOSRS~
however, the first data transfer will
fail.
3-256

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

6

. MOFWR

Meaning
Advance over one record in the direction away from
the beginning of the tape.
If sequential data is
being read in the forward direction and not all of
the record has been read, this function advances
to the start of the next
record.
If sequential
data
is being
read in the reverse direction and
not all of the record has been read, this function
positions the tape at the end of that record.
For labeled tapes,
forward
space will position
over a
logical
record.
This implies that many
physical records may be skipped (if S format
is
used)
perhaps
involving one or more volume
switches.

7

. MOBKR

Space backward over one record
in the direction
toward the beginning of the tape.
If sequential
data is being read in the forward direction and
not all of the record has been read, this function
positions the tape back to
the start of that
record.
If
sequential data is being read in the
reverse direction and not all of
the
record has
been read, this function positions the tape to the
end of the
record physically preceding
that
record.
For labeled tapes, backward spacing will position
over a
logical
record.
This implies that many
physical records may be skipped (if S format
is
used)
perhaps
involving one or more volume
switches.

10

. MOEOT

For unlabeled tapes,
advance
forward
until
two
sequential tape marks are seen and position tape
after the first tape mark.
For labeled tapes, this function will position the
volume set beyond the end of the last file in the
set.
This is useful for adding a new file to the
end of an already existing volume set.
This
function may take some time to complete as one or
more volumes switches may be required.

11

.MORUL

Rewind and unload
the
tape.
This function
is
identical
to the .MOREW function and also unloads
the tape if the hardware supports tape unloading.
This function is illegal for any tape acquired via
the MOUNT command.

12

. MORDN

Return the
successful
density.

13

.MOERS

Erase three inches of tape
(i.e.,
erase gap).
This function requires that the magnetic tape be
opened for write access.

current
return,

density
setting.
AC3 contains the

This function is illegal for labeled tapes.

3-257

On
a
current

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

14

. MORDM

Return the hardware data mode currently being used
in
transfers
to
and
from
the
tape.
On a
successful return, AC3 contains the current data
mode.

15

. MaRRS

Return the size of the records.
On a
successful
return,
AC3 contains
the number of bytes in the
records.

16

.MOFWF

Advance to the
start of
the
next
file.
This
function
advances
the tape in the direction away
from the beginning of the
tape
until
it passes
over a tape mark.

Meaning

For labeled tapes, forward
space will
skip one
logical
file.
This
implies
that many physical
files may be skipped,
involving perhaps one or
more volume switches.

17

.MOBKF

Space backward over one file.
This function moves
the
tape in the direction toward the beginning of
the tape until it passes over
a
tape mark or
reaches the beginning of
the
tape,
whichever
occurs first.
For labeled tapes, backspace file will back up one
logical
file.
This
implies
that many physical
files may be skipped,
involving perhaps one or
more volume switches.
NOTE
For labeled ANSI
tape,
the monitor
can
compute
the number
of volume switches
required to get to the
first
section of
the
file.
Thus,
if
this
function
is
issued for
an ANSI
tape,
at most one
volume
switch will be required.
This is
not true for EBCDIC tapes.
Issuing this function when
the
tape
is already
positioned at
the first volume of the volume set
will not produce an error.
The program
issuing
this
function must follow the .MOBKF with a GDSTS
call to determine
if
the BOT was encountered
during the backspacing operation.

20

.MOSPR

Set the parity.
This function
contain the desired parity:

o
I

.SJPRO
.SJPRE

req~ires

AC3

to

odd parity
even parity

21

.MORPR

Return
the current parity.
On
a
successful
return, AC3 contains the current parity.

22

. MONRB

Return number of bytes remaining
in the current
record.
On a successful return, AC3 contains the
number of bytes remaining.
This function is only
meaningful during sequential I/O.
3-258

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

23

.MOFOU

Force any partial records
sequential output.

24

.MOSDN

Set the density.
The function
contain the desired density.

Meaning

o
1

2
3

4
5

.SJDDN
.SJDN2
.SJDN5
.SJDN8
.SJD16
.SJD62

to

be

written
requires

during
AC3

to

default system density
200 BPI (8 rows/mm)
556 BPI (22 rows/mm)
800 BPI (31 rows/mm)
1600 BPI (63 rows/mm)
6250 BPI (246 rows/mm)

This function is illegal for labeled tapes.
25

.MOINF

Return information about the tape.
This function
requires
AC3
to contain the address of the
argument block in which the information is to be
returned.
The format of the argument block is as
follows:
Word

Symbol

o

. MOICT

1
2
3

. MOITP
.MOIID
. MOISN

4
5
6

. MOIRD
.. MOIWT
. MOIRe

7

.MOIFC
. MOISR
.MOISW
.MOIHR
.MOIHW
.MOIRF
.MOIWF

10
11

12
13
14
15

Contents
Length of argument block to be
returned (not including this word)
MT.~ type code
MT.~ reel ID
Channel, controller,
and unit in
the left half and serial number in
the right half.
Number of reads done
Number of writes done
Record
number
from beginning of
tape
Number
Number
Number
Number
Number
Number
Number

of
of
of
of
of
of
of

files on tape
soft read errors
soft write errors
hard read errors
hard write errors
frames read
frames written

The JFN need not be open for this function.
26

. MORDR

Return the direction that
the
tape
is moving
during
read operations.
On a successful return,
AC3 = 0 if the direction of the
tape motion is
forwards,
or AC3 = 1 if the direction of the tape
motion is backwards.

27

.MOSID

Set the reel identification of the
tape mounted.
The process must have WHEEL or OPERATOR capability
enabled.
This function requires AC3
to contain
the desired
36-bit reel ID.
The JFN need not be
open for this function.

3-259

TOPS-20 MONITOR CALLS
(MTOPR)
Meaning

Code

Symbol

30

.MOIEL

Inhibit error logging for the
tape.
If AC3
is
non-zero,
error logging will be inhibited on
subsequent operations on the tape drive.
If AC3
is zero,
error
logging will be performed.
The
setting remains in effect until the JFN is closed.
Error
logging occurs by default if no setting is
made with function .MOIEL.

31

. MONOP

Wait for all activity to stop.

32

. MOLOC

Specifies the first volume in a MOUNT request, or
identifies the "next" volume for a volume switch.
This
function
requires
OPERATOR
or
WHEEL
capability.
AC3 contains a pointer to an argument block having
the following format:
Word

Symbol

Contents

0
1

. MOCNT
. MOMTN

2
3
4
5
6

. MOLBT
. MODNS
. MOAVL
. MONVL
. MOCVN
. MOVSN

count of words in the block
MT unit number to associate with
this MTA
label type (. LTxxx)
density
address of volume labels
number of volume labels at . MOAVL
volume number in the volume set
SIXBIT file set identifier

7

The JFN need not be open for this function.
37

.MOSTA

Return current
argument block
contents:

magtape
status.
Returns
the following
form
having

an
and

Contents

Word

Symbol

o

.MOCNT

Count of words in
this word

1

. MODDN

density flags
Bl
B2
B3
B4
B5

SJ%CP2
SJ%CP5
SJ%CP8
SJ%C16
SJ%C62

Word

Symbol

Contents

2

. MODDM

data mode flags

the

block

including

200 BPI
556 BPI
800 BPI
1600 BPI
6250 BPI

Bit

Symbol

Meaning

Bl
B2
B3
B4
B5

SJ%CMC
SJ%CM6
SJ%CMA
SJ%CM8
SJ%CMH

core dump
SIXBIT
ANSI ASCII
industry compatible
high den::::ity mode

3-260

TOPS-20 MONITOR CALLS
(MTOPR)
Word

Symbol

Contents

3

. MOTRK

recording track flags

4

5

.MOCST

. MODVT

Bit

Symbol

Meaning

Bl
B2

SJ%7TR
SJ%9TR

7-track drive
9-track drive

tape status flags
Bit

Symbol

Meaning

BO
Bl

SJ%OFS
SJ%MAI

B2

SJ%MRQ

B3
B4
B5

SJ%BOT
SJ%REW
SJ%WLK

off line
maintenance mode
enabled
maintenance mode
requested
beginning of tape
rewinding
write locked

devicE~

type

Code

Symbol

Meaning

3
17
20
21
13
19

.MTT45
.MTT70
.MTT71
.MTT72
.MTT77
.MTT78

TU45
TU70
TU71
TU72
TU77
TU78

(system default)

The JFN need not be open for this function.
40

.MOOFL

Enable interrupts for
online/offline transition.
Allows a process to be interrupted if a magnetic
tape drive's state changes from online to offline
or
vice-versa
and
when a
rewind operation
completes.
This function must be performed once
for
each drive
for which
interrupts are to be
enabled.
If multiple drives are enabled
for
interrupts,
then a
. MOSTA function should be
performed (for each drive) before
interrupts for
the drives are enabled.
Then, when an interrupt
occurs, .MOSTA can be performed for each drive and
the current status of that drive can be compared
against the previous status.
Thus,
it can be
determined which drive (or drives) interrupted.
This
function
OPERATOR
or
WHEEL
rquires
capability.
The JFN need not be open for this
function.

3-261

TOPS-20 MONITOR CALLS
(MTOPR)

Code

Symbol

Meaning

42

.MOPST

Declares the software interrupt channel to be used
by the monitor to indicate that the UTL labels at
the end-of-volume or the UHL labels at the start
of the new volume are available.
If this MTOPR is
not performed before an EOV
label
set
is
encountered, the user program will not be given
the opportunity to process the UTL or UHL labels
during the volume switch operation.
AC3 contains the PSI channel number to set.
channel can be cleared by using -1 in AC3.

The

This function is for labeled tapes only.
43

. MORVL

Rewind current labeled tape volume.
is for labeled tapes only.

44

. MOVLS

Switch volumes for an unlabeled multi-volume set.
If an unlabeled tape is
mounted
specifying
multiple volumes in the volume set, the monitor
will not automatically perform a volume switch at
the end of each volume. The .MOVLS function may
be issued in such a case to perform a volume
switch. This function is legal only for unlabeled
MT devices.
AC3 contains the address of
having the following format:
Word

o
1
2

Symbol

an

This function

argument

block

Contents
count of words in block
this word
flags"function code
argument (if required)

including

Available functions are:
Word

Symbol

Function

1

.VSMNV

2

.VSFST

3

.VSLST

4

.VSMRV

mount
absolute
volume
number
(vol umE~ number in
word
of
the
2
argument block)
mount first volume
in set
mount last volume
in set
mount
relative
volume
number
(volume number in
word
2
of
the
argument block)

3-262

TOPS-20 MONITOR CALLS
(~OPR)

44

45

.MOVLS (Cont.)

. MONTR

Word

Symbol

Function

4

.VSMRV
(Cont.)

5

.VSFLS

For
.VSMRV,
the
argument in word
2
of
the
argument
block is the volume
number
relative to
the current mounted
volume
to mount.
For
example,
if
volume
2
is
currently
mounted
and
.VSMRV
is
performed with 2 in
word
2
of
the
argument
block,
then volume 4 will
be
mounted.
Specifying
1
in
word
2
of
the
argument block will
mount
the
next
volume in the set.
force volume switch
for
labeled tape.
This function
is
only for tapes for
which
.MOSDS
has
previously
been
set.

Set no translate.
Sets or clears the EBCDIC to ASCII translate flag.
If the flag is set and the tape file being read is
from an IBM EBCDIC volume, then all data delivered
to the user program will be in its original EBCDIC
form.
If the flag is not set,
and
the file
is
from an IBM EBCDIC volume, then all data delivered
to the user program will be in ASCII.
In order to
perform this translation, certain information may
be lost (as the EBCDIC character set contains 256
codes while the ASCII character set contains only
128 codes - see Appendix A for ASClI-to-EBCDIC
conversions) .
Note that the setting of this flag
has no effect on the data delivered by the MTU%
JSYS.
This setting applies until explicitly
changed or
until
the MT is dismounted.
The
default value of the flag is "clear" (translate).
If AC3 is zero, the translate flag is cleared.
AC3 is non-zero, the translate flag is set.
This function is for labeled tapes only.

3-263

If

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

46

. MORDL

Meaning
Read user header labels.
Labels must be read
immediately after the file is opened (and before
the first input is requested) or after a volume
switch has occurred and the volume switch PSI has
been generated.
.MORDL may be used to read either
the UHL or UTL labels. User header labels may be
read only if the file is opened for read or
append.
The labels may be a maximum of 76
characters long.
User trailer labels may be read at any time.
If
the program requests to read user trailer labels,
the tape will be positioned to the EOF trailer
section.
AC3 contains a byte
receiving the label.

pointer

to

the

area

for

On a successful return, AC2 contains the user
label
identifier.
This
will be the ASCII
character following the UHL or the UTL. AC3 will
contain an updated byte pointer.
This function is for labeled tapes only.
47

. MOWUL

Write user header labels or user trailer labels.
User header labels may be written only after the
file is opened (and before the first write is
performed) or when a PSI is generated, indicating
that a volume switch has occurred.
User header
labels may be written only if the file is opened
for write access.
User trailer labels may be read or written at any
time.
If the program requests to write user
trailer labels, the file will be terminated with
an EOF trailer section. Once user trailer labels
are written in this manner, no more data may be
read or ·written.
User trailer labels may also be written during a
volume switch sequence. Once the PSI indicating
EOV has been received, the user program may write
a UTL label into the EOV trailer section. This
operation must be performed at interrupt level.
AC3 contains a byte pointer to the label contents.
This string must contain 76 bytes of data (the
AC4
monitor will use only the first 76 bytes).
contains
a label identifier code
(any ASCII
character} .
It is possible to encounter EOT while writing the
first UTL in the EOF trailer set. This can occur
if the last data write overwrote the EOT mark. In
this instance, the user program will receive the
EOV PSI from within the code writing the UTL
labels for the file.
It is not possible to
receive an EOV PSI while writing the trailer
labels in the EOV set.

3-264

TOPS-20 MONITOR CALLS
(MTOPJR)
Code

Meaning

Symbol

This function is for labeled tapes only.
50

.MORLI

Reads the available fields
volume and header labels.

from

the

standard

AC3 contains a pointer to an argument block of the
form:
Word

o
1

2
3
4
5
6
7

10
11

12
13
14

Contents
count of words in block
word to store label type of this tape
Value

Symbol

Label Type

1
2
3
4

.LTUNL
.LTANS
.LTEBC
.LTT20

Unlabeled
ANSI
EBCDIC
TOPS-20

byte pointer to area for
storing volume
name string
byte pointer to area for
storing owner
name string
word to
store
tape
format
(ASCII
charact,er)
word to store record length
word to store block length
word to store ~reation date (in internal
format)
word to store
expiration
date
(in
internal format).
Returns a -1 in this
word if the date is invalid.
byte pointer to area for
storing file
name string
word to store generation number
word to store version number
word to store mode value
(form-control
value) •
The
possible modes are as
follows:
Mode
Value
space
A

M
X

Meaning
no line format characters are
present
FORTRAN format control
characters are present
All necessary line format
characters are present
Data in stream mode

The user specifies only the block count and the
byte pointers;
the remaining values are returned
by the monitor.
If a zero is substituted for
any
of the byte pointers, then the associated string
is not returned.

3-265

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

Meaning

50

.MORLI
(Cont. )

This function is normally issued when the JFN is
open.
If issued when the JFN is closed, only the
first 3 words of the argument block are returned.
If the tape is unlabeled, only the first word of
the argument block is returned.
For labeled tapes
only.

51

. MOSMV

Declares the value to be placed in the DEC-defined
"form-control" field
in the HDR2 label. This
field is not defined in the ANSI standard but
should be specified whenever the data file is
meant to be read with DEC-supplied software. This
function merely declares the value to be placed in
the
label.
It
is
the
user
program's
responsibility to produce records that conform to
the declared mode.
AC3 contains one of the following modes:
Value

Symbol

Mode

0
1

.TPFST
.TPFCP

2
3

.TPFFC
.TPFNC

X - (stream mode)
M - (all formatting control
present)
A - (FORTRAN control present)
space - (no controls present)

This function is for labeled tapes only.
52

.MOSDS

Set deferred volume switch.
Inhibits the monitor
from doing an automatic volume switch and allows a
program to write its own trailer information
beyond
the
physical end-of-tape mark.
This
function is intended for labeled MT devices open
for writing in DUMP mode.

PLPT Functions
The functions available for physical line printers
(PLPT)
are
described below.
Some of these functions accept the address of an
argument block in AC3. The first word of the argument block contains
the length (including this word) of the block. Remaining words of the
block contain arguments for the particular function.
Code

Symbol

27

.MOPSI

Meaning
Enable for a software interrupt on nonfatal device
conditions. Examples of these conditions are:
1.

Device changed from offline to online.

2.

Device changed from online to offline.

3.

Device's page counter has overflowed.

Other device errors or software conditions are not
handled by this function;
instead they cause a
software interrupt on channel 11 (.ICDAE).

3-266

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

27

.MOPSI
(Cont.)

Meaning
Argument Block
E:
E+l:
E+2 :

3
interrupt channel number
flags.
The following flag is defined:

BO(MO%MSG)

Suppress standard
messages.

CTY

device

31

. MONOP

Wait for all activity to stop.
This function
blocks
the process until
all data has actually
been sent to the printer and
has been printed.
Because this function is transferring data, it can
return an IOX5 data error.

32

. MOLVF

Load the line printer's VFU
(Vertical
Formatting
Unit)
from the
file
indicated
in the argument
block.
Argument Block
E:
E+I:

.2
JFN of the file containing the VFU

The system opens the. file for input wi th a
byte
size of 18 bits.
It closes the file and releases
the JFN when the loading of the VFU is complete.
33

. MORVF

Read the name of the current VFU
the monitor's data base.

file

stored

in

Argument Block

E:
E+l:
E+2:
34

.MOLTR

:3

pointer to destination area for
ASCIZ
string
number of bytes in destination area

name

Load the line printer's
translation RAM
(Random
Access Memory)
from
the
file
indicated in the
argument block.
Argument Block

E:
E+l:

2
JFN of the file containing
RAM

the

translation

The system opens the file for input with a
byte
size of 18 bits.
It closes the file and releases
the JFN when the loading of the translation RAM is
complete.
35

.MORTR

Read the name of the current translation RAM
stored in the monitor's data base.

file

Argument Block

E:
E+I:
E+2:

3
pointer to destination area for
ASCIZ
string
number of bytes in destination area
3-267

name

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

36

.MOSTS

Meaning
Set the status of the line printer.
Argument Block

E:
E+l:
36

. MOSTS

3
software status word,
with the following
status bits settable by the caller:
BO(MO%LCP)

Set line printer as a lowercase
printer.

B12(MO%EOF)

Set bit MO%EOF in the printer
status word when all data sent
to printer has actually been
printed.
The status word can
be obtained wi th the
. MORST
function.

B14(MO%SER)

Clear
the
software
error
condition on the line printer.
This condition usually occurs
on a character interrupt.

Other status bits can be read with the
. MORST function
(see below) but cannot be
set by the caller.
E+2:

value for page counter register.
The caller
can
indicate the number of pages to be
printed by specifying a value of up to 12
bits
(4096).
Each time the printer reaches
the top of a new page,
it decrements the
value by one.
When the value becomes zero,
the printer sets status bit MO%LPC and
generates
an
interrupt
if the
.MOPSI
function was given previously.
If the caller specifies a value of 0 in the
register,
the system will maintain the page
counter and will not generate an interrupt
to the caller when the page counter becomes
zero.
If the caller specifies a value of -1 in the
register, the value will be ignored.

37

.MORST

Read the status of the line printer.
The status
is obtained from the front end, and the caller is
blocked until it receives the status.
Argument Block

E:
E+l:

3
status word.
defined:
BO(MO%LCP)

3-268

The

following

bits

are

Line printer is a
lower case
printer.
This bit is set only
if a .MOSTS function declaring
the
printer
lower case was
executed previously.

TOPS-20 MONrrOR CALLS
(MTOP]R)
Code

Symbol

37

• MORST
(Cont.)

Meaning
Bl (MO%RLD)

Front end has been reloaded.
This bit is reset to zero the
next
time any I/O activity
begins for the line printer.

BlO(MO%FER)

A
fatal
hardware
error
occurred.
This
condition
generates a software interrupt
on channel 11 (.ICDAE).

B12(MO%EOF)

All data sent to printer
actually been printed.

B13(MO%IOP)

Output to the line
in progress.

B14(MO%SER)

A
software
error
(e.g.,
interrupt
character,
page
counter overflow) occurred.

B15(MO%HE)

A hardware
error
occurred.
This error generates a software
interrupt
on
channel
11
(.ICDAE).
This
condition
usually requires that the forms
be realigned.

B16(MO%OL)

Line printer is offline.
This
bit is set on the occurrence of
any hardware condition
that
requires operator intervention.

B17(MO%FNX)

Line printer does not exist.

B30(MO%RPE)

A RAM parity error occurred.

B3l(MO%LVU)

The line printer has an optical
(12-channel tape reader) VFU.

B33(MO%LVF)

A VFU error occurred.
paper has to be realigned.

B34(MO%LCI)

A character interrupt occurred.
This
generates
a
software
interrupt
on
channel
11
(. ICDAE) •

B35(MO%LPC)

The page counter
overflowed.

printer

register

has
is

The

has

Bits 2-17 contain the software status word
from the front end, and bits 20-35 contain
the hardware status word.
E+2:

40

.MOFLO

value of page counter register.
A value of
-1 indicates the printer has no page counter
value defined.

Flush any line printer output
been printed.

3-269

that

has

not

yet

TOPS-20 MONITOR CALLS
(MTOPR)
PCDP Functions
The functions available for physical card punches (PCDP) are described
below. Like the PLPT functions, these functions accept the address of
an argument block in AC3. The first word of the block contains the
length
(including this word)
of the block. Remaining words in the
block contain arguments for the particular function.
Code

Symbol

27

.MOPSI

Meaning
Enable for a software interrupt on nonfatal device
conditions. Examples of these conditions are:
1.

Device changed from offline to online.

2.

Device changed from online to offline.

Other device errors or software conditions are not
handled by this function;
instead they cause a
software interrupt on channel 11 (.ICDAE).
Argument Block
E:

3

E+l:
E+2 :

interrupt channel number
flags.
The following flag is defined:
BO(MO%MSG)

37

.MORST

Suppress standard
messages.

CTY

device

Read the status of the card punch. The status is
obtained from the front end, anc the caller is
blocked until it receives the status.
Argument Block
E:
E+l:

2
status word.
Bits 2-17 contain the software
status word from the front end, and bits
20-35 contain the hardware status word.

BIO(MO%FER)
B12 (MO%EOF)
B13 (MO%IOP)
B14 (MO%SER)
B15(MO%HE)
B16 (MO%OL)

B17(MO%FNX)
B32(MO%HEM)
B33(MO%SCK)
B34(MO%PCK)
B35(MO%RCK)

3-270

Fatal error condition
All pending output has been
processed
Output in progress
Software error has
occurred
(would generate an interrupt on
an assigned channel)
Hardware error has
occurred
(would generate interrupt on
channel .ICDAE)
Card punch is offline.
This
bit
is
set
when operator
intervention is required
(card
jam, hopper empty, or stacker
full) .
Card punch doesn't exist
Hopper is empty or stacker is
full
Stack check
Pick check
Read check

TOPS-20 MONITOR CALLS
(MTOPR)
PCDR Functions
The functions available for physical card readers (PCDR) are described
below.
These functions
accept the address of an argument block in
AC3.
The first word of the block contains the length (including
this
word)
of the block.
Remaining words in the block contain arguments
for the particular function.
Code

Symbol

27

.MOPSI

Meaning
Enable for a software interrupt on nonfatal device
conditions.
Examples of these conditions are:
1.

Device changed from offline to online.

2.

Device changed from online to offline.

Other device errors or software conditions are not
handled
by this
function;
instead they cause a
software interrupt on channel 11 (.ICDAE).
Argument Block
E:

:3

E+l:
E+2:

interrupt channel number
flags.
The following flag is defined:
BO(MO%MSG)

37

.MORST

Suppress standard
messages.

CTY

device

Read the status of the card reader.
The status is
obtained
from
the front end, and the caller is
blocked until it receives the status.
Argument Block
E:
E+l:

:2
status word.
Bits 2-17 contain the software
status word
from
the front end, and bits
:20-35 contain the hardware status word.
BO(MO%COL)

Card reader is on line.
This
bit
is not obtained from the
front end.

Bl(MO%RLD)

Front end has been reloaded.
This bit
is reset to zero the
next time I/O activity begins
for the card reader.

10(MO%FER)

A
fatal
hardware
error
occurred.
This
condition
generates a software
interrupt
on channel 11 (.ICDAE).

BI2(MO%EOF)

Card reader is at end of file.

J313(MO%IOP)

Input from the card
in-progress.

J314(MO%SER)

A
software
error
(e.g.,
interrupt character) occurred.

3-271

reader

is

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

37

• MORST
(Cont.)

Meaning
B15(MO%HE)

A
fatal
hardware
error
occurred.
This error generates
a software interrupt on channel
11 (. ICDAE).

B16(MO%OL)

Card reader is off line.
This
bit is set on the occurrence of
any hardware condition
that
requires operator intervention.

B17(MO%FNX)

Card reader does not exist.

B31(MO%SFL)

The output stacker is full.

B32(MO%HEM)

The input hopper is empty.

B33(MO%SCK)

A card did not stack correctly
in the output stacker.

B34(MO%PCK)

The card reader failed to pick
a card correctly from the input
hopper.

B35(MO%RCK)

The card reader detected a read
error when reading a card.

PTY Functions
The functions available for
pseudo-terminals
(PTY)
are
below.
Some of these functions accept arguments in AC3.
the individual descriptions.)

descr ibed
(Refer to

Code

Symbol

24

. MOAPI

Assign PTY interrupt channels .
This function
requires AC2 to contain
BO (MO%WFI)
enable waiting-for-input interrupt
Bl(MO%OIR)
enable output-is-ready interrupt
B12-B17(MO%SIC) software interrupt channel number
for
output
to the PTY.
The
channel number used for input from
the PTY is one greater than the
channel number used for output to
the PTY.
B18-B35
function code

25

.MOPIH

Determine if PTY job needs input.
On a successful
return,
AC2 contains O(.MONWI) if PTY job is not
waiting for input or contains -l(.MOWFI)
if PTY
job is waiting for input.

26

.MOBAT

Set batch control bit.
This function requires AC3
to contain 0 (.MONCB)
if the
job is not to be
controlled by batch or to contain l(.MOJCB) if the
job is to be controlled by batch.
To obtain this
value, the process can execute the GETJI JSYS,
function .JIBAT.

Meaning

3-272

TOPS-20 MONITOR CALLS
(MTOPR)
TTY Functions
Code

Symbol

25

.MOPIH

Determine if TTY job needs input.
On a successful
return,
AC2 contains O(.MONWI) if TTY job is not
waiting for input or contains -l(.MOWFI)
if TTY
job is waiting for input.

26

.MOSPD

Set the terminal
line speed.
This
function
accepts in AC3 the desired line speed (input speed
in the left half and output speed
in the
right
half) .
The left half of AC2 contains flag bits
indicating
the
type of
line being
set.
If
BO(MO%RMT)
is on, the line is a remote (dataset)
line.
If Bl(MO%AUT) is on, the line is a
remote
autobaud
line
(is automatically set at 300 baud,
and the contents of AC3 are ignored.
The process
must have WHEEL or OPERATOR capability enabled to
set BO(MO%RMT) and Bl(MO%AUT).
In addition, these
bits can only be set at start-up time.
They
cannot be set during timesharing.)

Meaning

27

. MORSP

Return the terminal line speed.
On a
successful
return,
the left half of AC2 contains flag bits
indicating the type of line, and AC3 contains the
speed
(input speed
in the left half and output
speed in the right half).
If BO(MO%RMT) of AC2 is
on,
the line is a remote line, and if Bl(MO%AUT)
is on, the line is a remote autobaud
line.
AC3
contains the speed or contains -1 if the speed is
unknown or is not applicable.

30

. MORLW

Return the terminal page width.
return, AC3 contains the width.

31

.MOSLW

Set the
terminal page width.
This
function
requires AC3 to contain the desired width.

32

.MORLL

Return the terminal page length.
return, AC3 contains the length.

33

.MOSLL

Set the
terminal page length.
This function
requires AC3 to contain the desired length.

34

. MOSNT

Spec~fy

if terminal
line given in ACI
is to
receIve system messages.
This function requires
AC3 to contain 0 (.MOSMY) to allow messages or
1
(.MOSMN) to suppress messages.

35

. MORNT

Return a code indicating if terminal line given in
ACl
is
to
receive
system messages.
On a
successful return,
AC3 contains 0
(.MOSMY)
if
messages are being sent to this line or 1 (.MOSMN)
if messages are being suppressed to this line.

3-273

On

a

On a

successful

successful

I

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

36

.MOSIG

Specify if input on this terminal line
is to be
ignored when the line is inactive (i.e., is not
assigned or opened).
This function
requires AC3
to contain a if characters on this line are are
not to be ignored or 1 if characters on this line
are to be
ignored.
When input is being ignored
and characters are
typed,
no CTRL/G
(bell)
is
sent,
as is the normal case when characters are
typed on an inactive line.

37

.MORBM

Read the l28-character break mask.
The argument
block
(filled
in by monitor) is the same as for
.MOSBM (below).

40

. MOSBM

Set the l28-character break mask .

Meaning

Argument Block:
E:
0, ,4
E+I-E+4: character mask.
The leftmost 32 bits of
each consecutive word correspond to the
ASCII character set in ascending order.
For example,
IBO
in word E+l (of the
argument block) corresponds to ASCII code
000
(null),
lBl in word E+l corresponds
to ASCII code 001 (SOH).
Bits 32-35 of
each word must be zero.

41

. MORFW

Return the current value of the field width
in
AC3.
Note
that
this may be less than the value
last set by .MOSFW.
If the field width is set to
value X and
two characters are read before the
.MORFW is executed, the value returned will be
X-2.
A zero returned
in AC3 indicates that no
field width is now in effect.

42

.MOSFW

Set the field width to the value in AC3.
A
indicates that no field width is in effect.

43

.MOXOF

Enable/disable pause-at-end-of-page mode.
This
function controls the TOPS-20 feature that sends
exactly n lines of data
to the
terminal
and
suspends data
transmission
(n
is the terminal
length parameter, set by function
.MOSLL).
The
user may manually resume data
transmission by
typing "Q.

zero

AC3 contains one of the following values:

a
1

.MOOFF Disable pause-at-end-of-page mode
.MOONX Enable pause-at-end-of-page mode

Note that this feature operates
independently of
the pause-on-command mode implemented in the JFN
mode word (see bit TT%PGM of the JFN mode word) .

I

44

.MORXO

Read the end-of-page mode.
This function returns,
in AC3,
a one if PAUSE ON END-OF-PAGE is set for
the terminal, a zero otherwise.

3-274

TOPS-20 MONITOR CALLS
(MTOPR)
Code

Symbol

45

. MOSLC

Set the terminal's line counter to value
in AC3 .
This
counter
is
incremented by the monitor
every time a linefeed is output to
the terminal.
The monitor clears this counter only when a line
becomes active.

46

. MORLC

47

.MOSLM

Read the terminal's line counter and
return with
its value in AC3.
Set line maximum to the value
in AC3.
This
function
sets the maximum value of the line
counter seen so far.
The monitor compares the
line
counter with the maximum every time a
linefeed is typed, and if the line counter value
is larger,
the monitor sets the line maximum to
the value of the line counter.
When TEXTI moves
the cursor up on screen terminals, it decrements
the line counter.

50

. MORLM

Read the current value of
the
return with its value in AC3.

51

.MOTPS

Assign terminal interrupt channels.
An
interrupt
will be generated if a character is input, or an
output-buffer-empty condition occurs on output.

Meaning

line

maximum

and

AC3 contains the address of a
two-word argument
block.
The first word of the block contains the
number of words in the block (2), and
the second
word of the block contains the following:
output
PSI channel, ,input PSI channel.
All
input or
output PSI channels for the terminal are cleared
by placing a -1 in the appropriate half,
or both
halves, of word 2 of the argument block.

52

.MOPCS

Set the pause and
unpause characters for
the
terminal.
This function requires that AC3 contain
the pause character in the
left half,
and
the
unpause
(continue-after-pause)
character
in the
right half.
The characters can be the
same,
but
should not be CTRL/Q or CTRL/S.

53

.MOPCR

Read
the
terminal
pause
and
unpause
(continue-after-pause)
characters.
This function
returns, in AC3, the pause character in the elft
half, and the unpause character in the right half.

Generates an illegal instruction interrupt on error conditions below.
MTOPR ERROR MNEMONICS:
ANTXOl:

No more network terminals available

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

TOPS-20 Version 5

3-275

April 1982

TOPS-20 MONITOR CALLS
(MTOPR)

I

DESX5 :

File is not open

DESX9:

Invalid operation for this device

DEVX2 :

Device already assigned to another job

IOX4:

End of labels encountered

IOX5:

Device or data error

MTOXI:

Invalid function

MTOX2 :

Record size was not set before I/O was done

MTOX3 :

Function not legal in dump mode

MTOX4 :

Invalid record size

MTOX5 :

Invalid hardware data mode for magnetic tape

MTOX6:

Invalid magnetic tape density

MTOX7:

WHEEL or OPERATOR capability required

MTOX8:

Argument block too long

MTOX9:

Output still pending

MTOXIO:

VFU or RAM file cannot be OPENed

MTOXII:

Data too large for buffers

MTOXI2:

Input error or not all data read

MTOXI3:

Argument block too small

MTOXI4:

Invalid software interrupt channel number

MTOXI5:

Device does not have Direct Access (programmable) VFU

MTOXI6:

VFU or Translation RAM file must be on disk

MTOXI7:

Device is not on line

MTOXI8:

Invalid software interrupt channel number

MTOXI9:

Invalid terminal line width

MTOX20:

Invalid terminal line length

TTYXOI:

Line is not active

3-276

TO'PS- 2 0 MON ITOR CALLS
(MTU%)

JSYS

MTU%

600

Allows privileged programs to perform various utility functions for
magnetic-tape MT:
devices.
This JSYS differs from the MTOPR JSYS in
that the invoking program need not have a JFN on the MT nor need
it
even have access to the MT.
It is used by MOUNTR to declare a volume
switch error and by the access-control program (user supplied) to read
file and volume labels.
RESTRICTIONS:

:Requires enabled WHEEL or OPERATOR capabilities

ACCEPTS IN ACI:

function code

RETURNS

AC2 :

f-/IT uni t number

AC3:

address of argument block

+1:

always

The functions and associated argument blocks are as follows:
Code
I

Symbol

Function

.MTNNV

Declare volume switch error
Argument Block:
Word

o
1
2

2

.MTRAL

Contents

Symbol
.MTCNT
.MTCOD
.MTPTR

count of words in block
error code to return to user
byte pointer to operator response

Read labels
ArgumE~nt

Word

Block:

Symbol

1

.MTCNT
.MTVLI

2

.MTVL2

3

.MTHDI

4

.MTHD2

0

Contents
count of words in block
byte pointer to area to
label
byte pointer to area to
label
byte pointer to area to
label
byte pointer to area to
label

If any of the byte pointers
is
associated string is not returned.

hold

VOLI

hold

VOL2

hold

HDRI

hold

HDR2

zero,

the

The label values are always returned without
translation.
For example,
if the tape
is an
EBCDIC labeled tape, the returned data will be
EBCDIC data.

3-277

TOPS-20 MONITOR CALLS
(MTU%)
Code

Symbol

3

.MTASI

Function
return assignment information
Argument Block:
Word

o
I

Symbol

Contents

.MTCNT
.MTPHU

count of words in block
returned
MTA number
associated
with
the MT.
If
there
is no
association, .MTNUL is returned.

This function is used by MOUNTR to determine
there are any existing MT to MTA associations.
4

.MTCVV

if

Clear the volume ID for
the
specified MT unit.
This
request will fail if the MT is opened or if
the volume belongs
to a
labeled volume set.
Requires WHEEL or OPERATOR capabilities enabled.
There is no argument block.

MTU% ERROR MNEMONICS:
ARGX04:

Argument block too small

ARGX05:

Argument block too long

CAPXI:

WHEEL or OPERATOR capability required

DESXI:

Invalid source/destination designator

DESX9:

Invalid operation for this device

IOX8:

Monitor internal error

OPNXI:

File is already open

OPNX8:

Device is not on line

3-278

TOPS-20 MONITOR CALLS
(MUTIL)

MUTIL

JSVS

512

Performs
various
IPCF
(Inter-Process
Communication
Facility)
functions,
such as enabling and disabling PIDs, assigning PIDs, and
setting quotas.
Refer to the TOPS-20 Monitor Calls User's Guide for
an
overview and description of the
Inter-Process Communication
Facility.
RESTRICTIONS:

some functions
require
capability enabled

ACCEPTS IN ACl:

length of argument block

AC2:
RETURNS

WHEEL,

OPERATOR,

or

IPCF

address of argument block

+1:

failure,

error code in ACI

+2:

success.
Responses from the requested
returned in the argument block.

function

are

The format of the argument block is as follows:
Word

Meaning

o
1 through n

Code of desired function.
(See below.)
Arguments
for
the
desired
function.
The
arguments, which depend on the function requested,
begin in word 1 and are given in the order
shown
below.
Responses from the requested function are
returned in these words.

The available functions, along with
below.
Code
1

Symbol
.MUENB

their

arguments,

are

described

Meaning
Enable the specified PID to receive packets.
The
PID must have been created by the caller's job.
Also, if the calling process was not
the creator
of the PID, the no-access bit (IP%NOA) must be off
in the IPCF packet descriptor block.
Argument
PID

2

.MUDIS

Disable the specified PID from receiving
The PID must have been created by the
job.
Alsb, if the calling process was
creator of the PID,
the no-access bit
must be off in the IPCF packet descriptor
Argument
PID

3-279

packets.
caller's
not
the
(IP%NOA)
block.

TOPS-20 MONITOR CALLS
(MUTIL)

Code
3

Symbol
.MUGTI

Meaning
Return the PID associated with INFO.
The
PID is returned in word 2 of the argument block.
Argument
PID or job number

4

.MUCPI

I

Create a private copy of INFO for the
specified
job.
The
caller must have IPCF
capability enabled.
Arguments
PID to be assigned to INFO
PID or number of job creating private copy

5

.MUDES

Delete the specified PIO.
PID being deleted.

The caller must own the

Argument
PID
6

.MUCRE

Creates a PID for the specified process or job.
The flags that can be specified are B6(IP%JWP) to
make the PID job wide and B7(IP%NOA)
to prevent
access to PID from other processes. The caller
must have IPCF capability enabled if the job
number given is not that of the caller. The PID
created is returned in word 2 of the argument
block.
If a job number is specified, the created
PID will belong to the top fork of the job.
Argument
flags"process handle or job number

7

.MUSSQ

Set send and receive quotas for the specified PID.
The caller must have IPCF capability enabled. The
new send quota is given in B18-B26, and the new
receive quota is given in B27-B35. The receive
quota applies to the specified PID, but the send
quota applies to the job to which that P~D
belongs.
Arguments
PID
new quotas

I

10

.MUCHO

Change the job number
associated
specified
PID.
The caller must
capability enabled.

with
the
have WHEEL

Arguments
PID
new job number or PID belonging to new job

3-280

TOPS-20 MONITOR CALLS
(MUTIL)
Code

Symbol

11

.MUFOJ

Meaning
Return the
job number
associated
with
the
specified PID.
The job number is returned in word
2 of the argument block.
Argument
PID

12

.MUFJP

Return all PIDs associated with the specified job.
Two words are returned, starting in word 2 of the
argument block, for each PID.
The first word
is
the PID.
The second word has B6{IP%JWP) set if
the prD is job wide and B7{IP%NOA) set if the PID
is not accessible by other processes.
The list is
terminated by a 0 PID.
Argument
job number or PID belonging to that job

13

.MUFSQ

Return the send and
receive quotas for
the
specified PID.
The quotas are returned in word 2
of the argument block with the send quota
in
B18-B26 and the receive quota in B27-B35.
The
receive quota applies to the specified PID,
but
the send quota applies to the job to which that
PID belongs.
Argument
PID

15

.MUFFP

Return all PIDs associated with the same process
as that of the specified PID.
The list of PIDs
returned is in the same format as the list
returned for the .MUFJP function (12).
Argument
PID

16

.MUSPQ

Set the maximum number of PIDs allowed for
the
specified
job.
The
caller must have IPCF
capability enabled.
Arguments
job number or PID
PID quota

17

.MUFPQ

Return the maximum number of PIDs allowed for
the
specified
job. The PID quota is returned in word
2 of the argument block.
Argument
job number or PID

3-281

TOPS-20 MONITOR CALLS
(MUTIL)
Code

Symbol

20

. MUQRY

Meaning
Return the Packet Descriptor Block for
the next
packet
in the queue associated with the specified
PID.
An argument of -1
returns'
the
next
descriptor
block for the process, and an argument
of -2 returns the next descriptor block
for
the
job.
The descriptor block is returned starting in
word 1 of the argument block.
The calling process
and
the process that owns the specified PID must
belong to the same joh.
Argument
PID

21

.MUAPF

Associate the PID with the specified process.
The
calling process and
the process that owns the
specified PID must belong to the same job.
Arguments
PID
process handle

22

.MUPIC

Place the specified PID on a
software
interrupt
channel.
An interrupt is then generated when:
1.

The .MUPIC function is issued while
the PID
has one or more messages in its receive queue.

2.

The PID's receive queue changes its state from
empty to containing a messagE~.
Subsequent
entries to a queue that is not empty do not
cause an interrupt.

If the channel number is given as -I, the
removed from its current channel.

PID

The calling process and the process that owns
specified PID must belong to the same job.

is
the

Arguments
PID
channel number

23

.MUDFI

Set the PID of INFO.
An error is given if
INFO already has a PID.
The caller must
have IPCF capability enabled.
Argument
PID of INFO

3-282

TOPS-20 MONITOR CALLS
(MUTIL)
Code

Symbol

24

.MUSSP

Meaning
Place the specified PID into the system PID table
at the given offset.
The caller must have WHEEL,
OPERATOR, or IPCF capability enabled.
See
.MURSP
for a list of system PIDs.
Arguments
index into system PID table
PID

25

.MURSP

Return a PID from the system PID table.
The PID
is returned in word 2 of the argument block.
The
system PID table currently has the following
entries:

o
1
2
3
4

.SPIPC
.SPINF
.SPQSR
.SPMDA
.SPOPR

Reserved for DEC
PID of INFO
PID of QUASAR
PID of QSRMDA
PID of ORION

Argument
index into system PID table
26

.MUMPS

Return the system-wide maximum packet size.
The
size is returned in word 1 of the argument block.

27

.MUSKP

Set PID to receive deleted PID messages.
Allows a
controller task
to be notified
if one of its
subordinate tasks crashes.
After this function is
performed,
if the subordinate PID is ever deleted
(via RESET or the
.MUDES MUTIL function),
the
monitor
will
send
an IPCF message to the
controlling PID notifying it that the subordinate
PID has been deleted.
This message contains
.IPCKP in word 0 and the deleted PID in word 1.
Argument
Source (subordinate) PID
Object (controller) PID

30

.MURKP

Return controlling PID for this subordinate PID.
Argument
Source (subordinate) PID
Object (controller) PID (returned)

MUTIL ERROR MNEMONICS:
IPCFX2:

No message for this PID

IPCFX3:

Data too long for user's buffer

IPCFX4:

Receiver's PID invalid

IPCFX5:

Receiver's PID disabled

IPCFX6:

Send quota exceeded
3-283

TOPS-20 MONITOR CALLS
(MUTIL)
IPCFX7:

Receiver quota exceeded

IPCFX8:

IPCF free space exhausted

IPCFX9:

Sender's PIO invalid

IPCFlO:

WHEEL capability required

IPCFll:

WHEEL or IPCF capability required

IPCFl2:

No free PIO's available

IPCFl3:

PIO quota exceeded

IPCFl4:

No PIO's available to this job

IPCFl5:

No PIO's available to this process

IPCFl6:

Receive and message data modes do not match

IPCFl7:

Argument block too small

IPCFl8:

Invalid MUTIL JSYS function

IPCFl9:

No PIO for

IPCF20:

Invalid process handle

IPCF2l:

Invalid job number

IPCF22:

Invalid software interrupt channel number

IPCF23:

[SYSTEM] INFO already exists

IPCF24:

Invalid message size

IPCF25:

PIO does not belong to this job

IPCF26:

PIO does not belong to this process

IPCF27:

PIO is not defined

IPCF28:

PIO not accessible by this process

IPCF29:

PIO already being used by another process

IPCF30:

job is not logged in

IPCF32:

page is not private

IPCF33:

invalid index into system PIO table

IPCF35:

Invalid IPCF quota

[SYSTEM]INFO

3-284

TOPS-20 MONITOR CALLS
(NIN)
NIN

JSYS 225

Inputs an integer number, with
leading
spaces
ignored.
This call
terminates on the first character not in the specified radix.
If that
character is a carriage return followed by a line feed, the line
feed
is also input.
ACCEPTS IN ACl:
AC3:
RETURNS

source designator
radix

(2-10) of number being input

+1:

failure, error code in AC3, updated
if pertinent, in ACI

+2:

success, number in AC2 and updated string pointer,
pertinent, in ACI

NIN ERROR MNEMONICS:
IFIXXl:

Radix is not in range 2 to 10

IFIXX2:

First nonspace character is not a digit

IFIXX3:

Overflow (number is greater than 2**35)

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

3-285

string

pointer,
if

TOPS-20 MONITOR CALLS
(NODE)

NODE

JSYS 567

Performs the following network
utility functions:
set
local
node
name,
get
local
node
name,
set local node number, get local node
number, set loopback port, clear
loopback port,
and
find
loopback
port.
NOTE
Some of these functions
are duplicated
in the NTMAN% JSYS, which is preferred.
RESTRICTIONS:

Some
functions
require
WHEEL,
OPERATOR,
MAINTENANCE capability, or TOPS-20, Version 5.1.

ACCEPTS IN ACl:

function code

AC2:
RETURNS

+1:

or

address of argument block
always.
If an error occurs, an
trap is generated.

illegal

instruction

The available functions and their argument blocks are described below.
Code

Symbol

Function

o

.NDSLN

Set local node name
Requires WHEEL or OPERATOR capabilities.
Argument Block:

I

.NDGLN

Word

Symbol

Contents

o

.NDNOD

Byte pointer to ASCIZ node name.

Get local node name
.A.rgument Block:

2

.NDSNM

I

Word

Symbol

Contents

a

.NDNOD

Byte pointer
to destination
ASCIZ name of local node.

for

Set local node number
Requires WHEEL or OPERATOR capabilities.
Argument Block:

I
TOPS-20 Version 5.1

Word

Symbol

Contents

a

.NDNOD

Number to set (Pha:;e I I:
2
Phase
III:
from
127;
.NDMAX)

3-286

< n
1

<
to

December 1982

TOPS-20 MONITOR CALLS
(NODE)

3

.NDGNM

Get local node number
Argument Block:

4

.NDSLF

Word

Symbol

Contents

o

.NDNOD

Returned node number

Set loopback port

(2020 only)

Requires
WHEEL,
capabilities.

OPERATOR

or

I
MAINTENANCE

Argument Block:

5

.NDCLP

Word

Symbol

Contents

o

. NDPRT

NSP port number.
The
.BTCLl
function of the BOOT monitor call
converts a line number to an NSP
port number.

Clear loopback port

(2020 only)

Requires
WHEEL,
capabilities.

OPERATOR,

or

MAINTENANCE

Argument Block:

6

.NDFLP

Word

Symbol

Contents

o

. NDPRT

NSP port number.

Find loopback port

(2020 only)

Argument Block:
Word

Symbol

Contents

o

•NDPRT

NSP port number
IBO(ND%LPR) Loopback running
IBI(ND%LPA) Loopback port assigned

7

.NDSN'I'

Set network topology.
Sets the system's table of reachable nodes.
Requires WHEEL or OPERATOR capabilities.

TOPS-20 Version 5.1

Argument Block
Version 5.1 :

for

Word

Symbol

Contents

0

.NDNND

Number of following words in right
half.
Left half is reserved.

1

. NDCNT

Number of words in a node block

2

.NDBKI

(one
Addresses of N node blocks
for
for which updated
each node
to
information is to be conveyed
the monitor) .

3-287

monitors

prior

to

TOPS-20,

December 1982

I
I

I

TOPS-20 MONITOR CALLS
(NODE)

.NDSNT
(Cont. )

7

Node Block:
Word

Symbol

Contents

o

. NDNl\M

Byte pointer to ASCI7. node name

1

. NDSTA

Node state:
.NDSON
On
Add to table of reachable nodes if
not already there.
.NDSOF
Off
Remove from
table
there.

.NDNXT

2

if

previously

Byte pointer to the DN20 name.

Argument Block for TOPS-20, Version

~;

.1:

Word

Symbol

Contents

0

.NDNNO

Number of
nodes
topology message.

1

.NDMSK

Address of topology message.

reported

in

The topology message is m~de up of 8-bit bytes.
The bytes are left-justified within the topology
message word.
Each byte contains 4 2-bit fields.
A two-bit field giving the topology status
node has the following format:
00

for

a

Node not reachable

01

(reserved)

10

Reachable Phase II node

11

Reachable Phase III node

The bit fields are packed
four
byte
(see
to a
below) ,
~~he first byte
low-order
to high-order.
represents nodes 4 , 3,
2,
1;
the second byte
represents nodes 10, 7, 6, 5 ;
and so on.
4

10

3

2

.NDGNT

1

10

7

6

5

14

13

12

11

20

17

16

15

Get network topology.
Reads the system's table of reachable nodes.

TOPS-20 Version 5.1

3-288

December 1982

TOPS-20 MONITOR CALLS
(NODE)

10

.NDGNT
(Cont. )

Argument Block:
Word

Symbol

Contents

o

. NDNND

Number of following words
in the
right half (set by the user on the
call) and the number of nodes
for
which
the
monitor
actually
returned data
in
the
left half
(set by the monitor on return).

1

.NDCNT

Number of words in
(returned) .

2

.NDBKI

Addresses of N node blocks
(one
for
each
node
for
which
the
monitor returned data;
returned) .

. NDBKl+N

Start of an area
into which
the
monitor
sequentially placed node
blocks
(described
below).
If
there
is not enough space to hold
all of the information,
the NODE
JSYS will
return as much data as
will fit, and then fail with error
code ARGX04.
(Returned)

Node Block

Symbol

Contents

o

.NDNAM

Byte pointer
name

1

. NDSTA

Node state
Code

.NDNXT

.NDSIC

to

Symbol

the

block

ASCIZ

node

Meaning

0

.NDSON

On

1

.NDSOF

Off

Obsolete

(always 0)

ASCIZ node name (if node name .LE.
4 characters, Word 4 NOT returned)

3-4
11

node

(Returned):

Word

2

a

Set topology interrupt channel
This function is used by a process wishing
to be
notified
that the network topology has changed.
The program must do the .NDGNT function to obtain
the current topology.
Argument Block:

12

. NDCIC

TOPS-20 version S.l

Word

Symbol

Contents

o

. NDCHN

Channel number on which interrupts
are desired.

Clear topology interrupt channel
3-289

December 1982

TOPS-20 MONITOR CALLS
(NODE)
This function is used to clear
interru?t on
topology change
.NDSIC) .
13

.NDGVR

the
request
for
(set by function

Get NSP version number
Argument Block:
Word

Symbol

Contents

o

• NDNVR

Number of versions returned

1

. NDCVR

Address of a block
in which
the
NSP communications version will be
returned.
(Block format is
shown
below. )

2

. NDRVP

Address of a block
in which
the
NSP
routing
version
will
be
returned.
(Block format is shown
below. )

Version Block:
Word Symbol

14

.NDGLI

Contents

o

.NDVER

Version number

1

.NDECO

ECO number

2

.NDCST

Customer change order

Get line information
Returns information on lines known to NSP.
Argument Block:

TOPS-20 Version S.l

Word

Symbol

Contents

o

. NDNLN

Number of following words in right
half
(set by user
on call) and
number
of
lines
(N)
for
which
information was
returned
in the
left half
(set by monitor
on
return) .

I

.NDBKI

Addresses
of
N
blocks
of
information
for
each
line
for
which the monitor will return data
to
the user.
The format of these
blocks is described below .

. NDBKl+N

Start of an area
into which
the
monitor will
sequentially place
line blocks (described below).
If
there
is not enough space to hold
all of the information,
the NODE
JSYS
will
store
as much
as
possible and then fail with
error
code ARGX04.

3-290

December 1982

TOPS-20 MONITOF CALLS
(NODE)
14

.NDGLI
(Cont.)

Line Block:
Word

Symbol

Contents

a

. NDLNM
. NDLST

line number
State of Line

I

. NDLON
'. NDLOF
,.NDLCN
. NDLCB

15

.NDVFY

On
Off
Controller loopback
Cable loopback

2

.NDLND

Byte pointer to ASCIZ name of node
at the end of the line.

3

. NDLSZ

Size of node block .

Verify node name
This function
indicates whether
the node
name
supplied by the user is in the monitor's database
of known nodes, and if that node can be
reached
currently.
ArgumE~nt

I

Block:

Word

Symbol

Contents

o

.NDNOD

Byte pointer to ASCIZ node name to
be checked.

1

.NDFLG

Flags returned by monitor.
Flags:
ND%EXM

16

.NDRNM

The
specified
node
exactly matches a node
name in the monitor's
node database.

Return a node name.
This function converts a node number
name.
(TOPS-20, Version 5.1 only)

to

a

node

Argum 2nt Block:
l

Word

Symbol

Contents

o

. NDNOD

The node number

1

. NDCVR

Byte pointer
to area where
the
ASCIZ node name is to be returned.

NODE ERROR MNEMONICS:
ARGX02:

Invalid function

ARGX04:

Argument block too small

ARGX19:

Invalid unit number

CAPX2:

WHEEL, OPERATOR, or MAINTENANCE capability required

I

,,,

TOPS-20 Version 5.1

3-291

December 1982

TOPS-20 MONITOR CALLS
(NODE)

I
I

COMX19:

Too many characters in node name

COMX20:

Invalid node name

MONX06:

Insufficient system resources

NODX02 :

Line not turned off

NODX03:

Another line already looped

NSPX25 :

Illegal DECnet node number

NSPX26:

Table of topology watchers is full

TOPS-20 Version 5.1

3-292

(No swappable free space)

December 1982

TOPS-20 MONITOR CALLS
(NOUT)
NOUT

JSYS 224

Outputs an integer number.
ACCEPTS IN ACl:

destination designator

AC2:

number to be output

AC3:

BO(NO%MAG) output the magnitude.
That is, output the
number as an unsigned 36-bit number (e.g.,
output -1 as 777777 777777).
Bl(NO%SGN) output a plus sign for a positive number.
B2(NO%LFL)

output leading filler.
set,
trailing
filler
3(NO%ZRO) is ignored.

If this bit is not
is output, and bit

B3(NO%ZRO) output O's as the leading
filler
if
the
specified
number
of columns
(NO%COL)
allows filling.
If this bit is not set,
blanks are output as leading filler if the
number of columns allows filling.

RETURNS

B4(NO%OOV)

output on column overflow and
return an
error.
If this bit is not set, column
overflow is not output.

B5(NO%AST)

output asterisks on column overflow.
this bit is not set and bit 4 (NO%OOV)
set, all necessary digits are output
column overflow.

BII-B17
(NO%COL)

number of columns (including
sign column)
to output.
If this field is 0,
as many
columns as necessary are output.

818-B35
(NO%RDX)

radix

If
is
on

(2-36) of number being output

+1:

failure, error code in AC3

+2:

success, updated string pointer in ACl,

NOUT ERROR MNEMONICS:
NOUTXl:

Radix is not in range 2 to 36

NOUTX2:

Column overflow

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged
3-292.1

if pertinent

TOPS-20 MONITOR CALLS
(NTMAN%)

NTMAN%

JSYS 604

Provides an interface between the DECnet-20 Network Management
and lower layers of the Digital Network Architecture.

layer

RESTRICTIONS:

WHEEL or OPERATOR privileges are required.

ACCEPTS IN ACl:

address of argument block

RETURNS:

always.
If an error occurs, generates an illegal
instruction trap, with error code returned in ACI.

+1

NOTE
Users of the
familiar with
Specification.

NTMAN% JSYS
the Network

should be
Management

Format of Argument Block:
Word

Symbol

Contents

o

.NTCNT

Number of words in this argument block

1

.NTENT

En ti ty on which to perform function
Code

Symbol

Meaning

0
1
2
3
4

.NTNOD
.NTLIN
.NTLOG
.NTCKT
.NTMOD

Node
Line
Logging
Circuit
Module

2

.NTEID

Byte pointer
to Entity ID.
(See
Management Specification for format.)

3

.NTFNC

Function to be performed
Symbol

Meaning

-2

.NTMAP
.NTREX
.NTSET
.NTCLR
.NTZRO
.NTSHO
.NTSZC
.NTRET

Map node number/node name
Return the local node ID
Set Parameter
Clear Parameter
Zero all Counters
Show selected It4:=ms
Show and Zero All Counters
Return List of Items

0
1

2
3
4
5

.NTSEL

Network

Code
-1

4

the

Selection criterion for function
Selectors for Show Selected Items (.NTSHO)
Code

Symbol

Meaning

o

.NTSUM
.NTSTA
.NTCHA
.NTCOU
.NTEVT

Summary
Status
Characteristics
Counters
Event

1
2

3
4

TOPS-20 Version 5.1

3-292.2

December 1982

TOPS-20 MONITOR CALLS
(NTMAN%)
4

.NTSEL
(Cont.)

Selectors for Return List of Items (.NTRET)
Code

Symbol

Meaning

-1

.NTKNO
.NTACT
.NTLOP

Known Items
Active Items
Loop

-2
-3
5

.NTQUA

Byte pointer to function to qualifier

6

.NTBPT

Byte pointer to parameter data buffer.
Pointer is
updated to next available byte on return.

7

.NTBYT

Parameter data buffer length in bytes. Written in
buffer
for
functions
.NTMAP,
.NTRET,
.NTREX,
.NTSHO, and .NTSZC.

10

.NTERR

Network Management return code.
(See the
Management Specification for codes.)

Network

NTMAN% ERROR MNEMONICS:
CAPXl:

WHEEL or OPERATOR capability required

ARGX09:

Invalid byte size

ARGX17:

Invalid argument block length

NTMXl:

Network Management unable to complete request

TOPS-20 Version 5.1

3-293

December 1982

TOPS-20 MONITOR CALLS
(ODCNV)
OOCNV

JSYS 222

Converts the internal date and time format into separate numbers
local weekday, day, month, year, and time and does not convert
numbers to text.
(Refer to Section 2.9.2 for more information.)
OOCNV call gives the caller the option of explicitly ~3pecifying
time zone and daylight savings time.

for
the
The
the

ACCEPTS IN AC2:

and

AC4:

internal date and time, or -1 for
time

current

date

BO (IC%OSA) apply daylight savings according to the
If BO is off,
setting of Bl (IC%AOS) .
only
if
daylight savings is applied
appropriate for date.
Bl (IC%AOS) apply daylight savings
on.

if

BO(IC%DSA)

is

B2 (IC%UTZ) use time zone In B12-B17 (Ic%rrMZ).
If this
bit is off, the local time zone is used.
B3(IC%JUO) apply Julian day format (Jan 1 is day 1 in
conversion)
B12-B17
(IC%TMZ)
RETURNS

+1:

time zone to use if B2(IC%UTZ)

is on.

always, with
AC2 containing the year in the
numerical month (O=January)

left half, and the
in the right half.

AC3 containing the day of the month (O=first day)
in
the left half, and the day of the week (O=Monday)
in the right half.
AC4 containing
BO and 82
Bl(IC%1\OS)
B3 (IC%JUO)
B12-B17
(IC%TMZ)
B18-B35
(IC%TIM)

on for compatibility with the IDCNV
call
on if daylight savings was applied
on if Julian day format was applied
time zone used
local time in seconds since midnight

If IC%JUO is set, the Julian day (1 = Jan 1, 365 = non-leap Dec 31,
366
leap Dec 31, etc) is returned in the right half of AC2 and the
left half of AC3 is set to zero.
Generates an illegal instruction interrupt on error conditions below.
ODCNV ERROR MNEMONICS:
OATEX6 :

System date and time are not set

TIMEX1:

Time cannot be greater than 24 hours

ZONEXl:

Time zone out of range

3-294

TOPS-20 MONITOR CALLS
(ODTI~I)

ODTIM

JSVS

220

Outputs the date and time by converting the
internal
date and/or time to text.
(Refer to Section 2.9.2.)
ACCEPTS IN ACl:

RETURNS

of

the

date

and

destination designator

AC2:

internal date and time, or -1 for
time

AC3:

format option flags

+1:

format

always,
with
pertinent.

current

(see below), 0 is the normal case

updated

string

pointer

in

The format option flags in AC3 indicate the format in which
and time are to be output.

ACl,
the

if
date

ODTIM Option Flags
BO(OT%NDA)

Do not output the date and ignore Bl-B8.

Bl(OT%DAY)

Output the day of the week
specified by B2(OT%FDY).

B2(OT%FDY)

Output the full text for the day of the week.
If this
bit is off, the 3-letter abbreviation of the day of the
week is out.put.

B3(OT%NMN)

Output the month as numeric and ignore B4(OT%FMN).

B4(OT%FMN)

Output the full text for the month.
If this bit is
off, the 3-letter abbreviation of the month is output.

B5(OT%4YR)

Output the year as a 4-digit number.
If t.his bit is
off,
the year is output as a 2-digit number if between
1900 and 1999.

B6(OT%DAM)

Output the day of the month after the month.
If
bit is off, the day is output before the month.

B7(OT%SPA)

Output the
date
with
spaces between the
items
(e.g.,
6 Feb 76).
If B6 (OT%DAM) is also on, a comma
is output after the day of the month (e.g., Feb 6, 76).

B8(OT%SLA)

Output the date with slashes (e.g., 2/6/76).

according

to

If 87-B8 are both off, the date is output
between the items (e.g., 6-Feb-76).
B9(OT%NTM)

the

with

format

this

dashes

Do not output the time and ignore BIO-B13.

BlO(OT%NSC) Do not output the seconds.
If this bit
seconds are output, preceded by a colon.

is

off,

the

Bll(OT%12H) Output the time
in 12-hour format with AM or PM
following
the ~ime.
If this bit is off, the time is
output in 24-hour format.

3-295

TOPS-20 MONITOR CALLS
(ODTIM)
B12(OT%NCO) Output the time without a colon between the hours and
minutes.
B13(OT%TMZ) Output the time and follow it with a "-" and a time
zone (e.g., -EDT).
B17(OT%SCL) Suppress columnation of the date and time by omitting
leading spaces and zeros.
This produces appropriate
output for a message.
If this bit is off, the date and
time are output in column~ of constant width regardless
of the particular date or time.
However, full texts of
months and weekdays are not co1umnated. This output is
appropriate for tables.
If AC3 is 0, the ODTIM call outputs the date and time
the format
dd-mmm-yy

in

columns

in

hh:mm:ss

For example, 6-Feb-76

15:14:03.

If AC3
is -1,
the ODTIM call interprets the contents as
if
Bl-B2,B4-B7, and B17 were on (i.e., AC3=336001000000) and outputs the
date and time in the format
weekday, month day, year hh:mm:ss
as in Friday, February 6, 1976

15:14:03

Additional examples are:
Contents of AC3

Typical Text

202201000000
336321000000
041041000000
041040000000

Fri 6 Feb 76 1:06
Friday, February 6, 1976 1:06AM-EST
6/2/76 106:03
6/02/76 106:03

Generates an illegal instruction interrupt on error conditions below.
ODTIM ERROR MNEMONICS:
DATEX6:

System date and time are not set

TIMEXl:

Time cannot be greater than 24 hours

All I/O errors are also possible.
interrupts or process terminations
description.

These errors cause software
as described for the BOUT call

3-296

._.

TOPS-20 MONITOR CALLS
(ODTNC)

OOTNe

JSYS

230

Outputs the date and/or the time as separate numbers for local year,
month, day, or time.
(Refer to Section 2.9.2.) This JSYS is a subset
of the ODTIM call because the output of dates and times not stored in
internal format is permitted. Als(), the caller has control over the
time and zone printed.
ACCEPTS IN ACl:

destination designator
numerical

month

AC2:

year
in the left
half,
and
(O=January) in the right half

AC3:

day of the month (O=first day) in the left half,
and
day of the week (O=Monday), if desired, in the right
half

AC4:

Bl(IC%ADS)

apply daylight savings on output

B12-B17(IC%TMZ) time zone in which to output
B18-B35(IC%TIM) local time in seconds since midnight
AC5:

format option flags
(refer
description of these flags)

to

for

ODTIM

the

NOTE
The only time zones that can be output
B13(OT%TMZ) are Greenwich and USA zones.
RETURNS

+1:

always, with
pertinent.

updated

string

pointer

in

by

ACl,

if

Generates an illegal instruction interrupt on error conditions below.
ODTNC ERROR MNEMONICS:
DATEXl:

Year out of range

DATEX2 :

Month is not less than 12

DATEX3:

Day of month to() large

DATEX4 :

Day of week is not less than 7

ZONEXl:

Time zone out or range

ODTNXl:

Time zone must be USA or Greenwich

All I/O errors can occur. These errors cause software interrupts
process terminations as described for the BOUT call description.

3-297

or

TOPS-20 MONITOR CALLS
(OPENF)

OPENF

JSYS

21

Opens the given file.
Refer to the TOPS-20 Monitor Calls User's Guide
for the explanations of the types of access allowed to a file.
ACCEPTS IN ACI:
AC2:

I

JFN (right half of ACl) of the file being opened.
BO-B5(OF%BSZ) Byte size (maximum of 36 decimal).
If
zero byte size is supplied, the byte
a
size defaults to 36 bits.
B6-B9(OF%MOD) Data mode
in which
to
Common data modes are:

I

open

Code

Symbol

Mode

0

.GSNRM

Normal

I

.GSSMB

Small buffer

10

.GSIMG

Image

17

.GSDMP

Dump

file.

(ASCII)

(See Section 2.5 for
more
on software data modes. )

information

Useful modes for common devices are:
Device

Data Modes

Disk
Card Reader
Card Punch
PTY

.GSNRM
.GSNRM,
.GSNRM,
.GSNRM

Mag Tape
TTY

TOPS-20 Version 5

.GSIMG
.GSIMG

(P,]~Y
receives
data
in mode of
i t~; TTY)
.GSNRM, .GSDMP
.GSNRM, .GSIMG

BI8(OF%HER)

Halt on I/O device or data error.
If
this bit is on and a condition occurs
that causes an I/O device or data error
interrupt,
the process will instead be
halted,
and an
illegal
instruction
interrupt will be generated.
If this
bit is off and
the condition occurs,
the
interrupt
is generated on its
normally-assigned channel.
This bit
remains
in affect for the entire time
that the file is open.

BI9(OF%RD)

Allow read access.

B20 (OF%WR)

Allow write access.

B21(OF%EX)

Allow execute access.

B22 (OF%APP)

Allow append access.

3-298

April 1982

TOPS-20 MONITOR CALLS
(OPENF)
B23(OF%RDU)

Allow unrestricted read access.
This
bit allows you to open a
file for
reading
regardless
of
simultaneous
thawed or frozen openings of the file
for
reading or
writing
by
other
processes or the process executing this
call.
You can use this bit only if you
do not use the OF%THW or OF%WR bits.

B25(OF%THW)

Allow thawed access.
If this bit is
off,
the file
is opened
for frozen
access.
Frozen access means there can be only
one writer of the file;
thawed access
means there can be many writers of the
file.
A program manipulating a thawed
file must take into account the fact
that other programs may open and modify
that file.
Thawed/frozen access has no
direct effect on readers of the file,
but it does have the
indirect effect
that
is
described
in
the
next
paragraph.
The first open of a
file
sets the
precedent for
future opens:
if the
first open
is
thawed,
then
all
subsequent
opens
must
be thawed,
regardless if read or write access is
desired.
The same holds true for
frozen access.
This condition is in
effect until
the last close of the
file.
See the descriptions of bits OF%DUD and
OF%RDU for
the
interaction of OF%THW
with those bits.
Also,
see
the
description of the PMAP JSYS for the
interaction of PMAP bit PM%ABT with
OF%DUD.

B26(OF%AWT)

Block program and print a message on
the
job's
controlling terminal
if
access to file cannot be permitted.
The program is blocked until access is
granted.

B27(OF%PDT)

Do not update access dates of the file.

B28(OF%NWT)

Return an error
if
cannot be permitted.

access

to

file

If B26 and B28 are both off,
the
default is to return an error if access
to the file cannot be granted.
B29(OF%RTD)

TOPS-20 Version 5

Enforce restricted access.
No other
JFN in the system may be opened with
this file until
the current JFN is
released.

3-299

April 1982

I

TOPS-20 MONITOR CALLS
(OPENF)
B30(OF%PLN)

Disable line
number
checking
and
consider a line number as 5 characters
of text.

B31(OF%DUD)

Suppress
the
system
updating
of
modified pages
in memory to thawed
files on disk.
This bit is ignored for
new files.
Ordinarily,
TOPS-20
automatically
updates modified memory pages to disk
approximately once each minute.
OF%DUD
prohibits
this
automatic
update.
However,
there are
three sources of
"manual"
updating
that
are
not
controlled by OF%DUD:
1.

A CLOSF is performed

2.

A UFPGS

3.

Swapping space becomes full

i~

performed

OF%DUD and OF%THW
following ways:
OF%THW

o

RETURNS

OF%DUD

1

o

1

I

interact

in

the

Effect
OF%DUD ignored
Perform
automatic
file page update
Suppress
automatic
file page update

B32(OF%OFL)

Open the device even if it is off line.

B33(OF%FDT)

Force an update of the .FBREF date and
time
(last read)
in the FDB.
Also,
increment right halfword
(number of
file
references)
of .FBCNT count word
in the FDB.

B34(OF%RAR)

Wait if the file is offline.

+1:

failure, error code in ACI

+2:

success

Even though each type of desired file access can be
indicated by a
separate bit,
some accesses are implied when specific bits are set.
For example, the setting of the write access bit implies read access
if the process
is allowed to read the file according to the file's
access code.
This means that if the process has access to
read
the
file
and it sets only the write access bit, the process will have the
file opened for read, write,
and execute access.
However,
if an
existing file is opened and only write access is specified (only OF%WR
is set), the contents of the file
are deleted,
and
the file
is
considered
empty.
Thus,
to update an existing file, both OF%RD and
OF%WR must be set.

3-300

TOPS-20 MONITOR CALLS
(OPENF)
Note that if OF%RD,
OF%WR,
and OF%APP are all
zero,
OPENF will
generate an error.
OPENF works as follows for archived and migrated
files:
Archived
OPENF Access
Read
Write
Append

Online

Offline

Ok
Fail
Fail

Fail/Wait
Fail
Fail

Migrated
OPENF Access
Read
Write
Append

Online
Ok
Ok
(discard
implied)
Ok
(discard
implied)

Offline
Fail/Wait

Fail/Wait
(discard
implied)

The failure cases return an error message
(OPNXnn).
The fail/wait
cases return an error
for
failure or wait until the OPENF can be
successfully completed.
The settings of OF%NWT
(never wait for
file
restore)
and OF%RAR
(retrieve file
if necessary)
determine whether
a failure or wait
occurs.
If OF%NWT is set on the OPENF call, OPENF alway fails (in the
fail/wait cases).
If OF%RAR or the job default (See the SETJB monitor
call.) is set, the OPENF will wait for the file to be
retrieved,
and
then complete successfully.
In the Ok (discard implied) cases, tape
pointers for the file, if any, are discarded.
The CLOSF monitor call can be used to close a specific file.
OPENF ERROR MNEMONICS:
OPNXI:

File is already open

OPNX2 :

File does not exist

OPNX3 :

Read access required

OPNX4 :

Write access required

OPNX5 :

Execute access required

OPNX6 :

Append access required

OPNX7 :

Device already assigned to another job

OPNX8 :

Device is not on line

OPNX9:

Invalid simultaneous access

3-301

TOPS-20 MONITOR CALLS
(OPENF)

I

OPNXIO:

Entire file structure full

OPNX12 :

List access required

OPNX13:

Invalid access requested

OPNX14:

Invalid mode requested

OPNX15:

Read/write access required

OPNX16:

File has bad index block

OPNX17:

No room in job for long file page table

OPNX18:

Unit Record Devices are not available

OPNX23 :

Disk quota exceeded

OPNX25:

Device is write-locked

OPNX26:

Illegal to open a string pointer

DESX1:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

SFBSX2:

Invalid byte size

TTYX01:

Line is not active

TOPS-20 Version 5

3-302

April 1982

TOPS-20 MONITOR CALLS
(PBIN)

PBIN

JSVS

73

Inputs the next sequential byte from the primary input designator.
This call is equivalent to a BIN call with the source designator given
as .PRIIN.
RETURNS

+1:

always, with the byte right-justified in ACI

Can cause several software
certain file conditions.
description. )

interrupts
{Refer
to

or process terminations on
bit OF%HER of the OPENF call

PBIN ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX5:

File is not open

IOXl:

File is not open for reading

IOX4:

End of file reached

IOX5:

Device or data error

3-303

TOPS-20 MONITOR CALLS
(PBOUT)

PBOUT

JSYS

74

Outputs a byte sequentially to the primary output designator.
This
call
is equivalent to a BOUT call with the destination designator
given as .PRIOU.
ACCEPTS IN ACl:

byte to be output, right-justified

RETURNS

always

+1:

Can cause several
software
certain file conditions.
description. )

interrupts
(Refer
to

or process terminations on
bit OF%HER of the OPENF call

PBOUT ERROR MNEMONICS:

I

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

IOX2:

File is not open for writing

IOX5:

Device or data error

IOX6:

Illegal to write beyond absolute end of file

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

unable to allocate disk - structure damaged

TOPS-20 Verslon 5

3-304

April 1982

TOPS-20 MONITOR CALLS
(PDVOP%)

"JSYS

603

Manipulates program data vectors (PDV's), which begin at program data
vector
addresses
(PDVA's).
Program data vectors are used to allow
user programs to obtain information about execute-only programs.
ACCEPTS IN ACl:

RETURNS

function code

AC2:

address of the argument block

AC3:

byte pointer to a string in memory

+1:

always, with data returned
in the
updated count in .POCT2 if needed.

data

block,

The following describes the format of the argument block to which
address in AC2 points.
Word

Symbol

an
the

Meaning

o

.POCTI

Count 1, the
block.

1

.POPHD

Handle of the process that the call is to affect

2

.POCT2

Count 2, the number of words in the data block.
The call
returns
two counts in this word.
The
left half contains the number of words of data
available for
the call to return, and the right
half contains the number of words the call did
return in the data block.
If the right half is
smaller than the left half,
the call could not
return all
the data available due to a lack of
room in the data block.

3

.PODAT

4

.POADR

Starting address of the data block into which
call returns data
Starting address of the range of memory

5

.POADE

Ending address of the range of memory

number

of

words

in

the

argument

the

The format of a program data vector is as follows:
Word

Symbol

o

.PVCNT
.PVNAM

I

5

.PVSTR
. PVREE
.PVVER
.PVMEM

6
7

. PVSYM
.PVCTM

2

3
4

TOPS-20 Version 5

Meaning
Length of the PDV (including this word) .
The address of the name of
the program for
which this data vector exists.
The name is
in ASCIZ representation.
(In most cases,
a
byte pointer should be created to access this
string.)
Program starting address.
Program reenter address •
Program version number.
Address of a block of memory that contains
data describing
the program's address space
(a memory map).
See the
LINK
manual,
Appendix G, for a description of this block.
Address of the program symbol table .
Time at which the program was compiled.

3-305

April 1982

TOPS-20 MONITOR CALLS
(PDVOP%)
Word

Symbol

10
11
12
13

. PVCVR
. PVLTM
.PVLVR
.PVMON

14

.PVPRG

15

. PVCST

Meaning
Version number of the compiler .
Time at which the program was loaded .
Version number of LINK.
Address of a monitor data block.
(Not
cur rently used.)
Address of a program data block.
(Not
currently used.)
Address of a customer-defined data block .

Functions that require a range of memory locations
interpret words .POADR and .POADE as follows:

(.POGET and .POREM)

o

If .POADR and .POADE are both nonzero, then
.POADR contains
the first address
in the
range, .POADE contains the last
address
in the
range,
and
the
range
includes all
the
addresses between them.

o

If both .POADR and .POADE are
memory.

o

If .POADE is zero and .POADR is not,
the
range begins at
.POADR and
includes all
higher addresses
in the rest of
memory.

o

If .POADE is not zero, and .POADR is larger than
error results.

zero,

the

range

is

all

.POADE,

of

an

You can use the following function codes in ACI.
Code

Symbol

Function

o

.POGET

For the process specified in word
.POPHD of the
argument block,
this function returns all PDVA's
within the range of addresses specified
in words
.POADR and .POADE of the argument block.

1

.POADD

This function adds the PDVA's specified
in the
data block
to the system's data
base for the
specified process.
The PDVA's
must
be
in
ascending order within the data block.

2

.POREM

This function removes a set of PDVA's from the
system's data base for the specified process.
The
PDVA's removed are the ones within
the
range of
addresses specified in words .POADR and .POADE of
the argument block.

3

.PONAM

This function returns the ASCIZ name of a program
in memory.
Word .POADR of the argument block must
contain a valid PDVA for
the specified process.
The name returned is the one to which word .PVNAM
of the PDV points.

4

.POVER

This function returns the version of a program in
memory.
Word .POADR must contain a valid PDVA for
the specified process.
The version
returned
is
the one that word .PVVER of the PDV contains.

5

.POLOC

For the specified process, this function
returns
all the PDVA's of PDV's for the specified program.
The byte pointer in AC3 points to
the program
name.

TOPS-20 Version 5

3-306

April 1982

TOPS-20 MONITOR CALLS
(PDVOP%)
This call generates an illegal
conditions below.

instruction

interrupt

on

the

error

PVDOP% ERROR MNEMONICS:
MONX02:

Insufficient system resources (JSB full)

PDVXOl:

Address in .POADE must be as large as address in .POADR

PDVX02:

Addresses in .PODAT block must be in strict ascending order

PDVX03:

Address in .POADR must be a program data vector address

TOPS-20 Version 5

3-307

April 1982

TOPS-20 MONITOR CALLS
(PEEK)

PEEK

JSYS

311

Transfers a block of words from the monitor to the user
space.
The
desired monitor pages must have read access.
This monitor call is
used to obtain data from the monitor for maintenance and test purposes
and should be executed only when GETAB information is not available.
RESTRICTIONS:

requires WHEEL, OPERATOR, or
enabled

ACCEPTS IN ACl:

word count
in the left half,
and first
address of the monitor in the right half

AC2:
RETURNS

MAINTENANCE

first user address

+1:

failure, error code in ACI

+2:

success, the desired words are transferred.

PEEK ERROR MNEMONICS:
CAPXl:

WHEEL or OPERATOR capability required

PEEKX2 :

Read access failure on monitor page

3-308

capability
virtual

TOPS-20 MONITOR CALLS
(PLOC]K)

PLOCK

JSYS

561

Acquires physical memory and places a
designated
section of
the
process'
address space in memory.
Allows the process to specify the
memory pages to be used, or permits the system to select the pages.
RESTRICTIONS:

requires WHEEL, OPERATOR, or
enabled

ACCEPTS IN ACl:

address of first page if acquiring
unlocking.

RETURNS

MAINTENANCE

capability

(locking) or -1 if

AC2:

process handle (currently .FHSLF only)
in the left
half and number of first page in the right half.

AC3:

control flags in the left half and
repeat
the right half.
The control flags are:

+1:

count

in

BO

(LK%CNT)

right half of AC3 contains a count of the
number of pages to lock.

Bl

(LK%PHY)

value in ACI is the first page desired.
If this bit is off and ACI is not -1, the
system selects pages.

B2

(LK%NCH) pages will not be cached.

B3

(LK%AOL)

off-line pages are to be locked.

a.lways

If the PLOCK call is unable to honor anyone of the requests to unlock
anyone of the pages specified by the repeat count, it will unlock all
of the others.
A page that was locked with the PLOCK call may be unmapped.
(Refer to
the PMAP call.)
This will unlock the process' page and return the now
unlocked physical page to its previous state.
The page selected by the user must be capable of being placed off-line
for the PLOCK call to acquire it.
Generates an illegal instruction interrupt on error conditions below.
PLOCK ERROR MNEMONICS:
ARGX22:

Invalid flag

ARGX24

invalid count

3-309

TOPS-20 MONITOR CALLS
(PMAP)

PMAP

JSVS

56

Maps one or more complete pages from a file to a process (for
input),
from a process to a file (for output), or from one process to another
process.
Also unmaps pages from a process and deletes pages from a
file.
Each of the five uses of PMAP is described below.
Case I:

Mapping File Pages to a Process

This use of the PMAP call does not actually transfer
any data;
it
simply changes
the contents of the process' page map.
When changes
are made to the page
in the process,
the changes will
also be
reflected
in ~he page in the file, if write access has been specified
for the file.
ACCEPTS IN ACl:

JFN of the file in the left half, and the page number
in the file in the right half.
This AC contains the
source.

AC2:

process handle in the left half, and the page number
in the process in the right half.
This AC contains
the destination.

AC3:

BO(PM%CNT)

A count is in
the
right half of AC3.
This
count
specifies the
number of
sequential pages to be mapped.
If
this
bit is not set, one page is mapped.

B2(PM%RD)

Permit read access to the page.

B3 (PM%WR)

Permit write access to the page.

B4(PM%EX)

Reserved for future use.
The symhol PM%RWX can be
B2-B4.

I

I

used

to

set

B5(PM%PLD)

Preload the page being mapped
(move
the
page immediately instead of waiting until
it is referenced).

B9(PM%CPY)

Create a private copy of the page when it
is written into (copy-on-write).
If the
page
is mapped
between two processes
(Case
III below),
both processes will
receive a private copy of the page.

BIO(PM%EPN) The right half of AC2 contains a proces£
page number.
If the section containing
the page does not exist,
a
private
section is created.
Bll(PM%ABT) Unmap a page and
throw its
changed
contents away.
This bit is significant
only when unmapping process pages that
were mapped
from a
file
(see case IV
below) and OF%DUD is set in the OPENF.
Normally, if a page is unmapped
and
has
been changed
since
the last time the
monitor updated the associated file page,
the monitor will remove the page from the
?rocess and place it on a queue in order
TOPS-20 Version 5

3-310

April 1982

TQPS-20 MONITOR CALLS
(PMAP)
to update the file page.
PM%ABT allows
the page to be unmapped, but prevents the
monitor
from placing the page on the
update queue.
This feature is useful
in the case of
erroneous data written to a mapped page
of a
file open for simultaneous access.
In this case, it is
important that
the
erroneous page be discarded and not be
used to update the file page.
Another
application is to allow processes in
separate jobs to communicate by sharing a
file page (and reading/writing the page)
and avoid the overhead of the monitor
periodically updating the page.
B18-B35
(PM%RPT)
RETURNS

+1:

Number of pages
BO(PM%CNT) is set.

to

be

mapped

if

always

This use of PMAP changes the map of the process such that addresses in
the process page specified by the right half of AC2 actually refer to
the file page specified by the right half of ACI.
The present
contents of the process page are removed.
If the page in the file is
currently nonexistent, it will be created when it is written (when the
corresponding page in the process is written).
If the process page is
in a nonexistant section, an illegal instruction trap is generated.
This use of PMAP is legal only if the file is opened for at least read
access.
The access bits specified in the PMAP call are ANDed with the
access that was specified when the file was opened.
However,
copy-on-write is always granted, regardless of the file's access.
The
access granted is placed in the process' map.
The file cannot be
closed while any of its pages are mapped into any process.
Thus,
before the file is closed, pages must be unmapped from each process by
a PMAP call with -1 in ACI (see below).
Case II Mapping Process Pages to a File
This use of the PMAP call actually transfers data by moving
the
contents of the specified page in the process to the specified page in
the file.
The process' map for that page becomes empty.
ACCEPTS IN ACl:

process handle in the left half, and the page number
This AC
within the process
in the right half.
contains the source.

AC2:

JFN of the file in the left half, and the page number
within the file in the right half.
This AC contains
the destination.

AC3:

access bits and repetition count.

RETURNS

+1:

(Refer to Case I.)

always

The process page and
the file page must be private pages.
ownership of the process page 1S transferred to the file page.
present contents of the page in the file is deleted.

The
The

The access granted to the file page is determined by ANDing the access
specified in the PMAP call with the access specified when the file was
TOPS-20 Version 5

3-311

April 1982

I

TOPS-20 MONITOR CALLS
{PMAP}
opened.
This function does not update the file's
byte size or
the
end-of-file pointer in the file's FDB.
Failure to update these items
in the FDB can prevent the reading of the file by sequential I/O calls
such as BIN and BOUT.
To update the file's FDB
following:

after

using

this

PMAP

function,

do

1.

Use the CLOSF call with the CO%NRJ bit set to close the
but keep the JFN.

2.

Use the CHFDB call to update the end-of-file pointer and,
necessary, the byte size in the\file's FDB.

3.

Use the RLJFN call to release the JFN.

the
file
if

(Refer to Section 2.2.8 for the format of the FDB fields.)
Case III Mapping One Process' Pages to Another Process
This use of the PMAP call normally does not
transfer any data;
it
simply changes the contents of the page maps of the processes. When
changes are made to the page in one process, the changes will also be
reflected in the corresponding page in the other process.
ACCEPTS IN ACl:

process handle in the left half, and the page number
in the process in the right half.
This AC contains
the source.

AC2:

a second process handle in the left half,
and page
number
in that process in the right half.
This AC
contains the destination.

AC3:

access bits and repetition count.

RETURNS

+1:

(Refer to Case I.)

always

This use of PMAP changes the map of the destination process such that
addresses
in the page specified by the right half of AC2 actually
refer to the page in the source process specified by the right half of
ACI.
The present contents of the destination page are deleted.

I

The access granted to the destination page is determined by the access
specified
in the PMAP call.
If
the destination page
is
in a
nonexistant section, the monitor generates an
illegal
instruction
trap.
Case IV Unmapping Pages In a Process
As stated previously, a file cannot be closed if any of its pages
mapped in any process.
ACCEPTS IN ACl:

are

-1

AC2:

process handle in the left half,
and
within the process in the right half

AC3:

BO(PM%CNT)

Repeat count.
Only the
numbers are incremented.

B18-B35

Number of pages to remove from process

TOPS-20 Version 5

3-312

page
process

number
page

April 1982

TOPS-20 MONITOR CALLS
(PMAP)
This format of the PMAP call removes the pages indicated in
the process.

AC2

from

A page that was locked with the PLOCK call may be unmapped.
Doing so
will
unlock
the process'
page and return the now unlocked physical
page to its previous state.
Case V Deleting One or More Pages from a File
Deletes one or more pages from a file on disk and does not affect
address space of any process.
ACCEPTS IN ACl:

the

-1

AC2:

JFN of the file in the left half
within the file in the right half.

AC3:

BO(PM%CNT)
Indicates that the
the number of pages to delete.
B18-35

and

right

page
half

number
contains

Number of pages to delete from file

Illegal PMAP calls
The PMAP call is illegal if:
1.

Both ACI and AC2 designate files.

2.

Both ACI and AC2 are O.

3.

The PMAP call designates a file wi th write-only access.

4.

The PMAP call designates a file wi th append-only access.

5.

The source and/or the destination designates an
process and the process is not self (.FHSLF).

execute-only

Can cause several software interrupts on certain file conditions.
Generates an illegal instruction interrupt on error conditions below.
PMAP ERROR MNEMONICS:
ARGX06:

Invalid page number

CFRKX3:

Insufficient system resources

DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5 :

File is not open

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX7:

Process page cannot exceed 777

FRKHX8:

Illegal to manipulate an execute-only process

TOPS-20 Version 5

3-313

April 1982

I

TOPS-20 MONITOR CALLS
(PMAP)

I
I

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk -

LNGFXl:

Page table does not exist and file not open for write

PMAPXl:

Invalid access requested

PMAPX2:

Invalid use of PMAP

PMAPX3:

Illegal to move shared page into file

PMAPX4:

Illegal to move file page into process

PMAPX5:

Illegal to move special page into file

PMAPX6:

Disk quota exceeded

PMAPX7:

Illegal to map file on dismounted structure

PMAPX8:

Indirect page map loop detected

TOPS-20 Version 5

structure damaged

3-314

April 1982

TOPS-20 MONITOR CALLS
(PMCTL)

PMCTL

,JSYS

560

Controls physical memory.
This call allows a
privileged
program to
add or
remove most pages of physical memory and to control use of
cache memory.
RESTRICTIONS:

Requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

function code

RETURNS

AC2:

length of the argument block

AC3:

address of the argument block

+1:

always

The defined functions and their argument blocks are as follows:
Function

o

Symbol
.MCRCE

Meaning
Return the
status of cache
status
is returned
in word
argument block.

memory.
The
.MCCST of the

Argument Block

o
1

.MCSCE

.MCCST

If B35(MC%CEN)
is enabled.

is on, the

cache

Set the status of cache memory.
Argument Block

o
2

.MCRPS

.MCCST

Enable the cache if
is on.

B35(MC%CEN)

Return the status of the given page(s).
The
number
of
the page is given in word .MCPPN,
and its status is returned in word .MCPST.
Argument Block

o

.MCPPN

Negative count in the left half;
number of physical page in the
right half

1

.MCPST

Returned
page
The
status.
status
is represented by one of
the following values:
0

.MCPSA

Page
is available
for normal use.

1

.MCPSS

in
Page
is
a
transition state.

2

.MCPSO

it
Page is off line because
is
nonexistent.
Nonexistent memory
is marked as off line at
system
startup.

3

.MCPSE

Page is off line because
monitor detected an error.

3-315

the

TOPS-20 MONITOR CALLS
(PMCTL)
Function
3

Symbol
.MCSPS

Meaning
Set the status of the given pagE~. The number
of the page is given In word .MCPPN, and the
status value is given in word .MCPST.
Argument Block

o

.MCPPN

Number of physical page.

1

.MCPST

Status for page. 'l'he status is
represented
by
one
of the
following values:

o

.MCPSA

Mark page available
for nc)rmal use.

2

.MCPSO

Mark page off line
because it does not
exist.

3

.MCPSE

Mark page off line
because it has an
error.

4

.MCRME

Collect information
about
MOS memory
errors. Store the
information
in
block addressed by
AC3 and update AC2
on return.

A list of those pages that PMCTL cannot acquire follows:
1.

the EPT

2.

the monitor's UPT

3.

any page containing a CSTO entry

4.

any page containing an SPT entry

5.

the page containing MMAP

6.

any page belonging t.o the resident free space pool

In certain specialized monitors,
for example TOPS-20AN,
there are
additional pages that cannot. be acquired. An estimate of the size of
these areas follows:
CSTO

one word for every page of memory supported (two
pages)
SPT
four pages
MMAP
one page
Resident Free Space Pool
two pages minimum

to

four

3-316

....--~------------..--....--

--------------------------------------------------------------------------

TOPS-20 MONITOR CALLS
(PMC'TL)
Generates an illegal instruction interrupt on error conditions below.
PMCTL ERROR MNEMONICS:
CAPX2:

WHEEL, OPERATOR, or MAINTENANCE capability required

PMCLXl:

Invalid page state or state transition

PMCLX2:

Requested physical page is unavailable

PMCLX3:

Requested physical page contains errors

ARGX02:

Invalid function

ARGX06:

Invalid page number

3-317

TOPS-20 MONITOR CALLS
(PPNST)

JSYS

PPNST

557

Translates a project-programmer number
(a TOPS-IO
36-bit directory
designator)
to its corresponding TOPS-20 string.
The string consists
of the structure name and a
colon followed
by the directory name
enclosed
in brackets.
This monitor call and the STPPN monitor call
should
appear
only
in programs
that
require
translations
of
project-programmer
numbers.
Both calls are temporary calls and may
not be defined in future releases.
ACCEPTS IN ACl:

RETURNS

destination designator

AC2:

project-programmer number

AC3:

byte pointer to structure name string for
given project-programmer number applies.

+1:

(36 bits)
which

always, with
string written
to destination,
updated byte pointer, if pertinent, in ACI

If the structure name
string
is a
logical
name,
then
structure appearing in the logical name definition is used.

the

the
with
first

Generates an illegal instruction interrupt on error conditions below.
PPNST ERROR MNEMONICS:

I

PPNXl:

Invalid PPN

PPNX2 :

Structure is not mounted

GJFX22:

Insufficient system resources

STDVXl:

No such device

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5 :

File is not open

DELFX6:

Internal format of directory is incorrect

DIRXl:

Invalid directory number

DIRX2:

Insufficient system resources

DIRX3:

Internal format of directory is incorrect

STRXOl:

Structure is not mounted

STRX06:

No such user number

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk -

TOPS-20 Version 5

(Job Storage Block full)

structure damaged

3-318

April 1982

TOPS-20 MONI'l'OR CALLS
(PRARG)

PRARG

JSYS

545

Returns or sets up an argument block for the specified process.
The
monitor
stores the argument block in process storage block for this
process.
This call is useful for running a program whenever
another
program
halts.
Examples are
running
a
compiler or re-executing the last
compile-class command each time you exit an editor.
This call uses the 200-word process storage block associated with each
process.
User programs can only access this memory by means of the
the PRARG monitor call.
A process and all of its superior processes
can access the process storage block of a given process.
Furthermore,
data associated with many different programs can be stored
a given
process storage block.
ACCEPTS IN ACI:
AC2:

address of argument block

AC3:

length of argument block

+1:

RETURNS

function code in the left half, and a process
in the right half

always, with the number of words
returned argument block in AC3

of

data

handle

in

the

The codes for the functions are as follows:
1

.PRARD

return the arguments
specified in AC2

2

.PRAST

set the arguments using the argument block at
address specified in AC2

beginning

at

the

address
the

The PRARG argument block has the following format:
Offset

o

Meaning

2

Number of argument blocks
Relative address (from the start of this block) of the
first argument
list
Relative address of the second argument list

N

Relative address of the Nth argument list

1

The argument list format is the following:
Word

o
1

Meaning
Number of argument lists (must be 1)
Entry type in the left half (must be 400740), and
the
address,
relative to the start of the argument block,
of the argument list in the right half (usually 2, but
other relative addresses are allowed)

The argument list contains an ASCIZ string that is
the name of
the
program to
run;
or
the list contains a zero, which means that the
last compile-class command is to be re-executed.
3-319

TOPS-20 MONITOR CALLS
(PRARG)
Generates an illegal instruction interrupt on error conditions below.
PRARG ERROR MNEMONICS:
PRAXl:

Invalid PRARG function code

PRAX2:

No room in monitor data base for argument block

PRAX3:

PRARG argument block too large

3-320

TOPS-20 MONrrOR CALLS
(PSOU~r)

PSOUT

JSVS

76

Outputs a string

~3equentially

ACCEPTS IN ACl:

byte pointer to
address space

RETURNS

always, with updated byte pointer in ACI

+1:

Can cause several
software
certain file conditions.
description. )

to the primary output designator.
an

ASCIZ

interrupts
(Refer
to

string

in

the

caller's

or process terminations on
bit OF%HER of the OPENF call

PSOUT ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

IOX2:

File is not open for writing

IOX5:

Device or data error

IOX6:

Illegal to write beyond absolute end of file

IOXII:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-321

I

April 1982

TOPS-20 MONITOR CALLS
(RCDIR)

ReDIR
Translates the given directory
directory number.

JSYS
string

553
to

its

corresponding

36-bit

A directory string contains a structure name and
a directory name.
The structure name must be followed by a colon, and the directory name
must be enclosed in either square brackets or
angle brackets.
No
spaces can appear between the structure name and the directory name.
Here is an example of a directory string:
PS:
Recognition cannot be used on the structure name.
If
the
structure
name
is omitted
from
the string, the user's connected structure is
used.
Wildcards cannot be used in the structure name field.
Recognition can be used on the directory name field.
Recognition can
also be used on part of the directory name field, so that a user can
employ recognition when typing
the name of a
subdirectory.
When
recognition
is used on the directory name field, and the directory
name is not ambiguous, the closing bracket is not required.
Wildcards can be used in the directory name
field.
Repeated
RCDIR
calls can be executed to obtain the numbers of the directories whose
names match the given directory string.
After the
first
call,
each
subsequent RCDIR call
returns the number of the next directory that
matches the directory string.
RESTRICTIONS:

When this call is used
in any section other
than
section zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

flag bits in the left half

RETURNS

AC2:

byte pointer to ASCIZ string to be translated, a JFN,
a
36-bit user
number, or a 36-bit directory number
(given for the purpose of checking its validity)

AC3:

36-bit directory number (given when stepping
next directory in a group of directories)

+1:

to

the

always, with
ACI containing flag bits in the left half
AC2 containing an updated byte pointer (if a pointer
was supplied as
the argument).
If recognition
was used, this pointer reflects the remainder of
the
string
that was appended
to the original
string.
AC3 containing a 36-bit directory number if execution
of the call was successful

The flag bits supplied in the left half of ACI are as follows:

TOPS-20 Version 5

3-322

April 1982

TOPS-20 MONrrOR CALLS
(RCDIR)
BI4(RC%PAR)

Allow partial recognition on the directory name.
If
the name given matches more than one directory, bit
RC%AMB is set on return and the string is updated to
reflect the unique portion of the directory name.
If bit RC%PAR is not set, the name given matches more
than one directory, and recognition is being used, then
bit RC%AMB is set on return, but the string is not
updated.

BI5(RC%STP)

Step to the next directory in the group and return the
number of that directory.
ACI must have bit RC%AWL
set. AC2 must contain a pointer to a string that
contains wildcard characters in the directory name
field. AC3 must contain a directory number.

BI6(RC%AWL)

Allow the
directory
name
to
contain
wildcard
characters.
The directory name must include its
terminating bracket. No recognition is performed on a
directory name that contains wildcard characters.
This bit must be set if bit RC%STP is also set.

BI7(RC%EMO)

Match the given string exactly. When both the RC%PAR
and RC%EMO bits are on, recognition is not used on the
string, and the string is matched exactly.
If this bit is off, recognition is used on the string.

The flag bits returned in the left half of ACI are as follows:
On success
BO (RC%DIR)

Directory can be used only by connecting to it.
a files-only directory.)

(It is

If this bit is off, the user can also login to (if the
directory is on the public structure) or access this
directory.
Bl(RC%ANA)

ObBolete

B2(RC%RLM)

All messages from MAIL.TXT are repeated every
time the user logs in.
If this bit is off, messages
are printed only once.

B6(RC%WLD)

The directory name given contained wildcard characters.

On failure
B3(RC%NOM)

No match was found for the string given. This bit is
returned if either 1) bit RC%EMO was on in the call,
and a string was given that matched more than one
directory;
or 2)
the syntax of the fields in the
string is correct, but the structure is not mounted, or
the directory does not exist.

3-323

TOPS-20 MONITOR CALLS
(RCDIR)
B4(RC%AMB)

The argument given was ambiguous.
This bit is returned
if bit RC%EMO was off, and if the string given either
matched more than one directory, or did not include the
beginning bracket of the directory name field.

B5(RC%NMD)

There are no more directories
in the
group
of
directories.
This bit is returned if RC%STP was on and
the numbers of al·l the directories in the group have
been returned.

The RCDIR monitor call can be used in one of two ways.
The simpler
way is to
translate a directory string to its corresponding 36-bit
directory number.
The string can be either
recognized,
or matched
exactly.
The second way of using the RCDIR call
is to provide a directory
string
that corresponds to more
than one directory, and then use
repeated RCDIR calls to step through all the directories matching
the
given string.
Each call obtains the number of the next directory that
matches the given string.
When no more directories match the
string,
the RC%NMD bit is set on the call's return.
When obtaining a single directory number, RCDIR can accept a JFN,
a
36-bit user number, or a directory number.
When a JFN is supplied as
an argument, the number returned is that of the directory containing
the
file
associated with the JFN.
When a user number is supplied as
an argument, the number returned is the logged-in directory for
that
user.
When a directory number is supplied, the RCDIR call checks the
number's validity.
If
the number
is valid,
the RCDIR call
is
successful, and this same number is returned.
When obtaining
several directory numbers,
RCDIR requires AC2
to
contain a
pointer
to a directory string
that contains wildcard
characters.
If the string does not contain wildcards, or if any thing
other
than a string pointer is given in AC2, the stepping function is
not performed, and the call returns with the RC%NMD bit set.
Furthermore, the first RCDIR call executed must have bit RC%AWL set in
ACI,
and
the pointer to the string in AC2.
If execution of the call
is successful, AC3 contains the number of the directory corresponding
to
the
first directory that matches the given directory string.
For
example, if the string given is  and the call
is successful,
the number returned corresponds to .
Subsequent RCDIR calls must set bits RC%STP and RC%AWL in ACI,
reset
the pointer in AC2 (because it is updated on a successful RCDIR call) ,
and leave in AC3 the directory number returned from the previous RCDIR
call.
The directory number in AC3 is accepted only if RC%STP is set
in ACI, and a pointer to a string containing wildcard characters
is
given in AC2.
On successful execution of each
subsequent RCDIR call,
the number
returned
in AC3 corresponds to the next directory in the grouF.
When
the number of the last directory in the group has been returned,
a
subsequent RCDIR call sets bit RC%NMD in ACI;
the content of AC3 is
indeterminate.
The RCUSR monitor call can be used to translate a user name string
to
its corresponding user number.
The DIRST monitor call can be used to
translate either
a directory number or
a
user
number
to
its
corresponding string.

3-324

TOPS-20 MONITOR CALLS
(RCDIR)
Generates an illegal instruction interrupt on error conditions below.
RCDIR ERROR MNEMONICS:
RCDIXl:

Insufficient system resources

RCDIX2:

Invalid directory specification

RCDIX3:

Invalid structure name

RCDIX4:

Monitor internal error

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DESX8:

File is not on disk

DESXlO:

Structure is dismounted

STRXOl:

Structure is not mounted

TOPS-20 Version 5

3-325

April 1982

I

TOPS-20 MONITOR CALLS
(RCM)

ReM

JSYS

134

Returns the word mask of the activated
interrupt channels for
the
specified process.
(Refer to Section 2.6.1 and the AIC and DIC calls
for information on activating
and deactivating
software
interrupt
channels.)
ACCEPTS IN ACl:
RETURNS

+1:

process handle
always, with 36-bit word
in ACl,
meaning channel n is activated

with

bit

n

on

Generates an illegal instruction interrupt on error conditions below.
RCM ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

3-326

TOt>S-20 MONI'rOR CALLS

(RCUS1R)

RCUSR

JSVS

554

Translates the given user name string to its corresponding 36-bit user
number.
The user name string consists of the user's name without any
punctuation.
The string must be associated with a directory on the
public structure
(usually called
PS:)
that
is not
a files-only
directory.
Recognition can be used on the string.
contain wildcard characters.
ACCEPTS IN ACl:

RETURNS

In addition,

the

string

flag bits in the left half

AC2:

byte pointer to ASCII string to be translated

AC3:

36-bit user number (given when stepping to
user name in a group)

+1:

can

the

next

always, with
ACI containing flag bits in the left half
AC2 containing
an
updated
byte
pointer.
If
recognition was used, this pointer reflects the
remainder of the string that is appended
to
the
original string.
AC3 containing a 36-bit user number if execution of
the call was successful.
An example of a user
number is:
500000,,261.

The flag bits supplied in the left half of ACI are as follows.
For
additional
information on these bits, refer to the RCDIR monitor call
description.
B14 (RC%PAR)

Allow partial recognition on the user name string.

B15(RC%STP)

Step to the next user name in the group.

B16(RC%AWL)

Allow the user name to contain wildcard characters.

B17(RC%EMO)

Match the given string exactly.

The flag bits returned in the left half of ACI are as follows.
For
additional
information on these bits, refer to the RCDIR monitor call
description.
On success
Bl(RC%ANA)

Ob:301ete

B2(RC%RLM)

User sees all messages from MAIL.TXT every time
he logs
in.
If
this bit is off, the user sees the
messages only once.

B6(RC%WLD)

The user name given contained wildcard characters.

3-327

TOPS-20 MONITOR CALLS
(RCUSR)
On failure
B3(RC%NOM)

No match was found for the string given. This bit will
be on if the string given refers to a files-only
directory, if there is no directory on PS:
that is
associated with the user name string, or bit RC%EMO was
on in the call and a string was given that matched more
than one user.

B4(RC%AMB)

The string given was ambiguous because it matched
than one user.

B5(RC%NMD)

There are no more user names in the group.

more

The RCDIR monitor call can be used to translate a directory string to
its corresponding directory number.
The DIRST monitor call can be
used to translate either a user number or a directory number to its
corresponding string.
Generates an illegal instruction interrupt on error conditions below.
RCUSR ERROR MNEMONICS:
RCUSXI:

Insufficient system resources

RCDIX4:

Monitor internal error

STRX07:

Invalid user number

STRX08:

Invalid user name

3-328

TOPS-20 MONITOR CALLS
(RCVIM)

RCVIM

JSVS

751

Retrieves a message from the ARPANET special message queue.
must have been previously assigned with the ASNSQ JSYS.
RESTRICTIONS:

for ARPANET systems only.

ACCEPTS IN ACl:

BitO:
Bitl:

Bits 18-35:
AC2:
RETURNS

The queue

If set, the user will receive a
96-bit
leader.
If reset, the user will receive
a 32-bit leader.
If set, the user will
receive data
in
the high-order
32 bits of each word of
the message.
If reset,
the user will
receive data in all 36 bits of each word
of the message.
Special Queue Header

address where extended message is to be stored

+1:

failure, error code in ACI

+2:

success, message block stored at address specified in
AC2

The RCVIM JSYS will block until the message is received.
See SNDIM JSYS for a description of the message format.
RCVIM ERROR MNEMONICS:
SQXl:

Special network queue handle out of range

SQX2:

Special network queue not assigned

3-329

TOPS-20 MONITOR CALLS
(RCVOK% )

JSYS

575

Allows the access-control program (written by the installation)
to
service an approval request in the GETOK% request queue after a user
program has issued a GETOK% JSYS.
RESTRICTIONS:

Requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

Address of argument block

AC2:
RETURNS

+1:

Length of argument block
always

Argument Block (returned):
Word

Symbol

0
1
2

.RCFCJ
.RCUNO
.RCCDR
.RCRQN
. RCNUA

3
4
5
6
7

10

Contents
Function code"job number of requestor
User number
Connected directory
Request number
# args actually passed to RCVOK% block,,# user args
suppLied in user block
Address of user arguments
Capabilities enabled
Controlling terminal number (not device designator)
Requested job number

. RCARA
.RCCAP
.RCTER
.RCRJB

11

User arguments

ll+n
The argument block returned contains two major segments, the job
section, which contains information about the job that issued the
GETOK% JSYS, and the user argument section, which contains the
arguments the user supplied with the GETOK% call. The user argument
section immediately follows the job section.
However, as the job
section's length may grow with future releases of TOPS-20, the
access-control program should extract the address of the user argument
section from word .RCAPA of the RCVOK% argument block. The following
sequence of instructions illustrates how to index through the user
argument section of the RCVOK% argument block:

LP:

jBuild AOBJN pointer
HLRZ
Tl,ARGBLK+.RCNUA
MOVN
Tl,Tl
HRLZS
Tl
HRR
Tl,ARGBLK+.RCARA

jGet # user args passed
jNegate
;Move to left half-word
;Get address of user args

MOVE

T2, (Tl)

;Get user argument

AOBJN

Tl,LP

3-330

TOPS-20 MONITOR CALLS
(RCVOK%)
If the access-cont.rol program wishes to reject the
requested access,
the program returns an error code in AC2.
It can also provide an
error string, which is copied to the caller of GETOK%
if the caller
has provided a byt.e pointer for it.
Generates an illegal instruction interrupt on error conditions below.
RCVOK% ERROR MNEMONICS:
CAPXI:

WHEEL or OPERATOR capability required

GOKER3:

JSYS not executed within ACJ fork

3-331

TOPS-20 MONITOR CALLS
(RDTTY)

RDTTY

JSYS

523

Reads input from the pr imary input designator
(. PRIIN)
into the
caller's address space.
Input is read until either a break character
is encountered or the given byte count is exhausted, whichever occurs
first. Output generated as a result of character editing is output to
the primary output designator (.PRIOU).
The RDTTY call handles the following editing functions:
1.

Delete the last character input (DELETE).

2.

Delete back to the last punctuation character (CTRL/W).

3.

Delete back to the beginning of the current line or,
if the
current line is empty, back to the beginning of the previous
line (CTRL/U).

4.

Retype the current line from its beginning or, if the current
line is empty, retype the previous line (CTRL/R).

5.

Accept the next character without regard to its usual meaning
(CTRL/V) .

By handling these functions, the RDTTY call
between the terminal and the user program.
ACCEPTS IN ACl:
AC2:

I

byte pointer to string in
where input is to be placed
BD(RD%BRK)
Bl(RD%TOP)

serves

as

caller's

an

interface

address

space

Break on CTRL/Z or ESC.
Break on CTRL/G, CTRL/L, CTRL/Z, ESC,
carriage return, line feed.
Break on punctuation (see below).
B2(RD%PUN)
B3(RD%BEL)
Break on end of line (carriage return and
line feed, or line feed only).
B4(RD%CRF) Suppress a carriage return and return a
line feed only.
B5(RD%RND) Return to user program if user tries to
delete beyond beginning of the input
buffer (e.g., user types a CTRL/U or
DELETE past the first character in the
buffer).
If this bit is not set, the
call rings the terminal's bell and waits
for more input.
B7(RD%RIE)
Return to user program if input buffer is
empty.
If this bit is not set, the call
waits for more input.
B9(RD%BEG)
Return to the user program if the user
attempts to edit beyond the beginning of
the input buffer.
BID (RD%RAI) Convert lowercase input to
uppercase
input.
Bll(RD%SUI) Suppress CTRL/U indication (i.e., do not
print XXX, and on display terminals, do
not delete the characters
from
the
screen) .

3-332

TOPS-20 MONITOR CALLS
(~ITY)

B18-B35

AC3:

RETURNS

Number of bytes available in the string.
The input
is terminated when this count
is exhausted, even if the specified break
character has not yet been typed.

If the left half of AC2 is 0, the input is terminated
on end of line only.
byte pointer to prompting-text (CTRL/R buffer), or 0
if no text.
This text, followed by any text in the
input buffer, is output if the user types CTRL/R in
his first line of input.
If no CTRL/R text exists or
the user types CTRL/R on other than the first line of
input,
only the text on the current line will be
output.

+1:

failure, error code in ACI

+2:

success, updated byte pointer
in ACl,
appropriate
bits set in the left half of AC2, and updated count
of available bytes in the right half of AC2

The bits returned in the left half of AC2 on a successful return are:
B12(RD%BTM) Break character terminated the input.
If
this bit is not set,
the
input was
terminated because the byte count was
exhausted.
B13(RD%BFE) Control was returned
to
the
program
because the user tried to delete beyond
the beginning of the
input buffer and
RD%RND was on in the call.
B14(RD%BLR) The backup limit for editing was reached.
NOTE
Bits not described are reserved
for
use by the monitor.
The
state of these bits on completion
of the RDTTY call is undefined.
The punctuation break character set
CTRL/A-CTRL/F
CTRL/H-CTRL/I
CTRL/K
CTRL/N-CTRL/Q
CTRL/S-CTRL/T
CTRL/X-CTRL/Y

ASCII
ASCII
ASCII
ASCII
ASCII

(RD%PUN)

codes
codes
codes
codes
codes

3-333

34-36
40-57
72-100
133-140
173-176

is as follows:

TOPS-20 MONITOR CALLS
(RDTTY)
Upon completion of the call, the terminating character
is stored
in
the string, followed by a NULL (unless the byte count was exhausted).
Also, any CTRL/V, along with the character following it, is stored
in
the string.
RDTTY ERROR MNEMONICS:

I

RDTXl:

Invalid string pointer

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-334

April 1982

TOPS-20 MONITOR CALLS
(RELD)

RELD

JSYS

71

Releases one or all devices assigned to the job.
When a device is
released by the job, the resource allocator receives an IPCF packet.
(Refer to the ALLOC monitor call description for
the format of the
packet sent to the allocator.)
ACCEPTS IN ACl:

device designator,
or
assigned to this job

-1

RETURNS

+1:

failure, error code in ACI

+2:

success

to

release

all

devices

The ASND monitor call can be used to assign a device to the caller.
If this JSYS is issued for a device on which the user has an open JFN,
an error will be returned.
RELD ERROR MNEMONICS:
DEVXl:

Invalid device designator

DEVX2:

Device already assigned to another job

DEVX6:

Job has open JFN on device

3-335

TOPS-20 MONITOR CALLS
(RELSQ)

RELSQ

JSYS

753

Deassigns the ARPANET special message queue.
(The LGOUT
JSYS
deassigns all special message queues.) All pending messages relative
to the specified queue(s) are discarded.
RESTRICTIONS:

for ARPANET systems only.

ACCEPTS IN ACl:

special queue handle (returned by ASNSQ),
deassign all special queues.

RETURNS

+1:

or

-1

to

always

RELSQ functions as a no-op if an unassigned queue is specified in ACI.

3-336

TOPS-20 MONITOR CALLS
(RESET)

RESET

JSYS 147

Resets and initializes the current process.
It is a good programming
practice to
include this call at the beginning of each assembly
language program.
RETURNS

+1:

always

The RESET monitor call performs the following:
1.

Closes all files at or below the current process and releases
all JFNs.
If a
file is nonexistent (i.e., has never been
closed), it is closed and then expunged.

2.

Kills all inferior processes.

3.

Clears the current process' software interrupt system.
The
channel
table and priority level
table addresses remain
unchanged from any previous settings.

4.

Sets the following fields of the controlling
mode word (refer to Section 2.4.9.1):
TT%WAK(BI8-B23)
TT%ECO(B24)
.TTASI(B29)

terminal's

to wake up on every character
to cause echoing
to translate both echo and output
mode)

JFN

(ASCII data

Remaining fields of the mode word are not changed.
5.

Releases all of the current process' PIDs.

6.

Dequeues all of the current process' ENQ requests.

7.

Clears the compatibility package's entry vector.

8.

Releases all process handles that can be released.
the RFRKH call description.)

3-337

(Refer to

TOPS-20 MONITOR CALLS
(RFACS)

RFACS

JSVS

161

Returns the ACs of the specified process.
ACCEPTS IN ACl:
AC2:

RETURNS

+1:

process handle
address of the beginning of a 20-word
(octal)
table
in the caller's address space where the AC values of
the specified process are to be stored
always

The SFACS monitor call can be used to set
process.

the

ACs

for

a

specified

Generates an illegal instruction interrupt on error conditions below.
RFACS ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX4 :

Process is running

FRKHX8 :

Illegal to manipulate an execute-only process

3-338

TOPS-20 MONITOR CALLS
(RFBSZ)

RFBSZ

JSYS

45

Returns the byte size for a specific opening of a file.
(Refer to the
OPENF or SFBSZ call description for setting the byte size.)
ACCEPTS IN ACl:

JFN

RETURNS

+1:

failure, error code in ACI

+2:

success, byte size right-justified in AC2

RFBSZ ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5:

File is not open

3-339

TOPS-20 MONITOR CALLS
(RFCOC)

JSYS

RFCOC

112

Returns the control character output control
(CCOC)
specified terminal.
(Refer to Section 2.4.9.2.)

words

for

ACCEPTS IN ACl:

file designator

RETURNS

always, with output control words in AC2 and AC3

+1:

the

The CCOC words consist of 2-bit bytes,
each byte representing
the
output control
for
one of the ASCII codes 0-37.
If the given
designator is not associated with a
terminal,
the ~COC words are
returned
in AC2 and AC3 with each 2-bit byte containing a value of 2
(send actual code and account format action).
The SFCOC monitor call can be
specified terminal.

used

to

set

the

CCOC

words

for

Generates an illegal instruction interrupt on error conditions below.
RFCOC ERROR MNEMONICS:
TTYXOl:

Line is not active

3-340

a

TOPS-20 MONITOR CALLS
(RFMOD)

JSYS

RFMOD

107

Returns the JFN mode word associated with the specified file.
(Refer
to Section 2.4.9.1.)
The MTOPR monitor call should be used to return
the page length and width fields,
especially when the
fields have
values greater
than 127.
The RFMOD call returns these fields as 1
when their values are greater than 127.
ACCEPTS IN ACl:

source designator

RETURNS

always, with mode word in AC2

+1:

If the designator is not a terminal, the RFMOD call returns in
word in the following format
A

AC2

a

A

7B3+ D66BlO+ D72B17+ 4 mode bits from the OPENF for the designator
This setting of the left half of AC2 indicates that the designator has
mechanical
form
feed, mechanical tab, lower case, page length of 66,
and page width of 72.
The SFMOD and STPAR monitor calls can be used to set various fields of
the JFN mode word.
RFMOD ERROR MNEMONICS:
TTYXOl:

Line is not active

3-341

TOPS-20 MONITOR CALLS
(RFORK)

RFORK

JSYS

155

Resumes one or more processes that had been directly frozen.
This
monitor call does not
resume a process that has been indirectly
frozen.
(Refer to Section 2.7.3.1.) Also, the RFORK call cannot be
used
to resume a process that is suspended because of a monitor call
intercept.
(Refer to the UTFRK call.)
ACCEPTS IN ACl:

process handle

RETURNS

always

+1:

The RFORK monitor call is a no-op if the referenced
directly frozen.

procE~ss(S)

was not

The FFORK monitor call can be used to freeze one or more processes.
Generates an illegal instruction interrupt on error conditions below.
RFORK ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

3-342

TOPS-20 MONITOR CALLS
(RFPOS)

RFPOS

JSYS

111

Returns the current position of the specified terminal's pointer.
(Refer
to Section 2.4.9.1 for information on page lengths and widths
of terminals.)
ACCEPTS IN ACl:

device designator

RETURNS

always, with AC2 contains position within a page
(i.e.,
line number)
in the left half, and position
within a line (i.e., column number) in the right half

+1:

AC2 contains

a

if the designator is not associated with a terminal.

The SFPOS monitor call
terminal's pointer.

can

be

used

to

set

the

position

of

the

Generates an illegal instruction interrupt on error conditions below.
RFPOS ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5:

File is not open

DEVX2 :

Device already assigned to another job

TTYXOl:

Line is not active

3-343

TOPS-20 MONITOR CALLS
(RFPTR)

RFPTR

JSVS

43

Returns the current position of the specified file's pointer.
ACCEPTS IN ACl:

JFN

RETURNS

+1:

failure, error code in ACI

+2:

success, byte number in AC2

The SFPTR monitor call can be used to set the position of
pointer.

the

RFPTR ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5:

File is not open

3-344

file's

TOPS-20 MONITOR CALLS
(RFRKH)

RFRKH

JSYS

165

Releases the specified handle of a process.
A handle can be released
only
if
it describes either an existent process inferior to at least
one other process in the job or a process that has been killed via
KFORK (i.e., a nonexistent process).
ACCEPTS IN ACl:

process handle, or -1 to release all relative handles
that can be released

RETURNS

+1:

failure, error code in ACI

+2:

success

The process handles released when ACI is -1 are the ones released on a
RESET or a KFORK monitor call.
RFRKH ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

3-345

TOPS-20 MONITOR CALLS
(RFSTS)

RFSTS

JSYS

156

Returns the status of the specified process.
SHORT FORM:
ACCEPTS IN ACl:

O"process handle

RETURNS

always, with the status word in ACI and the PC in AC2

+1:

Flags:
BO-B17

Unused, must be zero.

The process status word has the following format:
BO(RF%FRZ)

The process is frozen.
If this bit
the process is not frozen.

is

BI-B17(RF%STS)

The status code
for
the
process.
following values are possible:

off,
The

Value

Symbol

0

.RFRUN

The process is runnable.

1

.RFIO

The process is
for I/O.

2

.RFHLT

The process is dismissed
process
by
voluntary
or
termination
(HFORK
HALTF)
or
was
never
started.

3

.RFFPT

The process is dismissed
process
by
forced
termination.
Forced
termination occurs when
bit 17(SC%F'RZ)
of
the
process capability word
is not set.

4

.RFWAT

The process is dismissed
waiting
for
another
process to terminate.

5

.RFSLP

The process is dismissed
for a specified amount of
time.

6

.RFTRP

The process is dismissed
because
it attempted to
execute a calIon which
an intercept has been set
by its super ior (via the
TFORK call) .

3-346

Meaning

dismissed

TOPS-20 MONITOR CALLS
(RFSTS)

B18-B35(RF%SIC)

Value

Symbol

7

.RFABK

Meaning
The process is dismissed
because it encountered an
instruction on which an
address break was set (by
means of the ADBRK call).

The number of the software interrupt channel
that caused the forced process termination.

The RFSTS call returns with -1 (fullword)
in AC3
if the specified
handle is assigned but
refers to a deleted process.
The call
generates an illegal
instruction interrupt
if
the
handle
is
unassigned.
LONG FORM:
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

flags"process handle
address of status return block
only)

(used

for

long

form

always

Flags:

BO

RF%LNG

BI-B17

Long form call

(must be on)

Unused, must be zero.

In the long form call, RF%LNG is set in ACI and AC2 contains the
address of a status-return block.
On the return, ACI and AC2 are not
modified.
The status-return block has the following format:
Meaning

Word

Symbol

a

.RFCNT

Count of words returned in this block in the left
half,
and count of maximum number of words to
return in right half (including this word).
The
right half of this word is specified by the user.

1

.RFPSW

Process status word.
This word has the same
format as ACI on a return from a short call.
If a
valid,
but
unassigned,
process
handle
was
specified
in ACI, then this word contains -1 and
no other words are returned.

2

.RFPFL

Process PC flags.
These are
returned in AC2 on a short call.

3

.RFPPC

Process PC.
This is the address;
returned in this word.

4

.RFSFL

Status flag word.

the

same

no

Flags:
Bit

Symbol

Meaning

BO

RF%EXO

Process is execute-only

3-347

flags

flags
are

I

TOPS-20 MONITOR CALLS
(RFSTS)

Generates an illegal instruction interrupt on error conditions below.
RFSTS ERROR MNEMONICS:
DECRSV:

DEC-reserved bits not zero

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

3-348

TOPS-20 MONITOR CALLS
(RFTAD)

RFTAD

.JSVS

533

Returns the dates and times associated with the specified file.
ACCEPTS IN ACl:

RETURNS

source designator

AC2:

address of argument block

AC3:

length of argument block

+1:

The format of

th,:~

always, wi th dates returned in the argument block
argument block is as follows:

Word

Symbol

Meaning

o

. RSWRT

Internal date and time file was last written.

1

. RSCRV

Internal date and time file was created.

2

.RSREF

Internal date and time file was last referenced.

3

. RSCRE

System date and time of last write by the monitor .
(The COpy and RENAME commands in the EXEC change
this word,
for
example.)
Requires
WHEEL
or
OPERATOR capability enabled.

4

.RSTDT

Tape-write date and time for archived or
files.

5

.RSNET

Online expiration date and time.
May be a date
and
time
(in internal format) or an interval (in
days).
Intervals are limited to half-word values.

6

.RSFET

Offline expiration date and time.
May be a date
and
time
(in internal format) or an interval (in
days).
Intervals are limited to half-word values.

migrated

On a successful return, the values for the number of words
specified
in AC3 are
returned
in the argument block.
Words in the argument
block contain -1 if anyone of the following occurs:

1.

The corresponding date does not exist for the file.

2.

The designator is not associated with a file.

3.

The corresponding date is not currently assigned
argument block contains more than 4 words).

TOPS-20 Version 5

3-349

(i.e.,

the

April 1982

TOPS-20 MONITOR CALLS
(RFTAD)

The following table illustrates which JSYS's set the
times:
Word

I

. RSWRT
.RSCRV
.RSREF
.RSCRE
. RSTDT
.RSNET
.RSFET

GTJFN

OPENF
Read

OPENF
Write

CLOSF
Write

Set
Set
Set
Set

Set

file

SFTAD

RNAMF

Set
Set
Set
Set*
Set*
Set
Set

FDB
FDB
Set
FDB
FDB
FDB
FDB

dates

and

ARCF

Set*

LEGEND:
*
FDB

Requires WHEEL or OPERATOR capability enabled.
This word copied from source FDB to destination FDB.

Generates an illegal instruction interrupt on error conditions below.
RFTAD ERROR MNEMONICS:

I

DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

TOPS-20 Version 5

3-350

April 1982

TOPS-20 MONITOR CALLS
(RINI)

RIN

JSVS

54

Inputs a byte nonsequentially
(i.e.,
random byte
input)
from the
specified file.
The size of the byte is that gIven in the OPENF call.
The RIN call can be used only when reading data from disk files.
ACCEPTS IN ACl:

JFN

AC3:
RETURNS

byte number within the file

+1:

always, with the byte right-justified in AC2

If the end of the file is reached, AC2 contains O.
The program can
process this end-of-file condition if an ERJMP or ERCAL is the next
instruction following the RIN call.
Upon successful execution of the
call, the file's pointer is updated for subsequent I/O to the file.
The ROUT monitor call can be used to output a byte nonsequentially
a specified file.
Can cause several
software
certain file
conditions.
description. )

interrupts
(Refer
to

or process terminations on
bit OF%HER of the OPENF call

RIN ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5 :

Fi 1e

IOXI:

File is not open for reading

IOX3:

Illegal to change pointer for this opening of file

IOX4:

End of file reached

IOX5:

Device or data error

i~:

not

0

pen

3-3~)1

to

TOPS-20 MONITOR CALLS
(RIR)

RIR

I

JSYS

144

Returns the channel and priority level
table addresses for
the
specified process.
(Refer
to Section 2.6.3.) These table addresses
are set by the SIR monitor call.
The process must run in one section
of memory.
To obtain the addresses of the channel and priority tables
for a process that runs in multiple sections, use
the XRIR% monitor
call.
(See also the XSIR% monitor call.
ACCEPTS IN ACl:

process handle

RETURNS

always, with the priority level table address in the
left half of AC2, and the channel table address in
the right half of AC2

+1:

AC2 contains 0 if the SIR monitor call has not been
designated process.

executed

by

the

Generates an illegal instruction interrupt on error conditions below.
RIR ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of mUltiple process handle

TOPS-20 Version 5

3-352

April 1982

TOPS-20 MONITOR CALLS
(RIRC1~)

RIRCM

JSYS

143

the
Returns the mask for reserved
software
interrupt channels for
specified process.
A process
is able
to
read
its own or its
inferiors' channel masks.
ACCEPTS IN ACl:
RETURNS

+1:

process handle
always,
with
the
reserved
specified process in AC2

The SIRCM monitor call can be
software interrupt channels.

used

to

set

channel
the

mask

mask
for

for

the

reserved

Generates an illegal instruction interrupt on error conditions below.
RIRCM ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

3-353

TOPS-20 MONITOR CALLS
(RLJFN)

RLJFN

JSYS

23

Releases the specified JFNs.
A JFN cannot be
released
unless
it
either
has never been opened or has already been closed.
Also, a JFN
cannot be released if it is currently being
assigned
by a
process,
unless
that process is the same as the one executing the RLJFN and is
not at interrupt level.
The GS%ASG bit returned from a GTSTS call for
the JFN indicates if the JFN is currently being assigned.
ACCEPTS IN ACl:

JFN, or -1
to
release all
JFNs created by this
process or
its
inferiors
that do not specify open
files

RETURNS

+1:

failure, error code in ACI

+2:

success

RLJFN ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3 :

JFN is not assigned

DESX4:

Invalid use of terminal d€signator or string pointer

RJFNXl:

File is not closed

RJFNX2:

JFN is being used to accumulate filename

RJFNX3 :

JFN is nut accessible by this process

OPNXl:

File is already open

3-354

TOPS-20 MONITOR CALLS
(RMA.P)

RMAP
Acquires a handle on a page in
allowed for that page.

JISYS
a

process

61
to

determine

access

page

number

ACCEPTS IN ACl:

process handle in the left half, and
within the process in the right half

RETURNS

always, with a handle on the page in ACl, and access
information
in
AC2.
The handle
in ACI
is a
process/file designator in the left half and
a page
number
in the
right half.
This is called a page
handle.

+1:

a

the

The access information returned in AC2 is as follows:
B2(RM%RD)
B3 (RM%WR)
B4(RM%EX)
B5(RM%PEX)
B9(RM%CPY)

read access allowed
write access allowed
execute access allowed
page exists
copy-on-write access

If the page supplied in the call does not exist, RMAP returns a -1
ACI and a zero in AC2.

in

Generates an illegal instruction interrupt on error conditions below.
RMAP ERROR MNEMONICS:
FRKHXl:

Invalid process handle

3-355

I

TOPS-20 MONITOR CALLS
(RNAMF)

RNAMF

JSYS

35

Renames an existing file.
The JFNs of both the existing file and
new file specification must be closed.
ACCEPTS IN ACI:

JFN of existing file
file)

AC2:
RETURNS

to

be

renamed

(i.e.,

the

source

JFN of new file specification (i.e., destination file
specification)

+1:

failure, error code in ACI

+2:

success, JFN in ACI is released, and the JFN in AC2
is associated with
the
file
under
its new file
specification

If the JFN of the new file specification already refers to an existing
file, the existing file's contents are expung€d.
When a file is renamed, many of the attributes of the existing
file
are given to the renamed file.
The settings of the following words in
the FDB (refer to Section 2.2.8) are copied from the existing file
to
the renamed file.
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word
Word

.FBCTL (FB%LNG, FB%DIR, FB%NOD, FB%BAT, FB%FCF)
.FBADR
.FBCRE
.FBGEN (FB%DRN)
.FBBYV (FB%BSZ, FB%MOD, FB%PGC)
.FBSIZ
.FBCRV
.FBWRT
.FBREF
.FBCNT
.FBUSW

Note that the setting of FB%PRM (permanent file) does not get copied.
Thus,
if a
file with bit FB%PRM on is renamed, the renamed file has
FB%PRM off.
The existing file is left in a deleted
state with
its
contents empty but its FDB existent.
Renaming a file with tape information (an archived or migrated
file)
carries
the
tape
information to
the new file name.
Renames which
would effectively destroy a file with archive status will fail.
RNAMF EPROR MNEMONICS:

I

DESXI:

Invalid source/destination designator

DESX 3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

OPNXI:

File is already open

RNAMXl:

Files are not on same device

RNAMX2 :

Destination file expunged

TOPS-20 Version 5

3-356

April 1982

TOPS-20 MONITOR CALLS
(RNAMF)

RNAMX3 :

Write or owner access to destination file required

RNAMX4:

Quota exceeded in destination of rename

RNAMX5 :

Destination file is not closed

RNAMX6:

Destination file has bad page table

RNAMX7:

Source file expunged

RNAMX8 :

Write or owner access to source file required

RNAMX9:

Source file is nonexistent

RNMXIO:

Source file is not closed

RNMXII:

Source file has bad page table

RNMXI2:

Illegal to rename to self

RNMXI3:

Insufficient system resources

3-357

TOPS-20 MONITOR CALLS
(ROUT)

ROUT

JSYS

55

Outputs a byte nonsequentially
(i.e.,
random byte output)
to the
specified
file.
The size of the byte is that given in the OPENF call
for the JFN.
The ROUT call can be used only when writing data to disk
files.
ACCEPTS IN ACl:

RETURNS

JFN

AC2:

the byte to be output, right-justified

AC3:

the byte number within the file

+1:

always

Upon successful execution of the call, the file's pointer
for subsequent I/O to the file.

is

updated

The RIN monitor call can be used to input a byte nonsequentially
a specified file.
Can cause several
software
certain file
conditions.
description. )

interrupts
(Refer
to

from

or process
terminations on
bit OF%HER of the OPENF call

ROUT ERROR MNEMONICS:

I

DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5 :

File is not open

IOX2:

File is not opened for writing

IOX3:

Illegal to change pointer for this opening of file

IOX5:

Device or data error

IOX6:

Illegal to write beyond absolute end of file

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-358

April 1982

TOPS-20 MONITOR CALLS
(RPACS)

RPACS

JISYS

57

Returns the accessibility of a page.
ACCEPTS IN ACl:

and page
Process/file designator in the left half,
number within the process or file in the right half

RETURNS

Always,
with
information:

+1:

B2(PA%RD)
B3(PA%WT)
B4(PA%EX)
B5(PA%PEX)
B6(PA%IND)
B9(PA%CPY)
BIO(PA%PRV)
B20(Pl%RD)
B21 (Pl%WT)
B22(Pl%EX)
B23(Pl%PEX)
B27(Pl%CPY)

AC2

containing

the

following

read access allowed
write access allowed
execute access allowed
page exists
indirect pointer
copy-on-write
private page
read access allowed in first pointer
write access allowed in first pointer
execute access allowed in first pointer
page exists in first pointer
copy-on-write in first pointer

The bits in the left half are
the
result of
tracing
any
indirect
pointer chains,
and
the bits in the right half contain information
about the first pointer (the one in the map directly indicated by the
argument) only.
The left half and right half information will be different only if an
indirect pointer was encountered
in the first map.
In this case,
B6(PA%IND) is set, the left half access is less than or equal
to
the
right half access;
and B9(PA%CPY) is set if it was found set at any
level.
The bits B5(PA%PEX) and BIO(PA%PRV) always refer to the
(first nonindirect pointer) encountered.

last

pointer

The SPACS monitor call can be used to set the accessibility of a page.
Generates an illegal instruction interrupt on error conditions below.
RPACS ERROR MNEMONICS:

I

ARGX06:

Invalid page number

DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5 :

File is not open

DESX8:

File is not on disk

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

3-359

TOPS-20 MONITOR CALLS
(RPCAP)

RPCAP

JSYS

150

Returns the capabilities for the specified process.
2.7.1 for the description of the capability word.)

(Refer to Section

ACCEPTS IN ACI:

process handle

RETURNS

always, with capabilities possible for
this process
in AC2, and capabilities enabled for this process in
AC3

+1:

The EPCAP monitor call can be used to enable
process.

the

capabilities

of

Generates an illegal instruction interrupt on error conditions below.
RPCAP ERROR MNEMONICS:
FRKHXI:

Invalid process handle

FRKHX3 :

Invalid use of multiple process handle

3-360

a

TOPS-20 MONITOR CALLS
(RSCAN)

RSCAN

JSYS

500

Places a text string in, or reads a text string from, the job's rescan
buffer
(an area of storage in the Job Storage Block). This facility
allows a program to receive information that will be used as primary
input for another program before this other program reads input from
the terminal.
The RSCAN call has two steps: the acceptance and the use of the
string.
Each step has a different calling sequence. The first
is to accept the text string to be used as input and to place
string in the rescan buffer.
The calling sequence for this
specifies, in ACl, a pointer to the text string to be input.
that the string stored in the rescan buffer is terminated by a
byte.

text
step
this
step
Note
null

The second step is to make the string available to the program, which
can read the string by means of the BIN call. The calling sequence
for this second step specifies a function code of O(.RSINI)
in ACI.
This code indicates that the last string entered at command level from
the terminal is available for reading.
The program executing the RSCAN call can determine when the data has
been read by issuing the function code l(.RSCNT), which returns the
number of characters remaining in the buffer.
In other words, the first RSCAN call, specifying a new text string,
stores the string in the rescan buffer, but does not cause it to be
read. A second RSCAN call must be given before the string can be
read.
This second RSCAN causes the system to provide input from the most
recent string stored, and can be given only once. After this second
RSCAN call, nothing will be read from the rescan buffer until another
RSCAN call specifies a different text string.
In addition, the job
receives input from the rescan buffer only if the source for input in
the BIN call is the JFN of the controlling terminal.
If the source
for input is other than the controlling terminal, input will not come
from the rescan buffer.
ACCEPTS IN ACl:

byte pointer to a new text string, or 0 in
half and function code in the right half

RETURNS

+1:

failure, error code in ACI

+2:

success

the

left

The defined functions are as follows:
Function

Symbol

Meaning

o

.RSINI

Make the data in the buffer available as
input to any process in the current job that
is reading
data
from
its
controlling
terminal.

1

.RSCNT

Return the number of characters remaining to
be read in the buffer. This function does
not cause data to be read;
it is used to
determine when all the data has been read
after making the data available.

3-361

TOPS-20 MONITOR CALLS
(RSCAN)

On a successful return, ACI contains an updated
byte pointer
if a
pointer was given
in the call.
Otherwise, ACI contains either the
number of characters in the rescan buffer,
or
0 if there
are
no
characters.
To clear the RSCAN buffer, supply a byte pointer
string.
RSCAN ERROR MNEMONICS:
RSCNX2:

Invalid function code

3-362

(in ACl)

to

a

null

TOPS-20 MONITOR CALLS
(RSMA]P%)

RSMAp%

.JSVS

610

Reads a section map, and provides information about the mapping of one
section of a fork's memory.
ACCEPTS IN ACl:

fork handle"section number

RETURNS

Always, with map
information in AC2

+1:

information

in

ACI

and

access

The map information returned in ACI can be the fOllowing:
-1

no current mapping present

o

the mapping is a private section

n, , m

where n is a fork handle or a JFN, and m is a
section number.
If n is a fork handle, the
mapping is an indirect or shared mapping to
another fork's section.
If n is a JFN, the
mapping is a shared mapping to a file section.
These are called section handles.

The access information bits returned in AC2 are the following:
B2(SM%RD)

Read access is allowed

B3(SM%WR)

Write access is allowed

B4(SM%EX)

Execute access is allowed

B5(PA%PEX)

The section exists

B6(SM%IND)

The section was created using an indirect pointer.

Generates an illegal instruction interrupt on error conditions below.
RSMAP% ERROR MNEMONICS:
ARGX23:

Invalid section number

ARGX28:

Not available on this system

TOPS-20 Version 5

3-363

April 1982

TOPS-20 MONITOR CALLS
(RTFRK)

RTFRK

JSYS

322

Returns the handle of the process that was suspended because of a
monitor
call
intercept and
the monitor call that the process was
attempting to execute.
The superior process monitoring the intercepts
can receive only one interrupt at a time.
Thus, the superior process
should execute the RTFRK call after receiving an interrupt to identify
the process that caused the interrupt.
The system maintains a queue of the processes that have been suspended
and
that are waiting to interrupt the superior process monitoring the
intercepts.
The RTFRK call advances the processes on the queue;
and
if the call is not executed, subsequent interrupts are not generated.
See the description of the TFORK JSYS
monitor call intercept facility.
RETURNS

+1:

for

more

information

on

the

always, with ACI containing the handle of the process
that generated the interrupt, and AC2 containing the
monitor call instruction that caused the process to
be suspended.
If no process is currently suspended
because of a monitor
call
intercept,
ACI and AC2
contain 0 on return.

Because the process handle returned
in ACI
is a
relative process
handle, it is possible that a process is currently suspended, but that
all relative handles are in use.
In this case,
the caller
should
release a relative process handle with the RFRKH call a~d then reissue
the RTFRK call.
Generates an illegal instruction interrupt on error conditions below.
RTFRK ERROR MNEMONICS:
FRKHX6:

All relative process handles in use

3-364

TOPS-20 MONITOR CALLS
(RTIW)

RTIW

JSYS

173

Reads the terminal interrupt word (refer to Section 2.6.6)
specified process or
the entire
job,
and
returns
the
interrupt word mask.

for
the
terminal

ACCEPTS IN ACl:

terminal

RETURNS

+1:

BO(RT%DIM)

return the
interrupts

mask

for

deferred

B18-B35
[RT%PRH)

process handle, or -5 for entire job

always, with the terminal interrupt mask in AC2,
and
the deferred
terminal
interrupt mask in AC3.
The
deferred interrupt mask
is returned only if both
BO(RT%DIM)
is on and the right half of ACI indicates
a specific process.

The STIW monitor call can be used to set the terminal
masks.

interrupt

word

Generates an illegal instruction interrupt on error conditions below.
RTIW ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

3-365

TOPS-20 MONITOR CALLS
(RUNTM)

RUNTM

JSVS

15

Returns the run time of the specified process or of the entire job.

I

ACCEPTS IN ACl:

process handle, or .FHJOB (-5)

RETURNS

always,
with
runtime
(in
milliseconds)
right-justified
in ACl, a divisor to convert time to
seconds in AC2, and console time (in milliseconds) in
AC3.
AC2 always contains 1000:
thus, it is not
necessary to examine its contents.

+1:

for the entire job

Generates an illegal instruction interrupt on error conditions below.
RUNTM ERROR MNEMONICS:
FRKHXl:

Invalid process handle

RUNTXl:

Invalid process handle -3 or -4

3-366

TOPS-20 MONITOR CALLS
(RWM)

RWM

JSYS

135

Returns the word mask for the interrupts waiting on software
for the specified process.
ACCEPTS IN ACl:

process handle

RETURNS

always, with

+1:

channels

ACI containing a 36-bit word with bit n on, meaning
that an interrupt on channel n is waiting.
AC2 containing the status of the interrupts
in
progress.
Bit n on in the left half means an
interrupt of priority level n occurring during
execution of user code is in progress. Bit l8+n
on in the right half means an interrupt of
priority level n occurring during execution of
monitor code is in progress.
Generates an illegal instruction interrupt on error conditions below.
RWM ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

3-367

TOPS-20 MONITOR CALLS
(RWSET)

RWSET

JSVS

176

Releases the working set by removing all of the current process' pages
from its working set. The pages are moved to secondary storage and
are not preloaded the next time the process is swapped in.
This
operation is invisible to the user.
RETURNS

+1:

always

3-368

TOPS-20 MONITOR CALLS
( SACTl~)

SACTF

JSYS

62

Sets the account to which the specified file is to be charged.
RESTRICTIONS:

When this call is used
in any section other
than
section zero,
one-word global byte pointers used as
arguments must have a byte size of seven bits.

ACCEPTS IN ACl:

JFN

AC2:

RETURNS

account number in bits 3-35 if bits 0-2 contain 5.
Otherwise,
contains a byte pointer
to an account
string in the address space of caller.
If a null
byte is not seen, the string is terminated after 39
characters are processed.

+1:

failure, error code in ACI

+2:

success, updated string pointer in AC2

If the account validation facility is enabled, the SACTF call verifies
the account given and
returns an error if it is not valid for the
caller.
The GACTF monitor call can be used to obtain the account designator to
which a file is being charged.
SACTF ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

SACTXl:

File is not on multiple-directory device

SACTX2 :

Insufficient system resources

SACTX3 :

Directory requires numeric account

SACTX4:

Write or owner access required

VACCXO:

Invalid account

VACCXl:

Account string exceeds 39 characters

VACCX2 :

Account has expired

TOPS-20 Version 5

3-369

(Job Storage Block full)

April 1982

I

TOPS-20 MONITOR CALLS
(SAVE)

SAVE

I

JSYS

202

Saves, in nonsharable format, pages of a process in the
file.
The process must run in one section of memory.
Section 2.8.1 for the format of a nonsharable save file.
SSAVE monitor call for saving processes in sharable for~at.)
can then be copied into a given process with the GET monitor

specified
(Refer to
See the
This file
call.

ACCEPTS IN ACl:

process handle in the left half, and JPN in the right
half

AC2:

one table entry, or 0 in the left half and pointer to
the table in the right half (see below)

RETURNS

+1:

always

The table has words in the format:
length of the area to save in the
left half and address of the first word to save in the right half.
The table is terminated by a 0 word.

I

Nonexistent pages are not saved. The SAVE call also does not save the
accumulators.
Thus,
it is possible to save al~ assigned nonzero
memory in section zero or the current section with thE~ table entry
777760,,20 in AC2.
The SAVE call does not save section numbers as parts of addresses, so
all addresses are section-relative. Furthermore, the SAVE call saves
only the section in which the call is executed.
The SAVE call closes and releases the given JFN.
Can cause several software
certain file conditions.

interrupts

or

process

terminations

on

Generates an illegal instruction interrupt on error conditions below.
SAVE ERROR MNEMONICS:

I

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

SAVXl:

Illegal to save files on this device

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

All file errors can also occur.

TOPS-20 Version 5

3-370

April 1982

TOPS-20 MONrrOR CALLS
(SCTTY)

SeTTY

JSYS

324

Redefines the controlling terminal for the specified process and all
of
its inferiors.
The controlling terminal can be redefined at any
level in the job's process structure;
inferior processes below this
level
uses this terminal
by default as their controlling terminal.
Therefore, the controlling terminal of a process is defined to be:
1.

The one that has been explicitly defined for it
call.

2.

If no terminal has been explicitly defined for
the process,
the terminal that has been explicitly defined for its closest
superior by a SCTTY call.

3.

If no SCTTY call has been executed for
the job's controlling terminal.

a

by

superior

a

SCTTY

process,

The effect of terminal interrupts on a process is dictated by the
controlling terminal for the process.
This means that processes that
have enabled specific terminal characters receives an
interrupt when
those characters are typed on the controlling terminal.
If no SCTTY
call has been executed for any process in the
job,
the controlling
terminal
for
all processes within the job is the job's controlling
terminal.
(The job's controlling terminal is usually the one used
to
log
in and control the job.)
In addition to being the source of all
terminal interrupts, the job's controlling
terminal
serves as the
primary I/O designators (refer to Section 1.2.6) for all processes in
the job, unless these designators have been changed for a process.
When a SCTTY call
is executed
for
a process within a
job,
the
controlling terminal and the source of terminal interrupts are changed
for that process and all of its inferiors.
This group of processes
receives interrupts only from the new controlling terminal and no
longer from the job's controlling terminal.
These processes cannot
receive or change terminal
interrupts from any other controlling
terminals.
However, primary I/O continues to be received from and
sent to the job's controlling terminal if the primary I/O designators
have not been changed.
For most applications,
the primary I/O
designators should be changed with the SPJFN call to correspond to the
new controlling terminal.
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

function code in the left half, and process handle in
the right half
terminal designator
always

3-371

TOPS-20 MONITOR CALLS
(SCTTY)
The available functions are as follows:
Code

Symbol

Meaning

o

.SCRET

Return the designator of the given process'
is
controlling
terminal.
The designator
returned in AC2.

1

.SCSET

Change
the
given
process'
controlling
terminal
to
the terminal designated in AC2.
The terminal designator cannot refer
to the
job's controlling
terminal.
This function
also changes the controlling terminal of all
processes inferior to the given process.

2

.SCRST

Reset the given process' controlling terminal
to
the
job's controlling
terminal.
This
function also resets the controlling terminal
of
all processes
inferior
to
the given
process.

Functions .SCSET and .SCRST require the process
to have
the SC%SCT
capability (refer to Section 2.7.1) enabled in its capability word.
The SCTTY monitor call cannot be used
to change
the controlling
terminal
for
the current process or for any process superior to the
current process.
Generates an illegal instruction interrupt on error conditions below.
SCTTY ERROR MNEMONICS:
SCTXI:

Invalid function code

SCTX2:

Terminal already in use as controlling terminal

SCTX3:

Illegal to redefine the job's controlling terminal

SCTX4:

SC%SCT capability required

FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

DESXl:

Invalid source/destination designator

DEVX2:

Device already assigned to another job

3-372

TOPS-20 MONITOR CALLS
(SCVEC)

JSYS

SCVEC
Sets the entry vector and the
package.
ACCEPTS IN ACI:

UUO

301

locations

for

the

compatibility

process handle

AC2:

entry vector length
in the left
vector address in the right half

AC3:

UUO location in the left half, and PC location in the
right half

+1:

RETURNS

half,

and

entry

always

The compatibility package's entry vector is as follows:
Word

Meaning

Symbol

0

.SVEAD

Entry address for interpreting UUOs

1

.SVINE

Initial entry for setup and first UUO

2

.SVGET

Entry for GET share file routine

3

.SV40

Address to receive contents of location 40 on
the UUO call

4

.SVRPC

Address to receive the return PC word on
UUO call

5

.SVMAK

Entry for MAKE share file routine

.SVCST

Communication for
handling CTRL/C,
START
sequences between the compatibility package
and the TOPS-20 Command Language

6 and 7

(obsolete)

the

(obsolete)

The monitor transfers to the address specified in the
right half of
AC2 on any monitor
call whose operation code is 040-077 (a monitor
UUO).
This transfer occurs after the monitor stores the contents of
location 40 and the return PC in the locations specified by the left
half and right half of AC3,
respectively.
The entry vector
is
retained but is not used by the monitor.
If AC2 is 0, the next UUO causes the compatibility package to be
merged
into the caller's address space.
In this case, the DUO and PC
locations are set from words
3 and
4,
respectively,
of
the
compatibility package's entry vector.
If AC2 is -1, UUO simulation is disabled, and an occurrence of a UUO
is considered an illegal instruction.
This action is useful when the
user is removing UUOs from a program.
The GCVEC monitor call can be used to obtain the entry vector for
compatibility package.

3-373

the

TOPS-20 MONITOR CALLS
(SCVEC)
SCVEC ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX4 :

Process is running

FRKHX8:

Illegal to manipulate an execute-only process

3-374

TOPS-20 MONITOR CALLS
(SDSTS)

SDSTS

JSYS

146

(Refer
to Section 2.4
for
the
Sets the
status of a device.
descriptions of the status bits.) This call requires that the device
be opened.
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

JFN
new status bits
always

The SDSTS call
is a
no-op
device-dependent status bits.

for

devices

The GDSTS monitor call can be used to obtain the
particular device.

that

do

status

not
bits

have
for

Generates an illegal instruction interrupt on error conditions below.
SDSTS ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5 :

File is not open

DESX9:

Invalid operation for this device

3-375

a

TOPS-20 MONITOR CALLS
(SDVEC)

SDVEC

JSVS

543

Sets the entry vector for the Record Management System (RMS).

I

RESTRICTIONS:

requires RMS software
BASIC and COBOL)

ACCEPTS IN ACI:

process handle

AC2:
RETURNS

+1:

(currently available only

entry vector length
in the
left
vector address in the right half

half,

and

with

entry

always

The Record Management System's entry vector is as follows:
Word

Symbol

o

.SDEAD
.SDINE
.SDVER
.SDDMS
.SDRPC

1
2

3
4

Meaning
Entry address for the RMS calls
Initial entry for the first RMS call
Pointer to RMS version block
Address in which to store the RMS call
Address in which to store return PC word

The GDVEC monitor call can be used to obtain the entry vector for RMS.
Generates an illegal instruction interrupt on error conditions below.
SDVEC ERROR MNEMONICS:
ILINS5:

RMS facility is not available

FRKHX8:

Illegal to manipulate an execute-only process

3-376

TOPS-20 MONITOR CALLS
(SETER)

SETER

JSYS

336

Sets the most recent error condition encountered by a process.
error condition is stored in the process' Process Storage Block.
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

This

process handle
error code that is to be set
always

The GETER monitor call can be used to obtain
condition encountered by a process.

the

most

recent

error

Generates an illegal instruction interrupt on error conditions below.
SETER ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Process is running

FRKHX8:

Illegal to manipulate an execute-only process

3-377

TOPS-20 MONITOR CALLS
(SETJB)

SETJB

JSYS

541

Sets job parameters for the specified job.
RESTRICTIONS:

some functions require WHEEL or
enabled

ACCEPTS IN AC1:

job number, or -1 for the current job

RETURNS

AC2:

function code

AC3:

value for function

+1:

with

the

Values

. SJDEN(O)

legal

values

for

these

Meaning
Set default for magnetic tape density .

.SJDDN(O)
.SJDN2(1)
.SJDN5(2)
.SJDN8(3)
.SJD16(4)
.SJD62(5)
.SJPAR(l)

System default
200 bits/inch
556 bits/inch
800 bits/inch
1600 bits/inch
6250 bits/inch

density
(8.1 rows/mm)
(22.5 rows/mm)
(32.2 rows/mm)
(65.3 rows/mm)
(246 rows/mm)

Set default for magnetic tape parity.
.SJPRO(O)
.SJPRE(l)

.SJDM(2)

Odd parity
Even parity
Set default for magnetic tape data mode .

. SJDDM(O)
.SJDMC(l)
.SJDM6(2)
.SJDMA(3)
.SJDM8(4)
.SJDMH(5)

.SJRS(3)

capability

always

The available functions,
along
functions, are described below.
Function

OPERATOR

System default data mode
Dump mode
SIXBIT byte mode (7-track drives)
ANSI ASCII mode
(7 bits in 8-bit
bytes)
Industry-compatible mode
High-density mode for
TU70 and TU72
tape drives only (nine 8-bit bytes in
two words)
Set default for magnetic tape record
size
in bytes.
The maximum allowable
number of bytes depends on the hardware
data mode specified for the drive:
Data Mode

Maximum
Number Bytes

default
dump
SIXBIT
ANSI ASCII
industry compatible
high density

8192
49152
40960
32768
8192

3-378

TOPS-20 MONITOR CALLS
(SETJB)
Function

Values

Meaning

.SJRS(3)
(Cont. )

Note that the SETJB JSYS does not return
an error message if the above values are
exceeded.
However,
the OPENF or the
first data
transfer
(whichever
is
performed first after
function .SJDM)
fails.
Note that MTOPR function
.MOSRS
can be used
to override the default
record
size
specified
with
SETJB
function .SJDM .

. SJDFS(4)

Set spooling mode.
.SJSPI(O)
.SJSPD(l)

Immediate mode spooling
Deferred mode spooling

.SJSRM(5)

Set remark for current job session.
AC3
contains
a
pointer
to the session
remark, which is updated on a successful
return.
The first 39 characters of the
session remark are placed in the
job's
Job Storage Block .

. SJT20(6)

Indicate if job
program level.
-1

o

.SJDFR(7)

at

EXEC

level

or

job is at EXEC level
job is at program level
Set job default retrieval.
Allows a
user
to override the system default for
OPENF.

.SJRFA(O)
.SJRWA(l)

. SJBAT(lO)

Any OPENF of a disk file
should fail
if file's contents are not on line.
This is the system default.
Any OPENF of a disk file
should wait
for
the ARCF JSYS to restore the
contents of a file to disk .
Set batch flags and batch stream number

OB%WTO (3Bl)

Write to operator capabilities
.0BlI.LL(O)
.0BNWR(l)
.OBNOM(2)

OB%BSS(lB10)
OB%BSN (1 77Bl 7)
.SJLLO(ll)

is

WTO (wr i te to operator)
and WTOR (wr i tE~ to operator with reply) allowed
No WTR allowed
No message allowed

OB%BSN (see below)
contains
stream number
Batch stream number

a

batch

Set job logical location (node name)

The SETJB monitor call requires the process to have WHEEL or OPERATOR
capability enabled to set parameters for a job other than the current
job.
The GETJI monitor call can be used to obtain the job parameters for
specified job.
3-379

a

TOPS-20 MONITOR CALLS
(SETJB)
Generates an illegal instruction interrupt on error conditions below.
SETJB ERROR MNEMONICS:
SJBXl:

Invalid function

SJBX2 :

Invalid magnetic tape density

SJBX3:

Invalid magnetic tape data mode

SJBX4:

Invalid job number

SJBX5:

Job is not logged in

SJBX6:

WHEEL or OPERATOR capability required

SJBX7:

Remark exceeds 39 characters

SJBX8:

Illegal to perform this function

3-380

TOPS-20 MONI'TOR CALLS
(SETNM)

SETNM

JSVS

210

Sets the private name of the program being used by
This name is the one printed on SYSTAT listings.

the

ACCEPTS IN ACl:

sixbit name used to identify program

RETURNS

always

+1:

The GETNM monitor call can be used to obtain the name of
currently being used.

3-3Bl

current

the

job.

program

TOPS-20 MONITOR CALLS
(SETSN)

SETSN

JSVS

506

Sets either the system name or the private name of the
used by the current job.
ACCEPTS IN ACl:
AC2:
RETURNS

program

SIXBIT name to be used as the system name.
is the one used for system statistics.

being

This name

SIXBIT name to be used as the private name.
This
name is the same as the one set with the SETNM call.

+1:

failure.
defined.)

+2:

success

(Currently, there are

no

failure

returns

System program usage statistics are accumulated in the system tables
SNAMES,
STIMES,
and SPFLTS.
(Refer to Section 2.3.2.) To make this
possible, the SETSN call must be executed by each
job whenever
the
system program name
is changed.
In the
usual case, the TOPS-20
Command Language handles this.
The argument to SETSN should be:
for
system programs
(programs from SYS:), the filename, truncated to six
characters and converted to SIXBITi
for private programs, "(PRIV)".

3-382

TOPS-20 MONITOR CALLS
(SEVE:C)

SEVEC

JSVS

204

Sets the entry vector of the specified process.
The process must
in only one section of memory.
(Refer to Section 2.3.2.)
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

run

process handle
entry vector word
(length in the left half
address of first word in the right half), or a

and

always

I

A zero in AC2 removes the entry vector for the process.
The GEVEC monitor call can
vector.

be

used

to

obtain

the

process'

The XSVEC% monitor call sets the entry vector of a process
in a section other than section zero.

that

entry
runs

Generates an illegal instruction interrupt on error conditions below.
SEVEC ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

SEVEXl:

Entry vector length is not less than 1000

TOPS-20 Version 5

I

3-383

April 1982

I

TOPS-20 MONITOR CALLS
(SFACS)

SFACS

JSVS

160

Sets the ACs of the specified process.
ACCEPTS IN ACl:
AC2:

RETURNS

+1:

process handle
address of the beginning of a 20(octal) word table in
the caller's address space.
This table contains the
values to be placed into the ACs of the specified
process.
always

The specified process must not be running.
The RFACS call can be used to obtain the ACs for a specified process.
Generates an illegal ~instruction interrupt on error conditions below.
SFACS ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX4 :

Process is running

FRKHX8:

Illegal to manipulate an execute-only process

3-384

TOPS-20 MONITOR CALLS
(SFBSZ)

SFBSZ

,JSYS

46

Resets the byte size for a specific opening of a file.
OPENF and RFBSZ calls descriptions.)
ACCEPTS IN ACl:

RETURNS

(Refer to

the

JFN

AC2:

byte size, right-justified

+1:

failure, error code in ACI

+2:

success

The SFBSZ monitor call recomputes the EOF limit and the file's pointer
based on the new byte size given.
SFBSZ ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3 :

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX5 :

File is not open

DESX8:

File is not on disk

SFBSXl:

Illegal to change byte size for this opening of file

SFBX2:

Invalid byte size

3-385

TOPS-20 MONITOR CALLS
(SFCOe)

SFCOC

JSYS 113

Sets the control character output control
(CCOC)
for
the specified
terminal.
(Refer to Section 2.4.9.2 and the RFCOC call description.)
ACCEPTS IN ACl:

RETURNS

file designator

AC2:

control character output control word

AC3:

control character output control word

+1:

always

The CCOC words consist of 2-bit bytes,
each byte
output control for one of the ASCII codes 0-37.

representing

The SFCOC call is a no-op if the designator is not associated
terminal.
The RFCOC monitor call can be used to obtain
specified terminal.

the

SFcac ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

DEVX2:

Device already assigned to another job

TTYXOl:

Line is not active

3-386

CCOC

words

the

with

a

for

a

TOPS-20 MONITOR CALLS
(SFMOD)

SFMOD

JSYS

110

Sets the program-related modes for the specified terminal.
The modes
that can be set by this call are in the following bits of the JFN mode
word.
(Refer to Section 2.4.9.1.)
BO(TT%OSP)
B18-B23 (TT%WAK)
B24(TT%ECO)
B28-B29(TT%DAM)
ACCEPTS IN ACI:
AC2:
RETURNS

+1:

output suppression control
wakeup control
echoes on
data mode

file designator
JFN mode word
always

The SFMOD call is a no-op if the designator is not associated
terminal.

with

a

The STPAR monitor call can be used to set device-related modes of the
JFN mode word,
and the RFMOD monitor call can be used to obtain the
JFN mode word.
SFMOD ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5 :

File is not open

DEVX2:

Device already assigned to another job

TTYXOl:

Line is not active

3-387

TOPS-20 MONITOR CALLS
(SFORK)

SFORK

JSYS

157

Starts the specified process in section zero.
If the process
is
frozen, the SFORK call changes the PC but does not resume the process.
The RFORK call must be used to resume the process.
ACCEPTS IN ACl:

flags"process handle
Flags:
SF%CON(IBO)

AC2:

RETURNS

+1:

Used to continue a process that has
previously halted.
If SF%CON is set,
the address in AC2 is ignored, and the
process continues from where it was
halted.

the PC of the process being started.
The PC contains
flags
in the left half and
the process starting
address in the right half.
This call obtains the
section number of the PC from the entry vector of the
process.
always

The SFRKV monitor call can be used to
position in its entry vector.

start

a

process

at

a

given

Generates an illegal instruction interrupt on error conditions below.
SFORK ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX5 :

Process has not been started

FRKHX8:

Illegal to manipulate an execute-only process

TOPS-20 Version 5

3-388

April 1982

TOPS-20 MONITOR CALLS
(SFPOS)

SFPOS

..ISYS

526

Sets the position of the specified terminal's pointer.
Section 2.4.9.4 for
information on page lengths and
terminals. )
ACCEPTS IN ACl:
AC2:

RETURNS

+1:

to
of

file designator
position within? page
(line number)
in the left
half, and position with a line (column number) in the
right half
always

The SFPOS monitor call is a no-op if the designator is not
with a terminal or is in any way illegal.
The RFPOS monitor call can be used to obtain the current
the terminal's pointer.
SFPOS ERROR MNEMONICS:
TTYXOl:

(Refer
widths

Line is not active

3-389

associated
position

of

TOPS-20 MONITOR CALLS
(SFPTR)

SFPTR
Sets the
to the
followed
the same

27

position of the specified file's pointer for
subsequent
I/O
file.
The SFPTR call specifying a
certain byte number,
by a BIN call, has the same effect as a RIN call specifying
byte number.

ACCEPTS IN ACl:
AC2:
RETURNS

JSVS

JFN
byte number to which the pointer is to be set, or
to set the pointer to the current end of the file

+1:

failure, error code in ACI

+2:

success

The following comments concern line sequence numbers

-1

(LSNs):

By default, the monitor ignores all LSNs and nulls when doing
input
from a file.
(Nulls are used to insure that the LSN starts on a word
boundary.) When the first byte of the file is read, the monitor checks
the word containing that byte to see if it is part of an LSN.
If it
is not, the monitor sets an internal
flag
that
is equivalent to
setting OF%PLN in the OPENF.
This flag specifies that all bytes will
be passed to the user program.
If the monitor's internal flag is not
set, then LSNs and nulls are suppressed.
If the monitor has not checked the first word of the file (as is the
case when a process executes an SFPTR JSYS to move ~he file byte
pointer to a byte in some other word of the file) and the process did
not set OF%PLN in the OPENF, then the monitor assumes that the file
contains LSNs.
LSNs and nulls are not passed
to the user program.
Thus nulls will be suppressed even if the file contains no LSNs.
In
this case, if it is desired that nulls should be passed
to the user
program, then OF%PLN should be set in the OPENF, regardless of whether
the file actually contains LSNs.
The RFPTR monitor call can be used to obtain the current
the file's pointer.

position

SFPTR ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX8:

File is not on disk

SFPTXl:

File is not open

SFPTX2:

Illegal to reset pointer for this file

SFPTX3:

Invalid byte number

3-390

of

TOPS-20 MONITOR CALLS
(SFRKV')

SFRKV

JSYS

201

Starts the specified process using the given
vector.
ACCEPTS IN ACl:
AC2:

RETURNS

+1:

position

in

its

entry

process handle
word (O-n) in the entry vector
that contains
the
address
to use
for
the
start address.
Word 0 is
always the primary start address, and word 1 is the
rl=enter address.
always

The process starts execution at
the address
that
is
the
starting
address of the entry vector plus the offset specified in AC2.
That
location must contain an executable instruction.
If the process has a TOPS-IO format entry vector
(JRST in the left
half),
then the
left half of AC2
in the SFRKV call is the start
address offset.
The only legal offsets are 0 and 1, and they are only
legal
for entry vector position 0 (start address).
Thus, for TOPS-IO
entry vectors, the left half of AC2 will be added to the contents of
the
right half of .JBSA to determine the start address.
Entry vector
position 0 means "use the contents of the right half of .JBSA (120) as
the
start address,"
and position 1 means "use the contents of the
right half of .JBREN (124) as the reenter address."
Note that it is illegal to use an entry vector position other
or 1 for an execute-only process.

than

Generates an illegal instruction interrupt on error conditions below.
SFRKV ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX4 :

Process is running

FRKHX8 :

Illegal to manipulate an execute-only process

SFRVXl:

Invalid position in entry vector

3-391

0

I

TOPS-20 MONITOR CALLS
(SFTAD)

SFTAD

JSVS

534

Sets the dates and times associated with the specified file.
RESTRICTIONS:

some functions require WHEEL or
enabled

ACCEPTS IN ACl:

source designator

RETURNS

AC2:

address of argument block

AC3:

length of argument block

+1:

OPERA~DR

capability

always

The format of the argument block is as follows:
Word

Symbol

o

. RSWRT

Internal date and time file was last written.

1

. RSCRV

Internal date and time file was created .

2

.RSREF

Internal date and time file was last referenced.

3

. RSCRE

System date and time of last write by the monitor.
(The COpy and RENAME commands in the EXEC change
this word,
for
example.)
Requires
WHEEL
or
OPERATOR capability enabled.

4

. RSTDT

Tape-write date and time of archived
or migrated
files.
Requires WHEEL or OPERATVR capability
enabled.

5

.RSNET

On-line expiration date and time, which can be a
date and time (in internal format) or an interval
(in days).
Intervals are
limited
to half-word
values.
Dates,
times,
and
intervals can not
exceed system or directory maximums.

6

.RSFET

Offline expiration date and time, which can be a
date and time (in internal format) or an interval
(in days).
Intervals are
limited
to half-word
values.
Dates,
times,
and
intervals can not
exceed system or directory maximums.

I

Meaning

For words .RSWRT, .RSCRV, and
.RSREF,
the new values are checked
against
the current date and time.
Values greater than the current
date and time can be set only if the process has WHEEL or OPERATOR
capability enabled.
If the designator represents a device for which dates are meaningless
(dates
for
terminals, for example), or if any value given is -1, the
given value is ignored, and the current date,
if pertinent,
is not
changed.
If the argument block has more than four words, given values
for these words are checked to be in valid format and then ignored, if
valid.

TOPS-20 Version 5

3-392

April 1982

TOPS-20 MONITOR CALLS
(SFTAD)

The following table illustrates which monitor calls set the file dates
and times:
Word
. RSWRT
.RSCRV
.RSREF
.RSCRE
.RSTDT
.RSNET
.RSFET

GTJFN

OPENF
Read

CLOSF
write

OPENF
'Wr i te
Set

Set
Set
Set

Set

SFTAD

RNAMF

Set
Set
Set
Set*
Set*
Set
Set

FDB
FDB
Set
FDB
FDB
FDB
FDB

ARCF

Set*

I

LEGEND:
*
FDB

Requires WHEEL or OPERATOR capability enabled.
This word copied from source FDB to destination FDB.

The various SFTAD words map to words in the FDB block.
changes from .RS%%% to .FB%%%.)
The RFTAD monitor call can be used
associated with a specified file.

to

obtain

the

(The

dates

mnemonic
and

times

Generates an illegal instruction interrupt on error conditions below.
SFTAD ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DATE6:

System date and time not set

STADX2:

Invalid date or time

CFDBX2 :

Illegal to change specified bits

OPNX25:

Device is write locked

CAPXI:

WHEEL or OPERATOR capability required

TOPS-20 Version 5

3-393

April 1982

I

TOPS-20 MONITOR CALLS
(SFUST)

SFUST

JSYS

551

Sets the name of either the author of the file or the
wrote to the file.

user

RESTRICTIONS:

some functions require WHEEL or
enabled

ACCEPTS IN ACl:

function code in the left half, and JFN of
in the right half

AC2:
RETURNS

+1:

who

OPERATOR

last

capability
the

file

byte pointer to ASCIZ string containing the name
always, with an updated byte pointer in AC2

The defined functions are as follows:
Code

Symbol

o

.SFAUT

Set the name of the author of the file.

1

.SFLWR

Set the name of the user who last
file.

Meaning

The GFUST monitor call can be used to return the name of
author of the file or the user who last wrote the file.

wrute

the

either

the

The process must have WHEEL or OPERATOR capability enabled to set the
writer's name or to have write or owner access to the file to set the
author's name.
Generates an illegal instruction interrupt on error conditions below.
SFUST ERROR MNEMONICS:

I

SFUSXl:

Invalid function

SFUSX2 :

Insufficient system resources

SFUSX4:

File expunged

SFUSX5 :

Write or owner access required

SFUSX6:

No such user name

DESXl:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DESX8:

File is not on disk

DESXlO:

Structure is dismounted

CAPXl:

WHEEL or OPERATOR capability required

TOPS-20 Version 5

3-394

April 1982

TOPS-20 MONITOR CALLS
(SIBE)

SIBE

JSYS

102

Tests to see if the designated file input buffer is empty.
ACCEPTS IN ACl:

source designator

RETURNS

(one of the following is true:)

+1:

+2:

1.

The device is an active terminal and the input
buffer is not empty. AC2 contains a count of the
bytes remaining in the input buffer.

2.

The device is not a terminal, is open for
read,
and the input buffer is not empty.
AC2 contains
a count of the bytes remaining in the input
buffl~r .

(one of the following is true:)
terminal.

AC2

1.

The device is a non-active
contains the error code.

2.

The device is an active terminal and
buffer is empty. AC2 contains zero.

3.

The device is not a terminal and is not open
read.
AC2 contains zero.

4.

The device is not a terminal, is open for
read,
and the input buffer is empty.
AC2 contains
zero.,

the

input
for

The SOBE monitor call can be used to determine if the output buffer is
empty,
and the SOBF monitor call can be used to determine if the
output buffer is full.
SIBE ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5:

File is not open

DEVX2:

Device already assigned to another job

TTYXOl:

Line is not active

3-39 5
1

TOPS-20 MONITOR CALLS
(SIN)

SIN

JSYS

52

Reads a string from the specified source
into the caller's address
space.
The string can be a
specified number of bytes, or can be
terminated with a specific byte.
ACCEPTS IN ACl:

RETURNS

source designator

AC2:

byte pointer to string in the caller's address space

AC3:

count of number of bytes in string, or

AC4:

byte (right-justified) on which
(optional)

+1:

to

a

terminate

input

always, with updated byte pointers in AC2 and ACl, if
pertinent, and updated count in AC3, if pertinent

The contents of AC3 controls the number of bytes to read.

a

AC3=0

The string being read is terminated with a

byte.

AC3>0

A string of the specified number of bytes is to be read
or a string terminated with the byte given in AC4 is to
be read, whichever occurs first.

AC3<0

A string of minus the specified number of bytes
be read.

is

to

The contents of AC4 are ignored unless AC3 contains a positive number.
The input is terminated when the byte count becomes 0,
the specified
terminating byte
is reached,
the end of the file is reached, or an
error occurs during
the transfer.
The program can process an
end-of-file condition if an ERJMP or ERCAL is the next instruction
following the SIN call.
After execution of the call,
the file's
pointer
is updated
for
subsequent
I/O to the file.
AC2 is updated to point to the last byte
read or, if AC3 contained 0, the last nonzero byte read.
The count in
AC3
is updated
toward
zero by subtracting the number of bytes read
from the number of bytes requested to be
read.
If the
input was
terminated by an end-of-file interrupt, ACI through AC3 are updated
(where pertinent) to reflect the number of bytes tran~;ferred before
the end of the file was reached.
When the SIN call is used to read data from a magnetic tape, the size
of the
records
to
read
is specified with either
the SET TAPE
RECORD-LENGTH command or the .MOSRS function of the MTOPR call.
The
default
record size is 1000(octal) words.
The record size must be at
least as large as the largest record being read from the tape.
The SIN call reads across record boundaries on the tape until it reads
the number of bytes specified in ACJ.
The call gives the data to the
program with no indication of tape marks.
Thus, if the record is 1000
bytes and
a
SIN call is given requesting 2000 bytes, it returns two
full records to the program.

3-396

TOPS-20 MONITOR CALLS
(SIN)
When reading in reverse, both the number of bytes requested in AC3 and
the
record
size should equal
the size of the record on the tape.
(Refer to Section 2.4.7.1 for more
information about magnetic
tape
I/O.)
This call can cause several
software
terminations on certain file conditions.
OPENF call description.)

interrupts
or
process
(Refer to bit OF%HER of the

Generates an illegal instruction interrupt on error conditions below.
SIN ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5:

File is not open

IOXl:

File is not open for reading

IOX4:

End of file reached

IOX5:

Device or data error

IOX7:

Insufficient system resources

IOX8:

Monitor internal error

3-397

(Job Storage Block full)

TOPS-20 MONITOR CALLS
(SINR)

SINR

JSYS

531

Reads a record from the specified device into the caller's address
space.
The maximum size of the record to read is specified with
either the SET TAPE RECORD-LENGTH command or the .MOSRS function of
the MTOPR call. The default record size is lOOO(octal) bytes.
ACCEPTS IN ACl:

RETURNS

source designator

AC2:

byte pointer to string in the caller's address space

AC3:

count of number of bytes in string, or

AC4:

byte (right-justified) on which
(optional)

+1:

to

a

terminate

input

always, with updated byte pointers in AC2 and ACl, if
pertinent, and updated count in AC3, if pertinent

The contents of AC3 and AC4 are interpreted in the same manner as they
are in the SIN monitor call.
Each SINR call returns one record to the caller. Thus, the caller can
read variable-length records by indicating in AC3 the number of bytes
to read. Upon execution of the call, AC3 is updated to reflect the
number of bytes read (i.e., the number of bytes in the record).
The number of bytes read depends on the number of bytes requested and
the record size.
When using SINR, the program must set the record
size to a value greater than or equal to the actual size of the
largest record being read from the tape, or an error (IOX5) will be
returned.
If the SINR call requests the same number of bytes as the
record size,
the requested number is given to the caller. When the
record size equals the size of the actual record, all bytes in the
record are read, and AC3 contains 0 on return. When the record size
is larger than the actual record, all bytes of the record are read,
but AC3 contains the difference of the number requested and the number
read.
If the SINR call requests fewer bytes than in the actual
record,
the requested number is given to the caller, the remaining
bytes are discarded, and an error (IOXIO) is returned.
In all cases,
the next request for
input begins reading at the first byte of the
next record on the tape because a SINR call never reads across record
boundaries.
When reading in reverse, the number of bytes requested
(i.e., the
count in AC3) should be at least as large as the size of the record on
the tape.
If the requested number is smaller, the remaining bytes in
the record are discarded from the beginning of the record.
The action taken on a SINR call differs from the action taken on a SIN
call.
The SIN call reads across record boundaries to read all the
bytes in a file.
The SINR call does not read across record boundaries
and will discard some bytes in the file if the requested number is
smaller than the actual record.
Can cause several software interrupts
or process terminations on certain file conditions.
(Refer to bit
OF%HER of the OPENF call description.)
Generates an illegal instruction interrupt on error conditions below.

3-398

TOPS-20 MONITOR CALLS
(S IN:R)
SINR ERROR MNEMONICS:
DESXI:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5:

File is not open

IOXI:

File is not open for reading

IOX4:

End of file reached

IOX5:

Device or data error

IOX7:

Insufficient system resources

IOX8:

Monitor internal error

IOXIO:

Record is longer than user requested

3-399

(Job Storage Block full)

TOPS-20 MONITOR CALLS
(SIR)

SIR

I

JSYS

125

Sets the addresses of the channel and priority level
tables for
the
specified process.
(Refer to Section 2.6.3.) The process must run in
one section of memory.
The tables must also be in that section.
To
set the table addresses for a process that runs in multiple sections,
use the XSIR% monitor call.
(See also the XRIR% monitor call.)
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

process handle
address of the priority level table in the left half,
and address of the channel table in the right half
always.
The addresses
Proce£s Storage Block.

in

AC2

are

stored

If the contents of the tables are changed after execution of
call, the new contents will be used on the next interrupt.

I

The RIR monitor call can be used to obtain the table addresses
process that runs in a single section.

in

the

the

SIR

for

a

Generates an illegal instruction interrupt on error conditions below.
SIR ERROR MNEMONICS:
SIRXl:

Table address is not greater than 20

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

TOPS-20 Version 5

3-400

April 1982

TOPS-20 MONITOR CALLS
(SIRCM)

SIRCM

JSYS

142

Sets the mask for
reserved software interrupt channels for the
specified inferior process. Conditions occurring on software channels
that have the corresponding mask bit set do not generate an interrupt
to the inferior process. Instead, the conditions cause the process to
terminate or freeze.
ACCEPTS IN ACl:

RETURNS

inferior process handle

AC2:

channel mask with bits set for reserved channels

AC3:

deferred terminal interrupt word

+1:

always

The RIRCM monitor call can be used to obtain the mask for reserved
software interrupt channels.
Although a process can read its own
channel mask, it cannot set its own; the SIRCM call can be given only
for inferior processes. This call provides a facility for a superior
process to monitor an inferior one (e.g., illegal instructions, memory
traps).
However, if the inferior process contains an ERJMP or ERCAL
symbol after instructions that generate an interrupt on failure,
the
ERJMP or ERCAL will prevent the generation of the interrupt. Thus,
the superior will not be able to monitor the inferior with the SIRCM
call.
Generates an illegal instruction interrupt on error conditions below.
SIRCM ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

3-401

TOPS-20 MONITOR CALLS
(SIZEF)

SIZEF

JSYS

36

Returns the length of an existing file.
ACCEPTS IN ACl:

JFN

RETURNS

+1:

failure, error code in ACI

+2:

success, byte count that
referenced
the
last byte
written
into the
file
in AC2, and number of pages
(512 words) in file in AC3.
The byte count returned
dep~nds
on the byte size recorded in the FDB and not
on the byte size specified in the OPENF call.

For a file with holes, the byte count in
file's actual size.

AC2

does

The GTFDB monitor call can be used to obtain the byte
the file was written.

not

reflect

size

in

SIZEF ERROR MNEMONICS:
DESX1:

Invalid source/destination designator

DESX2 :

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

3-402

the
which

TOPS-20 MONITOR CALLS
(SJPRI)

SJPRI

JSYS

245

Sets the scheduler priority control word.
This word controls the
priority of a job and the permissible range of queues that the job may
run in.
The priority word is set for the
top process and
for
all
existing
inferior processes.
Also, the priority word is passed down
to any forks that are created subsequent to the SJPRI call.
RESTRICTIONS:

This JSYS is reserved for
DEC.
OPERATOR capability enabled.

ACCEPTS IN ACl:

job number

AC2:
RETURNS

+1:

Requires

WHEEL

or

priority word
always

The priority word has the following format:

17 18

0

24

29 30

I

35

================================:============================

HIGH
LOW
PERC
! !
============================================================
Where:
PERC

is the percentage of CPU resources to be guaranteed for
job.
This value may be in the range 0<= n <=99.

the

B18

is the flag (JP%SYS) that designates the
job as a
system
job.
System jobs get a higher priority than all user jobs,
and the scheduler gives them all
the
time they need
for
execution.

LOW

is the lowest priority queue the job may run in.
This queue
is always specified as the desired queue + 1.
For example,
queue 2 is specified as 3.

HIGH

is the highest priority queue the job may run in

A priority word containing
zero
in the left half means no CPU
percentage is being requested.
A priority word containing zero in the
right half means no queue assignments are being requested.
Because this call assigns priority to a job, it is
indeterminate how
processes within a
job that compete for the job's run time will be
scheduled.
Use of this call for
a
job containing more than one
process implies that the processes must cooperate.
Note that the high queue is high in priority but
low in numerical
value while
the
low queue is low in priority but high in numerical
value.
Generates an illegal instruction interrupt on error conditions below.
SJPRI ERROR

MNEMO~ICS:

WHELXl:

WHEEL or OPERATOR capability required

SJPRXl:

Job is not logged in

TOPS-20 Version 5

3-403

April 1982

I

TOPS-20 MONITOR CALLS
(SKED% )

JSVS

577

Reads or modifies the monitor's scheduler data base.
RESTRICTIONS:

Some functions require WHEEL or
enabled

ACCEPTS IN ACl:

function code

AC2:
RETURNS

+1:

OPERATOR

capability

address of argument block
always

The available functions are:
Code

Symbol

1

.SKRBC

Function
Read bias control
knob setting.
Return a value
indicating
the setting of the bias control knob.
This setting determines whether the scheduler favors
compute-bound jobs or interactive jobs.
Argument block:

2

.SKSBC

Word

Symbol

Contents

0

.SACNT

Count of words in argument block
(Including this word)

1

.SAKNB

Bias control knob

~)etting

Set bias control setting
to the specified value.
The setting of this value controls the bias between
interactive and compute-bound jobs.
The lower
the
setting, the more interactive jobs are favored.
The
higher the setting, the more compute-bound jobs are
favored.
Currently,
the value may be an integer n
such that 1<= n <=20.
Requires WHEEL or OPERATOR
capabilities enabled.
Argument block:

3

.SKRCS

Word

Symbol

Contents

o

.SACNT

Count of words in argument block
(Including this word)

1

.SAKNB

Bias control knob setting

Read class
values:

parameters.

Returns

the

following

1.

Class of the job

2.

Share of the processor allocated for this class.
The
share is returned as a floating-point value
n, such that 0<= n <=1.

3.

Amount of processor actually used by the class.
The amount used is returned as a floating-point
value n, such that 0<= n <=1.

3-404

TOPS-20 MONITOR CALLS
(SKED%)
Code

Symbol

3

. SKRCS (Cont.)

Function

4.

1 minute load average.
The load average = (J/P)
where J
is the number of CPU-runnable jobs in
the class for the
time period and
P is the
fraction of CPU allocated to the class.
Thus 3
jobs running in a 50% class would produce a load
average of 6.

5.

5 minute load average

6.

15 minute load average

Argument block:

4

. SKSCS

Word

Symbol

Contents

0

.SACNT

Count of words in argument block
(Including this word)

1

.SACLS

Class

2

.SASHR

Share

3

.SAUSE

Use

4

.SAlML

1 minute load average

5

.SA5ML

5 minute load average

6

.SA15L

15 minute load average

Set class parameters (as described above) .
WHEEL or OPERATOR capability.

Requires

Argument block:

5

.SKICS

Word

Symbol

Contents

0

.SACNT

Count of words in argument block
(Incl ud ing this word)

1

.SACLS

Class

2

.SASHR

Share

Start or stop the class scheduler.
If the class
scheduler
is being
started,
this function also
specifies
the
mode
in
which
class-to-user
assignments are made and whether windfall is to be
allocated to the active classes or withheld from the
active
classes.
Requires
WHEEL
or OPERATOR
capability.

3-405

TOPS-20 MONITOR CALLS
(SKED%)
Code

Symbol

5

.SKICS

Function
(Cont.)
Word

Symbol

Contents

o

.SACNT

Count of words in argument block
(Incl ud ing this word)

1

.SACTL

Control flags
The flags are as follows:

6

.SKSCJ

Bit

Symbol

Meaning

BO

SK%ACT

Class by
accounts

Bl

SK%WDF

Withhold
windfall

B2

SK%STP

Class
::::chedule r off

Set the class of a job.
This function takes a pair
of
numbers,
the
job to set and the desired class.
If setting
the class of the calli~g
job,
this
function is not privileged.
If setting the class of
another
job,
it
requires
WHEEL
or
OPERATOR
capabilities enabled.
In either case, the job must
be allowed to reside in
the
selected class.
The
calling job may be designated by -1.
Argument block:

I
7

.SKRJP

Word

Symbol

Contents

o

.SACNT

Count of words in argument block
(Including this word)

1

.SAJOB

Job number

2

.SAJCL

Class of job

3

.SAWA

Windfall allocation

Read class parameters for a job
Returns the following values:
1.

Job's share of the processor.
This value
is
returned
as a floating-point value n, such that

0<=
2.

n

<=1.

Job's use of
the processor.
This value
is
returned as a floating-point value n, such that

0<=

n

<=1.

3-406

TOPS-20 MONITOR CALLS
(SKED~~ )
Code
7

10

Symbol
.SKRJP
(Cant.)

.SKBCR

Function
Argument block:
Word

Symbol

Contents

0

.SACNT

Count of words in argument block
(incl ud ing this word)

1

.SAJSH

Job's share allotment

2

.SAJUS

Job's current use

Read
the
indicates
jobs.

class setting
for
A -1
batch
jobs.
that
there is no special class for batch

Argument block:
Word

11

.SKBCS

Symbol

Contents

0

.SACNT

Count of words in argument block
(Incl ud ing this word)

1

.SABCL

Batch class

Set batch class.
Specifies the class in which all
batch
jobs will
run.
A -1 indicates no special
class for batch jobs.
If this value
is specified,
it overrides the valid classes for any user running
a batch job.
Requires WHEEL or OPERATOR capability.
Argument block:
Word

12

.SKBBG

Symbol

Contents

0

.SACNT

Count of words in argument block
(Including this word)

1

.SABCL

Batch class

Run all batch jobs in the "dregs" queue.
The dregs
queue
is a
special queue whose processes are only
allowed to run when no normally scheduled processes
are available to
run.
Requires WHEEL or OPERATOR
capability.
This function applies only if the class scheduler is
not being used.
The argument is either 0 (clear) or
non-zero (set).
A non-zero
indicates that batch
jobs should be run in the "dregs" queue.
Argument block:
Word

Symbol

Contents

o

.SACNT

Count of words in argument block
(Including this word)

1

.SADRG

Flag word

o = don't run in dregs queue
non-zero = run in dregs queue
3-407

TOPS-20 MONITOR CALLS
(SKED%)
Code

Symbol

13

.SKDDC

Reserved

14

.SKRCV

Read status.

Function

Argument block:
Word

Symbol

Contents

o

.SACNT

Count of words in argument block
(Including this word)

1

.SACTL

Flags
The flags are as follows:
Bit

Symbol

~1eaning

BO

SK%ACT

Class by
accounts

Bl

SK%WDF

Withhold
vlindfall

B2

SK%STP

Class
scheduler off

B3

SK%DRG

Batch jobs are
":::>eing run in
dregs queue

SKED% ERROR MNEMONICS:

I

ARGX02:

Invalid function

ARGX04:

Argument block too small

ARGX08:

No such job

ARGX15:

Job is not logged in

ARGX25 :

Invalid class

ARGX29:

Invalid class share

ARGX30:

Invalid KNOB value

ARGX3l:

Class scheduler already enabled

CAPX1:

WHEEL or OPERATOR capability required

SKDX1:

Cannot change class

3-408

TOPS-20 MONITOR CALLS
(SKPIR)

SKPIR
Tests to see if the software
specified process.

JSYS

interrupt

127
system

is

enabled

ACCEPTS IN ACl:

process handle

RETURNS

+1:

failure,

+2:

success, software interrupt system is on

for

the

software interrupt system is off

The EIR monitor call is used to enable the software interrupt
and the DIR monitor call is used to disable the system.

system,

Generates an illegal instruction interrupt on error conditions below.
SKPIR ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

3-409

TOPS-20 MONITOR CALLS
(SMAP%)

SMAP%

JSYS

767

Maps one or more contiguous sections of memory.
This call removes any
existing
mapping
from
the section or
sections named
as
the
destination.
To learn the contents of a section map, Us(~
the RSMAP%
monitor call.
The four SMAP% functions are discussed below.
Case I:

Mapping File Sections to a Process

This function maps one or more sections of a file to a
process.
All
pages that exist in the source sections are mapped to the destination
sections.
To map a process section to a file, use the PMAP monitor call.
ACCEPTS IN ACl:

source identifier:

AC2:
AC3:

JFN, ,file section number

destination identifier:
number

fork handle"process section

flags, ,count
The
flags determine
access
to
the
destination section, and the count is the
number of contiguous sections
to
be
mapped.
The count must be between 1 and
37.
The flags are as follows.

TOPS-20 Version 5

3-410

April 1982

TOPS-20 MONITOR CALLS
(SMAP%)

RETURNS
Case II:

B2(SM%RD)

Allow read access

B3(SM%WR)

Allow write access

B4(SM%EX)

Allow execute access

B18-35

The number of sections to map.
number must be between 1 and 37.

This

+1: always
Mapping Process Sections to a Process

This function maps one or more sections of memory from one process to
another.
All pages that exist in the source sections are mapped to
the destination sections.
ACCEPTS IN ACl:

source identifier:

AC2:

fork handle"section number

destination identifier:

fork handle"section number

AC3: flags, ,count
The flags determine
access
to
destination section, and the count is
number of contiguous sections to
mapped.
This count must be between 1
37.
All source sections that exist
mapped
to destination sections.
flags are as follows.

RETURNS

the
the
be
and
are
The

B2(SM%RD)

Allow read access

B3(SM%WR)

Allow write access

B4(SM%EX)

Allow execute access

B6(SM%IND)

Map the destination section using an
indirect
section
pointer.
Once the
destination section map is created,
the
indirect
section
pointer causes the
destination section map to change
in
exactly the same way that the source
section map changes.

B18-35

Count of the
number
sections to be mapped.

of

contiguous

+1: always

If you map a source section into a destination section with SM%IND
set,
SMAP% creates the destination section using an indirect pointer.
This means that the destination section will contain all pages that
exist in the source section, and the contents of the destination pages
will be identical to the contents of the source pages.
In addition, changes that occur in the source section map after SMAP%
creates the destination section cause the same changes to be made in
the destination section map.
This ensures that both the source
section and the destination section contain the same data.
If SM%IND is not set, SMAP% creates the new section using a
shared
pointer.
After SMAP% maps the destination section, changes that occur
TOPS-20 Version 5

3-411

April 1982

TOPS-20 MONITOR CALLS
(SMAP%)
in the source section's map do not cause any change in the destination
section's map.
Thus after
a short time the source and destination
sections might contain different data.
If you request a shared pointer (SM%IND not set)
to the destination
section,
what happens depends on the contents of the source section
when the SMAP% call executes.
The outcome is one of the following.
1.

If the source section does not exist, the SMAP% call fails.

2.

If the source is a private section, a mapping to the private
section is established,
and
the destination process
is
co-owner of the private section.

3.

If the source section contains a
file
section,
the
source
section is mapped to the destination section.
Although files
do not actually have section boundaries,
this monitor
call
views them as having sections that consist of 512 contiguous
pages.
Each file section starts with a page number
that
is
an integer multiple of 512.

4.

If the source section map is made by means of an indirect
section pointer, SMAP% follows that pointer until the source
section is found to be nonexistent, a private section,
or a
section of a file.

TOPS-20 Version 5

3-412

April 1982

TOPS-20 MONITOR CALLS
(SMAP%)
Case III:

Creating a Section

This function creates a new, private section.
pages into the new section.

It

does

not

map

any

A process must use SMAP% to create a non-zero section before
referencing such a section.
A reference to a nonexistent section
fails with an illegal memory reference error.
Note, however, that if
a process uses PMAP to map a page to a nonexistant section, the
monitor creates a private section and the PMAP succeeds.

a

ACCEPTS IN AC1:
AC2:

destination identifier:

AC3:

flags"count

fork handle"section number

The flags determine access to the destination section, and
the count
is the number
of contiguous private sections to be created.
This
count must be between 1 and 37.
The flags are as follows.

RETURNS

B2(SM%RD)

Allow read access

B3(SM%WR)

Allow write access
to
the
created
section.
This function sets this bit by
default to avoid the creation of
a
read-only
or
execute-only
private
section.

B4(SM%EX)

Allow execute
section.

B6(SM%IND)

Create the
pointer.

B18-35

Count of the
number
sections to be created.
be between 1 and 37.

access

section

to

the

created

an

indirect

using

of
contiguous
This number must

+1: always

Case IV: Deleting Process Sections
This function
removes
sections of a process.
ACCEPTS IN AC1:

RETURNS

(unmaps)

a

section

or

several

contiguous

-1

AC2:

destination identifier:

AC3:

O"count
The count is the number of contiguous sections to
unmapped.
This number must be between 1 and 37.

+1:

fork handle"section number
be

always

If the section being removed (unmapped)
was created with a
shared
pointer,
and
if
the
removing fork is not the owner of the section,
then SMAP% decrements the share count for the section and deletes the
shared pointer.
This
is always true when the memory sections being
deleted contain file sections.

TOPS-20 Version 5

3-413

April 1982

TOPS-20 MONITOR CALLS
(SMAP%)

If the pointer being deleted is the last pointer to a private section,
then SMAP% clears the page table for that section.
But if the owning
fork attempts to unmap a private section to which other
forks have
shared or indirect pointers, the SMAP% call fails.
Generates an illegal instruction interrupt on error conditions below.

ARGX23:

Invalid section number

ARGX24:

Invalid count

SMAPXl:

Attempt to delete a section still shared

SMAPX2:

Indirect section map loop detected

TOPS-20 Version 5

3-414

April 1982

TOPS-20 MONITOR CALLS
(SMON)

..

SMON

,JSYS 6

Sets various flags and parameters in the monitor's data base.
Most
flag-oriented
items are set by specifying 1 in AC2 and cleared by
specifying 0 in AC2.
In a few cases
(noted
in
the
text) ,
flag-oriented
items are set by setting and clearing the appropriate
bit(s) in AC2.
Value-oriented items are set to the value in AC2.
RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled.
functions are for ARPANET systems only.

ACCEPTS IN ACl:

function code

AC2:
RETURNS

+1:

Some

new value for the indicated function
always

The codes for the functions are as follows:
Code

Symbol

o

. SFFAC
. SFCDE
.SFCDR
.SFMST
. SFRMT
. SFPTY
. SFCTY
.SFOPR
. SFLCL
.SFBTE
.SFCRD

1
2

3

4
5
6
7

10
11

12

22

. SFNVT
.SFUSG
.SFFLO

23

.SFMTA

24

.SFMSO

13
21

Meaning
FACT file entries are allowed .
CHECKD found errors .
CHECKD is running.
Manual start is in progress.
Remote LOGINs (dataset lines) are allowed .
PTY LOGINs are allowed .
CTY LOGINs are allowed .
Operator is in attendance.
Local LOGINs (hardwired lines) are allowed .
Bit table errors found on startup.
directory
Users
can
change
nonprivileged
parameters with the CRDIR monitor call.
ARPANET terminal LOGINs are allowed .
USAGE file entries are allowed.
Disk latency optimization using
the RH20 backup
register
is enabled.
This feature is not to be
enabled unless the M8555 board of the RH20 is at
Revision
Level
D AND either of the KLIO-C
processor
is at Revision Level 10 or KLIO-E
processor is at Revision Level 2.
If set, indicates that MOUNTR magtape allocation
is enabled.
Set system message level 0
AC2:

25

.SFMSI

47
50

. SFNTN
.SFNDU
.SFNHI
.SFTMZ
.SFLHN

51
52
53

.SFAVR
.SFSTS
.SFSOK

45

46

to set;

0 to clear

1

(SF%MSI)

to set;

0 to clear

Turn ARPANET on .
Reinitialize ARPANET if it is down.
Initialize ARPANET host table.
Set the local time zone to the value given in AC2.
Set the local ARPANET host number
to the value
given in AC2.
Account validation will be running on this system.
Enable/disable status reporting.
Set GETOK% defaults
AC2:

TOPS-20 Version 5.1

(SF%MSO)

Set system message level 1
AC2:

44

I

Flags"GETOK% function code
December 1982

I

TOPS-20 MONITOR CALLS
(SMON)
Code
53

Symbol

Meaning

.SFSOK
(Cont. )

Flags:
Bit Symbol

Meaning

o

BO SF%EOK

1

o

81 SF%DOK

1

Disable access checking
Enable access checking
Deny access if checking disabled
Allow access if checking disabled

This
function
should
be
givon
by
the
access-control
program
(supplied
by
the
installation) to turn on access checking for
each of
the desired functions.
It is also used to set
the default action for each function that
is
not
being
checked
by
the access-control program.
Installation-defined function codes (400000+n) can
be enabled/disabled by using function code 400000.
If there is no access-control program, the default
action of
the GETOK% JSYS will be to deny access
for any installation-defined function code.
See the description of the GETOK% JSYS for
function codes.
54

.SFMCY

55
56

.SFRDU
.SFACY

57

.SFRTW

60

.SFTDF

GETOK%

Specifies the maximum offline
expiration period
(tape recycle period) in days, for ordinary files.
Read date update function
Specifies the maximum offline expiration period
(tape recycle period) in days, for archive files.
Sets/clears the
no-retrieval-waits
flag
in
the
monitor.
When set, this specifies that those file
retrievals
requests
that are waiting
for
the
retrieval should fail rather than wait.
Set tape mount controls
Flags:

I
61

.SFWSP

Bit

Symbol

Meaning

BO

MT%UUT

1

o

unload unrecognizable tapes
treat unrecognizable tapes
as unlabeled

Enable working set preloading

The TMON monitor call can be
various monitor flags.

used

to

obtain

the

settings

of

the

Generates an illegal instruction interrupt on error conditions below.
SMON ERROR MNEMONICS:
SMONXl:

WHEEL or OPERATOR capability required

SMONX2 :

Invalid SMON function

-

..

TOPS-20 version 5.1

3-416

December 1982

TOPS-20 MONITOR CALLS
(SNDIM)

SNDIM
Places a message in a
queue.

JSYS

previously

750

assigned

RESTRICTIONS:

for ARPANET systems only.

ACCEPTS IN ACl:

BitO:
Bitl:

Bits 18-35:
AC2:
RETURNS

ARPANET

special

message

If set, the message contains a
96-bit
leader.
If reset, the message contains
a 32-bit leader.
If set,
the data
resides
in
the
high-order 32 bits of each word of the
message.
If reset, the data resides in
all 36 bits of each word of the message.
Special Queue Header

address of an extended message

+1:

failure, error code in ACI

+2:

success, message queued

See the ARPANET manual for the format of the message.
The RCVIM JSYS can be used to retrieve
message queue.

a

message

from

the

SNDIM ERROR MNEMONICS:
SNDIXl:

Invalid message size

SNDIX2:

Insufficient system resources

SNDIX3:

Illegal to specify NCP links 0-72

SNDIX4:

Invalid header value for this queue

SNDIX5:

IMP

SQXl:

Special network queue handle out of range

SQX2:

Special network queue not assigned

(no buffers available)

do~m

3-417

special

TOPS-20 MONITOR CALLS
(SNOOP)

SNOOP

JSYS

516

Performs system performance analysis.
The process can patch any
instruction in the monitor with this call.
For example, the user
program can build a PC histogram by patching an instruction in the
code for the 1.O-millisecond clock.
The general procedure for using the SNOOP call is as follows:
1.

The user program supplies a set of breakpoint routines that
are called by the monitor when control reaches one of the
patched instructions. These routines are mapped
into the
monitor's address space into an area selected by the monitor.
Thus, the routines must have self-relocating code or must be
relocated by the user program to where they will be run,
based on the monitor address supplied by the monitor.

2.

The user program defines a number of
to DDT breakpoints.

3.

The
user
program
simultaneously.

4.

The user program goes to "sleep" or waits for terminal
while its breakpoint routines obtain control.

5.

When the user program determines that
completed, it removes the breakpoints.

inserts

all

breakpoints,
of

the

the

analogous
breakpoints

routines

input
have

The user program breakpoint routines run in the monitor address space,
which means that the addresses of the code and the data are monitor
addresses. The user program must modify these addresses, based on the
values returned by the monitor, after the initialization but before
the "snooping."
The
breakpoint
routines
must
preserve
any
accumulators they use.
Also, they must not cause a page fault if at
interrupt level or if a patch has been made in the page fault handler
or in the scheduler. Thus, the breakpoint routines should test for
swappable code being in memory before referencing it.
If swappable
code needs to be referenced, the swappable monitor can be locked in
memory, if desired. When a patch is made to a routine called at many
interrupt levels, the program must specify a reentrant instruction to
be used for patching.
RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

function code

RETURNS

AC2:

function-specific argument

AC3:

function-specific argument

AC4:

function-specific argument

+1:

failure, error code in ACI

+2:

success

3-418

TOPS-20 MONITOR CALLS
(SNOOP)
The following functions are available:
Function
Code

Symbol

o

.SNPLC

Meaning
Declare and lock
address space.

code

into

the

monitor's

AC2:

number of pages desired

AC3:

page number in user space of start of
breakpoint routines to be locked

On return, the pages are locked contiguously
in the monitor's address space, and AC2
contains
the
monitor
page
numbers
corresponding to the given user page number.
1

.SNPLS

Lock the swappable monitor. This function is
useful
for
analyzing swappable data at
interrupt level.
On return,
the
entire
swappable monitor is locked.

2

.SNPDB

Define a breakpoint
AC2:

number of breakpoint

AC3:

address in monitor space to be patched.
The patched instruction can be a skip
type
instruction
or
a
PUSHJ
instruction,
and
the
patching is
similar to that in DDT.
The routines
will receive control before the patched
instruction is executed.

AC4:

instuction to be executed before
patched instruction is executed.
instruction can be:

the
The

JSR LOC where LOC is an address in
monitor space of the user's routine.
PUSHJ P,LOC when reentrant or recursive
code is patched.
AOS LOC to count frequency
execution points.

of

monitor

The
error
return
is
given
if
breakpoints have already been inserted.
NOTE
Putting a SNOOP breakpoint on a PUSHJ
or other subroutine call instruction
(including JSYS, MDISMS, etc)
can
cause problems.
If the process is
not in a NOSKED state already, it can
be rescheduled during the breakpoint,
in which case the breakpoint
is
removed, and the subsequent return is
made to non-existent code.
3-419

TOPS-20 MONITOR CALLS
(SNOOP)

Function
Code

Meaning

Symbol

3

.SNPIB

Insert all breakpoints and start analyzing.

4

.SNPRB

Remove all breakpoints and stop analyzing.

5

.SNPUL

Unlock and release all storage, and
and remove all breakpoints.

6

.SNPSY

Obtain the address of a monitor symbol.
AC2:

radix-50 symbol

AC3:

radix-50 program name if
a
local
address is desired.
If AC3 is 0, the
entire symbol table is searched.

On return, AC2 contains the
or value of the symbol.
7

. SNPAD

undefine

monitor

address

Obtain a monitor symbol.
AC2:

36-bit value of symbol that is
looked
up in the monitor's
table.

to be
symbol

AC3:

radix-50 program name if a local value
is desired.
If AC3 is 0, the entire
symbol table is searched.

On return, AC2 contains the first radix-50
monitor symbol that is closest to and has a
value less than the specified value, and AC3
contains the difference between the value of
the symbol returned and the specified value.
SNOOP ERROR MNEMONICS:
SNOPXl:

WHEEL or OPERATOR capability required

SNOPX2:

Invalid function

SNOPX3:

.SNPLC function must be first

SNOPX4:

Only one .SNPLC function allowed

SNOPX5:

Invalid page number

SNOPX6:

Invalid number of pages to lock

SNOPX7:

Illegal to define breakpoints after inserting them

SNOPX8:

Breakpoint is not set on instruction

SNOPX9:

No more breakpoints allowed

SNOPlO:

Breakpoints already inserted

SNOPIl:

Breakpoints not inserted

3-420

TOPS-20 MONITOR CALLS
(SNOOP)
SNOP12:

Invalid format for program name symbol

SNOP13:

No such program name symbol

SNOP14:

No such symbol

SNOP15:

Not enough free pages for snooping

SNOP16:

Multiply-defined symbol

SNOP17:

Breakpoint already defined

SNOP18:

Data page is not private or copy-or-write

3-421

TOPS-20 MONITOR CALLS
(SOBE)

saSE

JSYS

103

Tests to see if the designated file output buffer is empty.
ACCEPTS IN ACl:

destination designator

RETURNS

+1:

output buffer is not empty.
Number
of
remaining in output buffer is returned in AC2.

+2:

output buffer is empty; AC2 contains o. This return
is given if an error occurs on the call; AC2
contains the appropriate error code.

bytes

If the designator is not associated with a terminal, the +2 return
given.
The SIBE call can be used to determine if the input buffer is empty.
SOBE ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5:

File is not open

DEVX2:

Device already assigned to another job

TTYXOl:

Line is not activ0

3-422

is

TOPS-20 MONITOR CALLS
(SOBP)

SOBF

JSVS 175

Tests to see if the designated file output buffer is full.
ACCEPTS IN ACI:
RETURNS

file designator

+1:

output buffer is not full.
This return is given
an error occurs on the call;
AC2 will contain o.

+2:

output buffer is full

On either return, the number of bytes remaining in the
is returned in AC2 (if no error occurred on the call).

3-423

output

if

buffer

TOPS-20 MONITOR CALLS
(SOUT)

sour

JSVS

53

Writes a string from the caller's address space to the specified
destination.
The string can be a specified number of bytes or
terminated with a specified byte.
ACCEPTS IN ACl:

RETURNS

destination designator

AC2:

byte pointer to string to be written

AC3:

count of the number of bytes in string, or 0

AC4:

byte (right-justified) on which to terminate output

+1:

always, with updated string pointers in AC2 and ACl,
if pertinent, and updated count in AC3, if pertinent

The contents of AC3 controls the number of bytes to write.
AC3=0

The string being written is terminated with a 0 byte.

AC3>0

A string of the specified number of bytes
is to be
written or
a string terminated with the byte given in
AC4 is to be written, whichever occurs first.

AC3<0

A string of minus the specified number of bytes
be written.

The contents of AC4 is
positive number.

ignored

unless

the

contents

of

AC3

is
is

to
a

The output is terminated when the byte count becomes 0, the specified
terminating byte
is reached, or an error occurs durin9 the transfer.
The specified terminating byte is copied to the destination.
After execution of
the call,
the file's pointer
is updated
for
subsequent
I/O to the file.
AC2 is updated to point to the last byte
written or, if AC3 contained 0, the last nonzero byte written.
The
count in AC3 is updated toward zero by subtracting the number of bytes
written from the number of bytes requested to be written.
When the SOUT call is used to write data to a magnetic tape, it sends
a
series of bytes packed into records of the specified record size.
The size of the records to write is specified with either the SET TAPE
RECORD-LENGTH command or the .MOSRS function of the MTOPR call.
The
default record size is 1000(octal) words.
Thus, if the record size is
1000 bytes,
two SOUT calls, each writing 500 bytes, would write one
record.
If during the writing, the end of tape mark was passed,
an
error
(IOX5)
is given.
However,
the data has been successfully
written and the device status word has the MT%EOT bit set to
indicate
this condition.
Refer to Section 2.4.7.1 for more information about
magnetic tape I/O.
Can cause several
software
certain file
conditions.
description. )

interrupts
(Refer
to

3-424

or process terminations on
bit OF%HER of the OPENF call

TOPS-20 MONITOR CALLS
(SOUT)
Generates an illegal instruction interrupt on error conditions below.
SOUT ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX5 :

File is not open

IOX2:

File is not opened for writing

IOX5 :

Device or data error

IOX6:

Illegal to write beyond absolute end of file

lOX?:

Insufficient system resources

IOX8:

Monitor internal error

IOXll:

Quota exceeded

IOX33:

TTY input buffer full

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

(Job Storage Block full)

I

3-425

April 1982

TOPS-20 MONITOR CALLS
(SOUTR)

SOUTR

JSYS

532

Writes a variable-length record from the caller's address space to the
specified device.

I

If the record is to be written to magnetic tape, the maximum size of
the
record
to
write
is specified with either
the
SET TAPE
The
RECORD-LENGTH command or the .MOSRS function of the MTOPR call.
default record size is lOOO(octal) bytes.
ACCEPTS IN ACl:

RETURNS

destination designator

AC2:

byte pointer to string to be written

AC3:

count of number of bytes in string, or 0

AC4:

byte (right-justified)
(optional)

+1:

on which to

terminate

output

always, with updated byte pointers in AC2 and ACl, if
pertinent, and updated count in AC3, if pertinent

The contents of AC3 and AC4 are interpreted in the same manner as they
are in the SOUT monitor call.
Each SOUTR call writes at least one
record.
Thus,
the caller can
write variable-length records by indicating in AC3 the number of bytes
to write in the record.
If the SOUTR call requests more bytes
to be
written than the maximum record size, then records of the maximum size
are written, plus another record containing the remaining
bytes.
If
the SOUTR call
requests
fewer
bytes than the maximum, or a number
equal to the maximum, to be written, then records of the
requested
size are written.
The SOUTR call differs from the SOUT call
in that
the SOUTR call
writes
records on the tape upon execution of the call.
The SOUT call
does not write a record on the tape until the number of bytes equal to
the
record
size have been written.
Thus, if a record is being made
from several strings in the caller's address space, the SOUT call can
be used for the first strings and the SOUTR call for the last string.
Can cause several
software
certain file
conditions.
description. )

interrupts
(Refer
to

or process
terminations on
bit OF%HER of the OPENF call

Generates an illegal instruction interrupt on error conditions
SOUTR ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX3:

JFN is not assigned

DESX5:

File is not open

IOX2:

File is not open for writing

IOX5:

Device or data error

IOX6:

Illegal to write beyond absolute end of file

IOX7:

Insufficient system resources

IOX8:

Monitor internal error
3-426

(Job Storage Block full)

below.

TOPS-20 MONITOR CALLS
(SOUTH)

IOX9:

Function legal for sequential write only

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-427

I

April 1982

TOPS-20 MONITOR CALLS
(SPACS)

SPACS

I

JSVS

60

Sets the accessibility of a page.
This call affects the map
the page named in ACI (no indirect pointers are allowed).
ACCEPTS IN ACl:
AC2:

word

of

process/file designator in the left half,
and page
number within the file or process in the right half
access information
B2(PA%RD)

permit read access

B3(PA%WT)

permit write access

B4(PA%EX)

permit execute access

B9(PA%CPY) copy-on-write
RETURNS

+1:

always

When used to modify a process page, the SPACS call does not allow any
greater
access
than can be obtained with the PMAP call (i.e., the
access specified on the OPENF call
is applied
to SPACS operations
involving file pointers) .
The SPACS call does not allow bits to be set in a page that
already exist.
The RPACS monitor call can be used to obtain the
page.

does

accessibility

not
of

Generates an illegal instruction interrupt on error conditions below.
SPACS ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

DESX2:

Terminal is not available to this job

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESXS:

File is not open

DESX8:

File is not on disk

SPACXl:

Invalid access requested

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

3-428

a

TOPS-20 MONITOR CALLS
(SPJFN)

SPJFN
Sets the primary JFNs
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

JSVS

(.PRIIN and .PRIOU)

207
for the specified process.

process handle
primary input JFN in the left
output JFN in the right half

half,

and

primary

cilways

The JFNs given cannot be either 100 or 101.
These JFNs cause the
specified process to receive an error on any primary I/O operation.
If minus one is placed in the appropriate half of AC2,
the primary
input/output JFNs are set to the process' controlling terminal.
The GPJFN monitor call can be used to obtain the primary JFNs.
Generates an illegal instruction interrupt on error conditions below.
SPJFN ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

DESX3:

JFN is not assigned

3-429

TOPS-20 MONITOR CALLS
(SPLFK)

SPLFK

JSYS

314

Splices a process structure.
The process that becomes the new
superior must be either the one executing the SPLFK monitor call, ~r
an inferior of it.
The new inferior process must be an inferior of
the executing process.
The new superior process must not be the same
process as the new inferior process, and must not be inferior
to the
new inferior process.
The new inferior process and
all of its
inferiors will be frozen after execution of the SPLFK call.
ACCEPTS IN ACl:
AC2:
RETURNS

proc~ss

handle of the new superior process

process handle of the new inferior process

+1:

failure, error code in ACI

+2:

success, a process handle in ACI.
This handle may be
used by the new superior process (in ACl) to refer to
its new inferior (in AC2).

SPLFK ERROR MNEMONICS:
SPLFXl:

Process is not inferior or equal to self

SPLFX2 :

Process is not inferior to self

SPLFX3:

New superior process is inferior to intended inferior

FRKHXl:

Invalid process handle

3-430

TOPS-20 MONITOR CALLS
(SPOOL)

SPOOL

JSYS

517

Defines and initializes a device to be used for input spooling or sets
and reads the directory for a spooled device.
RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

length of argument block
in the
function code in the right half

AC2:
RETURNS

left

half,

and

address of argument block

+1:

failure, error code in ACI

+2:

success

upon the
The format of the argument block
is different depending
particular
function desired.
The available functions, along with
their argument block formats, are as follows:
Code

Symbol

o

.SPLDI

1

.SPLSD

Meaning
Define an
input
argument block is:

spooling

The

device.

Word

Symbol

Meaning

o

.SPLDV

Device designator
device.

1

.SPLNA

Pointer
to
name
string
comprising the set of files to
be input.

2

.SPLGN

first
Generation number
of
is
file.
This
number
incremented by 1 each time the
spooled device is opened.

input

of

Set the directory of the spooled device.
argument block is:

The

Word

Symbol

Meaning

o

.SPLDV

Device designator
device.

1

.SPLDR

Directory number.
This number
is
the
logged-in directory
number of the user who opened
the spooled device.

of

spooled

This function requires the process to
WHEEL or OPERATOR capability enabled.

3-431

have

TOPS-20 MONITOR CALLS
(SPOOL)
Code

Symbol

2

.SPLRD

Meaning
Read the directory of
The argument block is:

the

spooled

Word

Symbol

Meaning

o

.SPLDV

device.

Designator of spooled device.

The directory number of the spooled device is
returned in word I of the argument block.
To read from a spooled input device, the user first defines
of the files comprising his set of spooled input files.
have names in the format:

the name
The files

STR:ERROR.SYS.)
RESTRICTIONS:

requires WHEEL, OPERATOR, or
enabled

ACCEPTS IN ACl:

address of argument block

AC2:
RETURNS

I

JSYS

+1:

(ERROR.SYS) .
(Refer
to
the
system error
file,
MAINTENANCE

capability

length of argument block
always

The first four words of the header block
header information required by SPEAR.

must

contain

the

standard

Generates an illegal instruction interrupt on error conditions below.
SYERR ERROR MNEMONICS:
CAPXl:

WHEEL or OPERATOR capability required

SYEX1:

Unreasonable SYSERR block size

SYEX2:

No buffer space available for SYSERR

TOPS-20 Version 5

3-450

April 1982

TOPS-20 MONITOR CALLS
(SYSGT)

SYSGT

JSYS 16

Returns the table number, table length, and word 0 of the specified
system table.
(Refer
to Section 2.3.2 for the names of the system
tables.)
ACCEPTS IN ACl:

SIXBIT table name

RETURNS

always, with

+1:

ACI containing word 0 of the table
AC2 containing the negative of the number of words in
the table in the left half, and the table number
in the right half
The table number returned can be given to the GETAB monitor call as an
argument.
However,
because
the
MONSYM file
includes symbol
definitions for the system tables, execution of the SYSGT call is not
required to obtain the table number for the GETAB call.
The contents of AC2 is 0 on return if
found.

3-451

the

specified

table

was

not

TOPS-20 MONITOR CALLS
(TBADD)

TBADD

JSYS

536

Adds an entry to a standard-formatted command
table
used
for
user
program command recognition.
(Refer to the TBLUK call description for
the format of the command table.)
ACCEPTS IN ACI:

RETURNS

address of word 0 (header word) of table

AC2:

entry to be added to table.
(Refer to the TBLUK call
for the format of a table entry.)

+1:

always, with address in the table of the new entry in
ACI

Generates an illegal instruction interrupt on error conditions below.
TBADD ERROR MNEMONICS:
TADDXI:

Table is full

TADDX2 :

Entry is already in table

3-452

TOPS-20 MONITOR CALLS
(TBDEL)

TBDEL

J:SVS

535

Deletes an entry from a standard-formatted command table used for user
program command recognition.
(Refer to the TBLUK call description for
the format of the command table.)
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

address of word 0 (header word) of table
address of entry to be deleted.
returned in ACI on a TBLUK call.

This

address

is

always

Generates an illegal instruction interrupt on error conditions below.
TBDEL ERROR MNEMONICS:
TDELXl:

Table is empty

TDELX2 :

Invalid table entry location

3-453

TOPS-20 MONITOR CALLS
(TBLUK)

TBLUK

JSYS

537

Compares the specified string
in the caller's
strings
indicated
by a
command
table.
The
format, which is described below.

address space with
table has a standard

This call
is used
to
implement a
consistent style of command
recognition and command
abbreviation
for user programs.
The TBLUK
call performs the function of string lookup
In the
table,
and
the
TBADD and TBDEL calls perform the functions of adding to and deleting
from the table.
The command table has the following format:
Word

Meaning

o

Number of entries in the table (not including this
entry)
in the
left half, and maximum number of
entries in the table (not including this entry) in
the right half.

1 through n

Address of an argument block
in the
left half;
the
right half of each table entry is available
for use by the user program.

The argument block can have one of two formats.
Bits 0-7 of the first
word of the argument block determine which format the argument block
has.
If bits 0-6 are all off and B7(CM%FW) is on, the string begins in the
next word of
the
argument
block,
and
the remainder of this word
contains data bits relevant to the string.
Table Entry

o
17 18
35
!=======================================================!
ADR

for use by program

!

!=======================================================!
Argument Block

ADR

a
6 7
35
!=============================================:==========!
a
! I!
data bits
!-------------------------------------------------------!
start of string

!=============================================:==========!

3-454

TOPS-20 MONITOR CALLS
(TBLUK)
The following bits are currently defined:
Bit

Symbol

34

CM%NOR

Do not recognize this string, even if a string
is
specified
that matches exactly, and consider an
exact match as ambiguous.
A program can set this
bit to include entries that are initial substrings
of other entries in the table to enforce a minimum
abbreviation of these other
entries
(e.g., to
include D and DE in the table to enforce DEL as
the minimum abbreviation of DELETE).

CM%FW

Indicate that the remainder of this word is a flag
word containing data bits relevant to the string.
This bit must be on to distinguish a
flag
word
from a null string.

7

Meaning

If any bit of bits 0-6 of the first word of the argument block
is on
or if B7(CM%FW) is off, the string begins in that word.
In this case,
the data bits do not apply and are assumed to be off.
Table Entry

o

17 18

35

!=====~=================================================!

ADR
!=====~=================================================!

Argument

ADR

o
35
!=======================================================!
start of string

!

!=======================================================!
The addresses in the command table must be sorted
according
to
the
alphabetical
order of
the
strings.
Note that letters are always
considered as uppercase.
Therefore,
the
strings ABC and
abc are
considered equivalent
strings.
This order
results
in efficient
searching of strings and determination of ambiguous strings.
The right half of each table entry can be used by the program for
an
address
to a dispatch
table
for the command or for a pointer to a
parameter block
~or
additional
information about
the call.
The
contents of this half word is ignored by the three table calls.
ACCEPTS IN ACl:
AC2:

address of word 0

(header word)

of table

byte pointer to string in caller's address space that
is to be compared with the string in the table

3-455

TOPS-20 MONITOR CALLS
(TBLUK)
RETURNS

+1:

always, with
ACl containing the address of the entry that matches
the input string or address where the entry would
be if it were in the table.
AC2 containing recognition bits:
BO(TL%NOM) The input string does
not match any
string in the table.
Bl(TL%AMB) The input string matches more than one
string
in
the
table
(i.e.,
is
ambiguous) .
input
string
is
a
valid
B2(TL%ABR) The
abbreviation of a string in the table.
B3(TL%EXM) The input string
is an exact match
with a string in the table.
AC3 containing a byte pointer to the remainder of the
string
In the
table
if
the match was on an
abbreviation (TL%ABR is on).
This string can
then be output to complete the command.

Generates an illegal instruction interrupt on error conditions below.
TBLUK ERROR MNEMONICS:
TLUKX1:

Internal format of table is incorrect

3-456

TOPS-20 MONITOR CALLS
(TEXTI)

TEXTI

JSYS

524

Reads input from a terminal or a file into a string in the caller's
address space.
Input is read until either a specified break character
is encountered or the byte count is exhausted, whichever occurs first.
When used for terminal input, the TEXTI
editing functions:

call

handles

the

following

1.

Delete the last character input (DELETE).

2.

Delete back to the last punctuation character (CTRL/W).

3.

Delete back to the beginning of the current line or,
if the
current line is empty, back to the beginning of the previous
1 ine (CTF:L/U).

4.

Retype the current line from its beginning or,
if
line is empty, retype the previous line (CTRL/R).

5.

Accept tte next character without regard to its usual meaning
(CTRL/V) .

current

ACCEPTS IN ACl:

address of argument block

RETURNS

+1:

failure, error code in ACI

+2:

~,uccess ,
updated pointer in word .RDDBP, appropriate
bits set in the left. half of word .RDFLG, and updat.ed
count in word .RDDBC of t.he argument block

The format. of t.he argument block is as follows:
Meaning

Word

Symbol

a

.RDCWB

Count of words following
argument block.

1

.RDFLG

Flag bits.

2

.RDIOJ

Byte point.er t.o st.ring, or input. JFN in t.he
left half and output. JFN in the right half
(if RD%JFN is on in the flag word
.RDFLG).
The input JFN is where t.he input is being
read from, and the out.put JFN is where any
output generat.ed from character edit.ing is
placed.

3

.RDDBP

Byte pointer t.o string in caller's
space
where
input.
is
to
be
(destination string pointer).

4

.RDDBC

Number of byt.es available in the
string (field width).

3-457

t.his

word

in

the

(See below.)

address
placed

dest.inat.ion

TOPS-20 MONITOR CALLS
(TEXTI)
Word

Symbol

5

.RDBFP

Byte pointer
to
the
beginning
of
the
destination buffer.
This pointer indicates
the maximum limit to which the user can edit
back
into the buffer with DELETE, CTRL/W, or
CTRL/U.
This buffer is not
separate
(i.e.,
is not disjoint) from the destination string.
On the first TEXTI, this pointer is normally
the
same as
the destination byte pointer
(.RDDBP), but does not have to be the
same.
If
the count
in word .RDCWB is 4, then the
byte pointer in word .RDDBP will be
used
as
the pointer to the destination buffer.

6

.RDRTY

Byte pointer
to
the
beginning
of
the
prompting-text
(CTRL/R buffer).
This text,
along with any text
in
the
destination
buffer, is output if the user types CTRL/R on
his first line of
input.
If there
is no
CTRL/R text or the user types CTRL/R on other
than the first line of input, only the
text
in the destination buffer will be output.
The CTRL/R buffer
is useful
for
retyping
characters
that preceded
the user's input,
such as a prompt from the program.
The text
in this buffer cannot be edited by the user,
and if the user deletes back to
the end
of
this buffer,
his action is treated as if he
has deleted all of his input.
This buffer is
logically adjacent to the destination buffer,
but may be physically disjoint from it.
When
the CTRL/R buffer
is disjoint, it must be
terminated with a null byte.

7

.RDBRK

Address of a 4-word block of break character
mask bits.
If a bit is on in the mask, then
the corresponding character is considered
a
break character.
Any bits set in this mask
override break characters set in
the
flag
word.

Meaning

The mask occupies the
leftmost
32 bits of
each word,
thereby allowing
a mask of 128
bits.
The rightmost 4 bits of each word
are
ignored.
The mapping is from left to right.
The ASCII character
set maps
into
this
l28-bit mask.
If this word
is zero,
there
character set mask defined.
10

.RDBKL

is

no

break

Byte pointer
to the backup limit
in
the
destination buffer.
This pointer indicates
the position in the destination buffer
to
which
the
user can edit back without being
informed.
This pointer is used
to
indicate
to
the program that previously parsed text
has been edited and may need to be
reparsed
by the program.
The pointer can either be
equal to the start of the buffer pointer
(.RDBFP) or to the destination string pointer
(.RDDBP) or be between these two pointers.
3-458

TOPS-20 MONITOR CALLS
(TEXTI)
Words 5 through 10 (.RDBFP through .RDBKL) in the argument block are
optional.
A zero in any of the words means that no pointer has been
given.
The illustration below is a logical
arrangement of the CTRL/R and
destination buffers, with the placement of the pointers when they are
given as not being equal.
Remember that the CTRL/R buffer does not
have
to be adjacent to the destination buffer and that two or more of
these pointers can be equal.

r--

destination buffer

can be edited)

!=======================================================!
CTRL/R buffer;
cannot be edited,
and will be output
on a CTRL/R

Can be edited,
but user is
informed

t······················f················f······l······ .. !
CTRL/R
buffer
pointer
( . RDRTY)

Beginning of
destination
buffer pointer
( . RDBFP)

Backup
limit
pointer
( . RDBKL)

The flag bits that can be set in word 1
are as follows:

Destination
string
pointer
(. RDDBP)

(.RDFLG) of the argument block

Bit

Symbol

Meaning

o

RD%BRK

Break on CTRL/Z or ESC.

1

RD%TOP

TOPS-IO character set.
Break on CTRL/G,
CTRL/K, CTRL/L, CTRL/Z, ESC, carriage return,
line feed.

2

RD%PUN

Break on punctuation:
CTRL/A-CTRL/F
CTRL/H-CTRL/I
CTRL/N-CTRL/Q
CTRL/S-CTRL/T
C'rRL/X-CTRL/Y

ASCII
ASCII
ASCII
ASCII
ASCII

codes
codes
codes
codes
codes

34-37
40-57
72-100
133-140
173-176

3

RD%BEL

Break on end of line
(carriage
line feed, or line feed only).

4

RD%CRF

Suppress a carriage return and return a
feed only.

5

RD%RND

Return to user program if the user
tries
to
delete
beyond
the
beginning
of
the
destination buffer.
If this bit is not set,
the TEXTI call causes the terminal's bell to
ring and waits for more input.

3-459

return

and
line

TOPS-20 MONITOR CALLS
(TEXTI)
Bit

Symbol

6

RD%JFN

JFNs have been
given
for
the
source
designator
(word
.RDIOJ of the argument
block).
If this bit is not set,
the
source
designator is a pointer to a string.

7

RD%RIE

Return to user program if the input buffer is
empty.
If
this bit
is not set, the TEXTI
call waits for more input.

8

RD%BBG

Not used

9

RD%BEG

Causes TEXTI
to
return when the
.RDBKL
pointer is reached and TEXTI is about to wait
for more input.

10

RD%RAI

Convert lowercase input to uppercase input.

11

RD%SUI

Suppress the CTRL/U indication if user
types
a
CTRL/U
(i.e.,
do not print
XXX and on
display terminals,
do
not
delete
the
characters from the screen).

Meaning

On a successful return, the following
(.RDFLG) of the argument block:

bits

can

be

set

in

word

1

Bit

Symbol

12

RD%BTM

A break character terminated the
input.
If
this bit is not set, the input was terminated
because the byte count was exhausted.

13

RD%BFE

Control was returned
to
the
user
program
because
the
user tried to delete beyond the
beginning of
and
the destination buffer
RD%,RND wa s on in the call.

14

RD%BLR

The backup limit for editing was reached.

Meaning

TEXTI ERROR MNEMONICS:

I

ARGX17:

Invalid argument block length

RDTXl:

Invalid string pointer

IOXll:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-460

April 1982

TOPS-20 MONITOR CALLS
(TFORK)

TFORK

JSVS

Sets and removes monitor call intercepts
inferior processes.

321
(JSYS traps)

for

the

given

When the process attempts to execute a calIon which an intercept has
been set, that process is suspended before it executes the call.
Once
the process is suspended, the monitor passes control
to
the closest
superior process that is monitoring the execution of that call.
The superior process can then use the RTFRK call
to determine which
process caused the interrupt, and how to handle the interrupt.
It can
use any of the process manipulation calls, and then use the UTFRK call
to resume the suspended inferior process.
Alternatively, the superior can simply decide to resume
the
inferior
and
allow it to execute
the call.
In this case, the next higher
superior process monitoring
the
intercepted
call
receives
an
interrupt,
and control is passed to that superior.
If each superior
process monitoring the call decides to resume
the
suspended process
without changing its PC word, then the suspended process is allowed to
execute the monitor call as it normally would.
Note that an RTFRK should be performed when an interrupt is
or the monitored process will not trap again.

received,

RESTRICTIONS:

requires WHEEL, OPERATOR, or MAINTENANCE
enabled for use on execute-only processes

ACCEPTS IN ACl:

function code in" the left half, and process handle in
the right half

AC2:

software interrupt channel number in the
left half,
and size (in bits) of the monitor call bit table

AC3:

address of monitor call bit table

+1:

<3lways

RETURN

capability

The available functions are as follows:
Meaning

Code

Symbol

o

. TFSE'['

Set monitor call
intercepts
for
the given
process.
The calls that will be intercepted
are indicated in the monitor call bit
table.
The given process must be
frozen.
This
function
is
illegal
for
an
execute-only
process.

I

.TFRAL

Remove all monitor call
intercepts for
the
given process.
The process must be frozen.
This function is illegal for an execute-only
process.

2

.TFRTl?

Remove for the given process only the monitor
call
intercepts
that are
indicated in the
monitor call bit table.
The given process
must be frozen.
This function is illegal for
an execute-only process.

3-461

TOPS-20 MONITOR CALLS
(TFORK)
Code

Symbol

3

.TFSPS

Set the given software channel as the channel
on which to generate the interrupt.

4

.TFRPS

Return in the left half of AC2
the
channel
on which
the
interrupt
generated.

5

.TFTST

Test if the caller is to be intercepted when
it attempts to execute monitor calls.
On
successful return AC2 contains -1 if it is to
be
intercepted or
0
if
it
is not to be
intercepted.

6

.TFRES

Remove intercepts set for all
inferiors and
clear
the
software channel assigned to the
interrupt for monitor call intercepts.

7

.TFUUO

Set monitor
call
intercepts for
TOPS-IO
monitor
calls
(UUOs) for the given process.
The process must be frozen.
This function is
illegal for an execute-only process.

10

.TFSJU

Set monitor
call
intercepts
for
both
the
calls indicated in the monitor call bit table
and the TOPS-IO monitor calls.
This function
is a combination of
functions
.TFSET and
.TFUUO.
The given process must be
frozen.
This
function is illegal for an execute-only
process.

11

.TFRUU

Remove monitor
call
intercepts
for
the
TOPS-IO monitor
calls.
The given process
must be frozen.

Meaning

software
will
be

To set monitor call intercepts, the process must
first
issue
.TFSPS
(code
3).
Then, .TFSET (code 0), .TFUUO (code 7) or .'I'FSJU (code 10)
may be issued to set intercepts.
The process handle in the right half of ACI must refer to an inferior
process or must be -4 to refer to all inferiors.
When intercepts are
set for a given process, they also apply to all processes inferior
to
the given process.
When a process is created, it is subject to the
same intercepts as the process that created it.
If the software channel is given as 77,
any
intercepts bypass
the
given process without c~using either an interrupt to its superior or a
suspended state of the process.

I

The monitor call bit table contains a bit
for
each of
the TOPS-20
monitor
calls.
When a
bit
in
the table is on, the corresponding
monitor call is to be intercepted when the given process attempts to
execute
it.
If
the bit is off, the corresponding monitor call will
not be intercepted.
The size of the bit table is 1000(octal) bits.

3-462

TOPS-20 MONITOR CALLS
(TFORK)
A process can remove only the intercepts it previously set;
remove intercepts that other processes set.

it cannot

When the process being monitored attempts to execute
the
trapped-for
JSYS,
the process and
its inferiors enter a suspended state.
This
suspended state differs from the normal "frozen" state of a process in
the following ways:
1.

The inferiors of the monitored process
continue to operate.

2.

The monitored process is resumed with the UTFRK monitor call.
RFORK will not resume the process.

3.

All interrupts for the monitored process are queued
and
acted upon immediately after the UTFRK monitor call.

After the suspension of the monitored process,
may do one of the following:
process

to

are

the

resume

not

frozen

superior

execution

and

are

process

1.

Allow the monitored
intercepted JSYS.

2.

Make changes in the
process and allow
intercepted JSYS.

3.

Execute the intercepted JSYS on behalf of
the monitored
process, and then allow the monitored process to continue.

TFORK

(trap)

2.

RTFRK

(rf:ad)

3.

UTFRK

(untrap)

the

working
environment of
the monitored
that process to resume execution of the

The user interface to the monitor call intercept facility is
for by three JSYS's:
1.

of

provided

Generates an illegal instruction interrupt on error conditions below.
TFORK ERROR MNEMONICS:
FRKHX8 :

Illegal to manipulate an execute-only process

TFRKXl:

Invalid function code

TFRKX2 :

Unassigned process handle or not immediate inferior

TFRKX3 :

Process not frozen

3-463

TOPS-20 MONITOR CALLS
(THIBR)

THIBR

JSYS

770

Blocks the current process for the specified elapsed time or until
awakened by a TWAKE monitor call, whichever occurs first.
The THIBR
call is a temporary call and may not be defined in future releases.
ACCEPTS IN ACl:

0 in the left half, and maximum number of seconds
block in the right half

RETURNS

+1:

never

+2:

always, with time expired or TWAKE call occurred

3-464

to

TOPS-20 MONITOR CALLS
(TIME)

TIME

JSYS

14

Returns the amount of time since the system was
restarted.
RETURNS

+1:

last

always, with time (in milliseconds)
right-justified
in AC1, and divisor to convert the time to seconds in
AC2. AC2 always contains 1000;
thus,
it is not
necessary to examine its contents.

This is a monotonically increasing number (when the system is running)
independent of any resets of the time and date.

3-465

TOPS-20 MONITOR CALLS
(TIMER)

TIMER

JSYS

522

Controls the amount of time either a process within a job or the
entire job can run.
An interrupt is generated when the time has
elapsed.
Only one process in the job is allowed to time the entire job.
If the
job is already being timed, an error is given if another process
attempts to time the job. An error is also given if a process other
than the one that set the runtime limit of the job attempts to remove
that limit.
ACCEPTS IN AC1:

RETURNS

process handle in the left half, and function code in
the right half.

AC2:

time at which to generate an interrupt.
individual function descriptions for
arguments.

Refer to the
the specific

AC3:

number of the softw2re channel on which
an interrupt when the time has expired.

to

+1:

failure, error code in ACl

+2:

success

generate

The available functions are as follows:
Code

Symbol

Meaning

o

.TIMRT

Specify the total runtime of the entire job.
This function allows one process within a job
to time the entire job.
AC2 contains the
total runtime in milliseconds that the job
can accumulate before
an
interrupt
is
generated on the specified channel.
If AC2
contains 0, the limit on the runtime of the
job is removed. The process handle given in
ACI must be .FHJOB (-5).

1

.TIMEL

Specify an elapsed time
interrupt is generated for
AC2 contains the number of
can
now elapse before
generated on the specified

2

.TIMDT

Specify 2n exact time at which an interrupt
AC2
is generated for
the given process.
(refer
to
contains the internal format.
section 2.6.3) of the date and time when the
interrupt is to be generated.

3

.TIMDD

Remove any pending interrupt requests that
are to occur for
the process at the given
time.
AC2 contains the int.ernal
format
(refer to section 2.9.2) of the date and time
of the interrupt request to be removed.
AC3
is not used for this function.

3-466

after which
an
the given process.
milliseconds that
the interrupt is
channel.

TOPS-20 MONITOR CALLS
(TIMER)
Code

Symbol

4

.TIMBF

interrupt
requests
that
Remove any pending
are to occur for the process before the given
time.
AC2 contains
the
internal
format
(refer
to section 2.9.2)
of the date and
time.
AC3 is not used for this function.

5

.TIMAL

Remove all pending
process
including
entire
job.
AC3
function.

Meaning

requests
for
the given
the
runtime limit on the
is not
used
for
this

The runtime limit for a job can be obtained via the GETJI monitor call
(contents of word .JIRT on return).
If the job's time limit has been
exceeded, the value returned by the GETJI call will be zero.
TIMER ERROR MNEMONICS:
TIMXI:

Invalid function

TIMX2:

Invalid process handle

TIMX 3:

Time limit already set

TIMX4:

Illegal to clear time limit

TIMX5 :

Invalid software interrupt channel number

TIMX6:

Time has already passed

TIMX7:

No space available for a clock

TIMX8:

User clock allocation exceeded

TIMX9:

No such clock entry found

TIMXIO:

No system date and time

3-467

TOPS-20 MONITOR CALLS
(TLINK)

TLINK

JSYS

216

Controls
terminal
linking.
(Refer
to Section 2.4.9.5 for
more
information.)
RESTRICTIONS:
some functions require WHEEL or OPERATOR capability
enabled
ACCEPTS IN ACl:

AC2:
RETURNS

BO(TL%CRO)

Clear
link
from
remote
to
object
designator.
If the remote designator is
-1,
all
remote
links
to
the
object
designator are cleared.

Bl(TL%COR)

Clear
link
from
object
to
remote
designator.
If the remote designator is
-1, links from the object to all
remote
designators are cleared.

B2(TL%EOR)

Establish link
designator.

from

object

to

remote

B3(TL%ERO)

Establish link
designator.

from

remote

to

object

B4(TL%SAB)

Examine B5(TL%ABS)
to
determine
the
setting of the object designator's accept
link bit.
If this bit is off,
B5
is
ignored.

B5(TL%ABS)

Set the object designator's accept link
bit.
When B4(TL%SAB) is on, the object
designator is accepting links;
if TL%ABS
is
off
refusing
links
the object
designator is.

B6(TL%STA)

Examine B7(TL%AAD)
to
determine
the
setting of the object designator's accept
advice bit.
If this bit is off,
B7
is
ignored.

B7(TL%AAD)

Set the object designator's accept advice
bit.
When B6(TL%STA) is on, the object
designator is accepting advice if TL%AAD
is on and
refusing advice if TL%ADD is
off.

B18-B35
(TL%OBJ)

Object designator

remote designator in the right half

+1:

failure, error code in ACI

+2:

success

The object and remote designators must be either
4xxxxx or
-1.
An
object designator
of -1
indicates
the controlling terminal.
The
following restrictions apply
if the process does not:
have WHEEL
capability enabled:
1.

The object designator must specify this terminal.

3-468

TOPS-20 MONITOR CALLS
(TLINK)

2.

The object-to-remote link must be specified before or at
same time as the remote-to-obiect link.

the

If the accept bit of the remote designator is not set, a link from the
object-to-remote designator causes the remote designator's bell to
ring.
If the remote designator does not set the accept bit within 15
seconds, the TLINK call returns an error.
When terminals are linked together and a character is typed on one
terminal,
the same ASCII character code is sent to all terminals in
the link . . The character always appears in the output buffers of all
terminals regardless of the current mode of each individual terminal.
The character is sent according to the data mode and terminal type of
the terminal that originates the character.
For example, if one
terminal originates a TAB and has mechanical tabs set, all terminals
in the link receive the ASCII code for a TAB in their output buffers.
TLINK ERROR MNEMONICS:
DESXl:

Invalid source/destination designator

TLNKXl:

Illegal to set remote to object before object to remote

TLNKX2:

Link was not received within 15 seconds

TLNKX3:

Links full

TTYXOl:

Line is not active

3-469

TOPS-20 MONITOR CALLS
(TMON)
TMON

JSYS 7

Returns various flags and parameters in the monitor's data base.
In
most cases,
flag-oriented items return a 1 in AC2 if the flag is set
and a 0 in AC2 if the flag is cleared.
In a few cases (noted
in
the
text),
flag-oriented
items return the appropriate bit set or cleared
in AC2.
Value-oriented items return the value of
the
parameter
in
AC2.
ACCEPTS IN ACl:

function code

RETURNS

always, with value of the function in AC2

+1:

The codes for the functions are as follows:

I

Code

Symbol

0
1
2
3
4
5
6
7
10
11
12

. SFFAC
.SFCDE
.SFCDR
. SFMST
. SFRMT
. SFPTY
.SFCTY
.SFOPR
. SFLCL
. SFBTE
.SFCRD

13
21
22

. SFNVT
. SFUSG
.SFFLO

23
24
25
44
45
46
47
50
51
52
53

.SFMTA
. SFMSO
. SFMSI
. SFNTN
.SFNDU
.SFNHI
.SFTMZ
.SFLHN
.SFAVR
.SFSTS
.SFSOK

I

Meaning
FACT file entries are allowed .
CHECKD found errors.
CHECKD is running.
Manual start is in progress .
Remote LOGINs (dataset lines) are allowed .
PTY LOGINs are allowed .
CTY LOGINs are allowed.
Operator is in attendance.
Local LOGINs (hardwired lines) are allowed .
Bit table errors found on startup .
directory
Users
can
change
nonprivileged
parameters with the CRDIR monitor call.
ARPANET terminal LOGINs are allowed .
USAGE file entries are allowed .
Disk latency optimization using
the RH20
backup
register
is enabled.
This feature is not to be
is at
enabled unless the M8555 board of the RH20
Revision
Level
D AND either
of
the KLIO-C
processor
is at Revision Level
10 or KLIO-E
processor is at Revision Level 2.
MOUNTR magtape allocation is enabled.
System message level 0 is set .
System message level 1 is set .
ARPANET is on .
ARPANET will be reinitialized if it is down.
ARPANET host table will be initialized.
Local timE' zone
ARPANET local host number
Account validation is running on this system.
Status reporting is enabled.
GETOK% defaults
Required in AC2:

GETOK% function code

Returned in AC2:

Flags"GETOK% function code

Flags:
Bit Symbol

Meaning

BO

SF%EOK

0
1

Access checking is disabled
Access checking is enabled

Bl

SF%DOK

0

Access is denied if checking disabled
Access is allowed if checking disabled

1

TOPS-20 Version 5.1

3-470

December 1982

TOPS-20 MONITOR CALLS
(TMON)
Code

Symbol

Meaning
See the description of the GETOK% JSYS for
function codes.

54

.SFMCY

55
56

.SFRDU
.SFACY

57

.SFRTW

60

.SFTDF

GETOK%

Maximum offline expiration period in days in days
for ordinary files (tape recycle period) .
Read date update function data
Maximum offline expiration period
in days for
archive files (tape recycle period).
File-retrieval requests that are waiting
for
the
retrieval should fail rather than wait.
Tape mount controls
Flags:

61

.SFWSP

Bit

Symbol

IBO

MT%UUT

Meaning

unrecognizable
Set
unload
tapes
Clear
treat
unrecognizable
topes as unlabeled
Enable working set preloading

The SMON monitor call can be used to set various monitor flags.
Generates an illegal instruction interrupt on error conditions below.
TMON ERROR MNEMONICS:
TMONXl:

Invalid TMON function

3-471

TOPS-20 MONITOR CALLS
(TTMSG)

TTMSG

JSYS

775

Sends a message to a specified terminal or
to all
terminals.
The
TTMSG call
is a
temporary call and may not be defined in future
releases.

I

RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled to send
to all terminals

ACCEPTS IN ACI:

400000 + TTY number, or -1 to send to all terminals

AC2:
RETURNS

+1:

byte pointer to string in caller's address
be sent

space

to

always

The TTMSG monitor call is a no-op if the specified terminal
exist.

does

not

Generates an illegal instruction interrupt on error conditions below.
TTMSG ERROR MNEMONICS:
GTDIXI:

WHEEL or OPERATOR capability required

TOPS-20 Version 5

3-472

April 1982

TOPS-20 MONITOR CALLS
(TWAKE)

TWAKE

JSYS

771

Wakes the specified job that is blocked because of the execution of a
THIBR call.
If more than one process in a job is blocked because of a
THIBR call, execution of the TWAKE call causes anyone of
the
processes to be awakened.
The TWAKE call is a temporary call and may
not be defined in future releases.
ACCEPTS IN ACl:
RETURNS

0 in the left half, and number of job to be
in the right half

+1:

failure, error code in ACI

+2:

success,
signal
sent.
Job
will
be
awakened
immediately if blocked by a THIBR call or as soon as
next THIBR call is executed.

TWAKE ERROR MNEMONICS:
ATACXI:

awakened

Invalid job number

3-473

TOPS-ZQ MONITOR CALLS
(UFPGS)

UFPGS

JSYS

525

Updates pages of the specified file.
This monitor
call
is used
to
guarantee
that
a
certain sequence of file pages has been written to
the disk before any other operation is performed.
ACCEPTS IN ACI:

JFN in the left half, and file page
number
first page to be updated in the right half

AC2:
RETURNS

of

the

flags"count of number of sequential pages to update

+1:

failure, error code in ACI

+2:

success, all modified pages are written to disk.
FDB is updated, if nece£sary.

The

FLAGS:
Bit

Symbol

o

UF%NOW

Meaning
Allows performing
a
UFPGS
call
without
blocking.
The JSYS will not block even if some
pages need to be written to disk.

If UF%NOW is not set, the UFPGS call causes the process to block until
all writes to the disk are completed.
UFPGS ERROR MNEMONICS:

I

I

UFPGX1:

File is not opened for write

DESX3:

JFN is not assigned

DESX4:

Invalid use of terminal designator or string pointer

DESX7:

Illegal use of parse-only JFN or output wildcard-designators

DESX8:

File is not on disk

LNGFXI:

Page table does not exist and file not open for write

IOXII:

Quota exceeded

IOX34:

Disk full

IOX35:

Unable to allocate disk - structure damaged

TOPS-20 Version 5

3-474

April 1982

TOPS-20 MONITOR CALLS
(USAGE)

USAGE

JSYS

564

Controls accounting on the system by writing entries into the system's
data
file.
All entries to the data file are made with this call.
Examples of the types of entries entered into the data file are disk
storage usage
for
regulated
structures,
input and output spooler
usage, job session entry, and date and time changes.
The file written by the USAGE call is an
intermediate binary file,
which
is converted by a system program to the final ASCII file.
Each
entry in the final file is at least two
records
long,
each record
being defined as a
string of ASCII characters terminated with a
line-feed character.
The first
record contains system and
file
information;
its format
is the same for all entries.
Subsequent
records contain data pertaining to the entry;
their
formats vary
according to the particular data being entered.
Refer to the USAGE File Specification for
the system's data file.

additional

information

RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACl:

function code

AC2:
RETURNS

+1:

function argument or
block

address

of

record

on

descriptor

always

The available functions are as follows:
Code

Symbol

o

.USENT

write an entry into the system's
AC2
contains
the
address of
descriptor block.

1

.USCLS

Close the system's data file,
which
is named
PS:(ACCOUNTS>SYSTEM-DATA.BIN.
No additional
entries are recorded into this file, and a
new
SYSTEM-DATA. BIN
for
subsequent
is
opened
entries.

2

.USCKP

Perform a checkpoint of all
jobs.
Data
recorded
during
a checkpoint
includes the
billable data (connect time and
runtime,
for
example)
accumulated during
the job session.
The session starts from time of
login or
the
last SET ACCOUNT command, and ends at the time
this function is performed.
The data collected
on a
LOGIN or SET ACCOUNT command is entered
into the session entry in the data
file.
The
default checkpoint interval is 10 minutes.

3

.USLGI

Initialize a checkpoint entry for
the
job.
This function
is used internally by the LOGIN
monitor call.
AC2 contains the address of the
record descriptor block.

Meaning

3-475

data file.
record
the

TOPS-20 MONITOR CALLS
(USAGE)
Code

Symbol

Meaning

4

.USLGO

Terminate the checkpoint entry for the job and
write an entry into the system's data file,
which is named PS:SYSTEM-DATA.BIN.
This function is used internally by the LGOUT
monitor call. AC2 contains the address of the
record descriptor block.

5

.USSEN

Terminate the current session, write an entry
into the system's data file, which is named
PS:SYSTEM-DATA.BIN, and initialize a
new
checkpoint
entry for
the job.
This
function is used internally by the
CACCT
monitor call.
AC2 contains the address of the
record descriptor block.

6

.USCKI

Set the checkpoint time interval.
the interval in minutes.

7

.USENA

Install the accounting data base from the file
named PS:ACCOUNTS-TABLE.BIN into the
running monitor. The ACTGEN program uses this
file to generate the list of valid accounts.

10

. USCAS

Change accounting shift .
This function will
perform a "session end" function for every
active :job.

11

.USSAS

Set accounting shifts.
Sets
automatic
accounting shift
occur. This function takes an
which is a pointer to a block
format:

AC2 contains

the times when
changes are to
argument in AC2
of the following

table header
table entry

table entry
The table header word contains the number of
actual
entries in the table in the left
halfword, and the maximum number of table
entries in the right halfword.
Each table
entry is one word in the following format:
BO-B6

B7-B17
B18-B35

The maximum number
decimal.
3-476

US%DOW Days of the week
that
this entry is in
effect. Bit n is set if
this entry is in effect
for day n (0 = Monday) .
Unused, must be zero.
US%SSM Time of day that
automatic
shift
change
should occur.
Time
is
specified in seconds since
midnight.
of

table

entries

is

100

TOPS-20 MONITOR CALLS
(USAGE)

Code

Symbol

12

.USRAS

Meaning
Read accounting shifts.
This function
returns
the
times of the automatic shift changes that
were set with .USSAS.
AC2 contains the address
of an argument block that is filled in by this
function.
The block has the same format as the
.USSAS block.
Note that
the right halfword
(maximum size) of the
table header must be
specified by the user for .USRAS.

The record descriptor block, whose address is given in AC2, is set up
by the UITEM. macro defined in ACTSYM.MAC.
(Refer to Appendix D for
the definition of the UITEM. macro.)
The names of all data entries
are generated by this macro.
The USENT. macro is used to generate the
header of the record descriptor block.
The format of the data generated by the USAGE call is a list of
items
describing
the entries
in a single record.
This list has a header
word containing the version numbers and the type of entry.
The data
words follow
this header with two words per data item.
The list is
terminated with a zero word.
Generates an illegal instruction interrupt on error conditions below.
USAGE ERROR MNEMONICS:
CAPXl:

WHEEL or OPERATOR capability required

ARGX02:

Invalid function

ARGX04:

Argument block too small

ARGX05:

Argument block too long

USGXOl:

Invalid USAGE entry type code

USGX02:

Item not found in argument list

USGX03:

Default item not allowed

3-477

TOPS-20 MONITOR CALLS
(USRIO)

USRIO

JSYS

310

Places the user program into user
I/O mode
in order
that
it can
execute various hardware
I/O
instructions.
The user lOT flag is
turned on in the PC of the running process.
The program can leave
user
I/O mode by executing a JRSTF with a PC in which bit 6 is zero
(e. g., JRSTF @[ • + 1] ) .
RESTRICTIONS:

requires WHEEL or OPERATOR capability

RETURNS

+1:

failure, error code in ACl

+2:

success, user lOT flag is set

e~abled

US RIO ERROR MNEMONICS:
CAPX2:

WHEEL, OPERATOR, or MAINTENANCE capability required

3-478

TOPS-20 MONITOR CALLS
(UTEBT)

UTEST

JISYS

563

Provides a method for determining if every instruction in a section of
monitor
code actually gets executed.
This monitor call does not test
the code by executing it;
it confirms that a
test of the code
is
complete by reporting the instructions that were executed during the
test.
RESTRICTIONS:

requires WHEEL or OPERATOR capability enabled

ACCEPTS IN ACI:

function code in the left half,
and
argument block in the right half.

AC2:
RETURNS

+1:

length

of

the

address of the argument block
always

The available functions are as follows:
Code

Symbol

o

. UTSET

Start testing of the code .

1

.UTCLR

Stop testing of the code and update the bit map
in the argument block.

Meaning

The format of the argument block is as follows:
Word

Symbol

o

.UTADR

Address of the beginning of the section of code
that is to be tested.

1

. UTLEN

Length of section of code that is to be tested .

2

.UTMAP

Start of bit map representing the
instructions
that are
to be tested in the section of code.
This map contains one bit for each location
in
the section.
If a bit is on in the map, the
corresponding instruction is to be tested.
If
a
bit is off, the corresponding instruction is
not to be tested.

Meaning

Locations that contain data and
that would
cause the section of code to execute improperly
if that data were changed should not be tested.
in a
buffer,
Internally, a copy of the code being tested is placed
which
is dynamically locked down during execution of the UTEST call.
The system allows any monitor routine
to be tested
as
long
as a
pushdown stack to which AC P
(AC17) points is set up whenever the
routine is called.
After execution of the .UTCLR function, the bit map is changed
to
reflect
the instructions that werE' actually executed during the test.
If a bit is on in the map, the corresponding instruction was executed.
If
a
bit
is off,
the corresponding instruction was not executed.
Generates an illegal instruction interrupt on error conditions below.

3-479

TOPS-20 MONITOR CALLS
(UTEST)

UTEST ERROR MNEMONICS:
CAPX3:

WHEEL capability required

UTSTXl:

Invalid function code

UTSTX2 :

Area of code too large to test

UTSTX3:

UTEST facility in use by another process

3-480

TOPS-20 MONITOR CALLS
(UTFRK)

UTFRK

JSVS

323

Resumes the execution of a process that is suspended because of a
monitor call intercept. The instruction where the execution resumes
depends on the current PC word of the suspended process.
To prevent
the suspended process from executing the call, the superior process
handling the intercept can change the PC word (via the SFORK or SFRKV
call).
Then on execution of the UTFRK call, the suspended process
continues at the new PC.
If the superior process handling the
intercept does not change the PC word of the suspended process, then
the next superior process intercepting that particular monitor call
will receive the interrupt.
See the description of the TFORK JSYS
monitor call intercept facility.

for

more

information

on

the

ACCEPTS IN ACl:

flag bits in the left half, and process handle in the
right half

RETURNS

always

+1:

The flag bit that can be given in ACI is as follows:
Bit

Symbol

Meaning

o

UT%TRP

Cause a failure return for the
suspended
process.
This return will be either the
generation of an illegal instruction interrupt
or
the
processing of an ERJMP or ERCAL
instruction.

The UTFRK monitor call is a no-op if
1.

The process handle given is valid but the process specified
is not suspended because of a monitor call intercept.

2.

The caller is not one of the processes monitoring the
suspended process and therefore is not permitted to resume
the process.

Generates an illegal instruction interrupt on error conditions below.
UTFRK ERROR MNEMONICS:
FRKHXI:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8 :

Illegal to manipulate an execute-only process

3-4Bl

TOPS-20 MONITOR CALLS
(VACCT)

JSVS

VACCT

566

Verifies accounts by validating the supplied
user.
ACCEPTS IN ACl:
AC2:
RETURNS

+1:

account

for

the

given

36-bit user number, 36-bit directory number, or -1 to
validate the account for the current user
byte pointer to account string
always, with updated pointer in AC2

Generates an illegal instruction interrupt on error conditions below.
VACCT ERROR MNEMONICS:
VACCXO:

Invalid account

VACCXl:

Account string exceeds 39 characters

VACCX2:

Account has expired

MONX02:

Insufficient system resources

DELFX6:

Internal format of directory is incorrect

DIRXl:

Invalid directory number

DIRX3:

Internal format of directory is incorrect

STRXOl:

Structure is not mounted

OPNX9 :

Invalid simultaneous access

OPNX16:

File has bad index block

3-482

(JSB full)

TOPS-20 MONITOR CALLS
(WAIT)

WAIT

JSYS

306

Dismisses the current process indefinitely and does
not
return.
If
the software interrupt system is enabled for this process, the process
can be interrupted out of the wait state.
Upon execution of
a DEBRK
call,
the process continues to wait until the next interrupt unless
the interrupt routine changes the PC word.
In this case, the process
resumes execution at
the new PC location.
If the interrupt routine
changes the PC word, it must set the user-mode bit (bit 5) of the
PC
word.
(Refer to Section 2.6.7.)

3-4B3

TOPS-20 MONITOR CALLS
(WFORK)

WFORK

JSVS

163

an
inferior process to
Causes the current process
to wait for
terminate
(voluntarily or
involuntarily).
A process is considered
.RFFPT
(refer
to RFSTS
terminated if its state is either .RFHLT or
JSYS for a description of process status).
ACCEPTS IN ACl:

inferior process handle, or -4 in the right half
wait
for
anyone of the
inferior processes
terminate

RETURNS

always,
when
terminates

+1:

one

of

the

specified

This call returns immediately if the specified process or one
inferior processes has already terminated.

to
to

processes
of

the

Generates an illegal instruction interrupt on error conditions below.
WFORK ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipulate a superior process

3-484

TOPS-20 MONITOR CALLS
(WILD%)

JSYS

565

Compares a possibly wild string (one containing wild-card characters)
against a
non-wild
string
to see
if
the latter matches the wild
string.
For example, "AND" would be a legal match for the wild string
"A*D".
Likewise
"AND"
would be a legal match for the wild string
"A%%".
The WILD% JSYS will
also compare a
possibly wild
file
specification with a non-wild file specification.
(See Section 2.2.3
for a description of wild-card characters.)

ACCEPTS IN ACl:

RETURNS

flags in the left half, function in the right half

AC2:

wild argument - JFN or byte pointer to string

AC3:

non-wild argument - JFN or byte pointer to string

+1:

always, with information returned in ACI.

The available functions are as follows:
Code

Symbol

o

.WLSTR

Meaning
Compare a
non-wild
string
against a
wild
string.
AC2 contains a byte pointer to a wild
string and AC3 contains a
byte pointer
to a
non-wild string.
By default, the comparison is
made without regard to what kind of characters
the strings contain.
Thus tabs, spaces, and
carriage returns, for example, are treated just
as
letters are.
The following flag can be set
in ACl:
BO(WL%LCD)

Lower case characters are
to be
treated
as distinct
from upper
case Jetters.
If this bit is not
set,
a lower case character will
match the corresponding
upper
case character.

On
return,
ACI contains
zero
if a
match
the
following flags if no match
occurred,
or
occurred:
BO(WL%NOM)

If set, this bit
indicates
that
the non-wild string did not match
the wild str ing.

Bl (WL%ABR)

If set, this bit
indicates that
the
non-wild
string
is not
matched, but is an abbreviation
of
the wild string.
If this bit
is set,
it
implies that
bit
WL%NOM is also set.

3-485

TOPS-20 MONITOR CALLS
(WILD% )

Code
1

Meaning

Symbol
.WLJFN

Compare a non-wild file specification against a
wild file specification.
AC2 contains a JFN
with flags (as returned by GTJFN) for the wild
file and AC3 contains a JFN (without flags) for
the non-wild file.
On return, ACI contains
zero if a match occurred.
Otherwise, the
following flags are returned
(in ACl)
to
indicate which parts of the file specification
do not match:
Bl(WL%DEV)
B2 (WL%DIR)
B3 (WL%NAM)
B4(WL%EXT)
B5(WL%GEN)

Device field does not match
Directory field does not match
Name field does not match
File type does not match
Generation number does not match

If a parse-only JFN is given (see section 2.2.3),
and one of the
fields is not specified
(such as a file name), that field will be
treated as a null field.
Thus the filenames PS:FOO.BAR.3 and
PS:.BAR.3 will not match.
WILD% ERROR MNEMONICS:
DESX3:

JFN is not assigned

RDTXl:

Invalid string pointer

ARGX02:

Invalid function

ARGX22:

Invalid flags

3-486

TOPS-20 MONITOR CALLS
(XGSEV% )

JSVS

614

Gets an extended special entry vector that has been set to allow use
of TOPS-IO Compatibility and RMS entry vectors in non-zero sections.
ACCEPTS IN ACl:

vector type code"fork handle

RETURNS

always, with length of entry vector in AC2, and flags
in bits 0-5 of AC3, address of entry vector in bits
6-35 of AC3.

+1:

Generates an illegal instruction trap on error return.
See XSSEV% for a list of vector type codes.
Flags returned in bits 0-5 of AC3 are the same
XSSEV%.

as

those

listed

for

XGSEV% ERROR MNEMONICS
XSEVXl:

Illegal vector type

TOPS-20 Version 5

3-487

April 1982

TOPS-20 MONITOR CALLS
(XGTPW%)

JSYS

612

Returns the page-fail words.
This monitor call allows
retrieve information about a previous page-fail trap.
ACCEPTS IN ACl:
AC2:

RETURNS

a

program

to

process handle
address of block in which to return data.
The first
word of the data block must contain the number of
words in the argument block.
The other words of the
data block should contain zero.

+1:

always, with page-fail
block

data

returned

in

the

data

The data block has the following format:

=======================================================
Length of the data block, including this word
===============================================:========

page-fail flags
Address that referenced the page

=======================================================
MUUO opcode & AC
30-bit Effective address of the MUUO
=======================================================

BO(PF%USR)
Bl (PF%WTF)

page failure on a user-mode reference
page failure on a write reference

This information allows a program to determine the exact
cause of a
memory trap and
the effective virtual address that caused the trap.
This information is sufficient to enable the program to continue,
if
desired, when the cause of the trap has been removed.
Generates an illegal instruction interrupt on error conditions below.
GTRPW ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

IlLegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

TOPS-20 Version 5

3-488

April 1982

TOPS-20 MONITOR CALLS
(XGVEC!~)

JSVS

606

The process can be
Returns the entry vector of the specified process.
(Refer to Section
one
that
runs
in one or more sections of memory.
2.7.3.)
ACCEPTS IN ACl:

process handle

RETURNS

always, with length of
the entry
address of the entry vector in AC3

+1:

vector

The XSVEC% monitor call can be used to set the entry
process that runs in one or more sections of memory.
Generates an illegal instruction
conditions:

interrupt

on

the

in

vector

following

AC2,
of

a

error

XGVEC% ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2:

Illegal to manipUlate a superior process

FRKHX3:

Invalid use of multiple process handle

TOPS-20 Version 5

3-489

April 1982

TOPS-20 MONITOR CALLS
(XRIR%)

JSYS

601

Reads the addresses of the channel and priority level tables for
the
specified
process.
(Refer to Section 2.6.3.) These addresses must be
set with the XSIR% monitor call.
ACCEPTS IN ACl:
AC2:

process handle

RETURNS

+1:

address at which to begin the argument block
always.
The argument block contains the
stored in the Process Storage Block.

information

The format of the returned argument block is as follows:

========================================================,
Length of the argument block, including this word
Address of the interrupt level table
Address of the channel table
To see the format of the channel and interrupt level tables, refer
Section 2.6.3.

TOPS-20 Version 5

3-490

to

April 1982

TOPS-20 MONITOR CALLS
(XRMAP% )

JSVS
Acquires a handle on a page in
allowed for that page.
ACCEPTS IN ACl:

process

process handle in the left
right half

to

determine

half,

and

the

access

zero

in

the

address of the argument block

AC2:

RETURNS

a

611

+1:

always, with a handle on the page in word 1 of the
returned data block, and access information in word
2. The handle in word 1 is a process/file designator
in the left half and a page number in the right half.

The argument block addressed by AC2 has the following format:

!=======================================================
!

Length of the argument block, including this word

!=======================================================
!

number of pages on which to return data

!

number of the first page in this group

!-----------------------------------------------------,-!------------------------------------------------------address at which to return the data block

!=======================================================

\
\
\

\
\

\

=======================================================!

number of pages in this group on which to return data !

-------------------------------------------------------!
number of the first page in this group

-------------------------------------------------------!
address at which to return the data block

=======================================================!

The number of words in the argument block is three times the number of
groups of pages for which you want access data, plus one. Each group
of pages requires three arguments:
the number of pages in the group,
the number of the first page in the group, and the address at which
the monitor is to return the access data.
Note that the address to which the monitor returns data should be in a
section of memory that already exists.
The access information returned for each group of pages specified in
the argument block is the following:
B2(RM%RD)
B3 (RM%WR)
B4(RM%EX)
B5(RM%PEX)
B9(RM%CPY)

read access allowed
write access allowed
execute access allowed
page exists
copy-an-write access

XRMAP% returns a -1 for each page specified in the argument block that
does not exist.
It also returns a zero flag word for each such page.
Generates an illegal instruction interrupt on error conditions below.

TOPS-20 Version 5

3-491

April 1982

TOPS-20 MONITOR CALLS
(XRMAP% )

I

XRMAP% ERROR MNEMONICS:
FRKHXl:

Invalid process handle

ARGX17:

Invalid argument block length

TOPS-20 Version 5

3-492

April 1982

TOPS-20 MONITOR CALLS
(XSFRK%)

JSYS

605

Starts the specified process in a non-zero section of memory. If the
process is frozen, the XSFRK% call changes the PC but does not resume
the process. The RFORK call must be used to resume execution of the
process.
ACCEPTS IN ACl:

flags"process handle
Flags:
SF%CON (lBO)

RETURNS

continue a process that has halted.
If SF%CON is set, the address in AC3
is ignored and the process continues
from where it was halted.

AC2:

PC flags in the left half, 0 in the right half

AC3:

address to which this call is to set the PC

+1:

always

The SFRKV monitor call can be used to
position in its entry vector.

start

a

process

at

a

given

Generates an illegal instruction interrupt on error conditions below.
XSFRK% ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3:

Invalid use of multiple process handle

FRKHX5:

Process has not been started

FRKHX8:

Illegal to manipulate an execute-only process

TOPS-20 Version 5

3-493

April 1982

TOPS-20 MONITOR CALLS
(XSIR%)

JSYS

602

Sets the addresses of the channel and priority level
tables for
the
specified process.
(Refer to Section 2.6.3.) This process can run in
one or more sections of memory.
ACCEPTS IN ACI:
AC2:
RETURNS

+1:

process

h~ndle

address of the argument block
always.
The addresses
in the argument
stored in the Process Storage Block.

block

are

The format of the argument block is as follows:
========================================================

Length of the argument block, including this word
Address of the interrupt level table
Address of the channel table
========================================================

To see the format of the channel and interrupt level tables, refer
Section 2.6.3.

to

If the contents of the tables are changed after execution of the XSIR%
call, the new contents will be used on the next interrupt.
The XRIR% monitor call can be used to obtain the table
with the XSIR% monitor call.

addresses

set

Generates an illegal instruction interrupt on error conditions below.
XSIR% ERROR MNEMONICS:
ARGX04:

Argument block too small

ARGX05:

Argument block too long

SIRXl:

Table address is not greater than 20

XSIRX2:

Level table crosses section boundary

FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate a superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8:

Illegal to manipulate an execute-only process

TOPS-20 Version 5

3-494

April 1982

TOPS-20 MONITOR CALLS
(XSSEV% )

JSYS

613

Allows setting of extended special entry vector for use with
Compatibility and RMS entry vectors in non-zero sections.
ACCEPTS IN ACl:

RETURNS

TOPS-IO

vector type code, ,fork handle

AC2:

length of entry vector

AC3 :

flags in bits 0-5, address of entry
6-35

+1:

vector

in

bits

always

In order to be called
from any section,
the called program must
provide extended
format
PC and UUO words.
A flag
in the call
specifies whether the program expects new or old
format words.
Old
format words should only be used for old versions of the program still
running in Section o.
The vector type codes supplied in the left half of ACI are as follows:
Code

a
1

Symbol

Meaning

.XSEVC
.XSEVD

TOPS-IO Compatibility
RMS

The flags set in bits 0-5 of AC3 are:
Flag

Symbol

Meaning

Bl

XS%EEV

Extended entry vector.
If this bit
is on,
the entry vector points to a 2-word extended
PC and to an extended format
UUO word.
If
this bit
is off, the entry vector points to
old format PC and UUO words.

XSSEV% ERROR MNEMONICS:
XSEVXl:

Illegal entry vector type

XSEVX2:

Invalid entry vector length

TOPS-20 Version 5

3-495

April 1982

TOPS-20 MONITOR CALLS
(XSVEC%)

JSVS

607

Sets or clears the entry vector of the specified process..
The process
can be one that
runs in one or more sections of memory.
(Refer to
Section 2.7.3.)
ACCEPTS IN ACl:

RETURNS

process handle

AC2:

length of the entry vector, or 0

AC3:

address at which the entry vector starts

+1:

always

A zero in AC2 clears the process entry vector.
The XGVEC% monitor call can be used to obtain the entry vector of
process.

the

Generates an illegal instruction interrupt on error conditions below.
XSVEC% ERROR MNEMONICS:
FRKHXl:

Invalid process handle

FRKHX2 :

Illegal to manipulate superior process

FRKHX3 :

Invalid use of multiple process handle

FRKHX8 :

Illegal to manipulate an execute-only process

SEVEXl:

Entry vector length is not less than 1000

TOPS-20 Version 5

3-496

April 1982

APPENDIX A
ASCII, SIXBIT, AND EBCDIC COLLATING SEQUENCES AND CONVERSIONS

Table A-I shows the ASCII and SIXBIT collating sequences and the
conversions from ASCII to EBCDIC.
If the ASCII character does not
convert to the same character in EBCDIC, the EBCDIC character is shown
in parentheses next to the EBCDIC code. Note that the first and last
32 characters do not exist in SIXBIT. Also,
the characters in the
first column of page A-I (NUL, SOH, STX, and so forth) are control
characters, which are nonprinting.
Table A.-1
ASCII and SIXBIT Collating Sequence and Conversion to EBCDIC

Character
NUL
SOH
STX
ETX
EOT
ENQ
ACK
BEL
BS
HT
LF
VT
FF
CR
SO
SI
DLE
DC1
DC2
DC3
DC4
NAK
SYN
ETB
CAN
EM
SUB
ESC
FS
GS
RS
US

ASCII
7-bit

EBCDIC
9-bit

000
001
002
003
004
005
006
007
010
011
012
013
014
015
016
017
020
021
022
023
024
025
026
027
030
031
032
033
034
035
036
037

000
001*
002*
003*
067
055*
056*
057*
026
005
045
013*
014*
025* (NL)
006*(LC)
066*(UC)
044*(BYP)
024*(R.ES)
064*(PN)
065*(RS)
004*(PF)
075*
027* (IL)
046*(EOB)
052* (CM)
031*
032* (CC)
047*(PRE)
023*(TM)
041*(50S)
040*(DS)
042* (F'S)

Character

SIXBIT

Space

00
01
02
03
04
05
06
07
10
11
12
13
14
15
16
17
20
21
22
23
24
25
26
27
30
31
32
33
34
35
36
37

"
#
$
%
&

(
)

*

+

/

o

1
2
3
4
5
6
7
8
9

<

>
?

A-I

ASCII
7-bit

EBCDIC
9-bit

040
041
042
043
044
045
046
047
050
051
052
053
054
055
056
057
060
061
062
063
064
065
066
067
070
071
072
073
074
075
076
077

100
132
177
173
133
154
120
175
115
135
134
116
153
140
113
141
360
361
362
363
364
365
366
367
370
371
172
136
114
176
156
157

ASCII, SIXBIT, AND EBCDIC COLLATING SEQUENCES AND CONVERSIONS

Table A-I (Cont.)
ASCII and SIXBIT Collating Sequence and Conversion to EBCDIC

Character

SIXBIT

@

40
41
42
43
44
45
46
47
50
51
52
53
54
55
56
57
60
61
62
63
64
65
66
67
70
71
72
73
74
75
76
77

A
B

C
D
E
F
G
H

I
J

K
L
M
N
0
p
Q

R

S
T
U
V
W

X

y
Z
[

\
]

ASCII
7-bit

EBCDIC
9-bit

100
101
102
103
104
105
106
107
110
III
112
113
114
115
116
117
120
121
122
123
124
125
126
127
130
131
132
133
134
135
136
137

174
301
302
303
304
305
306
307
310
311
321
322
323
324
325
326
327
330
331
342
343
344
345
346
347
350
351
255 1
340
275
137
155

Character

#
a
b
c
d
e
f
g
h
i
j

k
1
m
n
0

P

q
r
s
t
u
v
w

x
Y
z
{

I
}

Delete

ASCII
7-bit

EBCDIC
9-bit

140
141
142
143
144
145
146
147
150
151
152
153
154
155
156
157
160
161
162
163
164
165
166
167
170
171
172
173
174
175
176
177

171
201
202
203
204
205
206
207
210
211
221
222
223
224
225
226
227
230
231
242
243
244
245
246
247
250
251
300
117
320
241
007

1

These EBCDIC codes either have no equivalent in the ASCII or SIXBIT
character sets,
or are referred
to by different names.
They are
converted
to the
indicated ASCII characters to preserve
their
uniqueness if the ASCII character is converted back to EBCDIC.
A-2

ASCII, SIXBIT, AND EBCDIC COLLATING SEQUENCES AND CONVERSIONS

Table A-2 shows the EBCDIC collating sequence and the conversion
EBCDIC to ASCII.

from

Table A-2
EBCDIC Collating Sequence and Conversion to ASCII
EBDIC
code

EBCDIC
character

ASCII
code

000
001
002
003
004
005
006
007

NUL
SOH
STX
ETX
PF
HT
LC
Delete

000
001
002
003
024
011
016
1.77

NUL
SOH
STX
ETX
DC4
HT
SO
Delete

050
051
052
053
054
055
056
057

010
011
012
013
014
015
016
017

\

SMM
VT
FF
CR
SO
SI

134
134
134
013
014
134
134
134

060
061
-62
063
064
065
066
067

020
021
022
023
024
025
026
027

DLE
DC1
DC2
TM
RES
NL
BS
IL

134
134
134
034
021
015
010
026

\

030
031
032
033
034
035
036
037

CAN
EM
CC
CUI
IFS
IGS
IRS
IUS

134
031
032
134
134
134
134
134

\

040
041
042
043
044
045
046
047

DS
SOS
FS

036
035
037
134
020
012
027
033

RS
GS
US

BYP
LF
ETB
ESC

i\SCI I
character

EBCDIC EBCDIC
code character

\

\

VT
FF

\
\

\

070
071
072
073
074
075
076
077

\
\
FS
DC1
CR
BS
SYN

100
101
102
103
104
105
106
107

EM
SUB

\
\
\

\
\

110
III
112
113
114
115
116
J 17

\

DLE
LF
ETB
ESC

A-]

ASCII
code

ASCII
character

\

ENQ
ACK
BEL

134
134
030
134
134
005
006
007

\

PN
RS
UC
EOT

134
134
134
134
022
023
017
004

CU3
DC4
NAK
SUB

134
134
134
134
134
025
134
134

SM
CUZ

Space

CENT

<
(

+

I

040
134
134
134
134
134
134
134
134
134
134
056
074
050
053
174

\
CAN

\
\

ENQ
ACK
BEL

\

\

\
DC2
DC3
SI
EOT

\
\
\
\
\
NAK

\
\
Space

\
\
\
\

\
\

\
\
\

\

<
(

+

I

ASCII, SIXBIT, AND EBCDIC COLLATING SEQUENCES AND CONVERSIONS

Table A-2 (Cont. )
EBCDIC Collating Sequence and Conversion to ASCII
EBCDIC
code

EBCDIC
character

120
121
122
123
124
125
126
127
130
131
132
133
134
135
136
137
140
141
142
143
144
145
146
147
150
151
152
153
154
155
156
157
160
161
162
163
164
165
166
167

&

$

*

\

,
%

>
?

ASCII
code
046
134
134
134
134
134
134
134
134
134
041
044
052
051
073
137
055
057
134
134
134
134
134
134

ASCII
character

EBCDIC EBCDIC
code character
170
171
172
173
174
175
176
177

&

\\

\

\

\

\

\

\

\

\

\

\

\

\

200
201
202
203
204
205
206
207

\

\

\

!

S

*
\

~
\

I

\

\

210
211
212
213
214
215
216
217

I
\

\
\\

\
\\
\\

134
134
134
054
045
137
076
077

\

134
134
134
134
134
134
134
134

\

220
221
222
223
224
225
226
227

\
\\
~)

>
?

230
231
232
233
234
235
236
237

\
\
\
\

\
\
\

A-4

#
@

,

"
a
b
c
d
e
f

g
h
i

j
k

1
m

n
0

P

q
r

ASCII
code

ASCII
character

134
140
072
043
100
47
075
042

\

134
141
142
143
144
145
146
147

\

150
L51
134
134
134
134
134
134
134
152
153
154
155
L56
157
160
161
162
134
134
134
134
134
134

#
@

"
a
b
c
d
e
f

g
h
i

\
\
\
\
\

\
\
j
k

1
m

n
0

p

q
r

\
\
\
\
\
\

ASCII, SIXBIT r AND EBCDIC COLLATING SEQUENCES AND CONVERSIONS

Table A-2 {Cont.)
EBCDIC Collating Sequence and Conversion to ASCII
EBCDIC
code
240
241
242
243
244
245
246
247
250
251
252
253
254
255
256
257

EBCDIC
character

s
t
u
v
w

x
Y

z

ASCII
code

i\SCI I
character

134
176
163
164
165
166
167
170

\

171
172
134
134
134
133
134
134

Y

260
261
262
263
264
265
266
267

175
134
134
134
134
134
134
134

270
271
272
273
274
275
276
277

134
134
134
134
134
135
134
134

300
301
302
303
304
305
306
307
360
361
362
363
364
365
366
367

F
G

173
101
102
103
104
105
106
107

0
1
2
3
4
5
6
7

060
061
062
063
064
065
066
067

A
B
C
D
E

EBCDIC EBCDIC
code character
310
311
312
313
314
315
316
317

s
t
u
v
w

x

320
321
322
323
324
325
326
327

z

\
\
\
[

\
\

330
331
332
333
334
335
336
337

\
\
\

\
\
\

\

340
341
342
343
344
345
346
347

\
\

\
\
\
]

\
\

H

I

J
K

L
M
N
0
P
Q

R

S
T
U
V
W
X

y

F
G

350
351
352
353
354
355
356
357

1
1
2
3
4
5
6
7

370
371
372
373
374
375
376
377

8
9

{

A
B
C
D
E

A-5

Z

ASCII
code
110
110
134
134
134
134
134
134
175
112
113
114
115
116
117
120
121
122
134
134
134
134
134
134
134
134
123
124
125
126
127
130
131
132
134
134
134
134
134
134
070
071
134
134
134
134
134
134

ASCII
character
H

I
\
\

\
\

\

\
}

J
K

L
M
N
0
P
Q

R

\
\
\

\
\
\

\
\
S
T
U
V
W
X

y
Z

\

\
\

\
\
\
8
9

\
\
\
\

\
\

APPENDIX B

MONSYM

B-1

MONSYM

UPD ID= 74, MONSYM.MAC.78,

22-Jan-82 16:08:17 by MURPHY

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;

;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981 BY DIGITAL EQUIPMENT CORPORATION,
;MAYNARD, MASS.
SEARCH MACSYM

;SOME SYMBOLS ARE DEFINED VIA MACROS

;MONITOR CALL DEFINITIONS AND ERROR MNEMONICS
;NOTE:
THE FOLLOWING SYMBOLS ARE RESERVED:
SYMBOL

RESERVED BY

.OF???
.SZ???
.PS???

RMS-20
RMS-20
RMS-20

;MACRO TO DEFINE JSYS NAMES
DEFINE DEFJS (NAME,NUM,SECT,XTRA,OLDNEW)<
OPDEF NAME'% [104B8+NUM]
IFDEF .PSECT,<
INTERN NAME'%>
IFIDN ,,<
OPDEF NAME [104B8+NUM]
IFDEF .PSECT,<
INTERN NAME»>
SALL
IFNDEF REL,
IFE REL,<
UNIVERSAL MONSYM>
IFN REL,<
TITLE MONSYM
IFNDEF .PSECT,<
.DIRECT .XTABM>

;ASSEMBLING REL IF NON-O

>

B-2

MONSYM

iJSYS DEFINITIONS WITH 'NIM' AS A FOURTH ARGUMENT ARE CLASSIFIED
AS 'NOT IN MONITOR'

i

DEFINE JSLIST <
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

LOGIN,l,MSECl"OLD
CRJOB,2,MSECl"OLD
LGOUT,3,MSECl"OLD
CACCT,4,MSECl"OLD

EFACT,5,MSECl,~IM,OLD

SMON,6,MSECl"OLD
TMON,7,MSECl"OLD
GETAB,lO,MSECl"OLD
ERSTR,ll,MSECl"OLD
GETER,12,MSECl"OLD
GJINF,13,MSECl, ,OLD
TIME,14,MSECl, ,OLD
RUNTM,15,MSECl"OLD
SYSGT,16,MSECl, ,OLD
GNJFN,17,MSECl"OLD
GTJFN,20,MSECl"OLD
OPENF,21,MSECl"OLD
CLOSF,22,MSECl"OLD
RLJFN,23,MSECl"OLD
GTSTS,24,MSECl"OLD
STSTS,25,MSECl, ,OLD
DELF,26,MSECl"OLD
SFPTR,27,MSECl"OLD
JFNS,30,MSECl"OLD
FFFFP,31,MSECl, ,OLD
RDDIR,32,MSECl"OLD
CPRTF,33"NIM,OLD
CLZFF,34,MSECl"OLD
RNAMF,35,MSECl"OLD
SIZEF,36,MSECl"OLD
GACTF,37,MSECl"OLD
STDIR,40,MSECl"OLD
DIRST,41,MSECl"OLD
BKJFN,42,MSECl, ,OLD
RFPTR,43,MSECl"OLD
CNDIR,44"NIM,OLD
RFBSZ,45,MSECl"OLD
SFBSZ,46,MSECl, ,OLD
SWJFN,47,MSECl"OLD
BIN,50,MSECl"OLD
BOUT,51,MSECl"OLD
SIN,52,MSECl"OLD
SOUT,53,MSECl"OLD
RIN,54,MSECl"OLD
ROUT,55,MSECl"OLD
PMAP,56,MSECl, ,OLD
RPACS,57,MSECl"OLD
SPACS,60,MSECl"OLD
RMAP,61,MSECl"OLD
SACTF,62,MSECl"OLD
GTFDB,63,MSECl"OLD
CHFDB,64,MSECl"OLD
DUMPI,65,MSECl"OLD
DUMPO,66,MSECl"OLD
DELDF,67,MSECl, ,OLD
ASND,70,MSECl, ,OLD
RELD,71,MSECl"OLD
CSYNO,72"NIM,OLD

iOBSOLETE"OLD

iOBSOLETE, ,OLD

B-3

MONSYM

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

PBIN,73,MSECl"OLD
PBOUT,74,MSECl, ,OLD
PSIN,75"NIM,OLD
PSOUT,76,MSECl, ,OLD
MTOPR,77,MSECl"OLD
CFIBF,lOO,MSECl"OLD
CFOBF,lOl,MSECl"OLD
SIBE,102,MSECl"OLD
SOBE,103,MSECl"OLD
DOBE,104,MSECl, ,OLD
GTABS,105,MSECl"OLD
STABS,106,MSECl"OLD
RFMOD,107,MSECl"OLD
SFMOD,11O,MSEC1"OLD
RFPOS,lll,MSECl"OLD
RFCOC,112,MSEC1, ,OLD
SFCOC,113,MSEC1, ,OLD
STI,114,MSEC1, ,OLD
DTACH,115,MSEC1, ,OLD
ATACH,116,MSEC1, ,OLD
DVCHR,117,MSEC1, ,OLD
STDEV,120,MSECl, ,OLD
DEVST,121,MSEC1, ,OLD
MOUNT,122,MSEC1"OLD
DSMNT, 123, , ,OLD
INIDR,124,MSEC1, ,OLD
SIR,125,MSEC1"OLD
EIR,126,MSECl, ,OLD
SKPIR,127,MSEC1"OLD
DIR,130,MSEC1"OLD
AIC,131,MSEC1"OLD
IIC,132,MSECl"OLD
DIC,133,MSEC1, ,OLD
RCM,134,MSEC1"OLD
RWM,135,MSEC1"OLD
DEBRK,136,MSECl"OLD
ATI,137,MSEC1, ,OLD
DTI,140,MSEC1"OLD
CIS,141,MSEC1"OLD
SIRCM,142,MSEC1"OLD
RIRCM,143,MSEC1, ,OLD
RIR,144,MSECl"OLD
GDSTS,145,MSECl, ,OLD
SDSTS,146,MSEC1, ,OLD
RESET,147,MSEC1"OLD
RPCAP,150,MSECl"OLD
EPCAP,151,MSEC1, ,OLD
CFORK,152,MSEC1, ,OLD
KFORK,153,MSEC1"OLD
FFORK,154,MSEC1"OLD
RFORK,155,MSEC1, ,OLD
RFSTS,156,MSEC1, ,OLD
SFORK,157,MSEC1"OLD
SFACS,160,MSEC1"OLD
RFACS,161,MSEC1"OLD
HFORK,162,MSEC1"OLD
WFORK,163,MSECl, ,OLD
GFRKH,164,MSEC1"OLD
RFRKH,165,MSEC1"OLD
GFRKS,166,MSEC1"OLD
DISMS,167,MSEC1"OLD
HALTF,170,MSEC1, ,OLD
GTRPW,171,MSEC1, ,OLD

iOBSOLETE
iOBSOLETE

iOBSOLETE
iOBSOLETE
iOBSOLETE

B-4

....,-

MONSYM

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

GTRPI,172,MSECl"OLD
RTIW,173,MSECl, ,OLD
STIW,174,MSECl"OLD
SOBF,175,MSECl"OLD
RWSET,176,MSECl"OLD
GETNM,177,MSECl"OLD
GET,200,MSECl"OLD
SFRKV,201,MSECl"OLD
SAVE,202,MSECl"OLD
SSAVE,203,MSECl"OLD
SEVEC,204,MSECl"OLD
GEVEC,205,MSECl"OLD
GPJFN,206,MSECl, ,OLD
SPJFN,207,MSECl"OLD
SETNM,210,MSECl"OLD
FFUFP,211,MSECl"OLD
DIBE,212,MSECl, ,OLD
FDFRE,213"NIM,OLD
GDSKC,214,MSECl"OLD
LITES,215,MSECl"OLD
TLINK,216,MSECl"OLD
STPAR,217,MSECl"OLD
ODTIM,220,MSECl"OLD
IDTIM,221,MSECl"OLD
ODCNV,222,MSECl"OLD
IDCNV,223,MSECl"OLD
NOUT,224,MSECl"OLD
NIN,225,MSECl"OLD
STAD,226,MSECl"OLD
GTAD,227,MSECl"OLD
ODTNC,230,MSECl"OLD
IDTNC,231,MSECl"OLD
FLIN,232,MSECl"OLD
FLOUT,233,MSECl"OLD
DFIN,234,MSECl"OLD
DFOUT,235,MSECl"OLD

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

CRDIR,240,MSECl"OLD
GTDIR,241,MSECl"OLD
DSKOP,242,MSECl"OLD
SPRIW,243,MSECl"OLD
DSKAS,244,MSECl"OLD
SJPRI,245,~SECl, ,OLD
STO,246,MSECl"OLD
ARCF,247,MSECl"OLD
ASNDP,260"NIM,OLD
RELDP,261, ,NIM,OLD
ASNDC,262, ,NIM,OLD
RELDC,263"NIM,OLD
STRDP,264"NIM,OLD
STPDP,265"NIM,OLD
STSDP,266"NIM,OLD
RDSDP,267"NIM,OLD
WATDP,270"NIM,OLD

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

GTNCP,272,MSECl"OLD
GTHST,273,MSECl"OLD
ATNVT,274,MSECl"OLD
CVSKT,275,MSECl"OLD
CVHST,276,MSECl"OLD
FLHST,277,MSECl"OLD

;OBSOLETE

;ARCHIVE SYSTEM JSYS

;TOPS20AN
;TOPS20AN
;TOPS20AN
;TOPS20AN
;TOPS20AN
;TOPS20AN

DEFJS GCVEC,300,MSECl"OLD
B-5

MONSYM

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

SCVEC,301,MSECl, ,OLD
STTYP,302,MSECl, ,OLD
GTTYP,303,MSECl, ,OLD
BPT,304,MSECl"OLD
GTDAL,305,MSECl, ,OLD
WAIT,306,MSECl"OLD
HSYS,307,MSECl, ,OLD
USRIO,310,MSECl, ,OLD
PEEK,311,MSECl"OLD
MSFRK,312,MSECl"OLD
ESOUT,313,MSECl, ,OLD
SPLFK,314,MSECl"OLD
ADVIS,315"NIM,OLD
JOBTM,316"NIM,OLD
DELNF,317,MSECl, ,OLD
SWTCH,320,MSECl"OLD
TFORK,321,MSECl"OLD
RTFRK,322,MSECl, ,OLD
UTFRK,323,MSECl"OLD
SCTTY,324,MSECl, ,OLD

iOBSOLETE

iOBSOLETE

DEFJS SETER,336,MSECl"OLD

B-6

MONSYM

;NEW (NOT IN BBN TENEX) JSYS'S ADDED STARTING AT 500
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

RSCAN,500,MSECl"OLD
HPTIM,501,MSECl"OLD
CRLNM,502,MSECl, ,OLD
INLNM,503,MSECl, ,OLD
LNMST,504,MSECl"OLD
RDTXT,505,MSECl"OLD
SETSN,506,MSECl"OLD
GETJI,507,MSECl"OLD
MSEND,510,MSECl"OLD
MRECV,511,MSECl"OLD
MUTIL,512,MSECl, ,OLD
ENQ,513,MSECl"OLD
DEQ,514,MSECl"OLD
ENQC,515,MSECl, ,OLD
SNOOP,516,MSECl"OLD
SPOOL,517,MSECl"OLD
ALLOC,520,MSECl"OLD
CHKAC,521,MSECl, ,OLD
TIMER,522,MSECl"OLD
RDTTY,523,MSECl"OLD
TEXTI,524,MSECl"OLD
UFPGS,525,MSECl, ,OLD
SFPOS,526,MSECl, ,OLD
SYERR,527,MSECl"OLD
DIAG,530,MSECl"OLD
SINR,531,MSECl, ,OLD
SOUTR,532,MSECl, ,OLD
RFTAD,533,MSECl"OLD
SFTAD,534,MSECl"OLD
TBDEL,535,MSECl"OLD
TBADD,536,MSECl"OLD
TBLUK,537,MSECl"OLD
STCMP,540,MSECl"OLD
SETJB,541,MSECl"OLD
GDVEC,542,MSECl"OLD
SDVEC,543,MSECl, ,OLD
COMND,544,MSECl, ,OLD
PRARG,545,MSECl"OLD
GACCT,546,MSECl"OLD
LPINI,547,MSECl"OLD
GFUST,550,MSECl, ,OLD
SFUST,551,MSECl, ,OLD
ACCES,552,MSECl, ,OLD
RCDIR,553,MSECl, ,OLD
RCUSR,554,MSECl"OLD
MSTR,555,MSECl, ,OLD
STPPN,556,MSECl"OLD
PPNST,557,MSECl"OLD
PMCTL,560,MSECl"OLD

;OBSOLETED BY RDTTY AND TEXTI

PLOCK,561,~SECl"OLD

BOOT,56i,MSECl, ,OLD
UTEST,563,MSECl, ,OLD
USAGE,564,MSECl"OLD
WILD,565,MSECI
VACCT,566,MSECl"OLD
NODE,567,MSECl"OLD
ADBRK,570,MSECl"OLD
SINM,571,MSECI
SOUTM,572,MSECI
SWTRP,573,MSECI
GETOK,574,MSECI
B-7

MONSYM

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

RCVOK,575,MSECI
GIVOK,576,MSECI
SKED,577,MSECI
MTU,600,MSECI
XRIR,601,MSECI
XSIR,602,MSECI
PDVOP,603,MSECI
NTMAN,604,MSECI
XSFRK,605,MSECI
XGVEC,606,MSECI
XSVEC,607,MSECI
RSMAP,610,MSECI
XRMAP,611,MSECI
XGTPW,612,MSECI
XSSEV,613,MSECI
XGSEV,614,MSECI

;SCHEDULER CONTROL JSYS
;MTU JSYS
;EXTENDED RIR
;EXTENDED SIR
~MANIPULATE PROGRAM DATA VECTORS
;DECNET NETWORK MANAGEMENT INTERFACE
;START FORK AT GLOBAL PC
;GET FULL ENTRY VECTOR
;SET FULL ENTRY VECTOR
;READ SECTION MAP
;EXTENDED RMAP
;EXTENDED GET TRAP WORD
;EXTENDED SET SPECIAL ENTRY VECTOR
;EXTENDED GET SPECIAL ENTRY VECTOR

;TEMPORARY JSYS DEFINITIONS
DEFJS
DEFJS
DEFJS
DEFJS

SNDIM,750,MSECl"OLD
RCVIM,751,MSECl, ,OLD
ASNSQ,752,MSECl"OLD
RELSQ,753,MSECl"OLD

DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS
DEFJS

METER,766,MSECI
SMAP,767,MSECI
THIBR,770,MSECl"OLD
TWAKE,771,MSECl"OLD
MRPAC,772,MSECl"OLD
SETPV,773"NIM,OLD
MTALN,774,MSECl"OLD
TTMSG,775,MSECl"OLD
MDDT,777,MSECI

>

;TOPS20AN
;TOPS20AN
;TOPS20AN
;TOPS20AN
;METER JSYS. FOR KL ONLY
;CREATE AND MAP SECTIONS

;;; END OF DEFINE JSLIST

;NOW EXPAND THE JSYS DEFINITIONS

8-8

MONSYM

JSLIST
:ERROR CONDITION INSTRUCTIONS.
:FOLLOWING A JSYS WHICH FAILS.
OPDEF ERJMP [JUMP 16,0]
OPDEF ERCAL [JUMP 17,0]
IFNDEF FOR,<
IFDEF .PSECT,<
INTERN ERJMP,ERCAL

THESE ARE NOP'S UNLESS

IMMEDIATELY

:JUMP ON ERROR
:CALL ON ERROR (SIMULATE PUSHJ 17,ADR)

»

DEFINE GOPDEF (OP,DEF)<
OPDEF OP [DEF]
IFNDEF FOR,<
IFDEF .PSECT,<
INTERN OP»>
THE FOLLOWING OPCODES ARE USED TO PERFORM THE EXTENDED
ADDRESSING FUNCTIONS.
GOPDEF
GOPDEF
GOPDEF
GOPDEF
GOPDEF
GOPDEF

XJRSTF,
XJEN,
XPCW,
XSFM,
XMOVEI,
XHLLI,

:RESTORE FLAGS AND PC
:RESTORE FLAGS,PC AND DISMISS
:EXCHANGE FLAGS AND PC
:SAVE PC FLAGS IN MEMORY
:EXTENDED MOVEI
:INSTRUCTION TO PUT IMMEDIATE ADDRESS IN LH

:OTHER VARIANTS OF JRST
GOPDEF PORTAL,
GOPDEF JRSTF,
GOPDEF JEN,
IFIW==:lBO
EFIW==:O
:THE NO-OPERATION INSTRUCTION

:INSTRUCTION FORMAT INDIRECT WORD
:EXTENDED FORMAT INDIRECT WORD
(MAY CHANGE FROM PROCESSOR TO PROCESSOR)

GOPDEF NOP,
.NODDT NOP
:SPECIAL LOSEG SYMBOLS
.JBHSO==:75
.JBEDV==:112
.EDCNT==:O
.EDHSB==:l
.EDSYM==:2
.EDUSY==:3
.EDHSF==:4

: 0 " HIGHSEG ORIGIN PAGE NUMBER
:POINTER TO EXEC DATA VECTOR
:'EDV'"COUNT (INCLUDES THIS WORD)
:POINTER TO HIDDEN SYMBOL MAP SWITCHING BLOCK
:.JBSYM IN SYMBOL SPACE
:.JBUSY IN SYMBOL SPACE
:POINTER TO SYMBOLS HIDDEN FLAG WORD

B-9

MONSYM

,.*****************************************
iJSYS SPECIFIC ARGUMENTS
:THE FOLLOWING ARE ORDERED ALPHABETICALLY BY JSYS NAME

,.*****************************************

:ACCES - ACCESS A DIRECTORY (E.G., BY CONNECTING)
AC%CON==:lBO
AC%OWN==:lBl
AC%REM==:lB2

iCONNECT TO THE SPECIFIED DIRECTORY
:GAIN OWNERSHIP
:REMOVE OWNERSHIP

:OFFSETS IN ARGUMENT BLOCK
.ACDIR==:O
.ACPSW==:l
.ACJOB==:2

:DIRECTORY DESIGNATOR
:POINTER TO PASSWORD STRING
:JOB NUMBER (-1 FOR SELF)

:ADBRK - Address break JSYS function codes and bits
:FUNCTION CODES
.ABSET==:O
.ABRED==:l
.ABCLR==:2
.ABGAD==:3

iSET USER ADDRESS BREAK
iREAD USER ADDRESS BREAK
iCLEAR USER ADDRESS BREAK
iGET ADDRESS OF TRAPPED INSTRUCTION

iFUNCTION BITS FOR FUNCTION .ABSET
AB%RED==:lBO
AB%WRT==:lBl
AB%XCT==:lB2

iREAD
iWRITE
iEXECUTE

iALLOC JSYS FUNCTION CODES
.ALCAL==:O
i

iALLOCATE A DEVICE

ARCF

.ARRAR==:O
Request file archive (user)
.ARCLR==:O
Clear the request
.ARSET==:l
i Set the request
i
AR%NDL can be specified in AC2, defined elsewhere
.ARRIV==:l
Request file migration (system)
.AREXM==:2
File exempt from migration (system)
.ARRFR==:3
Request file's contents be restored to disk
AR%NMS==:lBO
Request no msg on restoration
AR%WAT==:lBl
Wait for file to be restored to disk
.ARDIS==:4
Clear archive status for file
AR%CRl==:lBO
Clear 1st run info
AR%CR2==:lBl
Clear 2nd run info
.ARSST==:5
Set archive status for file
.AROFL==:O
Flags
AR%Ol==:lBO
Set run 1 info
AR%02==:lBl
Set run 2 info
AR%OFL==:lB2
Flush contents of file
AR%ARC==:lB3
Set FB%ARC (archive the file)
AR%CRQ==:lB4
Clear archive/migration request
.ARTPl==:l
Tape 1 ID
.ARSFl==:2
XWD TSN 1, TFN 1
AR%TSN==:777777B17
Tape saveset number

B-10

MONSYM

AR%TFN==:777777B35
.ARTP2==:3
.ARSF2==:4
iii
AR%TSN==:777777B17
iii
AR%TFN==:777777B35
.ARODT==:5
.ARPSZ==:6
.ARRST==:6
.ARGST==:7
.ARRFL==:lO
.ARNAR==:ll
i

Tape file number
Tape 2 ID
XWD TSN 2, TFN 2
Tape saveset number
Tape file number
Date and time
Number of pages in the file (.ARGST only)
Restore contents to archived file
Get tape info for file (blk as for ARSST)
Retrieve failed
Set/clear resist archive

Function & reason codes for IPCF msgs

.RETM==:O
.RETR==:O
.RETRW==:l
.NOTM==:l
.FLXP==:O
.ACLR==:l

Send retrieve message
Normal retrieve
User waiting for retrieve
Send notification message
Archive file expunged
Archive status cleared

iATNVT

iTOPS20AN

AN%NTP==:lB2

iTOPS20AN iNEW TELNET PROTOCOL

iATACH
AT%CCJ==:lBO
AT%NAT==:lBl
AT%TRM==:lB2
AT%JOB==:777777B35

iAC JOB WHEN ATTACHED

iNO I\TTACH
iATTACH JOB TO TERMINAL IN REGISTER 4

iJOB NUMBER

B-ll

MONSYM

iBOOT

.BTROM==:O
.BTDTE==:O
.BTLDS==:l
.BTERR==:l
.BTSEC==:2
.BTLOD==:2
.BTSMP==:2
.BTFLG==:3
BT%BEL==:lBO
.BTCNT==:4
.BTLPT==:5
.BTDMP==:3
.BTDPT==:5
.BTIPR==:4
.BTPRV==:l
.BTTPR==:5
.BTSTS==:6
.BTCOD==:l
.BTBEL==:7
.BTRMP==:lO
.BTMPT==:5
.BTKML==:ll
.BTKMC==:O
.BTKER==:l
BT%CVE==:lBO
BT%DVE==:lBl
BT%RVE==:lB2
.BTKCC==:2
.BTKCP==:3
.BTKDC==:4
.BTKDP==:5
.BTKRC==:6
.BTKRP==:7
.BTKSA==:lO
BT%KSA==:lBO
.BTKMD==:12
.BTRLC==:13
.BTPRT==:O
BT%ZRO==:lBO
.BTZTM==:l
.BTSCC==:2
.BTSCP==:3
.BTRCC==:4
.BTRCP==:5
.BTTCC==:6
.BTTCP==:7
.BTCLI==:14
.BTLID==:l
.BTCPN==:15
.BTD60==:16
(BT6DTE,O,35,36)
DEFSTR
.BT6DTE==:O
DEFSTR
(BT6ERR,1,35,36)
.BT6ERR==:1

iACTIVATE ROM BOOT
iDTE-20 NUMBER
iLOAD SECONDARY BOOTSTRAP PROGRAM
iERROR FLAGS
iADDRESS OF SECONDARY BOOTSTRAP PROGRAM
iLOAD MEMORY (OBSOLETE)
iSEND MOP MESSAGE
iFLAGS
iSEND TO -11 DOORBELL AFTER SETUP
iNUMBER OF BYTES TO BE TRANSFERRED
iBYTE POINTER TO DATA TO BE LOADED
iDUMP MEMORY
iBYTE POINTER TO DESTINATION OF DUMPED DATA
iINITIALIZE COMMUNICATIONS PROTOCOL
iPROTOCOL VERSION NUMBER
iTERMINATE COMMUNICATIONS PROTOCOL
iRETURN PROTOCOL STATUS
iSTATUS CODE
iWAIT FOR DOORBELL
iREAD MOP MESSAGE
iPOINTER TO DESTINATION FOR MOP MESSAGE
iLOAD KMCll
iKMCll ADDRESS
iERROR FLAGS
iCRAM VERIFY ERROR (RH IS BAD DATA)
iDRAM VERIFY ERROR (RH IS BAD DATA)
iREG VERIFY ERROR (RH IS BAD DATA)
iCOUNT OF CRAM DATA
iPOINTER TO CRAM DATA (16 BIT DATA)
iCOUNT OF DRAM DATA
iPOINTER TO DRAM DATA (8 BIT DATA)
iCOUNT OF REGISTER DATA
iPOINTER TO REGISTER DATA (16 BIT DATA)
iRH IS STARTING ADDRESS
iIS SET RH WANT TO START KMCll
iDUMP KMCll
iRETURN LINE COUNTERS
iPORT NUMBER
iCLEAR COUNTERS AFTER READING
iTIME SINCE COUNTERS HAVE BEEN ZEROED
iSTATUS COUNT COUNT
iSTATUS COUNT POINTER
iRECEIVE COUNT COUNT
iRECEIVE COUNT POINTER
iTRANSMIT COUNT COUNT
iTRANSMIT COUNT POINTER
iCONVERT LINEID TO PORT NUMBER
iPOINTER TO ASCIZ LINE-ID
iCONVERT PORT NUMBER TO LINE-ID
iDN60 PROTOCOL OPERATION
iDTE number
ireturned error flags
iprotoeol flags
iport is busy - sign bitness is used
i in testing
iheader has been queued
ito -11 done for header seen
ithis is a no-data-transfer operation
ithis is a read data type operation
idata has been queued(for write fen)

D6%BSY==:lBO
D6%QHD==:lBl
D6%HDD==:lB2
D6%NDT==:lBJ
D6%RED==:lB4
D6%QDT==:lB5
B-12

MONSYM

D6%DTD==:lB6
D6%RBL==:lB7
D6%RDN==:lB8
D6%DBL==:lB9
D6%DDN==:lBIO
D6%FDN==:lBll

D6%TRS==:lB32
D6%TDT==:lB33

ito -11 done for write data seen
ito -10 doorbell for response header se
ito -10 done for response header seen
ito -10 doorbell for read data seen
ito -10 done for read data seen
ito -10 done for read data was faked
ierror flags
ibad data byte ptr
ill attempted to send read data when
i when none was expected
itimed out waiting for response header
itimed out waiting for read data

D6%TPO==:lB34
D6%NT6==:lB35

itimed out waiting for port to be free
inot a DN60 front end

D6%BDP==:lB30
D6%ARD==:lB31

DEFSTR
(ET6HBC,2,17,18)
.BT6HBC==:2
DEFSTR
(BT6HDR,2,35,18)
.BT6HDR==:2
DEFSTR
(BT6DBC,3,35,36)
.BT6DBC==:3

iDN60 header byte count
iDN60 header address(begins on word)
idata byte count
positive =) write data mode
zero
=) no data transfer
negative =) read data mode
idata byte ptr

DEFSTR
(BT6PTR,4,35,36)
.BT6PTR==:4

ithe following are returned for timing
analysis
itime of request

i

DEFSTR
(BT6TMR,5,35,36)
.BT6TMR==:5
DEFSTR
(BT6TAS,6,35,36)
.BT6TAS==:6
DEFSTR
(BT6THQ, 7 ,35,36)
.BT6THQ==:7
DEFSTR
(BT6TRD,10,35,36)
.BT6TRD==:10
DEFSTR
(BT6TDD, 11 ,35,36)
.BT6TDD==:11
DEFSTR
(BT6TFR,12,35,36)
.BT6TFR==:12
.BTSTA==:16
.BTSSP==:17
.BTPRI==:l
.BTSTP==:20
.BTSDD==:21
.BTMSG==:l
.BTLEN==:2
.BTRDD==:22
. BTSUP==: J_
.BTSDW==:2
.BTCMP==:3
.BTSSF==:4
B~~%CTL==:

.BTCHN==:23
.BTESI==:1

IBO

iTIME DTE ASSIGNED
itime header queued to 11
itime of -10 done for response header
itime of -10 done for data
itime finished request

iSET STATION POLLING STATUS
iSET LINE STARTUP PRIORITY
iPRIORITY VALUE
iSET STATION POLLING PRIORITY
iSEND DDCMP MESSAGE
iADDR OF MESSAGE
iBYTE COUNT OF MESSAGE
;RECEIVE A MESSAGE FROM DDCMP
;STATION CAME UP
iSTATION WENT DOWN
; XMrr COMPLETE
;STARTUP FAILED
iCONTROL MESSAGE
iASSIGN A SOFTWARE INTERRUPT CHANNEL
iCHANNEL NUMBER

iCFORK
CR%MAP==:lBO
CR%CAP==:lBl

iSET MAP FOR NEW FORK TO POINT TO
; THIS PROCESS
;MAKE CAPABILITIES IDENTICAL
B-13

MONSYM

CR%ACS==:lB3
CR%ST==:lB4
CR%PCV==:777777B35

iSET ACS FROM BLOCK
iSTART PROCESS AT PC
iVALUE OF PC

iCHFDB
CF%NUD==:lBO
CF%DSP==:777B17
CF%JFN==:777777B35

iNO UPDATE DIRECTORY
iFDB DISPLACEMENT
iJFN

B-14

MONSYM

iCHKAC JSYS DEFINITIONS
iCHKAC FLAG DEFINITIONS
CK%JFN==:lBO

iJFN IS GIVEN AS AN ARGUMENT

iCHKAC ARGUMENT BLOCK OFFSET VALUES
.CKAAC==:O
.CKALD==:l
.CKACD==:2
.CKAEC==:3
.CKAUD==:4
.CKAPR==:5

iACCESS CODE
iLOGGED IN USER NUMBER OF USER
iCONNECTED DIR NUMBER OF USER
iENABLED CAPABILITIES OF USER BEING CHKID
iDIR NUMBER OF DIRECTORY CONTAINING FILE
iPROTECTION OF FILE

iCHKAC ACCESS CODES
.CKARD==:O
.CKAWT==:l
.CKAWR==:l
.CKAEX==:2
.CKAAP==:3
.CKADL==:4
.CKADR==:6
.CKAOF==:7
.CKACN==:lO
.CKACF==:ll

iREAD AN EXISTING FILE
iWRITE AN EXISTING FILE
i (ANOTHER NAME FOR ABOVE)
iEXECUTE AN EXISTING FILE
iAPPEND TO AN EXISTING FILE
iGET DIR LISTING OF AN EXISTING FILE
iREAD THE DIRECTORY
iOPEN FILES IN DIR (NOT IMPLEMENTED)
iCONNECT TO A DIR
iCREATE FILES IN DIR

iCLOSF
CO%NRJ==:lBO
CO%WCL==:lB1
CO%JFN==:777777B35

iNO RELEASE JFN
iTOPS20AN iWAIT UNTIL MATCHING CLS IS RECEIVED
iJFN

iCLZFF
CZ%NIF==:lBO
CZ%NSF==:lB1
CZ %NRJ==: 1B2
CZ%NCL==:lB3
CZ%UNR==:lB4
CZ%ARJ==:lB5
CZ%ABT==:lB6
CZ%NUD==:lB7
CZ%PRH==:777777B35

iNO INFERIOR FORK FILES
iNO SELF FORK FILES
iNO RELEASE JFN
iNO CLOSE FILE
iUNRESTRICT
iALWAYS RELEASE JFN
iABORT
iNO UPDATE DIRECTORY
iPROCESS HANDLE

B-15

MONSYM

;CNDIR
CN%CKP==:lBO
CN%NOC==:lB1
CN%JOB==:lB2
CN%DIR==:777777B35

;CHECK PASSWORD ONLY
;NO CONNECT
;DOING CONNECT FOR ANOTHER JOB
;DIRECTORY NUMBER

iCOMND
;COMND - COMMAND STATE BLOCK
.CMFLG==:O
.CMIOJ==:l
.CMRTY==:2
.CMBFP==:3
.CMPTR==:4
.CMCNT==:5
.CMINC==:6
.CMABP==:7
.CMABC==:lO
.CMGJB==:ll
CM%GJB==:777777

;USER FLAGS"REPARSE DISPATCH ADDRESS
i INJFN , ,OUTJFN
iAR BUFFER POINTER
iPTR TO TOP OF BUFFER
iPTR TO NEXT INPUT TO BE PARSED
iCOUNT OF SPACE LEFT IN BUFFER AFTER PTR
iCOUNT OF CHARACTERS FOLLOWING PTR
;ATOM BUFFER POINTER
iATOM BUFFER SIZE
iADR OF GTJFN ARG BLOCK
;ADR OF GTJFN ARG BLOCK

iCOMND - FUNCTION DESCRIPTOR BLOCK
.CMFNP==:O
CM%FNC==:777B8
CM%FFL==:777B17
CM%LST==:777777
.CMDAT==:l
.CMHLP==:2
.CMDEF==:3
.CMBRK==:4

iFUNCTION AND POINTER
iFUNCTION CODE
iFUNCTION-SPECIFIC FLAGS
;LIST POINTER TO OTHER BLOCKS
iDATA FOR FUNCTION
iHELP TEXT POINTER
;DEFAULT STRING POINTER
iFIELD BREAK MASK POINTER

B-16

MONSYM

;COMND - FLAGS IN .CMFLG
CM%ESC==:lBO
CM%NOP==:lB1
CM%EOC==:lB2
CM%RPT==:lB3
CM%SWT==:lB4
CM%PFE==:lB5
CM%RAI==:lB6
CM%XIF==:lB7
CM%WKF==:lB8
;FUNCTION BLOCK FLAGS

;ESC SEEN
;NO PARSE
;END OF COMMAND SEEN
;REPEAT PARSE NEEDED
;SWITCH TERMINATED WITH 11.11
;PREVIOUS FIELD ENDED WITH ESC
;RAISE INPUT
;EXCLUDE INDIRECT FILES
;WAKEUP AFTER EACH FIELD
(IN WORD .CMFNP)

CM%NSF==:lB12
CM%BRK==:lB13
CM%PO==:lB14
CM%HPP==:lB15
CM%DPP==:lB16
CM%SDH==:lB17

;SUFFIX MAY BE OMITTED IF DESIRED
;BREAK MASK PRESENT
; PARSE-ONLY
;HELP POINTER PRESENT
;DEFAULT POINTER PRESENT
;SUPPRESS DEFAULT HELP MESSAGE

;FLAGS FOR CMDIR FUNCTION
CM%DWC==:lBO

;DIRECTORY WILD CARDING ALLOWED

;FLAGS FOR CMTAD FUNCTION
CM%IDA==:lBO
CM%ITM==:lB1
CM%NCI==:lB2

;INPUT DATE
;INPUT TIME
;NO CONVERT TO INTERNAL

;FLAGS IN KEYWORD TABLE (FIRST WORD OF STRING IF BO-6 = 0)
CM%INV==:lB35
CM%NOR==:lB34
CM%ABR==:lB33
CM%FW==:lB7

;INVISIBLE
;NO-RECOGNIZE (PLACEHOLDER)
;ABBREVIATION FOR ANOTHER ENTRY
;FLAG WORD (MUST ALWAYS BE ON)

B-17

MONSYM

iCOMND - FUNCTION CODES
.CMKEY==:O
.CMNUM==:l
.CMNOI==:2
.CMSWI==:3
.CMIFI==:4
.CMOFI==:5
.CMFIL==:6
.CMFLD==:7
.CMCFM==:10
.CMDIR==:ll
.CMUSR==:12
.CMCMA==:13
.CMINI==:14
.CMFLT==:15
.CMDEV==:16
.CMTXT==:17
.CMTAD==:20
.CMQST==:21
.CMUQS==:22
.CMTOK==:23
.CMNUX==:24
.CMACT==:25
.CMNOD==:26

iKEYWORD
iNUMBER
iNOISE WORD
iSWITCH
iINPUT FILE
iOUTPUT FILE
iGENERAL FILESPEC
iARBITRARY FIELD
iCONFIRM
iDIRECTORY NAME
iUSER NAME
iCOMMA
iINIT LINE
iFLOATING POINT NUMBER
iDEVICE NAME
iTEXT TO ACTION CHAR
iTIME AND DATE
iQUOTED STRING
iUNQUOTED STRING
iTOKEN
iNUMBER DELIMITED BY NON-DIGIT
iACCOUNT
iNODE NAME

iDEFINE BREAK MASKS
BRINI.
BRK CH .
BRKCH.
B RK CH •
BRK CH.
B RK C H •
BRKCH.
BRKCH.

(0 , 37)
(40,54)
( 56 , 57)

( 7 2 , 77)
( 100 )

(133,140)
(173,177)

FLDBO.==WO.
FLDB1.==W1.
FLDB2.==W2.
FLDB3.==W3.
iKEYWORD BREAK SET.

iINITIALIZE BREAK MASK FOR STANDARD FIELD
iALL CONTROL CHARACTERS
iSPACE THROUGH COMMA
iDOT AND SLASH
iCOLON THROUGH QUESTION MARK
iATSIGN
iOPEN BRACKET THROUGH ACCENT GRAVE
iCLOSE BRACKET THROUGH TILDE
iSTANDARD FIELD BREAK MASK

SAME AS STANDARD FIELD FOR NOW

KEYBO.==FLDBO.
KEYBl.==FLDB1.
KEYB2.==FLDB2.
KEYB3.==FLDB3.

B-18

MONSYI~

i

USERNAME BREAK SE'l'.
UNBRK.

H

H

UNBRK.
UNBRK.
UNBRK.
UNBRK.

H%H
H*H
H$H
H

n

BREAKS ON EVERy'rHING EXCEPT DOT AND ALPHABETICS.
iMODIFY FIELD BREAK SET INTO USER BREAK SET.
i DON'T BREAK ON DOT
iDON'T BREAK ON PERCENT
iSTAR
iALLOW DOLLARSIGN! (I NEVER KNEW THAT BEFORE)
iALLOW UNDERSCORE IN ATOM

USRBO.==WO.
USRB1.==W1.
USRB2. ==W2.
USRB3. ==W3.

iACCOUNT MASK CURRENTLY THE SAME AS USER MASK
ACTBO.==USRBO.
ACTB1.==USRB1.
ACTB2.==USRB2.
ACTB3.==USRB3.
iFILESPEC FIELD - fILESPEC PUNCTUATION CHARACTERS
i ARE LEGAL ( :, <, >, ., i)
UNBRK. ".

n

iMODIFY USERNAME BREAK SET INTO FILE BREAK SET.
DON'T BREAK ON THESE

UNBRK. nn
UNBRK. n [n
UNBRK. "] "
UNBRK. "., "
FILBO.==WO.
FILB1.==W1.
FILB2.==W2.
FILB3.==W3.

B-19

MONSYM

;READ DEVICE NAME
BRINI. FLDBO. ,FLDBI. ,FLDB2.,FLDB3.
;VERY SIMILAR TO STANDARD FIELD
UNBRK. "$"
;ALLOW DOLLARSIGN IN DEVICE NAME (LIKE FILESPI
UNBRK. " "
; UNDERSCORE TOO
DEVBO.==WO.
DEVBl. ==Wl.
DEVB2. ==W2.
DEVB3.==W3.
;READ TO END OF LINE
BRINI.
BRKCH.
BRKCH.
BRKCH.

. CHLFD
. CHCRT
. CHFFD

;I~ TIALIZE END OF LINE BREAK SET
;BREAK ON LINEFEED
;AND CARRIAGE RETURN
;FORMFEED IS VALID END-OF-LINE

EOLBO.==WO.
EOLBl.==Wl.
EOLB2.==W2.
EOLB3.==W3.

B-20

MONSYM

;CRDIR
CD%LEN==:lBO
CD%PSW==:lBl
CD%LIQ==:lB2
CD%PRV==:lB3
CD%MOD==:lB4
CD%LOQ==:lB5
CD%NUM==:lB6
CD%FPT==:lB7
CD%DPT==:lB8
CD%RET==:lB9
CD%LLD==:lBlO
CD%UGP==:lBll
CD%DGP==:lB12
CD%SDQ==:lB13
CD%CUG==:lB14
CD%DAC==:lB15
CD%DEL==:lB17
CD%APB==:777777B35
.CDLEN==:O
CD%NSQ==:lBO
CD%NCE==:lBl
CD%NED==:lB2
CD%FED==:lB3
.CDPSW==:l
.CDLIQ==:2
.CDPRV==:3
.CDMOD==:4
CD%DIR==:lBO
CD%ANA==:lBl
CD%RLM==: lE32
CD%DAR==:lB7
.CDLOQ==:5
.CDNUM==:6
.CDFPT==:7
.CDDPT==:lO
.CDRET==:ll
.CDLLD==:12
.CDUGP==:13
.CDDGP==:14
.CDSDQ==:15
.CDCUG==:16
.CDDAC==:17
.CDDNE==:20
.CDDFE==:21

;FLAGS I I LENGTH OF CRDIR BLOCK
;SET PASSWORD STRING
;SET LOGGED IN QUOTA
;SET PRIVILEGES
;SET MODE BITS
;SET LOGGED OUT QUOTA
;SET DIRECTORY NUMBER FROM PARAM BLK
;SET DEFAULT FILE PROTECTION
;SET DIRECTORY PROTECTION
;SET DEFAULT RETENTION COUNT
;SET LAST LOGIN DATE
;SET USER GROUPS
;SET DIRECTORY GROUPS
;SET SUBDIRECTORY QUOTA
iSET CREATABLE USER GROUPS
iSET DEFAULT ACCOUNT
;DELETE DIRECTORY
;ADDRESS OF PARAMETER BLOCK
iLENGTH OF ARGUMENT BLOCK
iDO NOT UPDATE QUOTAS OF SUPERIOR DIR
;DO NOT CHANGE PARAMETERS OF EXISTING DIRS
; Set def online exp from .CDDNE
; Set def offline exp from .CDDFE
;POINTER TO PASSWORD STRING
;LOGGED IN QUOTA
;PRIVILEGE WORD
;MODE WORD
;DIRECTORY NAME FOR CNDIR ONLY (FILES ONLY)
;ALPHANUMERIC ACCOUNTS
;REPEAT LOGIN MESSAGES
; Archived online expired files
iLOGGED OUT QUOTA
;DIRECTORY NUMBER
;DEFAULT FILE PROTECTION
iDIRECTORY PROTECTION
;DEFAULT RETENTION COUNT
;LAST LOGIN DATE
iUSER GROUPS
;DIRECTORY GROUPS
;MAXIMUM NUMBER OF SUBDIRECTORIES
;POINTER TO CREATABLE USER GROUP LIST
;POINTER TO DEFAULT ACCOUNT
; Default online expiration
; Default offline expiration

B-21

MONSYM

~

CRJOB

CJ%LOG==:lBO
CJ%NAM==:lB1
CJ%ACT==:3B3
.CJUCA==:O
.CJUAA==:l
.CJUDA==:2
CJ%ETF==:lB4
CJ%FIL==:lB5
CJ%ACS==:lB6
CJ%OWN==:lB7
CJ%WTA==:lB8
CJ%NPW==:lB9
CJ%NUD==:lB10
CJ%SPJ==:lB11
CJ%CAP==:lB12
CJ%CAM==:lB13
CJ%SLO==:lB14
CJ%DSN==:lB17
.CJNAM==:O
.CJPSW==:l
.CJACT==:2
.CJFIL==:3
.CJSFV==:4
.CJTTY==:5
.CJTIM==:6
.CJACS==:7
.CJEXF==:10
.CJPRI==:ll
.CJCPU==:12
.CJCAM==:13
.CJSLO==:14
CR%PRA==:2545

TO LOG IN THE NEW JOB
NAME AND PSWD IN ARG BLK
~WHERE TO GET ACCOUNT
~USE CURRENT ACCT OF CREATOR
~USE ACCOUNT IN ARG BLOCK
~USE DEFAULT ACCOUNT OF NEW USER
~PUT EXEC IN TOP FORK
~GET FILE IN ARG BLOCK
~LOAD THE ACS FROM ARG BLOCK
~RETAIN OWNERSHIP OF NEW JOB
~NEW JOB WAITS TIL ATTACHED
~NO PASSWORD CHECK AT LOGIN TIME
~NO UPDATE OF LAST-LOGIN DATE
~DO SPJFN IN NEW JOB FROM ARG BLK
~PASS ENABLED CAPABILITIES AS ALLOWED
~CAPABILITY MASK AT LOGIN
~SIGNAL (IPCF) AT LOGOUT TIME
~DISOWN EXISTING JOB # IN 3
~ATTEMPT
~USE

STRING POINTER
STRING POINTER
~ACCOUNT DESIGNATOR/STRING
~FILE NAME STRING POINTER
~SFRKV OFFSET
~TTY DESIGNATOR, OR NULL DESIGNATOR
~TIME LIMIT
~ADDRESS OF 16. WORDS OF AC'S
~EXEC FLAGS, FOR EXEC ACI
~PRIMARY JFN'S FOR SPJFN IN NEW JOB
~CPU LIMIT (0 IF NONE)
~CAPABILITY MASK TO APPLY TO LOGIN
~PID TO SIGNAL AT LOGOUT TIME
~NAME

~PASSWORD

~MAGIC

# FOR EXEC/CRJOB LINKAGE VIA PRARG

~ CRLN~1

.CLNJ1==:0
.CLNS1==:1
.CLNJA==:2
.CLNSA==:3
.CLNJB==:4
.CLNSY==:5

~DELETE
~DELETE

~DELETE
~DELETE
~CREATE

~CREATE

B-22

1 LOGICAL NAME FROM JOB
1 LOGICAL NAME FROM SYSTEM
ALL JOB WIDE LOGICAL NAMES
ALL SYSTEM LOGICAL NAMES
A JOB WIDE LOGICAL NAME
A SYSTEM WIDE LOGICAL NAME

MONSYMl

iDELDF
DD%DTF==:lBO
DD%DNF==:lBl
DD%RST==:lB2
DD%CHK==:lB3

;DELETE TEMPORARY FILES
iDELETE NONEXISTENT FILES
;REBUILD THE SYMBOL TABLE
;CHECK THE DIR FOR CONSISTENCY ONLY

iDELF
DF%NRJ==:lBO
DF%EXP==:lBl
DF%FGT==:lB2
DF%DIR==:lB3
DF%ARC==:lB4
DF%CNO==:lB5
DF%JFN==777777B35

RELEASE JFN
iEXPUNGE CONTENTS
iFORGET (EXPUNGE WIO DEASSIGNING ADDRESSES)
iDELETE, FORGET, AND EXPUNGE A DIRECTORY
FILE.
(ONLY IF . . E-CREATE KILL FAILED)
i Delete of archive status file allowed
i Delete only contents of file
Immediate expunge implied
iDON'T

;JFN

iDIAG JSYS DEFINITIONS
DG%ADT==:7B2
DG%DVC==:177B9
.DGRHO==:130
.DGRH7==:137
DG%UNI==:77B29
DG%SUN==:77B35

iADDRESS TYPE FIELD
;DEVICE CODE FIELD
;MBCO
iMBC7

iUNIT NUMBER
iSUBUNIT NUMBER

iDIAG JSYS FUNCTION CODES
.DGACU==:l
.DGACH==:2
.DGRCH==:3
.DGSCP==:4
.DGRCP==:5
.DGGCS==:6

;ASSIGN DEVICE
iASSIGN CONTROLLER AND ALL DEVICES
iRELEASE DEVICE(S)
iSETUP CHANNEL PROGRAM
;RELEASE CHANNEL PROGRAM
;GET CHANNEL STATUS

;DIAG NEW CONTROL FUNCTIONS
.DGGEM==:lOO
.DGREM==:lOl
.DGPDL==:102

;LEAVE LARGE HOLE FOR MORE RH20 FUNCTIONS
;GET MEM (FOR TGHA)
;RELEASE MEM (FOR TGHA)
;UNIT ONLINE

B-23

MONSYM

iDSKAS
DA%DEA==:lBO
DA%ASF==:lBl
DA%CNV==:lB2
DA%HWA==:lB3
DA%INI==:lB4
DA%WRT:::=:lB5
DA%ADR==:777777B35

iDEASSIGN DISK ADDRESS
iASSIGN FREE PAGE
iCONVERT SOFTWARE TO HARDWARE ADDRESS
iHARDWARE ADDRESS GIVEN
iINITIALIZE THE BIT TABLE
iWRITE THE BIT TABLE FILE
iDISK ADDRESS

B-24

MONSYtJI

;DVCHR, DEVUNT AND DVCHI BIT DEFINITIONS
DV%OUT==:IBO
DV%IN==:IBl
DV%DIR==:IB2
DV%AS==:IB3
DV%MDD==:IB4
DV%AV==:IB5
DV%ASN==:IB6
DV%MDV==:IB7
DV%MNT==:IB8
DV%TYP==:777BI7
DV%PSD==:IBI8
DV%UNT==:77777
DV%MOD==:177777B35
DV%MO==:IB35
DV%Ml==:IB34
DV%M2==:IB33
DV%M3==:IB32
DV%M4==:IB31
DV%M5==:IB30
DV%M6==:IB29
DV%M7==:IB28
DV%MI0==:IB27
DV%Mll==:IB26
DV%MI2==:IB25
DV%MI3==:IB24
DV%MI4==:IB23
DV%MI5==:IB22
DV%MI6==:IB21
DV%MI7==:IB20
Dl%SPL==:IBO
Dl%ALC==:IBl
Dl%VVL==:IB2
Dl%NIU==:IB3
Dl%INI==:IB4

;DEVICE CAN DO OUTPUT
;DEVICE CAN DO INPUT
;DEVICE HAS A DIRECTORY
;DEVICE IS ASSIGNABLE
;DEVICE IS A MULTIPLE DIRECTORY DEVICE
;DEVICE IS AVAILABLE TO THIS JOB
;DEVICE IS ASSIGNED BY ASND
;RESERVED (HISTORICAL)
;DEVICE IS MOUNTED
;DEVICE TYPE FIELD
;PSEUDO DEVICE
;UNIT MASK
;DEVICE DATA MODE
;DEVICE CAN BE OPENED IN MODE 0
;DEVICE CAN BE OPENED IN MODE 1
;DEVICE CAN BE OPENED IN MODE 2
;DEVICE CAN BE OPENED IN MODE 3
;DEVICE CAN BE OPENED IN MODE 4
;DEVICE CAN BE OPENED IN MODE 5
;DEVICE CAN BE OPENED IN MODE 6
;DEVICE CAN BE OPENED IN MODE 7
;DEVICE CAN BE OPENED IN MODE 10
;DEVICE CAN BE OPENED IN MODE 11
;DEVICE CAN BE OPENED IN MODE 12
;DEVICE CAN BE OPENED IN MODE 13
;DEVICE CAN BE OPENED IN MODE 14
;DEVICE CAN BE OPENED IN MODE 15
;DEVICE CAN BE OPENED IN MODE 16
;DEVICE CAN BE OPENED IN MODE 17
;DEVICE IS SPOOLED
;DEVICE IS UNDER CONTROL OF ALLOCATOR
; VOLUI~E VALID
;DEVICE SLOT IS NOT IN USE (FOR STRUCTURES
; NOT YET MOUNTED)
;DEVICE IS BEING INITIALIZED (STRUCTURE
IS AVAILABLE ONLY TO THE FORK WHOSE NUMBER
; IS STORED IN SDBSTS)

8-2:,

MONSYM

;DEVICE TYPE DEFINITIONS
.DVDSK==:O
.DVMTA==:2
.DVDTA==:3
.DVPTR==:4
.DVPTP==:5
.DVDSP==:6
.DVLPT==:7
.DVCDR==:lO
.DVFE==:ll
.DVTTY==:12
.DVPTY==:13
.DVNUL==:15
.DVNET==:16
.DVPLT==:17
.DVCDP==:21
.DVDCN==:22
.DVSRV==:23
.DVATS==:24
.DVADS==:25

;DISK
;MAGTAPE
;DECTAPE
;PAPER TAPE READER
;PAPER TAPE PUNCH
;DISPLAY
;LINE PRINTER
;CARD READER
;FRONT END DEVICE
;TERMINAL
;PTY
;NULL DEVICE
;ARPA NETWORK
,PLOTTER
;CARD PUNCH
;DECNET ACTIVE COMPONENT
;DECENT PASSIVE COMPONENT
;APPLICATIONS TERMINAL SERVICE
;AYDIN DISPLAY

;DSKOP
DOP%SA==:lBO
DOP%AT==:3Bl
.DOPPU==:l
DOP%CN==:37B6
DOP%UN==:77B12
DOP%UA==:37777777
.DOPSR==:2
DOP%SN==:777BIO
DOP%RA==:177777777
DOP%C2==:7777Bll
DOP%K2==:7777B23
DOP%U2==:7777B35
DOP%NF==:lB9
DOP%EO==:lBIO
DOP%IL==:lBll
DOP%IR==:lB12
DOP%WR==:lB14
DOP%CT==:777777B35

;SOFTWARE ADDRESS
;ADDRESS TYPE FIELD
;PHYSICAL CHANNEL AND UNIT
;CHANNEL NUMBER (OLD FORMAT)
;UNIT NUMBER (OLD FORMAT)
;UNIT ADDRESS
;STRUCTURE AND RELATIVE ADDRESS
;STRUCTURE NUMBER
;RELATIVE ADDRESS
;CHANNEL NUMBER (NEW FORMAT)
;CONTROLLER NUMBER (NEW FORMAT)
;UNIT NUMBER (NEW FORMAT)
;USE NEW FORMAT FOR CHANNEL, UNIT NUMBERS
;ERROR IF UNIT OFFLINE
;INHIBIT ERROR LOGGING
;INHIBIT ERROR RECOVERY
;WRITE
;WORD COUNT

;DUMPI/DUMPO
DM%NWT==:lBO
DM%FIN==:lBl
DM%PTR==:777777B35

;NO WAIT FOR COMPLETION
;FINISH PREVIOUS REQUEST
;***NOT INPLEMENTED YET***
;POINTER TO COMMAND LIST

B-26

MONSYM

;DEFINE DECNET DISCONNECT CODES. THESE ARE STIPULATED BY THE NSP SPEC
;AND MAY HAVE MEANINGS NOT IMPLIED BY THE COMMENTS
.DCXO==:O
.DCX1==:1
.DCX2==:2
.DCX3==:3
.DCX4==:4
.DCX5==:5
.DCX6==:6
.DCX7==:7
.DCX8==:"D8
.DCX9==:"D9
.DCX11==: "D11
.DCX21==:"D21
.DCX22==:"D22
.DCX23==:"D23
.DCX24==:"D24
.DCX32==:"D32
.DCX33==:"D33
.DCX34==:"D34
.DCX35==:"D35
.DCX36==:"D36
.DCX37==:"D37
.DCX38==:"D38
.DCX39==:"D39
.DCX40==:"D40
.DCX41==:"D41
.DCX42==:"D42
.DCX43==:"D43

;NO SPECIAL ERROR
;RESOURCE ALLOCATION FAILURE
;DESTINATION NODE DOES NOT EXIST
;NODE SHUTTING DOWN
;DESTINATION PROCESS DOES NOT EXIST
; INV]I~LID NAME FIELD
;DESTINATION PROCESS QUEUE OVERFLOW
;UNSPECIFIED ERROR
;THIRD PARTY ABORTED LINK
;USER ABORT (ASYNCHRONOUS DISCONNECT)
;UNDEFINED ERROR CODE
;CI WITH ILLEGAL DESTINATION ADDRESS
iCC WITH ILLEGAL DESTINATION ADDRESS
;CI OR CC WITH ZERO SOURCE ADDRESS
;FLOW CONTROL VIOLATION
;TOO MANY CONNECTIONS TO NODE
;TOO MANY CONNECTIONS TO DEST. PROCESS
;ACCESS NOT PERMITTED
;LOGICAL LINK SERVICES MISMATCH
; INVJ~LID ACCOUNT
;SEGSIZE TOO SMALL
;PROCESS ABORTED
;NO PATH TO DESTINATION NODE
;LINK ABORTED DUE TO DATA LOSS
;DESTINATION PROCESS DOES NOT EXIST
;CONFIRMATION IF DI
;IMAGE DATA FIELD TOO LONG

;EFACT - FACT FILE ENTRY DEFINITIONS
.EFHDR==:O
EF%COD==: ~7 77B8
EF%JOB==:777B17
EF%LIN==:7777B29
EF%SIZ==:77B35
.EFUSR==:l
.EFTAD==:2

;HEADER WORD
;ENTRY TYPE CODE
;JOB NUMBER
;LINE NUMBER
;ENTRY SIZE
;USER NUMBER WORD
;TIME AND DATE OF ENTRY

; FACT FILE ENTRY TYPE CODES
.EFLGI==:501
.EFLGO==:141
.EFCAC==:502
.EFATT==:142
.EFDET==:143
.EFCHK==:201
.EFSDU==:540
.EFDSK==:601
.EFTIM==:741
.EFRES==:740
.EFLPT==:401
.EFCDR==:402

;LOGIN
; LOGOUT
;CHANGE ACCOUNT
;CONSOLE ATTACH
;CONSOLE DETACH
;CHECKPOINT
;START DISK-UTILIZATION ENTRIES
;DISK SPACE UTILIZATION
;TIME SET
;SYSTEM RESTARTED
;LINE PRINTER USAGE
;CARD READER USAGE

B-27

MONSYM

~ENQ/DEQ

BIT DEFINITIONS AND FUNCTION CODES

~FUNCTION

CODES

.ENQBL==:O
.ENQAA==:l
.ENQSI==:2
.ENQMA==:3
.DEQDR==:O
.DEQDA==:l
.DEQID==:2
.ENQCS==:O
.ENQCG==:l
.ENQCC==:2
.ENQCD==:3

~BIT

BLOCK OPTION
ALLOCATE ONLY IF AVAILABLE
~ENQ SOFTWARE INTERRUPT WHEN LOCKED
~ENQ MODIFY ACCESS
~DEQ RESOURCE
~DEQ ALL RESOURCES OF THIS FORK
~DEQ THIS ID NUMBER
~ENQC STATUS
~ENQC GET ENQ/DEQ QUOTA FOR A JOB
~ENQC CHANGE ENQ/DEQ QUOTA FOR A JOB
;ENQC DUMP LOCKS AND QUEUE ENTRIES
~ENQ
~ENQ

DEFINITIONS

EN%SHR==:lBO
EN%BLN=:.::lBl
EN%NST==:lB2
EN%LTL==:lB3
EN%LVL==:777B17
EN%JOB==:777777B35
EN%QCE==:lBO
EN%QCL==:lBO
EN%QCO==:lBl
EN%QCQ==:lB2
EN%QCT==:lB2
EN%QCX==:lB3
EN%QCB==:lB4

REQUEST
LEVEL NUMBER
~ALLOW NESTING
;LONG TERM LOCK
~LEVEL NUMBER
~JOB NUMBER
~ERROR CODE IN RH OF STATUS WORD
;LOCK DUMP (.ENQCD ONLY)
;THIS FORK OWNS THE LOCK
;THIS FORK IS IN THE QUEUE FOR THIS LOCK
;LOCK CONTAINS A TEXT STRING
~THE LOCK IS LOCKED EXCLUSIVELY
~USER IS BLOCKED FOR LOCK
~SHARABLE

~BYPASS

;ENQ/DEQ ARGUMENT BLOCK DATA STRUCTURE
.ENQLN==:O
.ENHLN==:77B5
.ENNLK==:7777B17
.ENALN==:777777B35
.ENQID==:l
.ENQLV==:2
.ENQUC==:3
.ENQRS==:4
.ENQMS==:5

~# OF LOCKS "
LENGTH OF ARGUMENT BLOCK
;LENGTH OF HEADER AREA
;NUMBER OF LOCKS
~LENGTH OF ARGUMENT BLOCK
;PSI CHANNEL # " REQUEST ID
~FLAGS & LEVEL NUMBER"
JFN, -1, -2, OR -3
~STRING POINTER OR USER CODE
;# OF RESOURCES IN POOL " # OF RESOURCES WANT
~ADDRESS OF RESOURCE BLOCK

B-28

MONSYM

;ENQC DUMP DATA STRUCTURE
.ENQDF==:O

;FLAGS + LEVEL # " OFN, 400000+JOB #, -2, OR -3
;OR:
FLAGS + PSI # " JOB # OF Q-ENTRY CREATOR

.ENQDR==:l
.ENQDT==:2
.ENQDC==:3

;TOTAL RESOURCES IN POOL " RESOURCES REMAINING
;TIME STAMP OF LAST REQUEST LOCKED
;USER CODE OF LOCK OR START OF TEXT STRING

.ENQDI==:l

;GROUP # OR # REQUESTED "

ENQ ID

;FLOUT/DFOUT
;FORMAT CONTROL WORD
FL%SGN==:3Bl
.FLDIG==:O
.FLSPC==:l
.FLPLS==:2
.FLSPA==:3
FL%.JUS==:3B3
.FLLSP==:O
.FLLZR==:l
.FLLAS==:2
.FLTSP==:3
FL%ONE==:lB4
FL%DOL==:lB5
FL%PNT==:lB6
FL%EXP==:3B8
.FLEXN==:O
.FLEXE==:l
.FLEXD==:2
.FLEXM==:3
FL%ESG==:3BIO
.FLDGE==:O
.FLPLE==:l
.FLSPE==:2
.FLDGT==:3
FL%OVL==:lBll
FL%RND==:37B17
FL%FST==:77B23
FL%SND==:77B29
FL%THD==:77B35

;FIRST FIELD SIGN CONTROL
;DIGIT
;SPACE
;PLUS SIGN
;SPACE
;FIRST FIELD JUSTIFICATION CONTROL
;LEADING SPACES
iLEADING ZEROS
;LEADING ASTERISKS
;TRAILING SPACES
;FIRST FIELD NONBLANK
;DOLLAR SIGN PREFIX
;DECIMAL POINT
;THIRD FIELD EXPONENT CONTROL
;NO EXPONENT
;E EXPONENT PREFIX
;D EXPONENT PREFIX
;*lO~ EXPONENT PREFIX
;EXPONENT SIGN CONTROL
;DIGIT
;PLUS SIGN
;SPACE
;DIGIT
;COLUMN OVERFLOW
;DIGIT POSITION FOR ROUNDING
;FIRST FIELD WIDTH
;SECOND FIELD WIDTH
;THIRD FIELD WIDTH

B-29

MONSYM

iGDSTS
iSEE MTOPR FOR CARD READER AND LINE PRINTER STATUS BITS
iSEE GENERAL FIELD AND VALUE SECTION FOR MAGTAPE STATUS BITS
iSEE TOPS20AN SECTION FOR NETWORK STATUS BITS

iTOPS20AN iFINITE MACHINE STATE

.GDFSM==:17B3

iTTY BITS
GD%PAR==:lB35

jIF ON, TERMINAL ACCEPTS PARITY

;GET
jArgurnent block for GET:
.GFLAG==:O
GT%LOW==:lBO
GT%HGH==:lBl
GT%BAS==:lB2
GT%CCH==:lB3
GT%CSH==:lB4
GT%ADR==:lB19
GT%PRL==:lB20
GT%NOV==:lB2l
GT%ARG==:lB22

jFLAG WORD
iUSE LOW ADDRESS IN .GLOW
jUSE HIGH ADDRESS IN .GHIGH
iUSE BASE SECTION IN .GBASE
iCLEAR PROGRAM CACHE
jCACHE THIS PROGRAM
(IN ACl) USE ADDRESS LIMITS IN AC2
(IN ACl) PRELOAD PAGES
(IN ACl) DON'T OVERLAY EXISTING PAGES
(IN ACl) IF ON, AC2 CONTAINS ADDRESS
OF ARG BLOCK
GT%JFN==:7777B35 j (IN ACl) JFN

.GLOW==:l
.GHIGH==:2
.GBASE==:3

iLOW ADDRESS IF GT%LOW ON
jHIGH ADDRESS IG GT%HGH ON
;BASE IF GT%BAS ON

B-30

MONSY~~

:GETAB - TABLE INDICES
.JOBTT==:O
.JOBRT==:l
.TICKP==:2
.JOBDI==:3
.TTYJO==:4
.NCPGS==:5
.DEVNA==:6
.DEVCH==:7
.DEVUN==:10
.DSKER==:ll
.DRMER==:12
.SYSVE==:13
.SYSTA==:14
.QTIME==:15
.JOBNA==:16
.SNAME==:17
.STIME==:20
.SPFLT==:21
.SSIZE==:22
.SNBLK==:23
.DBUGS==:24
.LOGDE==:25
.PTYPA==:26
.SYMTA==:27
.DWNTI==:30
.JOBPN==:31
.BLDTD==:32
.LSTDR==:33
.APRID==:34
.HQLAV==:35
.LQLAV==:36
.NETRD==:37
.IMPHR==:40
.HSTST==:41
.HSTNA==:42
.HOSTN==:43
.NETLS==:44
.NETFS==:45
.NETAW==:46
.NETBA==:47
.NETST==:50
.NETBU==:51
.NETBT==:52
.IMPL1==:53
.IMPL2==:54
.IMPL3==:55
.IMPL4==:56
.LHOST==:57
.JBONT==:60
.NSWPG==:61
.SCOUN==:62

iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
:TOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN

:JOB NUMBER TO TTY NUMBER
iJOB RUNTIME
:TICKS PER SECOND
:JOB NUMBER TO DIRECTORY NUMBERS (OBS)
iTTY NUMBER TO JOB NUMBER
:NUMBER PHYSICAL CORE PAGES
:DEVICE NAME
iDEVICE CHARACTERISTICS
:DEVICE UNIT NUMBERS
:DISK ERROR WORDS
:DRUM ERROR WORDS
iVERSION TEXT
iSTATISTICS
:SCHED QUEUE TIMES
iJOB NUMBER TO PROGRAM NAME
iSUBSYSTEM NAME
i " TIME
i " Pp·.GE FAULTS
i " SIZE INTEGRAL
i " NUMBER WAKEUPS
iDBUGSW, DCHKSW
iLOG, JOB 0 DESIGNATORS
iPTY PARAMETERS
iGTTAB SYMBOL TABLE
iHSYS VARIABLES
iJOB NUMBER TO PROGRAM NAME
iMONITOR BUILD TIME AND DATE
iLAST DIR NUMBER ASSIGNED (OBS)
iAPR SERIAL NUMBER
iHIGH QUEUE LOAD AVERAGES
iLOW QUEUE LOAD AVERAGES
iARPANET STATUS
:HOST READY
iDEAD HOST STATUS
iHOST NAMES
iHOST NAME INDEX
iLOCAL SOCKET
iFOREIGN SOCKET
iARPA CONNECTION ADDRESS
iBIT ALLOCATION
iCONNECTION STATUS
iARPANET BUFFERS
iBYTE COUNT STATISTICS
iIMP LINK TABLE ONE
iIMP LINK TABLE TWO
iIMP LINK TABLE THREE
iIMP LINK TABLE FOUR
iLOCAL HOST NUMBER
iOWNING JOB
iDEFAULT SWAPPING PAGES
iCOUNT SNAMES TABLE

B-31

MONSYM

;GETJI
.JIJNO==:O
.JITNO==:1
.JIUNO==:2
.JIDNO==:3
.JISNM==:4
.JIPNM==:5
.JIRT==:6
.JICPJ==:7
.JIRTL==:10
.JIBAT==:11
.JIDEN==:12
.JIPAR==:13
.JIDM==:14
.JIRS==:15
.JIDFS==:16
.JILNO==:17
.JISRM==:20
.JILLN==:21
.JISRT==:22
.JISCT==:23
.JIT20==:24
.JISTM==:25
.JIBCH==:26
OB%WTO==3Bl
.OBALL==O
.0BNWR==1
.OBNOM==2
OB%BSS==IBI0
OB%BSN==177BI7
.JILLO==:27

;JOB NUMBER
;TERMINAL NUMBER
;USER NUMBER
;DIRECTORY NUMBER
;SUBSYS NAME
;PROGRAM NAME
;RUN TIME
;CONTROLLING PTY JOB NUMBER
;RUN TIME LIMIT (SET BY TIMER JSYS)
;CONTROLLED BY BATCH
;MAGTAPE DEFAULT DENSITY
;MAGTAPE DEFAULT PARITY
;MAGTAPE DEFAULT DATA MODE
;MAGTAPE DEFAULT RECORD SIZE
;DEFERRED SPOOLING
;LOGGED-IN DIRECTORY NUMBER
;POINTER TO JOB SESSION REMARK
;LAST LOGIN DATE & TIME
;JOB RUNTIME AT START OF THIS ACCOUNTING SESSJ
;JOB CONSOLE TIME AT START OF THIS SESSION
;-1 IF AT TOPS20 COMMAND LEVEL
;DATE & TIME JOB WAS INITIALIZED
;BATCH STREAM AND FLAGS
;WRITE TO OPERATOR CAPABILITIES
;WTO AND WTOR ALLOWED
;NO WTOR ALLOWED
;NO MESSAGE ALLOWED
:BATCH STREAM NUMBER SET
;BATCH-STREAM NUMBER
;LOGICAL LOCATION (NODE NAME)

.JIMAX==:.JILLO

;CURRENT ITIGHEST GETJI OFFSET

;GFRKS
GF%GFH==:IBO
GF%GFS==:IBl

;GET RELATIVE FORK HANDLES
;GET FORK STATUS

;GFUST
.GFAUT==:O
.GFLWR==:1

;GET FILE AUTHOR
;GET FILE LAST WRITER

;GTHST

;TOPS20AN

.GTHSZ==:O
.GTHIX==:1
.GTHNS==:2
.GTHSN==:3
.GTHHN==:4
.GTHHI==:5

;HOST TABLE SIZES
:INDEX TO STRING CONVERSION
;NUMBER TO STRING CONVERSION
;STRING TO NUMBER CONVERSION
;HOST NUMBER TO STATUS
;HOST INDEX TO STATUS

B-32

MONSYM

;GETOK DEFINITIONS
.GOASD==:l
.GEERB==:O
.GEADD==:l
.GOCAP==:2
.GENCP==:l
.GOCJB==:3
.GOLOG==:4
.GELUN==:l
.GOCFK==:5
.GEFCT==:l
.GOTBR==:6
.GELIN==:l
.GESPD==:2
.GOLGO==:7
.GEUSD==:l
.GEQUO==:2
.GERLG==:3
.GOENQ==:lO
.GEEQU==:l
.GEEUN==:2
.GOCRD==:ll
.GOSMT==:12
.GESDE==:l

iASSIGN DEVICE
iERROR BLOCK ADDRESS
iDEVICE DESIGNATOR
iENABLE CAPABILITIES
iNEW CAPABILITIES
;ALLOW CRJOB JSYS
;ALLOW LOGINS
iUSEH NUMBER
;ALLOW CFORK JSYS
iNUMBER OF FORKS
iALLOW SET TERMINAL BAUD RATE
;LINE NUMBER
iSPEED
;ALLOW LOGOUT
;PAGES USED
; QUO'rA
;JOB TO BE LOGGED OUT, -1 FOH CALLER
;ALLOW SET ENQ QUOTA
;DESIRED QUOTA
;JOB NUMBER
;ALLOW CREDIR
;ALLOW SMOUNT
iDEVICE DESIGNATOR

.GOMDD==:13
.GOCLS==:14
.GEJOB==:l
.GECLS==:2
.GOCLO==:15
.GOMTA==:16

;ALLOW MDDT ENTRY
;VERIFY CLASS ASSIGNMENT FOR A JOB
;JOB #
;CLASS DESIRED
;SET CLASS AT LOGIN
;MT ACCESS REQUEST

.GEACC==:l
.GEUSN==:2
.GEUNT==:3
.GEACD==:4
.GELTP==:5
.GOACC==:17
.GOACO==:l
.GOACl==:2
.GOOAD==:20
.GODNA==:21
.GOANA==:22

;ACCESS -CODE FROM HDRI
iUSEP NUMBER
iMT UNIT NUMBER
iDESIRED ACCESS (BITS)
;LABEL TYPE
iACCESS AND CONNECT
iFLAGS FROM ACESS JSYS
;DIRECTORY NUMBER
;ASSIGN DUE TO OPENF
;.GEADD IS THE ARG OFFSET FOR THE
i DEVICE DESIGNATOR
;ACCESS TO DECNET
;ACCESS TO ARPANET

.GOATJ==:23
.GOTJB==:l
.GOTTY==:2

;ATACH JSYS
iTAGET JOB NUMBER
iSOURCE TTY NUMBER

.GOKMZ==:"D20
;ERROR BLOCK ADDRESS OFFSETS

iMAX ARGUMENT BLOCK SIZE FOR GETOK REQUEST

.GESIZ==:O
.GEERN==:l
.GEPTR==:2
.GEBSZ==:3

iSIZE OF THIS BLOCK
iERROR NUMBER
;POINTER TO ERROR STRING
iSTRING SIZE

B-33

MONSYM

iGTJFN DEFINITIONS
iFLAGS PROVIDED TO GTJFN ON CALL
GJ%FOU==:lBO
GJ%NEW==:lBl
GJ%OLD==:lB2
GJ%MSG==:lB3
GJ%CFM==:lB4
GJ%TMP==:lB5
GJ%NS==:lB6
GJ%ACC==:lB7
GJ%DEL==:lB8
GJ%JFN==:3BlO
.GJDNU==:O
.GJERR==:2
.GJALT==:3
GJ%IFG==:lB11
GJ%OFG==:lB12
GJ%FLG==:lB13
GJ%PHY==:lB14
GJ%XTN==:lB15
GJ%FNS==:lB16
GJ%SHT==:lB17

iFILE IS FOR OUTPUT USE
iNEW FILE ONLY
iOLD FILE ONLY
iPRINT AN APPROPRIATE MESSAGE
iCONFIRMATION IS REQUIRED
iTEMPORARY
iDONT SEARCH SEARCH LISTS
iNO ACCESS BY OTHER FORKS
iIGNORE "DELETED" BIT
iJFN USE FIELD
iDO NOT USE JFN PROVIDED
iERROR IF CANNOT USE JFN PROVIDED
iUSE ALTERNATE IF CANNOT USE GIVEN JFN
iACCEPT INPUT FILE GROUP DESCRIPTORS
iACCEPT OUTPUT FILE GROUP DESCRIPTORS
iRETURN FLAGS
iPHYSICAL DEVICE ONLY
iEXTENDED FORMAT (E+11 EXISTS)
iACCUMULATOR 2 CONTAINS JOB FILE NUMBERS
iSHORT CALL FORMAT

iFLAGS PROVIDED TO GTJFN (IN SECOND FLAG WORD)
G1%RND==:lBO
G1%RBF==:lB1
G1%NLN==:lB2
G1%RCM==:lB3
G1%RIE==:lB4
G1%IIN==:lB5
Gl%SLN==:lB6

iRETURN ON NULL(IN ALTERNATE FLAG WORD)
(OBSOLETE)
iNO LONG NAMES
iRETURN CONFIRM MESSAGE
iRETURN WHEN MAIN STRING IS EMPTY
i Ignore invisible st~tus
iSUPPRESS EXPANSION OF LOGICAL NAMES
iAR BUFFER IS DISJOINT

8-34

MONSYM

iFLAGS RETURNED BY GTJFN
GJ%DEV==:lBO
GJ%UNT==:lB1
GJ%DIR==:lB2
GJ%NAM==:lB3
GJ%EXT==:lB4
GJ%VER==:lB5
GJ%UHV==:lB6
GJ%NHV==:lB7
GJ%ULV==:lB8
GJ%PRO==:lB9
GJ%ACT==:lB10
GJ%TFS==:lB11
GJ%GND==:lB12
GJ%GIV==:lB17

iASTEPISK WAS GIVEN FOR DEVICE
iASTERISK WAS GIVEN FOR UNIT
iASTERISK WAS GIVEN FOR DIRECTORY
iASTERISK WAS GIVEN FOR NAME
iASTERISK WAS GIVEN FOR EXTENSION
iASTERISK WAS GIVEN FOR GENERATION
iUSE HIGHEST GENERATION
iUSE NEXT HIGHER GENERATION
iUSE LOWEST GENERATION
iPROTECTION GIVEN
iACCOUNT GIVEN
iTEMPORARY FILE SPECIFIED (iT)
iCOMPLEMENT OF GJ%DEL ON CALL
i Comp of G1%IIV

iGTJFN TABLE OFFSETS
.GJGEN==:O
.GJDEF==:
-1>
-2>
-3>

iFLAGS " GENERATION
iDEFAULT GENERATION
iNEXT HIGHER GENERATION
iLOWEST EXISTING GENERATION
iALL GENERATIONS (I.E., ;*)
iSOURCE JFN " OUTPUT JFN
iDEFAULT DEVICE
iDEFAULT DIRECTORY
iDEFAULT NAME
iDEFAULT EXTENSTION
iDEFAULT PROTECTION
iDEFAULT ACCOUNT
iDESIlRED JFN
iSECOND GROUP FLAGS"COUNT
iCOPY BUFFER POINTER
iCOPY BUFFER COUNT
iRETYPE (~R) POINTER
iTOP OF BUFFER POINTER
iPOINTER TO ARBITRARY ATTRIBUTE BLOCK
iDEFAULT NODE

iGNJFN - FLAGS RETURNED
GN%STR==:lB13
GN%DIR==:lB14
GN%NAM==:lB15
GN%EXT==:lB16

iSTRUCTURE CHANGED
iDIRECTORY CHANGED
iNAME CHANGED
iEXTENSION CHANGED

iGTNCP

i TOPS20AN

.GTNSZ==:O
.GTNIX==:l
.GTNNI==:2
.GTNNO==:3
.GTNJF==:4

iSIZE OF TABLE
iNCP INDEX
iNVT INPUT
iNVT OUTPUT
iJFN

.NCIDX==:O
.NCFHS==:l
.NCLSK==:2
.NCFSK==:3
.NCFSM==:4
.NCLNK==:5
.NCNVT==:6
.NCSIZ==:7

iNCP INDEX
iFOREIGN HOST
i LOCA.L SOCKET
iFOREIGN SOCKET
iFINITE STATE MACHINE STATE
iLINK
iNVT, -1 IF NOT A TELNET CONNECTION
iBYTE SIZE OF CONNECTION

MONSYM

.NCMSG==:lO
.NCBAL==:ll
.NCDAL==:12
.NCBTC==:13
.NCBPB==:14
.NCCLK==:15
.NCSTS==:16

;MSG ALLOC
;BIT ALLOC
;DESIRED ALLOC
;BITS XFERRED
;BYTES/BUFFER
;TIME-OUT COUNTDOWN
;CONNECTION STATUS

B-36

MONSY~~

;GTRPW
PF%USR==:lBO
PF%WTF==:lBl
PF%WRT==:lB5
TSW%RD==:lB14
TSW%WT==:lB15
TSW%WR==:lB15
TSW%EX==:lB16
TSW%MN==:lB17

;PAGE FAIL WORD - USER MODE REFERENCE
; " - WRITE REFERENCE (XGTPW)
; " - WRITE REFERENCE
;TRAP STATUS WORD - READ
" - WRITE
(ANOTHER NAME FOR ABOVE)
- EXECUTE
" - MONITOR MODE REFERENCE

;GTSTS BITS RETURNED IN 2
GS%OPN==:lBO
GS%RDF==:lBl
GS%WRF==:lB2
GS%XCF==:lB3
GS%RND==:lB4
GS%APT==:lB5
GS%CAL==:lB6
GS%LNG==:lB7
GS%EOF==:lB8
GS%ERR==:lB9
GS%NAM==:lBIO
GS%AST==:lBll
GS%ASG==:lB12
GS%HLT==:lB13
GS%FRK==:lB17
GS%PLN==:lB18
GS%MOD==:17B35
.GSNRM==:O
.GSSMB==:l
.GSIMG==:lO
.GSDMP==:17

;FILE IS OPEN
;IF OPEN, FILE IS OPEN FOR READ
;IF OPEN, FILE IS OPEN FOR WRITE
;IF OPEN, FILE IS OPEN FOR EXECUTE
;OK TO RESET BYTE POINTER
; (FILE IS NOT APPEND)
;ACCESS PER PAGE TABLE
; (NOT IMPLEMENTED -- OBSOLETE)
;OK TO CALL AS A PROCEDURE
; (NOT IMPLEMENTED -- OBSOLETE)
;FILE IS LONG
;AT END OF FILE ON READ
;FILE MAY BE IN ERROR
;FILE HAS A NAME (JFN EXISTS)
;ONE OR MORE FIELDS OF NAME
; IS WILD
;JFN IS BEING ASSIGNED
;TERMINATE ON I/O ERROR
;JFN IS RESTRICTED TO CREATING FORK
;DON'T STRIP LINE NUMBERS ON SIN/BIN
;DATA MODE
;NORMAL MODE
;SMALL BUFFER MODE (DCN:, SRV:)
;IMAGE (BINARY) MODE
;DUMP MODE

B-37

MONSYM

iHPTIM
.HPELP==:O
.HPRNT==:l

iELAPSED TIME
iRUN TIME

iIDCNV (ALSO IDTNC AND ODCNV)
IC%DSA==:lBO
IC%ADS==:lBl
IC%UTZ==:lB2
IC%JUD==:lB3
IC%TMZ==:77B17
IC%TIM==777777B35

iDAYLIGHT SAVINGS IF APPROPRIATE
iAPPLY DAYLIGHT SAVINGS
iUSE TIME ZONE GIVEN
iUSE JULIAN DATE CONVERSION
iTIME ZONE
iLOCAL TIME

iIDTIM & IDTNC
IT%NDA==:lBO
IT%NNM==:lBl
IT%SNM==:lB2
IT%ERR==:lB3
IT%NTI==:lB6
IT%NIS==:lB7
IT%AIS==:lB8
IT%NAC==:lB9
IT%AAC==:lBIO
IT%AMS==:lBll
IT%AHM==:lB12
IT%N24==:lB14
IT%NTM==:lB15
IT%NTZ==:lB16

iNO DATE
iNa NUMERIC MONTH
iSECOND NUMBER IS MONTH
iERROR IF NUMBERS ARE NOT IN SPECIFIED
i ORDER
iNa TIME
iNa SECONDS
iALWAYS INCLUDE SECONDS
iNO COLON ALLOWED BETWEEN HH AND MM
iALWAYS ALLOW COLON
iALWAYS INTERPRET ONE COLON AS HHMM:SS
iALWAYS INTERPRET ONE COLON AS HH:MM
iNO 24-HOUR FORMAT
iNO TIME MODIFIER (AM, PM)
iNO TIME ZONE

i.IMOPR - MONITOR ROUTINE USED BY MDDT AND SNOOP.

THIS IS NOT

iA JSYS SO THAT CALLS ARE FAST .

. IMALC==:l
.IMMAP==:2
.IMUMP==:3
i

iALLOCATE PAGES FOR USE IN MAPPING SYMBOLS
iMAP PAGES OF THE SYMBOL TABLE
iUNMAP PAGES OF THE SYMBOL TABLE

INLNM

.INLJB==:O
.INLSY==:l

iGET JOB WIDE LOGICAL NAME FROM INDEX
iGET SYSTEM LOGICAL NAME FROM INDEX

B-38

MONSYM

:IPCF BIT DEFINITIONS AND DATA STRUCTURES
:PACKET FORMAT
.IPCFL==:O
IP%CFB==:lBO
IP%CFS==:lBl
IP%CFR==:lB2
IP%CFO==:lB3
IP%TTL==:lB4
IP%CPD==:lB5
IP%JWP==:lB6
IP%NOA==:lB7
IP%CFP==:lB18
IP%CFV==:lB19
IP%CFZ==:lB20
IP%INT==:lB21
IP%EPN==:lB22
IP%CFE==:77B29

: FLAGS WORD
:DON'T BLOCK READ
;INDIRECT SENDER'S PID
:INDIRECT RECEIVER'S PID
:OVERDRAW SEND
;TRUNCATE ON TOO LARGE MESSAGE
:CREATE A PID ON THE SEND
;MAKE THE CREATED PID BE JOB WIDE
:NO ACCESS OF PID BY OTHER FORKS
;SENDER IS PRIV'D AND IS ENVOKING PRIVS
;PAGE TRANSFER MODE
;ZERO LENGTH MESSAGE WAS SENT
; Internal call - unavailable to users
;PAGE NUMBER IS 18 BITS
;ERROR FIELD

;ERRORS SENT BY INFO
.IPCPI==:15
.IPCUF==:16
.IPCSN==:67
.IPCFF==:72
.IPCBP==:74
.IPCDN==:75
.IPCNN==:76
. I PC EN == : 7 7
.IPCKM==:66
IP%CFC==:7B32
.IPCCC==:l
.IPCCF==:2
.IPCCP==:3
IP%CFM==:7B35
. I PCFN==: 1
.IPCFS==:l
.IPCFR==:2
.IPCFP==:3
.IPCFD==:4
.IPCFC==:5
.IPCSD==:6
.IPCAS==:7
.IPCLL==:lO

;INSUFFICIENT PRIVILEGE
;ILLEGAL FUNCTION
;SEND INFO YOUR NAME
;INFO FREE SPACE EXHAUSTED
;PID HAS NO NAME OR IS ILLEGAL
;DUPLICATE NAME
;UNKNOWN NAME
; ILLEGAL NAME
;NOTIFICATION THAT PID HAS BEEN DELETED
;SYSTEM SENDER CODE
;SENT BY [SYSTEM]IPCF
;SENT BY SYSTEM WIDE [SYSTEM]INFO
;SENT BY RECEIVER'S [SYSTEM]INFO
;SPECIAL MESSAGE RETURN FIELD
;MESSAGE WAS NOT DELIVERED
;PID OF SENDER
;PID OF RECEIVER
;POINTER TO MESSAGE BLOCK
;LOGGED IN DIR OF SENDER
;ENABLED CAPABILITIES OF SENDER
:CONNECTED DIRECTORY NUMBER OF SENDER
:POINTER TO ACCOUNT STRING OF SENDER
;POINTER TO LOGICAL LOCATION OF SENDER

;Possible values in word 0 of packet data block when received from the system
.IPCSU==:26
.IPCSL==:27
.IPCSA==:30
.IPCDS==:31
.IPCLI==:32
.IPCLO==:33
. IPCKP==: 34
.IPCCA==:35
.IPCTR==:36
.IPCMS==:37
.IPCRS==:40
.IPCSR==:41

;SPOOL MESSAGE CODE FROM IPCC
;LOGOUT MESSAGE CODE FROM IPCC
;RESOURCE ALLOCATOR MESSAGE CODE
;STRUCTURE DISMOUNT MESSAGE CODE FROM IPCC
;LOGIN MESSAGE CODE FROM IPCC
;LOGOUT MESSAGE TO CREATOR FROM IPCC
;DELETED PID MESSAGE FROM IPCC
;CREATE AN APPLICATION (RESERVED FOR TPS USE)
;REQUEST FROM TAPE
;STRUCTURE MOUNT MESSAGE CODE FROM IPCC
iSTRUCTURE REMOVAL MSSG CODE FROM IPCC
i Archive message code from IPCC

.IPCSS==:15

;IPCC REQUEST TO INFO TO DELETE PIDS

B-39

MONSYM

; [SYSTEM]

INFO DEFINITIONS

.IPCIO==:O
.IPCIW==:l
.IPCIG==:2
.IPCII==:3
.IPCIJ==:4
.IPCIK==:5
.IPCIS==:15
.IPCI1==:1
. IPCI2==: 2

iCODE"FUNCTION
iFIND PID FOR NAME
iFIND NAME FOR PID
iASSIGN NAME TO PID
iASSIGN NAME TO PID
iNOTIFY WHEN SPECIFIED PID IS KILLED
iMONITOR DROP PID FUNCTION
iPID TO GET A COpy OF REPLY
iSTART OF DATA

iJFNS
JS%DEV==:7B2
iDEVICE FIELD OUTPUT CONTROL
;DIRECTORY FIELD OUTPUT CONTROL
JS%DIR==:7B5
JS%NAM==:7B8
iNAME FIELD OUTPUT CONTROL
JS%TYP==:7B11
iFILE TYPE FIELD OUTPUT CONTROL
JS%GEN==:7B14
iGENERATION FIELD OUTPUT CONTROL
JS%PRO==:7B17
iPROTECTION FIELD OUTPUT CONTROL
JS%ACT==:7B20
iACCOUNT FIELD OUTPUT CC~TROL
iVALUES FOR ABOVE 7 FIELDS:
.JSNOF==:O
iNEVER OUTPUT FIELD
.JSAOF==:l
iALWAYS OUTPUT FIELD
.JSSSD==:2
iSUPPRESS IF SYSTEM DEFAULT
JS%TMP==:lB21
iRETURN iT IF TEMP FILE
JS%SIZ==:lB22
iRETURN SIZE
iRETURN CREATION DATE
JS%CDR==:lB23
JS%LWR==:lB24
iRETURN LAST WRITE
iRETURN LAST READ
JS%LRD==:lB25
iAC 2 HOLDS STRING POINTER NOT JFN
JS%PTR==:lB26
JS%ATR==:lB27
iRETURN ATTRIBUTES
JS%AT1==:lB28
iRETURN 1 SPECIFIC ATTRIBUTE
iRETURN iOFF-LINE IF OFFLINE FILE
JS%OFL==:lB29
JS%PSD==:lB32
iPUNCTUATE SIZE AND DATE
JS%TBR==:lB33
iTAB BEFORE FIELDS RETURNED
JS%TBP==:lB34
iTAB BEFORE POSSIBLE FIELDS
JS%PAF==: 1B35
iPUNCTUATE ALL FIELDS
JS%SPC==: DON'T CONVERT EBCDIC TO ASCII
T3/0=> CONVERT
iREAD USER LABELS
.MORDL==:46
T2/ GETS LABEL I.D.
i
T3/ SP TO WHERE 76 CHARCTERS ARE TO BE PLACED
.MOWUL==:47
iWRITE USER LABELS
T2/ LABEL I.D.
i
T3/ SP TO 76 CHARACTERS OF DATA
.MORLI==:50
iREAD LABEL INFORMATION FOR MT
.MOMTP==:l
iTYPE OF LABEL
i VOLUME Nl'<.ME
.MOMVN==:2
.MOMOW==:3
iOWNER
.MOMFM==:4
iFORMAT OF TAPE FILE
.MOMRL==:5
iRECORD LENGTH
.MOMBL==:6
iBLOCK LENGTH
.MOMCD==:7
iCREATION DATE
.MOMED==:10
iEXPIRATION DATE
.MOMFI==:ll
iFiLE NAME
.MOMGN==:12
iGENERATION NUMBER
. MOt-1GV==: 13
iGENERATION VERSION NUMBER
.MOVMB==:14
iVALUE OF MODE BYTE
.MOSMV==:51
iSET MODE VALUE
.TPFST==:O
iSTREAM MODE
.TPFCP==:1
iALL FORMATTING CONTROLS PRESENT
.TPFFC==:2
iFORTRAN CONTROLS PRESENT
.TPFNC==:3
iNO CONTROLS PRESENT
B-46

MONSYIM

.TPFMX==:3
.MOSDS==:52
.MOPSI==:27
MO%MSG==:lBO
.MOSID==:27
. MOIEL==:30
.MOSHV==:45
.MOFMT==:l
.MOEPD==:2
.MOBSZ==:3
.MORSZ==:4

~MAX VALUE OF FIELD
;SET DEFERRED VOLUME-SWITCH MODE
;SET ERROR PSI FOR LPT AND CDR
;SUPPRESS STANDARD CTY MESSAGES
;SET REEL I.D .
;INHIBIT ERROR LOGGING
;SET HDRI AND HDR2 VALUES FOR MT
;OFFSET FOR FORMAT
;EXPIRATION DATE
iBLOCK SIZE
;RECORD SIZE

iDEF FOR IPCF MESSAGE SENT ON A VOLUME SWITCH OR OTHER CONDITION
:MESSAGE CODE IS .IPCTR. OFFSETS THAT FOLLOW ARE
:RELATIVE TO WORD CONTAINING .IPCTR .
. VMCOD==:O
.VMABT==:l
.VMICN==:2
.VMERR==:3
.VMVSM==:4
.VMSTS==:5
.VMUNL==:6
.VMREW==:7
.VSMTN==:l
.VSFLG==:2
VS%FLG==:-lB17
VS%WRT==:lBO
VS%COD==:777777
.VSMNV==:l
.VSFST==:2
.VSLST==:3
.VSMRV==:4
.VSFLS==:5
.VSCNT==:3

iCODE FOR THIS MESSAGE
: IS SUBCODE OF .IPCTR FUNCTION
i ABOR'r CLOSE
iINTERNAL ERROR (HOPEFULLY NOT USED)
:LABEL R/W ERROR
:VOLUl\1E SWITCH
iUNIT STATUS CHANGE (NOT USED YET)
iUNIT UNLOAD
;REWIND
iMT NUMBER
iFLAGS
;FLAGS PART OF WORD
iWRITE PREVIOUS VOLUME WAS OPENED FOR WRITE
iCODE
iMOUNT NTH VOLUME
iMOUNT FIRST VOLUME
iMOUNT LAST VOLUME
iMOUNT RELATIVE VOLUME NUMBER (SIGNED)
iFORCE LABELED TAPE VOLUME-SWITCH
iVOLUME NUMBER (SIGNED IF VS%MRV IS ON)

B-47

MONSYM

.MOLVF==:32
.MORVF==:33
.MOLTR==:34
.MORTR==:35
.MOSTS==:36
.MORST==:37
MO%LPC==l
MO%LCI==2
MO%LVF==4
MO%LVU==20
MO%RPE==40
MO%RCK==:l
MO%PCK==:2
MO%SCK==:4
MO%HEM==:10
MO%SFL==:20
MO%FNX==:lB17
MO%OL==:lB16
MO%HE==:lB15
MO%SER==:lB14
MO%IOP==:lB13
MO%EOF==:lB12
1B11
MO%FER==:lB10
MO%LCP==:lBO
MO%RLD==:lB1
.MOFLO==:40

;LOAD DEVICE'S VFU
;READ VFU FILE NAME
;LOAD TRANSLATION RAM
;READ RAM FILE NAME
iSET SOFTWARE STATUS
;READ SOFTWARE STATUS
;PAGE COUNTER OVERFLOW
;CHARACTER INTERRUPT (HARD ERROR)
;VFU ERROR.
PAPER MUST BE RE-ALIGNED
;LINE PRINTER HAS OPTICAL VFU
;RAM PARITY ERROR
;READ CHECK
;PICK CHECK
;STACK CHECK
;HOPPER EMPTY
;STACKER FULL
;NON-EXISTENT DEVICE
;DEVICE IS OFF-LINE
;HARDWARE ERROR
iSOFTWARE ERROR
iI/O IN PROGRESS
iEND OF FILE
iRESERVED
;FATAL ERROR
;LOWER CASE PRINTER
iFRONT-END WAS RELOADED
iFLUSH OUTPUT

;SEE SETJB FOR VARIOUS ARGUMENT VALUES
.MOSNT==:34
.MOSMN==:l
.MOSMY==:O
.MORNT==:35

iSET TTY NON-TERMINAL STATUS
iNO SYSTEM MESSAGES(I.E. SUPPRESS)
iYES SYSTEM MESSAGES (DEFAULT)
iREAD TTY NON-TERMINAL STATUS

iPTY MTOPR NUMBERS
.MOAPI==:24
MO%WFI==:lBO
MO%OIR==:lB1
MO%SIC==:77B17
.MOPIH==:25
.MONWI==:O
.MOWFI==:-l
.MOBAT==:26
.MOJCB==:l
.MONCB==:O

iASSIGN PTY INTERRUPT CHANNELS
iENABLE WAITING FOR INPUT
iENABLE OUTPUT IS WAITING
;SOFTWARE INTERRUPT CHANNEL
iTEST PTY INPUT HUNGRY
iNOT WAITING FOR INPUT
;WAITING FOR INPUT
;SET BATCH BIT
;JOB CONTROLLED BY BATCF
iJOB NOT CONTROLLED BY BATCH

B-48

MONSYM

iTTY MODE DEFINITIONS
.MORLW==:30
.MOSLW==:31
.MORLL==:32
.MOSLL==:33
.MOSIG==:36
.MORBM==:37

:READ WIDTH
SET 'WIDTH
iREAD LENGTH
iSET LENGTH
iSET "IGNORE INPUT WHEN INACTIVE" BIT
iREAD 128 CHARACTER BREAK MASK

i

MO%WNl==:776117,,777740
MO%WN2==:0
MO%WN3==:0
MO%WN4==:20

iBIT
iFOR
iFOR
iFOR

DEFINITIONS
ASCII CODES
ASCII CODES
ASCII CODES

FOR NON-FORMATTING CONTROL
40-777
100-137
137-177

MO%WFl==:001260,,000420
MO%WF2==:0
MO%WF3==:0
MO%WF4==:20

iFORMATTING CONTROL BITS
iFOR ASCII CODES 40-77
iFOR ASCII CODES 100-137
iFOR ASCII CODES 140-177

MO%WPl==:000400,,400
iPUNCTUATION BIT DEFINITIONS
MO%WP2==:777774,,001760 i FOR ASCII CODES 40-77
MO%WP3==:400000,,000760 i FOR ASCII CODES 100-137
MO%WP4==:400000,,000760 i FOR ASCII CODES 140-177
MO%WAl==:400
MO%WA2==:000003,,776000
MO%WA3==:377777,,777000
MO%WA4==:377777,,777020
.MOSBM==:40
.MORFW==:41
.MOSFW==:42
.MOXOF==:43
.MOOFF==:O
.MOONX==:l
.MORXO==:44
.MOSLC==:45
.MORLC==:46
.MOSLM==:47
.MORLM==:50
.MOTPS==:51
.MOPCS==:52
.MOPCR==:53

iALPHANUMERICS DEFINITIONS
i FOR ASCII CODES 40-77
i FOR ASCII CODES 100-137
i FOR ASCII CODES 140-177
iSET 128 CHARACTER BREAK MASK
iREAD FIELD WIDTH
iSET FIELD WIDTH
iSET/CLEAR XOFF/XON HANDLING
iTURN'OFF XON/XOFF PROCESSING
iTURN ON XON/XOFF PROCESSING
iREAD VALUE OF XOFF BIT
iSET LINE COUNTER
iREAD LINE COUNTER
iSET LINE COUNTER MAXIMUM
iREAD LINE COUNTER MAXIMUM
iPSI FOR NON-CONTROLLING TERMINAL
iSET PAGE PAUSE CHARACTER
iREAD PAGE PAUSE CHARACTER

iNET MTOPR NUMBERS
.MOACP==:20
.MOSND==:21
.MOSIN==:22
.MOAIN==:24
MO%NIN==:77B5
MO%FSM==:77B17

iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN
iTOPS20AN

iACCEPT CONNECTION ON SOCKET
iSEND ALL CURENTLY BUFFERED BYTES
iSEND INS/INR COMMAND
iASSIGN INS/INR AND FSM PSI CHANNELS
iINS/INR SOFTWARE INTERRUPT CHANNEL
iFSM CHANGE OF STATE INTERRUPT CHANNEL

iDEFINITIONS FOR DECNET
.MOACN==:24
MO%CDN==:777B8
MO%INA==:777Bli'
MO%DAV==:777B26
.MONCI==:777
.MOCIA==:776

iASSIGN CONNECT INTERRUPT CHANNEL
iCONNECT INTERRUPT CHANNEL
iINTERRUPT MESSAGE CHANNEL
iDATA AVAILABLE CHANNEL
iNO CHANGE
iCLEAR INTERRUPT ASSIGNMENT

.MORLS==:25

iREAD LINK STATUS
B-49

MONSYM

MO%CON==:lBO
MO%SRV==:lB1
MO%WFC==:lB2
MO%WCC==:lB3
MO%EOM==:lB4
MO%ABT==:lB5
MO%SYN==:lB6
MO%INT==:lB7
MO%LWC==:lB8
.MORHN==:26
.MORTN==:27
.MORUS==:30
.MORPW==:31
.MORAC==:32
.MORDA==:33
.MORCN==:34
.MORIM==:35
.MOSIM==:36
.MOROD==:37
.MOCLZ==:40
.MOCC==:41
.MORSS==:42
.MOANT==:43
.MOSNH==:44
.SHTTY==:l
.SHESC==:2
SH%LPM==:lBO

iLINK IS CONNECTED
iLINK LS A SERVER
iWAITING FOR A CONNECT
iWAITING FOR THIS LINK TO CONFIRM
iEOM PRESENT IN INPUT BUFFER
iCONNECTION ABORTED
iSYNCH DI RECIEVED
iINT MESSAGE AVAILABLE
iLINK WAS CONNECTED
iREAD HOST NAME
iREAD TASK NAME
iREAD USER DATA
iREAD PASSWORD
iREAD ACCOUNT
iREAD OPTIONAL DATA
iREAD CONNECT OBJECT NUMBER
iREAD INTERRUPT MESSAGE
iSEND INTERRUPT MESSAGE
iREAD OBJ-DESC OF CONNECTION
iCLOSE/REJECT A CONNECTION
iACCEPT A CONNECTION
iREAD SEGMENT SIZE
iATTACH NETWORK TERMINAL
iSET NETWORK HOST
iARG BLOCK - TTY IDENT
i - FLAGS"ESC CHAR
i FLAG - LOCAL PAGE MODE

iDEFINITIONS FOR ATS

iFUNCTION CODES FOR MTOPR ARE IN COLUMN 1
.MOAMO==:l
.MOAMM==:l
.MOADM==:2
.MOAAT==:2
MO%AER==:lBO
.MOASI==:3
MO%IFL==:777B8
.MOAAI==:O
.MOADI==:l
MO%IEV==:777B17
.MOADT==:O
.MOAST==:l
MO%ACH==:777777B35
.MORCD==:4
MO%WDV==:777B35
.MOALD==:O
.MOCHG==:l
.MOLST==:2
MO%ARM==:lBO
MO%MDA==:lB1
AT%OPN==:lBO
AT%TCL==: 1 B1
AT%DHT==:lB2
AT%TXF==:lB3
AT%UND==:lB4
AT%NAV==:lB5
AT%OFL==: 1B6
AT%FUL==:lB7
AT%UNS==:lB8
AT%REJ==:lB9
AT%MIE==:lBIO

iSET MODE WORD
;MESSAGE MODE
iDATA MODE
iACQUIRE TERMINAL
iHTN FIELD CONTAINS AN ERROR CODE
iENABLE INTERRUPTS
iFUNCTION TO BE PERFORMED
iASSIGN INTERRUPT CHANNEL
iDEASSIGN INTERRUPT CHANNEL
iEVENT BEING ASSIGNED OR DEASSIGNED
iDATA ARRIVAL
iSTATUS ARRIVAL
;CHANNEL NUMBER
iGET STATUS
iWHICH DEVICES TO REPORT ON
iALL TERMINALS
iTERMINALS WHOSE STATUS HAS CHANGED
iTERMINALS SPECIFIED IN LIST
iASK THE RESOURCE MANAGER
iMORE DATA AVAILABLE FOR THIS JFN
iHTN IS OPEN AND USABLE
iNRM CLOSED TERMINAL VIA STATUS-REPORT
iDEASSIGNING HTN
iTERMINAL IS XOFF'D
iDEVICE REQUESTED IS UNDEFINED
iDEVICE REQUESTED IS NOT AVAILABLE
iDEVICE REQUESTED IS OFFLINE
iSERVER IS FULL
iDEVICE TYPE IS UNSUPPORTED
iNODE NRM REJECTED THE REQUEST
iMONITOR INTERNAL ERROR (NODE OR HOST)
B-50

MONSYM

AT%STF==:lBll
;VT62 START-UP FAILED
AT%CRJ==:1B12
;CONNECTION WAS REJECTED
AT%NDP==:1B13
;DATA PIPE IS NOT OPEN
AT%SER==:777777B35 ;STATUS REPORT ERROR CODE
.MOADE==:5
;DEASSIGN TERMINAL
MO%AAB==:lBO
;DON'T SEND REMAINING DATA
;FUNCTION CODES FOR AYDIN DISPLAY MTOPR
.MOFLE==:O
.MORER==:1
. MOWAT==:2
MO%RWC==:777777B17
MO%LER==:777777B35

;FLUSH ERRORS
;RETURN AYDIN ERROR CODE
;WAIT FOR ACTIVITY TO STOP
;REMAINING WORD COUNT
;LAST AYDIN ERROR CODE

B-51

(18 BITS)

MONSYM

;DEFS FOR MTU JSYS
;FUNCTIONS:
.MTNVV==:l
.MTCNT==:O
.MTCOD==:l
.MTPTR==:2

;SET NO VOLUME VALID
;COUNT WORD
;ERROR CODE
;SP TO OPERATOR RESPONSE

.MTRAL==:2
.MTVLl==:l
.MTVL2==:2
.MTHDl==:3
.MTHD2==:4
.MTASI==:3
.MTPHU==:l
.MTNUL==:-l
.MTCVV==:4

;READ ALL LABELS
;SP TO VOLI AREA
;SP TO VOL2 AREA
;SP TO HDRI AREA
;SP TO HDR2 AREA
;RETURN MT TO MTA ASSOCJATION
;RETURN MTA UNIT NUMBER HERE
;NO ASSIGNMENT CODE
;CLEAR VV

B-52

MONSYM

iMUTIL JSYS FUNCTION CODES
.MUENB==:l
.MUDIS==:2
.MUGTI==:3
.MUCPI==:4
.MUDES==:5
.MUCRE==:6
.MUSSQ==:7
.MUCHO==:10
.MUFOJ==:ll
.MUFJP==:12
.MUFSQ==:13
.MUFFP==:15
.MUSPQ==:16
.MUFPQ==:17
.MUQRY==:20
.MUAPF==:21
.MUPIC==:22
.MUDFI==:23
.MUSSP==:24
.MURSP==:25
.MUMPS==:26
.MUSKP==:27
.MURKP==:30
.MUSPS==:31

iENABLE PID FOR RECEIVING
iDISABLE PID FROM RECEIVING
iGET PID OF [SYSTEMJINFO
iCREATE A PRIVATE INFO FOR A JOB
iDESTROY A PID
iCREATE A PID
iSET SEND AND RECEIVE QUOTAS
iCHANGE OWNER OF A PID
iFIND OWNER'S JOB NUMBER
iFIND JOB'S PIDS
iFIND SEND AND RECEIVE QUOTAS
iFIND FORK'S PIDS
iSET PID QUOTA
iFIND PID QUOTA
iQUERY
iASSOCIATE A PID WITH A FORK
iPUT PID ON AN INTERRUPT CHANNEL
iDEFINE PID OF [SYSTEMJINFO
iSET SYSTEM PID TABLE
iREAD SYSTEM PID TABLE
iGET MAXIMUM PACKET SIZE
iSET PID TO RECEIVE KILLED PID MESSAGE
iREAD PID THAT RECEIVES KILLED PID MESSAGES

iGet system maximum packet size

iSYSTEM PID TABLE INDEX VALUES
.SPIPC==:O
.SPINF==:l
.SPQSR==:2
.SPMDA==:3
.SPOPR==:4
.SPNSR==:5

iPID
iPID
iPID
iPID
i PID
i PID

OF
OF
OF
OF
OF
OF

IPCC
INFO
QUASAR
QSRMDA
OPERATOR JOB (ORION)
NETSER

iNODE
.NDSLN==:O
.NDGLN==:l
.NDNOD==:O
.NDSNM==:2
.NDMAX==:377
.NDGNM==:3
.NDSLP==:4
.NDPRT==:O
.NDCLP==:5
.NDFLP==:6
ND%LPR==lBO
ND%LPA==lBl
.NDSNT==:7
.NDNNO==:O
.NDMSK==:l
.NDGNT==:lO
.NDNND==:O
.NDCNT==:l
.NDBKl==2

iSET LOCAL NODE NAME
iGET LOCAL NODE NAME
iPOINTER TO NODE NAME
iSET LOCAL NODE NUMBER
iMAXIMUM NODE NUMBER
iGET LOCAL NODE NUMBER
iSET LOOPBACK ON PORT
iPORT TO SET IN LOOPBACK
iCLEAR LOOPBACK ON PORT
iFIND LOOPBACK PORT
iLOOPBACK RUNNING
iLOOPBACK ASSIGNED TO PORT
iSET NETWORK TOPOLOGY INFORMATION
iNUMBEP OF NODES REPRESENTED IN BIT MASK
iFIRST WORD OF REACHABLE NODES BIT MASK
iGET NETWORK TOPOLOGY INFORMATION
iNUMBER OF NODE BLOCK POINTERS FOLLOWING
iNUMBEP OF WORDS IN A NODE BLOCK
iFIRST ADDRESS OF A NODE BLOCK

iNODE BLOCK DEFINITIONS
iPOINTER TO ASCIZ NODE NAME
.NDNAM==:O
iNODE STATE
.NDSTA==:l
B-53

MONSYM

·NDSON==:O
•. NDSOF==: 1
.NDNXT==:2
.NDNBS==:3

;ON
;OFF
;POINTER TO ASCIZ NEARER NEIGHBOR STRING
;NODE BLOCK SIZE

.NDSIC==:ll
.NDCHN==:O
.NDCIC==:12
.NDGVR==:13
.NDNVR==:O
.NDCVR==:l
.NDRVR==:2

;SET TOPOLOGY CHANGE INTERRUPT CHANNEL
;CHANNEL NUMBER
;CLEAR NETWORK TOPOLOGY INTERRUPT
;GET NSP VERSION INFORMATION
;NUMBER OF VERSIONS RETURNED
;POINTER TO COMMUNICATONS VERSION BLOCK
;POINTER TO ROUTING VERSION BLOCK

.NDVER==:O
.NDECO==:l
.NDCST==:2
.NDGLI==:14
.NDNLN==:O
.NDCNT==:l

;VERSION NUMBER
;ECO NUMBER
;CUSTOMER LEVEL
;GET LINE INFORMATION
;<# OF ENTRIES FOLLOWING>,,<# LINE RETURNED>
;NUMBER OF WORDS IN A LINE BLOCK

; LINE BLOCK DEFINITION
.NDLNM==:O
.NDLST==:l
.NDLON==:l
.NDLOF==:2
.NDLCN==:3
.NDLCB==:4
.NDLND==:2
.NDLSZ==:3
.NDVFY==:15
.NDFLG==:l
ND%EXM==:lBO
.NDRNM==:16

;NSP PORT (LINE) NUMBER
;STATE OF LINE
;ON
;OFF
;CONTROLLER LOOPBACK
;CABLE LOOPBACK
;BYTE POINTER NODE AT END OF LINE
;SIZE OF BLOCK
;VERIFY NODE NAME
;FLAGS RETURNED BY MONITOR
;NODE SPECFIED EXACTLY MATCHES A KNOWN NODE
;GIVEN A NODE NUMBER, RETURN THE NODE NAME

;NOUT
NO%MAG==:lBO
NO%SGN==:lBl
NO%LFL==:lB2
NO%ZRO==:lB3
NO%OOV==:lB4
NO%AST==:lB5
NO%COL==:177B17
NO%RDX==:777777

;OUTPUT MAGNITUDE
;OUTPUT SIGN
;LEADING FILLER
;FILL WITH ZERO'S
;OUTPUT ON COLUMN OVERFLOW
;OUTPUT ASTERISKS ON OVERFLOW
;NUMBER OF COLUMNS TO USE
;RADIX

;NTMAN% ARGUMENT BLOCK
.NTCNT==:O
.NTENT==:l
.NTNOD==:O
.NTLIN==:l
.NTLOG==:2
.NTCKT==:3
.NTMOD==:4
.NTEID==:2
.NTFNC==:3
LOWFNC==:-2
.NTMAP==:-2
.NTREX==:-l
.NTSET==:O
.NTCLR==:l
.NTZRO==:2

;NUMBER OF WORDS IN ARGUMENT BLOCK
;ENTITY
;NODE
;LINE
;LOGGING
;CIRCUIT
;MODULE
;BYTE POINTER TO ENTITY ID
; FUNCTION
;VALUE OF FIRST FUNCTION VALUE
;MAP NODE NUMBER/NODE NAME
;RETURN EXECUTOR NODE ID
;SET PARAMETER
;CLEAR PARAMETER
;ZERO ALL COUNTERS
B-54

MONSYM

.NTSHO==:3
.NTSZC==:4
.NTRET==:5
.NTSEL==:4

iSHOW SELECTED ITEMS
iSHOW AND ZERO ALL COUNTERS
iRETURN LIST OF ITEMS
iSELECTION CRITERION

iSELECTORS FOR .NTSHO FUNCTION
.NTSUM==:O
.NTSTA==:l
.NTCHA==:2
.NTCOU==:3
.NTEVT==:4

iSUMMARY
iSTATUS
iCHARACTERISTICS
iCOUNTERS
iEVENT

iSELECTORS FOR .NTRET FUNCTION
iKNOWN ITEMS
iACTIVE ITEMS
iLOOP

.NTKNO==:-l
.NTACT==:-2
.NTLOP==:-3
.NTQUA==:5
.NTBPT==:6
.NTBYT==:7
.NTERR==:lO

iBYTE POINTER TO FUNCTION QUALIFIER
iBYTE POINTER TO PARAMETER OR LIST DATA
iNUMBER OF BYTES IN RETURNED DATA
iERROR RETURN STATUS

iMISCELLANEOUS NTMAN% SYMBOLS
.NTARG==:ll
.NDALN==:2
.NDPLN==:2
.NDAMX==:"D255
.NDNMX==:7

iLENGTH OF NTMAN% ARGUMENT BLOCK
iNUMBER OF BYTES IN A NODE ADDRESS
iNUMBER OF BYTES IN A PARAMETER NUMBER
iMAXIMUM NODE ADDRESS
iMAXIMUM NUMBER OF BYTES IN A NODE NAME

B-55

MONSYM

OF%FDT==:lB33

iFORCE DATE UPDATE

iOLCNV -- SEE IDCNV FOR BITS
iODTIM
OT%NDA==:lBO
OT%DAY==:lBl
OT%FDY==:lB2
OT%NMN==:lB3
OT%FMN==:lB4
OT%4YR==:lB5
OT%DAM==:lB6
OT%SPA==:lB7
OT%SLA==: lB8
OT%NTM==:lB9
OT%NSC==:lBlO
OT%12H==:lBll
OT%NCO==:lB12
OT%TMZ==:lB13
OT%SCL==:lB17

iDa NOT OUTPUT DATE
iOUTPUT DAY OF WEEK
iOUTPUT NUMERIC MONTH
iOUTPUT NUMERIC MONTH
iOUTPUT MONTH IN FULL
iOUTPUT 4-DIGIT YEAR
iOUTPUT DAY AFTER MONTH
iOUTPUT SPACES IN DATE
iOUTPUT SLASHES IN DATE
iDa NOT OUTPUT TIME
iDa NOT OUTPUT SECONDS
iOUTPUT l2-HOUR FORMAT
iDa NOT OUTPUT COLON
iOUTPUT TIME ZONE
iSUPPRESS COLUMNIZATION

iODTNC -- SEE IDCNV FOR BITS
iOPENF
OF%BSZ==:77B5
OF%MOD==:17B9
OF%HER==:lB18
OF%RD==:lB19
OF%WR==:lB20
OF%EX==:lB2l
OF%APP==:lB22
OF%RDU==:lB23
OF%THW==:lB25
OF%AWT==:lB26
OF%PDT==:lB27
OF%NWT==:lB28
OF%RTD==:lB29
OF%PLN==:lB30
OF%DUD==:lB3l
OF%OFL==:lB32
OF%FDT==:lB33
OF%RAR==:lB34

iBYTE SIZE
iMODE
iHALT ON 10 ERROR
iREAD
iWRITE
iEXECUTE (RESERVED FOR THE FUTURE)
iAPPEND
iREAD UNRESTRICTED
iTHAWED
iALWl\YS WAIT
iPRESERVE DATES
iNEVER WAIT
iRESTRICTED
iSET TO DISABLE LINE NUMBER CHECKING FOR
i NON-LINE NUMBER FILES
iDON'T UPDATE TO DISK BY DDMP
iALLOW OPENING THE DEVICE EVEN IF OFFLINE
iFORCE DATE UPDATE
i W2it if file is of~-line

B-56

MONSYM

iPDVOP MANIPULATES PROGRAM DATA VECTORS
iFUNCTION CODES ACCEPTED IN ACl:
.POGET==:O
.POADD==:l
.POREM==:2
.PONAM==:3
.POVER==:4
.POLOC==:5

;GET A SET OF PDVAS (PROGRAM DATA VECTOR ADDRESS
;ADD A SET OF PDVAS
;REMOVE A SET
;GET NAME OF A PROGRAM
;GET VERSION NUMBER OF A PROGRAM
;LOCATE PDVS HAVING SPECIFIED NAME

;ARG BLOCK OFFSETS FOR BLOCK ADDRESSED BY AC2
.POCTl==:O
.POPHD==:l
.POCT2==:2
.PODAT==:3
.POADR==:4
.POADE==:5

;SIZE OF ARG BLOCK INCLUDING THIS WORD
;PROCESS HANDLE
;SIZE OF DATA BLOCK (AND SIZE OF RETURNED DATA)
;ADDRESS OF DATA BLOCK
;SMALL ADDRESS OF DATA VECTOR
;LARGE ADDRESS OF DATA VECTOR ADDRESS RANGE

;OFFSETS DEFINED WITHIN PROGRAM DATA VECTORS
.PVCNT==:O
.PVNAM==:l
.PVSTR==:2
.PVREE==:3
.PVVER==:4
.PVMEM==:5
.PVSYM==:6
.PVCTM==:7
.PVCVR==:lO
.PVLTM==:ll
.PVLVR==:12
.PVMON==:13
.PVPRG==:14
.PVCST==:15

;Length of vector
;Address of a word-aligned ASCIZ program name
;Program starting addrpss
;Program reenter address
;Program version number
;Address of a block describing program memory
;Address of the program symbol table
;Time of program compilation
;Version number of compiler
;Time of program loading
;Vprsion number of LINK
;Address of a monitor data block
;A~dress of a program data block
;Address of a customer-defined block

;PMAP BIT DEFINITIONS
PM%CNT==:lBO
PM%MVP==:lBl
PM%RD==:lB2
PM%WT==:lB3
PM%WR==:lB3
PM%EX==:lB4
PM%RWX==:7B4
PM%PLD==:lB5
PM%IND==:lB6
PM%TPU==:IB8
PM%CPY==:lB9
PM%EPN==:IBIO
PM%ABT==:IBIl
PM%RPT==:777777B35

;RH WORD CONTAINS A COUNT
;MOVE PAGE INSTEAD OF INDIRECT POINTER
; (NOT IMPLEMENTED
;READ
;WRITE
; (ANOTHER NAME FOR ABOVE)
;EXECUTE (RESERVED FOR THE FUTURE)
iCONVENIENT ABBREV FOR RD+WT+EX
;PRELOAD PAGES BEING MAPPED
;USE INDIRECT PTRS (RESERVED FOR THE FUTURE)
;TRAP TO USER
; (NOT IMPLEMENTED -- OBSOLETE)
;COPY ON WRITE
;EXTENDED PAGE NUMBER (18 BITS)
; ABOR~~ UNMAP.
; REPE1\T COUNT

;PMCTL - PHYSICAL MEMORY CONTROL
.MCRCE==:O
.MCSCE==:l
.MCCST==:O
MC%CEN==:l

;READ CACHE ENABLE
;SET CACHE ENABLE
;ARGLIST OFFSET FOR CACHE STATE
;CACHE ENABLED
B-57

MONSYM

.MCRPS==:2
.MCSPS==:3
.MCPPN==:O
.MCPST==:l
.MCPSA==:O
.MCPSS==:l
.MCPSO==:2
.MCPSE==:3
.MCRME==:4
.PMMER==:l
.PMMTP==:O
.PMMRG==:l
.PMMSY==:2
.PMMBN==:3
.PMMSB==:4
.PMMEA==:5
.PMMSN==:6
.PMMNS==:4

iREAD PAGE STATUS
iSET PAGE STATUS
iARGLIST OFFSET FOR PHYSICAL PAGE NUMBER
iARGLIST OFFSET FOR PAGE STATE
iPAGE AVAILABLE
iPAGE IN TRANSITION STATE
iPAGE OFFLINE
iPAGE OFFLINE DUE TO ERROR
iREAD MEMORY ERROR INFORMATION
iMOS MEMORY ERROR
iENTRY HEADER AND TYPE
iERROR REGISTER
iSYNDROME
iBLOCK NUMBER
iSPARE BIT NUMBER
iERROR ADDRESS
iSTART OF SERIAL NUMBERS
i# OF SERIAL NUMBERS TO STORE

iPRARG - PROCESS ARGUMENTS
iFUNCTION CODE DEFINITIONS
.PRARD==:l
.PRAST==:2

iREAD ARGUMENT BLOCK

iSET ARGUMENT BLOCK

8-58

MONSYf~

iRCUSR AND RCDIR
i

FLAGS SUPPLIED ON CALL

RC%PAR==:lB14
RC%STP==:lB15
RC%AWL==:lB16
RC%EMO==:lB17
i

;PARTIAL RECOGNITION IS ALLOWED
iSTEP WILDCARD (RCDIR ONLY)
iALLOW WILDCARDS (RCDIR ONLY)
iEXACT MATCH ONLY

FLAGS RETURNED

RC%DIR==lBO
RC%ANA==lBl
RC%RLM==lB2
RC%NOM==:lB3
RC%AMB==:lB4
RC%NMD==:lB5
RC%WLD==:lB6

iFILES-ONLY DIRECTORY
iALPHANUMERIC ACCOUNTS ALLOWED
iREPEAT LOGIN MESSAGE
iNO MATCH FOUND
iAMBIGUOUS
iNO MORE DIRS - RETURNED IF STP IS REQUESTED
iWILDCARD DIR WAS INPUT

iRCVOK
.RCFCJ==:O
.RCUNO==:l
.RCCDR==:2
.RCRQN==:3
.RCNUA==:4
.RCARA==:5
.RCCAP==:6
.RCTER==:7
.RCRJB==:lO

iFUNCTION CODE"
JOB NUMBER
iUSER NUMBER
iCONNECTED DIRECTORY
iREQUEST NUMBER
;NUMBER OF USER ARGS
iPOINTER TO USER ARGS
iCURRENT CAPABILITIES
iTERMINAL NUMBER
iREQUESTED JOB

iRDTTY AND TEXTI
RD%BRK==:lBO
RD%TOP==:lBl
RD%PUN==:lB2
RD%BEL==:lB3
RD%CRF==:lB4
RD%RND==:lB5
RD%JFN==:lB6
RD%RIE==:lB7
RD%BBG==:lB8
RD%BEG==:lB9
RD%RAI==:lBIO
RD%SUI==:lBll
RD%BTM==:lB12
RD%BFE==:lB13
RD%BLR==:lB14

iBREAK ON REGULAR BREAK SET
;BREAK ON TOPSIO BREAK SET
iBREAK ON PUNCTUATION
iBREAK ON END OF LINE
iSUPPRESS CR (RETURNS LF ONLY)
iRETURN IF NOTHING TO DELETE
iJFNS GIVEN FOR SOURCE
iRETURN ON INPUT (BUFFER) EMPTY
iBEGINNING OF (DEST) BUFFER GIVEN
iRETURN IMMEDIATELY WHEN TYPIST EDITS TO .RDBKL
iRAISE LOWERCASE INPUT
iSUPPRESS AU INDICATION
iBREAK CHARACTER TERMINATED INPUT
iRETURNED BECAUSE BUFFER EMPTY
iBACKUP LIMIT REACHED

iTEXTI ARG BLOCK
.RDCWB==:O
.RDFLG==:l
.RDIOJ==:2
.RDDBP==:3
.RDDBC==:4
.RDBFP==:5
.RDRTY-==:6
.RDBRK==:7
.RDBKL==:lO

iCOUNT OF WORDS IN BLOCK
iFLAGS
i 10 JFNS
iDEST BYTE POINTER
iDEST BYTE COUNT
iTOP OF BUFFER POINTER
;RETYPE (AR) POINTER
iBREAK SET MASK POINTER
iBACKUP LIMIT POINTER

B-59

MONSYM

;RFSTS
RF%LNG==:lBO
RF%PRH==:777777B35

iLONG FORM OF RFSTS CALL, ARG BLOCK IN 2
iPROCESS HANDLE

;RFSTS ARG BLOCK
.RFCNT==:O
.RFPSW==:l
.RFPFL==:2
.RFPPC==:3
.RFSFL==:4
RF%EXO==lBO

iXWD COUNT OF WORDS RETURNED,
i MAXIMUM WORDS TO RETUHN
iPROCESS STATUS WORD
iPROCESS' PC FLAGS
iPROCESS' PC
iSTATUS FLAGS FOR PROCESS:
iPROCESS IS EXECUTE-ONLY

iPROCESS STATUS WORD
RF%FRZ==:lBO
RF%STS==:377777B17
.RFRUN==:O
.RFIO==:l
.RFHLT==:2
.RFFPT==:3
.RFWAT==:4
.RFSLP==:5
.RFTRP==:6
.RFABK==:7
RF%SIC==:777777B35

iPROCESS IS FROZEN
iPROCESS STATUS CODE
iRUNNABLE
iDISMISSED FOR I/O
iHALTED
iFORCED PROCESS TERMINATION
iWAITING FOR INFERIOR PROCESS
iSLEEP
iJSYS TRAPPED
iADDRESS BREAK FREEZE
iSOFTWARE INTERRUPT CHANNNEL

iRFTAD/SFTAD
.RSWRT==:O
.RSCRV==:l
.RSREF==:2
.RSCRE==:3
.RSTDT==:4
.RSNET==:5
.RSFET==:6

iWRITE DATE WORD
iCREATION DATE WORD
iREFERENCE DATE WORD
iINTERNAL SYSTEM WRITE DATE WORD
i
i

Tape write date word
Online expiration date/interv8l word
Offline expiration date/interval word

iRMAP
RM%RD==lB2
RM%WR==:lB3
RM%EX==:lB4
RM%PEX==:lB5
RM%CPY==:lB9

iREAD ACCESS ALLOWED
iWRITE ACCESS ALLOWED
iEXECUTE ACCESS ALLOWED
iPAGE EXISTS
iCOPY ON WRITE

iRSMAP/SMAP
SM%RD==:lB2
SM%WR==:lB3
SM%EX==:lB4
SM%IND==:lB6

iREAD ACCESS ALLOWED
iWRITE ACCESS ALLOWED
iEXECUTE ACCESS ALLOWED
iINDIRECT POINTER

iRPACS/SPACS BIT DEFINITIONS
PA%RD==:lB2
PA%WT==:lB3
PA%WR==:lB3
PA%EX==:lB4

iREAD ACCESS ALLOWED
iWRITE ACCESS ALLOWED
i (ANOTHER NAME FOR ABOVE)
iEXECUTE ACCESS ALLOWED
B-60

MONSY:M

PA%PEX==:1B5
PA%IND==:1B6
PA%TPU==:1B8
PA%CPY==:1B9
PA%PRV==:1B10
P1%RD==:1B20
P1%WR==:1B21
P1%WT==:1B21
P1%EX==:1B22
P1%PEX==:1B23
P1%CPY==:1B27

i
(RESERVED FOR THE FUTURE)
iPAGE EXISTS
iINDIRECT POINTER
iTRAP TO USER
i
(NOT IMPLEMENTED -- OBSOLETE)
iCOPY ON WRITE
iPRIVATE
iREAD ACCESS ALLOWED IN 1ST POINTER
iWRITE ACCESS ALLOWED IN 1ST POINTER
i (ANOTHER NAME FOR ABOVE)
iEXECUTE ACCESS ALLOWED IN 1ST POINTER
i
(RESERVED FOR THE FUTURE)
iPAGE EXISTS IN 1ST POINTER
iCOPY-ON-WRITE IN 1ST POINTER

B-61

MONSYM

;RSCAN
.RSINI==:O
.RSCNT==:l

~MAKE RESCAN BUFFER AVAILABLE FOR INPUT
;COUNT CHARACTERS LEFT TO READ FROM
; RESCAN BUFFER

;RTIW
RT%DIM==:lBO
RT%PRH==:777777

;DEFERRED TERMINAL INTERRUPT MASK GIVEN
;PROCESS HANDLE

;SCTTY
.SCRET==:O
.SCSET==:l
.SCRST==:2

;RETURN DESIGNATOR (CTTY) FOR FORK
;SET SCTTY FOR FORK
;CLEAR FORK CTTY (RESTORE JOB CTTY)

;SCVEC
.SVEAD==:O
.SVINE==:l
.SVGET==:2
.SV40==:3
.SVRPC==:4
.SVMAK==:5
.SVCST==:6

iENTRY ADDRESS
;INITIAL ENTRY FOR SETUP
;ENTRY ADDRESS FOR GET SHARE FILE ROUTINE
;ADDRESS TO GET LOCATION 40
;ADDRESS TO GET RETURN PC
;ENTRY FOR MAKE SHARE FILE ROUTINE
;2 WORD BLOCK FOR CONTROL-C/START PROCESSING

iSDVEC

.SDEAD==:O
.SDINE==:l
.SDVER==:2
.SDDMS==:3
.SDRPC==:4

;ENTRY ADDRESS
;INITIAL ENTRY
;DMS VERSION
;ADDRESS TO STORE DMS JSYS
;ADDRESS TO STORE RETURN PC

8-62

MONSYI~

;SETJB FUNCTION CODES
.SJDEN==:O
.SJDDN==:O
.SJDN2==:1
.SJDN5==:2
.SJDN8==:3
.SJD16==:4
.SJD62==:5
.SJPAR==:l
.SJPRO==:O
.SJPRE==:l
.SJDM==:2
.SJDDM==:O
.SJDMC==:l
.SJDM6==:2
.SJDMA==:3
.SJDM8==:4
.SJDMH==:5
.SJRS==:3
.SJDFS==:4
.SJSPI==:O
.SJSPD==:l
.SJSRM==:5
.SJT20==:6
.SJDFR==:7
.SJRFA==:O
.SJRWA==:l
.SJBAT==:10
.SJLLO==:11

;SET DEFAULT MAGTAPE DENSITY
;SYSTEM DEFAULT DENSITY
;200 BPI
;556 BPI
;800 BPI
;1600 BPI
;6250 BPI
;SET DEFAULT MAGTAPE PARITY
;ODD PARITY
;EVEN PARITY
;SET DEFAULT MAGTAPE DATA MODE
;SYSTEM DEFAULT DATA MODE
;CORE DUMP MODE
;SIX BIT BYTE MODE (FOR 7-TRACK DRIVES)
;ANSI ASCII MODE (7 BITS IN 8 BIT BYTE)
;INDUSTRY COMPATIBLE MODE
;HI-DENSITY MODE (9 EIGHT BIT
; BYTES IN 2 WORDS)
;SET DEFAULT MAGTAPE RECORD SIZE
;SET DEFERRED SPOOLING
;IMMEDIATE MODE SPOOLING
;DEFERRED MODE SPOOLING
;SET JOB SESSION REMARK
;DECLARE WHETHER TOPS20 COMMAND LEVEL OR NOT
; Set default job retrieval mode
; OPENF should always fail
; OPENF should always request & wait
;SET BATCH FLAGS AND STREAM
;SEE .JIBCH FOR FIELD DEFINITIONS
;SET JOB LOCATION

;SFORK
SF%CON==:lBO
SF%PRH==:777777B35

;CONTINUE PROCESS, IGNORE PC IN AC2
;PROCESS HANDLE

; SFUST
.SFAUT==:O
.SFLWR==:l

;SET AUTHOR STRING
;SET LAST WRITER STRING

B-63

MONSYM

iSMON FUNCTION CODES AND BIT DEFINITIONS (SYSTEM FLAGS)
.SFFAC==:O
.SFCDE==:l
.SFCDR==:2
.SFMST==:3
.SFRMT==:4
.SFPTY==:5
.SFCTY==:6
.SFOPR==:7
. SFLCL==: 10
.SFBTE==:ll
.SFCRD==:12
.SFNVT==:13
.SFWCT==:14
.SFWLC==:15
.SFWRM==:16
.SFWPT==:17
.SFWNV==:20
.SFUSG==:21
.SFFLO==:22

iALLOW FACT ENTRIES
iCHECKDISK FOUND ERRORS
iCHECKDISK RUNNING
iMANUAL START IN PROGRESS
iREMOTE LOGINS ALLOWED
iPTY LOGINS ALLOWED
iCTY LOGIN ALLOWED
iOPERATOR IN ATTENDANCE
iLOCAL LOGINS ALLOWED
iBIT TABLE ERRORS FOUND ON STARTUP
iUSER CAN CHANGE DIRECTORY CHARACTERISTICS
iTOPS20AN iNVT LOGIN ALLOWED
iWHEEL LOGIN ON CTY ALLOWED
iWHEEL LOGIN ON LOCAL TVRMINALS ALLOWED
iWHEEL LOGIN ON REMOTE TERMINALS ALLOWED
iWHEEL LOGIN ON PTY'S ALLOWED
iTOPS20AN iWHEEL LOGIN ON NVT'S ALLOWED
iUSAGE FILE IN USE
iFULL LATENCY OPTIMIZATION
iCAUTION: SETTING THIS REQUIRES THAT THE
SYSTEM BE AT REVISION LEVEL 10, AND
THAT RH20 BOARD M8555 BE AT REVISION LEVEL I
OTHERWISE, THE FILE-SYSTEM MAY BE DAMAGED .

iMAGTAPE ALLOCATION ENABLED
. SFMTA==:23
.SFMSO==:24
iSYSTEM MESSAGE LEVEL 0
.SFMSl==:25
iSYSTEM MESSAGE LEVEL 1
iBELOW ARE FUNCTION CODES THAT DO NOT MAP DIRECTLY INTO BITS
.SFNTN==:44
.SFNDU==:45
.SFNHI==:46
.SFTMZ==:47
.SFLHN==:50
.SFAVR==:51
.SFSTS==:52
.SFSOK==:53
.SFMCY==:54
.SFRDU==:55
.SFACY==:56
.SFRTW==:57
.SFTDF==:60
MT%UUT==lBO
.SFWSP==:61

iTOPS20AN iNETWORK ON/OFF CONTROL
iTOPS20AN iNET DOWN/UP REQUEST
iTOPS20AN iNET HOST TABLE INITIALIZE
iSET TIME ZONE THIS SYSTEM IS IN
iTOPS20AN iSET LOCAL HOST NUMBER OF THIS NET SITE
iACCOUNT VALIDATION ON/OFF
iENABLE/DISABLE STATUS REPORTING
iGETOK/GIVOK DEFAULT SETTING
iSET MAX ORDINARY OFFLINE EXP PERIOD
iREAD DATE UPDATE FUNCTION
iSET MAX ARCHIVE EXP PERIOD
iSET [NO] RETRIEVAL WAITS NON-O => NO WAIT
iTAPE MOUNT CONTROLS
iUNLOAD UNREADABLE TAPES
iWORKING SET PRELOADING

SF%FAC==:lB<.SFFAC>
SF%CDE==:lB<.SFCDE>
SF%CDR==:lB<.SFCDR>
SF%MST==:lB<.SFMST>
SF%RMT==:lB<.SFRMT>
SF%PTY==:lB<.SFPTY>
SF%CTY==:lB<.SFCTY>
SF%OPR==:lB<.SFOPR>
SF%LCL==:lB<.SFLCL>
SF%BTE==:lB<.SFBTE>
SF%CRD==:lB<.SFCRD>
SF%NVT==:lB<.SFNVT>
SF%USG==:lB<.SFUSG>
SF%FLO==:lB<.SFFLO>

iFACT ENTRIES ALLOWED
iCHECKDISK FOUND ERRORS
iCHECKDISK RUNNING
iMANUAL START IN PROGRESS
iREMOTE LOGINS ALLOWED
iPTY LOGINS ALLOWED
iCTY LOGIN ALLOWED
iOPERATOR IN ATTENDANCE
iLOCAL LOGINS ALLOWED
iBIT TABLE ERRORS FOUND ON STARTUP
iUSER CAN CHANGE DIRECTORY CHARACTERISTICS
iTOPS20AN iNVT LOGINS ALLOWED
iUSAGE FILE IN USE
iFULL LATENCY OPTIMIZATION IN USE
iCAUTION: SETTING THIS REQUIRES THAT THE
B-64

MONSY~[

SF%MTA==:lB<.SFMTA
SF%MSO==:lB<.SFMSO
SF%MSl==:lB<.SFMSl

SYSTEM BE AT REVISION LEVEL 10, AND
THAT RH20 BOARD M8555 BE AT REVISION LEVEL D.
;
OTHERWISE, THE FILE-SYSTEM MAY BE DAMAGED.
;MAGTAPE ALLOCATION ENABLED
;SYSTEM MESSAGE LEVEL 0
;SYSTEM MESSAGE LEVEL 1

SF%EOK==:lBO
SF%DOK==:lBl

;ENABLE ACCESS CHECKING
;ALLOW ACCESS IF CHECKING DISABLED

;SINM JSYS DEFINITIONS
SI%TMG==:lBO
SI%EOM==:lBl

;TRUNCATE MESSAGE
;END-OF-MESSAGE FOUND

;SIR JSYS (NEW FORM)
SI%VER==:7B17
SI%LEV==:77B5
SI%ADR==:7777,,-1

;VERSION OF SIR IN Tl
;LEVEL FIELD IN CHNTAB
;ADDRESS OF INTERRUPT ROUTINE IN CHNTAB

;SKED JSYS
.SACNT==:O

;ARGUMENT BLOCK OFFSET FOR COUNT

;FUNCTION CODES
.SKRBC==:l
.SAKNB==:l
.SKSBC==:2
.SKRCS==:3
.SACLS==:l
.SASHR==:2
.SAUSE==:3
.SAIML==:4
.SA5ML==:5
.SA15L==:6
.SKSCS==:4
.SKICS==:5
.SACTL==:l
.SKSCJ==:6
.SAJOB==:l
.SAJCL==:2
.SAWA==:3
.SKRJP==:7
.SAJSH==:3
.SAJUS==:4
.SKBCR==:lO
.SABCL==:l
.SKBCS==:ll
.SKBBG==:12
.SADRG==:l
.SKDDC==:13
.SADCL==:l
.SKRCV==:14
SK%ACT==:lBO
SK%WDF==:lBl
SK%STP==:lB2
SK%DRG==:lB3

;READ BIAS CONTROL KNOB
;OFFSET FOR KNOB VALUE
; SET BIAS C.aNTROL KNOB
;READ" SHARE OF A CLASS
;CLASS
;SHARE
;USE
;1 MINUTE LOAD AVERAGE
;5 MINUTE LOAD AVERAGE
;15 MINUTE LOAD
;SET SHARE OF A CLASS
;START OR STOP CLASS SCHEDULING
;WORD FOR CONTROL BITS
;SET CLASS OF A JOB
;JOB
;CLASS OF JOB
;WA ON/OFF SWITCH
iREAD CLASS PARAMETERS fOR A JOB
;JOB'S SHARE ALLOTMENT
;JOB'S CURRENT USE
iREAD CLASS SETTING FOR BATCH JOBS
;BATCH CLASS
;SET CLASS FOR BATCH JOBS
iRUN BATCH JOBS ON DREGS QUEUE
;WORD TO SPECIFY DREGS OR NOT
;SET SYSTEM CLASS DEFAULT
iDEFAULT CLASS WORD
;READ STATUS
;CLASS BY ACCOUNTS
iWITHHOLD WINDFALL
;CLASS SCHEDULER OFF
;BATCH JOBS ARE BEING RUN ON DREGS QUEUE

;SJPRI, SPRIW - PRIORITY WORD
B-65

MONSYM

JP%RTG==:177B17
JP%SYS==:lB18
JP%MNQ==:77B29
JP%MXQ==:77B35

;RUN TIME GUARANTEE PERCENTAGE
;SYSTEM FORK (PRIORITY ABOVE ALL CLASSES)
;MINIMUM QUEUE
;MAXIMUM QUEUE

B-66

MONSYM

~SNOOP

JSYS DEFINITIONS

~SNOOP

FUNCTION CODES

.SNPLC==:O
.SNPLS==:l
.SNPDB==:2
.SNPIB==:3
.SNPRB==:4
.SNPUL==:5
.SNPSY==:6
.SNPAD==:7
~SOUTM

JSYS DEFINITIONS

SO%WMG==lBO
~SPOOL

END-OF-MESSAGE

AN INPUT SPOOLING DEVICE
DIRECTORY OF SPOOLED DEVICE
~READ DIRECTORY OF SPOOLED DEVICE

~DEFINE
~SET

IN SPOOL MESSAGE ON LOGOUT AND SPOOLED FILE CLOSE

SP%BAT==:lBO
SP%DFS==:lB1
SP%ELO==:lB2
SP%FLO==:lB3
SP%OLO==:lB4
~SPOOL

~WRITE

JSYS FUNCTION CODES

.SPLDI==:O
.SPLSD==:l
.SPLRD==:2
~FLAGS

~LOCK CODE INTO MONITOR VIRT MEMORY
;LOCK DOWN THE SWAPPABLE MONITOR
~DEFINE A BREAK POINT
~INSERT THE BREAK POINTS
~REMOVE THE BREAK POINTS
~UNLOCK AND RELEASE ALL SNOOP RESOURCES
~LOOK UP A MONITOR SYMBOL
~LOOK UP ADDRESS IN SYMBOL TABLE

~JOB IS A BATCH JOB
;SPOOLING IS DEFERRED
;JOB EXECUTED LGOUT JSYS ITSELF
;JOB FORCED TO LOG OUT BY TRAP IN TOP FK
;OTHER JOB AIMED LGOUT AT THIS ONE

ARGUMENT BLOCK

.SPLDV==:O
.SPLNA==:l
.SPLDR==:l
.SPLGN==:2

;DEVICE DESIGNATOR
;NAME STRING
;DIRECTORY NUMBER
;GENERATION NUMBER

;SSAVE
SS%NNP==777777B17
SS%CPY==:lB18
SS%UCA==:lB19
SS%RD==:lB20
SS%WR==:lB21
SS%EXE==:lB22
SS%EPN==:lB23
SS%FPN==:lB27+377B35T

;NEGATIVE NUMBER OF PAGES
;ALLOW COPY-ON-WRITE
~USE CURRENT ACCESS
~ALLOW READ ACCESS
~ALLOW WRITE ACCESS
;ALLOW EXECUTE ACCESS
~TABLE ENTRY IS TWO WORDS
; (PAGE NUMBER IN SECOND WORD)
;FIRST PAGE NUMBER

~STCMP

SC%LSS==:lBO
SC%SUB==:lB1
SC%GTR==:lB2

;T1 LESS THAN T2
;T1 SUBSTRING OF T2
;Tl GREATER THAN T2

B-67

MONSYM

iSTDIR
ST%DIR==:lBO
ST%ANA==:lBl
ST%RLM==:lB2

;FILES ONLY DIRECTOPY
iALPHANUMERIC ACCOUNTS
;REPEAT LOGIN MESSAGE

iSTIW
ST%DIM==:lBO
ST%PRH==:777777B35

;SET DEFERRED INTERRUPT MASK
iPROCESS HANDLE

iSWTRP DEFINITIONS
.SWART==:O
.SWRAT==:l
.SWLUT==:2
.SWRLT==:3
.ARPFL==:O
.AROPC==:l
.AREFA==:2
.ARNPC==:3

iSET ARITHMETIC TRAP
iREAD ARITHMETIC TRAP

iSET LUUO ADDRESS
iREAD LUUO ADDRESS
iOFFSET IN TRAP BLOCK FOR PC FLAGS
iOFFSET FOR OLD PC VALUE
iOFFSET FOR E
iOFFSET FOR NEW PC WORD

iTBLUK
'rL%NOM==: lBO
TL%AMB==:lBl
TL%ABR==:lB2
'rL%EXM==: lB3

iNO MATCH
iAMBIGUOUS
iLEGAL ABBREVIATION
iEXACT MATCH

iTFORK
iFUNCTION CODES IN LH ACI
.TFSET==:O
.TFRAL==:l
.TFRTP==:2
.TFSPS==:3
.TFRPS==:4
.TFTST==:5
.TFRES==:6
.TFUUO==:7
.TFSJU==:8
.TFRUU==:9

iSET TRAPS AS SPEC'D BY BIT TABLE
iREMOVE ALL TRAPS SET BY THIS FORK
iREMOVE TRAPS SET BY THIS FORK
iSET JSYS TRAP PSI CHAN IN LH(2)
iREAD JSYS TRAP PSI CHAN INTO LH(2)
iTEST IF SELF MONITORED
iREMOVE TRAPS FROM ALL INFERIORS, CLR PSI
iSET UUO TRAPS FOR FORK
iSET BOTH UUO AND JSYS TRAPS
iREMOVE UUO TRAPS

;TIMER DEFINITIONS
.TIMRT==:O
.TIMEL==:l
.TIMDT==:2
.TIMDD==:3
.TIMBF==:4
.TIMAL==:5

iSET TIME LIMIT
iSET ELAPSED TIME CLOCK
iSET DATE & TIME CLOCK
iDELETE AN EXPLICT DATE & TIME CLOCK
iDELETE ALL ENTIRES BEFORE D&T
iDELETE ALL (INCLUDES TIME LIMIT)

B-68

MONSYM

iTLINK
TL%CRO==:lBO
TL%COR==:lBl
TL%EOR==:lB2
TL%ERO==:lB3
TL%SAB==:lB4
TL%ABS==:lB5
TL%STA==:lB6
TL%AAD==:lB7
TL%OBJ==:777777B35

iCLEAR REMOTE TO OBJECT LINK
iCLEAR OBJECT TO REMOTE LINK
iESTABLISH OBJECT TO REMOTE LINK
iESTABLISH REMOTE TO OBJECT LINK
iSET ACCEPT BIT FOR OBJECT
iACCEPT BIT STATE
iSET OR CLEAR ADVICE
iACCEPT ADVICE
iOBJECT DESIGNATOR

iUFPGS
UF%NOW==:lBO

iNO WAIT ON UPDATE

iUTEST FUNCTION CODES
.UTSET==:O
.UTCLR==:l

iSTART TESTING
iSTOP TESTING AND RETURN RESULTS

iUTEST ARGUMENT BLOCK
.UTADR==:O
.UTLEN==:l
.UTMAP==:2

iSTARTING ADDRESS OF CODE
iLENGTH OF CODE
iSTART OF BIT MAP

iUSAGE
.USENT==:O
.USCLS==:l
.USCKP==:2
.USLGI==:3
.USLGO==:4
.USSEN==:5
.USCKI==:6
.USENA==:7
.USCAS==:lO
.USSAS==:ll
.USRAS==:12
US%DOW==:177B6
US%SSM==:777777

iWRITE ENTRY
iCLOSEOUT CURRENT FILE
iPERFORM CHECKPOINT
iLOGIN
iLOGOUT
iSESSION END
iSET CHECKPOINT INTERVAL
iENABLE ACCOUNT VALIDATION
iCHANGE ACCOUNTING SHIFT NOW
iSET AUTOMATIC ACCOUNTING SHIFT CHANGE TIMES
iREAD AUTOMATIC ACCOUNTING SHIFT CHANGE TIMES
iTABLE ENTRY FORMAT FOR .USSAS/.USRAS:
iDAY-OF-WEEK BITS
iTIME IN SECONDS SINCE MIDNIGHT

iUTFRK
UT%TRP==:lBO

iITRAP (OR DO ERJMP/ERCAL) TRAPPED JSYS

B-69

MONSYM

;WILD FUNCTIONS
.WLSTR==:O
.WLJFN==:l

;COMPARE TWO STRINGS
;COMPARE TWO JFNS

;WILD FLAGS AND BITS
WL%LCD==:lBO
WL%NOM==:lBO
WL%ABR==:lBl
WL%DEV==:lBl
WL%DIR==:lB2
WL%NAM==:lB3
WL%EXT==:lB4
WL~GEN==:lB5

;DON'T CONVERT LOWER CASE TO UPPER CASE
;STRINGS DID NOT MATCH
;NON-WILD STRING IS ABBREVIATION OF WILD
;DEVICE FIELD DID NOT MATCH
;DIRECTORY FIELD DID NOT MATCH
;NAME FIELD DID NOT MATCH
;FILE TYPE DID NOT MATCH
;GENERATION NUMBER DID NOT MATCH

STRI~

;ARGUMENT BLOCK OFFSETS FOR XSIR AND XRIR JSYS'S
.SICNT==:O
.SILVT==:l
.SICHT==:2
iSCHEDULER CONTROL FLAGS
SK%CYT==:lB18
SK%IOC==:lB19
SK%HTl==:lB20
SK%HT2==:lB21
SK%HQR==:lB22
SK%CLl==:lB23
iSK%BQE==:lB24
SK%RSQ==:lB25
SK%RQl==:lB26
SK%TTP==:lB27
SK%WCF==:lB28
SK%TOP==:lB29
SK%RQM==:lB30

;LENGTH OF BLOCK
iADDRESS OF LEVEL TABLE
iADDRESS OF CHANNEL TABLE
(JSYS NOT YET DEFINED)
iCYCLE TIME
iIO QUANTUM CHARGE
iLIMIT HOLD TIME
iNO HOLD TIME AFTER SKIPPED FORK
iHIGH QUEUE FORK HAVE PRIORITY UNDER LOAD
iCLASS SKED, USE NORMAL QUEUE PRIORITIES IF 1
iBALSET QUEUE ON ENTRY
iQUICK RESCHEDULE ON WAK~UPS
iREQUEUE TO QUEUE 1
iTTY PREFERENCE
iWAIT CREDIT PROPORTIONA~ TO LOAD AV
iTTY OUTPUT PREFERENCE
iREQUEUE DEPENDS ON MEM DEMAND

8-70

MONSYM

,.***********************************************
;GENERAL FIELD AND VALUE DEFINITIONS
;USED BY MANY JSYSES

,.***********************************************
;GENERAL FORK HANDLES
.FHSLF==:400000
FH%EPN==:lB19
.FHSUP==:
.FHTOP==:
.FHSAI==:
.FHINF==:
.FHJOB==:

;SELF
;EXTENDED PAGE NUMBER
;SUPERIOR
;TOP IN JOB
;SELF AND INFERIORS
;INFERIORS
;ALL IN JOB

;FIELDS OF JFN MODE WORD
TT%OSP==:lBO
TT%MFF==:lB1
TT%TAB==:lB2
TT%LCA==:lB3
TT%LEN==:177B10
TT%WID==:177B17
TT%WAK==:17B23
TT%WKO==:lB18
TT%IGN==:lB19
TT%WKF==:lB20
TT%WKN==:lB21
TT%WKP==:lB22
TT%WKA==:lB23
TT%ECO==:lB24
TT%ECM==:lB25
TT%ALK==:lB26
TT%AAD==:lB27
TT%DAM==:3B29
.TTBIN==:O
.TTASC==:l
.TTATO==:2
.TTATE==:3
TT%UOC==:lB30
TT%LIC==:lB31
TT%DUM==:3B33
.TTFDX==:O
.TTODX==:l
.TTHDX==:2
.TTLDX==:3
TT%PGM==:lB34
TT%CAR==:lB35

;OUTPUT SUPPRESS
;MECHANICAL FORMFEED PRESENT
;MECHANICAL TAB PRESENT
;LOWER CASE CAPABILITIES PRESENT
;PAGE LENGTH
;PAGE WIDTH
;WAKEUP FIELD
;WAKEUP CLASS 0 (UNUSED)
;IGNORE TT%WAK ON SFMOD
;WAKEUP ON FORMATING CONTROL CHARS
;WAKEUP ON NON-FORMATTING CONTROLS
;WAKEUP ON PUNCTUATION
;WAKEUP ON ALPHANUMERICS
;ECHOS ON
;ECHO MODE
;ALLOW LINKS
;ALLOW ADVICE (NOT IMPLEMENTED)
; DATi~ MODE
;BINARY
;ASCII
;ASCII AND TRANSLATE OUTPUT ONLY
;ASCII AND TRANSLATE ECHOS ONLY
;UPPER CASE OUTPUT CONTROL
;LOWER CASE INPUT CONTROL
;DUPLEX MODE
;FULL DUPLEX
;NOT USED, RESERVED
;HALF DUPLEX (CHARACTER)
;LINE HALF DUPLEX
;PAGE MODE
;CARRIER STATE

B-71

MONSYM

iDIRECTORY PROTECTION DEFINITIONS
DP%RD==:40
DP%CN==:lO
DP%CF==:4

(3 6-BIT FIELDS: OWNER, GROUP, WORLD)

iREADING DIRECTORY IS ALLOWED
iCONNECT TO DIR, OR CHANGE PROT/ACCOUNT
iCREATING FILES IN DIR IS ALLOWED

iFILE PROTECTION DEFINITIONS (3 6-BIT FIELDS: OWNER, GROUP, WORLD)
FP%DIR==:2
FP%APP==:4
FP%EX==:lO
FP%WR==:20
FP%RD==:40

iDIRECTORY LISTING
iAPPEND
iEXECUTE
iWRITE
iREAD

iINPUT AND OUTPUT IDENTIFIERS
.PRIIN==:lOO
.PRIOU==:lOl
.NULIO==:377777
.CTTRM==:777777
.DVDES==:600000
. rrTDES==: 400000

iPRIMARY INPUT
iPRIMARY OUTPUT
iNULL DESIGNATOR
iJOB'S CONTROLLING TERMINAL
iUNIVERSAL DEVICE CODE
iUNIVERSAL TERMINAL CODE

iMAGTAPE DEVICE STATUS BITS
MT%ILW==:lB18
MT%DVE==:lB19
MT%DAE==:lB20
MT%SER==:lB21
MT%EOF==:J.B22
MT%IRL==:lB23
HT%BOT==:lB24
MT%EOT==:lB25
MT%EVP==:lB26
MT%DEN==:3B28
.HTLOD==:l
.MTMED==:2
.MTHID==:3
MT%CCT==:7B31
MT%NSH==:lB32

iILLEGAL WRITE
iDEVICE ERROR
iDATA ERROR
iSUPPRESS ERROR RECOVERY PROCEDURES
iEOF (FILE MARK)
iINCORRECT RECORD LENGTH
iBEGINNING OF TAPE
iEND OF TAPE
iEVEN PARITY
iDENSITY (0 IS 'NORMAL')
iLOW DENSITY (200 BPI)
iMEDIUM DENSITY (556 BPI)
iHIGH DENSITY (800 BPI)
iCHARACTER COUNTER
iDATA MODE OR DENSITX NOT SUPPORTED BY HARDWARE

iDEVICE DATA MODES
.DMASC==:l
.DMIMG==:lO
.DMIMB==:13
.DMBIN==:14

if:\.SCII

iIMAGE
iIMAGE BINARY
iBINARY

B-72

MONSYM

;DEFINED PSI CHANNELS
RADIX 5+5
.ICAOV==:6
.ICFOV==:7
.ICPOV==:9
.ICEOF==:lO
.ICDAE==:ll
.ICQTA==:12
.ICTOD==:14
.ICILI==:15
.ICIRD==:16
.ICIWR==:17
.ICIEX==:18
.ICIFT==:19
.ICMSE==:20
.ICTRU==:21
.ICNXP==:22

; ARI'l~HMETIC OVERFLOW
;FLOATING OVERFLOW
;PDL OVERFLOW
;END OF FILE
; DATlll ERROR
;QUOTA/DISK EXCEEDED
;TIME OF DAY (NOT IMPLEMENTED)
;ILLEG INSTRUCTION
;ILLEGAL READ
;ILLEGAL WRITE
;ILLEGAL EXECUTE (NOT IMPLEMENTED)
;INFERIOR FORK TERMINATION
;MACHINE SIZE EXCEEDED
;TRAP TO USER (NOT IMPLEMENTED)
;NONEXISTENT PAGE REFERENCED

B-73

MONSYM

iTERMINAL TYPE NUMBERS
.TT33==:O
.TT35==:1
.TT37==:2
.TTEXE==:3
. TTDEF==: . . . D8
.TTIDL==: . . . D9
.TTV05==: . . . DIO
.TTV50==: . . . Dll
.TTL30==: . . . D12
.TTG40==: . . . D13
.TTL36==: . . . D14
.TTV52==: . . . D15
.TTIOO==: . . . D16
.TTL38==: . . . D17
.TT120==: . . . D18
.TT125==: . . . D35
. TTKIO==: . . . D36

iMODEL 33
iMODEL 35
iMODEL 37
iEXECUPORT
iDEFAULT
iIDEAL
iVT05
iVT50
iLA30
iGT40
iLA36
iVT52
iVTIOO
iLA38
iLA120
iVT125
iVKIOO - GIGI

iDEFINED TERMINAL CODES
.TICBK==:O
.TICCA==:l
.TICCB==:2
.TICCC==:3
.TICCD==:4
.TICCE==:5
.TICCF==:6
.TICCG==:7
.TICCH==:8
.TICCI==:9
.TICCJ==:lO
.TICCK==:ll
.TICCL==:12
.TICCM==:13
.TICCN==:14
.TICCO==:15
.TICCP==:16
.TICCQ==:17
.TICCR==:18
.TICCS==:19
.TICCT==:20
.TICCU==:21
.TICCV==:22
.TICCW==:23
.TICCX==:24
.TICCY==:25
.TICCZ==:26
.TICES==:27
.TICRB==:28
.TICSP==:29
.TICRF==:30
.TICTI==:31
.TICTO==:32

iBREAK
i ... A

i ... B
i ... C
i ... D

... E
... F
... G
... H
... I
... J
... K
... L
... M
... N
i ... O

i
i
i
i
i
i
i
i
i
i

i ... P

... Q
... R
... S
... T
i ... U
i ... V
i ... W

i
i
i
i

i ...

X

i ... Y
i ... Z

iESC
iRUBOUT
i SPACE
iCARRIER OFF
iTYPEIN
iTYPEOUT

B-74

MONSYM

RADIX 8
iCAPABILITIES
SC%CTC==:lBO
SC%GTB==:lBl
SC%MMN==:lB2
SC%LOG==:lB3
SC%MPP==:lB4
SC%SDV==:lB5
SC%SCT==:lB6

iCONTROL-C
iGETAB
iMAP MONITOR
iLOGGING FUNCTIONS
iMAP PRIVILEGED PAGES
iSPECIAL DEVICES
iASSIGN TTY AS CONTROLLING FOR FORK (SCTTY)

SC%SUP==:lB9

iSUPERIOR ACCESS

SC%FRZ==:lB17

iFREEZE ON TERMINATING CONDITIONS

SC%WHL==:lB18
SC%OPR==:lB19
SC%CNF==:lB20
SC%MNT==:lB21
SC%IPC==:lB22
SC%ENQ==:lB23
SC%NWZ==:lB24
SC%NAS==:lB25
SC%DNA==:lB26
SC%ANA==:lB27

iWHEEL
iOPEHATOR
iCONFIDENTIAL INFORMATION ACCESS
iMAINTENANCE
:IPCF PRIVILEGES
:ENQ/DEQ PRIVILEGES
:TOPS20AN iNET WIZARD PRIVILEGES (ASNSQ, ETC.)
iTOPS20AN iNETWORK ABSOLUTE SOCKET PRIVILEGE
iDECNET ACCESS ALLOWED
iTOPS20AN :ARPANET ACCESS ALLOWED

iOUTMODED NAMES FOR BITS IN DIRECTORY MODE WORD - USE CD%XXX
iEQUIVALENTS
MD%FO==:CD%DIR
MD%SA==:CD%ANA
MD%RLM==:CD%RLM

iFILES ONLY DIRECTORY
:STRING ACCOUNT ALLOWED
iREPEAT LOGIN MESSAGE

B-75

MONSYM

iFDB DEFINITIONS
.FBHDR==:O
iHEADER WORD
FB%LEN==:177B35
iLENGTH OF THIS FDB
.FBCTL==:1
iFLAGS
FB%TMP==:IBO
iFILE IS TEMPORARY
FB%PRM==:IBI
iFILE IS PERMANENT
FB%NEX==:IB2
iFILE DOES NOT HAVE AN EXTENSION YET
FB%DEL==:IB3
iFILE IS DELETED
FB%NXF==:IB4
iFILE IS NONEXISTENT
FB%LNG==:IB5
iFILE IS A LONG FILE
iFILE HAS COMPRESSED PAGE TABLE
FB%SHT==:IB6
FB%DIR==:IB7
iFILE IS A DIRECTORY FILE
FB%NOD==:IB8
iFILE IS NOT TO BE DUMPED BY BACKUP SYSTEM
FB%BAT==:IB9
iFILE HAS AT LEAST ONE BAD PAGE IN IT
FB%SDR==:IBIO
iTHIS DIRECTORY HAS SUBDIRECTORIES
FB%ARC==:IBII
i File has archive status
FB%INV==:IBI2
i File is invisible
FB%OFF==:IBI3
i File is offline
FB%FCF==:17BI7
iFILE CLASS FIELD
. FBNRM==: 0
iNON-RMS
iRMS FILES
.FBRMS==:1
FB%NDL==:IBI8
iFILE CANNOT BE DELETED
iLAST WRITE NOT CLOSED
FB%WNC==:IBI9
.FBEXL==:2
iLINK TO FDB OF NEXT EXTENSION
.FBADR==:3
iDISK ADDRESS OF INDEX BLOCK
.FBPRT==:4
iPROTECTION OF THE FILE
.FBCRE==:5
iTIME AND DATE OF LAST WRITE
.FBUSE==:6
iLAST WRITER " AUTHOR (OBS)
. FBAUT==: 6
iPOINTER TO AUTHOR STRING
.FBGEN==:7
iGENERATION " DIR #
FB%GEN==:777777BI7
iGENERATION NUMBER
.FBDRN==:7
iGENERATION " DIR #
FB%DRN==:777777
iDIR NUMBER
.FBACT==:IO
iACCOUNT
.FBBYV==:11
iRETENTION+BYTE SIZE+MODE " # OF PAGES
iRETENTION COUNT
FB%RET==:77B5
FB%BSZ==:77Bl1
iBYTE SIZE
FB%MOD==:17BI7
iLAST OPENF MODE
FB%PGC==:777777 iPAGE COUNT
.FBSIZ==:12
iEOF POINTER
.FBCRV==:13
iTIME AND DATE OF CREATION OF FILE
.FBWRT==:14
iTIME AND DATE OF LAST USER WRITE
.FBREF==:15
iTIME AND DATE OF LAST NON-WRITE ACCESS
.FBCNT==:16
i# OF WRITES " # OF REFERENCES
.FBBKO==:17
iBACKUP WORDS (5)
.FBBKI==:20
.FBBK2==:21
.FBBBT==:22
Bits,,#pages in offline file
AR%RAR==:lBl
Request archive by user
AR%PIV==:lB2
Request invol migration by system
AR%NDL==:lB3
Do not delete contents of file when archived
AR%NAR==: 1 B4
Please don't migrate this file
AR%EXM==:lB5
File exempt from migration
AR%lST==:lB6
1st pass of archive/collection run complete
AR%RFL==:lB7
Retrieve failed
AR%WRN==:lB8
USER WARNED OF APPROACHING EXPIRATION
AR%RSN==:7B17
Reason pushed offline
.AREXP==:l
File expired
.ARARR==:2
Archive was requested
.ARRIR==:3
Migration was requested
AR%PSZ==:777777
RH is pg count when file went offline
B-76

MONSY~~

On-line expiration date/interval
jUSER SETTABLE WORD
jLINK TO NEXT GENERATION FILE
jPOINTER TO NAME BLOCK
jPOINTER TO EXTENSION BLOCK
jPOINTER TO LAST WRITER STRING
Archive or collection date & time
Offline expiration date/interval
Tape JD for run I tape
Saveset #, ,Tape file # for run I tape
Tape ID for run 2 tape
Saveset #"Tape file # for run 2 tape

.FBNET==:23
.FBUSW==:24
.FBGNL==:25
.FBNAM==:26
.FBEXT==:27
.FBLWR==:30
.FBTDT==:31
.FBFET==:32
.FBTPI==:33
.FBSSI==:34
.FBTP2==:35
.FBSS2==:36

j

.FBLNO==:30
.FBLNI==:31
.FBLXT==:37
.FBLEN==:37

jLENGTH OF VERSION 0 FDB
iLENGTH OF VERSION I FDB
i Minimum length for archive/virtual ask sys
jLENGTH OF THE FDB

B-77

MONSYM

iCARD READER DEFINITIONS
.CRILC==:"\"

iILLEGAL CHARACTER CODE

iA WORD IS DISTINGUISHED FROM A BYTE POINTER BY THE VALUE 5 IN BITS 0-2
iUSE THESE DEFINITIONS TO TEST FOR A NUMBER AS FOLLOWS:

LOAD AC,NMFLG,LOC
CAIE AC,NUMVAL
NMFLG==:7B2
NUMVAL==:5
iMAGTAPE LABEL TYPES
.LTUNL==:1
.LTANS==:2
.LTEBC==:3
.LTT20==:4
.LTMAX==:4

iUNLABELED
iANSI STANDARD
iEBCDIC
iTOPS-20
iMAXIMUM LABEL TYPE

iMAGTAPE LABEL STATES
.LSUNL==:O
.LSPRI==:1
.LSSCR==:2
.LSUSC==:3
i

iUNLABELLED VOLUME
iPRIVATE VOLUME
iSCRATCH VOLUME
iUSER SCRATCH VOLUME

MAGTAPE DRIVE TYPES

.TMDR9==:1
.TMDR7==:2
.TMDMX==:2

i9-TRACK
i7-TRACK
iMAXIMUM DRIVE-TYPE VALUE

iDEFINITIONS FOR COMMUNICATIONS PROTOCOLS
iDEFINE THE SUPPORTED PROTOCOL TYPES
.VN20F==:0
.VNMCB==:1
.VND60==:2
.VNDDC==:2
.VNMOP==:3
.VNCNL==:4
.VNCBL==:5

iRSX20F PROTOCOL
iMCB DECNET PROTOCOL
iDN60 PROTOCOL
iDDCMP PROTOCOL
iMOP (DDCMP MAINTENANCE) MODE
iCONTROLLER LOOPBACK
iCABLE LOOPBACK

:DEFINE BITS USED WHEN RELOADING AN -11
RM%ROM==:IBO

iIF SET, ACTIVATE ROM

B-78

MONSYM

,.***********************************************
;GENERAL FIELD AND VALUE DEFINITIONS
;USED BY TOPS20AN JSYS'S

,.***********************************************

;STATES OF A CONNECTION IN ARPANET NCP
; RETURNED IN BO-B3 OF GDSTS ON A NET CONNECTION
; ALSO AVAILABLE IN A GETAB, BUT THAT'S NOT THE PREFERRED WAY
; TO READ THEM, IF YOU HAVE A JFN FOR THE CONNECTION .
. NSCZD==:Ol
.NSPND==:02
.NSLSN==:03
.NSRCR==:04
.NSCWl==:05
.NSRCS==:06
.NSOPN==:07
.NSCSW==:lO
.NSDTW==:ll
.NSRFl==:12
.NSCZW==:13
.NSRF2==:14
.NSFRE==:16

;CLOSED
;PENDING
;LISTENING
;REQUEST FOR CONNECTION RECEIVED
;CLOSE WAIT SUB ONE (NCP CLOSE)
;REQUEST FOR CONNECTION SENT
;OPENED
;CLOSE WAIT (NCP CLOSE)
;FINAL DATA WAIT
;RFNM WAIT SUB ONE (NORMAL NCP CLOSE)
;CLOSE WAIT (PROGRAM CLOSE)
;RFNM WAIT SUB TWO (UNEXPECTED NCP CLOSE)
;FREE

;HOST STATUS BITS
HS%UP==lBO
HS%VAL==lBl
HS%DAY==7B4
HS%HR==37B9
HS%MIN==17B13
HS%RSN==17B17
HS%SRV==lB18
HS%USR==lB19
HS%NCK==lB20
HS%STY==77B26
HS%NEW==lB27
HS%NAM==lB28

;HOST IS UP
;VALID STATUS
;DAY WHEN UP IF DOWN
;HOUR
;5 MIN INTERVAL
;REASON
;HOST IS SERVER
;HOST IS USER
;HOST NAME STRING WAS NICKNAME
;SYSTEM TYPE MASK
;HOST DOES NEW PROTOCOL
;HOST HAS NAME

.HSIOX==lB26
.HSITS==2B26
.HSDEC==3B26
.HSTIP==4B26
.HSMTP==5B26
.HSELF==6B26
.HSANT==7B26
.HSMLT==lOB26
.HST20==11B26
.HSUNX==12B26

;TENEX
;ITS
;TOPS-I0
;TIP
;MTIP
;ELF
;ANTS
;MULTICS
;TOPS-20
;UNIX

8-79

MONSYM

~ERROR

CODE DEFINLTIONS
.ERBAS==:600000

~BASE

VALUE FOR ALL ERROR CODES

DEFINE .ERCOD <
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR

(lO,LGINXl,
(1764,DSKX06,ACCOUNTS-TABLE.BIN»
B-91

MONSYM

.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.err
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR
.ERR

(2107,ENACX3,ACCOUNTS--TABLE.BIN»
(2111,VACCXO,

iDEFINE THE ERROR CODE VALUES
DEFINE .ERR (N,E,S) <
E==:.ERBAS+N
IFG ,<.ERMAX==:N»
.ERMAX==:O
.ERCOD

B-96

MONSYM

;THIS SECTION CONSISTS OF SPECIAL CODE TO WRITE THE ERRMES.BIN FILE
; THE CODE IS ONLY ASSEMBLED IF .ERBLD IS PREVIOUSLY
; DEFINED TO BE NON-ZERO.
IFNDEF .ERBLD,<.EFBLD==O>
IFN .ERBLD,<
.ERGO:

MOVSI 1, (GJ%FOU!GJ%SHT) ;GET A JFN ON ERROR FILE
HRROI 2, [ASCIZ/ERRMES.BIN/]
GTJFN
JRST .ERER
MOVE 2,[440000"OF%WRl
OPENF
;OPEN THE FILE FOR WRITE
JRST .ERER
MOVNI 3,.ERSTE-.ERTAB
;GET LENGTH OF FILE
MOVE 2, [POINT 36,.ERTAB]
SOUT
;OUTPUT THE ERROR FILE DATA
CLOSF
;CLOSE THE FILE
JRST .ERER
HALTF
;DONE

.ERER:

MOVEI 1,101
HRLOI 2,400000
SETZ 3,
ERSTR
JFCL
JFCL
HALTF

;TYPE OUT ERROR CODE

LIT
DEFINE .ERR (N,E,S) <
.ERQQ==<.-.ERTAB>*5
. ERQQ2==N~13 77 7 7
.ERRMI \.ERQQ2,N,.ERQQ
AS C I I \ S ' ~l \

>
DEFINE .ERRMI (NN~N,.ERQQ)<
IFl,
.ERTAB:

.ERMAX
BLOCK . ERIv1AX

. ERST:
.ERSTE:

. ERCOD

;FIRST WORD OF TABLE IS THE LENGTH
; OF THE TABLE FOR ERSTR TO USE AS
; A BOUNDS CHECK.
;LEAVE ROOM FOR POINTERS
;BUILD STRINGS AND .ERTAB
;END OF STRINGS

END .ERGO

>

;END OF IFN .ERBLD CONDITIONAL

PURGE .ERR,REL
END
;D$
B-97

APPENDIX C
MACSYM

C-l

MACSYM

UPD ID= 82, <5.UTILITIES>MACSYM.MAC.43,

22-Feb-82 17:57:38 by MURPHY

;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
;

;COPYRIGHT (C) 1976,1977,1978,1979,1980,1981 BY DIGITAL EQUIPMENT CORPORATION,
MAYNARD, MASS.
;VERSION 1
IFNDEF REL,
IFE REL,<
UNIVERSAL MACSYM

;UNIVERSAL UNLESS OTHERWISE DECLARED
COMMON MACROS AND SYMBOLS

>
IFN REL,<
TITLE MACREL
SEARCH MONSYM
SALL

SUPPORT CODE FOR MACSYM

>
;THE STANDARD VERSION WORD CONSTRUCTION
VERS - PROGRAM VERSION NUMBER
VUPDAT - PROGRAM UPDATE NUMBER (l=A, 2=B ... )
VEDIT - PROGRAM EDIT NUMBER
VCUST - CUSTOMER EDIT CODE (O=DEC DEVELOPMENT, l=DEC SWS, 2-7 CUST)
DEFINE PGVER.
(VERS,VUPDAT,VEDIT,VCUST)<
.. PGVO==.
;;SAVE CURRECT LOCATION AND MODE
.JBVER=:A 0137
;;WHERE TO PUT VERSION
LOC
.JBVER
;;PUT VERSION IN STANDARD PLACE
BYTE
(3)VCUST(9)VERS(6)VUPDAT(18)VEDIT
.ORG
.. PGVO
;;RESTORE LOCATION AND MODE

>
;MASKS FOR THE ABOVE
VI%WHO==:7B2
VI%MAJ==:777B11
VI%MIN==:77B17
VI%EDN==:777777B35
;ADDED VI%XXX

;Customer edit code
;Major version number
;Minor version/update
;Edit number

C-2

MACSYM

SUBTTL COMMON DEFS
;DEFINE STANDARD AC'S
DEFINE STDAC. <
F=:O
Tl=:l
T2=:2
T3=:3
T4=:4
Ql=:5
Q2=:6
Q3=:7
Pl=:lO
P2=:11
P3=:12
P4=:13
P5=:14
P6=:15
CX=:16
P=:17

>

SUBTTL MISC CONSTANTS

;MISC CONSTANTS
.INFIN==:377777,,777777
.MINFI==:lBO
.LHALF==:777777BI7
.RHALF==:777777
.FWORD==:-l

;PLlJS INFINITY
;MINUS INFINITY
;LEFT HALF
;RIGHT HALF
;FULL WORD

C-3

MACSYM

SUB TTL
.CHNUL==:OOO
.CHCNA==:OOI
.CHCNB==:002
.CHCNC==:003
.CHCND==:004
.CHCNE==:005
.CHCNF==:006
.CHBEL==:007
.CHBSP==:OlO
.CHTAB==:Oll
.CHLFD==:012
.CHVTB==:013
.CHFFD==:014
.CHCRT==:015
.CHCNN==:016
.CHCNO==:017
.CHCNP==:020
.CHCNQ==:021
.CHCNR==:022
.CHCNS==:023
.CHCNT==:024
.CHCNU==:025
.CHCNV==:026
.CHCNW==:027
.CHCNX==:030
.CHCNY==:031
.CHCNZ==:032
.CHESC==:033
.CHCBS==:034
.CHCRB==:035
.CHCCF==:036
.CHCUN==:037
.CHSPC==:040
.CHALT==:175
.CHAL2==:176
.CHDEL==:177

SYMBOLS FOR THE CONTROL CHARACTERS
;NULL

;BELL
;BACKSPACE
;TAB
;LINE-FEED
;VERTICAL TAB
;FORM FEED
;CARRIAGE RETURN

;ESCAPE
;CONTROL
;CONTROL
;CONTROL
;CONTROL
;SPACE

BACK SLASH
RIGHT BRACKET
CIRCUMFLEX
UNDERLINE

;OLD ALTMODE
;ALTERNATE OLD ALTMODE
;DELETE

C-4

MACSYM

SUBTTL
iPC

HARDWARE BITS OF INTEREST TO USERS

FLAGS

PC%OVF==:lBO
PC%CYO==:lBl
PC%CYl==:lB2
PC%FOV==:lB3
PC%BIS==:lB4
PC%USR==:lB5
PC%UIO==:lB6
PC%LIP==:lB7
PC%AFI==:lB8
PC%ATN==:3BIO
PC%FUF==:lBll
PC%NDV==:lB12

iOVERFLOW
iCARRY 0
iCARRY 1
iFLOATING OVERFLOW
iBYTE INCREMENT SUPPRESSION
iUSEH MODE
iUSER lOT MODE
iLAST INSTRUCTION PUBLIC
iADDRESS FAILURE INHIBIT
iAPR TRAP NUMBER
iFLOATING UNDERFLOW
iNO DIVIDE

C-1S

MACSYM

;THE FOLLOWING MACRO MAY BE USED TO SUPPRESS CREF ENTRIES FOR
;ALL THE JUNK SYMBOLS USED INTERNALLY WITHIN MACROS IN MACSYM
DEFINE .XCMSY <
.XCREF
.XCRFI < .. ACT, .. CSC, .. CSN, .. IFT, .. JXl, .. MSK, .. MXl, .. MX2>
· XCRFI < .. NAC, .. NRGS, .. NS, .. NV, .. PST, .. STKN, .. S1~KQ, .. STKR>
.XCRFI < .. TRR, .. TSAl, .. TXl, .. TX2,.FP,.FPAC,.NAC,.SAC,.SAVl>
.XCRFI <.SAV2,.SAV3,POINTR,POS,WID, .. CASl, .. CNS, .. CNS2>
· XCRF 1 < .. DPB , .. GNCS , .. I CNS, .. JE , .. LDB , .. STRO , .. STRI , .. STR2 >
· XCRFI < .. STR4 , .. TQO, .. TQZ , .. TSAC , .. TS I Z , .. TX, .. TY , . ACVl, . ACV2>
.XCRFI <.ACV3,.CASE,.DECRO,.IFO,.INCRO,.OPSTl,.OPST2,.STKVl>
.XCRFI <.STKV2,.STKV3,.TRVl,.TRV2,.TRV3>
.CREF

>

DEFINE .XCRFI (SYMS)<
IRP SYMS,<
IFDEF SYMS,< .XCREF SYMS»>
SUBTTL

MACROS FOR FIELD MASKS

;STANDARD MACROS
;MACROS TO HANDLE FIELD MASKS
;COMPUTE LENGTH OF MASK, I.E. LENGTH OF LEFTMOST STRING OF ONES
;REMEMBER THAT AL DOES 'JFFO', I.E. HAS VALUE OF FIRST ONE BIT IN WORD
;COMPUTE WIDTH OF MASK, I.E. LENGTH OF LEFTMOST STRING OF ONES
DEFINE WID(MASK) «AL<-«MASK> -l»>
;COMPUTE POSITION OF MASK, I.E. BIT POSITION OF RIGHTMOST ONE IN MASK
DEFINE POS(MASK) «AL«MASK>&<-
;CONSTRUCT BYTE POINTER TO MASK
DEFINE POINTR(LOC,MASK) «POINT WID(MASK) ,LOC,POS(MASK»>
;PUT RIGHT-JUSTIFIED VALUE INTO FIELD SPECIFIED BY MASK
DEFINE FLD(VAL,MSK) ««VAL>B&
;MAKE VALUE BE RIGHT JUSTIFIED IN WORD.
DEFINE .RTJST(VAL,MSK)««VAL>&-l>-lB
iMODULE - GIVES REMAINDER OF DEND DIVIDED BY DSOR
DEFINE MOD. (DEND,DSOR) «-«DEND>/

C-6

777B8

MACSYM

:REPEAT WITH SUBSTITUTION OF NUMERIC INDEX
DEFINE FORN. (LOw',HIGH,ARGS,STRING,%MNI) <
DEFINE %MNI(ARGS) 
•. FORN==LOW
REPEAT HIGH-LOW+I,<
. FORNI (%MNI)
.. FORN= .. FORN+I»
DEFINE .FORNI (MACN)<
MACN (\ .. FORN) >
:REPEAT WITH GENERAL STRING SUBSTITUTION
DEFINE FORX. (ARGS,SYMS,STRING,%MNI)<
DEFINE %MNI (SYMS)
IRP ARGS,<
.FORXI %MNI,ARGS»
DEFINE .FORXI (MACN,ARGS)<
MACN ARGS>

C-7

MACSYM

SUBTTL MOVX
iMOVX -

LOAD AC WITH CONSTANT

DEFINE MOVX (AC,MSK)<
.. MX1==MSK
iiEVAL EXPRESSION IF ANY
.IFN .. MX1,ABSOLUTE,<
MOVE AC,[MSK]>
.IF .. MX1,ABSOLUTE,<
.. MX2==0
iiFLAG SAYS HAVEN'T DONE IT YET
IFE < .. MX1>B53,<
· . MX2==1
MOVEI AC, .. MX1>
i i LH 0, DO AS RH
IFE .. MX2,<
iiIF HAVEN'T DONE IT YET,
IFE < .. MX1>B17,<
· . MX2==1
MOVSI AC, ( .. MX1»>
iiRH 0, DO AS LH
IFE .. MX2,<
iiIF HAVEN'T DONE IT YET,
IFE « .. MX1>B53- 0777777>,<
· . MX2==1
HRROI AC,< .. MX1»>
iiLH -1
IFE .. MX2,<
iiIF HAVEN'T DONE IT YET,
IFE « •. MX1>B17- 0777777B17>,<
· . MX2==1
HPLOI AC, ( .. MX1- 0777777»> iiRH -1
IFE .. MX2,<
iiIF STILL HAVEN'T DONE IT,
MOVE AC,r .. MX1]>
iiGIVE UP AND USE LITERAL
A

A

A

»

iMV., MVI. - Move from memory to memory or immediate to memory
DEFINE MV. (FROM,TOO)<
MOVE .SAC,FROM
MOVEM .SAC,TOO>
DEFINE MVI. (STUFF,DEST) <
MOVX .SAC,
MOVEM .SAC,DEST>

C-8

MACSYM

;VARIENT MNEMONICS FOR TX DEFINITIONS
DEFINE IORX (AC,MSK)<
TXO AC,
DEFINE XORX (AC,MSK)<
TXC AC,,<,E,N,A»
PURGE .. DOTX

;DO ALL DEFINITIONS

; .. TX
;ALL TX MACROS JUST CALL .. TX WHICH DOES ALL THE WORK
DEFINE .. TX(MT,AC,MSK)<
.. TXl==MSK
; ;EVAL EXPRESSION IF ANY
.IFN .. TXl,ABSOLUTE,<
TD'MT AC, [MSK] >
.IF .. TXl,ABSOLUTE,<
;;MASK MUST BE TESTABLE
.. TX2==0
;;FLAG SAYS HAVEN'T DONE IT YET
IFE < .. TXl&~0777777B17>,<
.. TX2==1
;;LH 0, DO AS RH
TR'MT AC, .. TXl>
IFE .. TX2,<
;;IF HAVEN'T DONE IT YET,
IFE < .. TXl&~0777777>,(
.. TX2==1
;;RH 0, DO AS LH
TL'MT AC,( .. TXl»>
IFE .. TX2,<
;;IF HAVEN'T DONE IT YET,
IFE « •• TXl>B53- 0777777>,< ;;IF LH ALL ONES,
.. TX3 (MT,AC»>
;;TRY Z,O,C SPECIAL CASES
IFE .. TX2,<
;;IF HAVEN'T DONE IT YET,
IFE ( .. TXl+l>,<
;;TRY WORD ALL ONES
.. TX4 (MT,AC»>
;;IF STILL HAVEN'T DONE IT,
IFE .. TX2, <
TD'MT AC,[ .. TXl]>
;;MUST GIVE UP AND USE LITERAL
A

»

C-IO

MACSYM

;SPECIAL CASE FOR LH ALL ONES
DEFINE .. TX3 (MT,AC)<
IFIDN ,<
· . TX2==1
ANDI AC,A- .. TXl>
IFIDN ,<
· . TX2==1
ORCMI AC,A- .. TXl>
IFIDN ,<
· . TX2==1
EQVI AC,A- .. TXl»

;;IF ZEROING WANTED
;;CAN DO IT WITH ANDI
;;IF SET TO ONES WANTED
;;CAN DO IT WITH IORCM
;;IF COMPLEMENT WANTED
;;CAN DO IT WITH EQV

;SPECIAL CASE OF WORD ALL ONES
DEFINE .. TX4 (MT,AC)<
IFIDN ,<
· .TX2==1
CAIN AC,O>
IFIDN ,<
· .TX2==1
CAIE AC,D»

;;CAN DO FULL WORD COMPARE

C-l.l

MACSYM

SUB TTL JX -- JUMP ON MASK
iJXE
iJXN
iJXO
iJXF

JUMP
JUMP
JUMP
JUMP

IF
IF
IF
IF

MASKED
MASKED
MASKED
MASKED

BITS
BITS
BITS
BITS

ARE
ARE
ARE
ARE

EQUAL TO 0
NOT EQUAL TO 0
ALL ONES
NOT ALL ONES (FALSE)

DEFINE JXE (AC,MSK,BA)<
.. JXl==MSK
i iEVAL EXPRESSION IF ANY
.IFN .. JXl,ABSOLUTE,
.IF .. JXl,ABSOLUTE,<
.IFO « •• JXl>-lBO>,<
iiIF MASK IS JUST BO,
JUMPGE AC,BA>,<
.IFO « •• JXl>+l>,<
i iIF MASK IF FULL WORD,
JUMPE AC,BA>,<
iiUSE GIVEN CONDITION
TXNN (AC, .. JX1)
JRST BA»»
DEFINE JXN (AC,MSK,BA)<
.. JXl==MSK
i iEVAL EXPRESSION IF ANY
.IFN .. JXl,ABSOLUTE,
.IF .. JXl,ABSOLUTE,<
.IFO « •• JXl>-lBO>,<
iiIF MASK IS JUST BO,
JUMPL AC,BA>,<
.IFO « •• JXl>+l>,<
i iIF MASK IF FULL WORD,
JUMPN AC,BA>,<
iiUSE GIVEN CONDITION
TXNE (AC, .. JXl)
JRST BA»»

C-12

MACSYM

DEFINE JXO (AC,MSK,BA)<
.. JXl==MSK
~~EVAL EXPRESSION
.IFN .. JX1,ABSOLUTE,
.IF .. JXlrABSOLUTE,<
.IFO « •• JXl>-lBO>,<
JUMPL AC,BA>,<
.. ONEB ( .. BT,MSK)
~ ~TEST MASK FOR ONLY ONE BIT ON
.IFO .. BT r <
SETCM .SAC,AC
~~GENERAL CASE, GET COMPLEMENTS OF BITS
JXE (.SAC, .. JXl,BA»,< ~~JUMP IF BITS WERE ORIGINALLY ONES
TXNE AC, .. JXl
~~TEST AND JUMP
JRST BA»»
DEFINE JXF (AC,MSK,BA)<
.. JXl==MSK
~~EVAL EXPRESSION
.IFN .. JX1,ABSOLUTE,
.IF .. JXlrABSOLUTE,<
.IFO « •• JXl>-lBO>,<
JUMPGE AC,BA>,<
.. ONEB ( .. BT,MSK)
~ ~TEST MASK FOR ONLY ONE BIT ON
.IFO .. BT,<
SETCM .SAC,AC
~~GENERAL CASE, GET COMPLEMENT OF BITS
JXN (.SAC, .. JXl,BA»,< ~~JUMP IF SOME ZEROS ORIGINALLY
TXNN AC, .. JXl
~~TEST AND JUMP
JRST BA»»

C-13

MACSYM

SUBTTL SUBFUNCTION MACROS
~.IFO

CONDITION, ACTION IF CONDITION 0, ACTION OTHERWISE

DEFINE .IFO (COND,THEN,ELSE)<
· .IFT==COND
IFE .. IFT,<
THEN
· .IFT==O>
IFN .. IFT,<
ELSE»
iCASE

iiGET LOCAL VALUE FOR CONDITION
i iRESTORE

IN CASE CHANGED BY NESTED .IFO

(NUMBER,

(LIST)<

;TEST FOR FULL WORD, RH, LH, OR ARBITRARY BYTE
DEFINE .. TSIZ (SYM,MSK)<
SYM==3
iiASSUME BYTE UNLESS ...
IFE +I,
i iFULL WORD IF MASK IS -1
IFE -A0777777, iiRH IF MASK IS 777777
IFE -A0777777BI7,
iiLOOK AT LOC
.IF .. TSAl,ABSOLUTE,<
i iSEE IF WE CAN TEST VALUE
IFE .. TSAl&A0777777777760,
iTEST FOR SPECIFIC NTH CHARACTER OF ARG
DEFINE .. TSNC (SYM,NTH,STR,CH)<
SYM==O
i i ASSUME NO
· . TSAl==O
iiCOUNT CHARS
IRPC STR,<
.. TSAl= .. TSAl+l
IFE .. TSAI-NTH,<
IFIDN ,<
SYM==I>
i i YES
STOPI»>
;FUNCTION TO TEST FOR MASK CONTAINING EXACTLY ONE BIT. RETURNS
;1 IFF LEFTMOST BIT AND RIGHTMOST BIT ARE SAME
DEFINE .. ONEB (SYM,MSK)<
SYM==«<-
;DEFAULT SCRACH AC
.SAC=16
C-14

MACSYM

SUBTTL DEFSTR -- DEFINE DATA STRUCTURE
;DEFINE DATA STRUCTURE
NAM - NAME OF STRUCTURE AS USED IN CODE
LOCN - ADDRESS OF DATA
POS - POSITION OF DATA WITHIN WORD (RIGHTMOST BIT NUMBER)
SIZ - SIZE OF DATA (IN BITS) WITHIN WORD
DEFINE DEFSTR (NAM,LOCN,POS,SIZ)<
NAM==<-IB+IB
;;LOCATION SYMBOL FOR DDT
OP «AC>,LOCN' 'Y,MSK»> ;;DEFINE MACRO TO HOLD LOCATION
;ALTERNATE FORM OF DEFSTR -- TAKES MASK INSTEAD OF POS,SIZ
DEFINE MSKSTR (NAM,LOCN,MASK)<
NAM==MASK
;;ASSIGN SYMBOL TO HOLD MASK
IFl,
;;LOCATION SYMBOL FOR DDT
OP «AC>,LOCN' 'Y,MSK»> ;;DEFINE MACRO TO HOLD LOCATION
; .. STRO - PROCESS INSTANCE OF STRUCTURE USAGE, SINGLE STRUCTURE CASE.
DEFINE .. STRO (OP,AC,STR,Y)<
IFNDEF STR,,Y,.FWORD»
;;RESERVE A WORD, ASSUME WORD MASK
IFDEF STR,<
IFNDEF %'STR,<
OP «AC>,Y,STR»
;;ASSUME NO OTHER LOCN
IFDEF %'STR,<
%'STR (OP,,Y,STR»»
;;DO IT

C-lS

MACSYM

i .. STR1, .. STR2, .. STR3, AND .. STR4 ARE INTERNAL MACROS FOR PROCESSING
iINSTANCES OF STRUCTURE USAGE.
DEFINE .. STR1 (OP,AC,STR,Y,CLL)<
· .NS==O
iiINIT COUNT OF STR'S
IRP STR,< .. NS= .. NS+1>
iiCOUNT STR'S
IFE .. NS,
IFE .. NS-1,<
iiTHE ONE CASE, CAN DO FAST
.. STRO (OP,  , , Y) >
IFG .. NS-1,<
iiMORE THAN ONE, DO GENERAL CASE
.. lCNS
iiINIT REMOTE MACRO
· .CNS «CLL (OP,, ,»
i iCONS ON CALL AND FIRST ARGS
IRP STR,<
i iDO ALL NAMES IN LIST
IFNDEF STR,
IFDEF STR,<
IFNDEF %'STR,<
.. CNS «,STR,Y»>
iiASSUME NO OTHER LOCN
IFDEF %'STR,<
%'STR ( .. STR2, ,Y,STR»
iiSTR MACRO WILL GIVE LOCN TO .. STR2
.. CNS «»)
iiCLOSE ARG LIST
.. GCNS
iiDO THIS AND PREVIOUS NAME
.. ICNS
iiREINlT CONS
.. CNS «CLL (OP,
iiASSUME NO OTHER LOCN
IFDEF %'STR,<
%'STR ( .. STR2"Y,STR»»
iiPUT ON THIS ARG, END IRP
.. CNS « , , » )
i;CLOSE ARG LIST
· .GCNS»
i iDO LAST CALL

C-16

MACSYM

~

.. STR2 -- CALLED BY ABOVE TO APPEND STRUCTURE NAME AND LOC TO ARG LIST

DEFINE .. STR2
.. CNS
~

(AA,LOC,STR)<
«,STR,LOC»>

~~CONS

ON NEXT ARG PAIR

.. STR3 -- CHECK FOR ALL STRUCTURES IN SAME REGISTER

DEFINE .. STR3 (OP,AC,Sl,L1,S2,L2)<
IFDIF ,<
IFNB ,<
OP «AC>,L1, .. MSK)
~~DO ACCUMULATED STUFF
IFNB ,
~~INIT MASK
IFNB ,<
.. MSK= •. MSK!
~

.. STR4

~DIFFERENT

COMPARE SUCCESSIVE ITEMS, DO SEPARATE OPERATION IF
WORDS ENCOUNTERED

DEFINE .. STR4 (OP,AC,Sl,L1,S2,L2)<
IFDIF ,<
~~IF THIS DIFFERENT FROM PREVIOUS
IFNB ,<
OP «AC>,L1, .. MSK»
~;DO PREVIOUS
.. MSK==O>
~;REINIT MASK
IFNB ,<
· .MSK= .. MSK!
~ ;ACCUMULATE MASK
; .. STR5 - SAME AS ".STR4 EXCEPT GIVES EXTRA ARG IF MORE STUFF TO
;FOLLOW.
DEFINE .. STR5 (OP,AC,Sl,L1,S2,L2)<
IFDIF ,<
; ;IF THIS DIFFERENT FROM PREVIOUS,
IFNB ,<
IFNB ,<
;;IF MORE TO COME,
Op u 1 (AC,Ll, .. MSK»
;;DO VERSION 1
IFB ,<
;;IF NO MORE,
OP'2 (AC,Ll, .. MSK»> ;;DO VERSION 2
· .MSK==O>
; ;REINIT MASK
IFNB ,(
.. MSK= .. MSK!
;;ACCUMULATE MASK

C-17

MACSYM

; 'REMOTE ' MACROS USED TO BUILD UP ARG LIST
;INITIALIZE CONS -- DEFINES CONS
DEFINE .. ICNS <
DEFINE .. CNS (ARG)<
.. CNS2 ,>
DEFINE .. CNS2 (NEW,OLD)<
DEFINE .. CNS (ARG)<
.. CNS2 ,

>
;GET CONS -- EXECUTE STRING ACCUMULATED
DEFINE .. GCNS <
DEFINE .. CNS2 (NEW,OLD)<
OLD>
.. CNS () >

; ;MAKE .. CNS2 DO THE STUFF
; ;GET .. CNS2 CALLED WITH THE STUFF

C-18

MACSY~I

iSPECIFIC CASES
iLOAD, STORE
AC - AC OPERAND
i STR - STRUCTURE NAME
i Y - (OPTIONAL) ADDITIONAL SPECIFICATION OF DATA LOCATION

i

DEFINE LOAD (AC,STR,Y)<
.. STRO ( .. LDB,AC,S1'R,Y»
DEFINE .. LDB (AC,LOC,MSK)<
· .TSIZ ( .. PST,MSK)
.CASE .. PS~[I,«
MOVE AC,LOC>,<
HR1"Z AC, LOC> , <
HLRZ AC,LOC>,<
LDB AC,[POINTR (LOC,MSK)]»>
DEFINE STOR (AC,STR,Y)<
.. STRO ( .. DPB,AC,STR,Y»
DEFINE .. DPB (AC,LOC,MSK)<
· .TSIZ ( .. l?ST,MSK)
· CAS E .. P S 'I' , < <
MOVEM AC,LOC>,<
HRRM AC, LOC> , <
HRLM AC,LOC>,<
DPB AC,[POINTR (LOC,MSK)l»>
iSET TO ZERO
DEFINE SETZRO (STR,Y)<
· .STR1 ( .. TQZ, ,,Y, .. STR4) >
DEFINE .. TQZ (AC,LOC,MSK)<
iiSET .. PST TO CASE NUMBER
· .TSIZ ( .. PST ,MSK)
.CASE .. PS'T,«
SETZM LOC>,<
i iFULL WORD
HLLZS LOC>,<
i iRH
HRRZS LOC>,<
i i LH
.. TSAC ( .. ACT,LOC)
i;SEE IF LOC IS AC
.IFO .. ACT,<
MOVX .SAC,MSK
iiNOT AC
ANDCAM .SAC,LOC>,<
.. TX (Z,LOC,MSK»»>

C-19

MACSYM

;SET TO ONE
DEFINE SETONE (STR,Y)<
· .STRI ( .. TQO, ,,Y .. . STR4) >
DEFINE .. TQO (AC,LOC,MSK)<
· .TSIZ ( .. PST,MSK)
.CASE .. PST,«
SETOM LOC>,<
HLLOS LOC>,<
HRROS LOC>,<
· .TSAC ( .. ACT,LOC)
· I FO .. ACT, <
MOVX .SAC,MSK
IORM .SAC,LOC>,<
.. TX (O,LOC,~SK»»>
iSET TO COMPLEMENT
DEFINE SETCMP (STR,Y)<
· . STRI ( .. TQC , ,  , Y , .. STR4) >
DEFINE .. TQC (AC,LOC,MSK)<
· .TSIZ ( .. PST,MSK)
.IFO .. PST,<
iiIF FULL WORD,
SETCMM LOC>,(
i iCAN USE SETCMM
.. TSAC ( .. ACT,LOC)
iiOTHERWISE, CHECK FOR AC
· I FO .. ACT, <
MOVX .SAC,MSK
XORM .SAC,LOC>,<
.. TX(C,LOC,MSK»»

C-20

MACSYI~

~INCREMENT,

DECREMENT FIELD

DEFINE INCR (STR,Y)<
· . STRO (. INCRO, , , Y) >
DEFINE .INCRO (AC,LOC,MSK)<
· .PST==MSK&<-MSK>
.IFO .. PST--1,<
AOS LOC>,<
MOVX .SAC, .. PST
ADDM .SAC,LOC»

~~GET

LOWEST BIT

~~BIT

35, CAN USE AOS
A ONE IN THE APPROPRIATE POSITION

~~LOAD

DEFINE DECR (STR,Y)<
· . STRO (. DECRO, , , Y) >
DEFINE .DECRO (~C,LOC,MSK)<
· .PST==MSK&<-MSK>
.IFO .. PST-1,<
SOS LOC>,<
~~BIT 35, CAN USE SOS
MOVX .SAC,- .. PST ~~LOAD -1 IN APPROPRIATE POSITION
ADDM .SAC,LOC»
~GENERAL

DEFAULT, TAKES OPCODE

DEFINE OPSTR (OP,STR,Y)<
.. STRO (.OPST1,,,Y»
DEFINE .OPST1 (OP,LOC,MSK)<
· .TSIZ ( .. PST,MSK)
.IFO .. PST,<
OP LOC>,<
;;FULL WORD, USE GIVEN OP DIRECTLY
.. LDB .SAC,LOC,MSK ;~OTHERWISE, GET SPECIFIED BYTE
OP .SAC»
DEFINE OPSTRM (OP,STR,Y)<
.. STRO (.OPST2,,,Y»
DEFINE .OPST2 (OP,LOC,MSK)<
· .TSIZ ( .. PST,MSK)
.IFO .. PST,<
OP LOC>,<
;~FULL WORD, USE OP DIRECTLY
.. LDB .SAC,LOC,MSK
OP .SAC
.. DPB .SAC,LOC,MSK»

C-21

MACSYM

:JUMP IF ALL FIELDS ARE 0 (ONE REGISTER AT MOST)
DEFINE JE (STR,Y,BA)<
· . STRI ( .. JE,  ,  , Y , .. STR3) >
DEFINE .. JE (BA,LOC,MSK)<
; :SEE IF AC
· .TSAC ( .. ACT,LOC)
.IFO .. ACT,<
.. TSIZ ( .. PST,MSK)
::SEE WHICH CASE
.CASE .. PST,«
SKIPN LOC
::FULL WORD, TEST IN MEMORY
JRST BA>,<
HRRZ .SAC,LOC
::RIGHT HALF, GET IT
JUMPE .SAC,BA>,<
HLRZ .SAC,LOC
::LEFT HALF, GET IT
JUMPE .SAC,BA>,<
MOVE .SAC,LOC
::NOTA, GET WORD
JXE (.SAC,MSK,,<
JXE (LOC,MSK,,,Y, .. STR3)>
DEFINE .. IN (BA,LOC,MSK)<
.. TSAC ( .. ACT,LOC)
::SEE IF AC
· I FO .. ACT, <
.. TSIZ ( .. PST,MSK)
.CASE .. PST,«
SKIPE LOC
;;FULL WORD, TEST IN MEMORY
JRST BA>,<
HRRZ .SAC,LOC
;;RIGHT HALF, GET IT
JUMPN .SAC,BA>,<
HLRZ .SAC,LOC
;;LEFT HALF, GET IT
JUMPN .SAC,BA>,<
MOVE .SAC,LOC
;;NOTA, GET WORD
JXN (.SAC,MSK,,<
JXN (LOC,MSK, ,  , Y , .. S'I'R4) >
;JNAND - JUMP ON NOT 'AND' OF ALL FIELDS
DEFINE JNAND (STR,Y,BA)<
.. STRI ( .. JNA3,,,Y, .. STR4»
DEFINE .. JNA3 (BA,LOC,MSK)<
.. TSAC ( .. ACT,LOC)
.IFO .. ACT,<
SETCM .SAC,LOC
;;NOT AC, GET COMPLEMENT OF WORD
JXN (.SAC,MSK,,<
;;JUMP IF ANY BITS ORIGINALLY OFF
JXF (LOC,MSK,,Y, .. STR5)
%TG:>
DEFINE .. JAN1 (BA1,BA2,LOC,MSK)<
.. JNA3 (BA1,LOC,MSK»
;;DO JUMP NAND TO LOCAL TAG
DEFINE .. JAN2 (BA1,BA2,LOC,MSK)<
.. TSAC ( .. ACT,LOC)
.IFO .. ACT,<
SETCM .SAC,LOC
;;NOT AC, GET COMPLEMENT OF WORD
JXE (.SAC,MSK,,<
;;JUMP IF ALL BITS ORIGINALLY ONES
JXO (LOC,MSK,,Y, .. STR5)
%TG:>
DEFINE .. JN01 (BA1,BA2,LOC,MSK)<
.. IN (BA1,LOC,MSK»
;;DO JUMP OR TO LOCAL TAG
DEFINE .. JN02 (BA1,BA2,LOC,MSK)<
.. JE «BA2>,LOC,MSK»
;;DO JUMP NOR TO GIVEN TAG
;TEST AND MODIFY GROUP USING DEFINED STRUCTURES.
;MODIFY-ONLY PROVIDED FOR COMPLETENESS.
;GENERATES EXACTLY ONE INSTRUCTION

TEST-ONLY AND

DEFINE .. DOTY (M,T)<
;;MACRO TO DEFINE ALL CASES
IRP M,<
IRP T,<
DEFINE TQ'M'T (STR,Y)<
.. STR1 ( .. TY,M'T,,Y, .. STR3»»>
.. DOTY «N,O,Z,C>,<,E,N,A»
PURGE .. DOTY

;DO 16 DEFINES

C-24

MACSYM

iSPECIAL DEFINE FOR THE TWO CASES WHICH CAN TAKE MEMORY ARG
CANNOT BE SKIPPED

i*NOTE* MAY GENERATE MORE THAN ONE INSTRUCTION -

DEFINE TMNE (STR,Y)<
.• STRI ( .. TYNE,,,Y, .. STR3»
DEFINE .. TYNE (MT,LOC,MSK)<
.• TSAC ( .. ACT,LOC)
; iSEE IF LOC IS AC
.IFO .. ACT,<
.. JXl==MSK
.IFO < .. JXI-IBO>,<
SKIPGE LOC>,<
.IFO < .. JXl+l>,<
SKIPE LOC>,<
MOVE .SAC,LOC
TXNE .SAC,MSK»>,<
TXNE LOC,MSK»
DEFINE TMNN (STR,Y)<
•. STRI ( .. TYNN,,,Y, .. STR3»
DEFINE .. TYNN (MT,LOC,MSK)<
.. TSAC ( .. ACT,LOC)
; iSEE IF LOC IS AC
.IFO .. ACT,<
.. JXl==MSK
.IFO < .. JXI-IBO>,<
SKIPL LOC>,<
.IFO < .. JXl+l>,<
SKIPN LOC>,<
MOVE .SAC,LOC
TXNN .SAC,MSK»>,<
TXNN LOC,MSK»
iALL TY MACROS CALL .. TY AFTER INITIAL STRUCTURE PROCESSING
DEFINE .. TY (MT,LOC,MSK)<
.. TSAC ( .. ACT,LOC)
;;SEE IF LOC IS AC
.IFO .. ACT,<
PRINTX ?TQ'MT - LOC NOT IN AC>,<
TX'MT LOC,MSK»

C-2S

MACSYM

SUBTTL BLOCK MACROS
;MACROS TO PROVIDE SOME BLOCK HANDLING OF CODE
;DO. - LOOP STRUCTURE, DECLARES TOP OF LOOP
LOOP. - JUMPS TO TOP OF LOOP
EXIT. - EXITS LOOP
TOP. - TAG AT TOP OF LOOP FOR JUMPS, E.G. SOJG T4,TOP.
ENDLP. - TAG AT END OF LOOP FOR JUMPS, E.G. SOJL T4,ENDLP.
DEFINE DO. (%TGB,~TGE)<
.. SVLD
%TGB: !
DEFINE ODe <
%TGE: !
.POPX>
DEFINE LOOP. <
JRST %TGB>
DEFINE TOP. <%TGB>
DEFINE ENDLP. <%TGE>
DEFINE EXIT. <
JRST %TGE»

;;SAVE CURRENT BLOCK
;;TOP OF LOOP
;;END OF LOOP
;;RESTORE DEFS
; ;LOOP TO TOP
; ;LABEL AT TOP FOR JUMPS
; ;LABEL AT END FOR JUMPS
;;EXIT LOOP

DEFINE ENDDO. <
OD.>
DEFINE .. SVLD (%SYl,%SY2,%SY3,%SY4)<
SYN OD., %SYI
SYN LOOP. ,%SY2
SYN TOP., %SY3
SYN EXIT., %SY 4
.PSHX <
SYN %SYl,OD.
SYN %SY2,LOOP.
SYN %SY3,TOP.
SYN %SY4,EXIT.»

C-26

iIFNSK., IFSKP. -

"IF NO SKIP", "IF SKIP"

iThese macros cause the following code to be conditionally executed
idepending on whether the preceding instruction(s) skipped or not.
iThe following code is ended with ENDIF., with ELSE. optional
iwithin the range.
iNote: both of these result in the same or fewer instructions than
ithe use of literals to handle the same cases.

iAlso, since the code is not in literals, the binary appears in the
;listing, and the code is easier to follow with DDT.
;If the preceding :3kip can be written in either sense, it is better
ito use IFSKP. because one fewer instructions will be generated.
;IFSKP. and IFNSK. have an alternate form where the consequence code
;is given as a macro argument.
In the normal case, no macro argument is given.
;"IF NO SKIP" CONSEQUENCE-CODE ALTERNATIVE-CODE
;If the instruction(s) preceding the macro does not skip, the 'consequence
code' will be executed; otherwise (i.e. if the instruction skips) the
'alternative code' will be executed.
DEFINE IFNSK. (NSCOD,SKCOD,%TGl,%TG2)<
IFB ,<
; ;THE REGULAR FORM
.. SVDF
;;SAVE DEFINITIONS OF OUTER BLOCK
TRNA
;;SKIP
JRST %TGI
;;JUMP PAST CODE
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT>
;;SAVE THE FALSE TAG
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT>
;;SAVE THE END TAG

>

IFNB ,<
JRST %TGI
SKCOD
JRST %TG2
%TGl:!
NSCOD
%TG2:!»

;;THE ALTERNATE FORM
;;THE NOSKIP CASE

C-27

MACSYM

iIf JSYS Error
DEFINE IFJER. (NSCOD,SKCOD,%TGl,%TG2,%TG3) <
IFB ,<
iiTHE REGULAR FORM
.. SVDF
iiSAVE DEFINITIONS OF OUTER BLOCK
ERJMP %TG3
iiSKIP
JRST %TGI
iiJUMP PAST CODE
%TG3: !
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT>
iiSAVE THE FALSE TAG
DEFINE .. TAGE (INST,PCT)<
INST %TG2" PCT>
i iSAVE THE END TAG

>
IFNB ,<
ERJMP %TGI
SKCOD
JRST %TG2
%TGl:!
NSCOD
%TG2:!»

iTHE ALTERNATE FORM
iiTHE NOSKIP CASE

i

iOBSOLETE NAME
DEFINE IFNES. (ARGl,ARG2) <
PRINTX % IFNES. should be changed to IFJER.
IFJER. ,,<
.. SVDF
JRST %TG
DEFINE .. TAGF (INST,PCT)<
INST %TG' 'PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT>

iiREGULAR FORM
iiSAVE DEFINITIONS OF OUTER BLOCK
i iSAVE FALSE TAG

iiSAVE END TAG

>
IFNB ,<
JRST %TG
SKCOD
%TG:!»

C-28

MACSYM

iIf No JSYS Error
DEFINE IFNJE. (SKCOD,%TG,%TG2)<
IFB ,<
i i REGULAR FORM
.. SVDF
iiSAVE DEFINITIONS OF OUTER BLOCK
ERJMP %TG
DEFINE .. TAGF (INST,PCT)<
INST %TG" peT>
iiSAVE FALSE TAG
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT>
i iSAVE END TAG

>

IFNB ,<
ERJMP %TG
SKCOD
%TG:!»
iOBSOLETE NAME
DEFINE IFESK. (ARG)<
PRINTX % IFESK.
I FNJE.  >

should be changed to IFNJE.

C-29

MACSYM

;CONDITIONALS WHICH REPRESENT JUMP CASES - I.E. AC L, LE, G, ETC.
; IF CONDITION IS SATISFIED, DO BRACKETTED CODE
DEFINE IFE. (AC,%TGl,%TG2) <
JUMPN AC,%TGI
· .SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl' 'PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT>

;;JUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
;;DEFINE END TAG

>
DEFINE IFN. (AC,%TGl,%TG2)<
JUMPE AC,%TGI
· .SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl' 'PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2" PCT>

;;JUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
;;DEFINE END TAG

>
DEFINE IFG. (AC,%TGl,%TG2)<
JUMPLE AC,%TGI
· . SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2" PCT>

; ;JUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
; ;DEFINE FALSE TAG
;;DEFINE END TAG

>
DEFINE IFGE. (AC,%TGl,%TG2) <
JUMPL AC,%TGI
.. SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2" PCT>

; iJUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
; ;DEFINE FALSE TAG
;;DEFINE END TAG

>
DEFINE IFLE. (AC,%TGl,%TG2) <
JUMPG AC,%TGI
.. SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT>
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT>

;;JUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
;;DEFINE END TAG

>

C-30

MACSY~1

DEFINE IFL. (AC,%TGl,%TG2)<
JUMPGE AC, ~5TGI
· . SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl" PCT)
DEFINE .. TAGE (INST,PCT)<
INST %TG2'" PCT)

; ;JUMP IF NOT CONDITION
;;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
; ; DEF INE END TAG

)

DEFINE IFXE. (AC ,MASK, %TGl" %TG2)
JXN AC,MASK,%TGI
.. SVDF
DEFINE .. TAGF (INST,PCT)<
INST %TGl' 'PCT)
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT)

<
;;JUMP IF NOT CONDITION
; ;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
;;DEFINE END TAG

)

DEFINE IFXN. (AC,MASK,%TGl,%TG2)<
JXE AC,MASK,%TGI
;;JUMP IF NOT CONDITION
.. SVDF
;;SAVE OUTER BLOCK
DEFINE .. TAGF (INST,PCT)<
INST %TGl"PCT>
;;DEFINE FALSE TAG
DEFINE .. TAGE (INST,PCT)<
INST %TG2' 'PCT)
;;DEFINE END TAG
)

DEFINE IFQE. (STR,Y,%TGl,%TG2)<
IN 

;;JUMP IF NOT CONDITION
; ;SAVE OUTER BLOCK
;;DEFINE FALSE TAG
; ; DEFINE END TAG

)

C-31

MACSYM

;GENERAL CASES WITHIN CONDITIONALS
;IIAND SKIp lI
DEFINE ANSKP. <
.. TAGF (JRST,»

; ;JUMP TO 'FALSE'

DEFINE ANNSK. <
TRNA
· .TAGF (JRST,»

;;JUMP TO 'FALSE'

DEFINE
DEFINE
DEFINE
DEFINE

ELSE. < . . . . U>
ENDIF. < .•.. U>
.. TAGF < .•.. U>
.. TAGE < . . . . U>

;;UNDEFINED UNTIL BLOCK ENTERED

;IIAND Ell ETC.
DEFINE ANDE. (AC)<
.. TAGF «JUMPN AC,>,»

;;JUMP IF NOT CONDITION

DEFINE ANDN. (AC) <
.. TAGF «JUMPE AC,>,»

;;JUMP IF NOT CONDITION

DEFINE ANDG. (AC) <
· .TAGF (  , ) > ; ; JUMP IF NOT CONDITION
DEFINE ANDGE. (AC)<
· .TAGF «JUMPL AC, >,) >

; ; JUMP IF NOT CONDITION

DEFINE ANDLE. (AC) <
· .TAGF «JUMPG AC, > , ) >

; ; JUMP IF NOT CONDITION

DEFINE ANDL. (AC)<
· .TAGF «JUMPGE AC,>,»

;;JUMP IF NOT CONDITION

DEFINE ANDXE. (AC,MASK)<
· .TAGF «JXN AC,MASK,>,»

;;JUMP IF NOT CONDITION

DEFINE ANDXN. (AC,MASK)<
.. TAGF «JXE AC,MASK,>,»

;;JUMP IF NOT CONDITION

DE FIN E AN DQ E . ( S T R , Y) <
.. TAGF (,,>,»

;;JUMP IF NOT CONDITION

DEFINE ANDQN. (STR,Y)<
.. TAGF «JE ,,>,»

;;JUMP IF NOT CONDITION

C-32

MACSYM

iLOCAL WORKER MACROS
iTHIS INITS THE DEFINITIONS OF ELSE. AND ENDIF. WHEN ENTERING A
iNEW BLOCK.
DEFINE .. INDF <
DEFINE ELSE. <
.. TAGE (JRST,)
.. TAGF (,<:!»
SYN .. TAGE, .. TAGF
DEFINE ELSE. < .... U»
DEFINE ENDIF. <
.. TAGF (,<:!»
.. RSDF>

iiJUMP TO END
iiDEFINE THE FALSE TAG
iiMAKE FALSE EQUIVALENT TO END
iiELSE CAN APPEAR ONCE ONLY
iiDEFINE FALSE TAG
iiRESTORE DEFINITIONS OF OUTER BLOCK

>

C-33

MACSYM

iSAVE DEFINITIONS
DEFINE .. SVDF (%SYl,%SY2,%SY3,%SY4)<
SYN ELSE., %SYI
SYN ENDIF.,%SY2
SYN .. TAGF , %SY3
SYN .. TAGE, %SY4
.PSHX <
SYN %SYl,ELSE.
SYN %SY2,ENDIF.
SYN %SY3, .. TAGF
SYN %SY4, .. TAGE>
.. INDF
iiREINIT DEFS

>
DEFINE .. RSDF <
.POPX>
iMACROS TO PUSH/POP STRINGS
DEFINE .PSHX (STUFF)<
.PSHXl (.PSHX2,
DEFINE .PSHXl (WCH,STUFF)<
WCH «STUFF»>
DEFINE .PSHX2 (OLD)<
DEFINE .PSHXl (WCH,STUFF)<
WCH «,
DEFINE .POPX <
.PSHXl (.POPX2»
DEFINE .POPX2 (STUFF)<
.POPX4 STUFF>
DEFINE .POPX4 (JUNK,STUFF)<
.POPX3 STUFF>
DEFINE .POPX3 (TOP,REST)<
TOP
DEFINE .PSHXl (WCH,STUFF)<
WCH «,

C-34

MACSYI~

SUBTTL CALL, RET, JSERR
IFE REL,<
EXTERN JSERRO,JSMSGO,JSHLTO,R,RSKP>
iCALL AND RETURN
.ACl==l
.AC2==2
.AC3==3
.A16==16
P=17

iACS FOR JSYS ARGS
iTEMP FOR STKVAR AND TRVAR
iSTACK POINTER

OPDEF CALL [PUSHJ P,O]
OPDEF RET [POPJ P,O]
iABBREVIATION FOR

CALL, RET, RETSKP

OPDEF CALLRET [JRST)
.NODDT CALLRET
DEFINE RETSKP 
iMACRO TO PRINT MESSAGE ON TERMINAL
DEFINE TMSG ($MSG)<
HRROI .ACl, [ASCIZ \$MSG\l
PSOUT>
iMACRO TO OUTPUT MESSAGE TO FILE
i ASSUMES JFN ALREADY IN .ACI
DEFINE FMSG ($MSG)<
HRROI .AC2,[ASCIZ \$MSG\]
MOVEI . AC~:,
SOUT>

°

iMACRO TO PRINT MESSAGE FOR LAST ERROR, RETURNS +1
DEFINE PERSTR (SMSG)<
IFNB <$MSG>,<
TMSG <$MSG»
CALL JSMSGO>
iMACRO TO PRINT JSYS ERROR MESSAGE, RETURNS +1 ALWAYS
OPDEF JSERR[l
OPDEF EJSERR[]

;Since MACRO couldn't hendl~ OPDEF of an OPDEF
(i.e. ERCAL) defined elsewhere, use JUMP 17
instead

iMACRO FOR FATAL JSYS ERROR, PRINTS MSG THEN HALTS
OPDEF JSHLT[]
OPDEF EJSHLT[]

iPRINT ERROR

MESS~GE

iSince MACRO couldn't han~lc OPDEF of an OPDEF
(i.e. ERCAL) defined elsewhere, use JUMP 17
instead

IF JSYS FAILS

DEFINE ERMSG(TEXT),<
ERJMP
[TMSG 
C-35

MACSYM

>

JSHLT]

;MAKE SYMBOLS EXTERN IF NOT ALREADY DEFINED
DEFINE EXT (SYM)<
IF2,<
IRP SYM,<
IFNDEF SYM,
~MACRO

TO REMOVE CHARACTER

DEFINE UNBRK.

(%%V,V2)

<

%%FOO==%%V
BRKO

(%%FOO,V2,l)

>
DEFINE BRKO (%%11,V2,FLAVOR)
<
.. V22==%%11
.. Vl==%%ll
IFNB ,< .. V22==V2>
REPEAT .. V22-<%%11>+1,< ~~BRACKETS AROUND %%11 IN CASE ITS AN EXPRESSION
A
%%W== .. Vl/ D32
~~DECIDE WHICH WORD CHARACTER GOES IN
%%X== .. Vl-%%W*A D32
~~CALCULATE BIT POSITION WITHIN WORD
IFE FLAVOR,BRI<:Cl \"<%%W+"O">
; ~MODIFY CORRECT MASK WORD
IFN FLAVOR,BRI<:C2 \"<%%W+"O">
.. Vl== .. Vl+l

>

>

DEFINE BRKel (ARGl)
<
W'ARGl'.==W'ARGl' .!
DEFINE BRKC2 (ARGl)
<
W'ARGl'.==W'AH.Gl'.&<-l-lB<%%X»

>
~MACRO

TO INITIALIZE 4-WORD 12-BIT CHARACTER BREAK MASK

DEFINE BRINI. (AO ,AI ,A2 ,A3<0»

<
WO.==AO
Wl.==Al
W2.==A2
W3.==A3

;INITIALIZE BREAK MASK

>
;MACRO TO DEFINE A BREAK SET
DEFINE BRMSK. (INIO,INIl,INI2 .INI3,ALLOW,DISALW)
<
BRINI. INIO,INIl,INI2,INI3
;;SET UP INITIAL MASK
I RPC ALLOW, <
UNBRK.." ALLOW" > ~; DON'T BREAK ON CHARS TO BE ALLOWED IN FI
IRPC DISALW,<
BRKCH .. "DISALW">
; ;BREP.,K ON CHARACTERS NOT ALLOWED
EXP WOo ,WI. ,W2. ,W3.
~~STORE RESULTANT MASK IN MEMORY
j

>

C-37

MACSYM

;COMND - MACRO FOR BUILDING FUNCTION DESCRIPTOR BLOCK
;THIS IS THE OLD ONE, BEFORE .CMBRK EXISTED.
USE FLDBK. FOR SPECIFYING
;BREAK SETS
DEFINE FLDDB. (TYP,FLGS,DATA,HLPM,DEFM,LST)<
· .XX==
IFNB ,< .. XX=CM%HPP! .. XX>
IFNB ,< .. XX=CM%DPP! .. XX>
· . XX
IFNB ,
IFB ,
IFNB ,
IFB ,,,
IFNB ,< .. XX=CM%HPP! .. XX>
IFNB ,< .. XX=CM%DPP! .. XX>
IFNB ,< .. XX=CM%BRK! .. XX>
· .XX
IFNB ,
IFB ,
IFNB ,
IFB ,,,,,
IFNB ,

>

C-38

MACSYM

;USEFUL EXTENDED ADDRESSING DEFINITIONS
OPDEF
OPDEF

XMOVE I [SETMI]
XHLLI [HLLI]

;EXTENDED MOVE IMMEDIATE
;NOT YET IN MACRO

DEFINE XBLT. (A) <
EXTEND A, r XBLT] >

C-39

MACSYM

SUBTTL SUPPORT CODE FOR JSERR
IFN REL,<

A=l
B=2

C=3
D=4
iJSYS ERROR HANDLER
i
CALL JSERRO
; RETURNS +1: ALWAYS, CAN BE USED IN +1 RETURN OF JSYS'S
JSERRO::MOVEI A,.PRIIN
CFIBF
MOVEI A,. PRIOU
DOBE
TMSG <
? JSYS ERROR: >
JSMSGO::MOVEI A,.PRIOU
HRLOI B,.FHSLF
SETZ C,
ERSTR
JFCL
JFCL
TMSG <

>

iCLEAR TYPAHEAD
iWAIT FOR PREVIOUS OUTPUT TO FINISH

;SAY

THIS FORK "

LAST ERROR

RET

;FATAL JSYS ERROR - PRINT MESSAGE AND HALT
CALL JSHLTO
; RETURNS: NEVER
JSHLTO::CALL JSERRO
;PRINT THE MSG
JSHLT1: HALTF
TMSG 

JRST JSHLT1

>

;HALT AGAIN IF CONTINUED
;END OF IFN REL,

C-40

MACSYM

SUBTTL STKVAR - STACK VARIABLE FACILITY
;MACRO FOR ALLOCATING VARIABLES ON THE STACK. ITS ARGUMENT IS
;A LIST OF ITEMS.
EACH ITEM MAY BE:
; 1. A SINGLE VARIABLE WHICH WILL BE ALLOCATED ONE WORD
; 2. A VARIABLE AND SIZE PARAMETER WRITTEN AS .
THE
;
VARIABLE WILL BE ALLOCATED THE SPECIFIED NUMBER OF WORDS.
;RETURN FROM A SUBROUTINE USING THIS FACILITY MUST BE VIA
;RET OR RETSKP.
A DUMMY RETURN WHICH FIXES UP THE STACK IS PUT ON
; THE STACK AT THE POINT THE STKVl1.R I S ENCOUNTERED.
;WITHIN THE RANGE OF A STKVAR, PUSH/POP CANNOT B~ USED AS THEY WILL
;CAUSE THE VARIABLES (WHICH ARE DEFINED AS RELATIVE STACK LOCATIONS)
;TO REFERENCE THE WRONG PLACE.
;TYPICAL USE:
STKVAR ,ZZ>
ENDSV.
;END OF SCOPE OF NAMES
IFE REL,<
EXTERN .STKST,.STKRT>
DEFINE STKVAR (ARGS)<
; ; RE1~EMBER RADIX
.. STKR==1 I)
RADIX 8
.. STKN==O
IRP ARGS,<
.STKVl (ARGS»
JSP .AI6,.STKST
.. STKN , , .. STKN
RADIX .. S'rKR
DEFINE ENDSV.<.ENSVI 
; INTERMEDIATE MAC:RO TO PEi'\L OFF ANGLEBRACKETS IF ANY
DEFINE .STKVl (ARG)<
.STKV2 (ARG»
;INTERMEDIATE MACRO TO CALCULATE OFFSET AND COUNT VARIABLES
DEFINE .STKV2 (VAR,SIZ)<
IFB ,< .. STKN== .. STKN+l>
IFNB ,< .. STKN== .. STKN+SIZ>
.. STKQ== .. STKN+l
.STKV3 (VAR,\ .. STKQ»
;INNERMOST MACRO TO DEFINE VARIABLE
DEFINE .STKV3 (VAR,LOC)<
IFDEF VAR,<.IF VAR,SYMBOL,
DEFINE .ENSV2 (ARG) <
.ENSV3 (ARG»
DEFINE .ENSV3 (ARG,SIZ)<
DEFINE ARG< .... U»
C-41

MACSYM

IFN REL,<
;COMMON ENTRY AND EXIT ROUTINE FOR STACK VARIABLE
ENTRY .STKST
.STKST::ADD P,0(.A16)
JUMPGE P,STKSOV
STKSEl: PUSH P,0(.AI6)
PUSHJ P, 1 ( . A16)
.STKRT::JRST STKRTO
POPP,.A16
SUBP,.A16
AOS O(P)
RET

;BUMP STACK FOR VARIABLES USED
;TEST FOR STACK OVERFLOW
;SAVE BLOCK SIZE FOR RETURN
;CONTINUE ROUTINE, EXIT TO .+1
;NON-SKIP RETURN COMES HERE
;SKIP RETURN COMES HERE-RECOVER COUNT
;ADJUST STACK TO REMOVE BLOCK
;NOW DO SKIP RETURN

STKRTO: POP P,.AI6
SUBP,.A16
RET

;RECOVER COUNT
;ADJUST STACK TO REMOVE BLOCK
;DO NON-SKIP RETURN

STKSOV: SUB P,0(.AI6)
HLL .AI6,0(.AI6)
STKSOl: PUSH P, [0]
SUB .A16, [1, ,0]
TLNE .AI6,777777
JRST STKSOl
JRST STKSEI

;STACK OVERFLOW- UNDO ADD
;SETUP TO DO MULTIPLE PUSH, GET COUNT
;DO ONE PUSH AT A TIME, GET REGULAR
; ACTION ON OVERFLOW
;COUNT DOWN TO O?
;NO, KEEP PUSHING

>

;END OF IFN REL,

C-42

MACSYM

SUBTTL TRVAR - TRJ\NSIENT VARIABLE FACILITY
iTRANSIENT (STACK} VARIABLE FACILITY - EQUIVALENT TO STKVAR
iEXCEPT ALLOWS VARIABLES TO BE USED WITHIN LOWER LEVEL ROUTINES
iAND AFTER OTHER THINGS HAVE BEEN PUSHED ON STACK.
iN.B. USES .FP AS FRAME POINTER - MUST NOT BE CHANGED WHILE
;VARIABLES IN USE .
. FP==15

iDEFAULT FRAME POINTER

IFE REL,<
EXTERN .TRSET,.TRRET,.ASSET,.SASET,.ASRET>
DEFINE TRVAR (VARS)<
iiREMEMBER CURRENT RADIX
· . TRR==l 0
RADIX 8
iiINIT COUNT OF STACK WORDS
· . NV==l
IRP VARS,<
. TRV1 (\TARS) >
; ; PROCESS LIST
JSP .A16,.TRSET
iiALLOCATE STACK SPACE, SETUP .FP
.. NV-1" .• NV-1
RADIX .. TRR
iiRESTORE RADIX
DEFINE ENDTV.<.ENSV1 
DEFINE .TRV1 (VAR)<
· TRV2 (VAH) >

iiPEEL OFF ANGLEBRACKETS IF ANY

DEFINE .TRV2 (NAM,SIZ)<
· TRV3 (NAM, \ .. NV)
i i DEFINE VARIABLE
IFB ,< .. NV= .. NV+1>
IFNB ,< .. NV= .. NV+SIZ»
DEFINE .TRV3 (NAM,LOC)<
IFDEF NAM,<.IF NAM,SYMBOL,
JSP .A16,.ASSET
iiSETUP STACK
RADIX .. TRR
;iRESTORE RADIX
DEFINE ENDAS.<.ENSV1 
iSAME AS ABOVE EXCEPT ALSO RESTORES TI-T4 FROM STACK

C-43

MACSYM

DEFINE SASUBR (ARGS)<
.. TRR==lO
iiSAVE RADIX
RADIX 8
.. NV==l
iiINIT ARG COUNT
IRP ARGS,<
.TRVI (ARGS»
iiDEFINE ARG SYMBOL
IFG .. NV-5,
JSP .A16,.SASET
iiSETUP STACK
RADIX .. TRR
iiRESTOPE RADIX
DEFINE ENDSA.<.ENSVI 

C-44

MACSYI>1

IFN REL, <
;SUPPORT ROUTINE FOR TRVAR
.TRSET::PUSH P,.FP
MOVE .FP,P
ADD P, 0 ( • A16)
JUMPGE P,TRSOV
TRSET1: PUSHJ P,1(.A16)
.TRRET: :JRST [ MOVEM .FP,P
POP P,. FP
POPJ P,]
MOVEM .FP,P
POP P,.FP
AOS O(P)
POPJ P,
TRSOV:

MOVE P,.FP
PUSH P,.A16
HRR Z • A16 , 0 ( • A16 )
ADJSP P,-1(.A16)
MOVE .A16,1(.FP)
JRST TRSETI

;PRESERVE OLD .FP
;SETUP FRAME PTR
;ALLOCATE SPACE
iCONTINUE ROUTINE, EXIT VIA .+1
iCLEAR STACK
iRESTORE OLD .FP
;HERE IF SKIP RETURN
iPASS SKIP RETURN
;STACK OVERFLOW, UNDO ADD
;SAVE LOCAL RETURN
;GET COUNT
;ADJUST STACK, GET TRAP HERE OR ON PUSH
iRESTORE LOCAL RETURN
;NOW CHARGE AHEAD

;SUPPORT ROUTINE FOR ASUBR
.ASSET::PUSH P,.FP
iSAVE .FP
MOVE .FP,P
iSETUP FRAME POINTER
ADJSP P,4
;BUMP STACK
DMOVEM A,l(.FP) ;SAVE ARGS
DMOVEM C,3(.FP)
PUSHJ P,O(.A16)
;CONTINUE ROUTINE
.ASRET:: JRST [ MOVEM .FP,P
iNO-SKIP RETURN, CLEAR STACK
POP P,.FP
POPJ P,]
MOVEM .FP,P
iSKIP RETURN, CLEAR STZCK
POP P,.FP
AOS O(P)
POPJ P,
;SUPPORT ROUTINE FOR SASUBR
.SASET: :PUSH P,.FP
;SAVE .FP
MOVE .FP,P
iSETUP FRAME POINTER
ADJSP P,4
;BUMP STACK
DMOVEM A,1(.FP) iSAVE ARGS
DMOVEM C,3(.FP)
PUSHJ P,O(.A16)
iCONTINUE ROUTINE
.SARET:: JRST [ DMOVE A,l(.FP)
; REs'rORE
Dr10VE C,3(.FP)
MOVEM .FP,P
;NO-SKIP RETURN, CLEAR STACK
POP P,.FP
POPJ P,]
DMOVE A, 1 ( . FP)
i REs'rORE
DMOVE C, 3 ( • FP)
MOVEM .FP,P
;SKIP RETURN, CLEAR STACK
POP P,.FP
A.OS O(P)
POPJ P,
iEND OF IFN REL,
>

C-45

MACSYM

;AC VARIABLE FACILITY
IFE REL,<
EXTERN .SAVl,.SAV2,.SAV3,.SAV4,.SAV8>
.FPAC==5
.NPAC==lO

;FIRST PRESERVED AC
iNUMBER OF PRESERVED ACS

DEFINE ACVAR (LIST)<
;;INIT NUMBER OF ACS USED
.. NAC==O
IRP LIST,<
.ACVl (LIST»
;;PROCESS ITEMS
.ACV3 (\ .. NAC)
;;SAVE ACS USED
DEFINE ENDAV.<.ENAVI 
DEFINE .ACVl (ITEM)<
.ACV2 (ITEM»

; iPEEL OFF ANGLEBRACKETS IF ANY

DEFINE .ACV2 (NAM,SIZ)<
IFDEF NAM,<.IF NAM,SYMBOL,,< .. NAC= .. NAC+l>
IFNB ,< .. NAC= .. NAC+SIZ»
DEFINE .ACV3 (N)<
IFG N-.NPAC,
IFLE N-4,<
JSP .A16,.SAV'N>
;;SAVE ACTUAL NUMBER USED
IFG N-4,<
JSP .A16,.SAV8»
;;SAVE ALL
DEFINE .ENAVI (ARGS)<
IRP ARGS,<
.ENAV2 (ARGS»>
DEFINE .ENAV2 (ARG)<
.ENAV3 (ARG»
DEFINE .ENAV3 (NAM,SIZ)<
PURGE NAM,NAM

>
IFN REL,<
;SUPPORT ROUTINES FOR AC VARIABLE FACILITY
.SAVl:: PUSH P,.FPAC
PUSHJ P, 0 ( . A16)
SKIPA
AOS -l(P)
POP P,.FPAC
POPJ P,

iCONTINUE PROGRAM

.SAV2:: PUSH P,.FPAC
PUSH P,.FPAC+l
PUSHJ P, 0 ( . A16)
SKIPA
AOS -2(P)
POP P,.FPAC+l
POP P,.FPAC
POPJ P,

C-46

MACSYMI

.SAV3: :
.SAV4:: PUSH P,.FPAC
PUSH P,.FPAC+l
PUSH P,.FPAC+2
PUSH P,.FPAC+3
PUSHJ P,0(.A16)
SKIPA
AOS -4(P)
POP P,.FPAC+3
POP P,.FPAC+2
POP P,.FPAC+l
POP P,.FPAC
POPJ P,
.SAV8:: ADD P,[lO"lOJ
JUMPGE P,[HALT .J
DMOVEM .FPAC,-7(P)
DMOVEM .FPAC+2,-5(P)
DMOVEM .FPAC+4,-3(P)
DMOVEM .FPAC+6,-1(P)
PUSHJ P, 0 ( . A16)
SKIPA
AOS -lO(P)
DMOVE .FPAC+6,-1(P)
DMOVE .FPAC+4,-3(P)
DMOVE .FPAC+2,-5(P)
DMOVE .FPAC,-7(P)
SUB P, [10, ,10J
POPJ P,

>

C-47

MACSYM

jAC SAVE FACILITY - COMPILES OPEN PUSH'S
j
SAVEAC 
jDUMMY ROUTINE PUT ON STACK TO CAUSE AUTOMATIC RESTORE. SUPPORTS
j
+1 OR +2 RETURNS.
DEFINE SAVEAC (ACS)<
.NAC==O
IRP ACS,<
PUSH P,ACS
jjSAVE AN AC
.NAC=.NAC+1>
jjCOUNT THEM
.N1==.NAC
SETMI .A16, [CAIA
jjSTACK DUMMY RETURN
AOS -.N1(P)
jjHANDLE SKIP RETURN
IRP ACS,<
.N1=.N1-1
MOVE ACS,-.N1(P»
jjRESTORE AN AC
SUB P, [.NAC" .NAC]
j jCLEAR STACK
POPJ P,]
j jFINAL RETURN
PUSHP,.A16>
IFN REL,<
jSTANDARD RETURNS
RSKP::
R··

>

AOS 0 (P)
RET

jEND OF IFN REL,

C-48

MACSYM

SUBTTL BLSUBR - BLISS-STYLE SUBROUTINE MECHANISM
;MACROS FOR STACK-STYLE (BLISS) SUBROUTINE ENTRY
;BLSUBR DEFINE A SUBROUTINE ENTRY POINT.
IT TAKES THE LIST OF
;SYMBOLS WHICH WILL BE BOUND TO VALUES ON THE STACK AT ENTRY TO
;THE ROUTINE.
A STACK FRAME POINTER IS SETUP IN .FP AND MUST
;BE UNDISTURBED THROUGH THE ROUTINE.
OTHER MECHANISMS WHICH
;USE THE STACK (E.G. SAVEAC) CAN BE USED.
;AN OPTIONAL LIST OF VARIABLES IN THE SAME FORMAT AS FOR TRVAR CAN
;BE GIVEN TO ALLOCATE LOCAL DYNAMIC STORAGE.
;SUBROUTINES DEFINED HEREBY ARE CALLED WITH BLCALL.
IFE REL,<
EXTERN .ENTER>
DEFINE BLSUB. (ARGS,VARS)<
;;ARGUMENTS, LOCAL VARIABLES
;;REMEMBER CURRENT RADIX
· . TRR==l 0
RADIX 8
;;SO BACKSLASH ARGS WILL WORK HEREIN
; ; INIT' ARG COUNT
· . NA==2
IRP ARGS,<
;;COUNT ARGS
· .NA= .. NA+l>
IRP ARGS,<
.BLSUl(ARGS,\ .. NA)
; ; DEFINE AN ARG
· .NA= .. NA·-l>
;;SETUP TO COUNT VARIABLE STORAGE
· . NV==l
IRP VARS,<
;;COUNT WORDS AND DEFINE SYMBOLS
· TRVI (VARS) >
DEFINE ENDBS. <.ENBSI 
.ENSVI 
;;SETUP FRAME PTR
DEFINE .BLSUI (ARG,LOC)<
DEFINE ARG<-AO'LOC(.FP»
$'ARG==

C-49

MACSYM

;CALL
;THIS
;EACH
1.
2.

STACK-STYLE (BLISS) SUBROUTINE
MACRO TAKES THE NAME OF THE SUBROUTINE AND A LIST OF ARGUMENTS.
ARGUMENT IN THE ARG LIST IS ONE OF THE FOLLOWING:
A NORMAL EFFECTIVE ADDRESS SPECIFICATION, E.G. FOO, @FIE(X)
AN IMMEDIATE ADDRESS WRITTEN AS <. ,ADR> WHERE ADR IS AN EFFECTIVE
ADDRESS SPECIFICATION, E.G. FOO, @FIE(X). NOTE THAT THIS
ADDRESS WILL BE COMPUTED BY AN XMOVEI AT THE TIME OF THE CALL
SO SECTION INFORMATION WILL BE BOUND AT THAT TIME.
NOTE ALSO
THAT THIS FORM SHOULD *NOT* BE USED FOR A LITERAL CONSTANT
WHERE YOU WOULD NOT WANT THE CURRENT SECTION PUT IN THE LEFT
USE [CONST] INSTEAD.
YES, THE DOT HERE IS LIKE NO-DOT IN BLIS
HALF.
AND VICE-VERSA.
3. A STRUCTURE REFERENCE SPECIFICATION, E.G. AAA, 
PUSH P,[ .. NA+l" .. NA+l]
PUSHJ P,NAME

;;INIT ARG COUNT
;;COMPILE PUSH
;;COUNT OF ARGS AND SELF
;;JUMP TO SUBR

>
;SEPARATE PAIRED ARGS
DEFINE .BLCL2 (ARGS)<
.BLCLI ARGS>
DEFINE .BLCLI (ARGl,ARG2)<
IFIDN <.>,<
;;IMMEDIATE ARG
XMOVEI .AI6,ARG2
PUSHP,.AI6>
IFDIF <.>,<
.IFATM ,.BLFI
;;SEE IF ARG IS ATOMIC
IFN .BLFl,<
;;SET TO 1 IFF STRUCTURE REF
.BLFl==O
;;CHECK RELATED STRUCTURE SYMBOL
.IF %'ARGl,MACRO,<
.BLFl==I>
;;IS A STRUCTURE
IFNB ,<
.BLFl==I>
; ;SECOND ARG IMPLIES STRUCTURE TOO
IFN .BLFl,<
; ;'OR' OF ABOVE TWO CHECKS
LOAD .A16,ARGl,ARG2
PUSH P,.AI6»
IFE .BLFl,<
;IF WASN'T A STRUCTURE REF,
PUSH P,ARGl»
; ; PUSH ONE ARG
.. NA= .. NA+l>
;MACRO TO SEE IF STRING IS AN ATOM, I.E. CONTAINS ONLY LEGAL SYMBOL
;CONSTITUENTS A-Z, 0-9, %, $, .
;IT IS PAINFULLY SLOW, BUT MACRO PROVIDES NO OTHER WAY
;FLAG WILL BE SET TO 1 IF STRING IS ATOM, 0 OTHERWISE
DEFINE .IFATM (S,FLG)<
IRPC S,<
FLG==O
IFGE IISII-IIAII,
IFE IISII_II$II,
IFE IISII-II.II,
IFE FLG,
11

C-50

;;SET FLG IF LETTER OK

MACSY~!

IFN REL,<
;SUPPORT CODE FOR BLSUBR
.ENTER::PUSH P,.FP
MOVE .FP,P
ADD P, 0 ( . A16)
JUMPGE P,ENTOV
ENTOV1: PUSHJ P,1(.A16)
JRST [ MOVE P,.FP
JRST ENTX1]
MOVE P,. FP
AOS -l(P)
ENTX1:
POP P,.FP
POPP,.A16
SUB P,O(P)
JRST
A16)

°(.

ENTOV:

>

MOVE P,.FP
PUSH P,.A16
HRRZ .A16,O(.A16)
ADJ S P P, - 1 I: • Al 6 )
MOVE .A16,1(.FP)
JRST ENTOV~~

;ALLOCATE LOCAL STORAGE
;JUMP IF OVERFLOW
; RESE~~ STACK PTR
; PROP1\,GATE SKIP
;REMOVE ARGS
;RETUHN
;STACK OVERFLOW, UNDO ADD
;SAVE LOCAL RETURN IN l(.FP)
;GET COUNT
;ALLOCATE SPACE, GET TRAP HERE OR ON PUSH
;RESTORE LOCAL RETURN
;CHARGE AHEAD
;END IFN REL

C-51

MACSYM

SUBTTL ERROR-MESSAGE SUPPORT FOR MACROS

iMacro to print current location, macro name, and text
DEFINE MPRNTX (MNAME,TEXT)


.. MP. (\. ,MNAME,
iMacro to print current location and text
DEFINE EPRNTX (TEXT)


.. EP. (\. ,

C-52

MACSYM

SUBTTL MACROS TO SUPPORT EXTENDED ADDRESSING
Local format indirect word
===========~=====================================================

! I! O!

Re ~:;e rved

!

AD DR

X

I

===================~=============================================

! O! I! 2

~Macro

12! 13!14

35!

17!18

to generate local-format (instruction-format)

indirect words

~Args:

ADDH
~Generates

Q

18-bit in-section address (indexing or indirection
may be specified)
errors on the following:
Bits 0-12 non-zero in ADDR

DEFINE LFIWM (ADDR)
< .. ERR.=O
~~Reset error flag
IFN «ADDR>&,

IFN .. ERR.,<-l,-l,-l>
~~Generate Q error
IFE .. ERR.,
PURGE •. ERR.

>

C-53

;~Generate

LFIW

MACSYM

Global format indirect word
=====================~======~==================:====== ============

101 I 1

x

ADDR

SEC

=================================================================

101 1 12

516

171

351

;Macro to generate global-format (extended-format) indirect words
;Args:
SEC
12-bit section number
ADDR
IS-bit in-section address (indexing or indirection
may be specified)
;Generates

Q

errors on the following:
Bits 0-12 non-zero in ADDR
SEC greater than 12 bits

DEFINE GFIWM (SEC,ADDR)
< .. ERR.=O
;;Reset error flag
IFN «SEC>&<~O<-1,,770000»>,


IFN «ADDR>&<~O<777740,,0»>,


IFN .. ERR. ,<-1,-1,-1>

;;Generate Q error
;;Generate GFIW

IFE .. ERR. , <
«_&<0,,-1»1«SEC>
PURGE .. ERR.

>

C-54

<~022»»

MACSY'~

The following macros generate all flavors of 1 and 2-word
global and local byte pointers. They are similar to the
POINT pseudo-op, with the following exceptions:
1.
2.

3.

The basic argument triad of (bytesize,address,byte position)
is maintained. However, some of the macros will prefix
and-or postfix the triad with additional argument(s).
Numeric arguments are always interpreted in the current radix.
Assuming the current radix is octal, note the following
equivalences:
a.
POINT 10,200,36
b. LlBPT(12,200,44)
c.
LlBPT(ADlO,200,AD36)
Strict field-limits are enforced. Any expression that
will not fit into its appropriate field will generate
an error message and cause a Q error. Thus:
LlBPT (10,200,-1) will cause an error.
(The correct effect
is generated with:
LlBPT (10,200).)

Also, note that in those macros that generate global byte-pointers,
section values and address v21ues must always be specified as oistinct
arguments.
If address symbol FOO resolves to 377,,123456 , then it
would be specified in the macros as follows:
G2BPT(FOO -A D1 8 ,7,FOO&777777,36)
Or (better):
FOOSEC=FOO -AD18
FOOADR=FOO&777777
G2BPT(FOOSEC,7,FOOADR,36)
If runtime-generated values are needed, then any or all argument
fields may be assembled as zero and filled in at runtime using an
appropriate DPB instruction.
(GIBPT will not allow a zero bytesize
and will only allow a zero byte position if it is legal for that
particular bytesize.)

C-5:>

MACSYM

I-word local byte pointer
=================================================================
P
S
ADDR
! 0 ! I !
x
===============================================:==================

5!6

!0

II! 12! 13!14

17!18

;Macro to generate local, I-word byte pointers
;Args:
BSIZ
Byte size
AD DR
18-bit address (indexing or indirection
may be specified)
BPOS
Optional byte position
;Generates Q errors on the following:
Bits 0-12 non-zero in ADDR
BSIZ or BPOS greater than 6 bits
DEFINE LIBPT (BSIZ,ADDR,BPOS)
<.BSIZ.=BSIZ
;;Convert args to numeric
.BPOS.=BPOS
.. ERR.=O
;;Reset error flag
IFN «ADDR>&,


IFN <.BSIZ.&,


IFN <.BPOS.&,

;;Cause Q error
IFN < .. ERR.>,<-l,-l,-l>
;;Generate byte pointer
IFE < .. ERR.>,
<>,
IFDIF <>,

>

PURGE .. ERR. , . 8S I Z . , . BPOS.

>

C-56

35!

MACSYfJI

I-word global byte pointer
==============================:===================================

P,S

ADDR

SEC

==============================:===================================

!O

~Macro

5!6

17!

to generate global, I-word byte pointers

~Args:

SEC
BSIZ
AD DR

BPOS
~Generates

~Legal

~Size
~ 6
~ 7
~ 8
~ 9
~18

Q

12-bit section address
Byte size
18-bit address (NO!! indexing or indirection
may be specified)
Optional byte position
errors on following:
Illegal byte size or byte position
Indirection or indexing specified with AD DR
ADDR greater than 18 bits
SEC greater than 12 bits

sizes and positions are as follows:
Positions (Octal)
44,36,30,22,14,6,0
44,35,26,17,10,1
44,34,24,14,4
44,33,22,11,0
44,22,0

C-57

35!

MACSYM

DEFINE GIBPT (SEC,BSIZ,ADDR,BPOS
IFN BSIZ-7,
;;ELSE IF BYTESIZE=6


>
IFN BSIZ-6,
;;ELSE IF BYTESIZE=8
 > > > >

>

IFN BSIZ-AOIO,
;;ELSE IF BYTESIZE=9


>
IFN BSIZ-AOll,
; ;ELSE IF BYTESIZE=18
A


>
A
IFN BSIZ- 022,< .. ERR.= .. ERR.!2> ;;ELSE: Illegal byte size

>

>

>

>

IFN «ADDR>&<-1"O»,< .. ERR.= .. ERR.!4> ;;Address greater than 18 bits
;; or indexing or indirection specified
IFN «SEC>&,< .. ERR.= .. ERR.!
IFN .. ERR.&,

;;Generate the byte pointer
IFE .. ERR.,
«< .. ENC.+«BSIZ>-«BPOS>/& AO<22»>

>

C-58

MACSYM

2-word local byte pointer
!0
5!6
II! 12! 13
17!lS
35!
==========="======================================================

P

S

Available to User

! 1 ! Reserved

=================================================================
! I! O!
ADDR
Reserved
x
! I !
=================================================================

! O! I! 2

12! 13!14

17!lS

35!

;Macro to generate local, 2-word byte pointers
;Args:
BSIZ
ADDR
BPOS
OPT
;Generates

Q

Byte size
IS-bit address (Indexing or indirection
may be specified)
Optional byte position
Optional user field available in word 1, right half
errors on the following:
Bits 0-12 non-zero in ADDR
Bits 0-17 non-zero in OPT
BSIZ or BPOS greater than 6 bits

DEFINE L2BPT(BSIZ,ADDR,BPOS,OPT<0»
< .. ERR.=O
;;Reset error flag
.BSIZ.=BSIZ
;;Convert args to numeric
.BPOS.=BPOS
IFN «ADDR)&,

IFN «OPT>&<-l"O»,

IFN <.BSIZ.&,


IFN <.BPOS . &,

IFN .. ERR. ,<-1,-1,--1>
i ;Generate Q error
;;Generate the byte pointer
IFE .. ERR.,
<>,«!lB12>&
IFIDN <>,«!lB12>&

;;Generate LFIW

>

PURGE .. ERR.,.BSIZ.,.BPOS.

>

C-59

MACSYM

2-word global byte pointer

5!6

!0

II! 12! 13

35!

17!lS

================================================:=================
P
S
Available to User
! 1 ! Reserved

! O!

I

!

x

SEC

ADDR

=================================================================

! O!

1 !2

5!6

17!

35!

:Macro to generate global, 2-word byte pointers
;Args:
SEC
12-bit section address
BSIZ
Byte size
ADDR
IS-bit address (Indexing or indirection
may be specified)
BPOS
Optional byte position
OPT
Optional user field available in word 1, right half
;Generates Q errors on the following:
SEC greater than 12 bits
Bits 0-12 non-zero in ADDR
Bits 0-17 non-zero in OPT
BSIZ or BPOS greater than 6 bits
DEFINE G2BPT(SEC,BSIZ,ADDR,BPOS,OPT<0»
< .. ERR.=O
;;Reset error flag
.BSIZ.=BSIZ
;;Convert args to numeric
.BPOS.=BPOS
IFN «SEC>&,


IFN «ADDR>&,

IFN «OPT>&<-l"O»,


IFN <.BSIZ.&,

IFN <.BPOS.&,

IFN .. ERR.,<-l,-l,-l>
;;Generate Q error
;;Generate the byte pointer
IFE .. ERR.,
<>,«!lB12>&
IFIDN <>,«!lB12>&
; ;Generate GFIW
« &<0, ,-l»!«SEC> 

>

PURGE .. ERR. , . BS I Z • , • BPOS.

>

C-60

MACSYlOi

LIT

iMAKE SURE LITERALS COME BEFORE END MARK

IFN REL,<
. RLEND==: .-1

iMARK END OF CODE IN MACREL

>
IF2,

iFLUSH REL FROM UNIV FILE

.XCMSY
END

i

End of

MACSYI~

C-61

APPENDIX D

ACTSYM

D-1

ACTSYM

i<5.UTILITIES>ACTSYM.MAC.2, 2S-0ct-S1 14:37:54, EDIT BY GRANT
iChange major version to 5
UNIVERSAL ACTSYM - DECsystem-10/20 symbol file for accounting V2(35)
SUBTTL B.A. HUIZENGA/BAH/TAH/DPM
22-Ju1-S1
iVERSION INFORMATION
ACCVER==5
ACCEDT==35
ACCMIN==O
ACCWHO==O

iMAJOR VERSION
iEDIT LEVEL
iMINOR VERSION
;LAST MODIFIER

iCOPYRIGHT (C) 1979,1980,19S1 BY
iDIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.

,
iTHIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND COPIED
iONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE AND WITH THE
iINCLUSION OF THE ABOVE COPYRIGHT NOTICE.
THIS SOFTWARE OR ANY OTHER
iCOPIES THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
;OTHER PERSON.
NO TITLE TO AND OWNERSHIP OF THE SOFTWARE
IS HEREBY
;TRANSFERRED.
;THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE
iAND SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT
;CORPORATION.
;

iDIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
;SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
IFNDEF
IFNDEF

FTUUOS,
FTJSYS,

DEFINE
DEFINE

TOPS10,
TOPS20,

;TDPS-10
;TOPS-20

IFl,<
TOPS10
TOPS20




>

D-2

OF

ITS

ACTSYM

SUBTTL

PARAMETERS FOR USAGE ITEM DESCRIPTORS

~FIELDS

IN DATA ITEM DESCRIPTOR

US%FLG==:77B5
US%IMM==:lBO

~FLAGS

1 - IMMEDIATE DATA ITEM
0 - ADDRESS OF DATA ITEM
~TYPE CODE
~

~

US%TYP==:77Bll
.USASC==:O
.USSIX==:l
.USOCT==:2
.USDEC==:3
.USDAT==:4
.USTAB==:5
.USVER==:6
.USSPC==:7
.USPDT==:lO
US%LEN==:777B20
US%COD==:77777B35
~RECORD

~ASCII
~SIXBIT

~OCTAL
~DECIMAL
~DATE-TIME

(SPECIAL FORM)
NUMBER
~SPACE FILL
~OLD STYLE TOPS-IO DATE/TIME

~TABLE

~VERSION

~LENGTH

~

ITEtJ! CODE

TYPE CODES
RADIX 10

~****

NOTE RADIX 10 ****

.UTRST==:l
.UTSEN==:2
.UTCKP==:3
.UTUSB==:4
.UTTAD==:5
.UTBAT==:6
.UTINP==:7
.UTOUT==:8
.UTFLU==:9
.UTDSU==:lO
.UTMNT==:ll
.UTMMT==:12
.UTDMT==:13
.UTFCM==:14
.UTRET==:15
.UTARC==:16
.UTMIG==:17
.UTCOL==:18

~SYSTEM

.UTUSR==:5000

iUSER-DEFINED ENTRY TYPES ARE 5000-9999

RADIX 8

RESTART ENTRY
iSESSION ENTRY
iCHECKPOINT ENTRY (SYSTEM RESTART)
~FIRST ENTRY OF USAGE FILE
(SAME AS .UTFST)
~DATE-TIME CHANGE
~BATCH PROCESSOR
~INPUT SPOOLER ENTRY
~OUTPUT SPOOLER ENTRY
~FILE USAGE DIRECTORY ENTRY
~DISK SPINDLE USAGE ENTRY
iSTRUCTURE MOUNT ENTRY
~TAPE MOUNT ENTRY
~DECtape MOUNT ENTRY
~FILE COMMAND ENTRY
File retrieved
i File archived
~ File migrated
i File collected

;**** END OF RADIX 10 ****

D-3

ACTSYM

COMMENT
The format of the data to be passed
to
the accounting
system will
consist of a list of items describing the entries in a single record.
The record descriptor list will have a header
type code and the record version information.

containinq

the

record

Format of a record descriptor:

===============================================:========!
DEC ver.

\
\
\

CUST ver.

Entry Type

--------------------------------------------------------!
Flags
Type
Length
Item Code
-------------------------------------------------------!
Data or Address (-1 for default)
--------------------------------------------------------!
\
\

\

!--------------------------------------------------------!

a

(Marks end of list)

!=======================================================!
The generation of these
tables will
be controlled
by the
macro.
All known data items will have a name generated by the
this macro.
If any application dependent items are needed the
macro may be used to generate the new item.
The USENT.
macro
used to generate the first word of the entry descriptor table.

UITEM.
use of
UITEM.
may be

All USAGE entry headers and the system-defined USAGE entry types
use
the
specific
item types and these items are ordered by the system.
Installation-defined USAGE entries (with entry types above
.UTUSR
5000
to
9999)
use the arbitrary data items (USUAS., USUSX., USUDC.,
USUOC., USUVR., USUDT., and USUSP.) in the order in which they are
to
be written
into
the USAGE entry record.
Each arbitrary data record
must be preceded by a USUAR.
item.
Example of installation-defined USAGE entry:
;The following code writes a USAGE entry for a fictitious "file access count"
in a user program.
This program must be running as an enabled OPERATOR or
; WHEEL.
;Here to write USAGE entry for file access count
MOVEI Tl,.USENT
MOVEI T2,FILRDB
USAGE
ERJMP USGERR
JRST USGOK

;USAGE function to write entry
;Address of Record Descriptor Block
;Write the entry
;Failed to write entry-- do something else
;Entry written-- go on

;Record descriptor block for file access count accounting
FILRDB:
USENT.
USPVR.

(.UTUSR+12,1,1)
;Entry type 5012= file access count.
«BYTE(3)VWHO(9)VMAJOR(6)VMINOR(18)VEDIT),US%IMM) iVersion
of this program (for header record).

USUAR.
USUAS.
USUSP.

iStart of first arbitrary record.
([ASCII \This appears in every entry\], ,27) iText.
(,,5)
iSpace fill,S characters.

D-4

ACTSYM

~Space
~Count

USUSP.
USUDC.

(,,5)
(F I LCNT, ,6)

USUAR.
USUSX.
USUAS.

~Start of second arbitrary record.
«SIXBIT \FILE: \>,US%IMM,6) ~SIXBIT text for filename.
(FILNAM,,200)
~File name, 200 characters.

EXP 0

~End

fill,S characters.
of file accesses, 000000-999999.

of entry.

~Storage

FILCNT: BLOCK I
FILNAM: BLOCK ~D<200/5>
&

~~;

End of comment

~File access count
iFile name text

ACTSYM

SUBTTL UITEM. /

USENT. /

USAGE. DEFINITIONS

SALL
DEFINE UITEM. (NAME,TYPE,LEN) <
DEFINE US'NAME'. (DATA<-I>,IMMED,ULEN
>
DEFINE USENT. (ETYPE,DVER,CVER) <
BYTE (9) AD,AD

(18)

AD

>
DEFINE USAGE. (CODE,LENGTH,TYPE,FLAGS,DATUM) <
FLAGS+Bll+,<-I>
IFNB ,

>
DEFINE USDSK. (TABLE) <
USAGE. (.USDST,O,.USTAB,US%IMM,

0-6

<

ACTSYM

SUBTTL USAGE.

ITEM-CODE DEFINITIONS

DEFINE USLIST <
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(JNO,O, . USDEC ,4)
(TAD,1,.USDAT,14)
(TRM,2, .USASC,l)
(LNO,3,.USOCT,4)
( PNM , 4 , . US S I X, 6 )
(PVR,5,.USVER,15)
(AMV,6,.USVER,15)
(NOD,7,.USSIX,6)
(PPN,10,.USOCT,12)
(NMl,ll, .USSIX,6)
(SNM,12,.USASC,39)
(MVR,13, .USVER,15)
(MBD,14,.USDAT,14)
(MUP,15,.USDEC,18)
(ACT,16,.USASC,39)
(LCK,17,.USDAT,14)
(RTM,20,.USDEC,9)
(CTI,21, .USDEC,11)
(SST,22,.USDAT,14)
(JTY,23, .USDEC,l)
(BJN,24, .USSIX,6)
(BSN,25, .USDEC,6)
(COM,26,.USASC,39)
(DKR,27,.USDEC,8)
(DKW,30,.USDEC,8)
(VTI,31,.USDEC,11)
(EBX,32,.USDEC,9)
(MBX,33,.USDEC,9)
(MCL,34,.USDEC,6)
(MCM, 35, . US DEC, 6 )
(SCL,36, .USDEC,3)
(TYI,37, .USDEC,6)
(TYO,40,.USDEC,6)
(TYW,41,.USDEC,6)
(CPN,42,.USDEC,1)
(CPO,43, .USDEC,4)
(CPl,44,.USDEC,4)
(CP2,45, .USDEC,4)
(CP3,46, .USDEC,4)
(CP4,47,.USDEC,4)
(CP5, 50, .USDEC,4)
(RQQ, 51, .USDEC,ll)
(NM2,52, .USASC,39)
(CCT,53, .USDEC,7)
(DTL,54, .USDAT,14)

iJOB NUMBER
iCURRENT DATE/TIME
iTERMINAL DESIGNATOR
iLINE NUMBER
iPROGRAM NAME (CALLER)
iPROGRAM VERSION
iACCOUNTING MODULE VERSION
iCALLER'S LOCATION
iPROJECT / PROGRAMMER NUMBER (TOPSIO ONLY)
iNAME OF USER (TOPSIO)
iSYSTEM NAME
iMONITOR VERSION NUMBER
iMONITOR BUILD DATE
iMONITOR UPTIME (IN SECONDS)
iACCOUNT STRING
iTIME OF LAST CHECKPOINT
iRUNTIME IN MS
iCORE-TIME INTEGRAL (TOPSIO ONLY)
iSESSION START TIME
iJOB TYPE (BATCH / TIMESHARING)
iBATCH JOB NAME
iBATCH SEQUENCE NUMBER
iUSER COMMENT
iDISK READS
iDISK WRITES
iVIRTUAL CORE-TIME INTEGRAL
iEBOX MEGACOUNTS (CYCLES * 10A 6 )
iMBOX.MEGACOUNTS (CYCLES * 10A6)
iMONITOR CALLS
iMONITOR COMMANDS
iSCHEDULING CLASS
iTTY INPUT CHARACTERS
iTTY OUTPUT CHARACTERS
iTTY WAKEUPS
i NUMlBER OF CPUS
iSERIAL NUMBER OF CPUO
iSERIAL NUMBER OF CPUI
iSERIAL NUMBER OF CPU2
iSERIAL NUMBER OF CPU3
iSERIAL NUMBER OF CPU4
iSERIAL NUMBER OF CPU5
iRUN QUEUE QUOTIENT (TOPSIO ONLY)
iNAME OF USER (TOPS20)
iCONSOLE CONNECT TIME (SECONDS)
iDATE/TIME BEFORE CHANGE (STAD)

D-7

ACTSYM

iDISK UTILIZATION RECORD ENTRIES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(NRF,55,.USDEC,3)
(TAL,56,.USDEC,10)
(TUS,57,.USDEC,10)
(TNF,60,.USDEC,5)
(STR,61,.USASC,6)
(STP,62,.USDEC,1)
(KTP,63,.USDEC,3)
(DTP,64,.USDEC,3)
(LIQ,65,.USDEC,6)
(LOQ,66,.USDEC,6)
(LLI,67,.USDAT,14)
(LAT,70,.USDAT,14)
(EXP,71,.USASC,1)
(DIR,72,.USASC,39)
(ALC,73,.USDEC,10)
(USG,74, .USDEC,10)
(FIL,75, .USDEC,5)
(FON,76,.USASC,1)

iNUMBER OF RECORDS FOLLOWING
iTOTAL ALLOCATED STORAGE
iTOTAL STORAGE USED
iTOTAL NUMBER OF FILES
iSTRUCTURE NAME
iSTRUCTURE TYPE CODE
iCONTROLLER TYPE
iDEVICE TYPE
iLOGGED IN QUOTA
iLOGGED OUT QUOTA
iLAST LOGGED IN DATE/TIME
iLAST DISK ACCOUNTING DATE/TIME
iEXPIRED DIRECTORY (Y/N)
iDIRECTORY NAME
iALLOCATED STORAGE
iSTORAGE USED
iNUMBER OF FILES
iFILES ONLY INDICATOR (Y/N)

iSPOOLER INFORMATION RECORD ENTRIES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(SRT,77,.USDEC,9)
(SCI,100,.USDEC,11)
(SDR,101,.USDEC,8)
(SDW,102,.USDEC,8)
(JNM,103,.USSIX,6)
(QNM,104,.USSIX,3)
(SDV,105,.USSIX,6)
(SSN,106,.USDEC,6)
(SUN,107,.USDEC,6)
(CRT,110,.USDAT,14)
(DSP,111,.USSIX,6)
(TXT,112,.USASC,39)
(PRI,113,.USDEC,2)
(SNF,114, .USDEC,5)
(SCD,115, .USDAT,14)
(FRM,116,.USSIX,6)

iSPOOLER RUNTIME
iCORE-TIME INTEGRAL
iSPOOLER DISK READS
iSPOOLER DISK WRITES
iJOB NAME
iQUEUE NAME
iPROCESSING DEVICE
iSEQUENCE NUMBER
iSPOOLER UNITS PROCESSED
;CREATION DATE/TIME OF REQUEST
;DISPOSITION
;OPR OR SYSTEM TEXT
iPRIORITY
;NUMBER OF FILES PROCESSED
iSCHEDULED DATE/TIME
;FORMS TYPE

iDATE/TIME CHANGE RECORD ENTIRES
DEFUS (OFD,117,.USDEC,7)
DEFUS (OFS,120,.USDEC,7)
DEFUS (ODT,121,.USDAT,14)

iOFFSET IN DAYS
;OFFSET IN SECONDS
;OLD DATE/TIME

iARBITRARY RECORD ITEM TYPES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(UAR,122,.USSPC,0)
(UAS,123,.USASC,0)
(USX,124,.USSIX,0)
(UOC,125,.USOCT,0)
(UDC,126,.USDEC,O)
(UDT,127,.USDAT,14)
(UVR,130,.USVER,15)
(USP,131,.USSPC,0)

;USER-DEFINED
iUSER-DEFINED
iUSER-DEFINED
iUSER-DEFINED
JUSER-DEFINED
iUSER-DEFINED
jUSER-DEFINED
JUSER-DEFINED

ARBITRARY RECORD DELIMITER
ASCII STRING
SIXBIT STRING
OCTAL NUMBER
DECIMAL NUMBER
DATE AND TIME
VERSION (STANDARD FORMAT)
SPACE FILL

iSTRUCTURE MOUNT RECORD ENTRIES
DEFUS (SSI,132,.USSIX,6)
DEFUS (TNP,133,.USDEC,2)
DEFUS (SRV,134,.USDAT,14)

jSIXBIT STRUCTURE 10
jTOTAL NUMBER OF PACKS
jSERVICED DATE/TIME OF REQUEST

0-8

ACTSYM

DEFUS (MCT,135, .USDEC,3)
DEFUS (DCT,136,.USDEC,3)
DEFUS (ATP,137,.USDEC,1)

;MOUNT COUNT BEFORE MOUNT
;MOUNT COUNT AFTER DISMOUNT
;ACCESS TYPE

;TAPE MOUNT RECORD ENTRIES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(VID,140,.USSIX,6)
(VSN,141,.USSIX,6)
(MRF,142,.USDEC,8)
(MWF,143,.USDEC,8)
(MLT,144,.USDEC,2)
(MLS,145,.USDEC,1)
(MRD,146,.U8DEC,8)
(MWR,147,.USDEC,8)
(FSI,150,.USSIX,6)
(SRE,15l,.USDEC,lO)
(SWE,152,.USDEC,lO)
(HRE,153,.USDEC,lO)
(HWE,154,.USDEC,lO)

;MAGTAPE VOLUME LABEL IN VOLI LABEL
;VISUAL SERIAL NUMBER
;THOUSANDS OF FRAMES READ
;THOUSANDS OF FRAMES WRITTEN
;LABEL TYPE
;VOLUME LABEL STATE
;NUMBER OF PHYSICAL RECORDS READ
;NUMBER OF PHYSICAL RECORDS WRITTEN
;FILE SET IDENTIFIER
;NUMBER OF SOFT READ ERRORS
;NUMBER OF SOFT WRITE ERRORS
iNUMBER OF HARD READ ERRORS
iNUMBER OF HARD WRITE ERRORS

D-9

ACTSYM

; Retrieve/archive/migration/collection entries

DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(TPl,155,.USSIX,6)
(TSl,156,.USDEC,4)
(TFl,157,.USDEC,6)
(TP2,160,.USSIX,6)
(TS2,16l,.USDEC,4)
(TF2,162,.USDEC,6)
(RSN,163,.USOCT,1)
(EUT,164, .USDEC,7)

Tape ID 1
Tape saveset #
Tape file #
Tape 2 ID
Tape saveset #
Tape file #
Reason offline code
ELAPSED USE TIME (STRUCTURE AND TAPE)

;BATCH PROCESSOR RECORD ENTRIES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(BAC,165,.USASC,39)
(BRN,166, .USDEC,9)
(BCT,167, .USDEC,ll)
(BDR,170,.USDEC,8)
(BDW,17l,.USDEC,8)
(BJB,172,.USSIX,6)
(BSQ,173,.USDEC,6)
(BDT,174,.USDAT,14)
(BET,175,.USDAT,14)
(BST,176,.USDAT,14)
(BDS,177,.USSIX,6)
(BTX,200,.USASC,39)
(BPR,20l,.USDEC,2)
(URE,202,.USDEC,6)
(UAC,203,.USDEC,6)
(UCE, 204, . USDEC, 4)
(UCH,205, .USDEC,4)
(RIN,206,.USDEC,6)

;BATCH ACCOUNT STRING
;BATCH RUNTIME
;BATCH CORE-TIME INTEGRAL
;BATCH DISK READS
;BATCH DISK WRITES
;JOB NAME
;SEQUENCE NUMBER
;CREATION DATE/TIME OF REQUEST
;DATE/TIME JOB COULD BE SCHEDULED
;DATE/TIME JOB STARTED RUNNING
;DISPOSTITION
;TEXT
;PRIORITY OF REQUEST
;USER'S RUNTIME ESTIMATE
;USER'S ACTUAL RUNTIME
;USER'S CORE ESTIMATE
;USER'S CORE HIGHWATER MARK
;REQUEST ID NUMBER

;INPUT SPOOLER RECORD ENTRIES
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(IAC,207,.USASC,39)
(IRN,2l0,.USDEC,9)
(ICT,2ll,.USDEC,11)
(IDR,212, .USDEC,8)
(IDW,2l3, .USDEC,8)
(IJN,2l4,.USSIX,6)
(IQN,215,.USSIX,3)
(IPD,2l6, .USSIX,6)
(ISN,2l7, .USDEC,6)
(ICR,220,.USDEC,6)
(ICD,22l,.USDAT,14)
(IDS,222, .USSIX,6)
(ITX,223,.USASC,39)
(IPR,224, .USDEC,2)
(IRI, 225, . USDEC, 6)
(ICN,226,.USDEC,7)

DEFUS (OAC,227,.USASC,39)
DEFUS (ORI,230,.USDEC,6)
DEFUS (OCN,231,.USDEC,7)
DEFUS (DPN,232,.USASC,39)

;INPUT SPOOLER ACCOUNT STRING
;INPUT SPOOLER RUNTIME
;INPUT SPOOLER CORE-TIME INTERAL
;INPUT SPOOLER DISK READS
;INPUT SPOOLER DISK WRITES
;INPUT SPOOLER JOB NAME
;INPUT SPOOLER QUEUE NAME
;INPUT SPOOLER PROCESSING DEVICE
;INPUT SPOOLER SEQUENCE NUMBER
;INPUT SPOOLER NUMBER OF CARDS READ
;CREATION DATE/TIME OF REQUEST
;DISPOSITION
;TEXT
;PRIORITY OF REQUEST
;REQUEST ID NUMBER
;CONNECT TIME
;OUTPUT SPOOLER ACCOUNT STRING
;OUTPUT SPOOLER REQUEST ID NUMBER
;OUTPUT SPOOLER CONNECT TIME
;DISK USAGE DIRECTORY PPN

;DISK USAGE ACCOUNT STRING RECORD DEFUS (DAC,233,.USASC,39)
DEFUS (DPP,232, .USASC,39)
DEFUS (DFN,233,.USDEC,5)
DEFUS (DFS,234,.USSIX,6)

(DUA)

;DUA
;DUA
;DUA
;DUA
D-I0

-

ACCOUNT STRING
PPN/DIRECTORY
NUMBER OF FILES
FILE STRUCTURE NAME

ACTSYM

DEFUS (DFT,235,.USDEC,1)
DEFUS (DKT, 236, . USDEC, 3)
DEFUS (DDT, 237 , . USDEC, 3)

;DUA - FILE STRUCTURE TYPE
;DUA - CONTROLLER TYPE
;DUA - DEVICE TYPE

;DISK SPINDLE USAGE RECORD
DEFUS
DEFUS
DEFUS
DEFUS
DE F US
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(SFS,240, .USSIX,6)
(SFT,241, .USDEC,l)
(SCT,242, .USDEC,3)
(SDT,243, .USDEC,3)
( S PI, 2 4 4 , . US]\. S C , 1 2 )
(SDU,245, .USSIX,4)
(SNP, 246, . USDEC, 2)
(SMN,247, .USDEC,2)
(DTF,250,.USDAT,14)
(DCC,251,.USDEC,7)

;FILE STRUCTURE NAME
;TYPE OF FILE STRUCTURE
;CONTROLLER TYPE
;DEVICE TYPE
iDISK PACK IDENTIFIER
;DISK UNIT NAME
iTOTAL NUMBER OF PACKS IN STRUCTURE
iM OF N PACK COUNT
iDATE/TIME OF FIRST MOUNT
iCONNECT TIME

;USER FILE STRUCTURE MOUNT RECORD (CONT.)
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(FMA,252,.USASC,39)
(FST,254, .USDEC,l)
(FCT,255,.USDEC,3)
(FDT,256,.USDEC,3)
(FDS,257,.USSIX,6)
(FOT,260,.USASC,39)
(FCD,261,.USDAT,14)
(FSD,262,.USDAT,14)
(FCO,263, .USDEC,7)

iACCOUNT STRING
;TYPE OF FILE STRUCTURE
iCONTROLLER TYPE
iDEVICE TYPE
iDISPOSITION
iTEXT
iCREATION DATE/TIME OF REQUEST
iSCHEDULED DATE/TIME OF REQUEST
iCONNECT TIME

iUSER MAGTAPE MOUNT RECORD
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(MAC,264,.USASC,39)
(MDS,265, .USSIX,6)
(MTX,266,.USASC,39)
(MCD,267,.USDAT,14)
(MSD,270,.USDAT,14)
(MVD,271,.USDAT,14)
(MCO,272,.USDEC,3)
(MCN,273,.USDEC,7)

;ACCOUNT STRING
iDISPOSITION
iTEXT
iCREATION DATE/TIME OF REQUEST
iSCHEDULED DATE/TIME OF REQUEST
iSERVICED DATE/TIME OF REQUEST
iTYPE OF CONTROLLER
iCONNECT TIME

;USER DECTAPE MOUNT RECORD
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(DAN,274,.USASC,39)
(DVI,275,.USSIX,6)
(DRI,276, .USSIX,6)
(DTR,277,.USDEC,8)
(DTW,300,.USDEC,8)
(DDS,301, .USSIX,6)
(DTX,302,.USASC,39)
(DCE,303,.USDAT,14)
(DSQ,304,.USDAT,14)
(DSS,305,.USDAT,14)
(DCN,306,.USDEC,7)

;ACCOUNT STRING
iDECTAPE VOLUME IDENTIFIER
iDECTAPE REEL IDENTIFIER
iDECTAPE READS
iDECTAPE WRITES
iDISPOSTITION
iTEXT
iCREATION DATE/TIME OF REQUEST
iSCHEDULED DATE/TIME OF REQUEST
;SERVICED DATE/TIME OF REQUEST
iCONNECT TIME

iUSER DECTAPE FILE COMMAND RECORD
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(FAS,307,.USASC,39)
(FMR,310, .USDEC,9)
(FCI,311,.USDEC,11)
(FDR,312,.USDEC,8)
(FDW,313,.USDEC,8)
(FCM,314,.USASC,1)
(FNF,315,.USDEC,2)

iACCOUNT STRING
iMOUNT RUNTIME TO PROCESS USER REQUEST
iMOUNT CORE-TIME INTEGRAL
;MOUNT DISK READS
iMOUNT DISK WRITES
iTYPE OF FILE COMMAND
;NUMBER OF FILES TRANSFERRED
D-11

ACTSYM

DEFUS
DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(FDP,316, .USSIX,6)
(FTX,317,.USASC,39)
(FCQ,320,.USDAT,14)
(FSH,321,.USDAT,14)
(FVD,322,.USDAT,14)
(FCE,323,.USDEC,7)

iDISPOSITION
iTEXT
iCREATION DATE/TIME OF REQUEST
iSCHEDULED DATE/TIME OF REQUEST
iSERVICED DATE/TIME OF REQUEST
iCONNECT TIME

iLATE COMERS
DEFUS (NM3,324,.USSIX,6)
DEFUS (B27,325,.USSPC,27)

DEFUS
DEFUS
DEFUS
DEFUS
DEFUS

(SID,326,.USSIX,6)
(B06,327,.USSPC,6)
(UPF,330,.USSIX,1)
(FPF,331,.USSIX,1)
(TMA,332,.USSIX,1)

DEFUS (LLG,333,.USPDT,14)
DEFUS (DVN,334,.USSIX,6)

>i

ii

iTOPS-IO - 2ND HALF OF USER NAME
i (#11 IS 1ST HALF)
iSPACE FILL 27 CHARACTERS USED IN TOPSIO TO
i USE INSTEAD OF PPN/DIRECTORY DEFUSES. THE
; DEFUS PPN IS USED IN CONJUNCTION WITH
; THIS ONE.
iTOPS-IO - DISK PACK ID (USED INSTEAD OF #244)
iSPACE FILL 6 CHARACTERS (USED WITH #326 ABOVE)
;TOPS-IO DISK USAGE - UFD WAS PROTECTED
iTOPS-10 DISK USAGE - SOME FILES WERE PROTECTEL
iTOPS-IO DISK USAGE - USER HAS TOO MANY AUNIQUE
;ACCOUNT STRINGS IN DIRECTORY.
LIMIT IS DEFINE
iIN IPCF MESSAGE FOR DISK USAGE FROM BACKUP
iTOPS-IO OLD FORMAT DATE/TIME OF LAST LOGIN
iTOPS-10 DEVICE NAME (MAG/DECTAPE MOUNTS)

END OF USLIST

D-12

ACTSYM

SUBTTL

Macros to define all USAGE. item codes

TOPSIO

<

DEFINE UITEM. (NAME,TYPE,LEN) <
DEFINE US'NAME'. (DATA<-I>,IMMED
>
DEFINE USAGE. (CODE,TYPE,FLAGS,DATUM) <
IFN TYPE-.USASC,
IFE TYPE-.USASC,,<
QA.IMM+BI7+CODE
EXP
-1

>

IFNB ,<
IFL FLAGS,<
QA.IMM+BI7+CODE
DATUM>
IFGE FLAGS,<-l>,<
IFE LENGTH-IO,
QA.IMM+BI7+CODE
DATUM>
IFDIF <-l>,<
BI7+CODE
&<37,,777777»

>

>
>
DEFINE USENT. (ETYPE,DVER,CVER,LRESP,RESP) <
FLAGS==O
IFNB ,BI7+.QBAFN
UGENT$
QA.IMM+BI7+.QBAET
ETYPE

>
> ;END OF TOPS-IO CONDITIONAL
DEFINE DEFUS (NAM,VAL,TYP,LEN) <
IFI,

D-13

ACTSYM

iEXPAND ALL DEFINITIONS
USLIST
iSPECIAL ITEM TYPE CODE DEFINITIONS
.USDSX==:7776
.USDST==:7777

iSTRUCTUREjDIRECTORY INFO WORD (SPECIAL)
iDISK STATISTICS TABLE POINTER

0-14

ACTSY~[

SUBTTL

TOPS-IO IPCF message definitions and formats

TOPSIO

< ;START OF A LONG CONDITIONAL
FTCASECONVERT==:O

;LOWER/UPPER CONVERSION SELECTION FEATURE TEST
; 0 = DON'T CONVERT
;-1 =CONVERT LOWER CASE LETTERS TO UPPER CASE

PRJWPB==400

;SET LOGICAL BLOCK SIZE IN PROJCT.SYS TO 2 DISK

PRJWPB==&777600 ;ROUND UP TO NEXT FULL DISK BLOCK
;IPCF TYPES OF MESSAGES SENT TO THE ACCOUNTING DAEMON, ACTDAE.
THESE ARE THE ACCOUNTING SUBFUNCTION VALUES TO STORE IN .QBAFN
OF THE QUEUE. UUO.
S EE UUOSY~I. MAC.
UGVAL$==:l
UGLGN$==:2
UGSES$==:3
UGATT$==:4
UGSDT$==:5
UGVAC$==:6
UGENT$==:7
UGEBC$==:lO
UGUFC$==:ll
UGFDM$==:12
UGFDD$==:13
UGMGM$==:14
UGMGD$==:15
UGDTM$==:16
UGDTD$==:17
UGSPM$==:20
UGSPD$==:21
UGACK$==:22
UGDUE$==:23
UGACC$==:24
UGOUP$==:25
UGLGO$==:27

;VALIDATION MESSAGES
;LOGIN MESSAGES (USER IS LOGGING IN)
;SESSION MESSAGES (USER TYPED A SESSION COMMAND)
;ATTACH MESSAGES
;SET DATE/TIME EVENT FROM DAEMON
;RESPONSE TO ANY MESSAGE IF REQUESTED
; (??~;ACK IS NON-ZERO)
;MAKE AN ENTRY
;END A BILLING CLOSURE
;USAGE FILE CLOSURE
;USER FILE STRUCTURE MOUNT MESSAGE
;USER FILE STRUCTURE DISMOUNT MESSAGE
;USER MAGTAPE MOUNT MESSAGE
;USER MAGTAPE DISMOUNT MESSAGE
;USER DECTAPE MOUNT MESSAGE
;USER DECTAPE DISMOUNT MESSAGE
;DISK PACK SPINDLE SPIN-UP MESSAGE
;DISK PACK SPINDLE SPIN-DOWN MESSAGE
;GENERAL ACK CODE
;DISK USAGE FROM BACKUP
;ACCESS CONTROL
;OBTAIN USER PROFILE
;26 = UNUSED
;MONITOR LOGOUT MESSAGE (.IPCSL)

;SUCCESSFUL/UNSUCCESSFUL IPCF MESSAGE CODES
UGTRU$==:l
UGFAL$==:2

;SUCCESSFUL MESSAGE
;FAILURE MESSAGE

D-15

ACTSYM

iFORMAT OF LOGIN MESSAGE (UGLGN$)
UL$TYP==:O
UL$ACK==:UL$TYP+l
UL$LIN==:UL$ACK+l
UL$PRG==:UL$LIN+l
UL$VER==:UL$PRG+l
UL$NOD==:UL$VER+l
UL$ACT==:UL$NOD+l
UL$ACE==:UL$ACT+7
UL$BEG==:UL$ACE+l
UL$JTY==:UL$BEG+l
ULJTI$==:l
ULJBA$==:2
UL$BNM==:UL$JTY+l
UL$BSQ==:UL$BNM+l
UL$RMK==:UL$BSQ+l
UL$RME==:UL$RMK+7
UL$CLS==:UL$RME+l
UL$PPN==:UL$CLS+l
UL$NMl==:UL$PPN+l
UL$NM2==:UL$NMl+l
UL$BRI==:UL$NM2+1
UL$TDE==:UL$BRI+l

iTYPE OF MESSAGE
iUNIQUE MESSAGE IDENTIFIER
iLINE NUMBER
iPROGRAM NAME (ALWAYS LOGIN)
iVERSION OF LOGIN
iNODE NAME
iUSER'S ACCOUNT STRING
iEND OF ACCOUNT STRING
iSESSION START DATE/TIME
iJOB TYPE
iTIMESHARING
iBATCH
iBATCH JOB NAME
iBATCH SEQUENCE NUMBER
iSESSION REMARK
iEND OF SESSION REMARK
iSCHEDULING CLASS
iPROJECT-PROGRAMMER NUMBER OF USER
iFIRST SIX LETTERS OF USER'S NAME
iLAST SIX LETTERS OF USER'S NAME
iBATCH REQUEST ID
iTERMINAL DESIGNATOR

iFORMAT OF SESSION MESSAGE (UGSES$)
US$TYP==:O
US$ACK==:US$TYP+l
US$PRG==:US$ACK+l
US$VER==:US$PRG+l
US$ACT==:US$VER+l
US$ACE==:US$ACT+7
US$BEG==:US$ACE+l
US$RMK==:US$BEG+l
US$RME==:US$RMK+7

iTYPE OF MESSAGE
iUNIQUE MESSAGE IDENTIFIER
iPROGRAM NAME (ALWAYS LOGIN)
iVERSION OF LOGIN
iUSER'S NEW ACCOUNT STRING
;END OF ACCOUNT STRING
iSESSION START DATE/TIME
iNEW SESSION REMARK
iEND OF SESSION REMARK

iFORMAT OF ATTACH MESSAGES (UGATT$)
UA$TYP==:O
UA$ACK==:UA$TYP+l
UA$LIN==:UA$ACK+l
UA$PRG==:UA$LIN+l
UA$VER==:UA$PRG+l
UA$NOD==:UA$VER+l
UA$TDE==:UA$NOD+l
UA$TJN==:UA$TDE+l

iTYPE OF MESSAGE
iUNIQUE MESSAGE IDENTIFIER
iLINE NUMBER
iPROGRAM NAME (ALWAYS LOGIN)
iVERSION LOGIN
iNODE NAME
iTERMINAL DESIGNATOR
iTARGET JOB NUMBER

D-16

ACTSYMl

;FORMAT OF THE REQUEST FOR VALIDATION MESSAGE (UGVAL$)
THIS MESSAGE CAN BE EITHER IPCF OR QUEUE. UUO FORMAT.
THE SAMPLE
PROGRAM "VP.LID" SHOWS AN EXAMPLE FOR USING QUEUE. FOR VALIDATION.
UV$TYP==:O
UV$ACK==:l
UV$PPN==:2
UV$ACT==:3
UV$ACE==:UV$ACT+7

;TYPE OF MESSAGE
;GIVEN TO US TO RETURN TO THE REQUESTOR OF
; VALIDATION
;PPN TO VALIDATE
;BEGINNING OF ACCOUNT STRING TO VALIDATE
; (MAX. OF 8 WORDS)
;LAST WORD OF THE ACCOUNT STRING

;FORMAT OF THE ANSWER TO A MESSAGE
UC$TYP==:O
UC$RES==:l
UC$ACK==:2
UC$ERR==:3
UC$ACT==:UC$ERR
UC$ACE==:UC$ACT+7

(UGVAC$)

;TYPE OF MESSAGE
;RESPONSE -- EITHER UGTRU$ OR UGFAL$
;CODE TO RETURN TO THE REQUESTOR OF VALIDATION
;BEGINNING OF ASCIZ ERROR MESSAGE
;ACCOUNT STRING RETURNED IF VALIDATION SUCCESS
;LAST WORD OF THE ACCOUNT STRING

;FORMAT OF THE SET DATE/TIME EVENT MESSAGE FROM DAEMON (UGSDT$)
UD$TYP==:O
UD$OFF==:l
UD$ODT==:2
UD$PRG==:3
UD$VER==:4

;TYPE OF MESSAGE
;TIME OFFSET OF COMMAND
;OLD DATE/TIME
;NAME OF PROGRAM SENDING MESSAGE
; (DAEMON)
;VERSION OF PROGRAM SENDING MESSAGE
; (DAEMON VERSION #)

;FORMAT OF "MAKE AN ENTRY" MESSAGE (UGENT$).
THIS MESSAGE IS ONLY GENERATED VIA THE QUEUE. UUO.
"USRENT" FOR AN EXAMPLE OF IT'S USE.

D-17

SEE SAMPLE PROGRAM

ACTSYM

;FORMAT OF THE FIRST THREE WORDS OF ALL MOUNT AND DISMOUNT MESSAGES TO
CONFORM TO GALAXY-TYPE HEADER.
UX$TYP==O
UX$FLG==l
UX$COD==2

;TYPE OF MESSAGE
;FLAGS WORD
;ACK CODE

;FORMAT OF A USER FILE STRUCTURE MOUNT MESSAGE - UGFDM$
UF$DEV==:UX$COD+l
UF$JOB==:UF$DEV+l
UF$TRD==:UF$JOB+l
UF$TNO==:UF$TRD+l
UF$PNM==:UF$TNO+l
UF$PVR==:UF$PNM+l
UF$NOD==:UF$PVR+l
UF$ACT==:UF$NOD+l
UF$ACE==:UF$ACT+7
UF$PPN==:UF$ACE+l
UF$NMl==:UF$PPN+l
UF$NM2==:UF$NMl+l
UF$STY==:UF$NM2+1
UF$PNO==:UF$STY+l
UF$CTY==:UF$PNO+l
UF$DTY==:UF$CTY+l
UF$DSP==:UF$DTY+l
UF$TXT==:UF$DSP+l
UF$CDT==:UF$TXT+IO
UF$SDT==:UF$CDT+l
UF$VDT==:UF$SDT+l
UF$CBR==:UF$VDT+l
UF$ACC==:UF$CBR+l

;DEVICE NAME IN SIXBIT
;JOB NUMBER OF USER
;TERMINAL DESIGNATOR
;LINE NUMBER
;NAME OF PROGRAM (USUALLY PULSAR)
;VERSION OF PROGRAM (USUALLY PULSAR)
;NODE NAME OF USER'S LOCATION
;USER'S ACCOUNT STRING
;END OF ACCOUNT STRING
;PROJECT-PROGRAMMER NUMBER OF USER
;FIRST SIX LETTER OF USER'S NAME
;LAST SIX LETTERS OF USER'S NAME
;TYPE OF FILE STRUCTURE
;NUMBER OF PACKS IN FILE STRUCTURE
;CONTROLLER TYPE
;DEVICE TYPE
;DISPOSITION
iTEXT TO EXPLAIN DISPOSITION
;CREATION DATE/TIME OF MOUNT REQUEST
iSCHEDULED DATE/TIME OF MOUNT REQUEST
;SERVICED DATE/TIME OF MOUNT REQUEST
;MOUNT COUNT BEFORE REQUEST
;ACCESS TYPE

;FORMAT OF USER FILE STRUCTURE DISMOUNT MESSAGE (UGFDD$).
IS APPENDED TO THE MOUNT MESSAGE.
UF~ECT==:UF$ACC+l

;MOUNT COUNT AFTER DISMOUNT

D-18

THE FOLLOWING

ACTSYM

;FORMAT OF USER MAGTAPE MOUNT MESSAGE - UGMGM$
UM$DEV==:UX$COD+l
UM$JOB==:UM$DEV+l
UM$TRD==:UM$JOB+l
UM$TNO==:UM$TRD+l
UM$PNM==:UM$TNO+l
UM$PVR==:UM$PNM+l
UM$NOD==:UM$PVR+l
UM$ACT==:UM$NOD+l
UM$ACE==:UM$ACT+7
UM$PPN==:UM$ACE+l
UM$NMl==:UM$PPN+l
UM$NM2==:UM$NMl+l
UM$CTY==:UM$NM2+1
UM$DSP==:UM$CTY+l
UM$TXT==:UM$DSP+l
UM$CDT==:UM$TXT+lO
UM$SDT==:UM$CDT+l
UM$VDT==:UM$SDT+l
UM$VID==:UM$VDT+l
UM$RID==:UM$VID+l
UM$LTY==:UM$RID+l
UM$LST==:UM$LTY+l
UM$FSI==:UM$LST+l

;DEVICE NAME IN SIXBIT
;JOB NUMBER OF USER
;TERMINAL DESIGNATOR
;LINE NUMBER
;NAME OF PROGRAM (USUALLY PULSAR)
;VERSION OF PROGRAM (USUALLY PULSAR)
;NODE NAME OF USER'S LOCATION
;ACCOUNT STRING
;END OF ACCOUNT STRING
;PROJECT-PROGRAMMER NUMBER OF USER
;FIRST SIX LETTERS OF USER'S NAME
;LAST SIX LETTERS OF USER'S NAME
;CONTROLLER TYPE
;DISPOSITION
;TEXT TO EXPLAIN DISPOSITION
;CREATION DATE/TIME OF MOUNT REQUEST
;SCHEDULED DATE/TIME OF MOUNT REQUEST
;SERVICED DATE/TIME OF MOUNT REQUEST
;VOLUME ID RECORDED IN VOLI LABEL
;REEL ID VISUAL LABEL OF TAPE
;LABEL TYPE
;VOLUME LABEL STATE
iFILE SET IDENTIFIER

iFORMAT OF A USER MAGTAPE DISMOUNT MESSAGE (UGMGD$).
APPENDED TO THE MOUNT MESSAGE.
UM$MRD==:UM$FSI+l
UM$MWR==:UM$MRD+l
UM$RRD==:UM$MWR+l
UM$RWR==:UM$RRD+l
UM$SRE==:UM$RWR+l
UM$SWE==:UM$SRE+l
UM$HRE==:UM$SWE+l
UM$HWE==:UM$HRE+l

THE FOLLOWING IS

;MAGTAPE READS - THOUSANDS OF CHARACTERS
iMAGTAPE WRITES - THOUSANDS OF CHARACTERS
;PHYSICAL RECORDS READ
iPHYSICAL RECORDS WRITTEN
iSOFT READ ERRORS
;SOFT WRITE ERRORS
iHARD READ ERRORS
iHARD WRITE ERRORS

D-19

ACTSYM

;FORMAT OF A USER DECTAPE MOUNT MESSAGE - UGDTM$
UD$DEV==:UX$COD+l
UD$JOB==:UD$DEV+l
UD$TRD==:UD$JOB+l
UD$TNO==:UD$TRD+l
UD$PNM==:UD$TNO+l
UD$PVR==:UD$PNM+l
UD$NOD==:UD$PVR+l
UD$ACT==:UD$NOD+l
UD$ACE==:UD$ACT+7
UD$PPN==:UD$ACE+l
UD$NMl==:UD$PPN+l
UD$NM2==:UD$NMl+l
UD$DSP==:UD$NM2+1
UD$TXT==:UD$DSP+l
UD$CDT==:UD$TXT+IO
UD$SDT==:UD$CDT+l
UD$VDT==:UD$SDT+l
UD$VID==:UD$VDT+l
UD$RID==:UD$VID+l

;DEVICE NAME IN SIXBIT
;JOB NUMBER OF USER
;TERMINAL DESIGNATOR
;LINE NUMBER
;NAME OF PROGRAM (USUALLY PULSAR)
;VERSION OF PROGRAM (USUALLY PULSAR)
;NODE NAME OF USER'S LOCATION
;ACCOUNT STRING
;END OF ACCOUNT STRING
;PROJECT-PROGRAMMER NUMBER OF USER
;FIRST SIX LETTERS OF USER'S NAME
;LAST SIX LETTERS OF USER'S NAME
;DISPOSITION
;TEXT TO EXPLAIN DISPOSITION
;CREATION DATE/TIME OF MOUNT REQUEST
;SCHEDULED DATE/TIME OF MOUNT REQUEST
;SERVICED DATE/TIME OF MOUNT REQUEST
;VOLUME ID RECORDED ON DECTAPE
;REEL ID VISUAL LABEL OF DECTAPE

;FORMAT OF A USER DECTAPE DISMOUNT MESSAGE (UGDTD$).
TO THE MOUNT MESSAGE.
UD$DRD==:UD$RID+l
UD$DWR==:UD$DRD+l

THE FOLLOWING IS APPENDE

;DECTAPE READS - BLOCKS
;DECTAPE WRITES - BLOCKS

0-20

ACTSYM

~FORMAT

OF A DISK SPINDLE SPIN-UP MESSAGE - UGSPM$

JS$DEV==:UX$COD+l
JS$JOB==:US$DEV+l
JS$TRD==:US$JOB+l
JS$TNO==:US$TRD+l
JS$PNM==:US$TNO+l
JS$PVR==:US$PNM+l
JS$NOD==:US$PVR+l
JS$FSN==:US$NOD+l
JS$STY==:US$FSN+l
JS$CTY==:US$STY+l
OS$DTY==:US$CTY+l
OS$DPI==:US$DTY+l
OS$PNO==:US$DPI+l
OS$MTH==:US$PNO+l
US$DTM==:US$MTH+l

UNIT NAME IN SIXBIT
NUMBER OF PULSAR
~TERMINAL DESIGNATOR
~LINE NUMBER
~NAME OF PROGRAM (USUALLY PULSAR)
;VERSION OF PROGRAM (USUALLY PULSAR)
;NODE NAME OF PULSAR'S LOCATION
;FILE STRUCTURE NAME
;FILE STRUCTURE TYPE
;CONTROLLER TYPE
iDEVICE TYPE
iDISK PACK IDENTIFIER
iNUMBER OF PACKS IN FILE STRUCTURE
iM OF N COUNT
iDATE/TIME PACK WAS SPUN UP
~DISK

~JOB

iFOHMAT OF A DISK SPINDLE SPIN-DOWN MESSAGE (UGSPD$)

D-21

IS THE SAME AS A MOUNT MESSAGE.

ACTSYM

;FORMAT OF A DISK USAGE ENTRY FROM BACKUP - UGDUE$
UB$ACN==:UX$COD+l
UB$JOB==:UB$ACN+l
UB$TRD==:UB$JOB+l
UB$TNO==:UB$TRD+l
UB$NOD==:UB$TNO+l
UB$PNM==:UB$NOD+l
UB$PVR==:UB$PNM+l
UB$TAU==:UB$PVR+l
UB$TWU==:UB$TAU+l
UB$TNF==:UB$TWU+l
UB$FSN==:UB$TNF+l
UB$PPN==:UB$FSN+l
UB$FST==:UB$PPN+l
UB$CNT==:UB$FST+l
UB$DVT==:UB$CNT+l
UB$QIN==:UB$DVT+l
UB$QOU==:UB$QIN+l
UB$LLG==:UB$QOU+l
UB$LAT==:UB$LLG+l
UB$EXP==:UB$LAT+l
UB$UPF==:UB$EXP+l
UB$FPF==:UB$UPF+l
UB$ABO==:UB$FPF+l

;NUMBER OF ACCOUNT STRINGS
;JOB NUMBER OF BACKUP
;TERMINAL DESIGNATOR
;TERMINAL NUMBER
;NODE NAME
;PROGRAM NAME (BACKUP)
;PROGRAM VERSION NUMBER
;TOTAL ALLOCATED DISK USAGE
;TOTAL WRITTEN DISK USAGE
;TOTAL NUMBER OF FILES
;FILE STRUCTURE NAME
;PPN
;FILE STRUCTURE TYPE
;CONTROLLER TYPE
;DEVICE TYPE
;LOGGED IN QUOTA
;LOGGED OUT QUOTA
;LAST LOGIN DATA/TIME (OLD FORMAT)
;LAST ACCOUNTING DATE/TIME
;EXPIRED DIRECTORY FLAG
;UFD WAS PROTECTED FLAG
;SOME FILES WERE PROTECTED FLAG
;ACCOUNT STRING BUFFER OVERFLOWED

;THE FOLLOWING 4 ITEMS ARE REPEATED FOR EACH ACCOUNT STRING IN THE UFD
UB$ACT==:UB$ABO+l
UB$BAL==:UB$ACT+I0
UB$BWR==:UB$BAL+l
UB$NFL==:UB$BWR+l

;ACCOUNT STRING
;BLOCKS ALLOCATED TO THIS ACCOUNT STRING
;BLOCKS WRITTEN
;FILE WITH THIS ACCOUNT STRING

UB$END==:UB$NFL+l

;LENGTH OF THE IPCF MESSAGE

(NOT REALLY)

;COMPUTE THE MAXIMUM NUMBER OF ACCOUNTS STRINGS THAT CAN BE PASSED IN THIS
IPCF FORMAT. ONLY 1 IPCF MESSAGE CAN BE USED SO THIS IS IT.
UB$MAC==:/

D-22

ACTSYM

~FORMAT

OF A REQUEST FOR ACCESS CONTROL VALIDATION.
THIS MESSAGE IS ONLY AVAILABLE VIA THE QUEUE. UUO.
THE SYMBOLS DEFINED
BELOW ARE USED AS THE DATA ITEM DESCRIPTORS FOR THE SUB-FUNCTION BLOCK.
SEE THE SAMPLE PROGRAM "ACCCHK" FOR AN EXAMPLE OF IT'S USE .

. UGTYP==:O
UG.VER==:O
UG.SPV==:l
.UGACT==:l
.UGPPN==:2
.UGPSW==:3

OF ACCESS CHECK
PPN, PASSWORD, AND ACCOUNT STRING
~SPRINT VERIFY PPN, PASSWORD, AND ACCT STRING
~MORE FUNCTIONS LATER
~ACCOUNT STRING BLOCK
~PPN BLOCK
~PASSWORD BLOCK
~TYPE

~VERIFY

D-23

ACTSYM

SUBTTL

TOPS-IO ACCT.SYS entry definitions

;*** Note *** Still under TOPS-IO conditional
.ACWRD==O
;FIRST WORD OF THE FILE ACCT.SYS
;FORMAT VERSION NUMBER OF THE FILE
AC.VRS==777777B17
;CURRENT VERSION NUMBER
.ACCVN==4
AC.LEN==777777B35
;LENGTH OF EACH ENTRY
.ACLEN==16
;VERSION 4 IS 14(10) WORDS LONG
;ACCT.SYS ENTRY FORMAT
.ACPPN==O
;PROJECT PROGRAMMER NUMBER
.ACPSW==l
iPASSWORD IN SIXBIT
.ACPRV==2
;PRIVILEGED BITS
AC.IPC==lBO
;JOB CAN DO IPCF PRIVILEGED FUNCTIONS
AC.DSP==3B2
;HIGHEST DISK PRIORITY
AC.MET==lB3
;JOB CAN DO METER UUO
AC.POK==lB4
;JOB CAN POKE THE MONITOR
AC.CPU==lB5
iJOB CAN CHANGE ITS CPU SPECIFICATION
AC.HPQ==74B9
;HIGHEST HPQ THAT JOB CAN SET
AC.SPL==lBlO
;JOB CAN SET NO SPOOL
AC.RTT==lB13
iJOB CAN DO REAL TIME TRAPPING (RTTRP.) UUO
AC.LOK==lB14
;JOB CAN DO LOCK UUO
AC.TRP==lB15
iJOB CAN DO TRPSET UUO
AC.SPC==lB16
iJOB CAN PEEK/SPY AT ALL OF CORE
AC.SPM==lB17
;JOB CAN PEEK/SPY AT THE MONITOR
AC.CUS==777777B35 ;RESERVED FOR CUSTOMER
.ACNMl==3
;USER'S NAME IN SIXBIT - FIRST WORD
.ACNM2==4
;USER'S NAME IN SIXBIT - SECOND WORD
.ACLIT==5
;TIMES ALLOWED TO LOGIN
AC.WDH==77777777B23
;WEEKDAY HOURS, 0000-2J59
AC.WEH==7777B35
;WEEKEND HOURS, 2-HOUR SHIFTS 0000-2200
.ACCIP==6
iCORE AND IPCF PARAMETERS
AC.NPP==777B8
iMAXIMUM NUMBER OF PHYSICAL PAGES
AC.NVP==777B17
iMAXIMUM NUMBER OF VIRTUAL PAGES
AC.SND==777B26
iMAXIMUM NUMBER OF SENDS
AC.RCV==777B35
iMAXIMUM NUMBER OF RECEIVES

0-24

ACTSYM

.ACPRO==7
~PROFILE BITS
AC.WDT==IBO
~WATCH DAYTIME
AC.WRT==IBI
~WATCH RUNTIME
AC.WWA==IB2
~WATCH WAIT
AC.RED==IB3
~WATCH READ
AC.WRI==IB4
~WATCH WRITE
AC.CDR==IB5
~SPOOL CDR
AC.CDP==IB6
~SPOOL CDP
AC.PTP==IB7
~SPOOL PTP
AC.PLT==IB8
~SPOOL PLT
AC.LPT==IB9
~SPOOL LPT
AC.WVR==IBIO
~WA'I'CH VERSION
AC.WMT==IBII
~WATCH MTA
AC.WFL==IBI2
~WATCH FILE
AC.OPR==7B23
~OPERATOR PRIVILEGE FIELD (SEE UUOSYM FOR SYMBOLS)
~.OBNOP==O
~NO OPERATOR PRIVILEGES
~.OBSDP==I
~SYSTEM OPERATOR PRIVILEGES
~.OBLOP==2
~LOCAL OPERATOR PRIVILEGES
~.OBROP==3
~REMOTE OPERATOR PRIVILEGES
AC.RMK==IB24
~REMARK IS REQUIRED
AC.ACT==IB25
~ACCOUNT IS REQUIRED
AC.LOC==IB26
~USER MAY LOGIN AT LOCAL TERMINAL
AC.ROP==IB27
~USER MAY LOGIN AT REMOTE OPR OR CTY
AC.DST==IB28
~USER MAY LOGIN AT DATA SET TERMINAL
AC.RMT==IB29
~USER MAY LOGIN AT REMOTE TERMINAL
AC.SBJ==IB30
~USER MAY LOGIN SUBJOB OF A BATCH JOB
AC.BAT==IB31
~USER MAY LOGIN UNDER BATCH
AC.NRT==IB32
~NAME REQUIRED UNDER TIMESHARING
AC.NRB==IB33
~NAME REQUIRED UNDER BATCH
AC.PRT==IB34
~PASSWORD REQUIRED FOR TIMESHARING
AC.PRB==IB35
;PASSWORD REQUIRED FOR BATCH
.ACCUS==IO
~CUSTOMER USER PROFILE BITS
.ACPGM==II
~SIXBIT NAME OF PROGRAM TO RUN
.ACDEV==12
~SIXBIT DEVICE FROM WHERE TO RUN PROGRAM
.ACDIR==13
~DIRECTORY FORM WHERE TO RUN PROGRAM
.ACCNO==14
~CHARGE NUMBER
.ACESE==15
;EXPIRATION DATE, ,SCHEDULER AND END/DEQ PARAMETERS
AC.EXP==777777BI7
;EXPIRATION DATE
AC.SCD==777B26
~SCHEDULER TYPE
AC.EDQ==777B35
;ENQ/DEQ/QUOTA

>

~END

OF TOPS-IO CONDITIONAL FROM WAY BACK
END

~END

D-25

OF ACTSYM.MAC

INDEX

+1 return, 1-10
+2 return, 1-10

Accounting JSYS's (Cont.)
SACTF, 3-369
USAGE, 3-475
Accounts,
Verifying, 3-482
Accumulators, 1-1
Acquiring physical memory,
3-309
Activation,
Interrupt channel, 3-8
ADBRK JSYS, 3-5
Adding a table entry, 3-452
Ad d res s, 1 - 7
18-bit, 1-3
23-bit, 1-2
3D-bit, 1-3
global, 1-3
Section-relative, 1-3
Address breaks, 3-5
Address global, 1-3
Address section-relative,
1-3
Addresses,
Assigning disk, 3-112
Obtaining interrupt table,
3-490
Setting interrupt table,
3-400, 3-494
Advising,
Terminal, 2-53
AIC JSYS, 3-8
ALLOC JSYS, 3-9
Allocation,
Device, 3-9
Returning disk, 3-172
Analysis,
System performance, 3-418
ANSI ASCII mode, 2-43
Append access, 2-8, 3-298
ARCF JSYS, 3-11
Archive-related JSYS's,
ARCF, 3-11
DELDF, 3-92
DELF, 3-94
DELNF, 3-96
RFTAD, 3-349
Archive/virtual disk system,
2-81
Arguments,
JSYS, 1-1, 1-2
Arguments JSYS, 1-1
ARPANET, 3-329
ARPANET host,
Flushing an, 3-140
ARPANET host information,
Returning, 3-176

18-bit address, 1-3
23-bit address, 1-2
3D-bit address, 1-3

AC's, 1-1
AC's,
Returning process, 3-338
Setting process, 3-384
ACCES JSYS, 3-2
Access,
Append, 2-8, 3-298
Directory, 2-9, 3-2
Execute, 2-8, 3-298
Execute-only, 2-8
F i 1 e, 2 - 8, 3 _. 2 9 8
Gaining directory, 3-2
Modes, 2-8
Page, 3-355, 3-491
Read, 2-8, 3-298
Relinquishing directory,
3-2
Thawed, 2-8, 3-298
Write, 2-8, 3-298
Access control, 2-65, 3-157
Access modes, 2-8
Access-control,
Functions, 2-65
Access-control functions,
2-65
Access-control JSYS's,
GETOK%, 3-157
GIVOK%, 3-167
RCVOK%, 3-330
Access-control program,
3-167, 3-416
Accessibility,
Setting page, 3-428
Account,
Changing, 3-38
Returning file's, 3-144
Returning job's, 3-143
Accounting,
Functions, 2-1
System, 3-475
Accounting functions, 2-1
Accounting JSYS's,
CACCT, 3-38
GACCT, 3-143
GACTF, 3-144
Index-l

INDEX (CaNT.)

ARPANET queue,
AssIgning, 3-16
ARPANET-related JSYS's,
ASNSQ, 3-16
ATNVT, 3-20
CVHST, 3-89
CVSKT, 3-90
FLHST, 3-140
GTHST%, 3-176
RCVIM, 3-329
RELSQ, 3-336
SNDIM, 3-417
ASCII mode,
ANSI, 2-43
ASCII strings, 1-7
ASND JSYS, 3-15
ASNSQ JSYS, 3-16
Assigning a device, 3-15
Assigning ARPANET queue,
3-16
Assigning devices, 3-335
Assigning disk addresses,
3-112
AssignIng terminal
interrupt, 3-19
Association,
Physical/logical
tape-drive, 3-247
ATACH JSYS, 3-17
ATI JSYS, 3-19
ATNVT JSYS, 3-20
Attaching a job, 3-17
Author,
Returning file, 3-166
Setting file, 3-394

Block (Cont.)
Returning file descriptor,
3-175
Blocking,
Elapsed time process,
3-464
BOOT JSYS, 3-23
BOUT JSYS, 3-37
Breaks,
Address, 3-5
Buffer,
Clearing file lnput, 3-39
Clearing file output,
3-40
Rescan, 3-361
Testing file input, 3-395
Testing file output,
3-422, 3-423
Buffered I/O, 2-40
Byte count,
File, 2-20
Byte input, 3-21, 3-303
Byte input,
Random, 3-351
Byte output, 3-37, 3-304
Byte output,
Random, 3-358
Byte pointer, 1-4, 1-6, 1-7
Byte pointer,
local, 1-4
one-word global, 1-4
two-word global, 1-4
two-word local, 1-4
Byte pointer local, 1-4
Byte pointer one-word
global, 1-4
Byte size,
Resetting file, 3-385
Byte-I/O JSYS's,
BIN, 3-21
BOUT, 3-37
PBIN, 3-303
PBOUT, 3-304
RIN, 3-351, 3-358
Byte-size,
Returning file, 3-339

Backing up pointer, 3-22
Base information,
Monitor data, 3-415,
3-470
Bits,
Magnetic tape status,
2-44
MTA: status, 2-39
PCDP: status, 2-34
PCDR: status, 2-33
PLPT: status, 2-37
Terminal status, 2-45
TTY: status, 2-45
Bits magnetic tape,
Status, 2-44
Bits terminal,
Status, 2-45
BKJF~ JSYS, 3-22
Block,
File descriptor, 2-10
Job storage, 3-361

CACCT JSYS, 3-38
Calls,
Privileged monitor, 2-82
Capabilities, 2-64
Enabling, 3-134
Functions, 2-63
Job, 2-64
Process, 2-63, 2-64
Capabilities functions,
2-63

Index-2

INDEX (CaNT.)

Compatibility package, 2-70,
3-373
Compatibility package entry
vector, 3-373
Compatible mode,
Industry, 2-43
Condition,
Setting error, 3-377
Connection,
Creating NVT, 3-20
Control,
Access, 2-65, 3-157
I/O format, 2-76
program, 1-10
Scheduler, 3-404
Control characters,
PLPT:, 2- 3 7
Control program, 1-10
Control tape,
Carriage, 2-36
Control word,
Scheduler priority, 3-403
Controlling terminal,
Redefining, 3-371
Conventions,
Manual pointer, 1-7
Conversion,
Date/time, 2-79
I/O data, 2-75
Converting host number,
3-89
Converting internal
date/time, 3-294
Converting socket number,
3-90
Converting to internal
date/time, 3-204
Count,
File byte, 2-20
CRDIR JSYS, 3-75
Creating a logical name,
3-87
Creating a new job, 3-81
Creating a section, 3-410
Creating an inferior
process, 3-41
Creating NVT connection,
3-20
Creating sections, 3-363
CRJOB JSYS, 3-81
CRLNt1 JSYS, 3-87
Current section, 1-3
CVHST JSYS, 3-89
CVSKT JSYS, 3-90

Carriage control tape, 2-36
CCOC word, 2-48, 2-49
CCOC words, 3-340, 3-386
CCOC words,
Returning, 3-340
Setting, 3-386
CDP:, 2-33, 2-35, 2-54
CDR:, 2-33, 2-34, 2-55
CFBIF JSYS, 3-39
CFBOF JSYS, 3-40
CFORK JSYS, 3-41
Changing account, 3-38
Channel,
Reserving a, ]-102
Software interrupt, 2-57
Channel activatlon,
Interrupt, 3-B
Channels,
Deactivating interrupt,
3-107
Panic, 2-58, 2-60
Character editing, 2-2
Characteristics,
Returning device, 3-121
TTY:, 2 - 51, 2·_·52
Characters,
PLPT: control, 2-37
Wildcard, 2-3
CHFDB JSYS, 3-43
CHKAC JSYS, 3-45
CIS JSYS, 3-47
Class,
Wakeup, 2-48, 2-49, 2·-50
Clearing file i~put buffer,
3-39
Clearing file output buffer,
3-40
Clearing software interrupt
system, 3-47
Clock,
Returning high-precision,
3-202
Clock-related JSYS's,
HPTIM, 3-202
METER%, 3-220
CLOSF JSYS, 3- 48
Closing a file, 3-48
Closing process files, 3-50
CLZFF JSYS, 3-50
Codes,
JSYS error, 1-10
Terminal interrupt, 2-60
Command parsing, 3-52
COMND JSYS, 3-52
Comparing strings, 3-437,
3-485
Comparison,
Wild string, 3-485

Index--3

INDEX (CaNT.)

Data base information,
Monitor, 3-415, 3-470
Data conversion,
I/O, 2-75
Data mode,
Terminal, 2-46, 2-47
Data modes,
Hardware, 2-42
Software, 2-54, 2-56,
2-57
Data vector,
Program, 3-305
Data-conversion,
Functions, 2-75
Data-conversion functions,
2-75
Date,
Setting system, 3-436
System, 1-9
system, 1-9
System, 2-79
Date and time,
Offline expiration, 3-349
Online expiration, 3-349
Date system, 1-9
Date/time,
Converting internal,
3-294
Converting to internal,
3-204
File, 3-349
Format internal, 1-9
Functions, 2-79
InputtIng, 3-205, 3-207
Outputting, 3-295, 3-297
Setting file, 3-392
Standard, 1-9
Date/time conversion, 2-79
Date/time format, 2-79
Internal, 1-9
Date/time functions, 2-79
Date/time JSYS's,
Faa, 3-436
GTAD, 3-171
IDCNV, 3-204
I DT I M, 3 - 2 0 5
IDTNC, 3-207
ODCNV, 3-294
ODTIM, 3-295
ODTNC, 3-297
RFTAD, 3-349
SFTAD, 3-392
Date/time standard, 1-9
DCN:, 2-33, 2-55
Deactivating interrupt
channels, 3-107
Deassigning terminal
Interrupt, 3-116
DEBRK JSYS, 3-91

Debugging,
Program, 3-5
Debugging JSYS's,
ADBRK, 3-5
MDDT%, 3-219
PEEK, 3-308
SNOOP, 3-418
SWTRP%, 3-448
UTEST, 3-479
DECnet logical link, 3-254
DECnet remote process,
3-254
Default designator,
Universal, 1-8
Deferred terminal interrupt,
2-62
DELDF JSYS, 3-92
Deleting a table entry,
3-453
Deleting files, 3-94, 3-96
DELF JSYS, 3-94
DELNF JSYS, 3-96
Density mode,
High, 2-44
DEQ JSYS, 3-97
Descriptor block,
File, 2-10
Returning file, 3-175
Designator,
Destination, 1-6
Device, 1-6, 1-8
File, 1-7
Primary input, 3-332
Primary output, 3-332
Source, 1-6
Source/destination, 1-6
Terminal, 1-6, 1-8
Universal default, 1-8
Designator destination, 1-6
Designator device, 1-6
Designator source, 1-6
Designator terminal, 1-6
Destination,
Designator, 1-6
Destination designator, 1-6
Detaching a job, 3-115
Device,
Assigning a, 3-15
Designator, 1-6
Functions, 2-5, 2-32
Manipulating a spooled,
3-431
Opening a, 2-5
Device allocation, 3-9
Device characteristics,
Returning, 3-121
Device designator, 1-6, 1-8
Device functions, 2-5, 2-32

Index-4

INDEX (CONT.)

Device functions,
MT, 3-277
Device mode,
Setting, 3-443
Device name string,
Translating, 3-438
Device status,
Returning, 3-147
Device string,
Translating, 3-99
Device-control functions,
3-248
Device-related JSYS's,
ALLOC, 3-9
ASND, 3-15
CLOSF, 3-48
CLZFF, 3-50
DEVST, 3-99
DIAG, 3-102
DSKAS, 3-112
DSKOP, 3-113
DVCHR, 3-121
GDSKC, 3-146
GDSTS, 3-147
GTDAL, 3-172
LPINI, 3-218
MTALN, 3-247
MTOPR, 3-248
MTU%, 3-277
RELD, 3-335
SDSTS, 3-375
STPAR, 3-443
Devices, 2-32
Assigning, 3-335
Releasing, 3-335
DEVST JSYS, 3-99
DFIN JSYS, 3-100
DFOUT JSYS, 3-101
DIBE JSYS, 3-106
DIC JSYS, 3-107
Directory access, 2-9, 3-2
Directory access,
Ga in ing, 3-2
Relinquishing, 3-2
Directory information,
Returning, 3-173
Directory name string,
Translating, 3-444
Directory number,
Translating, 3-109
Directory-related JSYS's,
ACCES, 3-2
CHKAC, 3-45
CRDIR, 3-75
DIRST, 3-109
GJINF, 3-168
GNJFN, 3-169
GTDIR, 3-173
RCDIR, 3-322

Directory-related JSYS's
(Cont.)
SPOOL, 3-431
STDEV, 3-438
STPPN, 3-444
DIRST JSYS, 3-109
Disabling interrupt system,
3-108
Disk addresses,
Assigning, 3-112
Disk allocation,
Returning, 3-172
Disk system,
Archive/virtual, 2-81
Disk usage,
Returning, 3-146
Dismissing a process, 3-106,
3-110, 3-111, 3-483
Dismissing an interrupt,
2-62
Dismissing interrupt, 3-91
DISMS JSYS, 3-110
DOBE JSYS, 3-111
Double-precision input,
3-100
Double-precision output,
3-101
DSK:, 2-33, 2-55
DSKAS JSYS, 3-112
DSKOP JSYS, 3-113
DTACH JSYS, 3-115
DTI JSYS, 3-116
Dump input, 3-117
Dump mode, 2-43
Dump output, 3-119
Dump-I/O JSYS's,
DUMPI, 3-117
DUMPO, 3-119
DUMPI JSYS, 2-41, 3-117
DUMPO JSYS, 3-119
Duplex mode,
Full, 2-46, 2-48
Half, 2-46, 2-48
DVCHR JSYS, 3-121

EBOX/MBOX meter values,
Returning, 3-220
Echo mode, 2-46, 2-47
Ed it i ng ,
Character, 2-2
EIR JSYS, 3-123
Elapsed system restart time,
Returning, 3-465
Elapsed time process
blocking, 3-464
Enabling capabilities,
3-134

Index·-5

INDEX (CONT.)

Enabling software interrupt
system, 3-123
End-of-fi1e,
Testing for, 2-22
End-of-fi1e limit, 2-21
ENQ JSYS, 3-124
ENQ/DEQ JSYS's,
ENQ, 3-124
ENQC, 3-130
FOO, 3-97
ENQC JSYS, 3-130
Entering ~DDT, 3-219
Entry,
Adding a table, 3-452
Deleting a table, 3-453
Entry vector, 2-74
Compatibility package,
3-373
Returning PA1050, 3-145
Returning process, 3-162,
3-489
Returnin~ RMS, 3-148
RMS, 3-376
Setting process, 3-383,
3-496
EOF 1 imi t, 2-21
EPCAP JSYS, 3-134
ERCAL, 1-10, 2-21
ERJMP, 1-10, 2-21
Error,
Return, 1-10
Returning most recent,
3-153
Error codes,
JSYS, 1-10
Error condition,
Setting, 3-377
Error file,
System, 3-450
Error messages, 2-24
Error return, 1-10
Error strings, 2-24
Outputting, 3-136
Translating, 3-135
Error-processing JSYS's,
ERSTR, 3-135
ESOUT, 3-136
GETER, 3-153
SETER, 3-377
SYERR, 3-450
Errors,
I/O, 2-21
JSYS, 1-10
ERSTR JSYS, 3-135
ESOUT JSYS, 3-136
Execute access, 2-8, 3-298
Execute-only, 2-9
Execute-only access, 2-8
Execute-only flIes, 2-68

Execute-only processes,
2-68
Execution,
Resuming process, 3-481
Expiration date and time,
Offline, 3-349
Onl ine, 3-349
Expunging files, 3-92

FDB, 2-10
Modifying the, 2-10
Reading the, 2-10
FE:, 2-33
FFFFP JSYS, 3-137
FFORK JSYS, 3-138
FFUFP JSYS, 3-139
.FHINF, 1-9
. FHJOB, 1-9
. FHSAI, 1-9
.FHSLF, 1-9
.FHSUP, 1-9
.FHTOP, 1-9
File,
Closing a, 3-48
Functions, 2-1
Getting a save, 3-149
Nonsharab1e save, 2-70
Opening a, 2-5, 3-298
Primary input, 2-20
Primary output, 2-20
Recognition, 2-2
Renaming a, 3-356
Sharable save, 2-71
System error, 3-450
File access, 2-8, 3-298
File author,
Returning, 3-166
Setting, 3-394
File byte count, 2-20
File byte size,
Resetting, 3-385
File byte-size,
Returning, 3-339
File date/time, 3-349
Setting, 3-392
File descriptor block, 2-10
Returning, 3-175
File designator, 1-7
File functions, 2-1
File handle, 2-3
Indexab1e, 2-4
File handle indexab1e, 2-4
File input buffer,
Clearing, 3-39
Testing, 3-395
File number,
Indexable job, 1-5

Index-6

--------------------.--------

-----------~

---

INDEX (CONT.)

File number (Cont.)
job, 1-5
File number job, 1-5
File number job indexable,
1-5
File opening a, 2-5
File output buffer,
Clearing, 3-40
Testing, 3-422, 3-423
File page,
Finding first free, 3-137
Finding first used, 3-139
File pages,
Updating, 3-474
File pointer,
Setting, 3-390
File recognition, 2-2
File specification, 2-1
Pa r se-only, 2-4
Returning, 3-211
File status,
Returning, 3-198
Setting, 3-445
File's account,
Returning, 3-144
File-archival,
Functions, 2-81
File-archival functions,
2-81
File-related JSYS's,
BKJFN, 3-22
CFBIF, 3-39
CFBOF, 3-40
CHFDB, 3-43
CHKAC, 3-45
CLOSF, 3-48
CLZFF, 3-50
DELDF, 3-92
DELF, 3-94
DELNF, 3-96
DIBE, 3-106
DOBE, 3-111
FFFFP, 3-137
FFUFP, 3-139
GACTF, 3-144
GFUST, 3-166
GNJFN, 3-169
GTFDB, 3-175
GTJFN(long) , 3-187
GTJFN(short) , 3-179
GTSTS, 3-198
JFNS, 3-211
OPENF, 3-298
PMAP, 3-310
RFBSZ, 3-339
RFMOD, 3-341
RFPTR, 3-344
RFTAD, 3-349
RLJFN, 3-354

File-related JSYS's (Cont.)
RNAMF, 3-356
SFBSZ, 3-385
SFPTR, 3-390
SFTAD, 3-392
SFUST, 3-394
SIBE, 3-395
SIZEF, 3-402
SOBE, 3-422
SOBF, 3-423
SPJFN, 3-429
STSTS, 3-445
SWJFN, 3-447
UFPGS, 3-474
Files,
Closing process, 3-50
Deleting, 3-94, 3-96
Execute-only, 2-68
Expunging, 3-92
Opening, 3-298
Save, 2-70
Files opening, 3-298
Finding first free file
page, 3-137
Finding first used file
page, 3-139
First free file page,
Finding, 3-137
First used file page,
Finding, 3-139
Flags,
Setting monitor, 3-415
Testing monitor, 3-470
FLIN JSYS, 3-141
Floating-point input, 3-141
Floating-point output,
3-142
FLOUT JSYS, 3-142
Flushing an ARPANET host,
3-140
Fork handle,
Getting a, 3-163
Form GTJFN,
Long, 3-187
Short, 3-179
Format,
Date/time, 2-79
Internal date/time, 1-9
Format control,
I/O, 2-76
Format internal date/time,
1-9
Format-controlling,
Functions I/O, 2-76
Format-controlling
functions,
I/O, 2-76
Free file page,
Finding first, 3-137

Index-7

INDEX (CONT.)

Functions (Cont.)
2-67
Functions PSI, 2-57
Functions software
interrupt, 2-57
Functions terminal, 2-45

Freezing a process, 3-138
Frozen process, 3-342
Full duplex mode, 2-46,
2-48
Functions,
Access-control, 2-65
Accounting, 2-1
Capabilities, 2-63
Data-conversion, 2-75
Date/time, 2-79
Device, 2-5, 2-32
Device-control, 3-248
File, 2-1
File-archival, 2-81
I/O, 2-20
I/O format-controlling,
2-76
Information-obtaining,
2-24
Line printer, 2-36
Magnetic t2pe, 2-39
Mountable-structure,
3-230
MT device, 3-277
Network, 3-286
Privileged, 2-82
Process-control, 2-63
Process-controling, 2-67
PSI, 2-57
Software interrupt, 2-57
Terminal, 2-45
Functions access-control,
2-65
Functions accounting, 2-1
Functions capabilities,
2-63
Functions data-conversion,
2-75
Functions date/time, 2-79
Functions device, 2-5, 2-32
Functions file, 2-1
Functions file-archival,
2-81
Functions I/O, 2-20
Functions I/O
format-controlling,
2-76
Functions
information-obtaining,
2-24
Functions line printer,
2-36
Functions magnetic tape,
2-39
Functions privileged, 2-82
Functions process-control,
2-63
Functions
process-controling,

GACCT JSYS, 3-143
GACTF JSYS, 3-144
Gaining directory access,
3-2
GCVEC JSYS, 3-145
GDSKC JSYS, 3-146
GDSTS JSYS, 3-147
GDVEC JSYS, 3-148
GET JSYS, 3-149
GETAB JSYS, 3-152
GETER JSYS, 3-153
GETJI JSYS, 3-154
GETNM JSYS, 3-156
GETOK JSYS, 3-416
GETOK% JSYS, 3-157
Getting a fork handle,
3-163
Getting a save file, 3-149
GEVEC JSYS, 3-162
GFRKH JSYS, 3-163
GFRKS JSYS, 3-164
GFUST JSYS, 3-166
GIVOK% JSYS, 3-167
GJINF JSYS, 3-168
Global,
address, 1-3
byte pointer one-word,
1-4
Global address, 1-3
Global byte pointer,
one-word, 1-4
two-word, 1-4
Global page numbers, 1-3
GNJFN JSYS, 3-169
GPJFN JSYS, 3-170
Greenwich Mean Time, 1-10
GTAD JSYS, 3-171
GTDAL JSYS, 3-172
GTDIR JSYS, 3-173
GTFDB JSYS, 3-175
GTHST% JSYS, 3-176
GTJFN,
Lonq form, 3-187
Short form, 3-179
GTJFN JSYS, 3-179, 3-187
GTRPI JSYS, 3-194
GTRPW JSYS, 3-197
GTSTS JSYS, 3-198
GTTYP JSYS, 3-199

Tndex-8

INDEX (CONT.)

Half duplex mode, 2-46,
2-48
HALTF JSYS, 3-200
Halting a process, 3-200,
3-201
Halting system, 3-203
Handle,
File, 2-:3
Getting a fork, 3-163
Indexable file, 2-4
Page, 3-355
Process, 1-9
Process/file, 1-9
Relative process, 1-9
Releasing a process,
3-345
Section, 3-363
Handle indexable,
File, 2-4
Handle page, 3-355
Handle process/file, 1-9
Handle relative,
Process, 1-9
Handle section, 3-363
Hardware data modes, 2-42
HFORK JSYS, 3-201
High density mode, 2-44
High-precision clock,
Returning, 3-202
Histogram,
PC, 3-418
Host,
Flushing an ARPANET,
3-140
Host information,
Returning ARPANET, 3-176
Host number,
Converting, 3-89
HPTIM JSYS, 3-202
HSYS JSYS, 3-203

I/O JSYS's (Cont.)
CFBIF, 3-39
CFBOF, 3-40
DFIN, 3-100
DFOUT, 3-101
DUMPI, 3-117
DUMPO, 3-119
FLIN, 3-141
FLOUT, 3-142
IDTIM, 3-205
IDTNC, 3-207
NIN, 3-285
NOUT, 3-292
PBIN, 3-303
PBOUT, 3-304
PSOUT, 3-321
RDTTY, 3-332
RIN, 3-351, 3-358
SFPTR, 3-390
SIBE, 3-395
SIN, 3-396
SINR, 3-398
SOBE, 3-422
SOBF, 3-423
SOUT, 3-424
SOUTR, 3-426
TEXTI, 3-457
TTMSG, 3-472
USRIO, 3-478
I/O modes, 2-54
IDCNV JSYS, 3-204
IDTIM JSYS, 3-205
IDTNC JSYS, 3-207
IIC JSYS, 3-209
Immediate terminal
interrupt, 2-62
Indexable,
File handle, 2-4
file number job, 1-5
Indexable file handle, 2-4
Indexable JFN, 1-5
Indexable job file number,
1-5
Industry compatible mode,
2-43
Inferior process,
Creating an, 3-41
Info-returning JSYS's,
CHKAC, 3-45
DEVST, 3-99
DIRST, 3-109
DVCHR, 3-121
GACCT, 3-143
GACTF, 3-144
GCVEC, 3-145
GDSKC, 3-146
GDSTS, 3-147
GDVEC, 3-148
GETAB, 3-152

I/O,
Buffered, 2-40
Functions, 2--20
Modes, 2-54
Unbuffered, 2-41
I/O data conversion, 2-75
I/O errors, 2-21
I/O format control, 2-76
I/O format-controlling,
Functions, 2--76
I/O format-controlling
functions, 2-76
I/O functions, 2-20
I/O JSYS's,
BIN, 3-21
BOUT, 3-37

Index-9

INDEX (CONT.)

Info-returning JSYS's
(Cont. )
GETER, 3-153
GETJI, 3-154
GETNM, 3-156
GETOK%, 3-157
GEVEC, 3-162
GFRKH, 3-163
GFUST, 3-166
GJINF, 3-168
GPJFN, 3-170
GTAD, 3-171
GTDAL, 3-172
GTDIR, 3-173
GTFDB, 3-175
GTNCP, 3-195
GTRPI, 3-194
GTRPW, 3-197
GTSTS, 3-198
GTTYP, 3-199
HPTIM, 3-202
INLNM, 3-210
JFNS, 3-211
METER%, 3-220
MSTR, 3-230
PPNST, 3-318
PRARG, 3-319
RCDIR, 3-322
RCM, 3-326
RCUSR, 3-327
RFACS, 3-338
RFMOD, 3-341
RFPOS, 3-343
RFPTR, 3-344
RFSTS, 3-346
RFTAD, 3-349
RIR, 3-352
RIRCM, 3-353
RPACS, 3-359
RPCAP, 3-360
RSMAP%, 3-363
RTFRK, 3-364
RTIW, 3-365
RUNTM, 3-366
RWM,3-367
SIZEF, 3-402
STDEV, 3-438
SYSGT, 3-451
TMON, 3-470
XGTPW%, 3-488
XGVEC%, 3-489
Information,
Monitor data base, 3-415,
3-470
Returning ARPANET host,
3-176
Returning directory,
3-173
Returning job, 3-154,

Information (Cont.)
3-168
Returning page trap,
3-194
Information-obtaining,
Functions, 2-24
Information-obtaining
functions, 2--24
Initializing a process,
3-337
Initiating software
interrupts, 3-209
INLNM JSYS, 3-210
Input,
Byte, 3-21, 3-303
Double-precision, 3-100
Dump, 3-117
Floating-point, 3-141
Random byte, 3-351
Simulating terminal,
3-439
Str ing, 3-396
Input buffer,
Clearing file, 3-39
Testing file, 3-395
Input designator,
Pr imary, 3-332
Input file,
Primary, 2-20
Inputting a number, 3-285
Inputting date/time, 3-205,
3-207
Internal date/time,
Converting, 3-294
Converting to, 3-204
Format, 1-9
Internal date/time format,
1-9
Interrupt,
Assigning terminal, 3-19
Deassigning terminal,
3-116
Deferred terminal, 2-62
Dismissing, 3-91
Dismissing an, 2-62
Functions software, 2-57
Immediate terminal, 2-62
Terminal, 2-60
Interrupt channel,
Software, 2-57
Interrupt channel
activation, 3-8
Interrupt channels,
Deactivating, 3-107
Interrupt codes,
Terminal, 2-60
Interrupt functions,
Software, 2-57

Index-l0

INDEX (CONT.)

Interrupt mask,
Returning, 3-353, 3-367
Setting, 3-401
Interrupt modes,
T e r min aI, 2 -- 6 2
Interrupt priority,
So f twa r e, 2 -- 5 8
Interrupt system,
Clearing software, 3-47
Disabl ing, 3-108
Enabling software, 3-123
So f twa r e, 2 -- 5 7
Interrupt table,
Returning, 3-352
So f twa r e, 2 -- 5 9
Interrupt table addresses,
Obtaining, 3-490
Setting, 3-400, 3-494
Interrupt word,
Setting terminal, 3-440
T e r min aI, 3 -- 3 6 5
Interrupts,
Initiating software,
3-209
IPCF JSYS's,
MRECV, 3-222
MSEND, 3-224
MUTIL, 3-279
IPCF logout message, 3-84
IPCF message,
Retrieving an, 3-222
Sending an, 3-224

Job file number, 1-5
Indexab1e, 1-5
Job indexab1e,
file number, 1-5
Job information,
Returning, 3-154, 3-168
Job parameters, 3-378
Job priority,
Setting, 3-403
Job storage block, 3-361
Job's account,
Returning, 3-143
Job-related JSYS's,
ALLOC, 3-9
ATACH, 3-17
CACCT, 3-38
CRJOB, 3-81
DTACH, 3-115
GACCT, 3-143
GETJI, 3-154
GETNM, 3-156
GFRKS, 3-164
GJINF, 3-168
LGOUT, 3-215
LOG IN, 3 - 21 7
SETJB, 3-378
SETNM, 3-381
SETSN, 3-382
SJPRI, 3-403
JSYS,
ACCES, 3-2
ADBRK, 3-5
AIC, 3-8
ALLOC, 3-9
ARCF, 3-11
Arguments, 1-1
ASND, 3-15
ASNSQ, 3-16
ATACH, 3-17
ATI, 3-19
ATNVT, 3-20
BKJFN, 3-22
BOOT, 3-23
BOUT, 3-37
CACCT, 3-38
CFBIF, 3-39
CFBOF, 3-40
CFORK, 3-41
CHFDB, 3-43
CHKAC, 3-45
CIS, 3-47
CLOSF, 3-48
CLZFF, 3-50
COMND, 3-52
CRDIR, 3-75
CRJOB, 3-81
CRLNM, 3-87
CVHST, 3-89
CVSKT, 3-90

JFN, 1-5, 3-169, 3-170,
3-179, 3-187, 3-198,
3-211
JFN,
Indexable, ]-5
Parse-only, 3-191, 3-212
Releasing a, 3-354
Restricted, 3-198, 3-445
Setting primary, 3-429
status word, 3-198
JFN mode word, 2-45, 3-341
JFN mode word,
Returning, 3-341
JFN status word, 3-198
JFNs,
S wa pp i n g, 3·-- 4 4 7
JFNS JSYS, 3-211
Job,
Attaching a, 3-17
Creating a new, 3-81
Detaching a, 3-115
file number, 1-5
Logging in a, 3-217
Job capabilities, 2-64

Index-II

INDEX

JSYS (Cont.)
DEBRK, 3-91
DELDF, 3-92
DELF, 3-94
DELNF, 3-96
DEQ, 3-97
DEVST, 3-99
DFIN, 3-100
DFOUT, 3-101
DIBE, 3-106
DIC, 3-107
DIRST, 3-109
DISMS, 3-110
DOBE, 3-111
DSKAS, 3-112
DSKOP, 3-113
DTACH, 3-115
DTI, 3-116
DUMPI, 2-41, 3-L17
DUMPO, 3-119
DVCHR, 3-121
EIR, 3-123
ENQ, 3-124
ENQC, 3-130
EPCAP, 3-134
ERSTR, 3-135
ESOUT, 3-136
FFFFP, 3-137
FFORK, 3-138
FFUFP, 3-139
FLIN, 3-141
FLOUT, 3-142
GACCT, 3-143
GACTF, 3-144
GCVEC, 3-145
GDSKC, 3-146
GDSTS, 3-147
GDVEC, 3-148
GET, 3-149
GETAB, 3-152
GETER, 3-153
GETJI, 3-154
GETNM, 3-156
GETOK, 3-416
GETOK%, 3-157
GEVEC, 3-162
G F RK H, 3 -1 6 3
G F RK S, 3 - 1 6 4
GFUST, 3-166
GIVOK%, 3-167
GJINF, 3-168
GNJFN, 3-169
GPJFN, 3-170
GTAD, 3-171
GTDAL, 3-172
GTDIR, 3-173
GTFDB, 3-175
GTHST%, 3-176
GTJFN, 3-179, 3-187

(CONT.)

JSYS (Cont.)
GTRPI, 3-194
GTRPW, 3-197
GTSTS, 3-198
GTTYP, 3-199
HALTF, 3-200
HFORK, 3-201
HPTIM, 3-202
HSYS, 3-203
IDCNV, 3-204
IDTIM, 3-205
IDTNC, 3-207
I IC, 3-209
INLNM, 3-210
JFNS, 3-211
KFORK, 3-214
LGOUT, 3 - 21 5
LNMST, 3-216
LOG IN, 3 - 21 7
LPINI, 3-218
MDDT%, 3-219
METER%, 3-220
MRECV, 3-222
MSEND, 3-224
MSFRK, 3-229
MSTR, 3-230
MTALN, 3-247
MTOPR, 3-248
MTU%, 3-277
MUTIL, 3-279
NIN, 3-285
NODE, 3-286
NOUT, 3-292.1
NTMAN%, 3-292.2
ODCNV, 3-294
ODTIM, 3-295
ODTNC, 3-297
OPENF, 3-298
PBIN, 3-303
PBOUT, 3-304
PEEK, 3-308
PLOCK, 3-309
PMAP, 3-310
PMCTL, 3-315
PPNST, 3-318
PRARG, 3-319
PSOUT, 3-321
RCDIR, 3-322
RCM, 3-326
RCUSR, 3-327
RCVIM, 3-329
RCVOK%, 3-330
RDTTY, 3-332
RELD, 3-335
RELSQ, 3-336
RESET, 3-337
RFACS, 3-338
RFBSZ, 3-339
RFCOC, 3-340
RFMOD, 3-341

Index-12

INDEX (CONT.)

JSYS (Cant.)
RFORK, 3-342
RFPOS, 3-343
RFPTR, 3-344
RF RK H, 3 - 3 4 ~)
RFSTS, 3-346
RFTAD, 3-349
RIN, 3-351
RIR, 3-352
RIRCM, 3-353
RLJFN, 3-354
RMAP, 3-355
RNAMF, 3-356
ROUT, 3-358
RPACS, 3-359
RPCAP, 3-360
RSCAN, 3-361
RSMAP%, 3-363
RTFRK, 3-364
RTIW, 3-365
RUNTM, 3-366
RWM, 3-367
RWSET, 3-36 B
SACTF, 3-369
SAVE, 3-370
SCTTY, 3-371
SCVEC, 3-373
SDSTS, 3-375
SDVEC, 3-376
SETER, 3-377
SETJB, 3-378
SETNM, 3-381
SETSN, 3-382
SEVEC, 3-383
SFACS, 3-384
SFBSZ, 3-385
SFCOC, 3-386
SFMOD, 3-387
SFORK, 3-388
SFPOS, 3-389
SFPTR, 3-390
SFRKV, 3-391
SFTAD, 3-392
SFUST, 3-394
SIBE, 3-395
SIN, 3-396
SINR, 3-398
SIR, 3-400
SIRCM, 3-401
SIZEF, 3-402
SJPRI, 3-403
SKED%, 3-404
SKPIR, 3-409
SMAP%, 3-410
SMON, 3-415
SNDH·1, 3-417
SNOOP, 3-418
SOBE, 3-422
SOBF, 3-423

JSYS (Cant.)
SOUT, 3-424
SOUTR, 3-426
SPACS, 3-428
SPJFN, 3-429
SPLFK, 3-430
SPOOL, 3-431
SPRIW, 3-433
SSAVE, 3-434
STAD, 3-436
STCMP, 3-437
STDEV, 1-8, 3-438
STI, 3-439
STIW, 3-440
STO, 3-442
STPAR, 3-443
STPPN, 3-444
STSTS, 3-445
STTYP, 3-446
SWJFN, 3-447
SWTRP%, 3-448
SYERR, 3-450
SYSGT, 3-451
TBADD, 3-452
TBDEL, 3-453
TBLUK, 3-454
TEXTI, 3-457
TFORK, 3-461
THIBR, 3-464
TIME, 3-465
TIMER, 3-466
TLINK, 3-468
TMON, 3-470
TTMSG, 3-472
TWAKE, 3-473
UFPGS, 3-474
USAGE, 3-475
USRIO, 3-478
UTEST, 3-479
UTFRK, 3-481
VACCT, 3-482
WAIT, 3-483
WFORK, 3-484
WILD%, 3-485
XGTPW%, 3-488
XGVEC%, 3-489
XRIR%, 3-490
XRMAP%, 3-491
XSFRK%, 3-493
XSIR%, 3-494
XSVEC%, 3-496
JSYS arguments, 1-1, 1-2
JSYS error codes, 1-10
JSYS errors, 1-10
JSYS return, 1-1, 1-10

Index-13

INDEX (CaNT.)

Magnetic tape status bits,
2-44
Manipulating a spooled
device, 3-431
Manual pointer conventions,
1-7
Manual references, 1
Mapping,
Page, 3-310, 3-311, 3-312,
3-313
Section, 3-363
Mapping a section, 3-410
Mapping memory, 3-363,
3-410
Mask,
Returning interrupt,
3-353, 3-367
Setting interrupt, 3-401
MDDT,
Entering, 3-219
MDDT% JSYS, 3-219
Memory, 3-410
Acquiring physical, 3-309
Mapping, 3-363, 3-410
Message,
IPCF logout, 3-84
Retrieving an IPCF, 3-222
Sending an IPCF, 3-224
Messages,
Error, 2-24
Meter values,
Returning EBOX/MBOX,
3-220
METER% JSYS, 3-220
Mode,
ANSI ASCII, 2-43
Dump, 2-43
Echo, 2-46, 2-47
Full duplex, 2-46, 2-48
Half duplex, 2-46, 2-48
High density, 2-44
Industry compatible, 2-43
Setting device, 3-443
S IXBIT, 2-44
Terminal data, 2-46, 2-47
User-I/O, 3-478
Mode word,
JFN, 2-45, 3-341
Returning JFN, 3-341
Modes,
Access, 2-8
Hardware data, 2-42
I/O, 2-54
Setting terminal, 3-387
Software data, 2-54, 2-56,
2-57
Terminal interrupt, 2-62
Modes access, 2-8
Modes I/O, 2-54

KFORK JSYS, 3-214
Killing a process, 3-214

Length,
Terminal, 2-46, 2-47
LGOUT JSYS, 3-215
Limit,
End-of-file, 2-21
EOF, 2-21
Line printer functions,
2-36
Link,
DECnet logical, 3-254
Linking,
Terminal, 2-53, 3-468
LNMST JSYS, 3-216
Loading VFU, 3-218
Local,
byte pointer, 1-4
Local byte pointer, 1-4
two-word, 1-4
Local time, 1-10
Logging in a job, 3-217
Logical,
Magnetic tape, 2-45
Name, 3-87
Logical link,
DECnet, 3-254
Logical magnetic tape, 2-45
Logical name, 3-87
Creating a, 3-87
Translating a, 3-216
Logical names, 2-2
Logical-name JSYS's,
CRLNM, 3-87
Faa, 3-216
INLNM, 3-210
LOGIN JSYS, 3-217
Logout message,
IPCF, 3-84
Long form GTJFN, 3-187
LPINI JSYS, 3-218
L PT :, 2 - 33, 2 - 38, 2 - 5 5 ,
2-56

Magnetic tape,
Functions, 2-39
Logical, 2-45
Physical, 2-45
Status bits, 2-44
Magnetic tape functions,
2-39
Magnetic tape logical, 2-45
Magnetic tape physical,
2-45

Index-14

INDEX (CONT.)

Modifying the FDB, 2-10
Monitor calls,
Privileged, 2-82
Monitor data base
information, 3-415,
3-470
Monitor flags,
Setting, 3-415
Testing, 3-470
Most recent error,
Returning, 3-153
Mountable-structure
functions, 3-230
MRECV JSYS, 3-222
MSEND JSYS, 3-224
MSFRK JSYS, 3-229
.MSSSS, 3-230
MSTR JSYS, 3-2]0
MT device functions, 3-277
MT:, 2 - 3 3, 2 - 4 ~), 2 - 5 6
MTA:, 2-33, 2-39, 2-56
MTA: status bits, 2-39
MTALN JSYS, 3-247
MTOPR JSYS, 3-248
MTU% JSYS, 3-277
MUTIL JSYS, 3-279

Number,
Converting host, 3-89
Converting socket, 3-90
Indexable job file, 1-5
Inputting a, 3-285
job file, 1-5
Outputting a, 3-292
Section-relative page,
1-3
Setting terminal, 3-446
Translating directory,
3-109
Number job,
file, 1-5
Number job indexable,
file, 1-5
Numbers,
Global page, 1-3
Numeric-I/O JSYS's,
COMND, 3-52
DFIN, 3-100
DFOUT, 3-101
FLIN, 3-141
FLOUT, 3-142
NIN, 3-285
NOUT, 3-292
NVT connection,
Creating, 3-20

Name,
Creating a logical, 3-87
Logical, 3-87
Private program, 3-381,
3-382
Returning program, 3-156
Setting program, 3-381,
3-382
System program, 3-382
Translating a logical,
3-216
Name logical, ]-87
Name string,
Translating device, 3-438
Translating directory,
3-444
Names,
Logical, 2-2
NET:, 2 - 3 3, 2 - ~) 6
Network functions, 3-286, 3-292.2
Network terminal, 3-254
New job,
Creating a, ]-81
N IN J S YS, 3 - 2 8 ~)
NODE JSYS, 3-286
Nonsharable save file, 2-70
Nonshareable save, 3-370
NOUT JSYS, 3-292
NUL:, 2 - 3 3, 2 - ~). 6

Index-15

Obtaining interrupt table
addresses, 3-490
ODCNV JSYS, 3-294
ODTIM JSYS, 3-295
ODTNC JSYS, 3-297
Offline expiration date and
time, 3-349
Offset,
Timezone, 1-10
One-word global,
byte pointer, 1-4
One-word global byte
pointer, 1-4
Online expiration date and
time, 3-349
OPENF JSYS, 3-298
Opening,
Files, 3-298
Opening a,
File, 2-5
Opening a device, 2-5
Opening a file, 2-5, 3-298
Opening files, 3-298
Operations,
Process, 2-67, 3-430,
3-473, 3-484

INDEX (CaNT.)

Output,
Byte, 3-37, 3-304
Double-precision, 3-101
Dump, 3-119
Floating-point, 3-142
Random byte, 3-358
Simulating terminal,
3-442
String, 3-321, 3-424
Output buffer,
Clearing file, 3-40
Testing file, 3-422,
3-423
Output designator,
Primary, 3-332
Output file,
Pr imary, 2-20
Outputting a number, 3-292
Outputting date/time, 3-295,
3-297
Outputting error strings,
3-136
Overflow trapping, 3-448

PAI050, 2-70
PAI050 entry vector,
Returning, 3-145
Package,
Compatibility, 2-70,
3-373
Page,
Finding first free file,
3-137
Finding first used file,
3-139
Handle, 3-355
Page access, 3-355, 3-491
Page accessibility,
Setting, 3-428
Page handle, 3-355
Page mapping, 3-310, 3-311,
3-312, 3-313
Page number,
Section-relative, 1-3
Page numbers,
Global, 1-3
Page trap information,
Returning, 3-194
Page-related JSYS's,
FFFFP, 3-137
FFUFP, 3-139
FOO, 3-428
GET, 3-149
GTRPI, 3-194, 3-309
PMAP, 3-310
PMCTL, 3-315
RMAP, 3-355

Index-16

Page-related JSYS's (Cont.)
RPACS, 3-359
RWSET, 3-368
SAVE, 3-370
UFPGS, 3-474
XRMAP%, 3-491
Pages,
Updating file, 3-474
Panic channels, 2-58, 2-60
Parameter-reading JSYS's,
Faa, 3-198, 3-199
PRARG, 3-319
TMON, 3-470
Parameter-setting JSYS's,
CACCT, 3-38
CHFDB, 3-43
EPCAP, 3-134
PRARG, 3 - 319
SETJB, 3-378
SMON, 3-415
Parameters,
Job, 3-378
Parse-only file
specification, 2-4
Parse-only JFN, 3-191,
3-212
Parsing,
Command, 3-52
PBIN JSYS, 3-303
PBOUT JSYS, 3-304
PC histogram, 3-418
PCDP, 2-33
PCDP:, 2-33, 2-34,. 2-35,
2-54
PCDP: status bits, 2-34
PCDR:, 2-33, 2-55
PCDR: status bits, 2-33
PEEK JSYS, 3-308
Performance analysis,
System, 3-418
Physical,
Magnetic tape, 2-45
Physical magnetic tape,
2-45
Physical memory,
Acquiring, 3-309
Physical/logical tape-drive
association, 3-247
PLOCK JSYS, 3-309
PLPT:, 2-33, 2-36, 2-37,
2-55
PLPT: control characters,
2-37
PLPT: status bits, 2-37
PMAP JSYS, 3-310
PMCTL JSYS, 3-315
Pointer,
Backing up, 3-22
byte, 1-4, 1-6

INDEX (CaNT.)

Pointer (Cont.)
Byte, 1-7
local byte, 1-4
one-word global byte, 1-4
Setting file, 3-390
Setting terminal, 3-389
Pointer conventions,
Manual, 1-7
Pointer local,
byte, 1-4
Pointer one-word global,
byte, 1-4
PPN, 3-318, 3-444
PPNST JSYS, 3-318
PRARG JSYS, 3-319
Primary input designator,
3-332
Primary input file, 2-20
Primary JFN,
Setting, 3-429
Primary output designator,
3-332
Primary output file, 2-20
Printer,
Functions line, 2-36
Priority,
Setting job, 3-403
Setting process, 3-433
Software interrupt, 2-58
Priority control word,
Scheduler, 3-403
Private program name, 3-381,
3-382
Privileged,
Functions, 2-82
Privileged functions, 2-82
Privileged monitor calls,
2-82
Process,
Creating an inferior,
3-41
DECnet remote, 3-254
Dismissing a, 3-106,
3-110, 3-111, 3-483
Freezing a, 3-138
Frozen, 3-342
Halting a, 3-200, 3-201
Initializing a, 3-337
Killing a, 3-214
Resetting a, 3-337
Resuming a, 3-342
Splicing a, 3-430
Starting a, 3-229, 3-388,
3-391, 3-493
Waking a, 3-473
Process AC's,
Returning, 3-338
Setting, 3-384

Index-·17

Process blocking,
Elapsed time, 3-464
Process capabilities, 2-63,
2-64
Process entry vector,
Returning, 3-162, 3-489
Setting, 3-383, 3-496
Process execution,
Resuming, 3-481
Process files,
Closing, 3-50
Process handle, 1-9
Relative, 1-9
Releasing a, 3-345
Process handle relative,
1-9
Process operations, 2-67,
3-430, 3-473, 3-484
Process priority,
Setting, 3-433
Process status, 3-347
Returning, 3-346
Process termination,
Waiting for, 3-484
Process timing, 3-466
Process-control,
Functions, 2-63
Process-control functions,
2-63
Process-controling,
Functions, 2-67
Process-controling
functions, 2-67
Process-related JSYS's,
CFORK, 3-41
CIS, 3-47
CLZFF, 3-50
DIBE, 3-106
DISMS, 3-110
DOBE,3-111
EIR, 3-123
EPCAP, 3-134
FFORK, 3-138
GET, 3-149
GEVEC, 3-162
GFRKH, 3-163
GFRKS, 3-164
GPJFN, 3-170
GTRPI, 3-194, 3-309
HALTF, 3-200
HFORK, 3 - 2 0 1
IIC, 3-209
KFORK, 3-214
MRECV, 3-222
MSEND, 3-224
MSFRK, 3-229
PMAP, 3-310
PRARG, 3-319

INDEX (CONT.)

PSI functions, 2-57
PSOUT JSYS, 3-321
PTY:, 2-33

Process-related JSYS's
(Cont.)
RESET, 3-337
RFACS, 3-338
RFORK, 3-342
RFRKH, 3-345
RFSTS, 3-346
RMAP, 3-355
RSMAP%, 3-363
RTFRK, 3-364
RWM, 3-367
SCTTY, 3-371
SETER, 3-377
SEVEC, 3-383
SFACS, 3-384
SFORK, 3-388
SFRKV, 3-391
SIR, 3-400
SIRCM, 3-401
SKPIR, 3-409
SPJFN, 3-429
SPLFK, 3-430
SPRIW, 3-433
SSAVE, 3-434
TFORK, 3-461
THIBR, 3-464
TIMER, 3-466
TWAKE, 3-473
UTFRK, 3-481
WAIT, 3-483
WFORK, 3-484
XGVEC%, 3-489
XRIR%, 3-490
XRMAP%, 3-491
XSFRK%, 3-493
XSIR%, 3-494
XSVEC%, 3-496
Process/file,
handle, 1-9
Process/file handle, 1-9
Processes,
Execute-only, 2-68
Program,
Access-control, 3-167,
3-416
control, 1-10
Sample, 2-5
Program control, 1-10
Program data vector, 3-305
Program debugging, 3-5
Program name,
Private, 3-381, 3-382
Returning, 3-156
Setting, 3-381, 3-382
System, 3-382
Project-programmer number
(PPN), 3-318, 3-444
PSI,
Functions, 2-57

Queue,
Assigning ARPANET, 3-16

Random byte input, 3-351
Random byte output, 3-358
Random-I/O JSYS's,
RIN, 3-351, 3-358
RCDIR JSYS, 3-322
RCM JSYS, 3-326
RCUSR JSYS, 3-327
RCVIM JSYS, 3-329
RCVOK% JSYS, 3-330
RDTTY JSYS, 3-332
Read access, 2-8, 3-298
Reading the FDB, 2-10
Recent error,
Returning most, 3-153
Recognition,
File, 2-2
Recognition file, 2-2
Record-I/O JSYS's,
SINR, 3-398
SOUTR, 3-426
Redefining controlling
terminal, 3-371
References,
Manual, 1
Regulated structure, 2-5,
3-2, 3-230, 3-246,
3-475
Relative,
Process handle, 1-9
Relative process handle,
1-9
RELD JSYS, 3-335
Releasing a JFN, 3-354
Releasing a process handle,
3-345
Releasing devices, 3-335
Releasing working set,
3-368
Relinquishing directory
access, 3-2
RELSQ JSYS, 3-336
Remote process,
DECnet, 3-254
Renaming a file, 3-356
Rescan buffer, 3-361
Reserving a channel, 3-102
RESET JSYS, 3-337
Resetting a process, 3-337

Index-18

INDEX (CONT.)

Resetting file byte size,
3-385
Restart time,
Returning elapsed system,
3-465
Restricted JFN, 3-198,
3-445
Resuming a process, 3-342
Resuming process execution,
3-481
Retrieving an IPCF message,
3-222
Return,
+1, 1-10
+2, 1-10
Error, 1-10
JSYS, 1-1, 1-10
Return error, 1-10
Returning ARPANET host
information, 3-176
Returning CCOC words, 3-340
Returning device
characteristics, 3-121
Returning device status,
3-147
Returning directory
information, 3-173
Returning disk allocation,
3-172
Returning disk usage, 3-146
Returning EBOX/MBOX meter
val u e s, 3 _. 2 2 0
Returning elapsed system
restart time, 3-465
Returning file author,
3-166
Returning file byte-size,
3-339
Returning file descriptor
block, 3-175
Returning file
specification, 3-211
Returning file status,
3-198
Returning file's account,
3-144
Returning high-precision
clock, 3-202
Returning interrupt mask,
3-353, 3-367
Returning interrupt table,
3-352
Returning JFN mode word,
3-341
Returning job information,
3-154, 3-168
Returning job's account,
3-143

Returning most recent error,
3-153
Returning PAI050 entry
vector, 3-145
Returning page trap
information, 3-194
Returning process AC's,
3-338
Returning process entry
vector, 3-162, 3-489
Returning process status,
3-346
Returning program name,
3-156
Returning RMS entry vector,
3-148
Returning system table,
3-152, 3-451
Returning terminal type,
3-199
Returning trap words, 3-197,
3-488
RFACS JSYS, 3-338
RFBSZ JSYS, 3-339
RFCOC JSYS, 3-340
RFMOD JSYS, 3-341
RFORK JSYS, 3-342
RFPOS JSYS, 3-343
RFPTR JSYS, 3-344
RFRKH JSYS, 3-345
RFSTS JSYS, 3-346
RFTAD JSYS, 3-349
RIN JSYS, 3-351
RIR JSYS, 3-352
RIRCM JSYS, 3-353
RLJFN JSYS, 3-354
RMAP JSYS, 3-355
RMS entry vector, 3-376
Returning, 3-148
RNAMF JSYS, 3-356
ROUT JSYS, 3-358
RPACS JSYS, 3-359
RPCAP JSYS, 3-360
RSCAN JSYS, 3-361
RSMAP% JSYS, 3-363
RTFRK JSYS, 3-364
RTIW JSYS, 3-365
Run time, 3-366
RUNTM JSYS, 3-366
RWM JSYS, 3-367
RWSET JSYS, 3-368

SACTF JSYS, 3-369
Sample program, 2-5
Save,
Nonshareable, 3-370

Index-,19

INDEX (CONT.)

Setting process AC's, 3-384
Setting process entry
vector, 3-383, 3-496
Setting process priority,
3-433
Setting program name, 3-381,
3-382
Setting system date, 3-436
Setting terminal interrupt
word, 3-440
Setting terminal modes,
3-387
Setting terminal number,
3-446
Setting terminal pointer,
3-389
SEVEC JSYS, 3-383
SFACS JSYS, 3-384
SFBSZ JSYS, 3-385
SFCOC JSYS, 3-386
SFMOD JSYS, 3-387
SFORK JSYS, 3-388
SFPOS JSYS, 3-389
SFPTR JSYS, 3-390
SFRKV JSYS, 3-391
SFTAD JSYS, 3-392
SFUST JSYS, 3-394
Sharable save, 3-434
Sharable save file, 2-71
Short form GTJFN, 3-179
SIBE JSYS, 3-395
Simulating terminal input,
3-439
Simulating terminal output,
3-442
SIN JSYS, 3-396
SINR JSYS, 3-398
SIR JSYS, 3-400
SIRCM JSYS, 3-401
SIXBIT mode, 2-44
Size,
Resetting file byte,
3-385
SIZEF JSYS, 3-402
SJPRI JSYS, 3-403
SKED% JSYS, 3-404
SKPIR JSYS, 3-409
SMAP% JSYS, 3-410
SMON JSYS, 3-415
SNDIM JSYS, 3-417
SNOOP JSYS, 3-418
SOBE JSYS, 3-422
SOBF JSYS, 3-423
Socket number,
Converting, 3-90
Software data modes, 2-54,
2-56, 2-57
Software interrupt,
Functions, 2-57

Save (Cont.)
Sharable, 3-434
Save file,
Getting a, 3-149
Nonsharable, 2-70
Sharable, 2-71
Save files, 2-70
SAVE JSYS, 3-370
Scheduler control, 3-404
Scheduler priority control
word, 3-403
SCTTY JSYS, 3-371
SCVEC JSYS, 3-373
SDSTS JSYS, 3-375
SDVEC JSYS, 3-376
Searching,
Table, 3-454
Section,
Creating a, 3-410
current, 1-3
Handle, 3-363
Mapping a, 3-410
Section handle, 3-363
Section mapping, 3-363
Section-relative,
address, 1-3
Section-relative address,
1-3
Section-relative page
number, 1-3
Sections,
Creating, 3-363
Sending an IPCF message,
3-224
Set,
Releasing working, 3-368
SETER JSYS, 3-377
SETJB JSYS, 3-378
SETNM JSYS, 3-381
SETSN JSYS, 3-382
Setting CCOC words, 3-386
Setting device mode, 3-443
Setting error condition,
3-377
Setting file author, 3-394
Setting file date/time,
3-392
Setting file pointer, 3-390
Setting file status, 3-445
Setting interrupt mask,
3-401
Setting interrupt table
addresses, 3-400, 3-494
Setting job priority, 3-403
Setting monitor flags,
3-415
Setting page accessibility,
3-428
Setting primary JFN, 3-429

Index-20

=

INDEX (CONT.)

Software interrupt channel,
2-57
Software interrupt
functions, 2-57
Software interrupt priority,
2-58
Software interrupt system,
2-57
Clearing, 3-47
Enabling, 3-123
Software interrupt table,
2-59
Software interrupts,
Initiating, 3-209
Software-interrupt JSYS's,
AIC, 3-8
ATI, 3-19
CIS, 3-47
DEBRK, 3-91
DIBE, 3-106
DIC, 3-107
DIR, 3-108
DOBE, 3-111
DTI, 3-116
EIR, 3-123
IIC, 3-209
RCM, 3-326
RIR, 3-352
RIRCM, 3-353
RWM, 3-367
SIR, 3-400
SIRCM, 3-401
SKPIR, 3-409
STIW, 3-440
XRIR%, 3-490
XSIR%, 3-494
Source,
Designator, 1-6
Source designator, 1-6
Source/destination
designator, 1-6
SOUT JSYS, 3-424
SOUTR JSYS, 3-426
SPACS JSYS, 3-428
Specification,
File, 2-1
Parse-only file, 2-4
Returning file, 3-211
SPJFN JSYS, 3-429
SPLFK JSYS, 3-430
Splicing a process, 3-430
SPOOL JSYS, 3-431
Spooled device,
Manipulating a, 3-431
SPRIW JSYS, 3-433
SRV:, 2-57
SSAVE JSYS, 3-434
STAD JSYS, 3-436

Index-·21

Standard,
Date/time, 1-9
Standard date/time, 1-9
Starting a process, 3-229,
3-388, 3-391, 3-493
Status,
Process, 3-347
Returning device, 3-147
Returning file, 3-198
Returning process, 3-346
Setting file, 3-445
Status bits,
Magnetic tape, 2-44
MTA:, 2-39
PCDP:, 2-34
PCDR:, 2-33
PLPT:, 2-37
Terminal, 2-45
TTY:, 2-45
Status bits magnetic tape,
2-44
Status bits terminal, 2-45
Status word,
JFN, 3-198
Status word JFN, 3-198
STCMP JSYS, 3-437
STDEV JSYS, 1-8, 3-438
STI JSYS, 3-439
STIW JSYS, 3-440
STO JSYS, 3-442
Storage block,
Job, 3-361
STPAR JSYS, 3-443
STPPN JSYS, 3-444
String,
Translating device, 3-99
Translating device name,
3-438
Translating directory
name, 3-444
String comparison,
Wild, 3-485
String input, 3-396
String output, 3-321, 3-424
String-compare JSYS's,
STCMP, 3-437
WILD%, 3-485
String-I/O JSYS's,
PSOUT, 3-321
SIN, 3-396
SOUT, 3-424
Str ings, 1-7
ASCII, 1-7
Comparing, 3-437, 3-485
Error, 2-24
Outputting error, 3-136
Translating error, 3-135

INDEX (CaNT.)

Structure,
Regulated, 2-5, 3-2,
3-230, 3-246, 3-475
Structure-related JSYS's,
ACCES, 3-2
GNJFN, 3-169
MSTR, 3-230
STSTS JSYS, 3-445
STTYP JSYS, 3-446
Swapping JFNs, 3-447
SWJFN JSYS, 3-447
SWTRP% JSYS, 3-448
SYERR JSYS, 3-450
SYSGT JSYS, 3-451
SYSTAT table, 2-29
System,
Archive/virtual disk,
2-81
Clearing software
interrupt, 3-47
date, 1-9
Disabling interrupt,
3-108
Enabling software
interrupt, 3-123
Halting, 3-203
Software interrupt, 2-57
System accounting, 3-475
System dete, 1-9, 2-79
System date,
Setting, 3-436
System error file, 3-450
System performance analysis,
3-418
System program name, 3-382
System restart time,
Returning elapsed, 3-465
System table,
Returning, 3-152, 3-451
System tables, 2-24

Table,
Returning interrupt,
3-352
Returning system, 3-152,
3-451
Software interrupt, 2-59
SYSTAT, 2-29
Table addresses,
Obtaining interrupt,
3-490
Setting interrupt, 3-400,
3-494
Table entry,
Adding a, 3-452
Deleting a, 3-453
Table searching, 3-454

Index-22

Table-lookup JSYS's,
TBADD, 3-452
TBDEL, 3-453
TBLUK, 3-454
Tables,
System, 2-24
Tape,
Carriage control, 2-36
Functions magnetic, 2-39
Logical magnetic, 2-45
Physical magnetic, 2-45
Status bits magnetic,
2-44
Tape functions,
Magnetic, 2-39
Tape logical,
Magnetic, 2-45
Tape physical,
Magnetic, 2-45
Tape status bits,
Magnetic, 2-44
Tape-drive association,
Physical/logical, 3-247
TBADD JSYS, 3-452
TBDEL JSYS, 3-453
TBLUK JSYS, 3-454
Terminel,
Designator, 1-6
Functions, 2-45
Network, 3-254
Redefining controlling,
3-371
Status bits, 2-45
Terminal advising, 2-53
Terminal data mode, 2-46,
2-47
Terminal designator, 1-6,
1-8
Terminal functions, 2-45
Terminal input,
Simulating, 3-439
Terminal interrupt, 2-60
Assigning, 3-19
Deassigning, 3-116
Deferred, 2-62
Immediate, 2-62
Terminal interrupt codes,
2-60
Terminal interrupt modes,
2-62
Terminal interrupt word,
3-365
Setting, 3-440
Terminal length, 2-46, 2-47
Terminal linking, 2-53,
3-468
Terminal modes,
Setting, 3-387

INDEX (CaNT.)

Time (Cont.)
restart, 3-465
Run, 3-366
TIME JSYS, 3-465
Time process blocking,
Elapsed, 3-464
Time zone, 1-10
TIMER JSYS, 3-466
Timezone offset, 1-10
Timing,
Process, 3-466
TLINK JSYS, 3-468
TMON JSYS, 3-470
TOPS-IO monitor calls, 1-1
Translating a logical name,
3-216
Translating device name
string, 3-438
Translating device string,
3-99
Translating directory name
string, 3-444
Translating directory
number, 3-109
Translating error strings,
3-135
Trap information,
Returning page, 3-194
Trap words,
Returning, 3-197, 3-488
Trap-related JSYS's,
GTRPI, 3-194
GTRPW, 3-197
XGTPW%, 3-488
Trapping,
Overflow, 3-448
Underflow, 3-448
TTMSG JSYS, 3-472
TTY-I/O JSYS's,
BIN, 3-21
BOUT, 3-37
CFBIF, 3-39
CFBOF, 3-40
COMND, 3-52
DFIN, 3-100
DFOUT, 3-101
FLIN, 3-141
FLOUT, 3-142
IDTIM, 3-176, 3-205
IDTNC, 3-207
NIN, 3-285
NOUT, 3-292
PBIN, 3-303
PBOUT, 3-304
RDTTY, 3-332
RFCOC, 3-340
RFPOS, 3-343
SFCOC, 3-386
SFMOD, 3-387

Terminal number,
Setting, 3-446
Terminal output.,
Simulating, 3-442
Terminal pointer,
Setting, 3-389
Terminal status bits, 2-45
Terminal type,
Returning, 3-199
Terminal width, 2-46, 2-47
Terminal-related JSYS's,
ATACH, 3-17
ATI, 3-19
BKJFN, 3-22
CFBIF, 3-39
CFBOF, 3-40
DTACH, 3-115
DTI, 3-116
GJINF, 3-168
GTTYP, 3-199
RDTTY, 3-332
RFCOC, 3-340
RFPOS, 3-343
RSCAN, 3-361
RTIW, 3-365
SCTTY, 3-371
SFCOC, 3-386
SFMOD, 3-387
SFPOS, 3-389
STI, 3-439
STIW, 3-440
STO, 3-442
STTYP, 3-446
TEXTI, 3-457
TLINK, 3-468
TTMSG, 3-472
Termination,
Waiting for process,
3-484
Testing file input buffer,
3-395
Testing file output buffer,
3-422, 3-423
Testing for end-of-file,
2-22
Testing monitor flags,
3-470
TEXTI JSYS, 3-457
TFORK JSYS, 3-461
Thawed access, 2-8, 3-298
THIBR JSYS, 3-464
Time,
Greenwich Mean, 1-10
Local, 1-10
Offline expiration date
and, 3-349
Online expiration date
and, 3-349
Returning elapsed system

Index-23

INDEX (CONT.)

TTY-I/O JSYS's (Cont.)
SFPOS, 3-389
SIN, 3-396
SINR, 3-398
SOUT, 3-424
STI, 3-439
STO, 3-442
TEXTI, 3-457
TTMSG, 3 - 4 7 2
TTY:, 2-33, 2-45, 2-57
TTY: characteristics, 2-51,
2-52
TTY: status bits, 2-45
TWAKE JSYS, 3-473
Two-word global byte
pointer, 1-4
Two-word local byte pointer,
1-4
Type,
Returning terminal, 3-199

UFPGS JSYS, 3-474
Unbuffered I/O, 2-41
Underflow trapping, 3-448
Universal default
designator, 1-8
Up pointer,
Backing, 3-22
Updating file pages, 3-474
Usage,
Returning disk, 3-146
USAGE JSYS, 3-475
Used file page,
Finding first, 3-139
User-I/O mode, 3-478
USRIO JSYS, 3-478
UTEST JSYS, 3-479
UTFRK JSYS, 3-481
UUO's, 1-1

VACCT JSYS, 3-482
Values,
Returning EBOX/MBOX meter,
3-220
Vector,
Compatibility package
entry, 3-373
Entry, 2-74
Program data, 3-305
Returning PAI050 entry,
3-145
Returning process entry,

Index-24

3-162, 3-489
Returning RMS entry,
3-148
RMS entry, 3-376
Setting process entry,
3-383, 3-496
Verifying accounts, 3-482
VFU, 2-36
Loading, 3-218

WAIT JSYS, 3-483
Waiting for process
termination, 3-484
Wakeup class, 2-48, 2-49,
2-50
Waking a process, 3-473
WFORK JSYS, 3-484
Width,
Terminal, 2-46, 2-47
Wild string comparison,
3-485
WILD% JSYS, 3-485
Wildcard characters, 2-3
Word,
CCOC, 2-48, 2-49
JFN mode, 2-45, 3-341
JFN status, 3-198
Returning JFN mode, 3-341
Scheduler priority
control, 3-403
Setting terminal
interrupt, 3-440
Terminal interrupt, 3-365
Word JFN,
status, 3-198
Words,
CCOC, 3-340, 3-386
Returning CCOC, 3-340
Returning trap, 3-197,
3-488
Setting CCOC, 3-386
Working set,
Releasing, 3-368
Write access, 2-8, 3-298

XGTPW% JSYS, 3-488
XGVEC% JSYS, 3-489
XRIR% JSYS, 3-490
XRMAP% JSYS, 3-491
XSFRK% JSYS, 3-493
XSIR% JSYS, 3-494
XSVEC% JSYS, 3-496

TOPS-20
Monitor Calls
Reference Manual
AA-4166E-TM, AD-4166E-T1

READER'S COMMENTS

NOTE:

This form is for document comments only. DIGITAL will use comments submitted on
this form at the company's discretion. If you require a written reply and are eligible to
receive one under Software Performance Report (SPR) service, submit your comments on an SPR form.

Did you find this manual understandable, usable, and well-organized? Please make suggestions for improvement.

Did you find errors in this manual? If so, specify the error and the page number.

Please indicate the type of reader that you most nearly represent.

D Assembly language programmer

o

D
D
D
D

Higher-level language programmer
Occasional programmer (experienced)
User with little programmin~~ experience
Student programmer
Other (please specify)

Name ___________,_ _ _ __

Date _ _ _ __

Organization _ _ _ _ _ _ _ _'_____

Telephone _ __

Street ___________________________'
City _________________

State ____ Zip Code _ _ __
or Country

I
I

". gDOmNotgTear

:J

t

FOa

I
I
I

id

lieIre and Tape - -- - - - - -- -- - - - - - - - - --

-r fl-ll1--------~~~~;:;~: ---i
if Mailed in the
United States

BUSINESS REPLY MAIL
FIRST CLASS PERMIT NO. 33 MAYNARD MASS.
POSTAGE WILL BE PAID BY ADDRESSEE

SOFTWARE PUBLICATIONS

200 FOREST STREET
MARLBOROUGH, MA

- -

Do Not Tear - Fold Here and Tape

MR01-2/L 12
01752

- - - - - - -- - - - - - - - - - - - - - - - - - - - - _. - - - - - - - - - - - - - - - -

,
I
I



Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.3
Linearized                      : No
XMP Toolkit                     : Adobe XMP Core 4.2.1-c043 52.372728, 2009/01/18-15:56:37
Producer                        : Adobe Acrobat 9.31 Paper Capture Plug-in
Modify Date                     : 2010:03:29 12:03:58-08:00
Create Date                     : 2010:03:29 12:03:58-08:00
Metadata Date                   : 2010:03:29 12:03:58-08:00
Format                          : application/pdf
Document ID                     : uuid:f89e9872-5985-4d4d-bd52-d96969c23f1a
Instance ID                     : uuid:57d04527-95d6-49a5-8163-5ebfcbb75a5f
Page Layout                     : SinglePage
Page Mode                       : UseNone
Page Count                      : 829
EXIF Metadata provided by
EXIF.tools

Navigation menu