Google
 

Trailing-Edge - PDP-10 Archives - tops10v704_docc - 10,7/docupd/mcv2.mem
Click 10,7/docupd/mcv2.mem to see without markup as text/plain
There is 1 other file named mcv2.mem in the archive. Click here to see a list.















                                  TOPS-10
                            Monitor Calls Manual

                                  Volume 2
|  
|  
|                        Electronically Distributed
|  
|  
|  
|            This manual describes the monitor  calls  used  by
|            TOPS-10 MACRO programmers to request services that
|            are  controlled  by  the  TOPS-10  monitor.    The
|            TOPS-10  Monitor  Calls  Manual  consists  of  two
|            volumes.  Volume 1 is an overview of the  services
|            available  to  the  programmer.   Volume  2  is  a
|            detailed list of the calls  and  coding  sequences
|            that are used to invoke those services.
|  
|            This manual supersedes the TOPS-10  Monitor  Calls
|            Manual,  Volume 2 published in October, 1988.  The
|            order number  for  that  manual,  AA-K039D-TB,  is
|            obsolete.



             Operating System:             TOPS-10 Version 7.04

             Software:                       GALAXY Version 5.1








   digital equipment corporation               marlborough, massachusetts


|  TOPS-10 Software Tape No. 03, September 1990

   First Printing, August 1980
   Updated, December 1981
   Revised, February 1984
   Revised, April 1986
   Revised, October 1988
|  Revised, September 1990




   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 Equipment Corporation or its
   affiliated companies.



|  Copyright C 1980, 1981, 1984, 1986, 1988, 1990 Digital Equipment 
|  Corporation.

   All Rights Reserved.



   The following are trademarks of Digital Equipment Corporation:

   CI             DECtape     LA50             SITGO-10
   DDCMP          DECUS       LN01             TOPS-10
   DEC            DECwriter   LN03             TOPS-20
   DECmail        DELNI       MASSBUS          TOPS-20AN
   DECnet         DELUA       PDP              UNIBUS
   DECnet-VAX     HSC         PDP-11/24        UETP
   DECserver      HSC-50      PrintServer      VAX
   DECserver 100  KA10        PrintServer 40   VAX/VMS
   DECserver 200  KI          Q-bus            VT50
   DECsystem-10   KL10        ReGIS
   DECSYSTEM-20   KS10        RSX              d i g i t a l


                                      CONTENTS



   PREFACE


   CHAPTER 22      MONITOR CALL DESCRIPTIONS

           22.1    ACCLG. [CALLI 204] . . . . . . . . . . . . . . .  22-3
           22.2    ACCT. [CALLI 167]  . . . . . . . . . . . . . . .  22-4
           22.2.1    Function 0 (.ACTCH)  . . . . . . . . . . . . .  22-4
           22.2.2    Function 1 (.ACTRD)  . . . . . . . . . . . . .  22-5
           22.3    APRENB [CALLI 16]  . . . . . . . . . . . . . . .  22-7
           22.4    ATTACH [CALLI 104] . . . . . . . . . . . . . . . 22-10
           22.5    CALLI [OPCODE 047] . . . . . . . . . . . . . . . 22-13
           22.6    CAL11. [CALLI 125] . . . . . . . . . . . . . . . 22-17
           22.6.1    FUNCTION 0 (.C11DP)  . . . . . . . . . . . . . 22-19
           22.6.2    FUNCTION 1 (.C11EX)  . . . . . . . . . . . . . 22-19
           22.6.3    FUNCTION 2 (.C11QU)  . . . . . . . . . . . . . 22-19
           22.6.4    FUNCTION 3 (.C11NM)  . . . . . . . . . . . . . 22-20
           22.6.5    FUNCTION 4 (.C11UP)  . . . . . . . . . . . . . 22-20
           22.6.6    FUNCTION 5 (.C11SM)  . . . . . . . . . . . . . 22-20
           22.6.7    FUNCTION 6 (.C11RM)  . . . . . . . . . . . . . 22-20
           22.6.8    FUNCTION 7 (.C11TY)  . . . . . . . . . . . . . 22-20
           22.7    CHGPPN [CALLI 74]  . . . . . . . . . . . . . . . 22-22
           22.8    CHKACC [CALLI 100] . . . . . . . . . . . . . . . 22-23
           22.9    CHTRN. [CALLI 223] . . . . . . . . . . . . . . . 22-26
           22.10   CLOSE [OPCODE 070] . . . . . . . . . . . . . . . 22-28
           22.11   CLRBFI [TTCALL 11,]  . . . . . . . . . . . . . . 22-31
           22.12   CLRBFO [TTCALL 12,]  . . . . . . . . . . . . . . 22-32
           22.13   CLRST. [CALLI 134] . . . . . . . . . . . . . . . 22-33
           22.14   CMAND. [CALLI 211] . . . . . . . . . . . . . . . 22-35
           22.14.1   FUNCTION 0 (.CMINT)  . . . . . . . . . . . . . 22-35
           22.14.2   FUNCTION 1 (.CMADD)  . . . . . . . . . . . . . 22-36
           22.14.3   FUNCTION 2 (.CMDEL)  . . . . . . . . . . . . . 22-36
           22.14.4   FUNCTION 3 (.CMLST)  . . . . . . . . . . . . . 22-37
           22.14.5   FUNCTION 4 (.CMRET)  . . . . . . . . . . . . . 22-37
           22.14.6   FUNCTION 5 (.CMDMP)  . . . . . . . . . . . . . 22-38
           22.15   CNECT. [CALLI 130] . . . . . . . . . . . . . . . 22-40
           22.16   CORE [CALLI 11]  . . . . . . . . . . . . . . . . 22-42
           22.17   CTLJOB [CALLI 65]  . . . . . . . . . . . . . . . 22-45
           22.18   CTX. [CALLI 215] . . . . . . . . . . . . . . . . 22-46
           22.18.1   FUNCTION 0 (.CTSVH)  . . . . . . . . . . . . . 22-47
           22.18.2   FUNCTION 1 (.CRSVR)  . . . . . . . . . . . . . 22-48
           22.18.3   FUNCTION 2 (.CVSVT)  . . . . . . . . . . . . . 22-48
           22.18.4   FUNCTION 3 (.CTSVS)  . . . . . . . . . . . . . 22-48
           22.18.5   FUNCTION 4 (.CTSVD)  . . . . . . . . . . . . . 22-48
           22.18.6   FUNCTION 5 (.CTRDB)  . . . . . . . . . . . . . 22-48
           22.18.7   FUNCTION 6 (.CTWDB)  . . . . . . . . . . . . . 22-48
           22.18.8   FUNCTION 7 (.CTRQT)  . . . . . . . . . . . . . 22-49
           22.18.9   FUNCTION 10 (.CTSQT) . . . . . . . . . . . . . 22-49


                                    iii


           22.18.10  FUNCTION 11 (.CTDIR) . . . . . . . . . . . . . 22-49
           22.18.11  FUNCTION 12 (.CTINF) . . . . . . . . . . . . . 22-49
           22.19   DAEFIN [CALLI 105] . . . . . . . . . . . . . . . 22-51
           22.20   DAEMON [CALLI 102] . . . . . . . . . . . . . . . 22-52
           22.20.1   FUNCTION 1 (Obsolete)  . . . . . . . . . . . . 22-52
           22.20.2   FUNCTION 2 (.CLOCK)  . . . . . . . . . . . . . 22-52
           22.20.3   FUNCTION 3 (Obsolete)  . . . . . . . . . . . . 22-53
           22.20.4   FUNCTION 4 (.DMQUE)  . . . . . . . . . . . . . 22-53
           22.20.5   FUNCTION 5 (.DMERR)  . . . . . . . . . . . . . 22-53
           22.20.6   FUNCTION 6 (.DMCTL)  . . . . . . . . . . . . . 22-55
           22.21   DATE [CALLI 14]  . . . . . . . . . . . . . . . . 22-57
           22.22   DEBRK. [CALLI 137] . . . . . . . . . . . . . . . 22-58
           22.23   DEQ. [CALLI 152] . . . . . . . . . . . . . . . . 22-59
           22.23.1   FUNCTION 0 (.DEQDR)  . . . . . . . . . . . . . 22-59
           22.23.2   FUNCTION 1 (.DEQDA)  . . . . . . . . . . . . . 22-60
           22.23.3   FUNCTION 2 (.DEQID)  . . . . . . . . . . . . . 22-60
           22.24   DEVCHR [CALLI 4] . . . . . . . . . . . . . . . . 22-63
           22.25   DEVLNM [CALLI 107] . . . . . . . . . . . . . . . 22-66
           22.26   DEVNAM [CALLI 64]  . . . . . . . . . . . . . . . 22-68
           22.27   DEVOP. [CALLI 171] . . . . . . . . . . . . . . . 22-69
           22.27.1   FUNCTION 1 (.DFLLV)  . . . . . . . . . . . . . 22-70
           22.27.2   FUNCTION 2 (.DFENV)  . . . . . . . . . . . . . 22-70
           22.27.3   FUNCTION 3 (.DFDVL)  . . . . . . . . . . . . . 22-70
           22.27.4   FUNCTIONS 4-10 . . . . . . . . . . . . . . . . 22-70
           22.27.5   FUNCTION 11 (.DFLR2) . . . . . . . . . . . . . 22-70
           22.27.6   FUNCTION 12 (.DFLV2) . . . . . . . . . . . . . 22-71
           22.27.7   FUNCTION 13 (.DFMDC) . . . . . . . . . . . . . 22-71
           22.27.8   FUNCTION 14 (.DFMDS) . . . . . . . . . . . . . 22-71
           22.27.9   FUNCTIONS 15-777 . . . . . . . . . . . . . . . 22-71
           22.27.10  FUNCTION 1000 (.DFPCT) . . . . . . . . . . . . 22-71
           22.27.11  FUNCTION 2000 (.DFPCT) . . . . . . . . . . . . 22-71
           22.27.12  FUNCTION 1002 (.DFHCW) . . . . . . . . . . . . 22-72
           22.27.13  FUNCTION 2002 (.DFHCW) . . . . . . . . . . . . 22-73
           22.27.14  FUNCTION 1003 (.DFRES) . . . . . . . . . . . . 22-73
           22.27.15  FUNCTION 1004 (.DFRDS) . . . . . . . . . . . . 22-74
           22.27.16  FUNCTION 1005 (.DFFRM) . . . . . . . . . . . . 22-74
           22.27.17  FUNCTION 1006 (.DFDTI) . . . . . . . . . . . . 22-74
           22.28   DEVPPN [CALLI 55]  . . . . . . . . . . . . . . . 22-76
           22.29   DEVSIZ [CALLI 101] . . . . . . . . . . . . . . . 22-78
           22.30   DEVSTS [CALLI 54]  . . . . . . . . . . . . . . . 22-80
           22.31   DEVTYP [CALLI 53]  . . . . . . . . . . . . . . . 22-82
           22.32   DIAG. [CALLI 163]  . . . . . . . . . . . . . . . 22-85
           22.32.1   FUNCTION 1 (.DIASU)  . . . . . . . . . . . . . 22-86
           22.32.2   FUNCTION 2 (.DIAAU)  . . . . . . . . . . . . . 22-86
           22.32.3   FUNCTION 3 (.DIRAU)  . . . . . . . . . . . . . 22-86
           22.32.4   FUNCTION 4 (.DISCP)  . . . . . . . . . . . . . 22-86
           22.32.5   FUNCTION 5 (.DIRCP)  . . . . . . . . . . . . . 22-87
           22.32.6   FUNCTION 6 (.DIGCS)  . . . . . . . . . . . . . 22-87
           22.32.7   FUNCTION 7 (.DIAKU)  . . . . . . . . . . . . . 22-87
           22.32.8   FUNCTION 10 (.DIACS) . . . . . . . . . . . . . 22-87
           22.32.9   FUNCTION 11 (.DIADS) . . . . . . . . . . . . . 22-88
           22.32.10  FUNCTION 12 (.DISCR) . . . . . . . . . . . . . 22-88


                                     iv


           22.32.11  FUNCTION 13 (Obsolete) . . . . . . . . . . . . 22-88
           22.32.12  FUNCTION 14 (.DIGUI) . . . . . . . . . . . . . 22-88
           22.32.13  FUNCTION 15 (Obsolete) . . . . . . . . . . . . 22-88
           22.32.14  FUNCTION 16 (Obsolete) . . . . . . . . . . . . 22-88
           22.32.15  FUNCTION 17 (.DIELD)   . . . . . . . . . . . . 22-89
           22.32.16  FUNCTION 20 (.DIDLD) . . . . . . . . . . . . . 22-89
           22.32.17  FUNCTION 21 (.DILOD) . . . . . . . . . . . . . 22-89
           22.32.18  FUNCTION 22 (.DIISM) . . . . . . . . . . . . . 22-89
           22.32.19  FUNCTION 23 (.DIICM) . . . . . . . . . . . . . 22-89
           22.32.20  FUNCTION 24 (.DISBD) . . . . . . . . . . . . . 22-89
           22.32.21  FUNCTION 25 (.DIDSN) . . . . . . . . . . . . . 22-90
           22.32.22  FUNCTION 26 (.DIRUR) . . . . . . . . . . . . . 22-90
           22.32.23  FUNCTION 27 (.DIADB) . . . . . . . . . . . . . 22-90
           22.32.24  FUNCTION 30 (.DIOKI)   . . . . . . . . . . . . 22-91
           22.32.25  FUNCTION 31 (.DIOUI) . . . . . . . . . . . . . 22-92
           22.32.26  FUNCTION 32 (.DILKU) . . . . . . . . . . . . . 22-92
           22.32.27  FUNCTION 33 (.DISDS) . . . . . . . . . . . . . 22-92
           22.32.28  FUNCTION 34 (.DIDVR) . . . . . . . . . . . . . 22-93
           22.32.29  FUNCTIONS 35-77 (Reserved for DIGITAL) . . . . 22-93
           22.32.30  FUNCTION 100 (.DIGTM)  . . . . . . . . . . . . 22-93
           22.32.31  FUNCTION 101 (.DIGVM)  . . . . . . . . . . . . 22-93
           22.32.32  FUNCTIONS 102-104 (Reserved) . . . . . . . . . 22-93
           22.32.33  FUNCTION 105 (.DIRRS)  . . . . . . . . . . . . 22-94
           22.32.34  FUNCTION 106 (.DISRS)  . . . . . . . . . . . . 22-94
           22.32.35  FUNCTION 107 (.DIACC)  . . . . . . . . . . . . 22-94
           22.32.36  FUNCTIONS 110-111 (Reserved for DIGITAL) . . . 22-94
           22.32.37  FUNCTION 112 (.DIWCM)  . . . . . . . . . . . . 22-94
           22.32.38  FUNCTION 113 (.DIRCM)  . . . . . . . . . . . . 22-95
           22.33   DISK. [CALLI 121]  . . . . . . . . . . . . . . . 22-96
           22.33.1   FUNCTION 0 (.DUPRI)  . . . . . . . . . . . . . 22-97
           22.33.2   FUNCTION 1 (.DUSEM)  . . . . . . . . . . . . . 22-97
           22.33.3   FUNCTION 2 (.DUSTM)  . . . . . . . . . . . . . 22-98
           22.33.4   FUNCTION 3 (.DUUNL)  . . . . . . . . . . . . . 22-98
           22.33.5   FUNCTION 4 (.DUOLS)  . . . . . . . . . . . . . 22-98
           22.33.6   FUNCTION 5 (.DUOLN)  . . . . . . . . . . . . . 22-99
           22.33.7   FUNCTION 6 (.DUONL)  . . . . . . . . . . . . . 22-99
           22.33.8   FUNCTION 7 (.DUUFD)  . . . . . . . . . . . .  22-100
           22.33.9   FUNCTION 10 (.DUSWP) . . . . . . . . . . . .  22-100
           22.33.10  FUNCTION 11 (.DUASW) . . . . . . . . . . . .  22-101
           22.33.11  FUNCTION 12 (.DUASD) . . . . . . . . . . . .  22-101
           22.33.12  FUNCTION 13 (.DURSD) . . . . . . . . . . . .  22-101
           22.33.13  FUNCTION 14 (.DULEN) . . . . . . . . . . . .  22-102
           22.33.14  FUNCTION 15 (.DUCLM) . . . . . . . . . . . .  22-102
           22.33.15  FUNCTION 16 (.DUFRE) . . . . . . . . . . . .  22-102
           22.34   DNET. [CALLI 207]  . . . . . . . . . . . . . .  22-103
           22.34.1   FUNCTION 1 (.DNLNN)  . . . . . . . . . . . .  22-104
           22.34.2   FUNCTION 2 (.DNNDI)  . . . . . . . . . . . .  22-104
           22.34.3   FUNCTION 3 (.DNSLS)  . . . . . . . . . . . .  22-105
           22.35   DSKCHR [CALLI 45]  . . . . . . . . . . . . . .  22-109
           22.36   DTE. [CALLI 170] . . . . . . . . . . . . . . .  22-116
           22.37   DVPHY. [CALLI 164] . . . . . . . . . . . . . .  22-123
           22.38   DVRST. [CALLI 122] . . . . . . . . . . . . . .  22-125


                                     v


           22.39   DVURS. [CALLI 123] . . . . . . . . . . . . . .  22-126
           22.40   ENQ. [CALLI 151] . . . . . . . . . . . . . . .  22-127
           22.41   ENQC. [CALLI 153]  . . . . . . . . . . . . . .  22-138
           22.41.1   FUNCTION 0 (.ENQCS)  . . . . . . . . . . . .  22-138
           22.41.2   FUNCTION 1 (.ENQCG)  . . . . . . . . . . . .  22-140
           22.41.3   FUNCTION 2 (.ENQCC)  . . . . . . . . . . . .  22-140
           22.41.4   FUNCTION 3 (.ENQCD)  . . . . . . . . . . . .  22-141
           22.42   ENTER [OPCODE 077] . . . . . . . . . . . . . .  22-142
           22.43   ENTVC. [CALLI 225] . . . . . . . . . . . . . .  22-144
           22.44   ERLST. [CALLI 132] . . . . . . . . . . . . . .  22-146
           22.45   ETHNT. [CALLI 223] . . . . . . . . . . . . . .  22-148
           22.46   EXIT [CALLI 12]  . . . . . . . . . . . . . . .  22-159
           22.47   FILOP. [CALLI 155] . . . . . . . . . . . . . .  22-161
           22.47.1   FILOP. Extended Argument List  . . . . . . .  22-162
           22.47.2   FILOP. Functions . . . . . . . . . . . . . .  22-166
           22.47.3   Simultaneous File Access with FILOP. UUO . .  22-173
           22.48   FRCUUO [CALLI 106] . . . . . . . . . . . . . .  22-176
           22.49   GETLCH [TTCALL 6,] . . . . . . . . . . . . . .  22-178
           22.50   GETLIN [CALLI 34]  . . . . . . . . . . . . . .  22-180
           22.51   GETPPN [CALLI 24]  . . . . . . . . . . . . . .  22-181
           22.52   GETSEG [CALLI 40]  . . . . . . . . . . . . . .  22-182
           22.53   GETSTS [OPCODE 062]  . . . . . . . . . . . . .  22-185
           22.54   GETTAB [CALLI 41]  . . . . . . . . . . . . . .  22-187
           22.55   GOBSTR [CALLI 66]  . . . . . . . . . . . . . .  22-188
           22.56   GTNTN. [CALLI 165] . . . . . . . . . . . . . .  22-191
           22.57   GTXTN. [CALLI 166] . . . . . . . . . . . . . .  22-193
           22.58   HIBER [CALLI 72] . . . . . . . . . . . . . . .  22-194
           22.59   HPQ [CALLI 71] . . . . . . . . . . . . . . . .  22-197
           22.60   IN [OPCODE 056]  . . . . . . . . . . . . . . .  22-198
           22.61   INBUF [OPCODE 064] . . . . . . . . . . . . . .  22-200
           22.62   INCHRS [TTCALL 2,] . . . . . . . . . . . . . .  22-202
           22.63   INCHRW [TTCALL 0,] . . . . . . . . . . . . . .  22-203
           22.64   INCHSL [TTCALL 5,] . . . . . . . . . . . . . .  22-204
           22.65   INCHWL [TTCALL 4,] . . . . . . . . . . . . . .  22-205
           22.66   INIT [OPCODE 041]  . . . . . . . . . . . . . .  22-206
           22.67   INPUT [OPCODE 066] . . . . . . . . . . . . . .  22-207
           22.68   IONDX. [CALLI 127] . . . . . . . . . . . . . .  22-209
           22.69   IONEOU [TTCALL 15,]  . . . . . . . . . . . . .  22-210
           22.70   IPCFM. [CALLI 217] . . . . . . . . . . . . . .  22-211
           22.71   IPCFQ. [CALLI 144] . . . . . . . . . . . . . .  22-214
           22.72   IPCFR. [CALLI 142] . . . . . . . . . . . . . .  22-216
           22.73   IPCFS. [CALLI 143] . . . . . . . . . . . . . .  22-221
           22.74   JBSET. [CALLI 113] . . . . . . . . . . . . . .  22-224
           22.75   JOBPEK [CALLI 103] . . . . . . . . . . . . . .  22-225
           22.76   JOBSTR [CALLI 47]  . . . . . . . . . . . . . .  22-228
           22.77   JOBSTS [CALLI 61]  . . . . . . . . . . . . . .  22-230
           22.78   KDP. [CALLI 200] . . . . . . . . . . . . . . .  22-233
           22.79   LATOP. [CALLI 221] . . . . . . . . . . . . . .  22-235
           22.79.1   FUNCTION 0 (.LASET)  . . . . . . . . . . . .  22-235
           22.79.2   FUNCTION 1 (.LACLR)  . . . . . . . . . . . .  22-238
           22.79.3   FUNCTION 2 (.LASCH)  . . . . . . . . . . . .  22-238
           22.79.4   FUNCTION 3 (.LASTC)  . . . . . . . . . . . .  22-240


                                     vi


           22.79.5   FUNCTION 4 (.LASAS)  . . . . . . . . . . . .  22-242
           22.79.6   FUNCTION 5 (.LASCO)  . . . . . . . . . . . .  22-243
           22.79.7   FUNCTION 6 (.LAZCO)  . . . . . . . . . . . .  22-244
           22.79.8   FUNCTION 7 (.LARHC)  . . . . . . . . . . . .  22-245
           22.79.9   FUNCTION 10 (.LATHC) . . . . . . . . . . . .  22-247
           22.79.10  FUNCTION 11 (.LASHC) . . . . . . . . . . . .  22-247
           22.80   LLMOP. [CALLI 220] . . . . . . . . . . . . . .  22-250
           22.80.1   FUNCTION 0 (.ELDIR)  . . . . . . . . . . . .  22-250
           22.80.2   FUNCTION 1 (.ELAST)  . . . . . . . . . . . .  22-251
           22.80.3   FUNCTION 2 (.ELRPY)  . . . . . . . . . . . .  22-251
           22.80.4   FUNCTION 3 (.ELAIC)  . . . . . . . . . . . .  22-252
           22.80.5   FUNCTION 4 (.ELABT)  . . . . . . . . . . . .  22-252
           22.80.6   FUNCTION 5 (.ELSTS)  . . . . . . . . . . . .  22-252
           22.80.7   FUNCTION 6 (.RCRID)  . . . . . . . . . . . .  22-253
           22.80.8   FUNCTION 7 (.RCRCT)  . . . . . . . . . . . .  22-253
           22.80.9   FUNCTION 10 (.RCIDS) . . . . . . . . . . . .  22-253
           22.80.10  FUNCTION 11 (.RCRBT) . . . . . . . . . . . .  22-254
           22.80.11  FUNCTION 12 (.RCRPY) . . . . . . . . . . . .  22-254
           22.80.12  FUNCTION 13 (.RCRSV) . . . . . . . . . . . .  22-255
           22.80.13  FUNCTION 14 (.RCREL) . . . . . . . . . . . .  22-255
           22.80.14  FUNCTION 15 (.RCSND) . . . . . . . . . . . .  22-255
           22.80.15  FUNCTION 16 (.RCPOL) . . . . . . . . . . . .  22-256
           22.80.16  FUNCTION 17 (.RCAIC) . . . . . . . . . . . .  22-256
           22.80.17  FUNCTION 20 (.RCABT) . . . . . . . . . . . .  22-257
           22.80.18  FUNCTION 21 (.RCSTS) . . . . . . . . . . . .  22-257
           22.80.19  FUNCTION 22 (.RCADR) . . . . . . . . . . . .  22-257
           22.81   LOCATE [CALLI 62]  . . . . . . . . . . . . . .  22-258
           22.82   LOCK [CALLI 60]  . . . . . . . . . . . . . . .  22-260
           22.83   LOGIN [CALLI 15] . . . . . . . . . . . . . . .  22-266
           22.84   LOGOUT [CALLI 17]  . . . . . . . . . . . . . .  22-267
           22.85   LOOKUP [OPCODE 076]  . . . . . . . . . . . . .  22-268
           22.86   MERGE. [CALLI 173] . . . . . . . . . . . . . .  22-270
           22.87   MONRT. [CALL 1,12] . . . . . . . . . . . . . .  22-272
           22.88   MSTIME [CALLI 23]  . . . . . . . . . . . . . .  22-273
           22.89   MTAID [CALLI 126]  . . . . . . . . . . . . . .  22-274
           22.90   MTAPE [OPCODE 072] . . . . . . . . . . . . . .  22-276
           22.91   MTBLK. [MTAPE 13]  . . . . . . . . . . . . . .  22-277
           22.92   MTBSF. [MTAPE 17]  . . . . . . . . . . . . . .  22-278
           22.93   MTBSR. [MTAPE 7] . . . . . . . . . . . . . . .  22-280
           22.94   MTCHR. [CALLI 112] . . . . . . . . . . . . . .  22-281
           22.95   MTDEC. [MTAPE 100] . . . . . . . . . . . . . .  22-284
           22.96   MTEOF. [MTAPE 3] . . . . . . . . . . . . . . .  22-285
           22.97   MTEOT. [MTAPE 10]  . . . . . . . . . . . . . .  22-286
           22.98   MTIND. [MTAPE 101] . . . . . . . . . . . . . .  22-287
           22.99   MTLTH. [MTAPE 200] . . . . . . . . . . . . . .  22-288
           22.100  MTREW. [MTAPE 1] . . . . . . . . . . . . . . .  22-289
           22.101  MTSKF. [MTAPE 16]  . . . . . . . . . . . . . .  22-290
           22.102  MTSKR. [MTAPE 6] . . . . . . . . . . . . . . .  22-291
           22.103  MTUNL. [MTAPE 11]  . . . . . . . . . . . . . .  22-292
           22.104  MTWAT. [MTAPE 0] . . . . . . . . . . . . . . .  22-294
           22.105  MVHDR. [CALLI 131] . . . . . . . . . . . . . .  22-295
           22.106  NETOP. [CALLI 226] . . . . . . . . . . . . . .  22-296


                                    vii


           22.107  NODE. [CALLI 157]  . . . . . . . . . . . . . .  22-299
           22.107.1  FUNCTION 1 (.NDALN)  . . . . . . . . . . . .  22-299
           22.107.2  FUNCTION 2 (.NDRNN)  . . . . . . . . . . . .  22-299
           22.107.3  FUNCTION 3 (.NDSSM)  . . . . . . . . . . . .  22-300
           22.107.4  FUNCTION 4 (.NDRBM)  . . . . . . . . . . . .  22-300
           22.107.5  FUNCTION 5 (.NDRCI)  . . . . . . . . . . . .  22-301
           22.107.6  FUNCTION 6 (.NDOUT)  . . . . . . . . . . . .  22-302
           22.107.7  FUNCTION 7 (.NDIN) . . . . . . . . . . . . .  22-302
           22.107.8  FUNCTION 10 (.NDTCN) . . . . . . . . . . . .  22-302
           22.107.9  FUNCTION 11 (.NDTDS) . . . . . . . . . . . .  22-302
           22.107.10 FUNCTION 12 (.NDLND) . . . . . . . . . . . .  22-303
           22.107.11 FUNCTION 13 (.NDNDB) . . . . . . . . . . . .  22-303
           22.107.12 FUNCTION 14 (.NDGNF) . . . . . . . . . . . .  22-305
           22.108  NSP. [CALLI 205] . . . . . . . . . . . . . . .  22-307
           22.109  NTMAN. [CALLI 206] . . . . . . . . . . . . . .  22-310
           22.110  OPEN [OPCODE 050]  . . . . . . . . . . . . . .  22-313
           22.110.1  ARGUMENT WORD 0 (.OPMOD) . . . . . . . . . .  22-313
           22.110.2  ARGUMENT WORD 1 (.OPDEV) . . . . . . . . . .  22-317
           22.110.3  ARGUMENT WORD 2 (.OPBUF) . . . . . . . . . .  22-317
           22.111  OTHUSR [CALLI 77]  . . . . . . . . . . . . . .  22-319
           22.112  OUT [OPCODE 057] . . . . . . . . . . . . . . .  22-320
           22.113  OUTBUF [OPCODE 065]  . . . . . . . . . . . . .  22-322
           22.114  OUTCHR [TTCALL 1,] . . . . . . . . . . . . . .  22-323
           22.115  OUTPUT [OPCODE 067]  . . . . . . . . . . . . .  22-324
           22.116  OUTSTR [TTCALL 3,] . . . . . . . . . . . . . .  22-325
           22.117  PAGE. [CALLI 145]  . . . . . . . . . . . . . .  22-326
           22.117.1  FUNCTION 0 (.PAGIO)  . . . . . . . . . . . .  22-327
           22.117.2  FUNCTION 1 (.PAGCD)  . . . . . . . . . . . .  22-327
           22.117.3  FUNCTION 2 (.PAGEM)  . . . . . . . . . . . .  22-328
           22.117.4  FUNCTION 3 (.PAGAA)  . . . . . . . . . . . .  22-329
           22.117.5  FUNCTION 4 (.PAGWS)  . . . . . . . . . . . .  22-329
           22.117.6  FUNCTION 5 (.PAGGA)  . . . . . . . . . . . .  22-330
           22.117.7  FUNCTION 6 (.PAGCA)  . . . . . . . . . . . .  22-330
           22.117.8  FUNCTION 7 (.PAGCH)  . . . . . . . . . . . .  22-331
           22.117.9  FUNCTION 10 (.PAGCB) . . . . . . . . . . . .  22-331
           22.117.10 FUNCTION 11 (.PAGSP)   . . . . . . . . . . .  22-332
           22.117.11 FUNCTION 12 (.PAGSC) . . . . . . . . . . . .  22-333
           22.117.12 FUNCTION 13 (.PAGBM)   . . . . . . . . . . .  22-333
           22.117.13 FUNCTION 14 (.PAGAL) . . . . . . . . . . . .  22-334
           22.117.14 FUNCTION 15 (.PAGLP) . . . . . . . . . . . .  22-335
           22.117.15 FUNCTION 16 (.PAGWL) . . . . . . . . . . . .  22-335
           22.118  PATH. [CALLI 110]  . . . . . . . . . . . . . .  22-337
           22.119  PEEK [CALLI 33]  . . . . . . . . . . . . . . .  22-347
           22.120  PERF. [CALLI 162]  . . . . . . . . . . . . . .  22-348
           22.121  PIBLK. [CALLI 212] . . . . . . . . . . . . . .  22-352
           22.122  PIFLG. [CALLI 216] . . . . . . . . . . . . . .  22-353
           22.123  PIINI. [CALLI 135] . . . . . . . . . . . . . .  22-355
           22.124  PIJBI. [CALLI 175] . . . . . . . . . . . . . .  22-358
           22.125  PIRST. [CALLI 141] . . . . . . . . . . . . . .  22-360
           22.126  PISAV. [CALLI 140] . . . . . . . . . . . . . .  22-361
           22.127  PISYS. [CALLI 136] . . . . . . . . . . . . . .  22-363
           22.128  PITMR. [CALLI 203] . . . . . . . . . . . . . .  22-369


                                    viii


           22.129  PJOB [CALLI 30]  . . . . . . . . . . . . . . .  22-371
           22.130  POKE. [CALLI 114]  . . . . . . . . . . . . . .  22-372
           22.131  QUEUE. [CALLI 201] . . . . . . . . . . . . . .  22-374
           22.132  REASSI [CALLI 21]  . . . . . . . . . . . . . .  22-389
           22.133  RECON. [CALLI 202] . . . . . . . . . . . . . .  22-391
           22.134  RELEAS [OPCODE 071]  . . . . . . . . . . . . .  22-399
           22.135  REMAP [CALLI 37] . . . . . . . . . . . . . . .  22-400
           22.136  RENAME [OPCODE 055]  . . . . . . . . . . . . .  22-402
           22.137  RESCAN [TTCALL 10,]  . . . . . . . . . . . . .  22-405
           22.138  RESDV. [CALLI 117] . . . . . . . . . . . . . .  22-406
           22.139  RESET [CALLI 0]  . . . . . . . . . . . . . . .  22-407
           22.140  RTTRP [CALLI 57] . . . . . . . . . . . . . . .  22-409
           22.141  RUN [CALLI 35] . . . . . . . . . . . . . . . .  22-411
           22.142  RUNTIM [CALLI 27]  . . . . . . . . . . . . . .  22-413
           22.143  SAVE. [CALLI 210]  . . . . . . . . . . . . . .  22-414
           22.144  SCHED. [CALLI 150] . . . . . . . . . . . . . .  22-416
           22.145  SCS. [CALLI 213] . . . . . . . . . . . . . . .  22-424
           22.146  SEBLK. [CALLI 214] . . . . . . . . . . . . . .  22-431
           22.147  SEGOP. [CALLI 230] . . . . . . . . . . . . . .  22-432
           22.147.1  FUNCTION 0 (.SGINF)  . . . . . . . . . . . .  22-433
           22.147.2  FUNCTION 1 (.SGGET)  . . . . . . . . . . . .  22-434
           22.147.3  FUNCTION 2 (.SGREL)  . . . . . . . . . . . .  22-435
           22.147.4  FUNCTION 3 (.SGRMP)  . . . . . . . . . . . .  22-436
           22.147.5  FUNCTION 4 (.SGSWP)  . . . . . . . . . . . .  22-436
           22.147.6  FUNCTION 5 (.SGCOR)  . . . . . . . . . . . .  22-437
           22.147.7  FUNCTION 6 (.SGDMP)  . . . . . . . . . . . .  22-437
           22.148  SENSE. [CALLI 133] . . . . . . . . . . . . . .  22-439
           22.149  SETDDT [CALLI 2] . . . . . . . . . . . . . . .  22-441
           22.150  SETLCH [TTCALL 7,] . . . . . . . . . . . . . .  22-442
           22.151  SETNAM [CALLI 43]  . . . . . . . . . . . . . .  22-443
           22.152  SETSTS [OPCODE 060]  . . . . . . . . . . . . .  22-444
           22.153  SETUUO [CALLI 75]  . . . . . . . . . . . . . .  22-446
           22.154  SETUWP [CALLI 36]  . . . . . . . . . . . . . .  22-458
           22.155  SKPINC [TTCALL 13,]  . . . . . . . . . . . . .  22-459
           22.156  SKPINL [TTCALL 14,]  . . . . . . . . . . . . .  22-460
           22.157  SLEEP [CALLI 31] . . . . . . . . . . . . . . .  22-461
           22.158  SNOOP. [CALLI 176] . . . . . . . . . . . . . .  22-462
           22.159  SPPRM. [CALLI 172] . . . . . . . . . . . . . .  22-466
           22.160  SPY [CALLI 42] . . . . . . . . . . . . . . . .  22-468
           22.161  STATO [OPCODE 061] . . . . . . . . . . . . . .  22-470
           22.162  STATZ [OPCODE 063] . . . . . . . . . . . . . .  22-471
           22.163  STRUUO [CALLI 50]  . . . . . . . . . . . . . .  22-472
           22.164  SUSET. [CALLI 146] . . . . . . . . . . . . . .  22-486
           22.165  SYSPHY [CALLI 51]  . . . . . . . . . . . . . .  22-488
           22.166  SYSSTR [CALLI 46]  . . . . . . . . . . . . . .  22-489
           22.167  TAPOP. [CALLI 154] . . . . . . . . . . . . . .  22-490
           22.168  TIMER [CALLI 22] . . . . . . . . . . . . . . .  22-502
           22.169  TMPCOR [CALLI 44]  . . . . . . . . . . . . . .  22-503
           22.170  TRMNO. [CALLI 115] . . . . . . . . . . . . . .  22-506
           22.171  TRMOP. [CALLI 116] . . . . . . . . . . . . . .  22-508
           22.172  TRPSET [CALLI 25]  . . . . . . . . . . . . . .  22-524
           22.173  TSK. [CALLI 177] . . . . . . . . . . . . . . .  22-525


                                     ix


           22.174  TTCALL [OPCODE 051]  . . . . . . . . . . . . .  22-530
           22.175  UGETF [OPCODE 073] . . . . . . . . . . . . . .  22-531
           22.176  UJEN [OPCODE 100]  . . . . . . . . . . . . . .  22-532
           22.177  UNLOK. [CALLI 120] . . . . . . . . . . . . . .  22-533
           22.178  USETI [OPCODE 074] . . . . . . . . . . . . . .  22-535
           22.179  USETO [OPCODE 075] . . . . . . . . . . . . . .  22-537
           22.180  UTPCLR [CALLI 13]  . . . . . . . . . . . . . .  22-539
           22.181  UTRP. [CALLI 174]  . . . . . . . . . . . . . .  22-540
           22.182  WAIT [CALLI 10]  . . . . . . . . . . . . . . .  22-542
           22.183  WAKE [CALLI 73]  . . . . . . . . . . . . . . .  22-543
           22.184  WHERE [CALLI 63] . . . . . . . . . . . . . . .  22-544


   CHAPTER 23      GETTAB TABLES

           23.1    HOW TO USE GETTAB TABLES . . . . . . . . . . . .  23-1
           23.2    HOW TO USE GETTAB SUBTABLES  . . . . . . . . . .  23-2
           23.3    ADDING ITEMS TO THE MONITOR'S GETTAB TABLES  . .  23-3
           23.4    ADDING NEW GETTAB TABLES TO THE MONITOR  . . . .  23-3
           23.5    ALPHABETIC LISTING . . . . . . . . . . . . . . .  23-4
           23.6    TOPS-10 GETTAB TABLES  . . . . . . . . . . . . .  23-7


   APPENDIX A      .EXE FILES

           A.1     THE DIRECTORY  . . . . . . . . . . . . . . . . . . A-1


   APPENDIX B      FILE DAEMON

           B.1     USER INTERFACE . . . . . . . . . . . . . . . . . . B-1
           B.2     THE FILE DAEMON  . . . . . . . . . . . . . . . . . B-1
           B.3     ACCESS.USR . . . . . . . . . . . . . . . . . . . . B-3
           B.4     MONITOR INTERFACE TO A FILE DAEMON . . . . . . .  B-10


                   GLOSSARY


   INDEX


   FIGURES

           22-1    QUEUE. Argument List . . . . . . . . . . . . .  22-375


   TABLES

           22-1    Error File Entry Types . . . . . . . . . . . . . 22-53
           22-2    FILOP Argument Block . . . . . . . . . . . . .  22-163
           22-3    LATOP. Show Buffer Format  . . . . . . . . . .  22-239


                                     x


           22-4    LATOP. Service Block . . . . . . . . . . . . .  22-240
           22-5    LATOP. Short Connect Block . . . . . . . . . .  22-241
           22-6    LATOP. Extended Connect Block  . . . . . . . .  22-241
           22-7    LATOP. Show Adjacent Servers Full-Format Block  22-242
           22-8    LATOP. Show Adjacent Servers Short-Format Block 22-243
           22-9    LATOP. Counter Block Format  . . . . . . . . .  22-244
           22-10   LATOP. Rejection Codes . . . . . . . . . . . .  22-246
           22-11   LATOP. Status Block  . . . . . . . . . . . . .  22-248
           22-12   PATH. Functions and Flags  . . . . . . . . . .  22-342
           22-13   PISYS. Function Flags  . . . . . . . . . . . .  22-364
           22-14   PSI Interrupt Codes (Non-I/O Interrupts) . . .  22-364
           22-15   PSI Reason Codes (I/O-Related Interrupts)  . .  22-366
           22-16   SEGOP. UUO Flags . . . . . . . . . . . . . . .  22-433
           B-1     ACCESS.USR Switches  . . . . . . . . . . . . . . . B-4
           B-2     File Daemon Codes  . . . . . . . . . . . . . . .  B-12
           B-3     File Daemon Flags  . . . . . . . . . . . . . . .  B-14
























































                                    xii












                                  PREFACE



   This is the second  volume  of  the  2-volume  TOPS-10  Monitor  Calls
   Manual.   Volume 1 describes the facilities offered by the monitor for
   assembly language programs.  You can use the information in  Volume  1
   to learn how to implement these facilities in your programs.

   Volume 2 contains a detailed description of  each  monitor  call,  its
   calling  sequence,  functions,  and  error  codes,  if any.  It is the
   definitive list of the monitor call  functions.   For  information  on
   using  these  calls, you should read Volume 1 before attempting to use
   Volume 2.

   Not all devices are supported under current versions of  TOPS-10.   In
   the  interest  of  providing  useful information, this manual includes
   references to unsupported and obsolete hardware.  For  support  status
   of hardware and software, please refer to the current TOPS-10 Software
   Product Description.

   Obsolete monitor calls are marked, either in the CALLI UUO, or in  the
   chapter   in   which  they  were  previously  described.   Appropriate
   substitutes, (if any), for obsolete calls are also indicated.  Section
   23.5 lists the GETTAB Tables, and notes any obsolete tables.

                                CONVENTIONS

   This version of the Monitor Calls Manual,  Vol.   2  contains  special
   notation to identify the following:

        Notation            Meaning

        underscore          Indicates a type  of  information  that  your
                            program  must supply.  For example, addr must
                            be replaced by a location in your program.

         /  \      /  \
        |    | or  \  /
         \  /               braces define a choice of argument types that
                            you can supply.



                                    xiii
























































                                    22-i











                                 CHAPTER 22

                         MONITOR CALL DESCRIPTIONS



   This chapter describes each of the TOPS-10 monitor  calls.   For  each
   description the following information is included, if applicable:

         o  FUNCTION:  briefly describes the general use of the call.

         o  CALLING SEQUENCE:  shows the  format  for  the  call.   Cases
            where  a  word  may  contain  one  of  a  number  of types of
            information  are  indicated  by  the   presence   of   braces
            containing the options.  Braces are included as:

                  /  \      /  \
                 |    | or  \  /
                  \  /

         o  RESTRICTIONS:  describes any unusual  conditions  that  might
            affect the operation of the call or its effect on the calling
            program.

         o  SKIP RETURN:  describes the result of a skip return from  the
            call  and  any  operational  aspects with which you should be
            concerned.

         o  ERROR RETURN:  describes the result of an error on return.

         o  EXAMPLE:  shows one or more examples of the call.

         o  RELATED CALLS:  lists other, related monitor calls.

         o  COMMON PROGRAMMING ERRORS:  describes common user errors.










                                    22-1
                         MONITOR CALL DESCRIPTIONS


   In the  calling  sequences  shown,  the  following  definitions  apply
   throughout this section:

         o  ac:   an  arbitrary  accumulator;  often  used  for   passing
            arguments  to  the  call  and to store an error code returned
            from a call.

         o  return:  the statement to which control passes on return from
            a call.

         o  skip return:  the statement to which  control  passes  if  no
            error occurs in executing a call.

         o  error return:  the statement to which control  passes  if  an
            error occurs in executing a call.

   The monitor call names are defined in the file UUOSYM.MAC; the  CALLI,
   MTAPE,  and  TTCALL  monitor calls offer extensions through parameters
   passed to the monitor.



































                                    22-2
                             ACCLG. [CALLI 204]


   22.1  ACCLG. [CALLI 204]

   FUNCTION

   Used by the LOGIN system program to increment LOGNUM and  ensure  that
   LOGIN  does  not  exceed  the  maximum  number of logged-in jobs.  The
   monitor performs the following functions for the ACCLG. call:

        1.  Increments LOGNUM (a word containing the number of  logged-in
            jobs).

        2.  Checks the LOGNUM  against  the  appropriate  access  maximum
            (LOGMAX for timesharing jobs or BATMAX for batch jobs).

   CALLING SEQUENCE

             MOVSI     ac,(flags)
             ACCLG.    ac
               error return
             skip return

   In the calling sequence, you can supply the  flags  indicated  by  the
   following bit settings:

   Bit       Symbol    Meaning

   0         AC.MAX    Check LOGMAX.
   1         AC.BMX    Check BATMAX.
   2         AC.DCR    Decrement LOGNUM count.

   SKIP RETURN

   On a skip return, LOGNUM has been incremented and the maximum  is  not
   exceeded.   If  the  LOGIN  program is halted before the LOGIN UUO has
   successfully completed, however, the program should  trap  the  CTRL/C
   exit  and  perform  another  ACCLG. call,  setting  the AC.DCR flag to
   decrement the LOGNUM count before allowing the program to exit.

   ERROR RETURN

   When this call takes the error return,  one  of  the  following  error
   codes will be returned in the accumulator:

   Code      Symbol    Error

   1         ACLMX%    LOGMAX check failed.  That is, to log in this  job
                       would exceed LOGMAX.
   2         ACLBM%    BATMAX check failed.
   3         ACLIL%    Invalid argument to ACCLG. call.
   4         ACLJL%    ACCLG. with AC.DCR set produced an  invalid  value
                       after decrementing.
   5         ACLDC%    An ACCLG. with AC.DCR had been attempted when  the
                       LOGNUM had not been incremented.

                                    22-3
                             ACCT. [CALLI 167]


   22.2  ACCT. [CALLI 167]

   FUNCTION

   Reads or changes the account string for a job.

   CALLING SEQUENCE

             MOVE      ac,[XWD function,addr]
             ACCT.     ac,
               error return
             skip return
   addr:     EXP       length
             argument list

   In the calling sequence, you may supply the following variables:

         o  function, as one of the function codes described below.

         o  addr, as the location of the argument block.

         o  length, as the length of the argument  block  (not  including
            this word)

         o  argument list, which is specific to the function.



   22.2.1  Function 0 (.ACTCH)

   Changes the account string for the specified job.

   You must have JACCT privileges to use Function  0.   Note  that  [1,2]
   privileges alone do not provide ability to perform this function.

   The argument list is formatted as:

   Word      Contents

   0         Must contain a 1.

   1         A byte pointer to the ASCIZ  account  string,  or  the  word
             [-1,,address],  where address is the location of the account
             string.   In  the  latter  case,  account  strings  must  be
             left-justified on a word boundary.









                                    22-4
                             ACCT. [CALLI 167]


   22.2.2  Function 1 (.ACTRD)

   Reads the account string for the specified job.

   The  maximum  length  for  account  strings  is  set  by  the   system
   administrator  when  the  monitor  is generated by MONGEN (symbol name
   MLACTS).  This default can be changed if your installation uses  fewer
   than 39 characters in its account strings.

   Word      Contents

   0         Must contain a 2.

   1         The job number for the desired account string  (-1  for  the
             calling job).

   2         The location where the monitor  should  return  the  account
             string.

   SKIP RETURN

   For Function .ACTCH, the account string is changed.

   For Function .ACTRD, the account string for the job is in the location
   pointed to by addr+2, and addr+1 contains the job number.

   ERROR RETURN

   An error code is returned in the accumulator.   The  error  codes  and
   their meanings are:

   Code      Symbol    Error

   1         ACTTL%    Account string too long for the monitor's  buffer;
                       only the leftmost characters have been stored.
   2         ACTAC%    Address check error.
   3         ACTIL%    Illegal argument.
   4         ACTNJ%    Nonexistent job number.
   5         ACTPS%    JACCT privileges required.















                                    22-5
                             ACCT. [CALLI 167]


   EXAMPLE

             MOVE      T1,[XWD .ACTRD,ARGLST]
             ACCT.     T1,
               JRST    ERROR
             JRST      CONTIN
             . . .
   ARGLST:   EXP       2
   JOBNO:    EXP       -1
   ACCADR:   EXP       ACCSTR
   ACCSTR:   BLOCK     ^D8

   ERROR:    error routine
   CONTIN:   success routine

   This code sequence places the ASCIZ account string for the calling job
   into the locations starting at ACCSTR.

   RELATED CALLS

         o  GETPPN

         o  PJOB































                                    22-6
                             APRENB [CALLI 16]


   22.3  APRENB [CALLI 16]

   FUNCTION

   Enables trap servicing for a program.  When a  condition  enabled  for
   trap  servicing occurs, control is transferred to the address given by
   .JBAPR in the job data area.  See Chapter 6 for more information about
   handling traps.

   CALLING SEQUENCE

             MOVEI     ac,flags
             APRENB    ac,
             return

   In the calling sequence, you can supply the following flags, indicated
   by these flag bits:

   Bit       Symbol    Trap Condition

   18        AP.REN    Repetitive enable.

   19        AP.POV    Pushdown list overflow.

   21        AP.ABK    Reserved.

   22        AP.ILM    Memory protection violation.

   23        AP.NXM    Nonexistent memory.

   24        AP.PAR    Memory parity error.

   26        AP.CLK    Clock tick.  The clock ticked while  your  program
                       was actively running; this trap does not occur for
                       every clock tick.

   29        AP.FOV    Floating-point overflow.

   32        AP.AOV    Arithmetic overflow.

   When one of these conditions occurs while the  processor  is  in  user
   mode, the monitor:

        1.  Stores the PC in location .JBTPC in the Job  Data  Area.   If
            the  PC is equal to the first or second location in your trap
            servicing routine, the program is terminated.

        2.  Clears the arithmetic and floating-point overflow flags.

        3.  Transfers  control  to  your  trap-servicing   routine;   the
            location is given by the right half of location .JBAPR in the
            Job Data Area.


                                    22-7
                             APRENB [CALLI 16]


   Your program must place the address of the trap-servicing routine into
   .JBAPR before executing the APRENB monitor call.

                                   NOTES


            o  If  your  trap-servicing  routine   contains   the
               instruction

                    JRSTF @.JBTPC

               the processor bits are cleared and  the  state  of
               the  CPU  is  restored;  control resumes where the
               interrupt occurred.

            o  The APRENB monitor call clears the trap  after  an
               occurrence  of  any  selected condition; therefore
               your program must  call  APRENB  after  each  trap
               occurs.

            o  To  enable  repeated  trap   interceptions,   your
               program  should set AP.REN (bit 18) when executing
               the APRENB call; however, clock interrupts must be
               reenabled after each trap occurs.

            o  If  your  program  does  not  enable  for   traps,
               overflow  conditions  and clock ticks are ignored,
               but the  other  conditions  listed  above  produce
               fatal errors.


   EXAMPLE

             MOVEI     T1,OVERFL ;Get address of overflow handler
             MOVEM     T1,.JBAPR ;Put into .JBAPR
             MOVEI     T1,AP.AOV ;Arithmetic overflow flag
             APRENB    T1,       ;To .JBAPR on arith ovflw
             JRST      CONTIN    ;On to something else
   OVERFL:   OUTSTR    [ASCIZ /ARITHMETIC OVERFLOW ERROR/]
             JRSTF     @.JBTPC   ;Resume execution
              .  .  .
   CONTIN:                       ;Something else

   This  code  sequence  sets  up  an  overflow  message  for  the  first
   arithmetic  overflow; note that this example will not handle more than
   one arithmetic overflow.








                                    22-8
                             APRENB [CALLI 16]


   COMMON PROGRAMMING ERRORS

         o  Not reenabling the interrupt after each trap has occurred.

         o  Failing to set up .JBAPR prior to the APRENB call.

   RELATED CALLS

         o  PISYS.

         o  UTRP.











































                                    22-9
                             ATTACH [CALLI 104]


   22.4  ATTACH [CALLI 104]

   FUNCTION

   Attaches a terminal line to a job.  For example, this call is used  by
   the  BATCON  program to attach and detach jobs from their terminals at
   system shutdown.  This call is more powerful than the  ATTACH  monitor
   command.

   An unprivileged job can use  the  ATTACH  monitor  call  only  if  its
   terminal  is  in  user  mode,  and  it  can  only  detach from its own
   controlling terminal.

   CALLING SEQUENCE

             MOVE      ac,[EXP <flag>+<lineno>B17+<jobno>B35]
             ATTACH    ac,
               error return
             skip return

   In the calling sequence, you can supply the following variables:

         o  flag is one of the bits described below.

         o  lineno is a line number (restricted to 16 bits).

         o  jobno is the number of a logged-in job (use -1 for the
            current job).

            If jobno is -1, your job is detached from  the  current  line
            and  attached  to  the specified line; if jobno is 0, the job
            attached to the line specified  by  lineno  is  detached;  if
            jobno  is  positive (requires JACCT or [1,2] privileges), the
            monitor detaches the specified job from its current line  and
            attaches it to the specified line.

   Flags you can supply in the accumulator are:

   Bit       Symbol    Terminal Mode

   0         AT.UMM    Puts terminal in monitor (command) mode.  However,
                       .STPGR of the SETUUO may force the terminal into
                       user mode.
   1         AT.UUM    Puts terminal in user mode.

   If neither flag is set, the terminal mode is not changed.   Note  that
   this is the terminal mode, not the job mode.







                                   22-10
                             ATTACH [CALLI 104]


   Using the ATTACH UUO, you perform the  following  functions  with  the
   following information:

   To attach an arbitrary job to a terminal:

        jobno     should be the number of the job to be attached.

        lineno    should be the number of the terminal to which the job
                  is to be attached.

        flag      is the mode to which the new terminal will be set.

   The previous terminal will be left in monitor mode.

   To  attach  your  current  job  to  a  terminal,  follow   the   above
   definitions, with the following exception:

        jobno     should be less than 0 (-1 is recommended).

   To detach an arbitrary terminal:

        jobno     must be zero.

        lineno    should be the number of the terminal to be detached.

        flags     will be ignored.  The terminal will be left in monitor
                  mode.

   To detach your job's controlling terminal:

        jobno     must be zero.

        lineno    should be -1 or 777777.  If you explicitly include
                  777777, the first two bits of the value are ignored,
                  producing 177777 (both flag bits are off).

        flags     are ignored.  The terminal is placed in monitor mode.

   SKIP RETURN

   The job is attached or detached as specified, and the terminal  is  in
   the specified mode.

   ERROR RETURN

   The accumulator is cleared.  An error return occurs only if you use an
   illegal  line  or  job  number,  or  if  you  do not have the required
   privileges for the call.






                                   22-11
                             ATTACH [CALLI 104]


   EXAMPLE

             MOVSI     T1,-1
             ATTACH    T1,
               JRST    ATTERR
             JRST      CONTIN
             .  .  .
   ATTERR:   error routine
   CONTIN:   success routine

   This example detaches the current job from its terminal line; the mode
   is not changed.










































                                   22-12
                             CALLI [OPCODE 047]


   22.5  CALLI [OPCODE 047]

   FUNCTION

   Passes the monitor a function-index for an  extended  set  of  monitor
   calls,  called  CALLIs.   The  negative CALLI indexes are reserved for
   customer-defined monitor calls.  All non-negative codes  are  reserved
   for use by DIGITAL.  Obsolete CALLIs. are marked as such, and they are
   not described further in this manual.

   The defined CALLIs also have symbolic function-names; in this  chapter
   they  are  listed  in alphabetical order by symbol name.  For example,
   CALLI 215 is the CTX.  UUO, described in this chapter under "CTX.".

   CALLING SEQUENCE

             CALLI     ac,function-index
               error return
             skip return

   In the calling sequence,  you  can  supply  the  function-index.   The
   alternate  method of specifying a monitor call is to use the following
   syntax:

        function-name  ac,
          error return
        skip return

   The function-name is the name of the monitor call.  For example,  CTX.
   is the function-name for the CALLI with function-index 215.

   You can use the UU.PHY bit in the ac to indicate  that  addresses  you
   specify  are  physical references.  For monitor calls that take device
   names, this bit indicates that physical device  referencing  is  being
   used.

   To indicate physical references, rather than virtual or  logical,  set
   Bits  18  and  19  in  the  ac, or include the symbolic representation
   (UU.PHY).

   For example, to indicate physical referencing in DIGITAL CALLIs,  such
   as the CTX.  UUO, use the following CALLI syntax:

        CALLI          ac,215!UU.PHY

   Or you can specify UU.PHY in  symbolic  representation  of  the  CALLI
   using the following syntax:

        CTX. ac,UU.PHY





                                   22-13
                             CALLI [OPCODE 047]


   For  customer-supplied  CAllIs,   remember   to   use   the   negative
   representation of UU.PHY:

        CALLI          ac,-1,-UU.PHY

   Or, in symbolic representation:

        LIGHTS         ac,-UU.PHY

   The UU.PHY symbol represents the settings of Bits 18 and 19 in the ac.
   When  the  settings  of  these  bits  differ,  physical referencing is
   assumed by the monitor.  For DIGITAL-supplied CALLIs, Bit 18 is  clear
   and  Bit  19  is  set  to indicate physical referencing.  For customer
   CALLIs, Bit 18 is set; therefore, Bit 19 must be cleared  to  indicate
   physical referencing.

   The CALLI "function-index" is one of the following:

   Function-Index   Name    Meaning

   -n through -1            Reserved for customer definition.

    0               RESET   Refer to the description of the monitor call.

    n                       DIGITAL-supplied CALLI functions.  

   The CALLIs and their symbolic names  are  listed  in  numerical  order
   below:

   Symbol    CALLI Function           Symbol    CALLI Function

   LIGHTS    (Obsolete)               TIMER     [CALLI 22]
   RESET     [CALLI 0]                MSTIME    [CALLI 23]
   DDTIN     (Unsupported)            GETPPN    [CALLI 24]
   SETDDT    [CALLI 2]                TRPSET    [CALLI 25]
   DDTOUT    (Unsupported)            TRPJEN    [CALLI 26]
   DEVCHR    [CALLI 4]                RUNTIM    [CALLI 27]
   DDTGT     (Obsolete)               PJOB      [CALLI 30]
   DDTRL     (Obsolete)               SLEEP     [CALLI 31]
   GETCHR    (Obsolete; use DEVCHR)   SETPOV    (Unsupported)
   WAIT      [CALLI 10]               PEEK      [CALLI 33]
   CORE      [CALLI 11]               GETLIN    [CALLI 34]
   EXIT      [CALLI 12]               RUN       [CALLI 35]
   MONRT.    [CALLI 1,12]             SETUWP    [CALLI 36]
   UTPCLR    [CALLI 13]               REMAP     [CALLI 37]
   DATE      [CALLI 14]               GETSEG    [CALLI 40]
   LOGIN     [CALLI 15]               GETTAB    [CALLI 41]
   APRENB    [CALLI 16]               SPY       [CALLI 42]
   LOGOUT    [CALLI 17]               SETNAM    [CALLI 43]
   SWITCH    (Obsolete)               TMPCOR    [CALLI 44]
   REASSI    [CALLI 21]               DSKCHR    [CALLI 45]



                                   22-14
                             CALLI [OPCODE 047]


   Symbol    CALLI Function           Symbol    CALLI Function

   SYSSTR    [CALLI 46]               DVURS.    [CALLI 123]
   JOBSTR    [CALLI 47]               XTTSK.    (Unsupported)
   STRUUO    [CALLI 50]               CAL11.    [CALLI 125]
   SYSPHY    [CALLI 51]               MTAID.    [CALLI 126]
   FRECHN    (Obsolete)               IONDX.    [CALLI 127]
   DEVTYP    [CALLI 53]               CNECT.    [CALLI 130]
   DEVSTS    [CALLI 54]               MVHDR.    [CALLI 131]
   DEVPPN    [CALLI 55]               ERLST.    [CALLI 132]
   SEEK      (Obsolete)               SENSE.    [CALLI 133]
   RTTRP     [CALLI 57]               CLRST.    [CALLI 134]
   LOCK      [CALLI 60]               PIINI.    [CALLI 135]
   JOBSTS    [CALLI 61]               PISYS.    [CALLI 136]
   LOCATE    [CALLI 62]               DEBRK.    [CALLI 137]
   WHERE     [CALLI 63]               PISAV.    [CALLI 140]
   DEVNAM    [CALLI 64]               PIRST.    [CALLI 141]
   CTLJOB    [CALLI 65]               IPCFR.    [CALLI 142]
   GOBSTR    [CALLI 66]               IPCFS.    [CALLI 143]
   ACTIVA    (Unimplemented)          IPCFQ.    [CALLI 144]
   DEACTI    (Unimplemented)          PAGE.     [CALLI 145]
   HPQ       [CALLI 71]               SUSET.    [CALLI 146]
   HIBER     [CALLI 72]               COMPT.    (Reserved)
   WAKE      [CALLI 73]               SCHED.    [CALLI 150]
   CHGPPN    [CALLI 74]               ENQ.      [CALLI 151]
   SETUUO    [CALLI 75]               DEQ.      [CALLI 152]
   DEVGEN    (Unimplemented)          ENQC.     [CALLI 153]
   OTHUSR    [CALLI 77]               TAPOP.    [CALLI 154]
   CHKACC    [CALLI 100]              FILOP.    [CALLI 155]
   DEVSIZ    [CALLI 101]              CAL78.    (Unsupported)
   DAEMON    [CALLI 102]              NODE.     [CALLI 157]
|  JOBPEK    [CALLI 103]              ERRPT.    (Obsolete)
   ATTACH    [CALLI 104]              ALLOC.    [CALLI 161]
   DAEFIN    [CALLI 105]              PERF.     [CALLI 162]
   FRCUUO    [CALLI 106]              DIAG.     [CALLI 163]
   DEVLNM    [CALLI 107]              DVPHY.    [CALLI 164]
   PATH.     [CALLI 110]              GTNTN.    [CALLI 165]
   METER.    (Unsupported)            GTXTN.    [CALLI 166]
   MTCHR.    [CALLI 112]              ACCT.     [CALLI 167]
   JBSET.    [CALLI 113]              DTE.      [CALLI 170]
   POKE.     [CALLI 114]              DEVOP.    [CALLI 171]
   TRMNO.    [CALLI 115]              SPPRM.    [CALLI 172]
   TRMOP.    [CALLI 116]              MERGE.    [CALLI 173]
   RESDV.    [CALLI 117]              UTRP.     [CALLI 174]
   UNLOK.    [CALLI 120]              PIJBI.    [CALLI 175]
   DISK.     [CALLI 121]              SNOOP.    [CALLI 176]
   DVRST.    [CALLI 122]              TSK.      [CALLI 177]







                                   22-15
                             CALLI [OPCODE 047]


   Symbol    CALLI Function           Symbol    CALLI Function

   KDP.      [CALLI 200]              CTX.      [CALLI 215]
   QUEUE.    [CALLI 201]              PIFLG.    [CALLI 216]
   RECON.    [CALLI 202]              IPCFM.    [CALLI 217]
   PITMR.    [CALLI 203]              LLMOP.    [CALLI 220]
   ACCLG.    [CALLI 204]              LATOP.    [CALLI 221]
   NSP.      [CALLI 205]              KNIBT.    (Obsolete)
   NTMAN.    [CALLI 206]              CHTRN.    [CALLI 223]
   DNET.     [CALLI 207]              ETHNT.    [CALLI 224]
   SAVE.     [CALLI 210]              ENTVC.    [CALLI 225]
   CMAND.    [CALLI 211]              NETOP.    [CALLI 226]
   PIBLK.    [CALLI 212]              DDP.      (Unsupported)
   SCS.      [CALLI 213]              SEGOP.    [CALLI 230]
   SEBLK.    [CALLI 214]







































                                   22-16
                             CAL11. [CALLI 125]


   22.6  CAL11. [CALLI 125]

   FUNCTION

   Performs front-end testing and debugging functions.  Using this  call,
   you  can  obtain  information about PDP-11 based front end nodes, send
   and receive front-end messages,  and  examine  and  deposit  into  the
   front-end software.

   CALLING SEQUENCE

             MOVE      ac,[XWD length,addr]
             CAL11.    ac,
               error return
             skip return
             . . .
   addr:     XWD port,function
             address
             value                
             qstart

   In the calling sequence, you may supply the following variables:

         o  length is the length of the argument block.

         o  addr is the location of the argument block.  Starting at this
            address, the call accepts one to four words, depending on the
            function code.

   The format of the argument list for CAL11. is:

   Offset    Symbol    Contents

   0         .C11FC    Function word, containing the  port  specification
                       and the function code.  The left half of this word
                       contains the type of port.  The  right  half  must
                       contain   a  function  code.   The  argument  list
                       following  the  function  word  may  include   the
                       following words, depending on the function.

   1         .C11AD    Address of a buffer where the monitor  will  store
                       requested data.

   2         .C11CN    A value that the function uses as data to  deposit
                       in memory.

   3         .C11EN    Address of a buffer where the monitor  will  store
                       information about a device.






                                   22-17
                             CAL11. [CALLI 125]


   The first word of the argument  list  (.C11FC)  is  required  for  all
   functions.   The  left half of this word specifies the type of port by
   which the front end is connected to the central processor.   The  port
   specification  can  take  either  of the following formats.  The first
   format is old, and may be used by existing programs.  However, the new
   format is recommended for new programs.

   The old format for the port specification is:

   Bits      Symbol    Meaning

    9-17     C1.1NO    Port identifier, made up of the following fields:

    9-14     C1.1NT    Type of port (see .C11TY below).

   15-17     C1.1NN    Port number.

   The new format is signified by the setting of Bit  0,  the  sign  bit.
   With the new format, the following fields are defined:

   Bits      Symbol    Meaning

    0        C1.1NF    New format for port specification.

    1-8      C1.1XX    Reserved for use by DIGITAL.

    9-11     C1.1TY    Type code, one of the following:

                       Code   Symbol    Meaning

                       0      .C11DL    DL-10
                       1      .C11DT    DTE-20
                       2      .C11KD    KMC/DUP
                       3      .C11DR    DMR-11

   12-14     C1.1CN    CPU number.

   15-17     C1.1PN    Port number.

   18-35     C1.1FC    Function code.

   The arguments following .C11FC depend on the function.  Therefore, the
   argument lists are described for each function code listed below.

   The function codes and their meanings are described in  the  following
   sections:








                                   22-18
                             CAL11. [CALLI 125]


   22.6.1  FUNCTION 0 (.C11DP)

   Deposits the specified data in the specified location.   The  argument
   block for this function is:

   Word      Symbol    Contents

   0         .C11FC    Port specification in the left half.

                       Function name (.C11DP) in the right half.

   1         .C11AD    Address where the data will be deposited.

   2         .C11CN    Value, or data, to be deposited at location
                       specified in .C11AD.

   This function requires the JP.POK privilege, and works  for  DN60  and
   DN8x front ends only.



   22.6.2  FUNCTION 1 (.C11EX)

   Examines the specified location.  The argument list for this  function
   is:

   Word      Symbol    Contents

   0         .C11FC    Left half contains the port specification.

                       Right half contains .C11EX.

   1         .C11AD    The address to be examined.

   The data at the specified location is returned in the accumulator.

   This function requires the JP.POK privilege and  works  for  DN60  and
   DN8x front ends only.



   22.6.3  FUNCTION 2 (.C11QU)

   The argument list for this function is:

   Word      Symbol    Contents

   0         .C11FC    Left half contains the port specification.

                       Right half contains .C11QU.

   1         .C11AD    Zero


                                   22-19
                             CAL11. [CALLI 125]


   2         .C11CN    Zero

   3         .C11EN    The address of a data block containing information
                       regarding the front end function.

   This function requires the JP.POK privilege and works  only  for  DN60
   front ends.



   22.6.4  FUNCTION 3 (.C11NM)

   For DL10-based ANF-10 front ends, returns  the  name  of  the  program
   running  on  the  PDP-11.   The SIXBIT program name is returned in ac.
   For all other front ends, .C11NM returns  the  name  of  the  protocol
   enabled  by  the monitor for a given front end.  The argument list for
   this function contains only the function word, .C11FC.



   22.6.5  FUNCTION 4 (.C11UP)

   This function is obsolete.



   22.6.6  FUNCTION 5 (.C11SM)

   This function is obsolete.



   22.6.7  FUNCTION 6 (.C11RM)

   Receives a message from a DN8x  type  of  front  end.   This  function
   requires only the first word of the argument list, .C11FC.



   22.6.8  FUNCTION 7 (.C11TY)

   Returns the node type and node number of the  PDP-11.   This  function
   requires only the first word of the argument list, .C11FC.

   For DECnet and ANF-10 front ends, the node number is returned  in  the
   left  half of the ac.  The node type is returned in the right half, as
   one of the following type codes:

   Code      Symbol    Meaning

   1         .C1D76    DC76.
   2         .C1D75    DC75/DN87.


                                   22-20
                             CAL11. [CALLI 125]


   3         .C1D60    DN60.
   4         .C1D8S    DN87S.
   5         .C1CFE    Console front end.
   6         .C1MCB    DECnet-10 MCB front end.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         C11NP%    Job not privileged.
   2         C11UF%    Unknown function.
   3         C11ND%    Wrong type of PDP-11 specified.
   4         C11IU%    Examine/deposit function already in use.
   5         C11NA%    No answer to examine/deposit.
   6         C11TS%    Queue entry too short.
   7         C11NE%    Not enough arguments.
   10        C11IA%    Invalid address specified for examine/deposit.
   11        C11IQ%    Invalid argument for queue request function.
   12        C11IC%    Insufficient core.
   13        C11RP%    DTE-reload bit is set, or primary protocol is not
                       running.
   14        C11IE%    Insufficient exec virtual memory.
   15        C11IL%    Illegal packet length.
   16        C11NC%    CPU is not running.
   17        C11IT%    Illegal type code specified.
   20        C11IP%    Illegal port number specified.
   21        C11DL%    No DL10 support in this monitor.
   22        C11DT%    No DTE support in this monitor.
   23        C11KD%    No KDP support in this monitor.
|  24        C11DM%    No DMR support in this monitor.






















                                   22-21
                             CHGPPN [CALLI 74]


   22.7  CHGPPN [CALLI 74]

   FUNCTION

   Changes the project-programmer number (PPN) for the current job.  This
   call  is  reserved  for  the  exclusive  use  of  the LOGIN and INITIA
   programs.

   CALLING SEQUENCE

             MOVE      ac,[XWD projno,progno]
             CHGPPN    ac,
               error return
             skip return

   In the calling sequence, you  can  supply  projno,progno  as  the  new
   project-programmer number (PPN).

   SKIP RETURN

   The PPN for the current job is changed to the given number.  This call
   always  takes  the  skip  return  when  the calling program has [1,2],
   JACCT, or POKE privileged, or if the program has CHGPPN privileges  as
   set by MONGEN.

   ERROR RETURN

   Occurs if the calling job is already  logged  in,  or  if  either  the
   project or programmer number is zero.  The ac is unchanged.

   EXAMPLE

             MOVE      T1,[XWD 27,5031]
             CHGPPN    T1,
               JRST ERROR

   This code sequence changes the PPN for the current job to 27,5031.

   RELATED CALLS

         o  GETPPN

         o  LOGIN











                                   22-22
                             CHKACC [CALLI 100]


   22.8  CHKACC [CALLI 100]

   FUNCTION

   Determines whether a file may be accessed, based on your job's current
   PPN  and  the  file  access protection code.  Your programs should not
   make assumptions concerning the access codes associated with  a  file;
   they  should  use  the  CHKACC  monitor call to determine if access is
   permitted to that  file.   This  is  especially  true  for  privileged
   programs   that   are  constrained  by  the  access  privileges  of  a
   non-privileged project-programmer number for which they are performing
   a task.

   The CHKACC call does  not  function  correctly  on  systems  that  are
   running  a file daemon program, such as FILDAE.  So, if your system is
   running  a  FILDAE   type   program,   use   the   FILOP. call.    The
   FILOP. monitor  call  allows  a  privileged program to specify that an
   operation is to be performed only when the operation would be legal if
   performed  by  a  specified project-programmer number.  In most cases,
   the FILOP.  function eliminates the need for the CHKACC monitor  call.
   New  programs  should  be  written  using  the FILOP. "in your behalf"
   capability (.FOPPN).

   CALLING SEQUENCE

             MOVEI     ac,addr
             CHKACC    ac,
               error return
             skip return
             . . .
   addr:     XWD       fcn-code,<ufdprot>B26+<filprot>B35
             XWD       projno,progno ;For file
             XWD       projno,progno ;For accessing program

   In the calling sequence, you can provide the following information:

         o  addr is the address of the argument block.

         o  fcn-code is one of the function codes described below.

         o  ufdprot is a directory protection code.

         o  filprot is a file protection code.

         o  projno,progno is a project-programmer number (PPN).

                                    NOTE

           When your program specifies Function codes  0  through
           6, the monitor ignores the directory protection.  When
           your program specifies function codes 7  and  10,  the
           monitor ignores the file protection.


                                   22-23
                             CHKACC [CALLI 100]


   The function codes and their meanings are:

   Code      Symbol    Access

                       Checks whether your job can:
   0         .ACCPR    change the protection for the file.

   1         .ACREN    rename the file.

   2         .ACWRI    write the file.

   3         .ACUPD    update the file (in old update mode).

   4         .ACAPP    append to the file.

   5         .ACRED    read the file.

   6         .ACEXO    execute the file.

   7         .ACCRE    create the file in the user's UFD.

   10        .ACSRC    read the directory as a file.

   The right to access a file is determined by:

         o  The type of access desired.

         o  The project-programmer number of the user desiring access to
            the file.

         o  The project-programmer number of the directory containing the
            file.

         o  The protection field of the file or the protection field of
            the directory.

   Note that access to  a  file  is  not  dependent  on  the  file  name.
   However, the file name is needed if your program is going to perform a
   LOOKUP.

   The owner of a UFD or an SFD can always read  the  UFD  or  SFD  as  a
   directory.

   SKIP RETURN

   The monitor returns 0 in the ac if access to the file is  allowed,  or
   -1 if access is not allowed.







                                   22-24
                             CHKACC [CALLI 100]


   ERROR RETURN

   The ac is unchanged; this occurs only if you gave an invalid  function
   code or CHKACC is not implemented on your system.

   EXAMPLE

   The following code checks to see if the user logged in as [11,315] can
   change a file with protection <055> in the directory area [27,5031].

             MOVEI     T1,ARGLST
             CHKACC    T1,
               JRST    ERROR
             JRST      CONTIN
   ARGLST:   XWD       .ACCPR,<775>B26+<055>B35
             XWD       27,5031   ;For files
             XWD       11,315    ;For accessing program

   RELATED CALLS

   FILOP.

   COMMON PROGRAMMING ERRORS

   Assuming that the CHKACC call grants access to a file.  Remember  that
   it  only  tests  the accessibility of the file.  FILDAE can still deny
   access to the file on a LOOKUP, ENTER, RENAME,  or  FILOP. call.   The
   File Daemon program is described in Appendix B.


























                                   22-25
                             CHTRN. [CALLI 223]


   22.9  CHTRN.  [CALLI 223]

   FUNCTION

   CHTRN.  is used to translate characters  from  one  representation  to
   another.    For  instance,  CHTRN.   may  be  used  to  convert  8-bit
   characters to 7-bit characters.

   CALLING SEQUENCE

             XMOVEI    ac,addr
             CHTRN. ac,
               error return
             skip return

   addr:     XWD       flags, source count
             EXP       source byte pointer (first word)
             EXP       source byte pointer (second word)
             XWD       reserved, destination count
             EXP       destination byte pointer (first word)
             EXP       destination byte pointer (second word)

   In the calling  sequence,  you  specify  addr,  the  location  of  the
   argument list.  Suppy the argument list in the following format:

   Word      Symbol    Contents

   0         .CHFLG    Bits 0-17 (CH.FLG)  contain  the  flags  described
                       below.

             .CHSCT    Bits 18-35  (CH.SCR)  contain  the  source  count,
                       which  is  the  number  of  bytes stored where the
                       source byte pointer indicates.

   1         .CHSB1    The source byte pointer is a two-word byte pointer
                       to  the  location where the characters are stored.
                       This is the first word.

   2         .CHSB2    This  is  the  second  word  of  the  source  byte
                       pointer.

   3         .CHDCT    destination count is the number of bytes available
                       at  the  location  the  destination  byte  pointer
                       indicates.

   4         .CHDB1    destination  byte  pointer  is  a  two-word   byte
                       pointer  to  the  buffer  reserved for storing the
                       translated characters.  This is the first word.

   5         .CHDB2    This is the second word of  the  destination  byte
                       pointer.



                                   22-26
                             CHTRN. [CALLI 223]


   The flag bits are:

   Flag      Symbol    Meaning

   0         CH.FBR    Fallback representation (translates 8-bit to
                       7-bit).
   1         CH.OVR    Includes overprinting in the fallback
                       representation.
   2         CH.RAI    Changes lower case to upper case.
   3         CH.6BT    Converts ASCII characters to SIXBIT.
   4         CH.IGN    Ignores extra bits; does not range-check
                       characters.
   5         CH.ESC    Maps 7-bits ESCape sequences to 8-bit wherever
                       possible.
   6         CH.X6B    Expands SIXBIT source to ASCII destination.
|            CH.ISO    Uses ISO Latin Alphabet number 1 instead of
|                      DEC/MCS.

   SKIP RETURN

   The ac is unchanged.  The monitor returns the  byte  pointers  in  the
   argument  list  with  all  indirection  and indexing resolved.  If you
   specify one-word global byte pointers, the pointers will  be  expanded
   from one-word global format to two-word global format.

   ERROR RETURN

   One of the following codes is returned in the ac:

   Code      Symbol    Error

   1         CHADC%    Address check while reading or writing arguments.
   2         CHBYP%    Illegal byte pointer.
   3         CHINV%    Unknown or reserved flag bit specified.
   4         CHILC%    Illegal character encountered during translation.
   5         CHDCE%    Destination count exhausted prematurely.
   6         CHIBC%    Invalid bit combination specified.

















                                   22-27
                             CLOSE [OPCODE 070]


   22.10  CLOSE [OPCODE 070]

   FUNCTION

   Terminates transmission of data to or from a file.   Closes  the  file
   for  both  input  and output.  The default functions of the CLOSE call
   for unbuffered data modes are:

         o  The output side of the channel is closed.  In unbuffered data
            modes, the effect is to execute a device-dependent function.

         o  The input side of the channel is closed.  The end-of-file
            flag is cleared.  Further actions depend on the data mode.
            The effect is to execute a device-dependent function.

   In buffered data modes, the following operations are performed on the
   output side of the channel:

         o  All data in the buffers that have not been transmitted to the
            the device is written to the device.

         o  Device-dependent functions are performed.

         o  The ring use bit is set to 1, indicating that the ring is not
            in use.

         o  The buffer byte count, the third word of the buffer header,
            is set to 0.

         o  Control returns to the user program when transmission is
            complete.

   In buffered data  modes,  if  a  ring  buffer  exists,  the  following
   operations are performed to close the input side of the channel:

         o  The monitor waits until the device is inactive.

         o  The use bit of each buffer is cleared, to indicate that the
            buffer is empty.

         o  The use bit of the buffer ring is set to 1, to indicate that
            the ring is not in use.

         o  The buffer byte count is set to 0.

         o  Control returns to the user program.

   If a file is being written to disk at the time of  the  output  CLOSE,
   the  unwritten blocks at the end of the disk file are deallocated.  On
   input CLOSE, the access date of a disk file is updated if any data was
   actually  read.   (LOOKUP followed by CLOSE does not change the access
   date.)


                                   22-28
                             CLOSE [OPCODE 070]


   If the file is being output to  the  card  punch,  the  last  card  is
   punched,  followed  by an end-of-file card.  This end-of-file card and
   the header card contain the file identification  punch  in  column  1,
   which is ignored by the card reader service routine.

   If a file is being output to magtape, two EOF marks  are  written  and
   the tape position is backspaced over one EOF.

   If a file is being output to the line printer, a  form-feed  character
   is appended to the last block of data.

   CALLING SEQUENCE

             CLOSE     channel,flags
             return

   In the calling sequence, you can supply the following information:

         o  channel is the channel number for the file.

         o  flags are one or more of the function flags described below.

   The function flags and their meanings are:

   Bits      Symbol    Function

   29        CL.DAT    Deletes the name block and access tables from  the
                       disk  data  base  and  the  space  is  returned to
                       monitor free core.  For example, this function  is
                       used by BACKUP on a RESTORE operation.

   30        CL.RST    Inhibits deletion of the original  file,  if  any,
                       for  an  ENTER call that creates or supersedes the
                       file.  The new copy of the file is discarded.

   31        CL.NMB    Inhibits deletion of the  name  block  and  access
                       tables   in   monitor  memory;  this  function  is
                       effective only if a LOOKUP call was  executed  for
                       the  channel, but no subsequent INPUT call for the
                       channel was executed.

   32        CL.ACS    Prevents updating of the file  access  date.   For
                       example,  this  feature is used by BACKUP, to save
                       files on magtape  without  changing  their  access
                       dates.

   33        CL.DLL    Inhibits deallocation of any unwritten  blocks  at
                       the end of a disk file.

   34        CL.IN     Inhibits closing of the input side of the channel.

   35        CL.OUT    Inhibits  closing  of  the  output  side  of   the
                       channel.

                                   22-29
                             CLOSE [OPCODE 070]


   RETURN

   The function is performed.

   EXAMPLE

   See Chapter 11, Monitor Calls Manual Vol. 1.

   RELATED CALLS

         o  ENTER

         o  FILOP.

         o  LOOKUP

         o  RENAME





































                                   22-30
                            CLRBFI [TTCALL 11,]


   22.11  CLRBFI [TTCALL 11,]

   FUNCTION

   Clears text from the terminal input buffer.  This call is  often  used
   to  clear  any  further user commands when an error occurs; otherwise,
   incorrect processing (due to user type-ahead) could follow the error.

   CALLING SEQUENCE

             CLRBFI
             return

   RETURN

   All text is cleared from the input buffer.

   RELATED CALLS

         o  CLRBFO

         o  TTCALLs

         o  TRMOP.






























                                   22-31
                            CLRBFO [TTCALL 12,]


   22.12  CLRBFO [TTCALL 12,]

   FUNCTION

   Clears the terminal output buffer.   This  monitor  call  is  normally
   equivalent to typing CTRL/O.

   CALLING SEQUENCE

             CLRBFO
             return

   RETURN

   The terminal output buffer is cleared.

   RELATED CALLS

         o  CLRBFI

         o  TTCALLs

         o  TRMOP.































                                   22-32
                             CLRST. [CALLI 134]


   22.13  CLRST.  [CALLI 134]

   FUNCTION

   Clears or sets the I/O status bits for a device.   This  enables  your
   program  to  continue after an I/O error has occurred.  The CLRST. UUO
   functions like SETSTS, taking the list of devices and I/O status  bits
   for  each  device,  with the additional ability to specify devices not
   explicitly OPENed on an I/O channel.

   You can examine the current setting of the I/O status  bits  by  using
   the SENSE. monitor call.

   CALLING SEQUENCE

             MOVE      ac,[XWD len,addr]
             CLRST.    ac,
               error return
             skip return
             . . .
           / SIXBIT/device/  \
   addr:  |  EXP       channo | 
           \ EXP       udx   /
   addr+1:   XWD       0,setsts-value
           / SIXBIT/device/  \
   addr+2:|  EXP       channo |
           \ EXP       udx   /
   addr+3:   XWD       0,setsts-value
   . . .

   In the calling sequence, you can supply the following information:

         o  len is the length of the argument list.

         o  addr is the address of the argument list, containing  one  or
            more  2-word  entries.   Each  two-word  entry  contains  the
            following information:

         o  In the first word  of  the  pair  (.CLRSX),  store  a  device
            specification, in the form of a SIXBIT device name, channo as
            a channel number, or the device udx.

         o  In  the  second  word  of  the  pair  (.CLRST),   store   the
            setsts-value,  or  the  halfword value of the I/O status bits
            for the given device, channel, or udx.  This  word  specifies
            the new settings for the I/O status bits.

   Your program can clear the I/O status bits for more than  one  device.
   The argument block contains a 2-word entry for each device.





                                   22-33
                             CLRST. [CALLI 134]


   For a complete list of I/O status bits, see Chapter 11.  Each type  of
   device has a unique set of I/O status bits, which are described in the
   chapter about the appropriate device.

   SKIP RETURN

   The I/O status bits for each specified device are cleared  or  set  as
   specified.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         CLRID%    Illegal device specified.
   2         CLRNO%    Specified device does not belong to your job.

   EXAMPLE

             MOVE      T1,[XWD <CONTIN-ARGLST>,ARGLST]
             CLRST.    T1,
               JRST ERROR
             JRST      CONTIN
   ARGLST:   SIXBIT    /DTA0/
             EXP       0
             EXP       CHANNO
             EXP       0
               . . .
   CONTIN:

   This code sequence clears the I/O status bits for DTA0 and the  device
   associated with the channel whose number is the value of CHANNO.

   RELATED CALLS

         o  ERLST.

         o  GETSTS

         o  SENSE.

         o  SETSTS











                                   22-34
                             CMAND. [CALLI 211]


   22.14  CMAND.  [CALLI 211]

   FUNCTION

   Defines commands that run  specified  programs,  and  manipulates  the
   job's  user-defined  command list.  In the argument list to this call,
   your program defines a command name that,  when  typed  as  a  monitor
   command, will run the program specified by the file specification that
   is also included in the command list.  The CMAND. UUO  allows  you  to
   define  multiple command names in the argument list, and allows you to
   read the command list that is already defined for your job.

   CALLING SEQUENCE

             MOVE      ac,[XWD fcn-code,addr]
             CMAND.    ac,
               error return
             skip return
   addr:     argument-list

   In the calling sequence, you can supply the following information:

         o  fcn-code is the function code.  The function codes are listed
            in the following sections.

         o  addr is the address of the argument list.  The argument  list
            for  each function code is described in the following list of
            function codes.



   22.14.1  FUNCTION 0 (.CMINT)

   Initializes (clears) any current command definitions and creates a new
   command  list as specified at addr.  The argument list stored at addr,
   you  supply  the  command  flags,  the  command  name,  and  the  file
   specification of the program to run when the command is invoked.

   The argument list for this function is formatted as follows:

   Word      Symbol    Contents

   0         .CMFLA    In the  left  half,  one  or  more  of  the  flags
                       described  below.   In  the  right  half (CM.COU),
                       store the length of this definition.
   1         .CMNAM    Command name
   2         .CMDVC    Device name
   3         .CMFLE    File name
   4         .CMEXT    File extension
   5         .CMPPN    Project-programmer number
   6         .CMSFD    First SFD name
   7-10                Remaining SFD names


                                   22-35
                             CMAND. [CALLI 211]


   In argument list, you can supply the following flags to  indicate  the
   number  of  characters in the command that must be input to define the
   command uniquely.  The flags are:

   Mask      Symbol    Meaning

                       Command is uniquely identified by the:
   10B17     CM.UN1    first character of its name.

   4B17      CM.UN2    first two characters.

   2B17      CM.UN3    first three characters.

   1B17      CM.UN4    first four characters.

                       Command is:
   1B12      CM.AUT    defined as automatically saving the job's  current
                       context.   The  command will create a new context,
                       in  which  the  called  program  will  run.    The
                       original  context  is  restored  when  the program
                       terminates.

   You can define more than one command by including a command block  for
   each  command,  and storing them in contiguous blocks.  The last word,
   where the next .CMFLA might be expected, must be set to zero.



   22.14.2  FUNCTION 1 (.CMADD)

   Adds one or more command definitions to the current command list.  The
   argument block for this function is identical to that used by Function
   0 (.CMINT).



   22.14.3  FUNCTION 2 (.CMDEL)

   Deletes one  or  more  commands  from  the  current  list  of  defined
   commands.  The argument list for this function is formatted as:

   Word      Symbol    Contents

   0         .CMSIZ    Length of the argument list
   1         .CMCMN    Command name to be deleted
   n                   More command names.








                                   22-36
                             CMAND. [CALLI 211]


   The length of the argument list is equal to the entire length  of  the
   argument  list,  including  .CMSIZ.   The  commands  to be deleted are
   listed in the following words, and each  must  be  equivalent  to  the
   .CMNAM  word where the command was defined (see .CMINT argument list).
   Note that commands in the command list that  are  not  listed  in  the
   .CMDEL argument list are not affected by this function.



   22.14.4  FUNCTION 3 (.CMLST)

   Lists all the currently defined command names.  The argument list  for
   this function is formatted as:

   addr:     length
             BLOCK length-1

   In the argument list, you supply the following information:

         o  length is the length of the argument block

         o  length-1 is the number of commands to return.

   On a successful skip return, the argument block appears as:

   Word      Symbol    Contents

   0         .CMSIZ    Length of returned list
   1         .CMNAM    First command in the list
   n                   Remaining commands in the list

   The monitor returns, in .CMSIZ, the total number of defined  commands.
   The  command  names  are returned starting at .CMNAM.  If the reserved
   block is not long enough, the list of command names is limited to  the
   reserved space.



   22.14.5  FUNCTION 4 (.CMRET)

   Returns information about a command.  You must  include  the  argument
   list as:

   Word      Symbol    Contents

   0         .CMSIZ    Length of argument list
|  1         .CMCMN    Command name for which information is to be
|                      returned.






                                   22-37
                             CMAND. [CALLI 211]


   In this argument list, specify the length of the block to be  returned
   in  .CMSIZ,  and the name of the defined command for which information
|  is desired, in .CMCMN.  The information is returned in the form  of  a
|  command  block  (same  as  argument  list for .CMINT), for the command
   name.



   22.14.6  FUNCTION 5 (.CMDMP)

   Dumps the entire command definition data base.  This function uses the
   following argument list:

   Word      Symbol    Contents

   0         .CMSIZ    Length of argument list
   1-n                 BLOCK length-1 to reserve space to return
                       information.

   After the call returns successfully, a list of all the command  blocks
   for  defined  commands  will  be  returned  starting  at  Word 1.  See
   Function 0 (.CMINT) for the format of  the  returned  command  blocks.
   Note  that  the  last command block will be followed by a zero word to
   indicate the end of the command list.

   SKIP RETURN

   The state of a return from CMAND. UUO is described for  each  function
   listed above.

   ERROR RETURN

   On an error return, the  CMAND. UUO  takes  the  non-skip  return  and
   returns the appropriate code from the following list of error codes:

   Code      Symbol    Error

   1         CMIAL%    Your program specified an illegal  argument  list.
                       The  argument  list  length was either too long or
                       too short.
   2         CMADC%    Address check occurred.
   3         CMNER%    Not enough room to define commands in  your  job's
                       per-process space.
   4         CMDNF%    Your program did not finish  reading  the  command
                       list.  The buffer size you allowed at addr was not
                       enough  to  contain  all  the  information  to  be
                       returned.
   5         CMNSN%    No such command  name.   On  a  .CMRET  or  .CMDEL
                       function,  you  specified  a  command  that is not
                       defined.




                                   22-38
                             CMAND. [CALLI 211]


   EXAMPLE

             MOVE AC,[XWD .CMADD,CMBLK]
             CMAND. AC,
               error return
             skip return         ;Command has been defined
              . . .
   CMBLK:    CM.UN3!6            ;/UNIQUE:3, and 6 words in block
             SIXBIT /XDDT/       ;Command name
             SIXBIT /DSKA/       ;Device name
             SIXBIT /DDT/        ;File name
             EXP 0               ;Extension (assumed to be EXE)
             XWD 1,4             ;PPN

   This  coding  sequence  will  define   the   XDDT   command   to   run
   DSKA:DDT[1,4].

   COMMON PROGRAMMING ERRORS

   Assuming that .CMFLA in .CMINT or .CMADD specifies the length  of  the
   entire argument list.

































                                   22-39
                             CNECT. [CALLI 130]


   22.15  CNECT.  [CALLI 130]

   FUNCTION

   Connects or disconnects a device associated with an MPX channel.   You
   can   use   CNECT. only   with   devices   that  are  MPX-controllable
   (specifically,  terminals,  pseudo-terminals,  line   printers,   card
   readers, paper tape punches, and remote data terminals).

   CALLING SEQUENCE

             MOVEI   ac,addr
             CNECT.  ac,
               error return
             skip return
             . . .
   addr:     XWD     fcn-code,channel
           / SIXBIT  /device/ \
           \ EXP     udx      /

   In the calling sequence, you can supply the following variables:

         o  addr is the address of the argument block.

         o  fcn-code is one of the function codes described below.

         o  channel is the number of an initialized MPX channel.

         o  device is the SIXBIT physical, generic, or logical name of a
            device.

         o  udx is the Universal Device Index for the device.

   Your program must initialize an MPX channel for the  device  using  an
   OPEN  call,  before  using the CNECT. call to connect the device to an
   MPX channel.  The device must be initialized and connected to the  MPX
   channel before it can be used for any I/O.

   The function codes and their meanings are:

   Code      Symbol    Function

   1         .CNCCN    Connects the device to an MPX channel.

   2         .CNCDC    Equivalent to CLOSE and disconnect from MPX
                       channel.

   3         .CNCDR    Equivalent to RESET and disconnect from MPX
                       channel.

   4         .CNOFE    Determines output feasibility.



                                   22-40
                             CNECT. [CALLI 130]


   SKIP RETURN

   The specified device is connected, disconnected, reset, and/or closed,
   as  appropriate for the given function code.  For the .CNCCN function,
   the Universal Device Index for the device is returned in the ac.

   For the .CNOFE function, two values are returned in the ac.  The  left
   half of the ac contains the user address of the current output buffer,
   or 0 if none.  The right half of the ac contains the  number  of  data
   requests  for  a network device (except terminals, which return a 1 if
   output is possible), 0 if there are no data requests for  the  network
   device,  or  -1  if  the device is local.  The number of data requests
   indicates the number of buffers that  the  remote  device  can  accept
   before your job will block in output wait state.

   Your program can perform an output UUO to the device if the left  half
   of the ac contains 0 and the right half is non-zero.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         CNCNM%    MPX channel not initialized.
   2         CNCUD%    Nonexistent device.
   3         CNCCM%    Illegal device for MPX.
   4         CNCNF%    Not enough memory for control blocks.
   5         CNCNC%    Device not connected.
   6         CNCNO%    Device illegal or not initialized.
   7         CNCII%    Invalid Universal Device Index.
   10        CNCUF%    Invalid function code.
   11        CNCDU%    Device is not available to your job.
   12        CNCSD%    Device is spooled; not MPX-controllable.

   EXAMPLE

             MOVEI     T1,ARGLST
             CNECT.    T1,
               JRST ERROR
             JRST      CONTIN
              . . .
   ARGLST:   XWD       .CNCDC,CHANNO
             SIXBIT    /TTY111/

   This code sequence disconnects the device TTY111, which is  associated
   with the MPX channel given by CHANNO, from an MPX channel.







                                   22-41
                              CORE [CALLI 11]


   22.16  CORE [CALLI 11]

   FUNCTION

   Allows your  program  to  dynamically  expand  or  contract  its  core
   allocation  in  either  or  both  segments.   Note that neither of the
   segments may be locked in core.

   The program with JACCT privileges  expands  the  segment  in  physical
   memory.   A  program  without  JACCT  privileges  must  use  UU.PHY to
   indicate physical addressing.

   CALLING SEQUENCE

             MOVE      ac,[XWD hiseg,lowseg]
             CORE      ac,flag
               error return
             skip return

   In the calling sequence, you can supply the following variables:

         o  hiseg is the highest relative  address  to  be  used  in  the
            program's  high  segment.   If hiseg = 0, the core assignment
            for the high segment is left unchanged.

         o  lowseg is the highest relative address  to  be  used  in  the
            program's  low  segment.   If lowseg = 0, the core assignment
            for the low segment is left unchanged.

         o  flag is the physical flag bit (UU.PHY) to indicate  that  the
            core  assignment  applies  to  physical memory.  Refer to the
            CALLI UUO for more information.

   Note that if the CORE UUO is executed in a non-zero section, all  core
   address  arguments  will  be  interpreted  as section-relative values.
   That is, all references are assumed to  be  relative  to  the  current
   section.

   If you give a non-zero hiseg that is less than 400000 or the length of
   the   low   segment  (whichever  is  greater),  the  high  segment  is
   eliminated.  Doing this from the high segment causes an illegal memory
   reference.

   If your program has no high segment, or if you give a CORE  call  that
   eliminates  the  high segment, you can create a new, non-sharable high
   segment by giving hiseg greater than 400000.  You  can  make  the  new
   high segment sharable by doing the following:

         o  Giving it a .EXE extension.

         o  Writing it onto a storage device.



                                   22-42
                              CORE [CALLI 11]


         o  Closing the file.

         o  Using the SSAVE monitor command, or the  SAVE. UUO  with  the
            SS%SSH flag, to save the entire core image.

         o  Initializing the program  with  a  GET,  R,  or  RUN  monitor
            command, or with a RUN, MERGE., or GETSEG monitor call.

   If you use the CORE monitor call giving a value  for  lowseg  that  is
   less  than  or  equal to .JBREL, the monitor removes any noncontiguous
   pages from your address space; these pages may include the page  fault
   handler  (PFH) or VMDDT.  To avoid this, use the PAGE. monitor call to
   choose only the needed pages.

   Before expanding core, you should compare the highest required address
   with  the highest legal address (stored in .JBREL).  The example below
   shows how to expand core only if necessary.

   You can specify the beginning of your program's high segment by  using
   the  REMAP monitor call, the /NEWPAGE or /SET switches to LINK, or the
   TWOSEG pseudo-op to MACRO.

   SKIP RETURN

   The ac contains  the  current  virtual  memory  limit  in  1K  blocks.
   However,  if  the CORE monitor call is issued from a non-zero section,
   the virtual memory limit is not returned in the ac.

   ERROR RETURN

   The error return occurs if any of the following conditions occurs:

         o  You give hiseg  a  value  less  than  400001  (or  the  hiseg
            origin), but you do not have write-access privileges.

         o  You give both hiseg and lowseg as zero.  In  this  case,  the
            number of free 1K blocks is returned in the ac.

         o  The sum of the requested new low segment and  the  previously
            existing  high  segment  exceeds  your  allowed program size.
            Core assignment is not changed; the maximum  allowed  program
            size (in 1K blocks) is returned in the ac.

         o  The sum of the requested new low and  high  segments  exceeds
            your  allowed  program size.  Core assignment is not changed;
            the maximum allowed program size (in 1K blocks)  is  returned
            in the ac.

         o  You give a lowseg argument that would extend the low  segment
            into the high segment.

         o  One or both segments are locked.


                                   22-43
                              CORE [CALLI 11]


   EXAMPLE

             MOVE      T1,NEWSIZ ;Set up for call
             PUSHJ     P,CHKCOR  ;Call for core
             JRST      CONTIN

             ;Subroutine to get core only if needed

   CHKCOR:   CAMG      T1,.JBREL##         ;Core size OK?
             POPJ      P,        ;Yes
             CORE      T1,       ;Get more core
               JRST    ERROR     ;To error routine
             POPJ      P,        ;Core increase OK

   RELATED CALLS

         o  PAGE.

         o  SEGOP.



































                                   22-44
                             CTLJOB [CALLI 65]


   22.17  CTLJOB [CALLI 65]

   FUNCTION

   Obtains the number of the job that is controlling a specified  subjob.
   The subjob must be attached to a pseudo-terminal.

   CALLING SEQUENCE

             MOVEI     ac,jobno
             CTLJOB    ac,
               error return
             skip return

   In the calling sequence, you supply jobno, which is the number of  the
   controlled job, or -1 to specify your current job.

   SKIP RETURN

   The number of the controlling job is returned in the ac.  If  the  job
   given  by  jobno  is  not  controlled  by a pseudo-terminal (PTY), the
   number returned in the ac is -1.

   ERROR RETURN

   Occurs if the job number is illegal.

   EXAMPLE

             MOVNI     T1,1
             CTLJOB    T1,
               JRST    ERROR

   This code sequence returns the number of the controlling job in T1.

   RELATED CALLS

   PJOB
















                                   22-45
                              CTX. [CALLI 215]


   22.18  CTX.  [CALLI 215]

   FUNCTION

   CTX.  allows  you  to  manipulate  contexts.   (For  a  discussion  of
   contexts,  see  Volume  1.)  Since the argument block of CTX. is never
   written by the monitor, it may reside in a write-protected page or  in
   a literal.

   CALLING SEQUENCE

             XMOVEI    ac,addr
             CTX.      ac
               error return
             skip return
   addr:     argument-list

   In the calling sequence, you  supply  addr  as  the  location  of  the
   argument  list.   The  argument  block  is  formatted in the following
   fashion:

          0   1---------8  9------17  18----------------------35 
        +=======================================================+
        | P |  Reserved  |  Length   |      Function code       |
        |-------------------------------------------------------|
        |                  Data buffer length                   |
        |-------------------------------------------------------|
        |                  Data buffer address                  |
        |-------------------------------------------------------|
        |                  SIXBIT context name                  |
        |-------------------------------------------------------|
        |         Reserved           |    RUN UUO offset        |
        |-------------------------------------------------------|
        |                 RUN UUO block address                 |
        |-------------------------------------------------------|
        |        TMPCOR length       |    SIXBIT name           |
        |-------------------------------------------------------|
        |                 TMPCOR buffer address                 |
        +=======================================================+

   The format of the argument block is:

   Word      Symbol    Contents

   0         .CTFNC    The function code word.  It also contains  one  of
                       the   following  flags,  and  the  length  of  the
                       argument block, in the following format:

                       Bits      Symbol    Meaning

                       0         CT.PHY    Physical-only RUN UUO.
                       1-8                 Reserved for DIGITAL.


                                   22-46
                              CTX. [CALLI 215]


                       9-17      CT.LEN    Specifies the length of the
                                           argument block, including
                                           .CTFNC.
                       18-35     CT.FNC    Contains one of the function
                                           codes listed below.

   1         .CTDBL    Holds  the  data  buffer  length  in  words.   510
                       decimal words is the maximum.

   2         .CTDBA    Contains the  full  30-bit  address  of  the  data
                       buffer.   If  the IFIW (sign bit) is on, a section
                       local address, relative to the  section  CTX.   is
                       executed in, is referenced.

   3         .CTNAM    Used to hold a context name when  creating  a  new
                       context.   When  manipulating  contexts, this word
                       may contain a context name or context number.

   4         .CTRNO    (RUN UUO word) This holds the  offset  that  would
                       normally  go  into  the  left  half of the RUN UUO
                       accumulator  (0  for  terminal  input,  or  1  for
                       indirect command file input).

   5         .CTRNB    Holds  the  30-bit  block   address   that   would
                       ordinarily  go  into the right half of the RUN UUO
                       accumulator.

   6         .CTTMN    Contains the TMPCOR length in the left half  (Bits
                       0-17), and its SIXBIT name in the right half (Bits
                       18-35).

   7         .CTTMB    Contains the 30-bit TMPCOR buffer address.

   Valid function codes you can specify for  .CTFNC  and  their  argument
   lists are described in the following sections.



   22.18.1  FUNCTION 0 (.CTSVH)

   Saves the current context and halts the job.  This has the effect of a
   PUSH command (refer to the TOPS-10 Operating System Commands Manual).

   The context created is inferior.  The inferior context is  deleted  as
   soon as you switch from it back to the superior one.









                                   22-47
                              CTX. [CALLI 215]


   22.18.2  FUNCTION 1 (.CRSVR)

   Saves the current context, and runs a program in an inferior  context.
   This  is  the  equivalent  of an auto-save, then a restore, at monitor
   level.



   22.18.3  FUNCTION 2 (.CVSVT)

   Creates a parallel context by saving the current one  and  creating  a
   new  top  level context.  The new context is different from one formed
   by a PUSH chain, as it is not inferior, nor is it  associated  with  a
   chain of PUSHed contexts.



   22.18.4  FUNCTION 3 (.CTSVS)

   Saves the current context, and switches to another (already  existing)
   parallel context.

   For instance, you could use .CTSVR to create a new context  running  a
   program,  and  switch  back to the previous context using .CTSVS.  You
   could later return to the context created by .CTSVR (using the  .CTSVS
   function),  and  restart  the program in that context, without waiting
   for it to re-initialize.



   22.18.5  FUNCTION 4 (.CTSVD)

   Switches to the specified context, deletes  it,  and  returns  to  the
   previous  (saved)  context.   You  need  to  specify this function for
   parallel contexts only,  since  inferior  contexts  are  automatically
   deleted when you return to its superior



   22.18.6  FUNCTION 5 (.CTRDB)

   Reads the data buffer without changing the information.   An  inferior
   context uses this to read data when a superior context passes to it.



   22.18.7  FUNCTION 6 (.CTWDB)

   Writes the data buffer.   An  inferior  context  writes  data  to  its
   superior  using this.  Once data has been written, the old data in the
   superior context is lost.



                                   22-48
                              CTX. [CALLI 215]


   22.18.8  FUNCTION 7 (.CTRQT)

   Reads the context quota and saved-page quota for a job.  The following
   data  buffer  is  returned  for  this  function  and  for  Function 10
   (.CTSQT).

   Word      Symbol    Contents

   0         .CTJOB    Job number, supplied by program.
   1         .CTCTQ    Returned context quota.
   2         .CTPGQ    Returned saved-pages quota.



   22.18.9  FUNCTION 10 (.CTSQT)

   Sets the context quota and saved-pages quota.  The  argument  list  is
   the same as the buffer returned for Function 7 (.CTRQT).



   22.18.10  FUNCTION 11 (.CTDIR)

   Returns a directory map of all contexts.  (GETTAB Table  175  (.GTCTX)
   word  %CTBDM  contains the byte pointer to the directory byte-stream.)
   The data buffer is returned in the following format:

   Offset    Symbol    Contents

   0         .CTJOB    Target job number.
   1         .CTWCT    Word count of byte-stream data.
   2         .CTFDW    First data word of the directory byte-stream.



   22.18.11  FUNCTION 12 (.CTINF)

   Returns information about a particular context.  The  data  buffer  is
   returned in the following format:

   Offset    Symbol    Contents

   0         .CTJOB    Target job number.
   1         .CTCNO    Number of target context.
   2         .CTCNM    Name of target context.
   3         .CTSNO    Superior context's number.
   4         .CTSNM    Superior context's name.
   5         .CTPGM    Program running or saved in target context, if
                       any.
   6         .CTITM    Idle time (in clock ticks).




                                   22-49
                              CTX. [CALLI 215]


   SKIP RETURN

   On all returns, the ac contains the following information:

   Bits      Symbol    Meaning

   0         CT.DAT    Set if data returned to the buffer.
   1         CT.DBT    Returned if the buffer is truncated.
   2         CT.ETX    Set if UUO error text in the buffer.
   3         CT.RUN    Set for a RUN UUO error.
   18-27     CT.RDL    Count of words returned in the buffer.
   28-35     CT.ERR    CTX.  or RUN UUO error code.  This code is
                       returned regardless of whether or not the data
                       buffer contains error text.

   On the skip return, no flags are set in the ac fields CT.ETX,  CT.RUN,
   and  CT.ERR.   If  any  information  is returned, it is stored in data
   buffers.

   ERROR RETURN

   The ac contains the information described for  the  skip  return.   An
   error code is returned in CT.ERR (Bits 28 through 35) If a data buffer
   is specified, error text is returned in the data buffer.

   Code      Symbol    Error

   0         CXIFC%    Illegal function code.
   1         CXACR%    Address check performed while reading arguments.
   2         CXACS%    Address check performed while storing answers.
   3         CXNEA%    Insufficient number of arguments.
   4         CXNLI%    User not logged in.
   5         CXLOK%    Program locked in core.
   6         CXDET%    Job detached.
   7         CXSCE%    System context quota exceeded.
   10        CXSPE%    System page quota exceeded.
   11        CXJCE%    Job context quota exceeded.
   12        CXJPE%    Job page quota exceeded.
   13        CXNCS%    Insufficient core to save context.
   14        CXNCD%    Not enough core to return data block.
   15        CXICN%    Illegal context number.
   16        CXNSC%    No superior context.
   17        CXNPV%    No privileges to set quotas.
   20        CXIJN%    Illegal job number.
   21        CXCSI%    Users cannot switch to an intermediate context.
   22        CXCDI%    Users cannot delete an intermediate context.
   23        CXCDC%    Users cannot delete the current context.
   24        CXCNP%    Context not privileged.
   25        CXNDA%    No data block is available.
   26        CXCCC%    Cannot create context from captive program.  (The
                       program has not issued a RUN UUO.)



                                   22-50
                             DAEFIN [CALLI 105]


   22.19  DAEFIN [CALLI 105]

   FUNCTION

   Indicates that a request to the DAEMON  program  has  been  completed.
   This  monitor  call  is  reserved  for the exclusive use of the DAEMON
   program.

   If the specified job  was  in  the  DAEMON  wait  state,  the  monitor
   requeues the specified job to the run queue.

   CALLING SEQUENCE

             MOVE      ac,[XWD length,addr]
             DAEFIN    ac,
               error return
             skip return
             . . .
   addr:     jobno

   In the calling sequence, you can specify the following information:

         o  length is the length of the argument block.

         o  addr is the address of the argument block.

         o  jobno is the number of the logged-in job to be restarted.

   SKIP RETURN

   The monitor leaves the ac unchanged, requeues the specified  job,  and
   clears the JDC bit in the job status word JBTSTS (refer to the TOPS-10
   Monitor Tables Descriptions).

   ERROR RETURN

   The monitor clears the ac.  This occurs if you are not privileged,  if
   the  job  number  is  illegal  or zero, or if the request could not be
   completed.

   EXAMPLE

             MOVE      T1, [XWD 1,ARGLST]
             DAEFIN    T1,
               JRST    ERROR
             JRST      CONTIN
   ARGLST:   EXP       JOBNO

   RELATED CALLS

   DAEMON



                                   22-51
                             DAEMON [CALLI 102]


   22.20  DAEMON [CALLI 102]

   FUNCTION

   Invokes the system program DAEMON.  When a  job  executes  the  DAEMON
   monitor  call, the monitor puts the job into JD wait (sets the JDC bit
   in the job table JBTSTS) and wakes DAEMON.  DAEMON examines the status
   word  .GTSTS  for each job in the system; for each job in the JDC wait
   state, DAEMON performs the requested  function.   When  the  specified
   function  has  been  completed, DAEMON issues a DAEFIN monitor call to
   make the job runnable.

   CALLING SEQUENCE

             MOVE      ac,[XWD length,addr]
             DAEMON    ac,
               error return
             skip return
             . . .
   addr:     EXP       fcn-code
             argument-list

   In the calling sequence, you can supply the following information:

         o  addr is the address of the argument block.

         o  fcn-code is the function  code  in  the  first  word  of  the
            argument block.

         o  argument-list depends on the function code.

   The function codes and argument lists are described in  the  following
   sections.



   22.20.1  FUNCTION 1 (Obsolete)



   22.20.2  FUNCTION 2 (.CLOCK)

   Enters a request in the clock queue to wake your job after a specified
   number  of  seconds  has  elapsed.   As  soon  as the request has been
   entered in the queue, you should issue a call to HIBER  with  no  time
   argument.   An  argument  of  zero clears the job's entry in the clock
   queue and wakes the job.

   The argument list for the .CLOCK function is:

   addr:     .CLOCK
             EXP       seconds


                                   22-52
                             DAEMON [CALLI 102]


   In this argument list, you supply seconds as the number of seconds
   before the job DAEMON should wake the program.  The preferred method
   for awakening the program after a short amount of time is by using the
   HIBER. call.



   22.20.3  FUNCTION 3 (Obsolete)



   22.20.4  FUNCTION 4 (.DMQUE)

   Reserved for use by DIGITAL.



   22.20.5  FUNCTION 5 (.DMERR)

   Makes an entry in the error file; the third and following words of the
   argument  block  are  written into the error file SYS:ERROR.SYS.  Your
   job must have JACCT or [1,2] privileges.

   The argument block for the .DMERR function is:

   addr:     .DMERR
             EXP       error-type
             argument-list

   In addr+1, error-type is the type of entry  to  be  entered  into  the
   sytem error file.  The error types you can supply are listed below.

   Words of data to be included in the error record  are  stored  in  the
   argument-list.


   Table 22-1:  Error File Entry Types

   ______________________________________________________________________

     Type    Symbol    Meaning
   ______________________________________________________________________

     1       .ESWHY    Answer to ONCE's "Why Reload" question, and
                       comment, if any.
     2       .ESMSE    Continuable stopcode.
     3       .ESMPE    KI memory parity error.
     4       .ESNXM    KI non-existent memory error.
     5       .ESCIN    Information extracted from a crash.
     6       .ESCPE    Channel-detected memory parity error or
                       non-existent memory.
     7       .ESDRE    DAEMON restarted.


                                   22-53
                             DAEMON [CALLI 102]


     10      .ESHDE    Hardware-detected device error.
     11      .ESMDE    Massbus device error.
     12      .ESDXE    DX20 device error.
     14      .ESSWE    Software event.  The events are:

                       Code      Symbol    Event

                       1         .SWEPK    POKE.  function.
                       2         .SWESN    SNOOP.  function.
                       3         .SWETP    TRPSET function.
                       4         .SWERT    RTTRP.  function.
                       5         .SWMS1    Miscellaneous debugging
                                           event number 1.
                       6         .SWMS2    Miscellaneous debugging
                                           event number 2.

|    15      .ESCSC    Configuration  status  change.   The   condition
|                      change codes are listed below:

                       Code      Symbol    Status Change

                       0         .CSCAT    Attach function
                       1         .CSCDT    Detach function.
                       2         .CSCXC    Exchange function.
                       3         .CSCTC    Date/time change.
                       4         .CSCCF    DETACH CPU function.
                       5         .CSCCO    ATTACH CPU function.
                       6         .CSCNF    Node off-line.
                       7         .CSCNO    Node on-line.
                       10        .CSCMO    Set memory on-line.
                       11        .CSCMF    Set memory off-line.

     16      .ESSLM    System log message.
     17      .ESDEB    Software requests data.
     21      .ESTAP    Magnetic tape errors (see TAPSER).
     30      .ESKLE    KL processor error data from RSX-20F front end.
     31      .ESFER    Front end reload.
     33      .ESHSB    KS processor halt status block.
     42      .ESTPS    Magnetic tape performance statistics  code  (see
                       TAPSER).
     43      .ESCFG    Maximum configuration in AVAIL.SYS.
     44      .ESMRV    Monitor run values in AVAIL.SYS.
     45      .ESDSC    Disk statistics (usually from a crash).
     46      .ESBAV    Beginning of AVAIL.SYS time stamp.
     47      .ESEAV    End of AVAIL.SYS time stamp.
     50      .ESDLE    DL10 hardware error.
     51      .ESKIP    KI parity/non-existent memory interrupt.
     52      .ESKLP    KL parity/non-existent memory interrupt.
     54      .ESKSN    KS non-existent memory trap.
     55      .ESKPT    KL/KS parity trap.
     56      .ESSNX    Non-existent memory scan.
     57      .ESSPR    Parity memory scan.


                                   22-54
                             DAEMON [CALLI 102]


     61      .ESKDT    KL data parity trap.
     62      .ESMOT    KL data parity interrupt.
     63      .ESCSB    CPU status block.
     64      .ESDSB    Device status block.
     67      .ESKAE    KL addressing failure.
     71      .ESLPT    Line printer error.
     72      .ESHCC    Hard copy controller entry.
     73      .ESULD    Microcode load.
     74      .ESCIE    CI disk error
|    75      .ESDVD    generic device dump.
     100     .ESDTC    Date/time change (obsolete).
     201     .ESNUS    Network utility started.
     202     .ESNDL    Network down-line load.
     203     .ESNUD    Network up-line dump.
     210     .ESNHE    Network hardware error.
     211     .ESNSE    Network software error.
     220     .ESNOE    Network operator entry.
     221     .ESNTC    Network topology change.
     230     .ESNLC    Network line counter.
     231     .ESNNS    Network node statistic entry.
     377     .ESHIA    Hiatus in ERROR.SYS.
     775     .ESOFF    Marker for first word of  block  as  pointer  to
                       start of first entry.
     777     .ESEOF    End-of-file flag.
   ______________________________________________________________________

   .DMERR is a privileged function; to use it you  must  have  the  JACCT
   privilege, or be logged in under [1,2].

                                    NOTE

           For a  complete  description  of  the  format  of  the
           SYS:ERROR.SYS  file,  refer  to  the  TOPS-10/20 SPEAR
           Reference Manual.



   22.20.6  FUNCTION 6 (.DMCTL)

   Reserved for use by DIGITAL.

   SKIP RETURN

   The monitor performs  the  specified  function  and  issues  a  DAEFIN
   monitor call to make the job runnable.  The ac is cleared.









                                   22-55
                             DAEMON [CALLI 102]


   ERROR RETURN

   If DAEMON is not running, control returns to the error return, but the
   ac is unchanged.

   If DAEMON is running, an error code is returned in the ac, and control
   returns to the error return.  The error codes and their meanings are:

   Code      Symbol    Error

   1         DMILF%    Illegal function code.
   2         DMACK%    Address check.
   3         DMWNA%    Incorrect number of arguments.
   4         DMSNH%    Impossible error.  If this occurs, please report
                       it to your Software Support Specialist.
   5         DMCWF%    File cannot be written.
   6         DMNPV%    Not enough privileges.
   7         DMFFB%    Incorrect format for FACT file entry.
   10        DMPTH%    Invalid path.

   EXAMPLE

             MOVE      T1,[2,,ADDR]
             DAEMON    T1,
               JRST ERROR
             JRST CONTIN
              . . .
   ADDR:     .CLOCK
             EXP       5

   This code queues a request for a WAKE.  UUO from the system DAEMON  on
   this job in 5 seconds.

   RELATED CALLS

   DAEFIN


















                                   22-56
                              DATE [CALLI 14]


   22.21  DATE [CALLI 14]

   FUNCTION

   Returns a code giving the system date.  The code is an  integer  given
   by the formula:

        code = 31[12(year-1964)+(month-1)]+(day-1)

   You can obtain the current day, month, and year using the formulas:

        day    =  mod(code,31)+1
        month  =  mod(code/31,12)+1
        year   =  (code/372)+1964

   The DATE call is equivalent to using GETTAB  to  obtain  item  %CNDAT.
   The  day,  month,  and year are stored in GETTAB items %CNDAY, %CNMON,
   and %CNYER, respectively.  Your program  can  avoid  the  computations
   needed  to interpret the data returned from the DATE call by GETTABing
   the specific items, but the efficient program  will  avoid  performing
   three  separate GETTAB calls by GETTABing %CNDAT and then dividing the
   data into its appropriate components.

   CALLING SEQUENCE

             DATE      ac,
             return

   EXAMPLE

   The following macro computes the current day, month, and year.

   DEFINE    CURDAT(DAY,MONTH,YEAR)<
             DATE      T1,
             IDIVI     T1,^D31
             ADDI      T2,1
             MOVEM     T2,DAY
             IDIVI     T1,^D12
             ADDI      T2,1
             MOVEM     T2,MONTH
             ADDI      T1,^D1964
             MOVEM     T1,YEAR
             >

   RELATED CALLS

   TIMER







                                   22-57
                             DEBRK. [CALLI 137]


   22.22  DEBRK.  [CALLI 137]

   FUNCTION

   Dismisses a PSI software interrupt, reenabling any conditions disabled
   by  the  interrupt.   See  Chapter  6 for a discussion of the software
   interrupt system.

   On a DEBRK.  monitor call, the monitor  scans  the  queue  of  pending
   interrupts,  looking  for conditions requiring service by an interrupt
   routine.  If one is found, the interrupt occurs and control passes  to
   the interrupt routine.  If no such condition is found, DEBRK. restarts
   the interrupted process beginning at the point within your  job  where
   the  interrupt  occurred  (usually  the  instruction  after  the  last
   instruction that was executed).

   CALLING SEQUENCE

             DEBRK.
               error return
             skip return

   SKIP RETURN

   The DEBRK. call normally returns to the location before the  interrupt
   occurred.   The  skip  return  is  taken  if  there is no interrupt in
   progress.  The PSI interrupt system is restored if the PS.VTO flag  is
   set in the PSI interrupt vector block (refer to PISYS.  UUO).

   ERROR RETURN

   The error return is taken if the DEBRK.  UUO is not implemented.

   RELATED CALLS

         o  PIBLK.

         o  PIINI.

         o  PIRST.

         o  PISAV.

         o  PISYS.










                                   22-58
                              DEQ. [CALLI 152]


   22.23  DEQ.  [CALLI 152]

   FUNCTION

   Dequeues one or more requests for enqueued resources, or  relinquishes
   ownership  of  one  or  more  enqueued resources.  See Chapter 8 for a
   discussion of the ENQ/DEQ facility.

   CALLING SEQUENCE

             MOVE      ac,[XWD function,argument]
             DEQ.      ac,
               error return
             skip return
   addr:     argument-list

   In the calling sequence, you provide the following information:

         o  function is one of the following function codes:

             -  .DEQDR to dequeue a lock request.

             -  .DEQDA to dequeue all lock requests for this job.

             -  .DEQID to  dequeue  all  lock  requests  related  to  the
                specified request-id.

         o  argument-list depends on the function code.

   Functions and their arguments are described in the following sections.



   22.23.1  FUNCTION 0 (.DEQDR)

   This function dequeues a specific request.  Specify this  function  by
   placing the following information into the ac:

        [XWD .DEQDR,addr]

   The argument addr is the address of the ENQ.  argument  block.   Refer
   to the ENQ. UUO for the format of this block.

   After a skip return, the monitor has  removed  the  specified  request
   from  the  specified  queue,  or  the  monitor  has dissolved the lock
   between the job and the specified resource.  The error return is taken
   if  you  set  up  the  call  in an incorrect format, or if you have no
   pending requests and you are not the owner of the specified  resource.
   On an error return, the monitor returns an error code in the ac.





                                   22-59
                              DEQ. [CALLI 152]


   22.23.2  FUNCTION 1 (.DEQDA)

   This function removes all of your requests for ownership and dissolves
   all  of  your  resource  locks.   Specify this function by placing the
   following information into the ac:

        [XWD .DEQDA,0]

   The error return is taken if  you  write  the  call  in  an  incorrect
   format,  or  if  you do not have any pending requests or locks.  On an
   error return, the monitor returns an error code in the ac.  You should
   perform  this  function  before EXITing; otherwise, when you perform a
   CLOSE, the function will fail but the nature of the  failure  will  be
   difficult to determine.  The monitor automatically performs the .DEQDA
   function when you issue a LOGOUT monitor call.



   22.23.3  FUNCTION 2 (.DEQID)

   This function requires the request-id in the right  half  of  the  ac.
   Specify  this  function  by placing the following information into the
   ac:

        [XWD .DEQID,request-id]

   The request-id is the request-identifier that you specify in the  ENQ.
   argument block.  Refer to the ENQ. UUO for more information.

   The  monitor  removes  all  requests  of  yours  with  the   specified
   request-id  from  resource queues, and it dissolves all locks of yours
   with the specified request-id.  You should specify this function  when
   you  are  dequeueing requests that were made in the same ENQ. argument
   block.  The error return  is  taken  if  you  have  set  up  the  call
   incorrectly,  if  you  have no pending requests, or if you are not the
   owner of a resource.

   SKIP RETURN

   The specified requests  are  dequeued  and  the  specified  locks  are
   dissolved.

   ERROR RETURN

   If an error is found in one of the requests in a multiple request DEQ.
   monitor  call,  the  error  return is taken and the monitor returns an
   error code  in  the  ac.   However,  the  ENQ/DEQ  facility  continues
   processing  until  all  of  the  dequeue requests have been performed.
   Therefore, the monitor will have dequeued all valid  requests  whether
   or  not  an  error  resulted  from another request in the same monitor
   call.  If errors are found in several requests  of  the  same  monitor
   call, the error code returned in the ac reflects the last error found.


                                   22-60
                              DEQ. [CALLI 152]


   If you specify that you want to dequeue a request or dissolve  a  lock
   associated  with  a  pooled resource, the monitor will return an error
   code if you attempt to dequeue more resources than you own within  the
   pool.   However,  you can dequeue a subset of those resources that you
   own within a pool, still retaining ownership  of  those  you  did  not
   dequeue.   Therefore,  you cannot dequeue more resources than you own,
   but you do not have to dequeue all that you own in one request.

   The error codes for the DEQ.  call are identical to those of the  ENQ.
   call.  They are listed in the description of the ENQ.  call.

   EXAMPLE

   DEQ. monitor calls that  specify  multiple  requests  are  treated  as
   multiple  DEQ. monitor  calls, each specifying a single request.  This
   is not true for the ENQ. monitor call.  For example:

             MOVE      T1 [XWD .DEQDR,DEQBLK]
             DEQ.      T1,
               JRST ERROR
             JRST      SUBR
   DEQBLK:   2,,^D8
             0,,400000
             0,,2
             POINT 7,[ASCIZ/TEST/]
             ^D10,,1
             0,,4
             POINT 7,[ASCIZ/TESER/]
             ^D10,,1

   The above code is, in effect, identical  to  the  following,  but  the
   following is less efficient:

             MOVE      T1,[XWD .DEQDR,DEQ1]
             DEQ.      T1,
               JRST ERROR
   DEQ:      MOVE      T1,[XWD .DEQDR,DEQ2]
             DEQ.      T1,
               JRST ERROR
             JRST      SUBR
   DEQ1:     1,,^D5
             0,,400000
             0,,2
             POINT 7,[ASCIZ/TEST/]
             ^D10,,1
   DEQ2:     1,,^D5
             0,,400000
             0,,4
             POINT 7,[ASCIZ/TESER/]
             ^D10,,1




                                   22-61
                              DEQ. [CALLI 152]


   RELATED CALLS

         o  ENQ.

         o  ENQC.

















































                                   22-62
                              DEVCHR [CALLI 4]


   22.24  DEVCHR [CALLI 4]

   FUNCTION

   Returns the physical characteristics of a specified device.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             DEVCHR    ac,
             return

   In the calling sequence, you can provide the following information:

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   RETURN

   If the device is not found, or if your program has not initialized the
   device,  the  monitor clears the ac.  Otherwise, the ac contains flags
   giving the physical characteristics of  the  device.   The  flags  and
   their meanings are:

   Bits      Symbol    Device or Mode

    0        DV.DRI    DECtape whose directory  is  in  memory;  you  can
                       clear  this  bit  by using the REASSI monitor call
                       for the device.

    1        DV.DSK    Disk.

    2        DV.CDR    Card device.  If  DV.IN  is  set,  it  is  a  card
                       reader; if DV.OUT is set, it is a card punch.

    3        DV.LPT    Line printer.

    4        DV.TTA    Terminal that is currently controlling a job.

    5        DV.TTU    Terminal that is in use.

    6        DV.2IO    Device can do input and output at the same time.

    7        DV.DIS    Special display device.  Note that this  does  not
                       indicate the "display" terminal characteristic.




                                   22-63
                              DEVCHR [CALLI 4]


    8        DV.LNG    Device with long dispatch table; this  means  that
                       monitor calls other than INPUT, OUTPUT, CLOSE, and
                       RELEAS can perform real functions.

    9        DV.PTP    Papertape punch.

    10       DV.PTR    Papertape reader.

    11       DV.DTA    DECtape.

    12       DV.AVL    The device is available or  is  assigned  to  your
                       job.

    13       DV.MTA    Magnetic tape.

    14       DV.TTY    Terminal.

    15       DV.DIR    The device is a directory device.   You  can  test
                       this bit to determine whether ENTER/LOOKUP must be
                       done before you can start I/O to the device.

    16       DV.IN     Input device.

    17       DV.OUT    Output device.

    18       DV.ASC    The device has  been  initialized  by  the  ASSIGN
                       monitor command.

    19       DV.ASP    The device has been assigned by the INIT, OPEN, or
                       FILOP. monitor call.

   Bits 20-35 specify the modes that are legal for the device.

    20       DV.M17    Mode 17, dump.  This  is  the  same  as  IO.MOD  =
                       .IODMP returned from a GETSTS monitor call.

    21       DV.M16    Mode 16, dump records.  This is the same as IO.MOD
                       = .IODPR returned from a GETSTS monitor call.

    22       DV.M15    Mode 15, image dump.  This is the same as IO.MOD =
                       .IOIDP returned from a GETSTS monitor call.

    23       DV.M14    Mode 14, binary.  This is the  same  as  IO.MOD  =
                       .IOBIN returned from a GETSTS monitor call.

    24       DV.M13    Mode 13, image binary.  This is the same as IO.MOD
                       = .IOIBN returned from a GETSTS monitor call.

    25       DV.M12    Mode 12, reserved for use by DIGITAL.

    26       DV.M11    Mode 11, reserved for use by DIGITAL.



                                   22-64
                              DEVCHR [CALLI 4]


    27       DV.M10    Mode 10, image.  This is  the  same  as  IO.MOD  =
                       .IOIMG returned from a GETSTS monitor call.

    28       DV.M7     Mode 7, reserved for use by customers.

    29       DV.M6     Mode 6, reserved for use by customers.

    30       DV.M5     Mode 5, reserved for use by DIGITAL.

    31       DV.M4     Mode 4, reserved for use by DIGITAL.

    32       DV.M3     Mode 3, byte.  This is the same as IO.MOD = .IOBYT
                       returned from a GETSTS monitor call.

    33       DV.M2     Mode 2, packed image.  This is the same as  IO.MOD
                       = .IOPIM returned from a GETSTS monitor call.

    34       DV.M1     Mode 1, ASCII line.  This is the same as IO.MOD  =
                       .IOASL returned from a GETSTS monitor call.

    35       DV.M0     Mode 0, ASCII.  This  is  the  same  as  IO.MOD  =
                       .IOASC returned from a GETSTS monitor call.

                                    NOTE

           To check for the NUL device, use DEVCHR to see if both
           DV.DSK and DV.TTY are set.

   EXAMPLE

             MOVE      T1,[SIXBIT/DEV/]
             DEVCHR    T1,
             TLNN      T1,(DV.DSK)
               JRST    NOTDSK
             JRST      ISDSK

   This example checks to see if device DEV  (assumed  to  be  a  logical
   name)  is a disk.  The call returns to NOTDSK if it is not and returns
   to ISDSK if it is.

   RELATED CALLS

         o  DEVLNM

         o  DEVTYP









                                   22-65
                             DEVLNM [CALLI 107]


   22.25  DEVLNM [CALLI 107]

   FUNCTION

   Assigns (or clears) a logical device name to a device.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             MOVE      ac+1,[SIXBIT/name/]
             DEVLNM    ac,
               error return
             skip return

   In the calling sequence, you can provide the following information:

         o  device is the SIXBIT physical or logical name of a device  to
            which you wish to assign a logical name.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

         o  name is the logical name to be assigned to  the  device.   If
            name  is  binary  zero,  any existing logical name assignment
            will be cleared.

   SKIP RETURN

   The logical name is assigned to the device; the contents of the ac and
   the following word are unchanged.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   -3        DVLNA%    Device not assigned to your job.
   -2        DVLIU%    Logical name already in use.
   -1        DVLNX%    No such device or channel.

   RELATED CALLS

         o  DEVCHR

         o  DEVNAM

         o  DEVOP.



                                   22-66
                             DEVLNM [CALLI 107]


         o  DEVPPN

         o  DEVSIZ

         o  DEVSTS

         o  DEVTYP

         o  REASSI

   COMMON PROGRAMMING ERRORS

   Assuming that DEVLNM also causes the device to become associated  with
   your job.  Use the REASSI call to actually obtain the device.








































                                   22-67
                             DEVNAM [CALLI 64]


   22.26  DEVNAM [CALLI 64]

   FUNCTION

   Returns the physical name of a device.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             DEVNAM    ac,
               error return
             skip return

   In the calling sequence, you can provide the following information:

         o  device is the logical device  name  whose  physical  name  is
            desired.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   SKIP RETURN

   The SIXBIT physical name of the device is returned in the ac.

   The skip  return  is  also  taken  if  a  device  has  been  partially
   deassigned.   For  example,  if  the user halts the program before the
   deassignment operation is complete.  In this case, the ac is  returned
   clear.

   ERROR RETURN

   If the specified device does not exist or if the specified channel  is
   not initialized, the ac is cleared.

   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVOP.

         o  DEVPPN

         o  DEVSIZ

         o  DEVSTS

         o  DEVTYP

                                   22-68
                             DEVOP. [CALLI 171]


   22.27  DEVOP.  [CALLI 171]

   FUNCTION

   Performs  miscellaneous  device  functions  for  devices  other   than
   terminals,  tapes, disks, or TSKs.  Use TRMOP. for terminal functions,
   TAPOP.  for tape functions, DISK. for disk functions, or TSK. for  TSK
   functions.

   CALLING SEQUENCE

             MOVE      ac,[XWD length,addr]
             DEVOP.    ac,
               error return
             skip return
             . . .
   addr:     EXP       fcn-code
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
   addr+2:   argument-list

   In the calling sequence, the following variables are supplied  by  the
   program:

         o  length is the length of the argument block.

         o  addr is the address of the argument block.

         o  fcn-code is one of the function codes described below.

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

         o  arglst begins the list of arguments for the given function.

   All function codes listed below use the two-word argument  list  shown
   above.   Additionally,  some  function  codes accept a longer argument
   list.  For those codes that accept an argument list  longer  than  two
   words,  the  argument list format is shown with the description of the
   function code.

   The function codes are defined within the following four ranges:

   Range               Usage

   0000-0777           Performs a specific action.
   1000-1777           Reads a parameter.
   2000-2777           Sets a parameter.
   3000-3777           Reserved for customer definition.

                                   22-69
                             DEVOP. [CALLI 171]


   The Read/Set function codes are parallel (for example,  function  code
   1002  reads  a  parameter and code 2002 sets the same parameter).  The
   symbol .DFSET is equal to 1000, and can be added to the read parameter
   to establish the offset for the set parameter.  Therefore, to read the
   page counter, use function .DFPCT.   To  set  the  page  counter,  use
   .DFPCT+.DFSET.

   The monitor returns values in the ac for the Read functions.

   The function codes, their calling sequences, and the actions taken are
   listed in the following sections.



   22.27.1  FUNCTION 1 (.DFLLV)

   Loads the standard vertical forms control unit.



   22.27.2  FUNCTION 2 (.DFENV)

   Enables the system to load a non-standard vertical forms control unit.



   22.27.3  FUNCTION 3 (.DFDVL)

   Disables loading non-standard vertical forms control unit.



   22.27.4  FUNCTIONS 4-10

   Reserved for use by DIGITAL.



   22.27.5  FUNCTION 11 (.DFLR2)

   Loads a translation RAM into LP20.  This function  takes  a  four-word
   argument list of the form:

   addr:     .DFLR2
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
             8-bit byte count for RAM
             address of RAM buffer





                                   22-70
                             DEVOP. [CALLI 171]


   22.27.6  FUNCTION 12 (.DFLV2)

   Loads a VFU through LP20.  This function takes  a  four-word  argument
   list of the form:

   addr:     .DFLV2
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
             7-bit byte count of VFU
             address of VFU data



   22.27.7  FUNCTION 13 (.DFMDC)

   Clears DVCMDA.  This is the flag  indicating  whether  the  device  is
   controlled  by  MDA  (in GALAXY Version 4.1 and later).  This function
   requires privileges.



   22.27.8  FUNCTION 14 (.DFMDS)

   Sets DVCMDA.  This is  the  flag  indicating  whether  the  device  is
   controlled  by  MDA  (in GALAXY Version 4.1 and later).  This function
   requires privileges.



   22.27.9  FUNCTIONS 15-777

   Reserved for use by DIGITAL.



   22.27.10  FUNCTION 1000 (.DFPCT)

   Returns the line printer's page counter in the ac.



   22.27.11  FUNCTION 2000 (.DFPCT)

   Sets the page counter value in addr+2.  The page counter is limited to
   12 bits.  The argument list for .DFPCT is:

   addr:     .DFPCT
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
             EXP       counter


                                   22-71
                             DEVOP. [CALLI 171]


   22.27.12  FUNCTION 1002 (.DFHCW)

   Reads the line printer characteristics.  The  printer  characteristics
   are returned in the ac in the form:

   Bits      Symbol    Meaning

   0         DF.LCP    Lowercase capability.

   1         DF.pgC    Has page counter.

   2                   Reserved.

   3-5       DF.VFT    Code for  type  of  vertical  forms  control  unit
                       (VFU).  The type codes are:

                       Code   Symbol    Type

                       0      .DFVTO    Papertape VFU.
                       1      .DFVTD    DAVFU.
                       2      .DFVTN    No VFU.

             6-8       DF.TYP Code for  character  set  codes.   The  set
                       codes are:

                       Code   Symbol    Character set

                       0      .DFC64    Set of 64 characters.
                       1      .DFC95    Set of 95 characters.
                       2      .DFC28    Set of 128 characters.
                       3      .DFVAR    Variable size set.

   9-11      DF.CLS    Code for line printer class.  The class codes are:

                       Code   Symbol    Class

                       0      .DFSUK    Unknown.
                       1      .DFSBX    BA10.
                       2      .DFSLC    LP100.
                       3      .DFS20    LP20 (20F).
                       4      .DFSA1    LP11.
                       5      .DFSA2    LP20 (ANF DN8X).

   12-14     DF.CLU    Line printer class, as the type of unit.  The unit
                       codes are:

                       Code   Symbol    Type

                       0      .DFUUK    Unknown.
                       1      .DFUFG    LP05-type.
                       2      .DFULN    LN01-type.



                                   22-72
                             DEVOP. [CALLI 171]


   18-35     DF.CSN    Character set name, in SIXBIT.



   22.27.13  FUNCTION 2002 (.DFHCW)

   Sets the line printer characteristics.  The argument list  for  .DFHCW
   is:

   addr:     .DFHCW
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
             EXP       characteristics

   Defines the characteristics using the definitions listed above for the
   Read function.



   22.27.14  FUNCTION 1003 (.DFRES)

   The extended I/O error status for the given device is returned in  the
   ac.

   The error status is returned as one of the following codes:

   Code      Symbol    Device    Error

   1         IOPLE%    LPT       Page limit exceeded.
   1         IONOP%    MTA       Monitor Continued operation.
   2         IOVFE%    LPT       VFU format error.
   2         IOEOF%    MTA       Tape at end-of-file.
   3         IOLTE%    MTA       Label Type error.
   4         IOHLE%    MTA       Header Label error.
   5         IOTLE%    MTA       Trailer Label error.
   6         IOVLE%    MTA       Volume Label error.
   7         IODER%              Hard device error.
   10        IOPAR%              Parity error.
   11        IOWLE%              Write-lock error.
   12        IOIPO%    MTA       Illegal positioning error.
   13        IOBOT%    MTA       Beginning of tape.
   14        IOIOP%    MTA       Illegal operation.
   15        IOFNF%    MTA       File not found.
   16        IOCAN%    MTA       Operator cancelled volume switch
                                 request.
   17        IOTMV%    MTA       Too many volumes in the volume set.
   20        IONND%              Network node down.
   21        IOUNC%    LP20      Undefined Character interrupt.
   22        IORPE%    LP20      RAM Parity error.
   23        IOLRA%    MTA       Tape labelling request was aborted by a
                                 RESET UUO.


                                   22-73
                             DEVOP. [CALLI 171]


   24        IOVPF%    MTA       Volume Protection error.
   25        IOFPF%    MTA       File protection failure.
   26        IOUEF%    MTA       Unexpired file.
   27        IONDD%              Network device is disconnected.



   22.27.15  FUNCTION 1004 (.DFRDS)

   Reads the device status for a specified device.  A status code for the
   specified device is returned in the ac.

   The status codes and their meanings are:

   Bit       Symbol    Status

   0         DF.OFL    Device off-line.
   34        DF.LLE    DAVFU load-enabled.
   35        DF.LVE    A VFU error occurred.

   The bits returned in the left half of the ac  are  device-independent;
   the bits returned in the right half are device-specific.



   22.27.16  FUNCTION 1005 (.DFFRM)

   Reads and sets the names of forms types.  The name of the form type is
   stored at addr+2.



   22.27.17  FUNCTION 1006 (.DFDTI)

   Reads and sets DECtape information.  For example,  you  can  read  the
   read/write   counts.    Use   this  function  to  set  DECtape  reelid
   information.  This DEVOP.  function requires  the  following  argument
   list:

   addr:     .DFDTI
           / SIXBIT    /device/ \
          |  EXP       channo    |
           \ EXP       udx      /
             SIXBIT    /reelid/
             EXP       n (no. of words read)
             EXP       m (no. of words written)

   SKIP RETURN

   The specified function is executed.




                                   22-74
                             DEVOP. [CALLI 171]


   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   -1        DFACS%    Address check.
   0         DFIFC%    Illegal function code.
   1         DFPRV%    Not enough privileges.
   2         DFIFD%    Function invalid for device.
   3         DFNLR%    Value out of range.
   4         DFNXD%    Nonexistent device.
   5         DFNDV%    No DAVFU (LPT only).
   6         DFNIA%    Device not initialized.
   7         DFDOL%    Device off-line.
   10        DFCNS%    Page counter not set (LPT only).
   11        DFNPC%    No page counter (LPT only).
   12        DFENI%    Extended error recovery not implemented.
   13        DFNVC%    Non-variable character set.

   If the monitor call has not been implemented on your system, the error
   return is taken and the monitor leaves the ac unchanged.

   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVNAM

         o  DEVPPN

         o  DEVSIZ

         o  DEVSTS

         o  DEVTYP
















                                   22-75
                             DEVPPN [CALLI 55]


   22.28  DEVPPN [CALLI 55]

   FUNCTION

   Returns the project-programmer number (PPN)  associated  with  a  disk
   device  or an ersatz device.  Note that the DEVPPN UUO does not return
   SFD names.  It is recommended that  programs  use  the  PATH. call  to
   return complete directory names.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             DEVPPN    ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  device is the SIXBIT physical, logical, or ersatz name  of  a
            disk device.

         o  channo is a channel number for a disk device.

         o  udx is the Universal Device Index for a disk device.

   SKIP RETURN

   The PPN for the specified device is returned in the ac.  Note that  if
   you  have  enabled  /NEW in your search list, the returned PPN for SYS
   will be [1,5] instead of [1,4].

   ERROR RETURN

   The error return occurs in two cases.   The  cause  of  the  error  is
   indicated by the value returned:

         o  If zero is returned in the ac; the device does not exist,  or
            you have not initialized it.

         o  If your own PPN is returned; the device is not a disk device.












                                   22-76
                             DEVPPN [CALLI 55]


   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVNAM

         o  DEVOP.

         o  DEVSIZ

         o  DEVSTS

         o  DEVTYP

         o  PATH.





































                                   22-77
                             DEVSIZ [CALLI 101]


   22.29  DEVSIZ [CALLI 101]

   FUNCTION

   Returns the buffer size and standard number of buffers for a device.

   CALLING SEQUENCE

             MOVEI   ac,addr
             DEVSIZ  ac,
               error return
             skip return
             . . .
   addr:     EXP     status
           / SIXBIT/device/ \
          |  EXP     channo  |
           \ EXP     udx    /

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the  argument  block.   Normally,  the
            address  points  to  the  OPEN  block  used to initialize the
            device.

         o  status  is  the  I/O  status  word,  which  must  match   the
            information given when the channel was initialized with INIT,
            OPEN, or FILOP.

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   Note that the format for the argument block is identical to the format
   used  for  the OPEN monitor call and that the OPEN block is ordinarily
   used as the DEVSIZ block.  The number  and  sizes  of  buffers  differ
   among different data modes, and depending on mode modifier bits.

   SKIP RETURN

   The ac contains the default number of buffers in its  left  half,  and
   the default buffer size (including a 3-word header) in its right half.
   If you specify a device that was initialized in dump mode, the monitor
   clears the ac and takes the skip return.









                                   22-78
                             DEVSIZ [CALLI 101]


   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   0         DVSDM%    Dump mode specified; therefore, buffer size is not
                       applicable.
   -1        DVSNX%    Nonexistent device.
   -2        DVSIM%    Illegal data mode.

   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVNAM

         o  DEVOP.

         o  DEVPPN

         o  DEVSTS

         o  DEVTYP




























                                   22-79
                             DEVSTS [CALLI 54]


   22.30  DEVSTS [CALLI 54]

   FUNCTION

   Returns the device status word from the device data block (DDB).  This
   call  returns  the  last  CONI  performed  for  the  device,  which is
   different for each device type and model.   To  interpret  the  device
   status word, refer to the hardware manual for the specific device.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             DEVSTS    ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of a channel.

         o  udx is the Universal Device Index for a device.

   You can specify any device on an I/O bus.  Where multiple units are on
   a single controller, the status of the controller is returned.

   SKIP RETURN

   The device status word is returned in the ac.  If the service  routine
   for  the  device  does  not  store  a  CONI,  the returned word may be
   useless.  Devices having both a controller and  data  interrupt  store
   the controller CONI.

   ERROR RETURN

   If the device does not exist or is not initialized, the ac is cleared.

   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVNAM

         o  DEVOP.

         o  DEVPPN



                                   22-80
                             DEVSTS [CALLI 54]


         o  DEVSIZ

         o  DEVTYP

   The device status block is also returned by the .SNSDS function of the
   SENSE. UUO.

   COMMON PROGRAMMING ERRORS

         o  Confusing  "device  status"  (DEVSTS)   with   "I/O   status"
            (GETSTS).   GETSTS  returns the file (I/O) status bits, which
            are documented in Volume  1.   DEVSTS  returns  the  hardware
            device status.

         o  Confusing the "device status" returned by DEVSTS with the I/O
            error status that is returned by the DEVOP. UUO.






































                                   22-81
                             DEVTYP [CALLI 53]


   22.31  DEVTYP [CALLI 53]

   FUNCTION

   Returns the physical properties for a device.

   CALLING SEQUENCE

           / MOVE      ac,[SIXBIT/device/] \
          |  MOVEI     ac,channo            |
           \ MOVEI     ac,udx              /
             DEVTYP    ac,
               error return
             skip return

   In the calling sequence, the program provides the following variables:

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   To specify physical device searching, use UU.PHY (Bit 19) in  the  ac.
   (More  information  about  UU.PHY  is  included  in the description of
   CALLI.)

   SKIP RETURN

   If the ac is 0, there was no such device; otherwise, the  device  type
   bits are returned in the ac as follows:

   Bits      Symbol    Characteristic

   0         TY.MAN    Directory device; a LOOKUP/ENTER is mandatory.

   1-7                 Reserved.

   8         TY.GEN    If the argument is a SIXBIT name, this bit is set
                       if the device is generic.

   9         TY.MDA    Controlled by MDA (mountable device allocator).

   10        TY.EHF    Extended hardware features; for example, this bit
                       is set for a line printer with lowercase
                       capability.

   11        TY.MPX    MPX-controllable.

   12        TY.AVL    Available to your job.

   13        TY.SPL    Spooled.


                                   22-82
                             DEVTYP [CALLI 53]


   14        TY.INT    Interactive; there is output after each break
                       character.

   15        TY.VAR    Capable of variable buffer size.

   16        TY.IN     Input capability.

   17        TY.OUT    Output capability.

   18-26     TY.JOB    Job number to which the device is currently
                       assigned.

   27-28               Reserved.

   29        TY.RAS    Restricted; assigned only to privileged job or by
                       MOUNT command.

   30-35     TY.DEV    One of the following device type codes:

                       Code      Symbol    Device Type

                       0         .TYDSK    Disk.
                       1         .TYDTA    DECtape.
                       2         .TYMTA    Magnetic tape.
                       3         .TYTTY    Terminal.
                       4         .TYPTR    Papertape reader.
                       5         .TYPTP    Papertape punch.
                       6         .TYDIS    Display unit.
                       7         .TYLPT    Line printer.
                       10        .TYCDR    Card reader.
                       11        .TYCDP    Card punch.
                       12        .TYPTY    Pseudo-terminal.
                       13        .TYPLT    Plotter.
                       14        .TYEXT    External task.
                       15        .TYMPX    MPX-controlled.
                       16        .TYPAR    PA611R on a DC44.
                       17        .TYPCR    PC11(R) on a DC44.
                       20        .TYPAP    PA611P on a DC44.
                       21        .TYLPC    LPC-11 on a DC44.
                       22        .TYPCP    PC-11(P) on a DC44.
                       23        .TYWTY    WTY device on a DC44.
                       24        .TYTSK    Network task.
                       25        .TYD78    DAS78 device.
                       26        .TYRDA    Remote data entry device.
                       27        .TYMCR    Monitor command interpreter
                                           (MCR) device.
                       30        .TYDRA    DTR01/DR01 device.
                       31        .TYKDP    KMC/DUP interface.
                       32        .TYDTE    DTE interface.
                       33        .TYDDP    ANF-10 DDCMP device.
                       34        .TYDMR    DMR11 as a network device.
                       35        .TYRX2    RX02 floppy disk controller.


                                   22-83
                             DEVTYP [CALLI 53]


                       36        .TYKLP    CI20 (KLIPA) device.
                       37        .TYKNI    NIA20 (KLNI) device.
                       40        .TYSAX    SA10 device.
                       41-57               Reserved for use by DIGITAL.
                       60-77               Reserved for use by customers.

   ERROR RETURN

   The DEVTYP monitor call should never take the error return.

   RELATED CALLS

         o  DEVCHR

         o  DEVLNM

         o  DEVNAM

         o  DEVOP.

         o  DEVPPN

         o  DEVSIZ

         o  DEVSTS

   COMMON PROGRAMMING ERRORS

   Assuming that a skip return indicates that the device exists.

























                                   22-84
                             DIAG. [CALLI 163]


   22.32  DIAG.  [CALLI 163]

   FUNCTION

   Provides diagnostic functions for  devices,  device  controllers,  and
   CPUs.

   CALLING SEQUENCE

             MOVE      ac,[-length,,addr]
             DIAG.     ac,
               error return
             skip return
               . . .
   addr:     function-code
             argument-list

   In the calling sequence, you can provide the following information:

         o  -length is the negative integer of the length of the argument
            list.

         o  addr is the address of the argument list.

         o  function-code is one of the function codes listed below.

         o  argument-list is  different  for  each  function  code.   The
            argument lists are documented with the functions, below.

   Most DIAG.  UUO functions request a device specification in the second
   word of the argument list (addr+1), as:

        SIXBIT  /device/

   The device name can be any one of the following:

         o  CPU name (as SIXBIT  /CPU0/)

         o  Controller name (as SIXBIT  /MTA/)

         o  DDB name (as SIXBIT  /MTA0/)

         o  Controller and drive name, formatted as shown below.

             Bits      Contents

             0-6       Controller device code
             7-8       Ignored
             27-29     Unit number
             33-35     Slave unit number (for multi-unit controllers)




                                   22-85
                             DIAG. [CALLI 163]


   The DIAG. functions and their arguments are described in the following
   sections.



   22.32.1  FUNCTION 1 (.DIASU)

   Assigns a single unit on the channel or controller.  The format of the
   argument list is:

   addr:     EXP       .DIASU
             SIXBIT    /device/
             timeout value

   In the argument list, you supply an optional timeout value,  which  is
   the number of milliseconds to wait for the assignment to be completed.



   22.32.2  FUNCTION 2 (.DIAAU)

   Assigns all units on the channel or controller.   The  format  of  the
   argument list is:

   addr:     EXP       .DIAAU
             SIXBIT    /device/
             timeout value

   In the argument list, you supply an optional timeout value,  which  is
   the number of milliseconds to wait for the assignment to be completed.
|  
|  
|  
|  22.32.3  FUNCTION 3 (.DIRAU)
|  
   Releases all units on the channel or controller.  The  format  of  the
   argument list is:

|  addr:     EXP       .DIRAU
             SIXBIT    /device/



   22.32.4  FUNCTION 4 (.DISCP)

   Specifies a channel program.  The format of the argument list is:

   addr:     EXP       .DISCP
             SIXBIT    /device/
             I/O word (IOWD format)

   On a successful return, the address of  the  initial  channel  command
   word is returned in the accumulator.

                                   22-86
                             DIAG. [CALLI 163]


   22.32.5  FUNCTION 5 (.DIRCP)

   Releases a channel program.  The format of the argument list is:

   addr:     EXP       .DIRCP
             SIXBIT    /device/



   22.32.6  FUNCTION 6 (.DIGCS)

   Gets the channel status.

   addr:     EXP       .DIGCS
             SIXBIT    /device/

   On a successful return, up to four words of channel logout data may be
   returned in the argument block at addr+2 through addr+6.



   22.32.7  FUNCTION 7 (.DIAKU)

   Returns the controller and unit numbers for a device.  The  format  of
   the argument list is:

   addr:     EXP       .DIAKU
             SIXBIT    /device/

   On a skip return, the accumulator contains the following information:

   Bits      Contents

   0-8       Zero.
   9-17      Controller device code.
   30-32     Unit number.
   33-35     Slave unit number.



   22.32.8  FUNCTION 10 (.DIACS)

   Forces a CPU status block read on a CPU and forces DAEMON to  make  an
   error  entry  (code  63) in ERROR.SYS.  (The error types are listed in
   Table 22-1 with the DAEMON monitor call.) This function requires  that
   you  have  JP.POK,  [1,2],  or  JACCT  privileges.   The format of the
   argument list is:

   addr:     EXP .DIACS
             EXP CPU-number




                                   22-87
                             DIAG. [CALLI 163]


   22.32.9  FUNCTION 11 (.DIADS)

   Reads the device status for all devices on the specified  CPU  into  a
   GETTAB  table  in the monitor and forces DAEMON to make an error entry
   (code 64) in ERROR.SYS.  (The error codes and entry types  are  listed
   with  the  DAEMON  call.) This function requires that you have JP.POK,
   [1,2], or JACCT privileges.  The format for the argument list is:

   addr:     EXP .DIADS
             EXP CPU-number



   22.32.10  FUNCTION 12 (.DISCR)

   Specify channel program for read-reverse (RH20 devices only).

   addr:     EXP .DISCR
             SIXBIT /device/
             I/O word (IOWD format)

   On a successful return, the address of  the  initial  channel  command
   word is returned in the accumulator.



   22.32.11  FUNCTION 13 (Obsolete)



   22.32.12  FUNCTION 14 (.DIGUI)

   Sets the user-I/O mode bit in the PC word.

   addr:     EXP .DIGUI

   On  a  successful  return,  the  program  is  enabled   for   user-I/O
   operations, such as CONSO, DATAO, and so forth.



   22.32.13  FUNCTION 15 (Obsolete)



   22.32.14  FUNCTION 16 (Obsolete)








                                   22-88
                             DIAG. [CALLI 163]


   22.32.15  FUNCTION 17 (.DIELD)

   Enables microcode loading.  The argument list is formatted as:

   addr:     XWD       CPUno, .DIELD
             SIXBIT    /device/



   22.32.16  FUNCTION 20 (.DIDLD)

   Disables microcode loading.  The format of the argument list is:

   addr:     XWD       CPUno, .DIDLD
             SIXBIT    /device/



   22.32.17  FUNCTION 21 (.DILOD)

   Loads the microcode.  The format of the argument block is:

   addr:     XWD       CPUno, .DILOD
             SIXBIT    /device/
|  
|  
|  
|  22.32.18  FUNCTION 22 (.DIISM)
|  
   Sets IPA channel (CI20 or NIA20) maintenance mode.  The format of  the
   argument block is:

|  addr:     XWD       CPUno, .DIISM
             controller-device-code (Bits 0-6)



   22.32.19  FUNCTION 23 (.DIICM)

   Clears IPA channel maintenance mode.  The format of the argument block
   is:

   addr:     XWD       CPUno, .DIICM
             controller-device-code (Bits 0-6)



   22.32.20  FUNCTION 24 (.DISBD)

   Execute  S-bus  diagnostic  function  (SBDIAG).   The  format  of  the
   argument block is:



                                   22-89
                             DIAG. [CALLI 163]


|  addr:     XWD       CPUno, .DISBD
             To-memory word
             From-memory word

   In the argument list, you can supply the following information:

         o  CPUn is the CPU number.

         o  To-memory word, where, on a successful return from  the  UUO,
            the monitor places the updated word into this argument.

         o  The monitor writes the From-memory word into addr+2.




   22.32.21  FUNCTION 25 (.DIDSN)

   Returns a unit's device serial number.

   addr:     EXP       .DIDSN
             SIXBIT    /device/
             Serial number (word 0)
             Serial number (word 1)

   The monitor returns the serial number in addr+2 and addr+3.



   22.32.22  FUNCTION 26 (.DIRUR)

   Reads the UNIBUS register.

   addr:     EXP       .DIRUR
             register-address

   In the argument list, you supply the address of the  UNIBUS  register.
   The monitor returns the contents of the UNIBUS register in the ac.



   22.32.23  FUNCTION 27 (.DIADB)

   Allocates a buffer for dumping the contents of the IPA20  DRAM.   (The
   IPA20  is  the  microprocessor  controlling  CI20  and NIA20 interface
   hardware.)

   addr:     EXP       .DIADB SIXBIT /controller/

   The monitor returns the address of the  buffer  containing  the  IPA20
   DRAM in the ac.



                                   22-90
                             DIAG. [CALLI 163]


   22.32.24  FUNCTION 30 (.DIOKI)

   Obtains controller information.

   addr:     EXP       .DIOKI
             SIXBIT    /controller/
             BLOCK n

   In the argument list, you reserve 2 word for information returned,  on
   a KL system.  On a KS system, reserve 3 words.

   On a successful return, the monitor fills controller information  into
   the  argument list starting at addr+2.  The information is returned in
   the following format.

   At addr+2:

   Bits      Symbol    Meaning

   0         DI.MUK    Multi-unit controller.
   1         DI.CLM    Can load microcode.
   2-5                 Reserved for DIGITAL.
   6-11      DI.CAM    CPU accessibility mask (one bit per CPU that can
                       access the controller).
   12-17     DI.CKX    Maximum number of controllers on this CPU or
                       channel (reserved).
   18-23     DI.KUX    Maximum number of units on this controller.
   24-29     DI.KTY    Type of controller.
   30-35     DI.DTY    Type of device.

   At addr+3:

   24-26     DI.CUN    Channel unit number (indicated if DI.MUK is set,
                       above).
   27-35     DI.DVC    Device code (KL systems).
   27-35     DI.IVI    Interrupt vector address (KS systems).

   At addr+4 (returned for KS systems only):

   Bits      Symbol    Contents

   14-35     DI.UBA    UNIBUS address.












                                   22-91
                             DIAG. [CALLI 163]


   22.32.25  FUNCTION 31 (.DIOUI)

   Obtains information about a specific device unit.  The  argument  list
   is:

   addr:     EXP       .DIOUI
             SIXBIT    /unit/
             BLOCK 5

   The information is returned by the monitor in the words  you  reserved
   in the argument list.  The format of the information returned in Words
   2-7 of the argument list is:

   Word      Contents

   2         Program specifies -n,,addr1; where addr1 contains the KDB
             names.
   3         High-order word of drive serial number.
   4         Low-order word of drive serial number.
   5         In the left half, the CPU-accessibility mask.  In the right
             half, the physical drive number.



   22.32.26  FUNCTION 32 (.DILKU)

   Lists names of units on a controller.  The argument list is:

   addr:     EXP       .DILKU
             SIXBIT    /controller/
             BLOCK n

   In the argument list, you supply n as  the  number  of  units  on  the
   controller.   Use  the  DIAG.   UUO  function  .DIOKI to determine the
   number of words to reserve in the argument  list  for  this  function.
   The  monitor returns the device unit names, in SIXBIT, in the argument
   list starting at addr+2.  The  actual  number  of  units  returned  is
   stored in the accumulator.



   22.32.27  FUNCTION 33 (.DISDS)

   Sets the status of a device.  Using this function, a device can be set
   to  be  attached or detached.  This function also provides an "Ignore"
   state, where the device service routine will ignore the unit until the
   operator  performs an explicit ATTACH function.  The argument list for
   this function is:

   addr:     EXP       .DISDS
             SIXBIT    /device/
             state-code


                                   22-92
                             DIAG. [CALLI 163]


   In the argument list, you can supply any of the following state-codes:

   Code      Symbol    Meaning

   0         .DISSI    Set the Ignore flag.
   1         .DISCI    Clear the Ignore flag.
   2         .DISSD    Set the Detached flag.
   3         .DISSA    Set the Attached flag.



   22.32.28  FUNCTION 34 (.DIDVR)

   Reads  the  device  status  registers  of  devices  that  yield   this
   information.

   The argument list for this function is:

   addr:     EXP       .DIDVR
             SIXBIT    /device/
             -n,,offset

   In the argument list, you can supply the unit or  controller  name  at
   addr+1.   At addr+2, you supply a negative expression of the number of
   words to return, in the left half.  In the right half, you can include
   the offset into the appropriate data block.



   22.32.29  FUNCTIONS 35-77 (Reserved for DIGITAL)



   22.32.30  FUNCTION 100 (.DIGTM)

   Gets MOS memory (defined in MOSSER).



   22.32.31  FUNCTION 101 (.DIGVM)

   Sets MOS memory (defined in MOSSER).



   22.32.32  FUNCTIONS 102-104 (Reserved)








                                   22-93
                             DIAG. [CALLI 163]


   22.32.33  FUNCTION 105 (.DIRRS)

   Resets remote CI node (defined in KLPSER).



   22.32.34  FUNCTION 106 (.DISRS)

   Starts remote CI node (defined in KLPSER).



   22.32.35  FUNCTION 107 (.DIACC)

   Manipulates the CI port counters (defined in KLPSER).  The  format  of
   the argument list is:

   addr:     XWD       CPUno, .DIACC
             XWD       channo,sub-function

   In the argument list you supply the following information:

         o  channo is the channel number.  The only valid channel number
            is 7.

         o  sub-function is a function code for manipulating counters.

   The sub-function codes are:

   Code      Symbol    Function

   0         .DICGT    Gets counters.
   1         .DICRL    Releases counters.
   2         .DICPT    Points to counters.
   3         .DICRD    Reads counters.



   22.32.36  FUNCTIONS 110-111 (Reserved for DIGITAL)



   22.32.37  FUNCTION 112 (.DIWCM)

   Writes CI maintenance data (defined in KLPSER).









                                   22-94
                             DIAG. [CALLI 163]


   22.32.38  FUNCTION 113 (.DIRCM)

   Reads CI maintenance data (defined in KLPSER).

   SKIP RETURN

   The specified function has been performed.   Information  returned  in
   the  argument  list  and/or  the  accumulator  is  described  for each
   function listed above.

   ERROR RETURN

   The ac is unchanged if the DIAG.  monitor call is not  implemented  on
   the  system.   Otherwise, one of the following error codes is returned
   in the ac:

   Code      Symbol    Meaning

   1         DIANP%    Not enough privileges.
   2         DIAIA%    Illegal number of arguments.
   3         DIAIC%    Illegal controller number.
   4         DIAIU%    Illegal unit number.
   5         DIAAA%    Some units already assigned.
   6         DIADM%    Unit not in diagnostic mode.
   7         DIAAJ%    Unit assigned to another job.
   10        DIAFC%    Not enough free core.
   11        DIAAU%    No assigned units.
   12        DIACP%    IOWD crosses page boundary.
   13        DIAIF%    Illegal function.
   14        DIAVC%    Job must not be virtual.
   15        DIANC%    No such CPU.
   16        DIANR%    CPU not running.
   17        DIABA%    Invalid argument list.
   20        DIACI%    No CI port on specified CPU.
   21        DIATO%    The Read Port Counters function timed out.
   22        DIANK%    No NI port on specified CPU.
   23        DIARF%    Microcode reload failed.
   24        DIANM%    No microcode available.
   25        DIAPN%    CI or NI port not running.
   26        DIANU%    Non-existent UNIBUS address.
   27        DIAAF%    Attach function failed.
   30        DIADF%    Detach function failed.












                                   22-95
                             DISK. [CALLI 121]


   22.33  DISK.  [CALLI 121]

   FUNCTION

   Performs miscellaneous disk functions.

   CALLING SEQUENCE

             MOVE      ac,[XWD function-code,addr]
             DISK.     ac,
               error return
             skip return
   addr:     argument-list

   In the calling sequence, you can supply the following information:

         o  function-code is one of the function codes described below.

         o  addr is the address of the argument list.

         o  argument-list depends on the function code.

   The function codes and their arguments are described below.

   SKIP RETURN

   On a successful return from the call, the function  you  specified  is
   accomplished, and neither the ac nor the argument list is affected.

   ERROR RETURN

   Each function can produce its own set  of  error  codes  on  an  error
   return from the DISK.  call.  The error code is returned in the ac.  A
   negative error code is one of  the  following,  general-purpose  error
   codes:

   Code      Symbol    Meaning

   -1        DUILF%    Illegal function requested.
   -2        DUINP%    Not enough privileges to perform the function.

   A positive error code indicates an  error  that  is  specific  to  the
   function  code.   The  ac is unchanged if DISK.  is not implemented on
   your system.

   In the argument lists described in the  following  sections,  you  can
   supply the following information:

         o  device is the SIXBIT physical or logical name of a device.

         o  channo is the number of an initialized channel.  You can  use
            -2  to  indicate  all  channels  for  the  job, or -1 for all
            explicitly initialized channels for this job

                                   22-96
                             DISK. [CALLI 121]


         o  udx is the Universal Device Index for a device.

         o  structure is the SIXBIT name of a file structure.

   The function codes, their meanings, argument lists,  and  error  codes
   are described in the following sections.



   22.33.1  FUNCTION 0 (.DUPRI)

   Sets the disk priority level.  The argument list for .DUPRI is:

   addr:     XWD       channo,priority

   In the argument, priority is in the  range  -3  to  +3  (0  is  normal
   priority and +3 is the highest priority).

   If you set the priority for  a  channel,  the  setting  overrides  the
   setting  for  the  job,  and  remains in effect until you change it or
   release the channel.

   If you set the priority for the entire job,  the  setting  remains  in
   effect  until  you  change  it  with  another DISK. call or with a SET
   DSKPRI monitor command.

   The maximum priority level you can use for your job is stored in  Bits
   1-2 (JP.DPR) of the job privilege table (GETTAB Table 6, .GTPRV).

   On an error return from this function,  one  of  the  following  error
   codes may be stored in the ac:

   Code      Symbol    Meaning

   1         DUPIP%    Priority higher than JP.DPR.
   2         DUPNO%    Channel not initialized.
   3         DUPIA%    Illegal channel number or code.



   22.33.2  FUNCTION 1 (.DUSEM)

   Sets  PDP-10/PDP-11  compatibility  mode  (22-sector   mode   on   the
   RP04/RP06)  for  the  channel.   .DUSEM is a privileged function.  The
   argument list for .DUSEM is:

   addr:     EXP       channo







                                   22-97
                             DISK. [CALLI 121]


   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUSID%    Illegal device.
   2         DUSCM%    The device does not support 22-sector mode.



   22.33.3  FUNCTION 2 (.DUSTM)

   Clears PDP-10/PDP-11  compatibility  mode.   .DUSTM  is  a  privileged
   function.  The argument list for .DUSTM is:

   addr:     EXP       channo

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUSID%    Illegal device.
   2         DUSCM%    The device does not support 22-sector mode.



   22.33.4  FUNCTION 3 (.DUUNL)

   Unloads an RP04 or RP06 drive.  .DUUNL is a privileged function.   The
   argument list for .DUUNL is:

   addr:     SIXBIT    /device/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUUIU%    Illegal unit name.
   2         DUUNI%    Structure is illegal or not available.
   3         DUUNU%    Device cannot be unloaded.



   22.33.5  FUNCTION 4 (.DUOLS)

   Takes a controller/channel off-line soon.  The monitor  will  continue
   I/O  that  is in progress, but will not use the controller for new I/O
   requests.  .DUOLS is a privileged function.   The  argument  list  for
   .DUOLS is:



                                   22-98
                             DISK. [CALLI 121]


   addr:     SIXBIT    /controller/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUOIP%    Specified controller/channel is being put
                       off-line.
   2         DUOSK%    Nonexistent controller.
   3         DUOSS%    If controller were set off-line, there would not
                       be enough swapping space.
   4         DUOIS%    Unit in structure cannot be set off-line.
   5         DUOES%    Not enough space for IOWDs.
   6         DUOPI%    Obsolete.



   22.33.6  FUNCTION 5 (.DUOLN)

   Takes a controller/channel off-line now.  The  monitor  stops  current
   I/O  on  that  controller  and will not use the controller for new I/O
   requests.  .DUOLN is a privileged function.   The  argument  list  for
   .DUOLN is:

   addr:     SIXBIT    /controller/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUOIP%    Specified controller/channel is being put
                       off-line.
   2         DUOSK%    Nonexistent controller.
   3         DUOSS%    If controller were set off-line, there would not
                       be enough swapping space.
   4         DUOIS%    Unit in structure cannot be set off-line.
   5         DUOES%    Not enough space for IOWDs.
   6         DUOPI%    Obsolete



   22.33.7  FUNCTION 6 (.DUONL)

   Puts a controller/channel on-line.  This function makes the controller
   available  for  I/O.   .DUONL  is a privileged function.  The argument
   list for .DUONL is:

   addr:     SIXBIT    /controller/




                                   22-99
                             DISK. [CALLI 121]


   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUOIP%    Specified controller/channel is being put
                       off-line.
   2         DUOSK%    Nonexistent controller.
   5         DUOES%    Not enough space for IOWDs.
   6         DUOPI%    Obsolete



   22.33.8  FUNCTION 7 (.DUUFD)

   Sets call for UFD compressor.  The argument list for .DUUFD is:

   addr:     EXP channo

   In the argument, you specify the channo of the channel on which a file
   is open.  The UFD in which the file exists will be compressed.

   This  function  does  not  force  the  compression   to   take   place
   immediately,  but  sets  the  compression  to be performed on the next
   output CLOSE for a file in this UFD.  By default, the  compression  is
   performed  on  an output CLOSE only if the directory contains an empty
   block.



   22.33.9  FUNCTION 10 (.DUSWP)

   Removes a disk unit from  the  active  swapping  list.   .DUSWP  is  a
   privileged function.  The argument list for .DUSWP is:

   addr:     SIXBIT    /device/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUOIP%    Specified controller/channel is being put
                       off-line.
   2         DUOSK%    Nonexistent controller.
   3         DUOSS%    If controller were set off-line, there would not
                       be enough swapping space.
   4         DUOIS%    Unit in structure cannot be set off-line.
   5         DUOES%    Not enough space for IOWDs.
   6         DUOPI%    Obsolete




                                   22-100
                             DISK. [CALLI 121]


   22.33.10  FUNCTION 11 (.DUASW)

   Adds a disk unit to the active swapping list.  .DUASW is a  privileged
   function.  The argument list for .DUASW is:

   addr:  SIXBIT       /device/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUANU%    No such unit.
   2         DUAAI%    Unit already in active swapping list.
   3         DUASF%    SWPTAB is full.
   4         DUAN4%    This error code is obsolete.
   5         DUANS%    No swapping space (SWAP.SYS) on pack.



   22.33.11  FUNCTION 12 (.DUASD)

   Adds a structure to the system  dump  list.   The  argument  list  for
   .DUASD is:

   addr:     SIXBIT    /structure/

   On an error return from this function,  one  of  the  following  error
   codes may be returned in the ac:

   Code      Symbol    Meaning

   1         DUDND%    No such structure.
   2         DUDNC%    No crash space on structure.
   3         DUDAD%    Structure already on system dump list.
   4         DUDDF%    System dump list full.



   22.33.12  FUNCTION 13 (.DURSD)

   Removes a structure from the system dump list.  The argument list  for
   .DURSD is:

   addr:     SIXBIT    /structure/

   On an error return from this function, the following error code may be
   returned in the ac:

   Code      Symbol    Meaning

   1         DUDNS%    Structure not in system dump list.


                                   22-101
                             DISK. [CALLI 121]


   22.33.13  FUNCTION 14 (.DULEN)

   Returns the number of written blocks in the file in ac.  The  argument
   list for .DULEN is:

   addr:     EXP       channo



   22.33.14  FUNCTION 15 (.DUCLM)

   Clears MDA wait for the specified unit.  The argument list for  .DUCLM
   is:

   addr:     SIXBIT    /device/

   This function is used by the GALAXY  batch  and  spooling  system  and
   requires [1,2] or JACCT privileges.



   22.33.15  FUNCTION 16 (.DUFRE)

   Returns the amount of free space in a given UFD before the  logged  in
   quota is exhausted.  The argument list for .DUFRE is:

   addr:     SIXBIT    /structure/
             XWD p,pn

   If there is no job logged in with the specified PPN, the  skip  return
   is  taken  with bit 0 set.  This bit setting is returned by the DSKCHR
   call, when DC.NPA is returned in .DCUFT (arg+1).  This  signifies  the
   fact that the quota is not available.

   On an error return from this function, the following error code may be
   returned in the ac:

   Code      Symbol    Meaning

   1         DUFND%    No such structure.

   RELATED CALLS

   DSKCHR










                                   22-102
                             DNET. [CALLI 207]


   22.34  DNET.  [CALLI 207]

   FUNCTION

   Obtains information about DECnet network nodes and environment in your
   network  area  only.   This monitor call is for use in system programs
   associated with DECnet-10 Versions 3.0 and 4.0.

                                    NOTE

           In a multi-area DECnet environment, the DNET.UUO  only
           returns  information  about  nodes in the same area as
           the DECnet-10 host.

           If DECnet-10 is running as an  Ethernet  endnode,  the
           DNET.UUO  only returns information about the DECnet-10
           host node.

   CALLING SEQUENCE

             XMOVEI    ac,addr
             DNET.     ac,
               error return
             skip return
   addr:     argument-list

   In the calling sequence, you provide the following information:

         o  addr is the address of the argument list.

         o  argument-list depends on the function code you specify in the
            first  word  of the argument list (.DNFFL), which is provided
            in the following format:

                 addr:     flags+function-code,,length

   In this word, the following flags are defined:

   Bit       Symbol    Meaning

   0         DN.FLS    Used with functions that return information  about
                       single  entities (a node or link).  Indicates that
                       the  function  should  step  through   the   list,
                       returning information about the next entity in the
                       list.

   1         DN.FLK    List information only about known nodes.

   2         DN.FLR    List information only about reachable nodes.

   3         DN.FLE    List information only about EXECUTOR  nodes.   See
                       the   TOPS-10  DECnet-10  User's  Guide  for  more
                       information.

                                   22-103
                             DNET. [CALLI 207]


   The function codes and argument lists are described in  the  following
   sections.



   22.34.1  FUNCTION 1 (.DNLNN)

   Lists node names.  You specify the following at addr:

   addr:     flag+<.DNLNN,,length>
             BLOCK     length-1

   In the argument list, you must include one of the following flags:

         o  DN.FLK to list known nodes.

         o  DN.FLR to list reachable nodes.

         o  DN.FLE to list EXECUTOR nodes.

   And length is the length of the block to reserve.

   The monitor returns the argument list in the following form:

   Word      Symbol    Contents

   1         .DNCNT    Number of node names returned in the list.

   2         .DNNMS    First node name.

   3                   Second node name.

   4-n                 Remaining node names.



   22.34.2  FUNCTION 2 (.DNNDI)

   Returns information about a node.  You specify the following at addr:

   addr:     flag+<.DNNDI,,length>
             node-name
             BLOCK length-2

   You must include one of the following flags:

         o  DN.FLS to step through list of nodes.  If you set this  flag,
            you  must  be  sure  that  addr+1 will contain 0 on the first
            call, to start at the first node in the node list.  The nodes
            are listed in numerical order, by address.




                                   22-104
                             DNET. [CALLI 207]


         o  DN.FLK to list only known nodes.

         o  DN.FLR to list only reachable nodes.

         o  DN.FLE to list only EXECUTOR nodes.

   And length is the length of the argument block returned.   If  you  do
   not  specify  step  mode  by  setting  DN.FLS,  you  must  specify the
   node-name in addr+1.

   The monitor returns the argument list in the following form:

   Word      Symbol    Contents

   1         .DNNAM    Node name.
   2         .DNRTR    Router information, in the following format:

                       Bits      Symbol    Meaning

                       0         DN.RCH    Set if the node is reachable.
                       1-17      DN.HOP    The number of hops to the
                                           specified node.
                       18-35     DN.CST    The cost of the path to the
                                           specified node.

   3         .DNLLI    Link information, in the following format:

                       Bits      Symbol    Meaning

                       0         DN.VLD    On if the word contains valid
                                           information.
                       1-17      DN.LNK    The number of active links to
                                           the node.
                       18-35     DN.DLY    The message delay time to the
                                           node.

   4         .DNADR    Node address.

   5-10      .DNCKT    Circuit name, up to 4 ASCIZ  words.   This  string
                       may contain up to 16 characters.



   22.34.3  FUNCTION 3 (.DNSLS)

   Shows link status.  You must specify the following at addr:

   addr:     DN.FLS+<.DNSLS,,length>
             jobno,,channo





                                   22-105
                             DNET. [CALLI 207]


   In the argument list, you can supply the following information:

         o  The optional flag, DN.FLS, to step through the node list.  If
            you  set  DN.FLS, be sure that addr+1 is 0 on the first call,
            so that the information is returned  starting  at  the  first
            node in the node list.

         o  length is the number  of  words  reserved  for  the  returned
            argument list.

   The monitor returns the argument list in the following form:

   Word      Symbol    Contents

   1         .DNJCN    Currently displayed job number (DN.JOB)  and  link
                       number (DN.CHN).

   2         .DNNOD    Remote node name, in SIXBIT.

   3         .DNOBJ    Object  types,  where  the  left   half   (DN.DOB)
                       contains  the  destination  object  type,  and the
                       right half (DN.SOB)  contains  the  source  object
                       type.

   4         .DNSTA    Status word.  The left half of this word  (DN.LSW)
                       contains  the  status  variable  bits and the link
                       status code.  The variable bits are:

                       Bit       Symbol    Meaning

                       0         NS.IDA    Interrupt data is available.
                       1         NS.IDR    Interrupt data may be sent.
                       2         NS.NDA    Normal data is available.
                       3         NS.NDR    Normal data may be sent.

                       The remainder of the left half contains a  numeric
                       code  associated with the symbol that is stored in
                       the right half.

                       The right half of this word  (DN.STA)  contains  a
                       SIXBIT symbol representing the status of the link.
                       The status codes  and  associated  SIXBIT  symbols
                       are:

                       Code      Symbol    State

                       1          CW       Connect wait.
                       2          CR       Connect message received.
                       3          CS       Connect message sent.
                       4          RJ       Remote task rejected connect
                                           initiation message.
                       5          RN       Link is up and running.


                                   22-106
                             DNET. [CALLI 207]


                       6          DR       Disconnect message received.
                       7          DS       Disconnect message sent.
                       10         DC       Disconnect message has been
                                           confirmed.
                       11         CF       No confidence in link.
                       12         LK       No link exists.
                       13         CM       No communication has taken
                                           place.
                       14         NR       No resources exist.

   5         .DNQUO    Quota word, where the left half (DN.IQT)  contains
                       the  input  quota,  and  the  right  half (DN.OQT)
                       contains the output quota.

   6         .DNSEG    Segment size.

   7         .DNFLO    Flow control option, where the left half  (DN.XMF)
                       contains   the   flow   control  option  used  for
                       transmission, and the right half (DN.RCF) contains
                       the   flow   control  option  used  for  receiving
                       messages.

   10        .DNMSG    Message count word, where the left  half  (DN.MRC)
                       contains  the number of messages received, and the
                       right  half  (DN.MXM)  contains  the   number   of
                       messages transmitted.

   11        .DNMPR    Monitor process word.  If the job number at .DNJCN
                       is -1, this is the terminal number that NRTSER has
                       been given for this particular link.  This word is
                       0 for any job number other than -1.

   ERROR RETURN

   On an error, one of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         DNADE%    Address error.
   2         DNWNA%    Wrong number of arguments.
   3         DNIDN%    Illegal job number.
   4         DNFNE%    Illegal function number.
   5         DNILF%    Illegal flag set.
   6         DNNSN%    No such node name.
   7         DNNSC%    No such channel.
   10        DNNDA%    Node is in a different DECnet area.








                                   22-107
                             DNET. [CALLI 207]


   SKIP RETURN

   Function has been performed successfully.

   EXAMPLE

   The following example shows the  programming  sequence  used  to  list
   known nodes, up to the specified length, starting at location DNARG.

             MOVE      T1,[DN.FLK+<.DNLNN,,100>]
             MOVEM     T1,DNARG
             MOVEI     T1,DNARG
             DNET.     T1,
               HALT              ;Error return
   DNARG:    BLOCK     100

   On a skip return, the argument block  is  filled  with  the  following
   information:

   DNARG:    DN.FLK!<.DNLNN,,100>          ;Function-code+flags
             20                            ;Number of nodes
             SIXBIT    /ONE/               ;Node names
             SIXBIT    /TWO/
             SIXBIT    /THREE/
             SIXBIT    /KL1026/
             SIXBIT    /JINX/
             SIXBIT    /GNOME/
             .
             .
             .
























                                   22-108
                             DSKCHR [CALLI 45]


   22.35  DSKCHR [CALLI 45]

   FUNCTION

   Returns the characteristics of a disk device.   These  characteristics
   are needed to allocate storage efficiently on the disk.

   CALLING SEQUENCE

             MOVE      ac,[XWD len,addr]
             DSKCHR    ac,
               error return
             skip return
             . . .
   addr:     SIXBIT    /name/
             BLOCK     length-1

   In the calling sequence, you can provide the following information:

         o  name is the SIXBIT name of a  file  structure,  a  controller
            type,  a  controller,  a  logical  unit,  a  physical unit, a
            physical device, or a channel number.

         o  length-1 is the number of words in the argument list.

   If more than one unit was specified, the monitor returns values in the
   ac  and the argument block, pertinent to the first unit specified.  If
   more than one file structure was specified, the monitor returns values
   in the ac and argument block, pertinent to the first unit on the first
   file structure.

   SKIP RETURN

   On a successful return,  the  disk  characteristics  are  returned  in
   addr+1  through addr+<length-1>, and disk status flags are returned in
   the ac.

   The contents of the returned argument block are:

   Word      Symbol    Contents

   0         .DCNAM    The argument supplied for the call.  This  is  the
                       only  word  in  the  argument  block that the user
                       program supplies.  The .DCNAM argument  may  be  a
                       channel number.

   1         .DCUFT    The number of blocks  left  in  your  job's  quota
                       before  the  UFD  is  exhausted.  If this value is
                       negative  (DC.NPA==1B0),  the  UFD  has  not  been
                       accessed since the job logged in, and the quota is
                       not available.  To  obtain  this  information  for
                       jobs  other than your own, use the .DUFRE function
                       of the DISK. UUO.

                                   22-109
                             DSKCHR [CALLI 45]


   2         .DCFCT    The  number  of  first-come,  first-served  blocks
                       available to all users.

   3         .DCUNT    The number of blocks available  to  all  users  on
                       this file structure.

   4         .DCSNM    SIXBIT name of the structure to  which  this  unit
                       belongs.

   5         .DCUCH    The size characteristics are:

                       Bits      Symbol    Meaning

                       0-8       DC.UCC    Number of blocks per cluster.
                       9-17      DC.UCT    Number of blocks per track.
                       18-35     DC.UCY    Number of blocks per cylinder.

   6         .DCUSZ    Number of 128-word blocks on the unit.

   7         .DCSMT    Mount count for the structure.  This count is  the
                       number  of jobs that performed a MOUNT command for
                       this file structure without executing  a  DISMOUNT
                       command.   Note  that  LOGIN  performs  an implied
                       MOUNT of all structures in DSK,  the  default  job
                       search list.

   10        .DCWPS    Number of words per SAT block.

   11        .DCSPU    Number of SAT blocks for each unit.

   12        .DCK4S    Space (in K) allocated for swapping.

   13        .DCSAJ    Mount word for the structure:

                       Value     Meaning

                       0,,0      No job or more than one job has the
                                 structure mounted.
                       -1,,n     One job (number n) has the structure
                                 mounted and the structure is not
                                 single-access.
                       0,,n      One job (number n) has the structure
                                 mounted and the structure is
                                 single-access.

   14        .DCULN    SIXBIT logical name of the unit.

   15        .DCUPN    SIXBIT physical name of the unit.

   16        .DCUID    SIXBIT identification of the unit.

   17        .DCUFS    First logical block to be used for swapping.


                                   22-110
                             DSKCHR [CALLI 45]


   20        .DCBUM    Number of blocks per unit  (including  maintenance
                       cylinders).

   21        .DCCYL    Current cylinder number.

   22        .DCBUC    Number of blocks per unit in PDP-11  compatibility
                       mode.

   23        .DCLPQ    Length of the position wait queue.

   24        .DCLTQ    Length of the transfer wait queue.

   25        .DCALT    Unit name for alternate port.

   26        .DCOWN    Owner PPN of structure.

   27        .DCPAS    Position in active swapping list if argument was a
                       physical unit; -1 if not in list.

   30        .DCPSD    Position in system dump list  if  argument  was  a
                       structure; -1 if not in list.

   31        .DCBSC    Blocks per super-cluster.

   32        .DCXCH    The extended unit characteristics:

                       Bits      Symbol    Meaning

                       0-8       DC.XCC    Data channel number.
                       9-17      DC.XCK    Unit controller number.
                       18-26     DC.XCU    Physical unit number.
                       27-35     DC.XCA    Bit mask of accessible CPUs
                                           (1B35=CPU0, 1B34=CPU1, etc.).

   33        .DCDET    Name of the alternate port.   The  port  does  not
                       have to be attached.

   34        .DCNUS    The name of the next unit in  the  specified  file
                       structure.

   35        .DCBRC    Count of blocks read by buffered I/O.

   36        .DCBWC    Count of blocks written by buffered I/O.

   37        .DCDRC    Count of blocks read by dump I/O.

   40        .DCDWC    Count of blocks written by dump I/O.

   41        .DCMRC    Count of blocks read by monitor I/O.

   42        .DCMWC    Count of blocks written by monitor I/O.



                                   22-111
                             DSKCHR [CALLI 45]


   43        .DCSRC    Count of blocks read by swap I/O.

   44        .DCSWC    Count of blocks written by swap I/O.

   45        .DCPRC    Count of blocks read by paging I/O.

   46        .DCPWC    Count of blocks written by paging I/O.

   47        .DCFKS    Remaining swap space.

   50        .DCCBK    Count of disk cache blocks in use.

   51        .DCCRC    Count of disk cache read calls.

   52        .DCCRH    Count of disk cache read hits.

   53        .DCCWC    Count of disk cache write calls.

   54        .DCCWH    Count of disk cache write hits.

   55        .DCSDV    Count of soft device/search errors.

   56        .DCSDT    Count of soft data errors.

   57        .DCHDV    Count of hard device/search errors.

   60        .DCHDT    Count of hard data errors.

   61        .DCECT    Count of retries on last error.

   62        .DCSER    Count of SAT errors.

   63        .DCRER    Count of RIB errors.

   64        .DCCER    Count of software checksum/consistency errors.

   65        .DCHBN    Logical block number of last error (within unit).

   66        .DCERR    Last error status.

|  67        .DCSOF    Last error status.

   70        .DCHDI    Last error status.

   71        .DCSDI    Last error status.

   72        .DCNHG    Count of non-recoverable transfer-hung errors.

   73        .DCTHG    Count of transfer-hung errors.

   74        .DCPHG    Count of position-hung errors.



                                   22-112
                             DSKCHR [CALLI 45]


   75        .DCSHG    Count of software-hung errors.

   76        .DCXSF    Status flags:

                       Bits      Symbol    Contents

                       0-1       DC.FES    Front end port status code.
                                           The port status codes are:

                       Code      Symbol    Meaning

                       0                   Monitor cannot determine the
                                           status.
                       1         .DCFEN    Not accessible from this front
                                           end.
                       1         .DCFEA    Accessible from this front
                                           end.
                       2         .DCFEB    This is the front-end boot
                                           device.

   SKIP RETURN

   The flags returned in the ac are as follows:

   Bits      Symbol    Meaning

   0         DC.RHB    Disk pack off-line; the monitor  must  reread  the
                       home block before the next operation to verify the
                       pack identification.

   1         DC.OFL    Unit is off-line.

   2         DC.HWP    Hardware write-protected.

   3         DC.SWP    Belongs to write-protected file structure.

   4         DC.SAF    Belongs to single-access file structure.

   5         DC.ZMT    Mount count is zero.

   6         DC.PRV    Belongs to private file structure.

   7-8       DC.STS    Status code for unit:

                       Code      Symbol    Status

                       0         .DCSTP    Has pack mounted.
                       2         .DCSTN    No pack mounted.
                       3         .DCSTD    Unit down.

   9         DC.MSB    Unit has more than one SAT block.



                                   22-113
                             DSKCHR [CALLI 45]


   10        DC.NNA    Belongs to a structure that has a lock to  prevent
                       further    INIT,    LOOKUP,   ENTER,   OPEN,   and
                       FILOP. calls  (NNA  indicates  "no  new  access").
                       This lock is set by a privileged STRUUO function.

   11        DC.AWL    Write-locked for all jobs.

   12-13     DC.CPU    CPU number of the  CPU  to  which  the  device  is
                       connected.    DC.XCC  in  word  .DCXCH  supersedes
                       DC.CPU.

   14        DC.ALT    Dual-ported device.

   15-17     DC.TYP    Type of argument passed with the DSKCHR call:

                       Code      Symbol    Meaning

                       0         .DCTDS    Generic name, such as DSK.
                       1         .DCTAB    File structure subset, because
                                           of abbreviation, such as D.
                       2         .DCTFS    File structure name, such as
                                           DSKA.
                       3         .DCTUF    Unit within file structure,
                                           such as DSKA0.
                       4         .DCTCN    Controller class name, such as
                                           FH.
                       5         .DCTCC    Controller name, such as RPA.
                       6         .DCTPU    Physical unit, such as RPA0.

   18-20     DC.DCN    Data  channel  number  that  software   lists   as
                       connected to hardware; first data channel is 0.
   21-26     DC.CNT    Controller type:

                       Code      Symbol    Controller Type

                       1         .DCCFH    RC10 for RD10 and RM10-B.
                       2         .DCCDP    RP10 for RP02 and RP03.
                       4         .DCCFS    RH10 for fixed head disk.
                       5         .DCCRP    RH10/RH20/RH11 for moving head
                                           disk (RP04, RP06, RP07, and
                                           RM03).
                       6         .DCCRN    RH20 for RP20.
                       7         .DCCRA    HSC for CI disks.
                       10        .DCCSX    SA10 for IBM disks (3330, for
                                           example).

   27-29     DC.CNN    Controller number; first one of each type is 0.







                                   22-114
                             DSKCHR [CALLI 45]


   30-32     DC.UNT    Unit type:

                       Code      Symbol    Meaning   When

                       0         .DCUFD    RD10      (DC.CNT=1)
                       0         .DCUS4    RS04      (DC.CNT=4)
                       0         .DCUR4    RP04      (DC.CNT=5)
                       0         .DCUN0    RP20      (DC.CNT=6)
                       0         .DCU80    RA80      (DC.CNT=7)
                       0         .DCUS0    3330      (DC.CNT=17)
                       1         .DCUFM    RM10-B    (DC.CNT=1)
                       1         .DCUD2    RP02      (DC.CNT=2)
                       1         .DCUR6    RP06      (DC.CNT=5)
                       1         .DCU81    RA81      (DC.CNT=7)
                       1         .DCUS1    3331      (DC.CNT=17)
                       2         .DCUD3    RP03      (DC.CNT=2)
                       2         .DCUR3    RM03      (DC.CNT=5)
                       2         .DCU60    RA60      (DC.CNT=7)
                       3         .DCUR7    RP07      (DC.CNT=5)

   33-35     DC.UNN    Physical unit number within the controller;  first
                       one is 0.

   ERROR RETURN

   The error return occurs under one of the following conditions:

         o  The argument at addr is 0.

         o  The device does not exist or channel is not initialized.

         o  The argument is illegal.

   EXAMPLE

   The following example checks a user's  logged-in  quota  on  structure
   DSKB:

             MOVE      T1,[2,,ADDR]
             DSKCHR    T1,
               JRST    NOQTA
             SKIPGE    ADDR+.DCUFT
               JRST    NOQTA
               . . .
   ADDR:     SIXBIT    /DSKB/
             BLOCK 1

   This code tests the value returned from the DSKCHR call.  When  DSKCHR
   fails,  or  when  no quota is returned at ADDR+1, the program jumps to
   NOQTA, where it must act on the possibility that the structure is  not
   mounted or there is no quota on the structure.



                                   22-115
                              DTE. [CALLI 170]


   22.36  DTE.  [CALLI 170]

   FUNCTION

   Performs  functions  for  the  DTE  (KL  systems  only),  and  is  not
   recommended  for customer programs.  To use the DTE. monitor call, you
   must have the JP.POK or JACCT privilege, or be logged in under [1,2].

   CALLING SEQUENCE

             MOVE ac,[fcn-code,addr]
             DTE. ac,
               error return
             skip return
             . . .
   addr:     argument-list

   In the calling sequence, the program provides the following variables:

         o  fcn-code is one of the function codes described below.

         o  addr is the address of  the  argument  list.   Each  function
            requires  a  different  argument  list.   These are described
            below.

   In the following discussion of the DTE. functions,

         o  cpuno is the number of a CPU.

         o  dteno is the number of a DTE.

         o  fedno is the unit number of a front-end device.

   The function codes and their meanings are:

   Code      Symbol    Function

   0         .DTECL    Clears a PDP-11 on a DTE.  The argument  list  for
                       the .DTECL function is:

                       addr:   XWD     cpuno,dteno

   1         .DTEST    Starts primary protocol on a  DTE.   The  argument
                       list for the .DTEST function is:

                       addr:   XWD     cpuno,dteno

   2         .DTETB    Sets  the  byte   pointer   for   messages   being
                       transferred  to  the  DECsystem-10.   The argument
                       list for the .DTETB function is:

                       addr:   XWD     cpuno,dteno
                               EXP     <byte pointer to DECsystem-10>

                                   22-116
                              DTE. [CALLI 170]


   3         .DTEEB    Sets the byte pointer for messages transmitted  to
                       the  PDP-11.   The  argument  list  for the .DTEEB
                       function is:

                       addr:   XWD     cpuno,dteno
                               EXP     <byte pointer to PDP-11>

   4         .DTERW    Returns the PDP-11 reload ROM word in the ac.  The
                       argument list for the .DTERW function is:

                       addr:   XWD     cpuno,dteno

                       If bit 4 (DT.RP4) is set on return, the PDP-11 got
                       code from the disk.

   5         .DTEMN    Return (in ac) the master DTE number for the  CPU.
                       The argument list for the .DTEMN function is:

                       addr:   XWD     cpuno,dteno

   6         .DTEPR    Presses the PDP-11 reload  button.   The  argument
                       list for the .DTEPR function is:

                       addr:   XWD     cpuno,dteno

   7         .DTEGS    Returns the status word for the DTE.   The  status
                       word for the specified DTE is returned in ac.  The
                       argument list for the .DTEGS function is:

                       addr:   XWD     cpuno,dteno

                       The status flags that can be returned are:

                       Flag   Symbol    Meaning

                       6      DT.DTX    DTE exists.
                       7      DT.DTM    DTE is master DTE.
                       8      DT.PPC    DTE is running primary protocol.
                       9      DT.SPC    DTE is running secondary
                                        protocol.
                       10     DT.RLD    DTE needs reloading.

   10        .DTERJ    Sets reload job number.  The argument list for the
                       .DTERJ function is:

                       addr:   EXP     jobno

                       In the argument word, jobno is the job number  for
                       the reload.

   11        .DTEGF    Assigns the specified Front End  Device  (FED)  to
                       the  current  job in its current job context.  The


                                   22-117
                              DTE. [CALLI 170]


                       FED can then be operated using the DTE.  functions
                       for  FEDs  (.DTEIF,  .DTEOF,  .DTEFG., .DTEFS, and
                       .DTEFR).  Privileged  programs  can  use  the  FED
                       functions to communicate with the software running
                       on PDP-11 devices connected to the system  with  a
                       DTE.   That  software  includes GALAXY, DDT11, and
                       the FE program.

                       To assign a FED, use the following argument block:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno

                       In the argument word:

                        o  cpuno is the CPU number.

                        o  dteno is the number of the DTE  to  which  the
                           FED is connected.

                           In addr+1, specify the unit number of the FED.
                           On   a   successful   return   from  the  DTE.
                           function,  the  contents   of   the   ac   are
                           indeterminate.

                           You can use this function to assign the  first
                           free  FED unit on the specified CPU and DTE by
                           specifying -1 for fedno.  In  this  case,  the
                           FED unit number will be returned in the ac.

   12        .DTEIF    Front-end device input.  The argument list for the
                       .DTEIF function is:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno
                               XWD     byte-count, addr-of-input-buffer

   13        .DTEOF    Front-end device output.  The  argument  list  for
                       the .DTEOF function is:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno
                               XWD     byte-count,addr-of-output-buffer

   14        .DTEFG    Returns (in ac) the front-end device status.   The
                       argument list for the .DTEFG function is:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno

                       The returned device status flags are:



                                   22-118
                              DTE. [CALLI 170]


                       Flag   Symbol    Meaning

                       28     DT.FER    Fatal error.
                       29               Reserved.
                       30     DT.EOF    End of file.
                       31     DT.IOP    I/O in progress.
                       32     DT.SER    Soft error.
                       33     DT.HER    Hard error.
                       34     DT.OFL    Off-line.
                       35     DT.NXD    Nonexistent device.

   15        .DTEFS    Sets front-end device status.  The  argument  list
                       for the .DTEFS function is:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno
                               EXP     status

                       In the argument word, status is  the  status  word
                       for the front-end device.

   16        .DTEFR    Releases a front-end device.   The  argument  list
                       for the .DTEFR function is:

                       addr:   XWD     cpuno,dteno
                               EXP     fedno

   17        .DTERC    Releases KL error chunks.  The argument  list  for
                       the .DTERC function is:

                       addr:   XWD     cpuno,0
|  
|  20        .DTERT    Obsolete

   21        .DTEDT    Returns  Universal  Device  Indexes  for  terminal
                       lines  leading  to the DL11s on the specified DTE.
                       The argument list for this function is:

                       addr:   XWD     cpuno,dteno

                       On a successful return, the UDX is returned in the
                       ac.  However, for DTE 0, which is dedicated to the
                       console front end (RSX-20F), the ac  contains  the
                       KLINIK  line's UDX in the left half, and the CTY's
                       UDX in the right half.









                                   22-119
                              DTE. [CALLI 170]


   22        .DTESU    Specifies the type of protocol that  will  run  on
                       the DTE.  The argument list for this function is:

                       addr:   XWD     cpuno,dteno
                               SIXBIT/user-name/

                       where  the  user-name  is  one  of  the  following
                       protocol types:

                              DECNET  for DECnet-10.
                              ANF     for ANF-10.
                              IBM     for IBM communications.
                              NOBODY  if the DTE is not running a
                                      protocol.
                              PROGRA  if the DTE is dedicated to a job.

   23        .DTERU    Reads the protocol type of the  protocol  that  is
                       running on the DTE.  The argument list is:

                       addr:   XWD     cpuno,dteno
                               BLOCK   2

                       The  information  is  returned  in  the  following
                       format:

                       addr:   XWD     cpuno,dteno
                               SIXBIT/user-name/
                               EXP     jobn

                       where  user-name  is  the  name  of  the  protocol
                       running  on  the DTE (refer to .DTESU above).  The
                       job number (jobn) is returned in  addr+2  only  if
                       user-name is PROGRA.

   24        .DTELS    Loads a secondary bootstrap from your job's memory
                       area,   using  the  PDP-11  bootstrap  ROM.   This
                       function must be preceded by  the  .DTECL  (clear)
                       and  .DTEPR  (press  reload)  functions.  You must
                       also use function .DTEDM  (dump)  before  you  can
                       load  any  bootstrap.   The argument list for this
                       function is:

                       addr:   XWD     cpuno,dteno
                               POINT   16,addr1
                               EXP     length

                       where addr+1 contains a  byte  pointer  indicating
                       the  location  of the secondary loader, and length
                       is the length of the loader, in 16-bit bytes.





                                   22-120
                              DTE. [CALLI 170]


   25        .DTEDM    Dumps PDP-11 memory, using  the  PDP-11  bootstrap
                       ROM.  Before you use this function, be sure to use
                       functions  .DTECL  (clear)   and   .DTEPR   (press
                       reload).   You  must always dump the PDP-11 memory
                       before you can load a  program  into  its  memory.
                       The argument list for this function is:

                       addr:   XWD     cpuno,dteno
                               POINT   16,addr1
                               EXP     count

                       where addr+1 contains a byte-pointer to the memory
                       that must be dumped, and where count is the number
                       of 16-bit bytes to dump from the PDP-11.

   26        .DTKPS    Set KLINIK parameters.  (Not intended for customer
                       use.)

   27        .DTKPR    Read  KLINIK  parameters.    (Not   intended   for
                       customer use.)

   SKIP RETURN

   The function is performed, and any requested value is  stored  in  the
   ac.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         DTENP%    Not enough privileges.
   2         DTEUF%    Illegal function code.
   3         DTEDC%    Illegal CPU or DTE number.
   4         DTEAP%    Primary protocol already running.
   5         DTEPT%    Power fail did not come up.
   6         DTEDE%    Doorbell did not clear.
   7         DTTTE%    To TOPS-10 error during BOOT sequence.
   10        DTEDD%    No response from PDP-11 after BOOT sequence.
   11        DTEIJ%    Illegal job number.
   12        DTEIB%    Illegal byte count.
   13        DTENI%    Front-end device not initialized.
   14        DTEFB%    Front-end device in use by another job.
   15        DTENF%    Nonexistent front-end device.
   16        DTEFE%    Fatal error on front-end device.
   17        DTESE%    Error starting primary protocol.
   20        DTENC%    No free core for front-end device buffers.
   21        DTETE%    KL error data timer expired.
   22        DTECM%    The FEDSER monitor module was told not to send
                       messages to the PDP-11.
   23        DTEIU%    Tried to set line to illegal user value.


                                   22-121
                              DTE. [CALLI 170]


   24        DTEWU%    Wrong line user for function.
   25        DTEEV%    No exec virtual memory to perform function.
   26        DTEIP%    Illegal byte pointer.



















































                                   22-122
                             DVPHY. [CALLI 164]


   22.37  DVPHY.  [CALLI 164]

   FUNCTION

   Returns  the  physical  names  of  devices  and  controllers   (except
   pseudo-terminals, terminals, MPX devices, and disks).

   By specifying the device type (as returned  by  DVTYP. UUO),  you  can
   return  all  the  physical  device  names for a specific device or all
   devices.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             DVPHY.  ac,
               error return
             skip return
             . . .
   addr:   / EXP     device-type \
           \ EXP     -1          /
             BLOCK   1

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument block (must be 2).

         o  addr is the address of the argument block.  The first word of
            the argument list specifies the devices to list:

         o  device-type is one of the device type codes returned from the
            DEVTYP monitor call, such as .TYLPT for a line printer.

   To list all the devices, use -1 instead of the device type.

   To list all controllers for a specific type of device, use the [-n,,m]
   format,  where  n  is  the number device types to return, and m is the
   device type code.
   On the first  DVPHY. call,  addr+1  should  contain  0.   The  monitor
   returns  the  name  of  the  first  device.  If you leave this name in
   addr+1, the next DVPHY. call returns the name of the next device,  and
   so forth.  When all devices have been returned (by several calls), the
   monitor returns 0 in addr+1.

   SKIP RETURN

   For 0 in addr+1, the monitor returns the name of the first device; for
   a  device  name  in  addr+1,  the monitor returns the name of the next
   device, or, if there are no more devices, 0.  The ac is unchanged.






                                   22-123
                             DVPHY. [CALLI 164]


   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         DVPIA%    Illegal argument length.
   2         DVPIT%    Illegal device type.
   3         DVPNP%    Nonexistent physical device.
   4         DVPNT%    Nonexistent device type.

   EXAMPLE

   The following example shows how to obtain the physical  names  of  all
   line printers on the system:

             SETZB     T1,ADDR+1 ;Initialize counter and device name
   TAG1:     MOVE      T2,[XWD 2,ADDR] ;Set up call
             DVPHY.    T2,       ;Get name
               JRST    ERROR     ;Error
             SKIPN     T3,ADDR+1 ;Get name, skip if not at end
               JRST    TAG2      ;0 means we're done
             MOVEM     T3,LPTNAM(T1) ;Save in next block-slot
             AOJA      T1,TAG1   ;Increment count and loop
   TAG2:     MOVEM     T1,NLPT   ;Save count
             JRST      CONTIN
   NLPT:     BLOCK     1
   LPTNAM:   BLOCK     10
   ADDR:     EXP       .TYLPT    ;Type is LPT
             EXP       0         ;Start with first device
   CONTIN:

   RELATED CALLS

         o  SYSPHY

         o  SYSSTR

   COMMON PROGRAMMING ERRORS

   Using a SIXBIT name for device type.













                                   22-124
                             DVRST. [CALLI 122]


   22.38  DVRST.  [CALLI 122]

   FUNCTION

   Restricts the use of a device.  Once restricted, the  device  is  then
   assignable  only  by  the  operator;  unprivileged  users must request
   assignment  through  the  MOUNT  monitor  command  before  using   the
   OPEN/INIT  monitor  call.  (See the Commands Manual.) Privileged users
   (JACCT or [1,2]) can still use the OPEN or INIT monitor call,  or  the
   ASSIGN command, if the device is not controlled by MDA.

   The DVRST. monitor call requires the JACCT privilege or  that  you  be
   logged in under [1,2].

   CALLING SEQUENCE

           / MOVE    ac,[SIXBIT/device/] \
          |  MOVEI   ac,channo            |
           \ MOVEI   ac,udx              /
             DVRST.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  device is the SIXBIT physical or logical name of a device  to
            be designated as being restricted.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   SKIP RETURN

   The device is restricted.

   ERROR RETURN

   The error return occurs if any of the following  conditions  is  found
   (the ac is unchanged):

         o  You do not have the JACCT privilege  or  are  not  logged  in
            under [1,2].

         o  The specified device does not exist.

         o  The device is a disk.

   RELATED CALLS

   DVURS.



                                   22-125
                             DVURS. [CALLI 123]


   22.39  DVURS.  [CALLI 123]

   FUNCTION

   Removes  the   restriction   created   by   a   DVRST. monitor   call.
   DVURS. requires  the  JACCT  privilege  or that you be logged in under
   [1,2].

   CALLING SEQUENCE

           / MOVE    ac,[SIXBIT/device/] \
          |  MOVEI   ac,channo            |
           \ MOVEI   ac,udx              /
             DVURS.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  device is the SIXBIT physical or logical  name  of  a  device
            that is to be returned to unrestricted status.

         o  channo is the number of an initialized channel.

         o  udx is the Universal Device Index for a device.

   SKIP RETURN

   The restriction is removed.  The device is available  for  public  use
   and returned to the monitor's pool of available devices.

   ERROR RETURN

   The error return occurs if any of the following  conditions  is  found
   (the ac is unchanged):

         o  You do not have the JACCT privilege  or  are  not  logged  in
            under [1,2].

         o  The given device does not exist.

   RELATED CALLS

   DVRST.










                                   22-126
                              ENQ. [CALLI 151]


   22.40  ENQ.  [CALLI 151]

   FUNCTION

   Requests access to resources that  are  defined  by  cooperating  user
   programs.   The  ENQ.  call is one of three monitor calls that provide
   control over the ENQ/DEQ facility, which provides resource definition,
   control  over  access  to  resources,  and  deadlock detection for the
   resources.  The ENQ/DEQ facility is described in Chapter 8.

   CALLING SEQUENCE

             MOVE    ac,[XWD fcn-code,addr]
             ENQ.    ac,
               error return
             skip return
             . . .
   addr:     EXP     <size>B5+<number>B17+<len>B35   ;header block
             XWD     0,request-id                    
             XWD     time-limit
             <lock block>
             <lock block>
                 .
                 .
                 .

   In the calling sequence, the program supplies the following variables:

         o  fcn-code is one of the function codes listed below.

         o  addr is the address of the argument block, which consists  of
            a header block followed by one or more lock blocks.

   The header block contains 1 to 3 words, in the following order:

   Offset    Symbol     Contents

   0         .ENQLL    The header size, the number of lock requests,  and
                       the  total  length  of the argument, including the
                       header and all the words in all the  lock  blocks.
                       Specifically,  the  .ENQLL  word  is  formatted as
                       follows:

                       Bits    Symbol   Value

                       0-5     EQ.BHS   Size of the header  block.   This
                                        value is between 1 and 3, because
                                        the second and  third  words  are
                                        optional.    If   you  omit  this
                                        value, the default is 2.

                       6-17    EQ.LNL   Number of lock  blocks  following


                                   22-127
                              ENQ. [CALLI 151]


                                        the  header  block.   Include one
                                        lock  block  for  each   resource
                                        requested.

                       18-35   EQ.LLB   Total length (in  words)  of  the
                                        argument  block.   All  the  lock
                                        blocks in a single  request  must
                                        be  the  same  length.  Thus, the
                                        value of  EQ.LLB  is  the  header
                                        block  length  (EQ.BHS)  plus the
                                        length of each lock  block  times
                                        the number of resources requested
                                        (EQ.LNL).

   1         .ENQRI    An 18-bit  request-id  identifying  this  request.
                       This  optional value identifies the ENQ.  request,
                       enabling you to  identify  it  when  it  causes  a
                       software  interrupt.   This is useful when you use
                       the  ENQ/DEQ  facility  in  conjunction  with  the
                       software   interrupt   (PSI)   system.   After  an
                       interrupt is generated,  the  request-ids  of  the
                       granted  requests  are  inclusively  ORed into the
                       status word of the interrupt block.  To receive  a
                       software  interrupt,  use function code 2 (.ENQSI)
                       when  you  issue  the  ENQ. monitor   call.    The
                       request-id can also be used with the DEQ.  call to
                       dequeue a specific request.

   2         .ENQTL    Time limit specifying the  number  of  seconds  to
                       wait  for  each request in the call to be granted.
                       If any resource is not available within that  time
                       limit,  the  call  takes the error return with the
                       ENQTL%  error  code  in  the  ac.   This  word  is
                       optional.   If  you  include the time limit in the
                       header block, specify 3 for size in word 0.

   Each lock block represents a separate  ENQ.   request.   There  is  no
   limit  to  the  number  of  locks  that can be requested, but multiple
   requests in the same ENQ.  call must  be  given  level  numbers.   The
   locks will be granted in the order of the level numbers.

   The format of a lock block is shown here and described in more  detail
   on the following pages

   Word      Symbol    Contents

   0         .ENQFL    flags+<level>B17+channo

   1         .ENQBP     / flags+user-code \
                       |  user-code        |
                        \ string-pointer  /



                                   22-128
                              ENQ. [CALLI 151]


   2         .ENQPS     / pool-size,,number \
                        \ 0,,sharer-group   /

   3         .ENQMS    mask-length,,mask-addr

   4         .ENQTB    block-length,,block-addr

   A lock block is two to five words long, identifying the resource to be
   locked  and  describing  the  characteristics  of the lock.  The first
   requestor of a  resource  defines  lock  characteristics.   Subsequent
   requests  for  the same resource must conform to those characteristics
   or wait until the resource is released by the first requestor.

   In the case of multiple-lock requests, all the lock blocks in a single
   ENQ.  request must be the same length.  Specifically, a lock block can
   contain the following words:

   Offset    Symbol    Contents

   0         .ENQFL    Contains the flag bits, level number, and  channel
                       number.  The flags are:

                       Bit     Symbol   Meaning

                       0       EQ.FSR   The lock request allows  sharers.
                                        If  you  do not set this bit, the
                                        monitor assumes that you  require
                                        exclusive access to the resource.
                                        Unless the  first  requestor  for
                                        the  resource  sets this flag, no
                                        requests for  the  same  resource
                                        (specified   in  the  next  word,
                                        .ENQBP) can be granted until  the
                                        first   requestor   dequeues   it
                                        (using DEQ.  or RESET).   If  the
                                        first  requestor  sets  this bit,
                                        other  programs  with  the   same
                                        sharer   group   number  as  that
                                        specified in  .ENQPS  can  obtain
                                        access  to  the resource while it
                                        is locked for your job.

|                      1       EQ.FBL   Bypass  level   checking.    When
|                                       multiple  request blocks are made
                                        in a single ENQ.  call, you  must
                                        assign  a  level  number  to each
|                                       request.  When EQ.FBL is not set,
|                                       lower-level   resources  will  be
|                                       granted    before    higher-level
|                                       resources  are  considered.   The
|                                       EQ.FBL   flag    prevents    this
                                        level-checking,          allowing


                                   22-129
                              ENQ. [CALLI 151]


                                        resources    to    be     granted
                                        regardless   of  their  order  by
                                        level number.

                       2       EQ.FLT   Grant a long-term lock.  That is,
                                        after the resource is dequeued by
                                        all  users,  the  lock  data   is
                                        preserved for about 5 minutes.

                       3       EQ.FEL   Grant  an  eternal  lock.    This
                                        prevents the resources from being
                                        dequeued automatically when  your
                                        program    performs    a    RESET
                                        function.

                       4       EQ.FAB   Abort   the    resource.     This
                                        prevents  the resource from being
                                        accessible to any other user.   A
                                        request   for   an  aborted  lock
                                        causes error code  ENQAB%  to  be
                                        returned in the ac.  The resource
                                        cannot be granted to another user
                                        until it is dequeued.

                       5       EQ.FDD   Set  deadlock  detection.    This
                                        flag  prevents  your request from
                                        causing a deadlock among resource
                                        users.   If this flag is set, and
                                        granting your request would cause
                                        a  deadlock, the ENQ.  call takes
                                        the error return with error  code
                                        ENQDD% in the ac.

                       6       EQ.FCW   Specifies that a 36-bit user code
                                        is  included  in  the  next  word
                                        (.ENQBP).  This is the  preferred
                                        method  of specifying a user code
                                        in the lock block.

                       7-8              Reserved for use by DIGITAL.

                       9-17    EQ.FLV   9-bit   level-number   that   you
                                        assign   to  each  request  in  a
                                        multiple-lock  request.    In   a
                                        multiple-lock  request  (a single
                                        ENQ.   call  containing  multiple
                                        lock  blocks),  each  lock  block
                                        must be assigned a level  number;
                                        the  locks  will  be  granted  in
                                        ascending     numerical     order
|                                       according to level number, unless
|                                       you  set  EQ.FBL  (bypass   level


                                   22-130
                              ENQ. [CALLI 151]


|                                       checking) in the flag word.

                       18-35   EQ.FCC   The  number  of  the  channel  on
                                        which   the   resource  is  being
                                        accessed (positive  integer),  to
                                        associate  the lock with the file
                                        that is  open  on  that  channel.
                                        Alternatively,  you can specify a
                                        negative number indicating one of
                                        the following conditions:

                                        Code   Symbol   Meaning

                                        -3     .EQFPL   The          lock
                                                        requested   is  a
                                                        privileged global
                                                        lock    and   the
                                                        resource       is
                                                        available only to
                                                        [1,2]  or   JACCT
                                                        jobs.   This code
                                                        allows privileged
                                                        jobs   to  define
                                                        locks          on
                                                        resources      to
                                                        prevent    access
                                                        from unprivileged
                                                        jobs.

                                        -2     .EQFGL   The lock you  are
                                                        requesting  is  a
                                                        global      lock.
                                                        Specifying   this
                                                        code     prevents
                                                        access   to   the
                                                        resource from any
                                                        other   job.   To
                                                        use  this   code,
                                                        your   job   must
                                                        have  JP.ENQ  set
                                                        in  its privilege
                                                        word.

                                        -1     .EQFJB   The  lock  is   a
                                                        job-wide    lock,
                                                        preventing access
                                                        to  the  resource
                                                        from  any   other
                                                        requests  by your
                                                        job.




                                   22-131
                              ENQ. [CALLI 151]


   1         .ENQBP    Specifies the resource to be locked.  You can  use
                       a  pointer  to  an ASCIZ string, or a user-code in
                       this word (more on this later).  You must  include
                       this  word  in every lock block because it defines
                       the resource you are requesting.

                       When the first program to request the resource  is
                       granted  a  lock,  it is said to have ownership of
                       the resource.  When a second program makes an ENQ.
                       call  with  the  same  value  in  this  word (if a
                       user-code is specified) or the same  ASCIZ  string
                       (if  a  byte  pointer is used), the request is for
                       the same resource that was granted  to  the  first
                       job.

                       The contents of the word to which the byte pointer
                       refers,  or  the  user  code  itself,  are  purely
                       arbitrary values to the monitor.  The monitor only
                       checks  lock  requests  for  matches,  granting or
                       preventing locks on the basis of matching strings.
                       This  is  the  key  to the ENQ/DEQ access-checking
                       mechanism.

                       If the flag EQ.FCW is set  in  the  previous  word
                       (.ENQFL),  .ENQBP must contain a 36-bit value as a
                       user-code.

                       If EQ.FCW is not set, and the flag EQ.BUC  is  set
                       in .ENQBP (that is, a value of 5 is placed in bits
                       0-2), the rest of the word must contain  a  33-bit
                       user-code.

                       If neither flag is set, this  word  (.ENQBP)  must
                       contain  a  pointer to an ASCIZ text string.  This
                       may be either a standard byte pointer in the form:

                            POINT 7,address,bit-location

                       Or, if the ASCIZ string is stored in 7-bit  bytes,
                       starting  at  the first byte of the location being
                       referenced, the pointer can take the form:

                            XWD -1,address

                       The ASCIZ string  at  address  can  be  up  to  30
                       (decimal)  words.   The  maximum string length for
                       your system is stored in %EQMSS  in  GETTAB  table
                       .GTENQ.

                       Cooperating programs (those  requesting  the  same
                       resources) must specify exactly the same user code
                       or ASCIZ string.


                                   22-132
                              ENQ. [CALLI 151]


   2         .ENQPS    Specifies  either  a  pool  number  for  a  pooled
                       resource,  or a sharer group number for a sharable
                       resource.  This word is optional and  defaults  to
                       0.

                       For a  pooled  resource,  the  word  contains  the
                       pool-size  in  the  left  half  and  the number of
                       resources requested from the  pool  in  the  right
                       half.   For  a sharable resource, the left half is
                       zero, and the right half contains the sharer-group
                       number.   Thus,  a  resource  cannot be pooled and
                       also be accessible to a sharer group.

                       A  pooled  resource  is  defined  by   the   first
                       requestor  of  the  resource.   By  specifying the
                       number of resources in the pool, the requestor  is
                       defining the number of "copies" of the resource to
                       be made available.  Each copy of the resource  can
                       be  requested  for  exclusive access by specifying
                       the same resource identifier in  word  .ENQBP  and
                       the  same pool-size in word .ENQPS.  The requestor
                       must also specify, in the  right  half  of  .ENQPS
                       (EQ.PPR),  the number of copies of the resource to
                       lock.

                       If the left half of  .ENQPS  (EQ.PPS)  is  0,  the
                       right  half  (EQ.PPR)  specifies  the sharer-group
                       number, thus defining a group  of  jobs  that  can
                       simultaneously  share  the  resource.  Any program
                       that sets the flag EQ.FSR and specifies  the  same
                       resource  and the same sharer group number will be
                       granted its request.  Therefore,  when  you  share
                       the  ownership  of  a resource, only other jobs in
                       the same sharer group are allowed ownership of the
                       resource.   The sharer group number defaults to 0.
                       Therefore, if  the  first  requestor  specifies  a
                       sharable  resource  but  omits  the  sharer  group
                       number, all subsequent sharable requests  for  the
                       resource  that  also omit the sharer group number,
                       or that set it to 0, will be granted immediately.

   3         .ENQMS    Contains a pointer to the  bit  mask  representing
                       the  portions  of  a  resource  to be locked.  The
                       pointer consists of the  mask-len  stored  in  the
                       left  half,  and  the mask-addr in the right half.
                       The bit mask, describing  fields  of  bits  to  be
                       locked,  is  stored  at  the location specified in
                       mask-addr, and the length  of  the  bit  mask  (in
                       words) is stored in the mask-len.  This provides a
                       facility for partitioning the  resource,  allowing
                       locks  on  portions  of  a resource.  This word is
                       optional and defaults to 0.


                                   22-133
                              ENQ. [CALLI 151]


   4         .ENQTB    Contains the  block-length  and  block-addr  of  a
                       lock-associated  data  block.  This data block can
                       be used to pass information to subsequent users of
                       a  resource.  To use this facility, you should set
                       EQ.FLT, thus preserving all lock request data  for
                       the  resource  for  at  least  5 minutes after you
                       dequeue the resource.  This word is  optional  and
                       defaults to 0.

   The function codes and their meanings are:

   Code      Symbol    Function

   0         .ENQBL    Requests ownership of a resource.  Your  job  will
                       block  if  the  resource  is  not available.  Your
                       request is placed in a queue associated  with  the
                       specified  resource.  If more than one request was
                       included in your ENQ.  call, your job  will  block
                       until  all  the requests have been granted.  After
                       all requests have been granted, the skip return is
                       taken  and  the monitor clears the ac.  If you set
                       the flag EQ.FBL in .ENQFL of the request block (to
                       bypass level checking), the monitor could return a
                       nonzero value.  A nonzero value indicates  that  a
                       level number sequencing error occurred, but it was
                       ignored because you specified that  level  numbers
                       were to be bypassed.

   1         .ENQAA    Requests  ownership  of  a  resource  and  returns
                       immediately  if  the  resource is unavailable.  If
                       all requests specified in this argument cannot  be
                       granted immediately, the system will not enter any
                       requests  in  the  queues  associated  with  those
                       resources and the error return is taken with error
                       code 1 (ENQRU%) in the ac.  However, if the system
                       can  grant  all  of your requests immediately, the
                       skip return is taken and the monitor leaves the ac
                       unchanged.

   2         .ENQSI    Requests ownership  of  a  resource  and,  if  the
                       resource  is  not  immediately available, causes a
                       software  interrupt  when  the  resource   becomes
                       available.   You  can  use  this function when the
                       Programmable Software Interrupt  (PSI)  system  is
                       enabled,  to  prevent your job from blocking while
                       waiting for the requests to be granted.

                       If all the requests in the  call  can  be  granted
                       immediately,   this   function  is  equivalent  to
                       function code 0 (.ENQBL).  If any of the  requests
                       are not available, the call takes the error return
                       with error code 1 (ENQRU%) in  the  ac.   In  this


                                   22-134
                              ENQ. [CALLI 151]


                       case,  your  job  can continue processing until it
                       receives  a  .PCQUE   software   interrupt.    The
                       interrupt   control   block   will   contain   the
                       request-ids of  the  requests  that  are  granted,
                       inclusively  ORed  into  the status word.  The PSI
                       system is described in Chapter 6.

   3         .ENQMA    Modifies an existing request made by your job.  If
                       the  modification  you  specify in this request is
                       identical to the  request  you  made  earlier,  no
                       action  is taken and the skip return is taken from
                       the call.  If you do not have  a  request  in  any
                       queue,  the  error return is taken and the monitor
                       returns error code 24 (ENQNE%) in the ac.  If  you
                       specify  more  than one request with this function
                       code and the error return is taken, you must issue
                       the  ENQC.   monitor  call  to determine which (if
                       any) modification request was granted.  The  error
                       code  that  the monitor returns in the ac reflects
                       only the last error that occurred as the result of
                       this call.

                       You can modify a request from exclusive  ownership
                       to shared ownership, but you will receive an error
                       code if you  attempt  to  modify  a  request  from
                       shared  to  exclusive  ownership if other jobs are
                       also sharing the resource.  To  modify  a  request
                       from shared to exclusive ownership when other jobs
                       are sharing the resource, you must first  DEQ. the
                       request.   Then,  enqueue it again as an exclusive
                       ownership request.

   SKIP RETURN

   All requests in the call are granted, and the resources are locked for
   your program.

   ERROR RETURN

   One of the following error codes is returned in the  ac  on  an  error
   return.   These  error codes are also returned on an error from a DEQ.
   or ENQC.  call.  They are described in more detail in Chapter 8.

   Code      Symbol    Error

   1         ENQRU%    At least one of the  requested  resources  is  not
                       available.
   2         ENQBP%    You  requested  an  illegal   number   of   pooled
                       resources.
   3         ENQBJ%    You specified an illegal job number.




                                   22-135
                              ENQ. [CALLI 151]


   4         ENQBB%    You specified an illegal byte size  for  the  byte
                       pointer.   The byte size must be between 1 and 36,
                       inclusive.
   5         ENQST%    The ASCIZ string is too long.   It  must  be  less
                       than  30  (decimal) words.  (Refer to GETTAB table
                       .GTENQ, item %EQMSS for  current  maximum  message
                       length.)
   6         ENQBF%    You specified an illegal function code.
   7         ENQBL%    You specified an  illegal  argument  list  length.
                       The  total  argument  list  for  the  call must be
                       header-block-size plus  (request-block-size  times
                       number-of-requests).
   10        ENQIC%    You specified an illegal number of requests.
   11        ENQBC%    You specified an illegal channel number.
   12        ENQPI%    Your program does not have enough  privileges  for
                       the given function.
   13        ENQNC%    Not enough core available, or the  maximum  number
                       of  active  locks  (item  %EQMAQ  in  GETTAB table
                       .GTENQ) has been exceeded.
   14        ENQFN%    Device is not initialized or is not a disk.
   15        ENQIN%    The address for the byte pointer  is  indirect  or
                       indexed; this is not allowed.
   16        ENQNO%    Your program cannot dequeue resources it does  not
                       own.
   17        ENQLS%    Levels are not specified in ascending order.
   20        ENQCC%    Illegal  modification  of  ownership;  you  cannot
                       change   a   request   from  shared  to  exclusive
                       ownership.   You  must  DEQ. the   request,   then
                       ENQ. it with EQ.FSR set.
   21        ENQQE%    Your ENQ quota has been exceeded;  your  quota  is
                       set by the system administrator.
   22        ENQPD%    The number of resources in the pool disagrees with
                       the number in your request.
   23        ENQDR%    Duplicate request; identical to a request  already
                       in the queue.
   24        ENQNE%    Not enqueued on this lock.
   25        ENQLD%    Level in request does not match lock.
   26        ENQED%    Insufficient privileges  for  this  function;  you
                       must have JP.ENQ set.
   27        ENQME%    Mask too long or lengths do not match.
   30        ENQTE%    Lock-associated table is too long.
   31        ENQAB%    A resource that was requested has been  marked  as
                       aborted.
   32        ENQGF%    Attempt to ENQ. with  EQ.FEL  option  on  a  ghost
                       file.
   33        ENQDD%    Deadlock detected.
   34        ENQTL%    Time limit exceeded.







                                   22-136
                              ENQ. [CALLI 151]


   EXAMPLE

             .
             .
             .
             MOVE      T2,[XWD 10,ADDR]    ;Initialize channel
             FILOP.    T2,
               JRST ERROR1                 ;Error return
             JRST      ENQ                 ;Skip return
   ADDR:     XWD CHAN,1                    ;Channel and LOOKUP
             EXP MODE                      ;Data mode
             SIXBIT/DSK/                   ;Device
             0,,0                          ;Buffer addresses
             0,,0
             0,,ADDR1                      ;LOOKUP block
             0,,0
             0,,0
   ADDR1:    SIXBIT/FILE/                  ;File name
             SIXBIT/EXT/                   ;Extension
             XWD 0,0
             XWD 27,4072                   ;PPN
   ENQ:      MOVE      T3,[XWD 0,ADDR3]    ;Function and address
             ENQ.      T3,
               JRST ERROR3                 ;Error return
             JRST NORM                     ;Skip return
   ADDR3:    XWD 1,5                       ;Number of locks, length of
   block
             XWD 0,1                       ;Request identifier
             XWD 0,CHAN                    ;Resource on chan
             POINT 7,[ASCIZ/NAME/]         ;Pointer to resource
             0,,0                          ;Not a pooled resource
             .
             .
             .
   ERROR1:   OUTSTR ERROR2
             JRST DONE

   ERROR3:   OUTSTR ERROR4
             JRST DONE

   ERROR2:   ASCIZ/ERROR WITH FILOP./

   ERROR4:   ASCIZ/ERROR WITH ENQ./
             .
             .
             .
   DONE:     EXIT

   RELATED CALLS

         o  DEQ.

         o  ENQC.

                                   22-137
                             ENQC. [CALLI 153]


   22.41  ENQC.  [CALLI 153]

   FUNCTION

   Returns information about the current state of  ENQ/DEQ  requests  and
   sets  access  rights  for the ENQ/DEQ facility (privileged).  Refer to
   Volume 1 for more information about using the ENQ/DEQ calls.  For more
   information  about  the  contents  of the argument block, refer to the
   ENQ. call.

   CALLING SEQUENCE

   Each  function  of  the  ENQC.   call  requires  a  different  calling
   sequence.   The  calling sequence for each ENQC. function is described
   below, for the appropriate function.

   The ENQC. function codes and their meanings are:



   22.41.1  FUNCTION 0 (.ENQCS)

   Returns a 3-word status block for each specified  lock.   The  calling
   sequence for the .ENQCS function is:

             MOVE    ac,[XWD .ENQCS,addr]
             MOVEI   ac+1,buffer
             ENQC.   ac,
               error return
             skip return
             . . .
   addr:     EXP     parameters
             XWD     0,request-id
             EXP     time limit
             first word of first lock block
             . . .
             last word of last lock block
   buffer:   BLOCK   <locks>*3
             . . .

   In the argument word:

         o  addr is the address of the argument list.

         o  buffer is the address of a buffer  (of  length  locks*3)  for
            storing the returned three-word status blocks.

         o  parameters is a word of the form:

            <size>B5+<locks>B17+<length>B35




                                   22-138
                             ENQC. [CALLI 153]


         o  size is the size of the header block (1 to 3).

         o  locks is the number of lock blocks in the argument list.

         o  length is the length of each lock block (size plus number  of
            locks times the length of each lock block).

            The right half of addr+1 may contain request-id, an  optional
            request identifier.

         o  time limit is an optional time limit for the  request  to  be
            granted.

   On a skip return, the monitor returns a three-word  status  block  for
   each request, at buffer.  The format of each block is:

   Offset    Symbol    Meaning

   0         .ENQCF    Flags:

                       Bits   Symbol    Meaning

                       0      EQ.CFI    Invalid lock.
                       1      EQ.CFO    This user is owner.
                       2      EQ.CFQ    This user is in queue for
                                        specified resource.
                       3      EQ.CFX    Owner's access is exclusive.
                       4-8              Reserved.
                       9-17   EQ.CFL    Level number.
                       18-26  EQ.CFC    The owner's context number.
                       27-35  EQ.CFJ    The owner's job number or an
                                        error code.

   1         .ENQCT    A  time  stamp,  in  universal  date-time  format,
                       indicating  the time that the lock was granted; or
                       0, indicating that the resource is available.

   2         .ENQCI    The left half  (EQ.CIQ)  contains  the  number  of
                       users   sharing  the  resource.   The  right  half
                       (EQ.CID) contains the request-id of the  owner  of
                       the lock.













                                   22-139
                             ENQC. [CALLI 153]


   22.41.2  FUNCTION 1 (.ENQCG)

   Returns user's quota in ac.   The  calling  sequence  for  the  .ENQCG
   function is:

             MOVE    ac,[XWD .ENQCG,addr]
             ENQC.   ac,
               error return
             skip return
             . . .
   addr:     XWD     0,jobno

   In the argument word, jobno is the number of the job whose  ENQ  quota
   is required.  If jobno is -1, your own job is assumed.



   22.41.3  FUNCTION 2 (.ENQCC)

   Changes user's quota.  The calling sequence for  the  .ENQCC  function
   is:

             MOVE      ac,[XWD .ENQCC,addr]
             ENQC.     ac,
               error return
             skip return
             . . .
   addr:     XWD       quota,jobno

   In the argument word:

         o  quota is the new ENQ/DEQ quota.

         o  jobno is the number of the job whose quota is to be  changed.
            If jobno is -1, your own job is assumed.

   This function sets the lock quota for a specific job.  To perform this
   function, you must have POKE privileges, be a [1,2] job, or be running
   with the JACCT bit set.  The ENQ/DEQ quota for the specified job  will
   be  set to the value you specify in the left half of the argument word
   on a normal return.  On a skip return, the  ac  is  cleared.   If  you
   attempt  to  use  this  function  without the required privileges, the
   error return is taken and the monitor returns an error code in the ac.











                                   22-140
                             ENQC. [CALLI 153]


   22.41.4  FUNCTION 3 (.ENQCD)

   Dumps the data base.  The calling sequence for the .ENQCD function is:

             MOVE      ac,[XWD .ENQCD,addr]
             ENQC.     ac,
               error return
             skip return
             . . .
   addr:     XWD       0,len

   In the argument word:

         o  addr is the address of a buffer to receive the returned data.

         o  len is the length of the data block to be returned, minus one
            word.

   This function dumps the data base (all lock and queue  entries).   The
   entire  data  base  is placed in your area, beginning with addr+1.  If
   this length is not large enough to accommodate the entire  data  base,
   the  monitor returns as much as possible of the data base.  The end of
   the data base is indicated by a word containing -1.  You must have SPY
   privileges  to specify this function code.  The format of the returned
   data is described in Chapter 8.

   SKIP RETURN

   The requested function is performed.

   ERROR RETURN

   The error codes that can be returned in the ac on an error return  are
   identical  to  those  that  can  be  returned  from the ENQ.  and DEQ.
   calls.  The error codes are listed in  the  description  of  the  ENQ.
   call.

   RELATED CALLS

         o  DEQ.

         o  ENQ.












                                   22-141
                             ENTER [OPCODE 077]


   22.42  ENTER [OPCODE 077]

   FUNCTION

   Specifies an output file to create, supersede, or update a file.   Use
   FILOP. to perform an ENTER for an extended I/O channel.

   CALLING SEQUENCE

   The ENTER monitor call has two types of argument lists:  one  using  a
   four-word  argument list and one using an extended argument list.  The
   extended argument list offers many additional options for  ENTERing  a
   file.   For  complete  information  about the argument lists, refer to
   Section 11.13.

   The calling sequence for the ENTER UUO is:

             ENTER   channo,addr
               error return
             skip return

   In the call sequence, the program supplies  the  addr,  which  is  the
   address  of  the  argument  list.   Refer  to  Section  11.13 for more
   information about the argument list.

   SKIP RETURN

   When you use the short form of the argument block, the monitor returns
   a four-word argument block at addr.

   Refer to Section 11.13.1 for information about the argument block that
   is returned.

   When you use the extended  argument  list,  the  monitor  returns  the
   information that is listed on Section 11.13.2.

   ERROR RETURN

   On an error return from ENTER, the monitor returns an  error  code  in
   either of the following:

         o  For the short-form argument block, the error code  is  stored
            in the right half of addr+1 of the 4-word argument block

         o  For the extended-form  argument  block,  the  error  code  is
            returned in the right half of addr+3.

   It is possible to LOOKUP/RENAME a file after using an ENTER to specify
   the argument list, referring to the same argument list with subsequent
   calls.  Note, however, that on an error return  from  the  ENTER,  the
   error  code  overwrites the high-order three bits of the creation date
   and the entire access date.  Because most programs recover from  these


                                   22-142
                             ENTER [OPCODE 077]


   errors  by  either  aborting  or by reinitializing the entire argument
   block, this overwriting of data normally does not cause any  problems.
   However, a program may attempt to recover from an error by fixing only
   the incorrect portion of the argument block and then  reexecuting  the
   monitor call.  These programs should always initialize the contents of
   these locations before reexecuting the ENTER monitor call.

   Error codes are restricted to  a  maximum  of  15  bits  to  eliminate
   problems  when recovering from an error in a file with a zero creation
   date.  The error codes are described in Section 11.14.

   EXAMPLES

   See Chapter 11.

   RELATED CALLS

         o  CLOSE

         o  FILOP.

         o  INIT

         o  LOOKUP

         o  OPEN

         o  RENAME


























                                   22-143
                             ENTVC. [CALLI 225]


   22.43  ENTVC.  [CALLI 225]

   FUNCTION

   Reads or sets an entry vector.  An entry vector  indicates  the  entry
   point  for a program.  (Refer to the TOPS-10 LINK Reference Manual and
   the TOPS-10 MACRO Assembler  Manual  for  more  information  on  entry
   vectors.)

   CALLING SEQUENCE

             XMOVEI  ac,addr
             ENTVC.  ac,
               error return
             skip return

   addr:     flag,,function
             length
             vector-addr

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the argument list.

         o  flag  indicates  whether  the  vector  is  read  (0)  or  set
            (EN.SET).

         o  function is the function code described below.

         o  length is a value returned by the  monitor  on  a  read,  and
            supplied  by  you  on  a  set.   A  (JRST)  in the right half
            indicates that you are supplying  a  start  address  only  in
            vector-addr  (if  setting),  or that the monitor is returning
            the start address in vector-addr  (if  reading).   Otherwise,
            you supply a length for the entry vector (0-37 words, octal),
            or the monitor returns the length of the entry vector.

         o  vector-addr contains the 30-bit address of the entry  vector,
            or  the  start  address, returned on a read, or to be set for
            the set function.  The vector-addr is a user address.

   The function code for ENTVC. is:

   Code      Symbol    Meaning

   0         .ENVRS    Reads or sets the entry vector.   Set  the  EN.SET
                       flag  in  the  left  half of the first word of the
                       argument block to perform a set.  0  in  the  left
                       half indicates a read should be performed.





                                   22-144
                             ENTVC. [CALLI 225]


   SKIP RETURN

   The specified function is performed.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         EVIAL%    Illegal argument list.
   2         EVIFC%    Illegal function code.
   3         EVADR%    An address check was encountered.









































                                   22-145
                             ERLST. [CALLI 132]


   22.44  ERLST.  [CALLI 132]

   FUNCTION

   Returns data giving the status of each device on an MPX  channel  that
   has errors.

   CALLING SEQUENCE

             MOVEI   ac,addr
             ERLST.  ac,
               error return
             skip return
             . . .
   addr:     XWD     length,channo
             BLOCK   length-1

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the argument block.

         o  length is the length of the argument block; the length should
            be the number of devices connected to the channel plus two.

         o  channo is the number of an initialized channel.

   SKIP RETURN

   The monitor returns data at addr+1 for devices  on  the  channel  that
   have errors.  The data at addr is in the format:

   addr:     XWD     length,channo
             EXP     number of devices
             XWD     udx,status
             . . .
             XWD     udx,status

   In the argument list, the program supplies the following variables:

         o  length and channo were given in the call.

         o  number of devices is the number of  devices  on  the  channel
            that have encountered errors.

         o  udx is the Universal Device Index of a device having errors.

         o  status is a halfword  containing  I/O  status  bits  for  the
            device.   These  bits  are  identical to those returned for a
            GETSTS monitor call.





                                   22-146
                             ERLST. [CALLI 132]


   The monitor continues  to  return  device  error  information  in  the
   argument  block  until  all  space  allocated by your program has been
   filled.  Your program should check the value of addr+1.  If addr+1  is
   greater  than  the  length of the argument block minus two, the device
   error list is incomplete because of lack of space.

   For a list of I/O status bits, see the appropriate device in Volume 1.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   1         ERLBC%    Illegal channel number.
   2         ERLNM%    Not an MPX-channel.

   RELATED CALLS

         o  CLRST.

         o  GETSTS

         o  SENSE.






























                                   22-147
                             ETHNT. [CALLI 223]


   22.45  ETHNT. [CALLI 223]

   FUNCTION

   The ETHNT. monitor call accesses the Ethernet.  ETHNT. allows  you  to
   read  the Ethernet configuration, enable and disable protocols, enable
   and disable multicast addresses, and send and receive datagrams.   For
   an  overview  of  Ethernet,  as well as a full description of datagram
   buffers  (addressed  using .ETUBL)  and  function  buffers  (addressed
   using .ETBFL and .ETBFA), refer to Chapter 5, Volume 1.

   CALLING SEQUENCE

             XMOVEI  ac,addr
             ETHNT.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the addr, which  is  the
   address of the ETHNT. argument block.

   The format of the argument block is:

   Offset    Symbol    Contents

   0         .ETFCN    Function code word for the argument  block.   This
                       word  contains  the  length of the argument block,
                       and may also contain a flag.  Its format is:

                       Bits   Symbol    Meaning

                       0-8    ET.FFL    Function-specific flags.

                                        Bit   Symbol   Meaning

                                        1     ET.FZC   Zero counters
                                                       after they have
                                                       been read.  Use
                                                       this flag with
                                                       functions .ETRCC,
                                                       .ETRPC, and
                                                       .ETRKC.

                       9-17   ET.FFN    One of the function codes  listed
                                        at  the end of the argument block
                                        description.

                       18-35  ET.FLN    Length of the argument block.






                                   22-148
                             ETHNT. [CALLI 223]


   1         .ETPSW    Contains the portal status and the assigned portal
                       ID.   ET.PST (Bits 0-8) may contain one or more of
                       the following flags:

                       Bit    Symbol    Meaning

                       0      ET.PON    Portal is online.

                       1      ET.PXB    Transmit buffers available.

                       2      ET.PRB    Receive buffers available.

                       The rest of .ETPSW contains the portal ID, .ETPID,
                       assigned by the monitor.

   1         .ETCSW    Contains  the  channel  status  and  channel   ID.
                       ET.CST (Bits 0-8) contains the channel status.  If
                       the ET.CON flag in ET.CST is on,  the  channel  is
                       online.   ET.CID  (Bits 9-35) contains the channel
                       ID.

   1         .ETKSW    Contains  the  status  and  ID  of  a  controller.
                       ET.KST  (Bits 0-8) contains the controller status.
                       If the ET.KON flag in ET.KST is on, the controller
                       is   online.   ET.KID  (Bits  9-35)  contains  the
                       controller ID.

   2         .ETAR1    Contains  the  first  function-specific  argument.
                       Function-specific  arguments are described in each
                       of the function codes below.

   3         .ETAR2    Contains the second function-specific argument.

   Valid function codes for .ETFCN are:

   Code      Symbol    Meaning

   1         .ETOPN    Opens  a  user  portal.   This  function  requires
                       JP.POK  privileges.   This  function specifies the
                       protocol type to be enabled, and protocol specific
                       flags.  The argument block is:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETOPN
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.


                                   22-149
                             ETHNT. [CALLI 223]


                       2      .ETCIW    Identifies the  Ethernet  channel
                                        on  which  the protocol should be
                                        enabled.

                       3      .ETPIW    Identifies the protocol  type  to
                                        be   enabled   on   the  Ethernet
                                        channel.  Set the ET.PAD flag  in
                                        the left half of .ETPIW to enable
                                        padding for the protocol.

   2         .ETCLS    Closes a user portal and  releases  all  resources
                       associated with it.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETCLS
                                        in  Bits  9-17, and the length of
                                        the argument  block,  2,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

   3         .ETQRB    Queues receive  datagram  buffers.   The  argument
                       block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETQRB
                                        in  Bits  9-17, and the length of
                                        the argument  block,  3,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETUBL    Contains the address of the  user
                                        buffer descriptor list.  Refer to
                                        Chapter  5,  Volume  1  for   the
                                        format   of   the   user   buffer
                                        descriptor list.











                                   22-150
                             ETHNT. [CALLI 223]


   4         .ETRRQ    Reads receive queue.   This  function  fills  each
                       block  in  the  buffer  descriptor  list with data
                       appropriate to a received datagram.  The  argument
                       block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRRQ
                                        in  Bits  9-17  and the length of
                                        the argument  block,  3,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETUBL    Contains the address of the  user
                                        buffer descriptor list.  Refer to
                                        Chapter  5,  Volume  1  for   the
                                        format   of   the   user   buffer
                                        descriptor  list.    The   status
                                        field  in  .UBSTS  of  the buffer
                                        descriptor contains zero  if  the
                                        datagram       was       received
                                        successfully.

   5         .ETQXB    Transmits  datagram  buffer  to  the   destination
                       Ethernet   address   specified   in   the   buffer
                       descriptor block.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETQXB
                                        in  Bits  9-17, and the length of
                                        the argument  block,  3,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETUBL    Contains the address of the  user
                                        buffer descriptor list.  Refer to
                                        Chapter  5,  Volume  1  for   the
                                        format   of   the   user   buffer
                                        descriptor list.








                                   22-151
                             ETHNT. [CALLI 223]


   6         .ETRXQ    Returns   data   associated    with    transmitted
                       datagrams.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRXQ
                                        in  Bits  9-17, and the length of
                                        the argument  block,  3,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETUBL    Contains the address of the  user
                                        buffer descriptor list.  Refer to
                                        Chapter  5,  Volume  1  for   the
                                        format   of   the   user   buffer
                                        descriptor list.  On a successful
                                        transmission, the returned status
                                        is zero.

   7         .ETEMA    Enables a portal to receive datagrams destined for
                       an  Ethernet multicast address.  .ETEMA may not be
                       used while a promiscuous receiver is active.   The
                       argument block for .ETEMA contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETEMA
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETMCA    Contains the  two  word  Ethernet
                                        multicast address.














                                   22-152
                             ETHNT. [CALLI 223]


   10        .ETDMA    Disables a portal from receiving  datagrams  bound
                       for  a  multicast  address.  The multicast address
                       you disable  must  have  been  previously  enabled
                       using  the  .ETEMA  function.   The argument block
                       contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETDMA
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETMCA    Contains the  two  word  Ethernet
                                        multicast address.

   11        .ETRCL    Returns  a  list  of  all  known  channels.    The
                       argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRCL
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETCSW    Reserved.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

   12        .ETRCI    Returns information about a specific channel.  The
                       argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRCI
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETCSW    Contains the channel-id  in  Bits
                                        9-35.  Returns an updated channel
                                        status in Bits 0-8.  Flag  ET.CON
                                        indicates  whether the channel is
                                        on- or off-line.

                                   22-153
                             ETHNT. [CALLI 223]


                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

   13        .ETRCC    Returns a list of the counters associated  with  a
                       channel,  and  (optionally)  zeroes them.  Zeroing
                       the  counters  requires  JP.POK  privileges.   The
                       argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRCC
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right  half.  Set the ET.FZC flag
                                        of  .ETFCN  if   you   want   the
                                        counters zeroed after information
                                        is returned.

                       1      .ETCSW    Contains the channel-id  in  Bits
                                        9-35.  Returns an updated channel
                                        status in Bits 0-8.  Flag  ET.CON
                                        indicates  whether the channel is
                                        on- or off-line.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

   14        .ETSCA    Sets  the  physical  address  associated  with   a
                       channel.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETSCA
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETCSW    Contains the channel-id  in  Bits
                                        9-35.  Returns an updated channel
                                        status in Bits 0-8.  Flag  ET.CON
                                        indicates  whether the channel is
                                        on- or off-line.

                       2      .ETEAD    Specifies the  physical  address.
                                        .ETEAD is two words long.  It may
                                        not be a multicast address.


                                   22-154
                             ETHNT. [CALLI 223]


   15        .ETRPL    Returns a list of all portals on a  channel.   The
                       argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRPL
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETCSW    Contains the channel-id  in  Bits
                                        9-35.  Returns an updated channel
                                        status in Bits 0-8.  Flag  ET.CON
                                        indicates  whether the channel is
                                        on- or off-line.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

                       The list is returned in the specified buffer, with
                       each  portal  ID  occupying  a  full  word,  right
                       justified (.ETPSW format).

   16        .ETRPI    Returns all information (except counters) about  a
                       specific portal.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRPI
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

                       The  information  is  returned  in  the  specified
                       buffer.






                                   22-155
                             ETHNT. [CALLI 223]


   17        .ETRPC    Returns a list of the counters associated  with  a
                       portal, and (optionally) zeroes them.  Zeroing the
                       counters requires JP.POK privileges.  The argument
                       block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRPC
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right  half.  Set the ET.FZC flag
                                        if you want the  counters  zeroed
                                        after    the    information    is
                                        returned.

                       1      .ETPSW    Contains the  portal-id  in  Bits
                                        9-35.   Returns an updated portal
                                        status in Bits 0-8.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

   20        .ETRKL    Returns a list of all controllers  on  a  channel.
                       The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRKL
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETCSW    Contains the channel-id  in  Bits
                                        9-35.  Returns an updated channel
                                        status in Bits 0-8.  Flag  ET.CON
                                        indicates  whether the channel is
                                        on- or off-line.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

                       The list is returned in the specified buffer, with
                       each  portal  ID  occupying  a  full  word,  right
                       justified (.ETKSW format).

   21        .ETRKI    Returns all information (except counters) about  a


                                   22-156
                             ETHNT. [CALLI 223]


                       specific controller.  The argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRKI
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right half.

                       1      .ETKSW    Contains  the  controller-id   in
                                        Bits  9-35.   Returns  an updated
                                        controller status  in  Bits  0-8.
                                        Flag ET.KON indicates whether the
                                        controller is on- or off-line.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.

                       The  information  is  returned  in  the  specified
                       buffer.

   22        .ETRKC    Returns a list of the counters associated  with  a
                       controller, and (optionally) zeroes them.  Zeroing
                       the  counters  requires  JP.POK  privileges.   The
                       argument block contains:

                       Word   Symbol    Contents

                       0      .ETFCN    Contains the function code .ETRKC
                                        in  Bits  9-17, and the length of
                                        the argument  block,  4,  in  the
                                        right  half.  Set the ET.FZC flag
                                        if you want the  counters  zeroed
                                        after    the    information    is
                                        returned.

                       1      .ETKSW    Contains  the  controller-id   in
                                        Bits  9-35.   Returns  an updated
                                        controller status  in  Bits  0-8.
                                        Flag ET.KON indicates whether the
                                        controller is on- or off-line.

                       2      .ETBFL    Contains  the   length   of   the
                                        destination buffer.

                       3      .ETBFA    Contains  the  address   of   the
                                        destination buffer.




                                   22-157
                             ETHNT. [CALLI 223]


   SKIP RETURN

   The requested function is performed, and information  is  returned  as
   specified in the description of the function.

   ERROR RETURN

   One of the following codes is returned in the ac:

   Code      Symbol    Error

   1         ETPRV%    Program has insufficient privileges.
   2         ETADC%    Address check attempting to read argument block.
   3         ETIAL%    Illegal argument list length.
   4         ETILF%    Illegal function code specified.
   5         ETUEE%    Unexpected Ethernet error.
   6         ETRES%    Insufficient resources.
   7         ETIPI%    Invalid portal ID.
   10        ETICI%    Invalid channel ID.
   11        ETIPT%    Invalid protocol type.
   12        ETPIU%    Protocol type already in use.
   13        ETPRA%    Promiscuous receiver active.
   14        ETBAC%    Buffer address check.
   15        ETIBS%    Invalid buffer size.
   16        ETIBP%    Invalid byte pointer.
   17        ETIEA%    Invalid Ethernet address.
   20        ETPQE%    Portal quota exceeded.
   21        ETBQE%    Buffer quota exceeded.
   22        ETPWS%    Protocol in wrong state.
   23        ETIKI%    Invalid controller ID.
























                                   22-158
                              EXIT [CALLI 12]


   22.46  EXIT [CALLI 12]

   FUNCTION

   Stops job execution and optionally resets the job.

   CALLING SEQUENCE

             EXIT    fcn-code,
             continue return

   In the calling sequence, the program supplies the following variables:

         o  fcn-code is one of the function codes described below.

            For either code, when you EXIT from a job in  an  auto-pushed
            context,  you  are  returned  to the superior context and the
            inferior one is deleted.

         o  continue return is the instruction to be executed if the user
            issues a valid CONTINUE monitor command.

   The function codes and their meanings are:

   Code      Function

   0         Performs the following:

             o  Releases all I/O devices, closing files if necessary.

             o  Unlocks the job from core.

             o  Sets the user-mode write-protect bit for the high
                segment.

             o  Resets APR traps to zero.

             o  Clears PC flags.

             o  Performs a RESET and stops the job.

            If timesharing was stopped by  a  TRPSET  monitor  call,  the
            monitor   resumes  timesharing.   A  RESET  monitor  call  is
            executed, and the word EXIT is typed on  your  terminal,  and
            the  terminal  is  left in monitor mode.  You cannot continue
            with the CONT or CCONT monitor command.








                                   22-159
                              EXIT [CALLI 12]


   1         Performs the following:

             o  Clears PC flags.

             o  Stops the job.

            EXIT is not printed on your terminal, and  you  can  continue
            program execution with the CONT or CCONT monitor command.  If
            you use function code 1, you should first RELEASE all devices
            and channels; a convenient way to do this is to use the RESET
            monitor call.  The symbol for EXIT 1, is MONRT.

   2-17      Reserved for use by DIGITAL.

   RELATED CALLS

         o  LOGOUT

         o  MONRT.



































                                   22-160
                             FILOP. [CALLI 155]


   22.47  FILOP.  [CALLI 155]

   FUNCTION

   Performs various file operations, including initializing channels  and
   creating,  deleting,  writing,  reading,  renaming,  appending to, and
   superseding files.

   CALLING SEQUENCE

             MOVE    ac,[XWD length,addr]
             FILOP.  ac,
               error return
             skip return
             . . .
   addr:     argument-list

   In the calling sequence, you supply the following information:

         o  length is the length of the argument list.

         o  addr is the address of the argument list.

         o  argument-list format depends on the function specified in the
            right half of the first word of the argument list.

   The FILOP. functions are:

   Function
   Code      Symbol    Meaning

   1         .FORED    Opens a file.

   2         .FOCRE    Creates a file.

   3         .FOWRT    Write a file.

   4         .FOSAU    Updates a file in exclusive access mode.

   5         .FOMAU    Updates a file in multiple-access mode.

   6         .FOAPP    Appends data to a file.

   7         .FOCLS    Closes a file associated with a specified channel.

   10        .FOURB    Checkpoints a file.

   11        .FOUSI    Performs a USETI function.

   12        .FOUSO    Performs a USETO function.

   13        .FORNM    Renames a file.


                                   22-161
                             FILOP. [CALLI 155]


   14        .FODLT    Deletes a file.

   15        .FOPRE    Allocates disk space for a file.

   16        .FOSIO    Opens a device for super-I/O.

   17        .FOINP    Performs an INPUT function.

   20        .FOOUT    Performs an OUTPUT function.

   21        .FOSET    Performs a SETSTS function.

   22        .FOGET    Performs a GETSTS function.

   23        .FOREL    Performs a RELEAS function.

   24        .FOWAT    Waits for I/O to finish.

   26        .FORRC    Updates a file's RIB.

   27        .FOGTF    Gets the block number of the first file on a
                       DECtape.

   30        .FOMTP    Performs a MTAPE function with extended channels.

   31        .FOUTP    Clears a DECtape.

   32        .FORAW    Renames a file with allocation specified in words.

   33        .FOFIL    Obtains the file specification of any file.

   34        .FOFXI    Performs a IN function.

   35        .FOFXO    Performs an OUT function.

   Functions 1 through 6 and 13 through 16 use the FILOP. extended
   argument list.  This argument list is described below, followed by
   detailed descriptions of each FILOP. function.



   22.47.1  FILOP.  Extended Argument List

   The argument block for FILOP. Functions 1 through 6, and Functions  13
   through 15, looks like this:









                                   22-162
                             FILOP. [CALLI 155]


   Table 22-2:  FILOP Argument Block

    0------8 9-----------------17 18-------------------------35
   +===========================================================+
   !  Flags !          FO.CHN    !        Function Code        ! (.FOFNC)
   !-----------------------------------------------------------!
   !                        I/O mode                           ! (.FOIOS)
   !-----------------------------------------------------------!
   !                   Device name or UDX                      ! (.FODEV)
   !-----------------------------------------------------------!
   !      Output buffer header   !    Input buffer header      ! (.FOBRH)
   !-----------------------------------------------------------!
   !    Number of output buffers !  Number of input buffers    ! (.FONBF)
   !-----------------------------------------------------------!
   !      Ptr to RENAME block    !    Ptr to LOOKUP block      ! (.FOLEB)
   !-----------------------------------------------------------!
   !      Length of PATH block   !     Ptr to PATH block       ! (.FOPAT)
   !-----------------------------------------------------------!
   !         Project number      !     Programmer number       ! (.FOPPN)
   !-----------------------------------------------------------!
   ! Length of filespec block    !   Ptr to filespec block     ! (.FOFSP)
   !-----------------------------------------------------------!
   ! Output buffer starting addr ! Input buffer starting addr  ! (.FOBSA)
   !-----------------------------------------------------------!
   !      Output buffer size     !     Input buffer size       ! (.FOBSZ)
   +===========================================================+


   The format of the argument list (for Functions 1-6 and 13-15) is:

   Word      Symbol    Contents

   0         .FOFNC    Flags, channel number, and function code:

                       Flag
                       Bits      Symbol    Meaning

                       0         FO.PRV    Indicates  that  the   program
                                           with   appropriate  privileges
                                           ([1,2] or JACCT) will  perform
                                           privileged   FILOP. functions.
                                           You must set this bit  to  use
                                           privileged FILOP. functions.

                       1         FO.ASC    Assigns  an  extended  channel
                                           number,  one  that  is greater
                                           than 17.  When  you  set  this
                                           bit   for   an  OPEN  function
                                           (function codes 1  through  6)
                                           the  monitor  assigns the next
                                           available channel number.   It
                                           then  performs  the  requested
                                           function.   On   return,   the
                                           monitor  returns  the assigned
                                   22-163
                             FILOP. [CALLI 155]


                                           channel number  in  FO.CHN  in
                                           the   argument  block  or,  if
                                           FO.CFW is set, in the  address
                                           pointed to by the left half of
                                           the  word  at   the   location
                                           specified   in   FO.FNC.   The
                                           number will  be  equal  to  or
                                           greater   than   20   so  that
                                           existing    channel     number
                                           allocations    will   not   be
                                           affected.

                       2         FO.UOC    Specifies  the  file  that  is
                                           open on the indicated channel.
                                           Normally, a RENAME function is
                                           performed    on    the    file
                                           specified in the right half of
                                           .FOLEB,   and   after   it  is
                                           completed  successfully,   the
                                           I/O  channel  is automatically
                                           closed.

                                           When you set FO.UOC,  however,
                                           the  right  half  of .FOLEB is
                                           ignored, and the  function  is
                                           performed  on the file that is
                                           open on the specified channel.

                       3         FO.CFW    Indicates that the right  half
                                           of this function word contains
                                           an address.  At that  address,
                                           you  must  store the following
                                           information:

                                           channel-addr,,function-code

                                           In  the  word  pointed-to   by
                                           FO.CFW,    you   specify   the
                                           address of the channel  number
                                           in  the  left  half,  and  the
                                           function  code  in  the  right
                                           half.   For  this  format, the
                                           field FO.CHN is ignored.

                       4-8                 Reserved for use by DIGITAL.

                       9-17      FO.CHN    Channel number.

                       18-35     FO.FNC    Function code.  The     FILOP.
                                           functions     are    described
                                           following  the  argument  list
                                           definition.


                                   22-164
                             FILOP. [CALLI 155]


   1         .FOIOS    I/O  status  (open  mode).   Note  that  any  bits
                       appearing  here  may also be set by OPEN call (see
                       .OPMOD in OPEN call).

   2         .FODEV    SIXBIT device name or Universal Device Index.

   3         .FOBRH    Buffer ring header pointers:

                       Bits   Meaning

                       0-17   Address of output buffer ring header.
                       18-35  Address of input buffer ring header.

                       If the value of  this  word  is  0,  there  is  no
                       corresponding buffer ring header.

   4         .FONBF    Number of buffers needed.  The left  half  is  the
                       number  of  output buffers needed.  The right half
                       is the number of input buffers  needed.   If  zero
                       buffers  are  requested in a FILOP.  monitor call,
                       the monitor does not set up any buffers.  It  also
                       does not clear any buffer ring that is already set
                       up, and does not  clear  the  first  word  of  the
                       buffer  ring  header.   Thus, a FILOP.  causing an
                       OPEN allows an old buffer ring to be recycled.

                       This word allows a user program to set up its  own
                       buffer  ring.   If  you  specify 777777 octal, the
                       monitor sets up a ring of 2 buffers  for  non-disk
                       devices.  If no default has been set for this job,
                       the monitor uses the system default  for  non-disk
                       devices,  or a ring of n buffers for disk devices,
                       where n is specified by the  SET  DEFAULT  BUFFERS
                       monitor  command  or  SETUUO.   This  argument  to
                       FILOP.  performs the same action as the INBUF  and
                       OUTBUF  monitor  calls  and  is  needed  only  for
                       buffered I/O.

   5         .FOLEB    Pointers to RENAME and LOOKUP/ENTER blocks:

                       Bits   Meaning

                       0-17   Address of RENAME block (see RENAME monitor
                              call).
                       18-35  Address   of   LOOKUP/ENTER   block    (see
                              LOOKUP/ENTER monitor call).

   6         .FOPAT    Length of, and pointer to PATH. block  (see  PATH.
                       monitor  call).  The actual path of the file found
                       or created is returned in this block.  A  specific
                       path  for  finding or creating the file must still
                       be specified  in  the  LOOKUP,  ENTER,  or  RENAME
                       argument block.

                                   22-165
                             FILOP. [CALLI 155]


   7         .FOPPN    Project-programmer number.  Set the FO.PRV flag if
                       you  include this word and want it to take effect.
                       The monitor then performs the file operation as if
                       the  current  job  were  logged in under the given
                       PPN.  If FO.PRV is set in Word 0 (.FOFNC),  and  a
                       PPN   is  supplied  in  this  word,  your  program
                       acquires the file access rights  and  restrictions
                       of   that   PPN.   This  allows  you  to  do  file
                       operations in behalf of the  user  whose  PPN  you
                       include  here.  If you specify [1,2] in this word,
                       you lose full file access.  This word  is  ignored
                       if  the  job  is not logged in under [1,2] or does
                       not have JACCT privileges.

   8         .FOFSP    Length of and pointer to a block in which the full
                       file  specification  of  the  new  file  should be
                       stored.   If  you  include  this  word,  the  file
                       specification     is    returned    automatically.
                       Alternatively,  you  can   specify   Function   33
                       (.FOFIL)  to  only  return the file specification.
                       Refer to the SKIP RETURN section for the format of
                       the returned block.

   9         .FOBSA    Buffer starting address.  The left  half  contains
                       the  starting  address  of the output buffer ring,
                       (FO.OSA) the right half holds the starting address
                       of the input buffer ring, (FO.ISA).

   10        .FOBSZ    Size of the input and output  buffers.   The  left
                       half,  FO.OSZ,  contains  the  output buffer size.
                       FO.ISZ, the right half,  holds  the  size  of  the
                       input buffer.



   22.47.2  FILOP. Functions

   The function codes and their meanings are described below.

   Code      Symbol    Function

   1         .FORED    Opens the file described by the LOOKUP/ENTER block
                       for  reading  (duplicates  LOOKUP call).  You must
                       include  the  LOOKUP/ENTER   block   pointer   for
                       directory   devices   when   you  are  using  this
                       function.

   2         .FOCRE    Creates the file  described  by  the  LOOKUP/ENTER
                       block.   This  function strictly requires creation
                       of the file; if a matching file is  found  in  the
                       directory,   the   error  return  is  taken.   The
                       LOOKUP/ENTER block pointer  is  required  for  the


                                   22-166
                             FILOP. [CALLI 155]


                       .FOCRE function.

   3         .FOWRT    Writes the  file  described  by  the  LOOKUP/ENTER
                       block.  This function supersedes any matching file
                       in the directory, or  creates  a  new  file.   The
                       LOOKUP/ENTER  block  pointer  is  required for the
                       .FOWRT function.

   4         .FOSAU    Updates the file  described  by  the  LOOKUP/ENTER
                       block in exclusive access mode.  No other user can
                       write to  this  file  until  it  is  closed.   The
                       LOOKUP/ENTER  block  pointer  is  required for the
                       .FOSAU function.  If the specified file  does  not
                       exist,  it  will be created automatically for this
                       function.

   5         .FOMAU    Updates the file  described  by  the  LOOKUP/ENTER
                       block,  in  multi-access  mode.  This allows other
                       users  to  read   and   write   the   file.    The
                       LOOKUP/ENTER  block  pointer  is  required for the
                       .FOMAU function.

   6         .FOAPP    Appends to the file described in the  LOOKUP/ENTER
                       block.   Note  that  if  the buffers were built by
                       this FILOP. call, the last block of the file  will
                       be read into the first buffer.  The byte count and
                       byte pointer are set  to  write  data  immediately
                       after the last word of the file.  The LOOKUP/ENTER
                       block pointer is required for the .FOAPP function.

   7         .FOCLS    Closes  the  file  associated  with  the   channel
                       specified  in  the  word  at  addr.  This function
                       requires a special argument list:

                       addr:     EXP       channo
                                 EXP       CLOSE-flags

                       Include the CLOSE flags  from  the  CLOSE  UUO  in
                       addr+1.

                       The monitor executes a GETSTS call for  the  file.
                       The I/O status bits are returned in the ac.  For a
                       list of I/O status bits, refer to the  appropriate
                       device chapter in Volume 1.

   10        .FOURB    Checkpoints the file associated with  the  channel
                       specified  in the word at addr.  Only the function
                       word of the FILOP.  argument  block  is  required.
                       The  monitor  writes  all  output buffers to disk,
                       updates  directories,  updates  checksums  in  RIB
                       pointers,  and  updates  the  end-of-file pointer.
                       The file remains open for further I/O.


                                   22-167
                             FILOP. [CALLI 155]


                       The .FOURB function is meaningful only  for  files
                       that are being written.

                                              NOTE

                           If output is  not  complete,  the  monitor
                           writes  the  last  partially  filled word;
                           this may leave null bytes in the word.

   11        .FOUSI    Performs a  USETI  monitor  call  (specifies  next
                       block number to be input) for a specified block of
                       the file associated with the channel specified  at
                       addr,  setting  that  block  for  next input.  The
                       format  of  the  argument  list  for  the   .FOUSI
                       function is:

                       addr:     XWD       channo,.FOUSI
                                 EXP       blockno

                       In the argument list, channo and blockno give  the
                       channel  number  and  block  number  of  the file.
                       Refer to the USETI call for more information.

                       On a skip return, the I/O status bits are returned
                       in  the ac.  The monitor takes the error return if
                       the block number is larger than the specified file
                       or   no  previous  LOOKUP  was  executed.   .FOUSI
                       returns error code %ERILU if the argument block is
                       not exactly two words long.

   12        .FOUSO    Performs a USETO  monitor  call  for  a  specified
                       block  of  the  file  associated  with the channel
                       specified at addr, setting  that  block  for  next
                       output.   The  format of the argument list for the
                       .FOUSO function is:

                       addr:     XWD       channo,.FOUSO
                                 EXP       blockno

                       In the argument list, channo and blockno give  the
                       channel  number  and  block  number  of  the file.
                       Refer to the USETO call for more information.

                       The monitor takes the error return if  not  enough
                       space  is  available  or  no  previous  ENTER  was
                       executed.  The I/O status word is returned in  the
                       ac  for a successful return.  .FOUSO returns error
                       code %ERILU if the argument block is  not  exactly
                       two words long.

   13        .FORNM    Renames the file described by  the  RENAME  block.
                       The  LOOKUP/ENTER  block  pointer  and  the RENAME


                                   22-168
                             FILOP. [CALLI 155]


                       block  pointer  are  required   for   the   .FORNM
                       function,  unless  the file is already open on the
                       specified channel.  However, if a file is open  on
                       the  channel  specified  in .FOFNC, and if you set
                       the flag FO.UOC in the same word, then  the  right
                       half  of  .FOLEB  is  ignored, and the function is
                       performed on the open file.

   14        .FODLT    Deletes the file described by  the  LOOKUP  block.
                       Pointers  to  both  LOOKUP  and  RENAME blocks are
                       required for this function,  unless  you  set  the
                       flag  FO.UOC,  and  a  file is open on the channel
                       specified in .FOFNC.  In this case, the right half
                       of .FOLEB is ignored and the function is performed
                       on the open file.

   15        .FOPRE    Preallocates space for the file described  by  the
                       LOOKUP/ENTER  block.  This function is most useful
                       for batch jobs.  If a preallocated file is entered
                       but  not  written, the space is still allocated; a
                       CLOSE for the file will not deallocate the space.

                       If the file is  entered  immediately  after  being
                       preallocated, it is not superseded; any subsequent
                       ENTER  to  the  file  will  supersede   it.    The
                       LOOKUP/ENTER  block  pointer  is  required for the
                       .FOPRE function.

   16        .FOSIO    Opens  a  device  for  super-I/O  (refer  to   the
                       SUSET. UUO).  The first four words of the argument
                       list  are  required  for  this   function.    This
                       function does not require .FOLEB.

   17        .FOINP    Performs INPUT monitor call.  Reads data from  the
                       file   opened   on  the  specified  channel.   The
                       argument list is:

                       addr:     XWD       channo,.FOINP
                                 addr1
                                 addr2

                       In the argument list:

                        o  addr1 is the address of the next buffer to  be
                           used  in  non-dump  I/O, or the address of the
                           dump mode command  list  if  using  dump  I/O.
                           This word is optional for non-dump I/O.

                        o  addr2  is  the  optional  address  of  a  word
                           containing  the  block  number  of the file to
                           perform a USETI to before writing.



                                   22-169
                             FILOP. [CALLI 155]


                       The I/O status bits are returned in the ac.

   20        .FOOUT    Performs OUTPUT monitor call.  Writes data to  the
                       file   opened   on  the  specified  channel.   The
                       argument list is:

                       addr:     XWD       channo,.FOOUT
                                 addr1
                                 addr2

                       In the argument list:

                        o  addr1 is the address of the next buffer to  be
                           used  in  non-dump  I/O, or the address of the
                           dump mode command list.

                        o  addr2 is the optional address of a  word  that
                           contains  the  block  number  of  the  file to
                           perform a USETO to before reading.

                       The I/O status bits are returned in the ac.

   21        .FOSET    Performs SETSTS monitor call.  The format  of  the
                       argument list is:

                       addr:     XWD       channo,.FOSET
                                 EXP       setsts-bits

                       This function returns error  code  %ERILU  if  the
                       argument block is not exactly two words long.

   22        .FOGET    Performs GETSTS monitor call.  The I/O status bits
                       are  returned  in  the  ac.   The  format  of  the
                       argument list is:

                       addr:     XWD       channo,.FOGET

   23        .FOREL    Performs RELEAS monitor call.  The format  of  the
                       argument list is:

                       addr:     XWD       channo,.FOREL

   24        .FOWAT    Waits for  I/O  to  finish.   The  format  of  the
                       argument list is:

                       addr:     XWD       channo,.FOWAT

   25        .FOSEK    Obsolete.

   26        .FORRC    Rewrites the RIB of a  file  if  it  has  changed.
                       This  function  is  ignored and the skip return is
                       taken if the channel is not a disk or if  the  RIB


                                   22-170
                             FILOP. [CALLI 155]


                       has  not  changed.   The  argument  list  for this
                       function is:

                       addr:  XWD          channo,.FORRC

   27        .FOGTF    Returns the block number of the first  file  on  a
                       DECtape.   If  the  device on the channel is not a
                       DECtape, the ac is not changed.   This  duplicates
                       the  UGETF  call,  but  allows you to use extended
                       channel  numbers.   The  argument  list  for  this
                       function is:

                       addr:     XWD       channo, .FOGTF

   30        .FOMTP    Performs  the  function  of  an  MTAPE. call,  but
                       allows  you  to use extended channel numbers.  The
                       MTAPE. code is included  in  the  FILOP.  argument
                       list as shown:

                       addr:     XWD       channo,.FOMTP
                                 EXP       n

                       In the argument list shown here, the value of n is
                       equivalent  to the MTAPE. code for the function to
                       be employed.  For example, EXP 1 would perform the
                       MTREW. function.

                       This function returns error  code  %ERILU  if  the
                       argument block is not two or more words long.

   31        .FOUTP    Clears a DECtape directory.  Duplicates the UTPCLR
                       call.  The argument list for this function is:

                       addr:     XWD       channo, .FOUTP

                       This  function  returns  the   ac   unchanged   if
                       successful.

   32        .FORAW    Renames the file  with  the  specified  number  of
                       words  for  allocation.   Same function as .FORNM,
                       but allocation in words is specified in .RBSIZ  of
                       extended RENAME argument block.

   33        .FOFIL    Returns the file specification of the file that is
                       open   on   this  channel.   To  return  the  file
                       specification  as  well  as  to  perform   another
                       function, include Word 10 (.FOFSP) in the argument
                       block instead of using the .FOFIL  function.   The
                       argument list for this function is:

                       addr:     XWD       channo,.FOFIL
                                 XWD       len,addr2


                                   22-171
                             FILOP. [CALLI 155]


                       The second word  contains  the  length  (len)  and
                       address  (addr2)  of  the  block  where  the  file
                       specification should be stored.  This block format
                       is described in the SKIP RETURN section.

   34        .FOFXI    Performs  an  IN  monitor  call,  using   extended
                       addressing  and  dump mode I/O.  The argument list
                       is:

                       addr:     XWD       channo, .FOFXI
                                 addr1
                                 addr2

                       In the argument list:

                        o  channo is the channel number from  which  data
                           is read from the opened file.

                        o  addr1 is the  address  of  the  command  list,
                           which has a two-word format:

                           1.  The first word of each command  word  pair
                               contains the length of the command list.

                           2.  The second word of each command word  pair
                               holds  the  address  where  I/O  should be
                               performed.  If the  length  is  zero,  the
                               address in the second word is the location
                               of the next command list.  When  both  the
                               length  and  the address are zero, the end
                               of the list has been encountered.

                        o  addr2  is  the  optional  address  of  a  word
                           containing  the  block  number  of the file to
                           perform a USETI to before reading.

                       The I/O status bits are returned in the ac.

   35        .FOFXO    Performs  an  OUT  monitor  call,  using  extended
                       addressing  and  dump-mode I/O.  The argument list
                       is:

                       addr:     XWD       channo, .FOFXO
                                 addr1
                                 addr2

                       In the argument list:

                        o  channo is the channel number on which data  is
                           written to the opened file.




                                   22-172
                             FILOP. [CALLI 155]


                        o  addr1 is the  address  of  the  command  list.
                           Command  list  format  is  described  above in
                           .FOFXI.

                        o  addr2 is the  (optional)  address  of  a  word
                           containing  the  block  number  of the file to
                           perform a USETO to before writing.

                       The I/O status bits are returned in the ac.



   22.47.3  Simultaneous File Access with FILOP. UUO

   Multiple channels of a single job and/or multiple jobs  can  update  a
   file  simultaneously using FILOP.  The monitor imposes no restrictions
   or interlocks when a file is being simultaneously updated.  Therefore,
   users  must  ensure that separate jobs do not update the same block of
   the same file at the  same  time.   The  ENQ/DEQ  Facility  (refer  to
   Chapter  8)  may  be  used  to  ensure that such interference does not
   occur, but the monitor does not require its  use  when  simultaneously
   updating a file.

   To  update  a   file   simultaneously,   your   program   performs   a
   FILOP. monitor  call  using  function  code 5 (.FOMAU).  A file can be
   updated in this manner when the file is idle, when it is  being  read,
   or  when  it  is  being  updated  by  other  jobs.   A  file cannot be
   simultaneously updated if the file is in  single-access  update  mode;
   that  is,  when  a  LOOKUP  and  an  ENTER  have  been  performed or a
   FILOP. has been performed with Function code 4 (.FOSAU) or Function  6
   (.FOAPP).

   Note that  although  an  extended  LOOKUP/ENTER/RENAME  block  can  be
   specified  by  the FILOP. monitor call, your program cannot change the
   file attributes of a simultaneously updated file.  The  FILOP. monitor
   call uses the first four words of the extended argument list.

   In order to prevent excessive monitor overhead, files that are  to  be
   simultaneously updated should be pre-allocated into contiguous blocks,
   if possible.  This will prevent the creation of inefficient  retrieval
   pointers,  and  will  lessen  the  chance  that  extended RIBs will be
   created.

   SKIP RETURN

   The requested function has been performed.

   The file specification is returned when you  use  function  .FOFIL  or
   when you specify an address in .FOFSP (Word 10 in the argument block).
   For .FOFSP, the following data block is returned at  the  address  you
   specify  in  the  right  half  of  the word.  For .FOFIL, this data is
   returned in the argument block at addr2.


                                   22-173
                             FILOP. [CALLI 155]


   Word      Symbol    Contents

   0         .FOFND    Reserved for use by DIGITAL.
   1         .FOFDV    Device name.
   2         .FOFFN    File name.
   3         .FOFEX    File extension.
   4         .FOFPP    PPN.
   5         .FOFSF    First SFD.
   6-10                Subsequent levels of SFDs.

                                    NOTE

           Words  5  through   10   are   returned   only   where
           appropriate.

           The returned block is ended by a zero word.  When  you
           reserve  the block for the file specification, be sure
           to include space for this zero word.

   ERROR RETURN

   Error codes are returned in the ac for  the  FILOP. call.   If  -1  is
   returned  in  the  ac,  an  invalid argument list was supplied.  Other
   error codes are identical to those used by  LOOKUP/ENTER.   These  are
   listed  in  Section  11.14, in Volume 1.  Several functions return the
   I/O status word, as mentioned in the function descriptions.

   RELATED CALLS

         o  CLOSE,

         o  ENTER

         o  GETSTS

         o  IN/INPUT

         o  LOOKUP

         o  MTAPE

         o  OPEN

         o  OUT/OUTPUT

         o  PATH.

         o  RELEAS

         o  RENAME




                                   22-174
                             FILOP. [CALLI 155]


         o  SETSTS

         o  SUSET.

         o  UGETF

         o  USETI/USETO

         o  UTPCLR

         o  WAIT











































                                   22-175
                             FRCUUO [CALLI 106]


   22.48  FRCUUO [CALLI 106]

   FUNCTION

   Forces a monitor command for a job or a terminal.  This  monitor  call
   requires JP.POK, JACCT, or [1,2] privileges.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             FRCUUO  ac,
               error return
             skip return
             . . .
   addr      SIXBIT /command/
           / XWD 0,jobno \   ;optional arguments
           \ XWD 0,udx   /

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument list.  If you give  a  zero
            len, the default is 1.

         o  addr is the address of the argument list.

         o  command is the name of a command (from the list below).

         o  jobno is the number of a logged-in  job.   If  you  omit  the
            jobno, or specify it as zero, the current job is assumed.

         o  udx is the Universal Device Index for the terminal.

   The names of the commands that can be forced are:

   Command        Meaning

   .BPT           Forces a DDT breakpoint trap, simulating <CTRL/D>.

   .BYE           Detaches the job, this command is forced when a dataset
                  disconnects.

   .FCONT         Continues the job; this command is forced when a job is
                  continued  after it was halted by "Waiting for operator
                  action." (Refer to JCONTINUE  monitor  command  in  the
                  Commands Manual.)

   .HALT          Stops the job; this command is  forced  when  you  type
                  CTRL/C.

   .HELLO         Connects (greets) the job; this command is forced  when
                  a dataset or network connect occurs, and runs INITIA.



                                   22-176
                             FRCUUO [CALLI 106]


   .NETLD         Invokes execution of the program which  does  automatic
                  down-line loading for ANF-10 series remote software.

   .RESTA         Greets the job but does not run INITIA.

   .TYPE          Types the current input buffer; this is  equivalent  to
                  typing CTRL/R.

   HALT           Stops the job (regardless of CTRL/C trapping).

   INITIA         This command is forced when the system  is  initialized
                  and is used to run INITIA for certain terminals.

   KJOB           Kills the job; this command is used to force a  job  to
                  terminate.

   USESTA         Types status information; this is equivalent to  typing
                  either CTRL/T or the USESTAT command.

   SKIP RETURN

   The command is executed; the ac is unchanged.

   ERROR RETURN

   The ac is cleared.

   EXAMPLES

             MOVE    T1,[XWD 2,ADDR]
             FRCUUO  T1,
               JRST  FRCERR
             JRST    CONTIN
   ADDR:     SIXBIT  /.TYPE/
             XWD     0,0

   This code sequence displays the contents of the terminal input  buffer
   for the current job, as though the user had typed <CTRL/R>.
















                                   22-177
                             GETLCH [TTCALL 6,]


   22.49  GETLCH [TTCALL 6,]

   FUNCTION

   Returns the line characteristics for a terminal line.

   CALLING SEQUENCE

             GETLCH  addr
             return
             . . .
   addr:     XWD     0,lineno

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the argument list.

         o  lineno  is  the  line   number   for   the   terminal   whose
            characteristics are required.

   RETURN

   If the job is detached and addr contained -1, the monitor returns a  0
   word.  On a skip return, the monitor returns the terminal's UDX in the
   right half of addr (.UXTRM + lineno).

   The following line characteristics are returned in the  left  half  of
   the word at addr:

   Bit       Symbol    Characteristic

   0         GL.ITY    Pseudo-terminal (PTY).
   1         GL.CTY    Operator's terminal (CTY).
   2         GL.DSP    Display console (DIS).
   3         GL.DSL    Dataset line.
   4         GL.CNE    No characters are echoed.
   5         GL.HDP    Half-duplex line.
   6         GL.REM    Remote terminal.
   7         GL.RBS    Remote batch terminal.
   8-9                 Reserved for use by DIGITAL.
   10        GL.8BM    Terminal is open in 8-bit I/O mode.
   11        GL.LIN    User has typed some input.
   12        GL.SLV    TTY SLAVE is in effect.
   13        GL.LCM    Terminal in lowercase mode.
   14        GL.TAB    Terminal has tab capability.
   15        GL.LCP    Local copy only (no echo).
   16        GL.PTM    Papertape mode  is  on  (CTRL/Q,  CTRL/S,  and  so
                       forth,   control   papertape   motion  instead  of
                       terminal output).





                                   22-178
                             GETLCH [TTCALL 6,]


   17        GL.NEC    Terminal is in no-echo mode.  This  characteristic
                       is  set  by setting IO.SUP in the OPEN call, or by
                       SETSTS, or by TRMOP function .TOECH.  This setting
                       is  overridden when the job goes to monitor level,
                       and echoing resumes.  You can clear this bit using
                       a RESET call.

   If you use an invalid line number, the monitor returns 0 in  the  left
   half of the word at addr.

   RELATED CALLS

         o  GETLIN

         o  SETLCH

         o  SETSTS

         o  TRMOP.

         o  TTCALL

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.





























                                   22-179
                             GETLIN [CALLI 34]


   22.50  GETLIN [CALLI 34]

   FUNCTION

   Returns the SIXBIT monitor-assigned name of the terminal  attached  to
   your job.

   CALLING SEQUENCE

             GETLIN  ac,
             return

   RETURN

   The SIXBIT name of the terminal is in the ac, left-justified,  in  the
   form  TTYnnn, where nnn is the dynamic terminal number associated with
   your job's terminal.

   If your job is not attached to any terminal, the ac contains:

   XWD       0,'nnn'

   In this format, nnn is the right half of the name of the  terminal  to
   which your job was last attached (that is, nnn in TTYnnn).

   EXAMPLES

             GETLIN  T1,       ;Get terminal name
             TLNN    T1,-1     ;Job detached?
             JRST    NOTTY     ;Yes
               . . .           ;No

   This sequence gets the name of the terminal for  the  job  and  checks
   whether the job is currently detached.

   COMMON PROGRAMMING ERRORS

   Omitting the comma after the ac.
















                                   22-180
                             GETPPN [CALLI 24]


   22.51  GETPPN [CALLI 24]

   FUNCTION

   Returns the project-programmer number (PPN) for your job.

   CALLING SEQUENCE

             GETPPN  ac,
             normal return
               skip return

   NORMAL RETURN

   The GETPPN monitor call returns the project number in the left half of
   the ac, and the programmer number in the right half of the ac.

   SKIP RETURN

   The skip return is taken if your program has the  JACCT  bit  set  and
   another job is logged in under the same PPN.

   EXAMPLES

             GETPPN  T1,
             JFCL
             MOVEM   T1,MYPPN

   This code gets the PPN regardless of whether the program is JACCTed.

   RELATED CALLS

   OTHUSR

   COMMON PROGRAMMING ERRORS

   Forgetting the sequence of skip return followed by alternate return.

















                                   22-181
                             GETSEG [CALLI 40]


   22.52  GETSEG [CALLI 40]

   FUNCTION

   Replaces the current program high segment with a given  high  segment.
   Refer  to  Chapter 2 for specific information about the implementation
   of this call and the state of memory during the GETSEG operation.

   CALLING SEQUENCE

             MOVEI   ac,addr
             GETSEG  ac,
               error return
             skip return
             . . .
   addr:     SIXBIT/device/
             SIXBIT/filename/
             SIXBIT/extension/
             EXP     0
           / XWD     proj,prog \      ;or PATH. pointer
           \ XWD     0,addr2   /      ;core argument
           / EXP     0        \
           \ XWD     -1,addr3 /

   In the calling sequence, the program supplies addr, which  is  is  the
   address  of the argument block.  This argument block is identical to a
   LOOKUP/ENTER argument block.   These  types  of  argument  blocks  are
   described  in  Chapter  11  (Volume  1)  of  the TOPS-10 Monitor Calls
   Manual.

   The core argument word is optional.  If it is zero, the  high  segment
   is  placed  into  the  current  PC  section.   Otherwise, addr3 is the
   address containing the section number where the high segment  will  be
   placed.
   The GETSEG monitor call allows  your  program  to  initialize  a  high
   segment  from  a  file  or  from  a  currently-loaded sharable segment
   without affecting your program's low segment.  This  facility  can  be
   used  for  shared  data segments, shared program overlays, and runtime
   routines (such as FORTRAN and COBOL object-time systems).

   On KL processors, if the high segment obtained by the  GETSEG  monitor
   call  is an execute-only segment, it is a concealed high segment.  You
   can give zeros for any argument except the file name or  device.   The
   defaults are:

             extension   .EXE
             PPN         default directory path







                                   22-182
                             GETSEG [CALLI 40]


   SKIP RETURN

   The monitor replaces the current high  segment  with  the  given  high
   segment.

                                   NOTES

           If the given file contains  both  a  high  and  a  low
           segment, the monitor brings in only the high segment.

           The contents of the  accumulators  are  not  preserved
           (this  aspect  varies  from monitor version to monitor
           version).

           The left half of .JBHRL is cleared.

           The right half of .JBHRL is set  to  the  new  highest
           legal user address in the high segment.

           .JBSA and .JBREN are cleared if they contain addresses
           in  the  new high segment.  This removes the program's
           start address, so that an error will occur on a  START
           or REENTER command.

           Channel 0 is  released  by  the  GETSEG  call.   Other
           channels are not released.  Refer to the RELEAS UUO.

   A GETSEG call made from the current program's high segment can succeed
   only  if  the  start  of  the new high segment coincides with the skip
   return for the call.  Program execution returns to the user program at
   the  PC  corresponding  to  the skip return from the GETSEG UUO in the
   previous segment.  It is the user's responsibility to ensure that this
   PC contains instructions he wishes to be executed.

   ERROR RETURN

   See Section 11.14 for a list of GETSEG errors.

   If the segment already exists in the user's address space, error  code
   70 is returned in the ac.

   RELATED CALLS

         o  MERGE.

         o  RELEAS

         o  RUN

         o  SEGOP.




                                   22-183
                             GETSEG [CALLI 40]


   COMMON PROGRAMMING ERRORS

         o  Forgetting to save the acs over the GETSEG.

         o  Forgetting that channel 0 is destroyed.

         o  Forgetting that a GETSEG from a high segment returns  control
            to the PC in the new high segment.














































                                   22-184
                            GETSTS [OPCODE 062]


   22.53  GETSTS [OPCODE 062]

   FUNCTION

   Returns the I/O status bits  for  a  device.   Use  FILOP. to  perform
   GETSTS  on  an extended I/O channel.  The specific I/O status bits for
   each device are listed in Volume 1 in  the  chapter  specific  to  the
   device.

   CALLING SEQUENCE

             GETSTS  channo,addr
             return
             ...
   addr:     BLOCK   1

   In the calling sequence, the program supplies the following variables:

         o  channo is the channel number of the channel for which the I/O
            status word is desired.

         o  addr is the address of the word to  receive  the  I/O  status
            word.

   RETURN

   The monitor returns the I/O status bits in the right half of the  word
   at  addr,  and  the  data mode for I/O in the left half of the word at
   addr.  The I/O status bits that are possible are:

   Bits      Symbol    Meaning

   18-21     IO.ERR    Bit mask for device-independent I/O error flags.

   18        IO.IMP    Software detected improper data mode, or  checksum
                       error occurred.

   19        IO.DER    Device error.  Refer to specific device for  cause
                       of this error.

   20        IO.DTE    Data error.

   21        IO.BKT    Block too large, quota exceeded, or file structure
                       is full.

   22        IO.EOF    End of file was reached.

   23        IO.ACT    Device is active.

   24-29               Device-dependant error flags.   These  are  listed
                       for  each  device  in  the  appropriate chapter in
                       Volume 1.


                                   22-185
                            GETSTS [OPCODE 062]


   30        IO.SYN    Synchronous mode I/O.

   31        IO.UWC    Use user's word count.

   32-35               Data mode of the I/O,  indicated  by  one  of  the
                       codes that are listed in Table 11-2 in Volume 1.

   RELATED CALLS

         o  CLRST.

         o  ERLST.

         o  FILOP.

         o  SENSE.

         o  SETSTS

         o  STATO

         o  STATZ

   COMMON PROGRAMMING ERRORS

         o  Forgetting that there is only one return from the call.

         o  If you give a nonexistent or  uninitialized  channel  number,
            the  monitor  stops your job and prints the following message
            on your terminal:

                 ?I/O to unassigned channel at user PC address

            where address gives the program counter for your job  at  the
            time of the failure.

         o  Forgetting to clear the error status bits before retrying the
            GETSTS  function.   An INPUT function followed by GETSTS will
            not clear previously set bits.   You  should  use  SETSTS  to
            clear  the  I/O  error bits before attempting to read the new
            I/O error status.













                                   22-186
                             GETTAB [CALLI 41]


   22.54  GETTAB [CALLI 41]

   FUNCTION

   Returns a word from one of the monitor's GETTAB tables, allowing  your
   program  to read many types of job and system information.  The GETTAB
   tables are listed in Chapter 23.

   CALLING SEQUENCE

             MOVE    ac,[XWD index,table]
             GETTAB  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  index is an index into the specified table.  If the table  is
            indexed  by  job number, you can use -1 to obtain information
            about your own job.

            If the table is indexed by job number or segment number,  you
            can use -2 to return information about your own high segment.

         o  table gives the number of the GETTAB table.

   SKIP RETURN

   The requested word from the table is returned in the ac.

   ERROR RETURN

   The index or the table number was invalid.

   EXAMPLES

   See Chapter 23 for examples.

















                                   22-187
                             GOBSTR [CALLI 66]


   22.55  GOBSTR [CALLI 66]

   FUNCTION

   Returns file structure names from a job  search  list  or  the  system
   search  list.   Privileges are not requires to examine the search list
   of any job with your PPN or to examine the system search list.

   To use the GOBSTR call for other jobs, you must have either the JP.SPA
   privilege or the JP.SPM privilege set in your .GTPRV word, or you must
   have JACCT privileges, or the job must be logged into [1,2].

   For a discussion of file structures in a search list, see  the  SETSRC
   program in the TOPS-10 User Utilities Manual.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             GOBSTR  ac,
               error return
             skip return
             . . .
   addr:     EXP     jobno         ;.DFGJN 
             XWD     projno,progno ;.DFGPP
           / EXP     -1        \   ;.DFGNM for first in list
          |  EXP     0          |  ;.DFGNM for first after FENCE
           \ SIXBIT/structure/ /   ;.DFGNM for next in list
             EXP     0             ;.DFGDR
             BLOCK   1

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument list.

         o  addr is the address of the argument list.

         o  addr+2 contains the structure name, or 0, or  -1.   Therefore
            you  can begin with the first name in the list by using -1 at
            addr+2; then when the monitor returns the first name  in  the
            list, you can leave the name in addr+2 to call for the second
            name, and so forth.  If the next item in the list  is  FENCE,
            the  monitor  returns  0.   If there are no more items in the
            list, the monitor returns -1.

         o  jobno is the number of  a  logged-in  job  (use  -1  for  the
            current job; use 0 for the system search list).

         o  projno,progno is a project-programmer number (PPN).

         o  structure is the SIXBIT name of a file structure.




                                   22-188
                             GOBSTR [CALLI 66]


   GOBSTR status bits are returned at addr+4 as follows:

   Bits      Symbol    Meaning

   0         DF.SWL    If on, software write-protect is set.

   1         DF.SNC    If on, creation of files is not  allowed  on  this
                       structure, unless the structure name is explicitly
                       included in  the  file  specification.   Refer  to
                       Chapter 12 for more information.

   SKIP RETURN

   The monitor returns the required SIXBIT structure name (or 0 or -1) at
   addr+2, and the GOBSTR status word at addr+4.

   ERROR RETURN

   The monitor returns one of the following error codes in the ac:

   Code      Symbol    Meaning

   3         DFGIF%    File structure name is not 0, -1, or a file
                       structure name in SIXBIT.
   6         DFGPP%    The specified job number and project-programmer
                       number do not correspond.
   10        DFGNP%    Your job is not privileged.
   12        DFGLN%    The specified length of the argument block is
                       invalid.

   EXAMPLES

   The following code reads all the structures in the job search list.

             MOVEI   T1,0                  ;Initialize counter
   LOOP:     MOVE    T2,[.DFGST+1,,ADDR]
             GOBSTR  T2,                   ;Get next structure
               JRST  ERROR
             MOVE    T2,ADDR+.DFGNM        ;Get structure name
             MOVEM   T2,STRTAB(T1)         ;Save in table
             AOJE    T2,CONTIN             ;Last one if -1
             AOJA    T1,LOOP               ;Bump table pointer and loop
   ADDR:     EXP     JOBNO                 ;Job number
             XWD     PROJ,PROG             ;PPN
             EXP     -1                    ;Get first one in list
             EXP     0
             EXP     0
   STRTAB:   BLOCK   30                    ;Space to store search list






                                   22-189
                             GOBSTR [CALLI 66]


   RELATED CALLS

         o  DSKCHR

         o  JOBSTR

         o  STRUUO

         o  SYSSTR













































                                   22-190
                             GTNTN. [CALLI 165]


   22.56  GTNTN.  [CALLI 165]

   FUNCTION

   Returns the node number and line number for a terminal.  This call  is
   applicable to network systems only.

   CALLING SEQUENCE

           / MOVE    ac,[SIXBIT/terminal-name/] \
          |  MOVEI   ac,channo                   |
           \ MOVEI   ac,udx                     /
             GTNTN.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  terminal-name is the monitor-assigned name of  the  terminal,
            returned when you use the GETLIN monitor call.

         o  udx is the Universal Device Index for the terminal.

         o  channo is the channel number of  the  channel  to  which  the
            terminal is connected.

   SKIP RETURN

   The monitor returns the node number and the line number in the  ac  in
   the form:

        node-number,,line-number

   The node-number is the number of  the  node  at  which  the  specified
   terminal  is  located.   The  line-number  on  non-network  systems is
   equivalent to the terminal number.  On a network  system,  line-number
   is  the  physical line number of the terminal on the node to which the
   terminal is connected.

   Networked terminals are assigned logical line numbers from a  pool  of
   network  terminal numbers when they connect to a host.  Therefore, the
   logical line number will change as the particular node  to  which  the
   terminal  is  attached comes on-line, and as the terminal connects to,
   and disconnects from a host.










                                   22-191
                             GTNTN. [CALLI 165]


   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   0         NTNSD%    Nonexistent device.
   1         NTNAT%    Device is not a terminal.
   2         NTTNC%    Terminal is not connected.

   RELATED CALLS

         o  GTXTN.

         o  NETOP.







































                                   22-192
                             GTXTN. [CALLI 166]


   22.57  GTXTN.  [CALLI 166]

   FUNCTION

   Returns the physical name of the terminal for a given  node  and  line
   number.  This call applies to network systems only.

   CALLING SEQUENCE

             MOVE    ac,[XWD nodeno,lineno]
             GTXTN.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  nodeno is the node number for a terminal.

         o  lineno is the physical line number for the terminal at the
            node.

   SKIP RETURN

   The physical name of the terminal is returned in ac in the form:

        SIXBIT/name/

   In the argument list, the program supplies  the  name,  which  is  the
   physical name of the terminal (such as TTY427).

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   0         XTUNT%    Unknown terminal (node number or the  line  number
                       specified  is  not  known  or  node or line is not
                       connected to the DECsystem-10).
   1         XTNLT%    Not a legal terminal.

   RELATED CALLS

         o  GTNTN.

         o  NODE.








                                   22-193
                              HIBER [CALLI 72]


   22.58  HIBER [CALLI 72]

   FUNCTION

   Suspends execution of the job until a specified event occurs.

   CALLING SEQUENCE

             MOVE    ac,[flags+sleeptime]
             HIBER   ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  flags specify conditions described below.

         o  sleeptime gives the amount of time for the job to sleep.   If
            HB.SEC  is  set  in  flags,  the  sleeptime  is  specified in
            seconds; otherwise, it is specified in milliseconds.

   The sleeptime is rounded upward to  the  next  larger  jiffy,  with  a
   maximum  of  262 seconds.  If you set HB.SEC, the maximum sleeptime is
   about 72 minutes (at 60 Hz) or 87 minutes (at 50 Hz).  If you  need  a
   longer  sleeptime,  use the .CLOCK function of the DAEMON UUO.  If you
   give the sleeptime as 0, the job sleeps until awakened by one  of  the
   specified events, or by a WAKE monitor call.

   If your job is hibernating, it can be woken by another job if that job
   has sufficient privileges.  Refer to the WAKE UUO.

   To prevent your job  from  oversleeping  and  missing  an  event,  the
   monitor sets the wakeup bit even if the job is already awake.  You can
   use another HIBER call to clear the bit.  You cannot assume  that  any
   of  the specified events actually occurred to WAKE your job; therefore
   you should test for all the events that may have caused  your  job  to
   awaken,  and  explicitly  execute another HIBER call if you were WAKEd
   unexpectedly.

   You can also clear the wake-enable bit for your job by using the RESET
   monitor call.  Note that until the first HIBER call is executed, there
   is  no  protection  against  wakeup  commands  from  other  jobs.   To
   guarantee  your  job's  protection,  you should execute a WAKE monitor
   call for your job, followed by a HIBER call giving the protection  you
   want.   The  HIBER  will return immediately, having set the protection
   codes as desired.








                                   22-194
                              HIBER [CALLI 72]


   The bits and their meanings are:

   Bits      Symbol    Meaning

   0         HB.SWP    Clear the in-core protect  time,  making  the  job
                       available for swapping out.

   1         HB.SEC    The sleeptime is specified in seconds.

   9         HB.DIN    When set in conjunction with HB.RTL and/or HB.RTC,
                       enables  the  JB.UHI  bit  in JOBSTS, which allows
                       terminal input from programs such  as  BATCON  and
                       OPR.    The  job  is  awakened  on  input  to  the
                       terminal.

   10        HB.IPC    Wake the job when an IPCF packet is placed in  its
                       input queue.

   11        HB.RIO    Wake the job when asynchronous I/O is completed.

   12        HB.RPT    Wake the job for PTY activity.

   13        HB.RTL    Wake the job when a  line  of  terminal  input  is
                       typed  on any terminal assigned to your job, or if
                       there is a rescanable line available on the  job's
                       controlling terminal.

   14        HB.RTC    Wake the job when a character of terminal input is
                       ready.

   15        HB.RWJ    Wake the job only on a WAKE monitor call from  the
                       job  itself.  Setting this bit prevents other jobs
                       from waking your job,  unless  the  other  job  is
                       privileged.

   16        HB.RWP    Wake the job only on a WAKE monitor  call  from  a
                       job having the same programmer number.

   17        HB.RWT    Wake the job only on a WAKE monitor  call  from  a
                       job having the same project number.

   SKIP RETURN

   When an enabled HIBER  condition  occurs,  execution  resumes  at  the
   normal return.

   ERROR RETURN

   The HIBER call takes the error return only if it is not implemented on
   your system.




                                   22-195
                              HIBER [CALLI 72]


   EXAMPLES

             MOVSI   T1,(HB.RWP+HB.RWT)
             HIBER   T1,
               JRST  ERROR

   This code sequence causes the job to sleep until awakened  by  a  WAKE
   monitor  call  from  another  job  having  the same project-programmer
   number.  See also RTTRP call.

   RELATED CALLS

         o  SLEEP

         o  WAKE

   COMMON PROGRAMMING ERRORS

         o  Forgetting to protect against WAKEs from other jobs.

         o  Assuming a particular event woke your job,  without  actually
            checking.
































                                   22-196
                               HPQ [CALLI 71]


   22.59  HPQ [CALLI 71]

   FUNCTION

   Places your job in, or removes your job from a high-priority scheduler
   queue.

   You cannot use HPQ  unless  your  system  administrator  has  set  the
   privilege  value JP.HPQ to a nonzero value.  This value is the highest
   priority queue you  can  request.   This  monitor  call  is  primarily
   intended  for real-time programs where fast response time is critical.
   Refer to Chapter 9 of the Monitor Calls Manual,  Volume  1,  for  more
   information.

   CALLING SEQUENCE

             MOVEI   ac,queue
             HPQ     ac,
               error return
             skip return

   In the calling sequence, the program supplies the queue, which is  the
   number  of  the required high priority queue.  The lowest queue number
   is 1; the highest is a system parameter.  If you give queue as 0, your
   job returns to the normal scheduler queue.

   SKIP RETURN

   The monitor places your job in the given queue.

   ERROR RETURN

   The ac contains -1, you gave an illegal value for queue,  or  you  are
   not a privileged user.

   RELATED CALLS

         o  RTTRP

         o  TRPSET

         o  UJEN












                                   22-197
                              IN [OPCODE 056]


   22.60  IN [OPCODE 056]

   FUNCTION

   Reads data from an initialized channel  into  memory.   Use  FILOP. to
   perform an IN for an extended I/O channel.

   CALLING SEQUENCE

             IN      channo,addr
             success return
               skip return

   In the calling sequence, the proram supplies the following variables:

         o  channo is the number of an initialized I/O channel.

         o  addr is one of the following:

             -  If the channel was initialized for dump mode,  then  addr
                gives the address of an I/O command list.

             -  If the channel was initialized for  buffered  mode,  then
                addr  gives  the  address  of the second word of the next
                buffer to be used; if you give 0 (the normal  case),  the
                next buffer in the ring is used.

            Note that the return locations  for  this  call  are  in  the
            reverse  order  from  the convention for other calls, because
            the success return follows the calling  instruction  and  the
            error return follows the success return.

   SUCCESS RETURN

   Data is input from the channel.

   SKIP RETURN

   The monitor found an end-of-file mark or errors in the data (reflected
   in  the  I/O  status word).  If using non-blocking I/O mode, the error
   return could indicate no available data.   This  is  indicated  by  no
   error  bits  set  in the I/O status word.  Use the GETSTS call to read
   the I/O status bits.

   EXAMPLES

   See LOOKUP call.







                                   22-198
                              IN [OPCODE 056]


   RELATED CALLS

         o  FILOP.

         o  INPUT

         o  OUT

         o  OUTPUT

   COMMON PROGRAMMING ERRORS

         o  If the channel was not initialized, the monitor stops the job
            and prints:

                 ?I/O to unassigned channel at user PC xxxxx

         o  If the specified address is illegal, the  monitor  stops  the
            job and prints:

                 ?Address check for device yyyyyy:  UUO at user PC xxxxx

         o  If the monitor cannot allocate buffers in your address space,
            the monitor stops the job and prints (see INBUF):

                 ?Address check for device yyyyyy:  UUO at user PC xxxxx




























                                   22-199
                             INBUF [OPCODE 064]


   22.61  INBUF [OPCODE 064]

   FUNCTION

   Sets up an input buffer ring with the specified number of buffers  for
   a  given  initialized  channel.   Use FILOP. to perform an INBUF on an
   extended I/O channel.

                                    NOTE

           Buffers are allocated by the  monitor  in  the  user's
           address  space  starting at the location pointed to by
           the contents of .JBFF.  This symbol represents a  word
           in  the  Job  Data  Area.   As  the JDA exists only in
           Section  0,  you  cannot  initialize  a  buffer  in  a
           non-zero  section,  unless  that  section is mapped to
           section 0.  Use the  FILOP. monitor  call  to  specify
           buffer starting addresses in a non-zero section.

   CALLING SEQUENCE

             INBUF   channo,buffers
             return

   In the calling sequence, the program supplies the following variables:

         o  channo is the number of an initialized channel.

         o  buffers is the number of buffers to set up in the ring.   For
            disk  devices, if you give buffers as 0, the monitor uses the
            value given in the SET DEFAULT  BUFFERS  monitor  command  or
            SETUUO.   If  no  value  has  been set, the system default (a
            MONGEN parameter) is used.  For non-disk devices,  2  buffers
            are assumed.

   RETURN

   The buffer ring is set up.

   RELATED CALLS

         o  FILOP.

         o  OUTBUF

   COMMON PROGRAMMING ERRORS

         o  If the channel was not initialized, the monitor stops the job
            and prints:

                 ?I/O to unassigned channel at user PC xxxxx



                                   22-200
                             INBUF [OPCODE 064]


         o  If the monitor cannot allocate buffers in your address space,
            the monitor stops the job and prints:

                 ?Address check for device yyyyyy: UUO at user PC xxxxx

         o  If your program tries  to  use  INBUF  or  OUTBUF  to  create
            buffers  outside  the job's core image, the job cannot expand
            because the system runs out of virtual memory and the monitor
            stops the job and prints:

                 ?Illegal address in UUO at user PC xxxxx

         o  If you use INBUF or OUTBUF to set  up  a  buffer  ring  in  a
            non-zero  section, the monitor stops the job and displays the
            following error message:

            ?Illegal INBUF/OUTBUF for device [name]; UUO at user PC [loc]





































                                   22-201
                             INCHRS [TTCALL 2,]


   22.62  INCHRS [TTCALL 2,]

   FUNCTION

   Reads an ASCII character from the job's controlling  terminal's  input
   buffer,  skipping on return if a character was available.  INCHRS also
   sets "character mode," in which the program will not wait for the  end
   of  the  line  of input from the terminal.  Therefore, CTRL/U, DELETE,
   and other line-editing characters will not function as they do for the
   monitor.  See Chapter 15 for more specific information.

   CALLING SEQUENCE

             INCHRS  addr
             return 1       ;no character in buffer
             return 2       ;character read from buffer
             ...
   addr:     BLOCK 1

   In the calling sequence, the program supplies the addr, which  is  the
   address of a word to contain the input character.

   RETURN

   If a character has been input, the monitor copies it, right-justified,
   into the word at addr.  The remainder of the word is cleared.

   RELATED CALLS

         o  TRMOP.

         o  TTCALL

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.


















                                   22-202
                             INCHRW [TTCALL 0,]


   22.63  INCHRW [TTCALL 0,]

   FUNCTION

   Inputs an ASCII character  from  the  terminal's  input  buffer.   The
   monitor waits for a character if none is available.  INCHRW inputs the
   character regardless of whether a complete line has  been  typed.   If
   the   program  is  not  prepared  to  handle  every  possible  control
   character, you should  consider  using  the  INCHWL  call  instead  of
   INCHRW.

   CALLING SEQUENCE

             INCHRW  addr
             return

   In the calling sequence, the program supplies the addr, which  is  the
   address of the word to receive the ASCII input character.

   If no character has been input, the monitor waits for a character.

   RETURN

   If a character has been  input,  the  monitor  places  the  character,
   right-justified,  into the word at addr.  The remainder of the word is
   cleared.

   RELATED CALLS

         o  TRMOP.

         o  TTCALL

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.


















                                   22-203
                             INCHSL [TTCALL 5,]


   22.64  INCHSL [TTCALL 5,]

   FUNCTION

   Inputs a character in line mode  from  the  terminal's  input  buffer,
   skipping  on  return  if  the  input  was  terminated  by a line break
   character such as carriage-return/line-feed.

   CALLING SEQUENCE

             INCHSL  addr
             return 1
             return 2

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the  word  to  receive  the  character
            (right-justified; the rest of the word is cleared).

         o  return 1 is the return instruction when a line break has  not
            been input from the terminal

         o  return  2  is  the  return  instruction  when  a  line  break
            character has been input from the terminal.

   RETURN

   If a line break has been input from the terminal, the monitor  returns
   at  return  2  with the next character of the line, right-justified in
   addr; if not, it returns at return 1.

   RELATED CALLS

         o  TRMOP.

         o  TTCALL

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.














                                   22-204
                             INCHWL [TTCALL 4,]


   22.65  INCHWL [TTCALL 4,]

   FUNCTION

   Inputs a character from the terminal input  buffer,  waiting  until  a
   break  character is encountered.  With this type of input, the monitor
   handles line-editing characters like DELETE, CTRL/R, and so forth.

   See Chapter 15 for a discussion of break characters.

   CALLING SEQUENCE

             INCHWL  addr
             return

   In the calling sequence, the program supplies the  addr,  which  gives
   the address of the word to contain the input character.

   RETURN

   The character is right-justified in the word at addr.   The  remainder
   of the word is cleared.

   RELATED CALLS

         o  TRMOP.

         o  TTCALL

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.






















                                   22-205
                             INIT [OPCODE 041]


   22.66  INIT [OPCODE 041]

   Obsolete; use OPEN or FILOP.  monitor calls.



















































                                   22-206
                             INPUT [OPCODE 066]


   22.67  INPUT [OPCODE 066]

   FUNCTION

   Inputs data from an initialized  channel  to  memory.   Use  FILOP. to
   perform an INPUT on an extended I/O channel.  INPUT is the same as IN,
   except INPUT does not  give  an  error  return  if  an  error  or  EOF
   condition  occurs.   The  user  must  check  for  such conditions with
   GETSTS, STATZ, or STATO.

                                    NOTE

           Programs doing non-blocking  I/O  should  use  the  IN
           monitor call or FILOP. function .FOINP.

   CALLING SEQUENCE

             INPUT   channo,addr
             return

   In the calling sequence, the program supplies the following variables:

         o  channo is the number of an initialized channel.

         o  addr is one of the following:

             -  If the channel is initialized for dump  mode,  then  addr
                gives the address of an I/O command list.

             -  If the channel is initialized  for  buffered  mode,  then
                addr  gives  the  address  of the second word of the next
                buffer to be used; if you give 0 (the default), the  next
                buffer in the ring is used.
   RETURN

   Data is input from the channel.

   RELATED CALLS

         o  FILOP.

         o  IN

         o  OUT

         o  OUTPUT








                                   22-207
                             INPUT [OPCODE 066]


   COMMON PROGRAMMING ERRORS

         o  If the channel was not initialized, the monitor stops the job
            and prints:

                 ?I/O to unassigned channel at user PC [addr]

         o  If the specified address is illegal, the  monitor  stops  the
            job and prints:

                 ?Illegal address in UUO as user PC [addr]

         o  If the monitor cannot allocate buffers in your address space,
            the monitor stops the job and prints:

                 ?Address check for device [name]:  UUO at user PC [addr]






































                                   22-208
                             IONDX. [CALLI 127]


   22.68  IONDX.  [CALLI 127]

   FUNCTION

   Returns the Universal Device Index (UDX) for a device or channel.  For
   information  about  terminal  names  and  their  UDXs,  refer  to  the
   TRMNO. UUO.

   CALLING SEQUENCE

           / MOVE    ac,[SIXBIT/device/] \
           \ MOVEI   ac,channo           /
             IONDX.  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  device is the SIXBIT physical or logical name of a device for
            which its UDX is desired.

         o  channo is the number of an initialized channel.

   SKIP RETURN

   The Universal Device Index for the specified device or current  device
   on the specified channel is returned in the ac.

   ERROR RETURN

   If  the  ac  is  cleared,  you  specified  a  nonexistent  device   or
   SIXBIT/MPX/ as a device name.






















                                   22-209
                            IONEOU [TTCALL 15,]


   22.69  IONEOU [TTCALL 15,]

   FUNCTION

   Sends an 8-bit image character to the terminal's output buffer.

   CALLING SEQUENCE

             IONEOU    addr
             return

   In the calling sequence, the program supplies the addr, which contains
   the 8-bit character in bits 28 to 35.

   RETURN

   The 8-bit character is output to the terminal in image mode.

   RELATED CALLS

   OUTCHR

   COMMON PROGRAMMING ERRORS

   Typing a comma after addr.





























                                   22-210
                             IPCFM. [CALLI 217]


   22.70  IPCFM.  [CALLI 217]

   FUNCTION

   Communicates with [SYSTEM]INFO and [SYSTEM]IPCC, replacing  a  message
   exchange.

   CALLING SEQUENCE

             XMOVEI  ac,addr
             IPCFM.  ac,
               error return
             skip return
   addr:     flags dest,,len
             addr1
             optional in-your-behalf process ID (PID)
   addr1:    message block

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the packet header block.

         o  flags are one or both of  the  flags  in  the  packet  header
            block.

         o  dest is the destination PID.

         o  len is the length of the packet header block.

   The argument block at addr is:

   Word      Symbol    Contents

   0         .IPCMF    Flags, destination,  and  length  fields,  in  the
                       following format:

                       Bits   Symbol    Meaning

                       0      IP.CMP    Invoking privileges.  The job
                                        must have IPCF privileges to use
                                        this bit.

                       1      IP.CMI    Indirect sender's PID.

                       2-14             Reserved for DIGITAL.









                                   22-211
                             IPCFM. [CALLI 217]


                       15-17  IP.CMD    Destination process code, one of
                                        the following:

                                        Code   Symbol   Meaning

                                        1      .IPCCC   [SYSTEM]IPCC
                                        2      .IPCCF   System-wide
                                                        [SYSTEM]INFO
                                        3      .IPCCP   Receiver's
                                                        [SYSTEM]INFO

                       18-26            Reserved for DIGITAL.

                       27-35  IP.CML    Total length of argument block,
                                        including .IPCMF.

   1         .IPCMP    Pointer to [SYSTEM]IPCC  or  [SYSTEM]INFO  message
                       block detailed below.  The pointer may be a 30-bit
                       address or  a  section  address  (if  an  IFIW  is
                       given),  relative to the section the message block
                       is in.  No indexing or indirection is allowed.

   2         .IPCMI    In-your-behalf word; the PID on  whose  behalf  to
                       perform  this  operation,  0 for your own job.  If
                       this word is non-zero,  IPCF  privileges  must  be
                       enabled  or  the  given  PID  must  belong to your
                       current JCH.  If .IPCMI is  on,  it  contains  the
                       address (30-bit or IFIW) of the PID.

   The message block at addr1 for [SYSTEM]IPCC is:

   Word      Symbol    Contents

   0         .IPCS0    Holds the message length identifier  in  the  left
                       half,  and  one of the [SYSTEM]IPCC function codes
                       in the right  half.   The  [SYSTEM]IPCC  functions
                       codes are documented in Chapter 7.

   1         .IPCS1    First argument.

   2         .IPCS2    Second argument.

   3         .IPCS3    Third argument.











                                   22-212
                             IPCFM. [CALLI 217]


   The message block for [SYSTEM]INFO is:

   Word      Symbol    Contents

   0         .IPCI0    The left half holds the message block length;  the
                       right  half  contains one of [SYSTEM]INFO function
                       codes documented in Chapter 7.

   1         .IPCI1    First argument.

   2         .IPCI2    Second argument.

   SKIP RETURN

   The system process returns data in a  packet  to  the  user's  message
   block.

   ERROR RETURN

   The ac will  contain  one  of  the  error  messages  documented  under
   IPCFR. UUO.

   RELATED CALLS

         o  .IPCFQ

         o  .IPCFR

         o  .IPCFS

























                                   22-213
                             IPCFQ. [CALLI 144]


   22.71  IPCFQ.  [CALLI 144]

   FUNCTION

   Returns information about a job's IPCF input queue.   The  information
   returned  is  the  packet header block for the next (if any) packet in
   the queue of packets sent by the inter-process communication facility.
   The IPCF calls are described in Chapter 7.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             IPCFQ.  ac,
               error return
             skip return
             . . .
   addr:     BLOCK   len

   In  this  calling  sequence,  the  program  supplies   the   following
   variables:

         o  len is the length of the block (4 to  6  words)  at  addr  to
            receive returned data.

         o  addr is the address of the block to receive the data.

   SKIP RETURN

   The ac is not changed.  The packet header block for the next packet in
   the queue is returned at addr.  The format of the information returned
   is described in Chapter 7.

   Word      Symbol    Contents

   0         .IPCFL    Flag word of the next packet in the queue.

   1         .IPCFS    Sender's PID.

   2         .IPCFR    Receiver's PID.

   3         .IPCFP    Length of next message and number of packets:

                       Bits      Meaning

                       0-17      Length of next message.
                       18-35     Number of packets in your input queue.

   4         .IPCFU    Sender's PPN.

   5         .IPCFC    Sender's capability word.  The format of this word
                       is documented with the IPCFR.  UUO.



                                   22-214
                             IPCFQ. [CALLI 144]


   ERROR RETURN

   If there is no packet in  the  input  queue,  IPCFQ. takes  the  error
   return  and  returns an error code in the ac.  The error codes for all
   IPCF calls are listed under the IPCFR. call.

   RELATED CALLS

         o  IPCFM.

         o  IPCFR.

         o  IPCFS.









































                                   22-215
                             IPCFR. [CALLI 142]


   22.72  IPCFR.  [CALLI 142]

   FUNCTION

   Retrieves a packet from the IPCF input queue for the calling  process.
   The  IPCF facility and the format of the argument blocks are described
   in Chapter 7.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             IPCFR.  ac,
               error return
             skip return
             . . .
   addr:     EXP     flags
             BLOCK   2
             XWD     len2,addr2
             . . .
   addr:     BLOCK len2

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the packet header block.

         o  addr is the address of the packet header block.

         o  flags is the flag word (.IPCFL) in the packet header block.

         o  len2 is the length of the packet to  be  retrieved.   If  the
            packet is going to be a page of data, this field must contain
            512 or an error code is returned in the  ac  and  the  IPCFR.
            monitor call takes the error return.

         o  addr2 is the address of the packet message block.

   The retrieving process should check the contents of the flag word.  If
   there  is  an  error  condition associated with the packet, it will be
   indicated in bits 24-29.  Error codes received in the ac  indicate  an
   error  with  the  monitor  call  (for  example,  if the packet was not
   received).

   If the IPCFR.  monitor call is issued but there are no packets in  the
   input  queue,  the  job  cannot  continue  executing until a packet is
   placed in the input queue.  To prevent the job from  blocking,  bit  0
   (IP.CFB) should be set in the flag word.  When IP.CFB is set and there
   are no packets in the input queue when the IPCFR.  call is issued, the
   call will take the error return and the monitor will return error code
   3 (IPCNT%) in the ac.

   When a process is retrieving a page of data, bit 19  (IP.CFV)  in  the
   flag  word  must be set and the length of the data message block (left


                                   22-216
                             IPCFR. [CALLI 142]


   half of .IPCFP) must contain 1000 or the IPCFR.   monitor  call  fails
   and the monitor returns error code 21 (IPCPR%) in the ac.

   If the retrieved packet is shorter than the number of  reserved  words
   (that  is, len2), the packet is retrieved and the extra words are left
   unchanged.  If, however, the number of  reserved  words  is  not  long
   enough  to  store the packet, the IPCFR.  monitor call takes the error
   return and the monitor returns error code 5 (IPCTL%) in  the  ac.   To
   prevent  this  error,  the receiver can set bit 4 (IP.CFT) in the flag
   word indicating that, if the packet  is  too  long  for  the  reserved
   space, the message should be truncated.

   SKIP RETURN

   On a skip return, the monitor returns  the  associated  variable  (see
   Chapter  7)  in the ac indicating that there is another packet waiting
   in the queue.  If there are no more packets in the queue, the  monitor
   clears  the ac.  The packet retrieved from the process' input queue is
   returned  to  the  address  specified  in  the  IPCFR.   monitor  call
   (beginning  with  addr).   The  packet  header  block  is filled in as
   follows:

   Word      Symbol    Contents

   0         .IPCFL    The left half remains the  same,  the  right  half
                       contains flags (see Chapter 7).

   1         .IPCFS    Sender's PID.

   2         .IPCFR    Receiver's PID.

   3         .IPCFP    Length and location of data:

                       Bits      Contents

                       0-17      Message length.
                       18-35     Address  of  message,   for   short-form
                                 messages  (default),  or  page number of
                                 long-form messages.  If the page  number
                                 refers  to  an existing page, error code
                                 IPCUP% is returned.

   4         .IPCFU    Sender's PPN.  If the  argument  block  length  is
                       less than 5, this word is not returned.

   5         .IPCFC    Sender's capability word:

                       Bits   Symbol    Meaning

                       0      IP.JAC    Sending program has JACCT
                                        privileges.
                       1      IP.JLG    Sender is logged in.


                                   22-217
                             IPCFR. [CALLI 142]


                       2      IP.SXO    Sender is execute-only.
                       3      IP.POK    Sender has POKE. privilege
                                        (JP.POK).
                       4      IP.IPC    Sender has IPCF privilege
                                        (JP.IPC).
                       5-17             Reserved.
                       18-26  IP.SCN    Sender's context number.
                       27-35  IP.SJN    Sender's job number.

                       If the argument block length is less than 6,  this
                       word is not returned.

   ERROR RETURN

   The packet is not retrieved and one of the following  error  codes  is
   returned in the ac:

   Code      Symbol    Error

   1         IPCAC%    Address check.
   2         IPCNL%    Packet header not long enough.
   3         IPCNP%    No packet in receiving queue.
   4         IPCIU%    Page is in use (locked in core).
   5         IPCTL%    Data too long for user's buffer.
   6         IPCDU%    Receiver's PID unknown.
   7         IPCDD%    Receiver disabled.
   10        IPCRS%    No room in sender's quota.
   11        IPCRR%    No room in receiver's quota.
   12        IPCRY%    No room in system storage.
   13        IPCUP%    Unknown page (send) or duplicate page (receive).
   14        IPCIS%    Invalid sender PID.
   15        IPCPI%    Not enough privileges.
   16        IPCUF%    Unknown function code.
   17        IPCBJ%    Illegal job number.
   20        IPCPF%    PID table full.
   21        IPCPR%    Page requested, normal text.
   22        IPCIE%    Paging I/O error.
   23        IPCBI%    Bad index for system PID table.
   24        IPCUI%    Undefined PID in system table.
   25        IPCRU%    Receiver PID unknown or does not match job.
   26        IPCRP%    Insufficient physical memory space available.
   27        IPCRV%    Insufficient virtual memory space available to
                       receive page.
   70        IPCFU%    [SYSTEM]INFO has unknown internal error.
   71        IPCCF%    [SYSTEM]IPCC request from [SYSTEM]INFO failed.
   72        IPCFF%    [SYSTEM]INFO failed to complete an ASSIGN.
   73        IPCQP%    PID quota exceeded.
   74        IPCBP%    Unknown PID.
   75        IPCDN%    Duplicate name.
   76        IPCNN%    No such name.
   77        IPCBN%    Name has illegal characters.



                                   22-218
                             IPCFR. [CALLI 142]


   EXAMPLES

   An example of the IPCFR.  monitor call is shown below.

             MOVE    T2,[XWD 6,PHB]    ;Length and address of packet
             IPCFR.  T2,               ; To be retrieved.
               JRST  ERR
             JRST NORM
   PHB:      EXP 0                     ;No flags
             EXP 0                     ;Sender's PID
             EXP 0                     ;Receiver's PID
             10,,PMB1                   ;Length and address of packet
                                       ;Message block to be retrieved
             EXP 0                     ;PPN of sender
             EXP 0                     ;Capabilities of sender
   PMB1:     EXP 0
             EXP 0
             EXP 0
             .
             .
             .
             EXP 0

   On a skip return from the IPCFR.  monitor call, the  packet  has  been
   retrieved from the input queue.

   Below is an example of what a  response  from  [SYSTEM]INFO  could  be
   after a request for a PID.

   PHB     20                ;The packet was sent by [SYSTEM]INFO
   PHB+1   2001              ;[SYSTEM]INFO's PID
   PHB+2   31                ;Job number of receiver
   PHB+3   4,,PMB1           ;Length and address of packet message block
   PHB+4   1,,2              ;PPN of sender
   PHB+5   260000,,1014      ;Capabilities of sender
   PMB1    32,,3             ;User code and function code
   PMB1+1  400004,,1001      ;The requested PID
   PMB1+2  ASCIZ/CORP/       ;The symbolic name
   PMB1+3  0

   The IPCFR. monitor call can take the skip return and return  an  error
   code in the flag word of the packet header block.  For example, word 0
   of the packet header block could contain the following:

        PHB/  0520

   This means that the length of the packet message  block  specified  in
   the  IPCFR.  monitor call was not long enough, so the monitor returned
   error code 5 in the flag word.  The 20 in the flag word indicates that
   the message in the receiver's input queue is from [SYSTEM]INFO.




                                   22-219
                             IPCFR. [CALLI 142]


   If a process sends  a  request  to  [SYSTEM]INFO  to  obtain  the  PID
   associated with the symbolic name "FRED," the following could result:

   Location  Contents

      AC     0                   ;indicating a skip return and no
                                 ;errors set in the AC; no more packets
                                 ;in queue.
     PHB     7620                ;the flag word
   PHB+1     2,,1003             ;the sender's PID
   PHB+2     164,,1011           ;the receiver's PID
   PHB+3     10,,PMB             ;length and addr of message block

     PMB     11,,1               ;user code and function code
   PMB+1     0                   ;no response
   PMB+2     ASCIZ/FRED/         ;symbolic name

   The first  word  of  the  packet,  PHB,  contains  7620.   This  value
   indicates the following:

         o  76 is the error code indicating that the symbolic name "FRED"
            is not associated with any currently assigned PID.

         o  2 indicates that the call to [SYSTEM]INFO  succeeded,  and  a
            normal  return was taken.  The number of packets still in the
            queue is stored in the ac.

         o  0 indicates that the packet is not  a  "returned  to  sender"
            packet.

   The call to [SYSTEM]INFO successed, and a  normal  return  was  taken.
   The number of packets still in the queue is stored in the ac.

   RELATED CALLS

         o  IPCFM.

         o  IPCFQ.

         o  IPCFS.














                                   22-220
                             IPCFS. [CALLI 143]


   22.73  IPCFS.  [CALLI 143]

   FUNCTION

   Sends an IPCF packet to the specified process.

   By  giving  the  receiver's  PID  as  the  PID  of   [SYSTEM]INFO   or
   [SYSTEM]IPCC, you can obtain information from the IPCF facility itself
   (see Chapter 7).

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             IPCFS.  ac,
               error return
             skip return
             . . .
   addr:     flags
             sender's PID
             receiver's PID
             XWD len,addr2
             . . .
   addr2:    message-word-0
             .
             .
             .
             message-word-(len-1)

   In the calling sequence, the program suppies the following variables:

         o  len is the length of the packet header block.  The length  of
            this  block must be equal to or greater than 4 or the monitor
            returns error code 2 (IPCNL%) in the ac.

         o  addr is the address of the packet header block.

         o  flags is the flag word in the packet header block.

         o  sender's PID is Word 1 of the packet header block.

         o  receiver's PID is Word 2 in the packet header block.

         o  len2 is the length of the packet message block.  When sending
            a  short-form message, this value should not exceed 12 octal.
            The limit may be GETTABed in %IPCML.

         o  addr2 is the address of the packet message block.

         o  message-word-0 through message-word-n are the words making up
            the  packet  message  block.   Refer  to  Chapter  7 for more
            information.



                                   22-221
                             IPCFS. [CALLI 143]


   SKIP RETURN

   On a skip return, the ac is unchanged and the packet described by  the
   packet header block at addr has been placed in the intended receiver's
   queue.

   Word      Symbol    Contents

   0         .IPCFL    Flags are the same as those described  in  Chapter
                       7.

   1         .IPCFS    Sender's PID.

   2         .IPCFR    Receiver's  PID.   If  you   use   the   PID   for
                       [SYSTEM]INFO or for [SYSTEM]IPCC, you can retrieve
                       information from the  IPCF  facility  itself  (see
                       Chapter 7).

   3         .IPCFP    Length and location of data:

                       Bits      Contents

                       0-17      Message length.
                       18-35     Address of message.

   ERROR RETURN

   On an error return, an error code is returned in the ac and the packet
   is not sent.  The error codes are listed under the IPCFR. call.

   EXAMPLES

   This code fragment sends a packet to [SYSTEM]INFO, asking that  a  PID
   be assigned with the symbolic name LJC.

           MOVE    T1,[XWD 4,PHB]    ;Length and address of packet
           IPCFS.  T1,               ; header block
             JRST ERROR
           JRST NORMAL
   PHB:    0                         ;This is a packet header
           0                         ;Sender's PID
           0                         ;Receiver's PID (your [SYSTEM]INFO)
           XWD 3,PMB                 ;Length and addr of message block
   PMB:    XWD 234,.IPCII            ;Ack code and function (assigns PID)
           0                         ;No duplicate PID
           ASCIZ/LJC/                ;Symbolic name








                                   22-222
                             IPCFS. [CALLI 143]


   RELATED CALLS

         o  IPCFM.

         o  IPCFQ.

         o  IPCFR.















































                                   22-223
                             JBSET. [CALLI 113]


   22.74  JBSET.  [CALLI 113]

   FUNCTION

   Sets system or job parameters for another job.  Your job must have the
   JACCT  bit  set,  or  must  be logged in under [1,2].  You can use the
   SETUUO monitor call to set parameters for your current job.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             JBSET.  ac,
               error return
             skip return
             . . .
   addr:     XWD     0,jobno
             XWD     fcn-code,argument

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument list.

         o  addr is the address of the argument list.

         o  jobno is the number of the job for which the SETUUO  function
            is to be performed.

         o  fcn-code is one of the function codes described under SETUUO.

         o  argument is an argument for the given function code.

   Refer to the SETUUO description for a list of all function  codes  and
   their meanings.

   SKIP RETURN

   The function has been performed and the ac is left unchanged.

   ERROR RETURN

   The error return is taken if the calling job is  not  privileged,  the
   specified job number is illegal, or the SETUUO function failed.












                                   22-224
                             JOBPEK [CALLI 103]


   22.75  JOBPEK [CALLI 103]

   FUNCTION

   Reads from or writes into another job's memory space.

   To read the contents  of  another  job's  memory  requires  that  your
   program  have SPY ALL privileged.  To write into another job's memory,
   you need POKE privileges.

   Use the Format 1 calling sequence  with  18-bit  addresses.   Use  the
   Format  2 calling sequence if the core being read or written is either
   in a non-zero section or in a context other than the current one.

   CALLING SEQUENCES

   Format 1:

             MOVEI   ac,addr
             JOBPEK  ac,
               error return
             skip return
             . . .
   addr:     EXP     <flags>+jobnoB17+countB35
             XWD     readaddr,writeaddr

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the argument list.

         o  flags are one or more of the optional flags listed below.

         o  jobno (JK.JOB) is the number of the logged-in job whose  core
            is to be read or written, stored in Bits 9-17.

         o  count (JK.WCT) is the number of words to be read  or  written
            (the maximum can be obtained using GETTAB to read item %CNJPK
            from table .GTCNF), stored in Bits 18-35.

         o  readaddr is the location of the first word to be read.

         o  writeaddr is the location of the first word to be written.












                                   22-225
                             JOBPEK [CALLI 103]


   Format 2:

             MOVE    ac,[length,,addr]
             JOBPEK  ac,
               error return
             skip return
             . . .
   addr:     EXP     <flags>+countB17+JCHB35
             EXP     0
             XWD     readaddr
             XWD     writeaddr

   In the calling sequence, the program supplies the following variables:

         o  addr is the address of the argument list.

         o  flags are one or more of the flags listed below.

         o  count (JK.EWC) is the number of words to be read  or  written
            (refer  to  GETTAB table .GTCNF, item %CNJPK), stored in Bits
            8-17.

         o  JCH (JK.JCH) is the job/context handle of the job whose  core
            is to be read or written, stored in Bits 18-35.

         o  readaddr is the 30-bit address giving  the  location  of  the
            first word to be read.

         o  writeaddr is the 30-bit address giving the  location  of  the
            first word to be written.

   The flags and their meanings are:

   Bit       Symbol    Meaning

   0         JK.WRT    Write the other job's core; if not set,  read  the
                       other  job's  core.   When  this bit is 0, the UUO
                       requires SPY privileges only.

   1         JK.UPM    Read the other job's UPMP (user page map  page  or
                       user page table).  JK.WRT must not be set.

   2         JK.EVA    Source address is between .MCFV and .UUPMP;  treat
                       it  as  if  it  were  an executive virtual address
                       mapped through the  specified  job's  UPMP.   Both
                       JK.WRT and JK.UPM must be off.

   3         JK.AIO    Do not block if data is inaccessible (due  to  the
                       state  of cache on SMP systems); set this bit only
                       if you set either JK.UPM or JK.EVA.




                                   22-226
                             JOBPEK [CALLI 103]


   Notice that if the other job's core is to be read (JK.WRT is cleared),
   then  readaddr  is  a  location  in  the  other job and writeaddr is a
   location in the current program.  If the other job's  core  is  to  be
   written  (JK.WRT  is  set), then readaddr is a location in the current
   program and writeaddr is a location in the other job.

   SKIP RETURN

   The specified words are transferred between  the  other  job  and  the
   current job.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Meaning

   1         JKNPV%    Job not privileged.
   2         JKIJN%    Illegal job number.
   3         JKSWP%    Job swapped out or in transit.
   4         JKIAD%    Illegal address (source or destination).
   5         JKDNA%    Data not addressable (if JK.AIO is set).
   6         JKPNC%    Page not in core.
   7         JKIOE%    I/O error occurred.
   10        JKABZ%    Target address is in an "allocated but zero" page.

   EXAMPLES

             MOVEI   T1,ADDR
             JOBPEK  T1,
               JRST  ERROR
             JRST    CONTIN
             . . .
   ADDR:     EXP     14B17+1000B35
             XWD     10000,12000

   This example reads 1000 (octal) words from the core of job 14 into the
   current  job's  core.   Reading  begins at location 10000 in the other
   job; writing begins at location 12000 in the current job.















                                   22-227
                             JOBSTR [CALLI 47]


   22.76  JOBSTR [CALLI 47]

   FUNCTION

   Returns names of file structures in your job's  search  list.   For  a
   discussion of file structures in a search list, see Chapter 11.

   CALLING SEQUENCE

             MOVE    ac,[XWD len,addr]
             JOBSTR  ac,
               error return
             skip return
             . . .
   addr:     SIXBIT/str/              ;.DFJNM
             EXP     0                ;reserved
             EXP     0                ;.DFJST

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument list (.DFJBL).

         o  addr is the address of the argument list.  You can include  a
            structure  name  (str) at addr to obtain the name of the next
            structure in your job search list, or -1 to obtain the  first
            structure  in  your  active  search  list, or 0 to obtain the
            first structure in your  job's  passive  search  list  (after
            FENCE in search list returned by SETSRC program).

         o  addr+1 (.DFJDR) is reserved.

            At addr+2 (.DFJST), the  monitor  returns  the  write-protect
            flag for the structure.  The flags are:

            Bits   Symbol   Meaning

            0      DF.SWL   Software write-protect.
            1      DF.SNC   Do not create files on this structure; create
                            only  if  specified  as  file  structure or a
                            physical device name.

   SKIP RETURN

   If you give 0 at addr, the monitor returns the first structure in  the
   search list after the FENCE.

   If you give -1, the monitor returns the first structure in the list.







                                   22-228
                             JOBSTR [CALLI 47]


   If you give a SIXBIT structure name (or leave the one the monitor last
   entered),  the  monitor  returns the next structure name in the search
   list.  When there are no more structures  in  the  list,  the  monitor
   returns  -1  at  addr.   If  the  next  item in the list is FENCE, the
   monitor returns 0.

   Therefore you can begin with the first name in the list by using -1 at
   addr.   When  the  monitor returns the first name in the list, you can
   leave the name in addr to call for the second name, and so forth.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   3         DFGIF%    Illegal file structure name.
   12        DFGLN%    Illegal argument length.

   EXAMPLES

   The following example reads all structures in the job's search list:

             MOVEI   T1,0                ;Initialize counter
   LOOP:     MOVE    T2,[.DFJBL,,ADDR]   ;Pointer to argument block
             JOBSTR  T2,                 ;Get next structure (on 0 or -1)
               JRST  ERROR
             MOVE    T2,ADDR+.DFJNM      ;Get structure
             MOVEM   T2,STRTAB(T1)       ;Save in table
             AOJE    T2,CONTIN           ;All done if -1
             AOJA    T1,LOOP             ;Bump table pointer and loop
   ADDR:     EXP     -1                  ;Start with the first one
             EXP     0
             EXP     0
   STRTAB:   BLOCK   30                  ;Where to store search list
   CONTIN:     .
               .
               .

   RELATED CALLS

         o  DVPHY.

         o  GOBSTR

         o  SYSPHY

         o  SYSTR






                                   22-229
                             JOBSTS [CALLI 61]


   22.77  JOBSTS [CALLI 61]

   FUNCTION

   Provides information (including checking  statistics)  about  terminal
   devices,   pseudo-terminals,   and  software  states  associated  with
   terminals.  For more information about terminals and pseudo-terminals,
   refer to Chapter 15.

   CALLING SEQUENCE

           / MOVNI   ac,jobno  \
          |  MOVEI   ac,channo  |
           \ MOVEI   ac,udx    /
             JOBSTS ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  udx is the Universal Device Index of the pseudo-terminal  for
            which information is desired.

         o  channo is the number of an I/O channel on  which  a  terminal
            device has been opened.

         o  jobno is the number of a logged-in job  associated  with  the
            terminal.  To obtain status of a pseudo-terminal, provide the
            job number of the controlled job.  Note that the negative  of
            the   job   number   is  used  because  positive  values  are
            interpreted as channels or UDXs.

   SKIP RETURN

   The monitor returns a status word for the job,  with  the  appropriate
   flags set from the following list.

   Bits      Symbol    Meaning

   0         JB.UJA    The given job number is assigned.

   1         JB.ULI    The job is logged in.

   2         JB.UML    Terminal is at monitor level.

   3         JB.UOA    Terminal output is available.








                                   22-230
                             JOBSTS [CALLI 61]


   4         JB.UDI    The terminal is at user level and is in the  input
                       wait  state,  or  the terminal is at monitor level
                       and can accept a command.   There  is  no  command
                       waiting to be decoded, the job is not running, and
                       the  job  is  not  stopped  waiting  for  operator
                       intervention.

   5         JB.UJC    JACCT is set for the job.  Note  that  this  means
                       that two CTRL/Cs will not stop the job.

   6         JB.URN    The job is running.  This bit is zero if  the  job
                       is in a wait state.

   7         JB.UFC    The terminal device is  in  "full  character  set"
                       mode.   This  characteristic  can be set using the
                       TRMOP.  UUO.

   8         JB.UBK    The  terminal  device  is   in   "break   on   all
                       characters"  mode.  This characteristic can be set
                       using the TRMOP., OPEN, or FILOP.  UUOs.

   9-10                Reserved for use by DIGITAL.

   11        JB.UNE    The terminal device is in "no  echo"  mode.   This
                       characteristic  can be set using the TRMOP., OPEN,
                       or FILOP.  UUOs.

   12        JB.UTO    The terminal is  in  terminal  output  state.   In
                       other  words,  the  job  is  blocked  waiting  for
                       terminal output.

   13        JB.UCC    The terminal characteristics  have  changed  since
                       last JOBSTS.

   14        JB.UNT    The terminal connected to the pseudo-terminal  has
                       used SET HOST to connect to another system.

   15        JB.UHI    The terminal is HIBERing for input.  If a  program
                       such  as  OPR  or  MIC is running under batch, and
                       JB.UHI is set, the job will awaken on input to the
                       terminal.   (Refer  to the HB.DIN bit in the HIBER
                       monitor call.)

   16-26               Reserved for use by DIGITAL.

   27-35     JB.UJN    Bit  mask  to  contain  job  number  (0  if   none
                       assigned).

   Since JB.UOA will be set if any output is pending, but JB.UTO will  be
   set  if  the output buffer for the terminal is full, you can make each
   INPUT UUO transfer more data, by testing  for  JB.UTO  before  JB.UOA,
   then doing an INPUT for a PTY.


                                   22-231
                             JOBSTS [CALLI 61]


   ERROR RETURN

   One of the following occurred:

         o  The specified job number or channel number is invalid.

         o  There was no terminal on the specified channel.















































                                   22-232
                              KDP. [CALLI 200]


   22.78  KDP.  [CALLI 200]

   FUNCTION

   Loads, dumps, and starts the KMC-11 (KS systems only).

   CALLING SEQUENCE:

             MOVE    ac,[XWD len,addr]
             KDP.    ac,
               error return
             skip return
              ...
   addr:     EXP     fcn-code
             argument 1
             argument 2
             argument 3

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument block.

         o  addr is location of the argument block.  At addr,  store  the
            function  code  (fcn-code).   The  remainder  of the argument
            block depends on the function to be performed.

   The function codes are:

   Code      Symbol    Meaning

   1         .KDPKN    Returns in argument 1 the number of KMC-11s on the
                       system.

   2         .KDPDN    Returns in argument 2 the count of DUP-11s on  the
                       KMC that you specify in argument 1.

   3         .KDPSS    Returns in argument 2 the status of KMC  specified
                       in argument 1.

   4         .KDPHA    Halts the KMC-11 specified in argument 1.

   5         .KDPMC    Master-clears the KMC specified in argument 1.

   6         .KDPST    Starts the KMC specified in argument 1.

   7         .KDPRE    Reads the CRAM location from the KMC specified  in
                       argument  1  and  pointed  to  by  the  address in
                       argument  2.   The  CRAM  location  is  stored  in
                       argument 3.





                                   22-233
                              KDP. [CALLI 200]


   10        .KDPWR    Writes in CRAM location from the KMC specified  in
                       argument  1,  at the address specified in argument
                       2, from the value stored in argument 3.

   101       .KDLRS    Reads line status of KMC specified in argument  1,
                       on  line of DUP specified in argument 2.  The line
                       status is returned in the address  pointed  to  by
                       argument  3.   Argument  3  must  be  specified as
                       [len,,addr], where len is the length and  addr  is
                       the  address  of  the  block where status is to be
                       stored.

   102       .KDLHA    Stops DDCMP on a line  specified  by  the  KMC  in
                       argument 1 and the DUP in argument 2.

   103       .KDLST    Starts DDCMP on a line specified  by  the  KMC  in
                       argument 1 and the DUP in argument 2.

   104       .KDLSU    Sets the line's user.  Specify the KMC in argument
                       1,  the DUP in argument 2, and the SIXBIT/user/ in
                       argument 3.   Refer  to  the  DTE. call  for  more
                       information about line users.

   105       .KDLRU    Returns the line's user in argument 3.   You  must
                       specify  the  KMC  in  argument  1  and the DUP in
                       argument 2.

   ERROR RETURN

   One of the following error codes may be returned:

   Code      Symbol    Meaning

   1         KDILF%    Illegal function code.
   2         KDILK%    Illegal KMC-11 number.
   3         KDALS%    Argument list too short.
   4         KDIWR%    Function is illegal when KMC-11 is running.
   5         KDICA%    Illegal CRAM address (.KDPRE or .KDPWR).
   6         KDILL%    Illegal line (DUP-11) number.
   7         KDKNR%    Function is illegal when KMC-11 is not running.
   10        KDLNS%    DDCMP was not started on the line.
   11        KDLAS%    DDCMP was already started on the line.
   13        KDUNP%    User not privileged to perform this function.











                                   22-234
                             LATOP. [CALLI 221]


   22.79  LATOP.  [CALLI 221]

   FUNCTION

   Performs Local Area Terminal (LAT) functions.  This  function  is  not
   intended for customer use.

   CALLING SEQUENCE

             MOVEI   ac,addr
             LATOP.  ac,
               error return
             skip return
   addr:     EXP     length
             function-code
             argument list
             .  .  .

   In  the  calling  sequence,  the  program   supplies   the   following
   information:

         o  addr is the address of the argument list.

         o  length is the total length of  the  argument  list  including
            this word

         o  function-code is one of the following codes or symbols:

   Function Code  Symbol    Meaning

   0              .LASET    Sets a LAT parameter.
   1              .LACLR    Clears a LAT parameter.
   2              .LASCH    Shows LAT characteristics.
   3              .LASTC    Shows terminal connects.
   4              .LASAS    Shows adjacent servers.
   5              .LASCO    Shows LAT counters.
   6              .LAZCO    Clears LAT counters.
   7              .LARHC    Requests host-initiated connect.
   10             .LATHC    Terminates a host-initiated connect.
   11             .LASHC    Shows information about host-initiated
                            connects.

   The argument list is different for each function code.  Therefore, the
   arguments  are  desribed  for  each  function  code  in  the following
   sections.



   22.79.1  FUNCTION 0 (.LASET)

   Sets LAT parameters for the local node.  The parameters you set  using
   this function are dynamic parameters stored only in the host software.


                                   22-235
                             LATOP. [CALLI 221]


   Your  program  must  have  JACCT  or  [1,2]  privileges  to  set   LAT
   parameters.

   The parameters you can set with .LASET are:

   Code      Symbol    Meaning

   1         .LPMAC    Maximum number of active circuits.
   2         .LPMCO    Maximum number of simultaneous connections.
   3         .LPNUM    Host number.
   4         .LPLAS    LAT access state.
   5         .LPRLI    Circuit retransmit limit.
   6         .LPTIM    Retransmit initial value.
   7         .LPMTI    Multicast timer initial value.
   10        .LPCOD    Group access codes.
   11        .LPNNM    Host node name.
   12        .LPNID    Host node identification string.
   13        .LPSRV    Service rating and description.

   To set the parameters, use one of  the  following  argument  lists  to
   .LASET:

   Word      Symbol    Contents

   0         .LAACT    Argument list length.
   1         .LAFCN    EXP     .LASET.
   2         .LAPRM    Parameter code identifying  the  parameter  to  be
                       set.
   3         .LAVAL    Contents depend on the parameter code:

                       For Codes        .LAVAL Contains

                       1 through 7      New parameter value
                       10               Address of a bit mask
                       11 through 13    ASCIZ string pointer

   4         .LAQUA    Qualifier (required for Parameter Code 13 only).

   5         .LADSC    ASCIZ  string  pointer  to   service   description
                       string.  (Required only for Parameter Code 13 when
                       LA%DSC is set in .LAQUA.)

   Depending on the parameter to  be  set,  the  argument  list  must  be
   formatted appropriately.

         o  Parameter Codes 1 through 7 accept an argument directly  from
            .LAVAL.   On  a  successful return, the parameter you specify
            will be set to the value you include in .LAVAL.

         o  Parameter Code 10 (Group Codes) requires the address of a bit
            mask  in  .LAVAL.   The Group Codes Bit Mask is 8 words long,
            representing the group codes of terminals that can access the


                                   22-236
                             LATOP. [CALLI 221]


            host.   The  bit  mask  is  numbered decimally from 0 to 255,
            signified by Bits 0 through 31 of each of eight words.   Each
            bit  you  set  represents  a  group number that is allowed to
            access the system.

            Each word in the Group Code Bit Mask is formatted as:

             0------------------------------------31   32-----35
            +----------------------------------------------------+
            | Each bit represents a group number     |  Ignored  |
            +----------------------------------------------------+

            The group numbers that are represented by each word, starting
            at the address stored in .LAVAL, are:  are:

            Word       Group Numbers

            addr:      0 through 31
            addr+1:    32 through 63
            addr+2:    64 through 95
            addr+3:    96 through 127
            addr+4:    128 through 159
            addr+5:    160 through 191
            addr+6:    192 through 223
            addr+7:    224 through 255

            To specify a group code number, set the corresponding bit  in
            the bit mask.  For example, to set Group 64, set Bit 0 in the
            addr+2 of the bit mask.

         o  Parameter Codes 11 and 12 (Host Node Name and Host Id String)
            require  an  ASCIZ string pointer in .LAVAL.  The pointer may
            be specified as a byte pointer,  or  in  the  form  -1,,addr,
            where addr is the address of the ASCIZ string.

         o  For Parameter Code 11, the .LAVAL contains a  pointer  to  an
            ASCIZ string specifying the name of the host node.

         o  For Parameter Code 12, .LAVAL points to a  string  specifying
            the Host Identification String.

         o  Parameter Code 13 (Service Rating and  Description)  requires
            that flags be set in .LAVAL, and, depending on the setting of
            the flags, an optional  pointer  in  the  following  argument
            word, .LADSC.

            The flags you can set in .LAVAL for Parameter Code 13 are:

            1.  LA%RAT sets the rating as specified in the right half  of
                this  word.   If  this  bit  is  not set, and no previous
                rating has been set, then  the  rating  is  automatically
                reset to the default value.


                                   22-237
                             LATOP. [CALLI 221]


            2.  LA%DSC  sets  the  service  description.    The   service
                description is stored in an ASCIZ string.

            If Bit 1 (LA%DSC) is set in .LAVAL,  the  following  argument
            word  (.LADSC)  may  contain  an  ASCIZ  pointer to a service
            description string.  If LA%DSC is set but .LADSC contains  0,
            the service description string is cleared.



   22.79.2  FUNCTION 1 (.LACLR)

   Clears  specified  LAT  node  parameters.   The  parameter  codes  and
   information  required by each, are described for .LASET, Function Code
   0.

   This function requires JACCT or [1,2] privileges.

   The argument list for .LACLR consists of the following words:

   Word      Symbol    Contents

   0         .LAACT    EXP     len
   1         .LAFCN    EXP     .LACLR
   2         .LAPRM    Parameter code
   3         .LAVAL    Required only for Parameter Codes 10 and 13.

   For Parameter Code 10, this word contains the  address  of  the  Group
   Code Bit Mask.

   For Parameter Code 13, this word contains the  ASCIZ  pointer  to  the
   service name to clear.

   This word is ignored for all other parameters.



   22.79.3  FUNCTION 2 (.LASCH)

   Shows the LAT characteristics.  The  monitor  returns  a  Show  Buffer
   containing the values of both permanent and dynamic parameters.

   The argument block for this function is:

   Word      Symbol    Contents

   0         .LAACT    EXP     len
   1         .LAFCN    EXP     .LASCH
   2         .LABCT    EXP     buffer-length
   3         .LABFA    EXP     buffer-addr




                                   22-238
                             LATOP. [CALLI 221]


   Where len is the length of the argument block.  Specify the number  of
   words  reserved for the Show Buffer in .LABCT, and the location of the
   Show Buffer in .LABFA.

   The Show Buffer is returned at the location  you  specified,  and  the
   contents  of  .LABCT are adjusted by the monitor to reflect the actual
   number of words used.

   The Show Buffer is formatted as shown below.


   Table 22-3:  LATOP.  Show Buffer Format


   0------------------------17  18----------------------------35
   +------------------------------------------------------------+
   | Maximum alloc. circuits   |  Number of alloc. circuits     |
   |------------------------------------------------------------|
   | Maximum active circuits   |  Number of active circuits     |
   |------------------------------------------------------------|
   | Mamimum connects          |  Number of connects            |
   |------------------------------------------------------------|
   | Host-number               |  LAT terminal access status    |
   |------------------------------------------------------------|
   | Host retransmit limit     |  Host-circuit timer            |
   |------------------------------------------------------------|
   | Host-multicast timer      |  Reserved                      |
   |------------------------------------------------------------|
   | High-protocol version     |  Low-protocol version          |
   |------------------------------------------------------------|
   | Protocol ECO              |  Current-protocol version      |
   |------------------------------------------------------------|
   | Maximum slot size         |  Maximum slots                 |
   |------------------------------------------------------------|
   | Frame size                |  Maximum services              |
   |------------------------------------------------------------|
   |              Host group codes (8 words)                    |
   |------------------------------------------------------------|
   | Host-name count           |  Host-id count                 |
   |------------------------------------------------------------|
   |              Host name (2 words)                           |
   |------------------------------------------------------------|
   |              Host-id (13 words)                            |
   |------------------------------------------------------------|
   | Service Blocks (19 words per service, described below)     |
   +------------------------------------------------------------+








                                   22-239
                             LATOP. [CALLI 221]


   Each Service Block is formatted as shown below:


   Table 22-4:  LATOP. Service Block


    0------------------------17  18-----------------------------35
   +--------------------------------------------------------------+
   |                Host service name rating                      |
   |--------------------------------------------------------------|
   | Service-name count        | Service-description count        |
   |--------------------------------------------------------------| 
   |                Service name (4 words)                        |
   |--------------------------------------------------------------|
   |             Service description (13 words)                   |
   +--------------------------------------------------------------+



   22.79.4  FUNCTION 3 (.LASTC)

   Shows information about current terminal connections.   This  function
   returns  the Connect Block for each active LAT connection at the local
   node.

   The argument list is:

   Word      Symbol    Contents

   0         .LAACT    Length of the argument block
   1         .LAFCN    Function code (.LASTC)
   2         .LABCT    Length of the buffer  reserved  for  the  returned
                       block.    In   this  word,  you  can  include  the
                       following information:

                       Bits   Symbol    Contents

                       0      LA.ECB    If this bit is set, this function
                                        returns an extended connect block
                                        for each LAT connect.  If the bit
                                        is clear, the short connect block
                                        is returned.   (Refer  to  Tables
                                        22-6 and 22-5, respectively.)

                       1-17             Reserved for use by DIGITAL.

                       18-35  LA.BCT    Number of words reserved for  the
                                        returned  connect  block.   On  a
                                        skip  return  from  the   monitor
                                        call,  this  field will be filled
                                        in with actual  number  of  words
                                        used.


                                   22-240
                             LATOP. [CALLI 221]


   3         .LABFN    Address of the reserved buffer space.

   The monitor returns the  Connect  Block  for  each  active  connection
   starting at the address you specify in .LABFN.  The contents of .LABCT
   are adjusted to reflect the actual number of words returned.

   Each connect block returned starting  at  the  location  specified  in
   .LABFN  will  take  the  form  of  a Short Connect Block, unless Bit 0
   (LA.BCT) was set in the first word of the argument list.   Table  22-6
   describes  the  Extended  Connect  Block.   In this case, the extended
   connect block format is returned  for  each  active  connection.   The
   Short Connect Block is described in Table 22-5.


   Table 22-5:  LATOP. Short Connect Block


    0--------------------------17  18--------------------------35
   +--------------------------------------------------------------+
   |                    Terminal Number                           |
   |--------------------------------------------------------------|
   | Server name count            |   Indeterminate               |
   |--------------------------------------------------------------|
   |                   Server Name (4 words)                      |
   +--------------------------------------------------------------+


   Table 22-6:  LATOP. Extended Connect Block


    0--------------------------17  18--------------------------35
   +--------------------------------------------------------------+
   |                    Terminal number                           |
   |--------------------------------------------------------------|
   | Server name count            |   Port type                   |
   |--------------------------------------------------------------|
   |                   Server name (4 words)                      |
   |--------------------------------------------------------------|
   | Port name count              |   Server name count           |
   |--------------------------------------------------------------|
   |                   Port name  (4 words)                       |
   |--------------------------------------------------------------|
   |                   Service name (4 words)                     |
   +--------------------------------------------------------------+

   The Port Type returned in the right half of addr+1 may be one  of  the
   following:

   Code      Symbol    Port Type

   1         .LATTY    Standard LAT terminal connection
   2         .LADLP    Dial-up LAT terminal connection


                                   22-241
                             LATOP. [CALLI 221]


   3         .LAAPP    LAT application terminal



   22.79.5  FUNCTION 4 (.LASAS)

   Shows adjacent servers.  This function returns information  about  LAT
   servers  that  are able to access the local node.  The function can be
   used to obtain information about all the servers, or only  information
   about a specific server.

   The argument block for this function is:

   Word      Symbol    Contents

   0         .LAACT    EXP     len
   1         .LAFCN    EXP     .LASAS
   2         .LABCT    EXP     buffer-length
   3         .LABFA    Buffer-addr
   4         .LAQUA    Buffer-pointer (optional)

   Where len is the length of the argument list.

   The buffer-length contains the number of words reserved for  the  Show
   Adjacent  Servers  Block.  Buffer-addr is the location where the block
   is returned.

   The Buffer-pointer (.LAQUA) is an optional word that  may  contain  an
   ASCIZ  string  pointer  to a location containing the server name.  You
   specify .LAQUA to receive information about  a  specific  LAT  server.
   This returns a Full-format Server Block.

   To return a summary of all servers, place  a  zero  in  .LAQUA.   This
   returns the Short-format Server Block at the location in .LABFA.


   Table 22-7:  LATOP. Show Adjacent Servers Full-Format Block


    0----------------------------17  18---------------------------35
   +----------------------------------------------------------------+
   |               Server Ethernet Address (2 words)                |
   |----------------------------------------------------------------|
   |       Frame size              | Server version                 |
   |----------------------------------------------------------------|
   |  Maximum slots                | Indeterminate                  |
   |----------------------------------------------------------------|
   |  Circuit timer                | Keep-alive timer               |
   |----------------------------------------------------------------|
   |  Product type                 | State                          |
   |----------------------------------------------------------------|
   |  Server-number                | Server-name count              |


                                   22-242
                             LATOP. [CALLI 221]


   |----------------------------------------------------------------|
   |  Server-location count        | Unused                         |
   |----------------------------------------------------------------|
   |               Server name (4 words)                            |
   |----------------------------------------------------------------|
   |               Server location (4 words)                        |
   +----------------------------------------------------------------+


   Table 22-8:  LATOP. Show Adjacent Servers Short-Format Block


    0-----------------------17  18--------------------------35
   +----------------------------------------------------------+
   | Server number            | Server-name count             |
   |----------------------------------------------------------|
   |                 Server name (4 words)                    |
   |----------------------------------------------------------|
   |               Ethernet-address (2 words)                 |
   +----------------------------------------------------------+



   22.79.6  FUNCTION 5 (.LASCO)

   Shows counters.  This  function  returns  information  about  the  LAT
   counters in the Counter Block.  The argument list is:

   Word      Symbol    Contents

   0         .LAACT    EXP     len
   1         .LAFCN    EXP     .LASCO
   2         .LABCT    EXP     buffer-length
   3         .LABFA    Buffer-addr
   4         .LAQUA    Buffer-pointer (optional)

   Where len is the length of the argument block.

   The number of words reserved for the Counters Block  is  specified  in
   .LABCT,  and  the  location  where the buffer should be returned is in
   .LABFA.

   You can obtain counters information about a  specific  LAT  server  by
   including  an  optional  ASCIZ  string pointer in .LAQUA.  The pointer
   must point to an ASCIZ string containing the server name.   To  obtain
   the counter totals for all servers, leave this word zero.

   The monitor returns a Counter Block at the  address  Buffer-addr,  and
   adjusts  the  value  in  .LABCT  to reflect the actual number of words
   returned.  The format of the Counter Block is show below.




                                   22-243
                             LATOP. [CALLI 221]


   Table 22-9:  LATOP. Counter Block Format


    0----------------------------17  18--------------------------35
   +---------------------------------------------------------------+
   |                      Messages Received                        |
   |---------------------------------------------------------------|
   |                      Messages Sent                            |
   |---------------------------------------------------------------|
   |                      Messages Retransmitted                   |
   |---------------------------------------------------------------|
   |                      Receive Sequence Errors                  |
   |---------------------------------------------------------------|
   |                      Illegal Messages Received                |
   |---------------------------------------------------------------|
   |                      Resource Failures                        |
   +---------------------------------------------------------------+



   22.79.7  FUNCTION 6 (.LAZCO)

   Zeroes  counters.   This  function,  which  requires  JACCT  or  [1,2]
   privileges,  can  be  used  to clear the counters reported in the Show
   Counters Block, returned by Function Code 5 (.LASCO).

   The argument list is:

   Word      Symbol    Contents

   0         .LAACT    EXP     length
   1         .LAFCN    EXP     .LAZCO
   2         .LABCT    EXP     buffer-length
   3         .LABFA    Buffer-address
   4         .LAQUA    Buffer-pointer

   Where length is the length of the argument block.

   Specify the number of words containing the  Show  Counters  Block  for
   buffer-length  and  the location of the block for buffer-address.  You
   can use the argument block returned  by  the  monitor  from  the  Show
   Counters  function  (.LASCO)  to  set  up  the  argument list for this
   function.  Use the returned  Counters  Block  to  clear  the  counters
   before performing this function.

   As with .LASCO, this function allows an optional ASCIZ string  pointer
   in  the  argument  list  in  the  word  .LAQUA.  This string point, if
   included, points to a word containing the server name.   The  counters
   specific  to the server are returned when this pointer is specified in
   the Show Counters function.  By including this word  in  the  argument
   block  for  the  Zero  Counters function, you can clear counters for a
   specific server only.


                                   22-244
                             LATOP. [CALLI 221]


   22.79.8  FUNCTION 7 (.LARHC)

   Request host-initiated connect.  This function requires JACCT or [1,2]
   privileges.  The argument list is:

   Word      Symbol    Contents

   0         .LAACT    EXP len
   1         .LAFCN    EXP .LARHC
   2         .LAPRM    Parameter word.  The parameter word  is  formatted
                       as follows:

                       Bits   Symbol    Meaning

                       0      LA.WAI    Blocking request.  When this  bit
                                        is  set,  the  request will block
                                        until the  connection  is  either
                                        made  or rejected.  When this bit
                                        is  clear,  the  status  must  be
                                        checked    repeatedly,   or   the
                                        program may use  the  PSI  System
                                        (Software  Interrupt  System)  to
                                        detect a completed connection.
                       1      LA.QUE    Queued request.  The request  for
                                        the  application terminal will be
                                        queued at the LAT server.
                       2-17             Reserved for DIGITAL.
                       18-35  LA.CID    Contains the  Connect-Id  on  the
                                        return.

   3         .LAVAL    Contains  the  terminal  number  and  UDX   on   a
                       successful return.  If the return is unsuccessful,
                       this word contains a  rejection  code.   Rejection
                       codes are listed in Table 22-10.
   4         .LASVR    Server name.
   5         .LASVC    Service name.
   6         .LAPRT    Port name.

   Each of the last three words of the argument list specify:

        1.  the server name to connect to

        2.  the service name requested

        3.  the port name to be connected to

   Each of these words may contain a byte pointer  to  an  ASCIZ  string,
   where  the  server name, service name, or port name are stored.  These
   arguments are optional.





                                   22-245
                             LATOP. [CALLI 221]


   You need not include all three arguments.  If you include  the  server
   name, service name, and port name in the argument list, the connection
   request will fail if the specified port does not support the specified
   service.  To initiate a connection successfully, you should supply the
   arguments required by the program, as described here:

         o  To request a connection to any port on the  specified  server
            offering  the  specified  service,  include  the  server name
            (.LASVR) and service name (.LASVC).

         o  To  request  a  connection  to  the  specified  port  on  the
            specified  server,  include  the server name (.LASVR) and the
            port name (.LAPRT).

         o  If you specify the  server  Name  (.LASVR)  only,  without  a
            service  name  or  port name, the call takes the error return
            with Error Code  6  (Invalid  or  unknown  LAT  service  name
            (LASVC%)).

         o  If you specify the service  name  (.LASVC)  only,  without  a
            server  name  or  port  name, the call takes the error return
            with Error  Code  3  (Invalid  or  unknown  LAT  server  name
            (LASVR%)).

         o  If you specify port name (.LAPRT) only, without a server name
            or  service  name, the call takes the error return with Error
            Code 3 (Invalid or unknown LAT server name (.LASVR%)).

   Rejection codes are returned in the .LAVAL word (if LA.WAI is set) and
   in  the  Status  Block  of the .LASHC function (described below).  The
   possible rejection codes are:


   Table 22-10:  LATOP. Rejection Codes

   ______________________________________________________________________

     Code    Symbol    Meaning
   ______________________________________________________________________

     0       .LAUNK    Unknown error.
     1       .LAURD    User requested disconnect.
     2       .LASSP    System shutdown in progress.
     3       .LAISR    Invalid slot received.
     4       .LAISC    Invalid service class.
     5       .LAIRS    Insufficient resources.
     6       .LASIU    Service is in use.
     7       .LANSS    No such service.
     10      .LASDI    Service is disabled.
     11      .LASNP    Service is not offered by requested port.
     12      .LANSP    No such port name.
     13      .LAIPW    Invalid password.


                                   22-246
                             LATOP. [CALLI 221]


     14      .LAENQ    Entry is not in the queue.
     15      .LAIAR    Immediate access rejected.
     16      .LAACD    Access denied.
     17      .LACSR    Corrupted solicit request.
     20      .LACTI    Command type code is illegal
     21      .LASCS    Start slot can't be sent
     22      .LAQED    Queue entry deleted by local node
     23      .LAIRP    Inconsistent or illegal request parameters
   ______________________________________________________________________



   22.79.9  FUNCTION 10 (.LATHC)

   Terminates a host-initiated connection.  This function requires  JACCT
   or [1,2] privileges.  The argument list is:

   Word      Symbol    Contents

   0         .LAACT    EXP length
   1         .LAFCN    EXP .LATHC
   2         .LAPRM    Parameter word (described below)

                       Where the parameter word  contains  the  following
                       information:

                       Bits    Symbol    Meaning

                       0       LA.WAI    Ignored.
                       1       LA.QUE    Ignored.
                       2       LA.SYS    Ignored.
                       3       LA.JOB    If  this   bit   is   set,   the
                                         LATOP. UUO  will  terminate  all
                                         host-initiated requests for this
                                         job.
                       4-17              Reserved for Digital.
                       18-35   LA.CID    Connect-Id.    If   LA.JOB    is
                                         cleared,   then   terminate  the
                                         host-initiated request for  this
                                         connect-id   (returned   by  the
                                         .LARHC function).



   22.79.10  FUNCTION 11 (.LASHC)

   Shows information about  host-initiated  connections.   This  function
   requires JACCT or [1,2] privileges.  The argument list is:

   Word      Symbol    Contents

   0         .LAACT    EXP length


                                   22-247
                             LATOP. [CALLI 221]


   1         .LAFCN    EXP .LASHC

   2         .LABCT    Buffer count word.  Store the length of the buffer
                       reserved  for the information in the right half of
                       this word.  The monitor will return the number  of
                       words actually used in the left half of this word.

   3         .LABFA    Address of the buffer where the  information  will
                       be returned

                       The information returned at the address  specified
                       in  .LABFA  takes the form of one Status Block for
                       each pending connection.  The format of the Status
                       Block is shown in Table 22-11.

   4         .LAQUA    Connect-id  word.   The  word  is   formatted   as
                       follows:

                       Bits      Symbol    Meaning

                       0-1                 Ignored.
                       2         LA.SYS    Returns information on
                                           host-initiated connects.
                       18-35     LA.CID    Connect-id, or zero.


   Table 22-11:  LATOP. Status Block

   +-------------------------------------------------+
   | Job number             | Connect-id             |
   |-------------------------------------------------|
   | Status Field (below)   | Queue depth            |
   |-------------------------------------------------|
   | Server-name count      | Port-name count        |
   |-------------------------------------------------|
   |         Server-name (4 words)                   |
   |-------------------------------------------------|
   |         Port-name (4 words)                     |
   |-------------------------------------------------|
   | Service-name count     | Indeterminate          |
   |-------------------------------------------------|
   |           Service-name (4 words)                | 
   +-------------------------------------------------+


   The status field in the left half of addr+1 may  contain  any  of  the
   following:

         o  A rejection code (described in Table 22-10)

         o  A Universal Device Index for a terminal



                                   22-248
                             LATOP. [CALLI 221]


         o  One of the following status codes:

            Code       Symbol    Meaning

            377777     .LASOL    Soliciting.
            377776     .LAQUE    Queued.
            377775     .LACAN    Cancelled.
            377774     .LATMO    Timed out.


   SKIP RETURN

   On a successful completion of the monitor call,  the  skip  return  is
   taken,  the requested information is stored in the locations described
   in the argument list for  each  function,  and  the  ac  contains  the
   address of the argument list.

   Several LATOP.  functions return information in a buffer  starting  at
   the  address  stored  in  Word  3  of the argument block, .LABFA.  The
   functions and the format of the information returned are  listed  with
   the function codes.

   ERROR RETURN

   On an error return, the non-skip return is taken, and the ac  contains
   an error code.  The error codes are:

   Code      Symbol    Meaning

   0         LABTS%    The buffer size you allocated was too small for
                       the amount of information available.  The actual
                       number of words that are required is stored in the
                       left half of .LABCT.
   1         LAVOR%    Value of a parameter is outside the allowed range.
   2         LALNO%    LAT is not operational.
   3         LASVR%    Invalid or unknown LAT server name.
   4         LAIPN%    Invalid LAT parameter.
   5         LAIPV%    Invalid LAT parameter value.
   6         LASVC%    Invalid or unknown LAT service name.
   7         LAILR%    Insufficient LAT resources.
   10        LAHAS%    LAT host name already set.
   11        LAIVF%    Invalid function code.
   12        LAABS%    Argument list too small.
   13        LAADC%    Address check for argument list (specified address
                       not in memory)
   14        LAPRV%    Not enough privileges.
   15        LAPRT%    Invalid or unknown LAT port name.
   16        LACID%    Invalid or unknown LAT connect-id.
   17        LAABL%    Argument list too large.





                                   22-249
                             LLMOP. [CALLI 220]


   22.80  LLMOP.  [CALLI 220]

   FUNCTION

   Performs functions for the network management layer of  DECnet.   This
   call  is  used  only by the NML program and is not intended for use in
   customer programs.  The LLMOP. UUO may  change  at  any  time  without
   notice.  This call requires [1,2], JP.POK, or JACCT privileges.

   CALLING SEQUENCE

             MOVE    ac1,fcncode
             XMOVEI  ac2,addr
             LLMOP.  ac2,
             error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  fcncode is the function code.  The argument  block  found  at
            addr is specific to the function code contained in ac1.

         o  addr is the address of the argument block.

   Function codes for LLMOP.  are described in the following subsections.



   22.80.1  FUNCTION 0 (.ELDIR)

   Builds an Ethernet loopback message from data supplied in the argument
   block,  and  transmits  it  to  the destination address.  The argument
   block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID.  Bits 34 and 35 (LM.CID)  contain  the
                       value of the Ethernet port to use.

   1-2       .LMDST    Destination address.

   3         .LMREQ    Request number, containing:

                       Bits      Symbol    Meaning
|  
|                      0-17      LM.PID    Port ID.

                       18-35     LM.REQ    Contains  the  request  number
                                           returned by LLMOP.  This value
                                           is used in function .ELRPY.




                                   22-250
                             LLMOP. [CALLI 220]


   4         .LMRBL    Length of the loopback request data  buffer.   The
                       right  half  (LM.MBL)  contains  the length of the
                       data portion of the loopback message.

   5         .LMRBP    Pointer to loopback request data buffer.



   22.80.2  FUNCTION 1 (.ELAST)

   Builds an Ethernet loopback message, and transmits it according to the
   type  of  assistance required.  The first words in the argument block,
   .LMCID, .LMDST, .LMREQ, .LMRBL, and .LMRBP, are described in  function
   .ELDIR.  The remainder of the argument block is:

   Word      Symbol    Contents

   6-7       .LMAST    Address of the node used as the assistant  in  the
                       loopback  request.   This  may  not be a multicast
                       address.

   10        .LMHLP    Assistance level.  Level 1, .LMXMT,  forwards  the
                       loopback message to both the destination and local
                       nodes.  Level 2,  .LMRCV,  forwards  the  loopback
                       message  to  assistant  and local nodes.  Level 3,
                       .LMFUL,  forwards  the  message  to   destination,
                       assistant, and local nodes.



   22.80.3  FUNCTION 2 (.ELRPY)

   Reads the loopback reply message.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID.  Bits 34 and 35 (LM.CID)  contain  the
                       value of the Ethernet port to use.

   1-2       .LMSRC    Address of the remote system that satisfied a loop
                       assisted operation.

   3         .LMREQ    Request number.  The right half (LM.REQ)  contains
                       the  request  number of the reply to be read.  The
                       caller is blocked until the reply arrives.

   4         .LMRBL    Length of the loop response buffer.  The left half
                       (LM.RML)  contains  on  return  the  length of the
                       received loop reply message data.  The right  half
                       (LM.MBL)  holds  the  maximum  length  of the loop
                       response message buffer that you supply.

   5         .LMRBP    Pointer to loop reply buffer.

                                   22-251
                             LLMOP. [CALLI 220]


   22.80.4  FUNCTION 3 (.ELAIC)

   Assigns interrupt channel for Ethernet loopback reply.   The  argument
   block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where Bits 34 and 35 (LM.CID)  contain
                       the value of the Ethernet port to use.

   1         .LMICF    Interrupt channel flags, in the form:

                       Bits      Symbol    Meaning

                       0         LM.AIC    Assigns the interrupt channel
                                           given in LM.ICH when lit.

                       12-17     LM.ICH    Contains the PSI channel to
                                           interrupt when the loopback
                                           message arrives.



   22.80.5  FUNCTION 4 (.ELABT)

   Aborts the loop request.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where bits 34 and 35 contain the value
                       of the Ethernet port to use.

   3         .LMREQ    Request number.  The right half, LM.REQ,  contains
                       the number of the request to be aborted.



   22.80.6  FUNCTION 5 (.ELSTS)

   Obtains status of Ethernet loopback requests.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where bits 34 and 35 contain the value
                       of the Ethernet port to use.

   1         .LMSTF    Status code for  the  request.   The  right  half,
                       LM.RTC,  contains  one  of  the  following  status
                       codes:





                                   22-252
                             LLMOP. [CALLI 220]


                       Code      Symbol    Status

                       0         .LMPND    Request pending, incomplete.
                       1         .LMSUC    Request was completed
                                           successfully.
                       2         .LMABT    Request aborted.
                       3         .LMTXF    Transmit failed.
                       4         .LMCCE    Channel communication error.

   2         .LMCST    Status returned from the KLNI port driver.

   3         .LMREQ    Request number.  The right half, LM.REQ,  contains
                       the number of the request to be aborted.



   22.80.7  FUNCTION 6 (.RCRID)

   Transmits a Read Identify protocol message to the destination  address
   node  on  the Ethernet.  Use the .RCRPY function to read the System ID
   reply message.  The argument block is identical to  that  of  function
   .ELDIR.   The  value  returned in LM.REQ of .LMREQ must be used in any
   subsequent .RCRPY, .RCABT, or .RCSTS calls.



   22.80.8  FUNCTION 7 (.RCRCT)

   Transmits a Read Counters protocol message to the destination  address
   node  on  the Ethernet.  Use the .RCRPY function to read the System ID
   reply message.  The argument block is identical to  that  of  function
   .ELDIR.



   22.80.9  FUNCTION 10 (.RCIDS)

   Transmits a System ID protocol message to the destination address node
   on  the Ethernet.  This function blocks the program until the transmit
   is completed.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where bits 34 and 35 (LM.CID)  contain
                       the value of the Ethernet port to use.

   1-2       .LMDST    Destination address.







                                   22-253
                             LLMOP. [CALLI 220]


   22.80.10  FUNCTION 11 (.RCRBT)

   Transmits a Boot protocol message to the destination address  node  on
   the Ethernet.  .RCRBT blocks the issuing process until the transmit is
   completed.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where bits 34 and 35 (LM.CID)  contain
                       the value of the Ethernet port to use.

   1-2       .LMDST    Destination node address.

   3-4       .LMPWD    8-byte verification code.  The code is transmitted
                       to  the  remote  system, which uses it in deciding
                       whether to allow  the  boot  request.   The  8-bit
                       bytes are packed four to a word.

   5         .LMCIF    Control information, in the form:

                       Bits      Symbol    Meaning

                       26        LM.BDV    Specifies  the  boot   device,
                                           where  0  indicates the system
                                           default, and  1  represents  a
                                           specified device.

                       27        LM.BSV    Specifies  the  boot   server,
                                           where 0 is the system default,
                                           and 1 indicates  requesting  a
                                           system.

                       28-35     LM.PRO    Specifies  the  processor   to
                                           boot.   0 indicates the system
                                           processor,  and  1  represents
                                           the communication processor.

   6         .LMDID    Device ID in an 8-bit byte string.

   7         .LMSID    Software ID in an 8-bit byte string.



   22.80.11  FUNCTION 12 (.RCRPY)

   Reads the response to a request ID or  Read  Counters  function.   The
   format  of  the  argument  block  is  the  same as for .ELRPY.  .LMSRC
   contains the address of the  responding  node.   .LMRBL  contains  the
   returned message length, and .LMRBP contains a pointer to the response
   buffer.




                                   22-254
                             LLMOP. [CALLI 220]


   22.80.12  FUNCTION 13 (.RCRSV)

   Transmits a reserve remote console MOP message.   The  argument  block
   contains .LMCID, .LMDST, and .LMPWD, as described in function .RCRBT.



   22.80.13  FUNCTION 14 (.RCREL)

   Transmits a release remote console MOP message.   The  argument  block
   contains .LMCID and .LMDST.



   22.80.14  FUNCTION 15 (.RCSND)

   Sends ASCII console command data to a remote  console  and  polls  for
   response  data.   If  no  command  data is included, the function only
   polls for response data.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, in the form:

                       Bits      Symbol    Meaning

                       16        LM.CBF    Command break flag.   If  this
                                           bit  is set, a break condition
                                           in  the  serial  byte   stream
                                           precedes   the   command  data
                                           buffer.

                       17        LM.MNO    Message  number,  which  is  a
                                           one-bit    sequence    number,
                                           indicating the current Console
                                           Requestor command message.

                       34-35     LM.CID    Channel ID.

   1-2       .LMDST    Destination address.

   3         .LMREQ    Request number, as described in .ELDIR.

   4         .LMRBL    Length of console request buffer.  The right half,
                       LM.MBL, contains the maximum buffer length.

   5         .LMRBP    Pointer to the remote console data buffer.







                                   22-255
                             LLMOP. [CALLI 220]


   22.80.15  FUNCTION 16 (.RCPOL)

   Polls for completion  of  the  Send  Console  Command  function.   The
   argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID and returned flags, in the form:

                       Bits      Symbol    Meaning

                       7         LM.RDL    Indicates that  received  data
                                           was  lost.  The flag is set by
                                           the  local  requestor  if  the
                                           response  data  buffer was too
                                           small to receive the data from
                                           the remote node.

                       15        LM.RDO    Indicates that  response  data
                                           was  lost,  due  to  a  buffer
                                           overrun or error condition.

                       16        LM.CDL    Indicates  that  command  data
                                           was lost.  This flag is set if
                                           command data  in  the  Console
                                           Command message was lost.  The
                                           remote server sets this bit.

                       17        LM.MNO    Message  number,  which  is  a
                                           one-bit    sequence    number,
                                           indicating the current Console
                                           Requestor command message.

                       34-35     LM.CID    Channel ID.

   1-2       .LMSRC    Source node and physical address of the node  that
                       sent this reply.

   3         .LMREQ    Request ID, assigned by .RCSND.

   4         .LMRBL    Length of console response buffer.  The format  of
                       the buffer is described in .ELRPY

   5         .LMRBP    Pointer to the remote console data buffer.



   22.80.16  FUNCTION 17 (.RCAIC)

   Assigns an interrupt channel to a remote console.  Argument  block  is
   identical to that of .ELAIC.



                                   22-256
                             LLMOP. [CALLI 220]


   22.80.17  FUNCTION 20 (.RCABT)

   Aborts an outstanding remote console request.  The argument  block  is
   identical to that of .ELABT.



   22.80.18  FUNCTION 21 (.RCSTS)

   Obtains status of a remote console request.   The  argument  block  is
   identical to that of .ELSTS.



   22.80.19  FUNCTION 22 (.RCADR)

   Obtains a channel address.  The argument block is:

   Word      Symbol    Contents

   0         .LMCID    Channel ID, where bits 34 and 35 contain the value
                       of the Ethernet port to use.

   1-2       .LMHWA    Hardware address.

   3-4       .LMPYA    Physical address.

   SKIP RETURN

   On a successful completion, the requested functions are performed, and
   any  returns  are made as specified in the description of the function
   code.

   ERROR RETURN

   One of the following codes is returned in the ac:

   Code      Symbol    Error

   1         LMPRV%    Program has insufficient privileges.
|  2         LMILF%    Program specified an illegal function.
   3         LMICN%    Program specified an illegal channel number.
   4         LMOFF%    LLMOP. is off.
   5         LMADC%    An address check was performed.










                                   22-257
                             LOCATE [CALLI 62]


   22.81  LOCATE [CALLI 62]

   FUNCTION

   Changes the logical node  number  for  the  current  job.   This  call
   functions  in  the  ANF-10 network to allow you to route device I/O to
   devices at other nodes.  Subsequent references to output devices (such
   as  line  printers)  and  input  devices  (such as card readers), when
   implicitly requested or generically referenced,  will  be  assumed  to
   refer to devices on the node you specify with this call.

   CALLING SEQUENCE

           / MOVE    ac,[SIXBIT/nodename/] \
           \ MOVEI   ac,nodenumber         /
             LOCATE  ac,
               error return
             skip return

   In the calling sequence, the program supplies the following variables:

         o  nodename is the SIXBIT physical name of a node.

         o  nodenumber is one of the following:

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

             0    Changes  your  job's  location  to  that  of  the  host
                  computer.

             n    Changes your job's location to node number n,  where  n
                  is a positive integer.

   SKIP RETURN

   The location of your job is  changed  as  specified.   Any  subsequent
   generic  device specifications are associated with the new node number
   and node name.

   ERROR RETURN

   The error return occurs if the LOCATE monitor call is not  implemented
   on  your  system,  or  if you specified an invalid node number or node
   name.









                                   22-258
                             LOCATE [CALLI 62]


   EXAMPLES

             MOVEI   T1,3
             LOCATE  T1,
             JRST    ERROR

   Locates your job at node number 3.

   RELATED CALLS

   WHERE











































                                   22-259
                              LOCK [CALLI 60]


   22.82  LOCK [CALLI 60]

   FUNCTION

   Locks the current job into user  memory.   Note  that  there  are  two
   calling   sequences  for  LOCK.   The  standard  calling  sequence  is
   described under Calling Sequence 1 and the extended  calling  sequence
   is  described under Calling Sequence 2.  The extended calling sequence
   locks a segment starting at a specified page in physical memory.

   The default function of this call locks the segments of the program as
   set  by bits 17 and 35 in the accumulator.  Bit 17 must be set to lock
   the high segment; bit 35 must be set to lock  the  low  segment.   The
   specified  segment(s)  is  locked into physically contiguous memory in
   contiguous executive virtual memory space, unless you set flags in the
   accumulator to specify otherwise.

                                    NOTE

           Programs using user mode  extended  addressing  cannot
           use the LOCK monitor call.

   For more information about locking jobs, refer to Chapter 9.

   CALLING SEQUENCE 1

             MOVE    ac,[flags]
             LOCK    ac,
             error return
             skip return

   In the calling sequence, the program supplies the flags, which include
   one or more of the following bits:

   Bit       Symbol    Function

   13        LK.HHP    Allows locking the high segment in core above  the
                       first 256K of physical core, if LK.HNP is not set.
                       Without this provision, the UUO will fail  if  the
                       high  segment  cannot  be  fit entirely within the
                       first 256K of core.

   14        LK.HLC    Locks the high segment in user core and  sets  its
                       cache  bit.   If this bit is off, the high segment
                       is locked with its cache bit off.  KL10 processors
                       will  run  your  program faster if you use LK.HLC;
                       however, for a real-time program that  has  direct
                       access to memory, you should not set LK.HLC.

   15        LK.HNP    Locks the high segment without forcing the job  to
                       be  locked  into  physically contiguous locations.
                       If this bit is not set,  physical  contiguity  for


                                   22-260
                              LOCK [CALLI 60]


                       the  locked  high  segment is required.  To expand
|                      the physically  contiguous  high  segment  segment
|                      beyond  256K,  set the LK.HHP bit (Bit 13) instead
                       of LK.HNP.

   16        LK.HNE    Locks the  high  segment  without  forcing  it  to
                       reside  in  executive virtual memory.  If this bit
                       is not set, the locked high segment must reside in
                       executive virtual memory.

                                              NOTE

                           For  executive-mode,  real-time  trapping,
                           your  high  segment  must  be  locked into
                           contiguous executive virtual memory.

   17        LK.HLS    Locks the high segment.  Without this bit set, the
                       high  segment  will  not be locked, and bits 14-16
                       will be ignored.

|  31        LK.LHP    Allows locking the low segment in core  above  the
                       first  256K  of addressing space, if LK.LNP is not
|                      set.   If  you  do  not  set  LK.LHP,  locking  of
|                      physically contiguous memory is limited to 256K of
                       core memory.

   32        LK.LLC    Locks the low segment in user core  and  sets  its
                       cache bit.  If this bit is off, the low segment is
                       locked with its cache bit  off.   Processors  will
                       run   your  program  faster  if  you  use  LK.LLC;
                       however, for a real-time program that  has  direct
                       access to memory, you should not set LK.LLC.

   33        LK.LNP    Locks the low segment without requiring physically
                       contiguous locations for the low segment.  If this
                       bit is not set, the low  segment  must  be  locked
                       into  physically  contiguous  locations.   In this
                       case, the low segment is  restricted  to  256K  of
|                      memory.   To  expand  beyond  256K, set the LK.LHP
|                      flag (Bit 31) instead of LK.LNP.

   34        LK.LNE    Locks the low segment without  requiring  the  low
                       segment to reside in executive virtual memory.  If
                       this bit is not  set,  the  low  segment  must  be
                       locked into executive virtual memory.

                                              NOTE

                           For  executive-mode,  real-time  trapping,
                           your  low  segment  must  be  locked  into
                           contiguous executive virtual memory.



                                   22-261
                              LOCK [CALLI 60]


   35        LK.LLS    Locks the low segment.  If this bit is clear,  the
                       lowseg  will not be locked, and bits 32-35 will be
                       ignored.
   CALLING SEQUENCE 2

             MOVE    ac,[XWD -n,addr]
             LOCK    ac,
               error return
             skip return
             . . .
   addr:     argument-list

   In the calling sequence, the program supplies the following variables:

         o  n is the  number  of  arguments  plus  one,  expressed  as  a
            negative value.

         o  addr is the address of the argument list.  The argument  list
            depends on the function code you specify in this word.

         o  fcn-code is one of the function codes described below.

         o  hiseg is set if the high segment is to be locked.  lowseg  is
            set if the low segment is to be locked.

   Code      Symbol    Meaning

   0         .LKPPN    Locks  the  high  and/or  the  low  segment   into
                       contiguous   physical   pages,   starting  at  the
                       physical   page   number    specified    in    the
                       argument-list.   The argument list is formatted as
                       follows:

                       addr:     EXP       .LKPPN
                                 XWD       high-seg,lowseg

                       The contents of addr+1 specify the pages to  lock.
                       The left half of addr+1 contains the starting page
                       number of the high segment; if this halfword is 0,
                       the high segment is not locked.  The right half of
                       addr+1 contains the starting page  number  of  the
                       low  segment;  if  this  halfword  is  0,  the low
                       segment is not locked.

   1         .LKSGL    Locks a list of segments.  This function  is  used
                       for  locking  multiple  high segments for the same
                       job.   The  argument-list  for  this  function  is
                       formatted as follows:

                       addr:     EXP       .LKSGL 
                                 EXP       flags+segment-no



                                   22-262
                              LOCK [CALLI 60]


                       The contents of addr+1 include flag  bits  in  the
                       left half and the segment number of the segment to
                       be locked in the right half.  If you  specify  the
                       segment  number  as  0,  the  low  segment will be
                       locked.

                       The flags you can include in the right half are:

                       Bits      Symbol    Meaning

                       1         LK.2PC    Lock   the    segments    into
                                           physically  contiguous memory.
                                           The physical  page  number  is
                                           returned    in    Bits    6-17
                                           (LK.2PP).
                       2         LK.2EV    Lock the  segments  into  Exec
                                           Virtual  Memory  (EVM).   On a
                                           skip return, the virtual  page
                                           number  will  be  returned  in
                                           Bits 6-17 (LK.2PP).
                       6-17      LK.2PP    Physical page number where the
                                           segments  are  to be locked in
                                           memory.  This  field  requires
                                           that   you   also  set  Bit  1
                                           (LK.2PC).
                       26-35     LK.2SN    This   field   specifies   the
                                           segment  number  that you want
                                           locked.   If  this  field   is
                                           zero,   the   low  segment  is
                                           assumed.

   If you use  Calling  Sequence  2  when  the  system  is  running  with
   KL-paging  the  low  segment is locked into the second higher physical
   page.

   SKIP RETURN

   When using Calling Sequence 1, the monitor has locked the program into
   core.   If  physical  or executive virtual contiguity is required, the
   following information is stored in the ac:

   XWD       hiseg,lowseg

   In this format, the left half of the ac is the page number of the high
   segment  (0  if  no  high  segment  exists).   The right half contains
   lowseg, the page number of the low segment.

   If no contiguity is required, the ac is cleared.






                                   22-263
                              LOCK [CALLI 60]


   The monitor will lock your program  into  memory  and  take  the  skip
   return if all of the following conditions are met:

         o  The lock privilege bit (JP.LCK) is set for your job.

         o  The locked job would not prevent any other job from expanding
            to its guaranteed minimum (CORMIN).

         o  The locked job would not prevent any other current  job  from
            running.  (Note that unlocked jobs can exceed CORMIN.)

         o  For executive virtual  mapping,  the  locked  job  would  not
            exceed   the  maximum  amount  of  executive  virtual  memory
            available for locking.

         o  The job either has no  high  segment,  has  a  sharable  high
            segment, or both segments were locked.

         o  The job is not virtual and has a contiguous core image.

   When using Calling Sequence 2, the monitor locks the specified segment
   (contiguously  and physically) starting at the page in physical memory
   specified in your program.  If you specify that the low segment is  to
   be  locked,  the  monitor locks your job into the next higher physical
   page location than the one you specified in the  right  half  of  your
   argument.

   ERROR RETURN

   One of the following error codes is returned in the ac:

   Code      Symbol    Error

   0         LKNIS%    The LOCK call, or a feature you requested, is  not
                       implemented  on  your  system; or you attempted to
                       lock a nonsharable high segment.
   1         LKNLP%    No locking privilege.
   2         LKNCA%    Not enough core available; your locked  job  would
                       prevent running an unlocked job.
   3         LKNCM%    Not enough core for CORMIN; your job would prevent
                       maintaining CORMIN for unlocked jobs.
   4         LKNEM%    Not enough core for executive virtual memory; your
                       locked  job  would  exceed  the  maximum allowable
                       executive virtual  memory.   You  can  obtain  the
                       executive virtual memory maximum and in-use values
                       from the GETTAB table .GTCnV, where n is  the  CPU
                       number.  The maximum is in word 43 (%CVEVM) of the
                       table and the in-use value is in word 44 (%CVEVU).
   5         LKNIA%    Illegal flags specified.





                                   22-264
                              LOCK [CALLI 60]


   6         LKNPU%    Specified page not available.  You  would  receive
                       this  error  on  an  extended LOCK call if the two
                       segments would overlap, one or both segments would
                       overlap  another locked job or the monitor, or one
                       or both segments would be  outside  the  range  of
                       on-line memory.
   7         LKNAL%    Illegal movement specified.  You tried to  move  a
                       locked  segment  or place a segment into executive
                       virtual memory.

   RELATED CALLS

         o  RESET

         o  UNLOK.







































                                   22-265
                              LOGIN [CALLI 15]


   22.83  LOGIN [CALLI 15]

   FUNCTION

   Informs the monitor that a job has successfully logged in, and  passes
   certain  parameters  to  the monitor (including the project-programmer
   number).  The calling job must not be logged in.

   The LOGIN monitor call is used by the LOGIN and INITIA programs and is
   not intended for customer use.

   CALLING SEQUENCE

             MOVE    ac,[XWD -len,addr]
             LOGIN   ac,
             return
              ...
   addr:     proj,,prog                ;JBTPPN (.GTPPN)
             privilege bits            ;JBTPRV (.GTPRV)
             user-name                 ;first half, .PDNM1 (.GTNM1)
             user-name                 ;second half, .PDNM2 (.GTNM2)
             charge #                  ;.PDCNO (.GTCNO)

   In the calling sequence, the program supplies the following variables:

         o  len is the length of the argument list.

         o  addr is the address of the argument list.  The  data  in  the
            argument list is to be passed to the monitor.

   RETURN

   The job is logged in, if it is not already logged in.

   RELATED CALLS

         o  ACCLG.

         o  CHGPPN

         o  LOGOUT













                                   22-266
                             LOGOUT [CALLI 17]


   22.84  LOGOUT [CALLI 17]

   FUNCTION

   Releases all I/O devices associated with the calling job  and  returns