Google
 

Trailing-Edge - PDP-10 Archives - mit_emacs_170_teco_1220 - info/jsys.man
There are no other files named jsys.man in the archive.


			       ACCES	 JSYS 552

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

	1.  Connecting to a directory on a given structure.

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

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

   RESTRICTIONS:    some  functions  require  WHEEL  or  OPERATOR   capability
		    enabled.

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

   ACCEPTS IN AC1:  B0(AC%CON) connect the job	to  the  specified  directory.
			       After  successful  completion  of the call, the
			       job is connected to and has owner access to the
			       directory.  The job's default directory becomes
			       this directory.

		    B1(AC%OWN) give the job  owner  access  to	the  specified
			       directory  and  group  access to directories in
			       the same groups	as  the  specified  directory.
			       The  job's  connected  directory  is unchanged.
			       This function cannot be given for  another  job
			       or for a files-only directory.

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

|		    B3(AC%PWD) validate password by  encrypting  user-supplied
|			       password before doing compare.

		    B18-35     length of the argument block

	      AC2:  address of the argument block

   RETURNS     +1:  always

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

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .ACDIR	    Byte  pointer  to  ASCIZ  string  containing   the
			    structure and directory name or a 36-bit directory
			    number.  The ASCIZ string  must  be  of  the  form
			    structure:<directory>.

	1    .ACPSW	    Byte  pointer  to  ASCIZ  string  containing   the
			    password of the specified directory.  The password
			    is not required if:

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

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

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

   The ACCES monitor call can be given for another job if the type  of	access
   being  requested  is  for  connecting  the  job (AC%CON) and if the process
   executing the call has WHEEL or OPERATOR capability enabled.

   The ACCES monitor call is  used  to	implement  the	CONNECT,  ACCESS,  and
   END-ACCESS commands of the TOPS-20 Command Language.

   Generates an illegal instruction interrupt on error conditions below.

   ACCES ERROR MNEMONICS:

   ACESX1:   Argument block too small
   ACESX3:   Password is required
   ACESX4:   Function not allowed for another job
   ACESX5:   No function specified for ACCES
   ACESX6:   Directory is not accessed
   ACESX7:   Directory is "files-only" and cannot be accessed
   CNDIX1:   Invalid password
   CNDIX5:   Job is not logged in
   STRX01:   Structure is not mounted
   STRX02:   Insufficient system resources
   STRX03:   No such directory name
   STRX04:   Ambiguous directory specification
   STRX09:   Prior structure mount required
   LGINX2:   Directory is "files-only" and cannot be logged into
   CAPX1:    WHEEL or OPERATOR capability required
   RCDIX2:   Invalid directory specification
   ARGX07:   Invalid job number
   ARGX08:   No such job


			       ADBRK	 JSYS 570

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

   RESTRICTIONS:     Not available on 2020 hardware.

   ACCEPTS IN AC1:   function code in the left half and process handle in  the
		     right half

	      AC2:   function-specific argument

	      AC3:   function-specific argument

   RETURNS     +1:   always

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

	1.  Set up the software interrupt system for interrupts on channel 19.

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

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

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

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

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

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

   Code        Symbol	 Meaning

     0		.ABSET	 Set address break.

     1		.ABRED	 Read address break.

     2		.ABCLR	 Clear address break.

     3		.ABGAD	 Return address of break instruction.

|    4		.ABSRG	 Set address break range.
|
|    5		.ABRRG	 Read address break range.
|
|    6		.ABGBR	 Return address break data.

   Each function is described in the paragraphs below.

 
   Setting address breaks - .ABSET

   This function initializes the address  break  facility  for	the  specified
   process.   When the process references the location in the manner for which
   the break has been set, it is suspended.  Its superior receives a  software
   interrupt on channel 19 (.ICIFT) if it has enabled for that channel.  After
   processing the interrupt, the superior process can resume the  inferior  by
   executing the RFORK monitor call.

   Only one address break can be in effect for a process at any one time,  and
   the break affects only the process for which it is set.  If another process
   references the location on which a break is set, it is not affected by  the
   break.   When  an address break is set in a page shared among processes and
   each process is to be suspended when it references the location, the  ADBRK
   call must be executed for each process.

   Breaks cannot be specified for the accumulators.

   The .ABSET function requires the following arguments to be given:

	AC2:  address of location on which to break.

	AC3:  flag word indicating the type of reference on  which  to	break.
	      The following flags are currently defined:

	      B0(AB%RED)  Break on a read reference.

	      B1(AB%WRT)  Break on a write reference.

	      B2(AB%XCT)  Break on an execute (instruction fetch) reference.

 
   Reading address breaks - .ABRED

   This function  returns  the	current  address  break  information  for  the
   specified  process.	 It  returns the following information on a successful
   return:

	AC2:  address of location on which a break is set

	AC3:  flag word indicating the type of reference on  which  the  break
	      will occur.  The following flags are currently defined:

	      B0(AB%RED)  Break will occur on a read reference.

	      B1(AB%WRT)  Break will occur on a write reference.

	      B2(AB%XCT)  Break will occur on an execute  (instruction	fetch)
			  reference.

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

 
   Clearing address breaks - .ABCLR

   This function removes any address break that  was  set  for	the  specified
   process.   A  program  can  also  remove  a	break  by executing the .ABSET
   function with AC2 and AC3 containing zero.

   Returning the address of the break instruction - .ABGAD

   This function returns in AC2 the address  of  the  location	on  which  the
   process encountered a break.  When the location on which the break occurred
   is in a JSYS routine, the address returned is a monitor PC, not the address
   of  the  JSYS.  The program can obtain the address of the JSYS by executing
   an RFSTS monitor call.

   Generates an illegal instruction interrupt on error conditions below.

   ADBRK ERROR MNEMONICS:

   ABRKX1:   Address break not available on this system
   ARGX02:   Invalid function
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



				AIC	JSYS 131

   Activates specific software interrupt channels.  (Refer to Section 2.6.)

   ACCEPTS IN AC1:  process handle

	      AC2:  36-bit word
		    Bit n on means activate channel n

   RETURNS     +1:  always

   The DIC monitor call can be used to deactivate specified software interrupt
   channels.

   Generates an illegal instruction interrupt on error conditions below.

   AIC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			       ALLOC	 JSYS 520

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

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled.

   ACCEPTS IN AC1:  function code (.ALCAL)

	      AC2:  device designator

	      AC3:  job number, -1, or -2

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

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

   If AC3 contains -1, then the device is returned  to	the  pool  of  devices
   available  to  all users of the system (the device is no longer allocated).
   This is the initial state of all devices.

   If AC3 contains -2, then the device is assigned  to	the  monitor  resource
   allocator's pool of devices.

   Once a job assigns or opens a  nonallocated	device	(a  device  not  under
   control  of the resource allocator), the resource allocator cannot take the
   device from the job.  The  resource	allocator  can	allocate  the  device,
   however, to the job that currently has it.  Then, when the job releases the
   device, the resource allocator gets control of the device.

   When a job returns control of a device to the  system  resource  allocator,
   the	allocator  receives  an  IPCF  packet.	 The flag word (.IPCFL) of the
   packet descriptor block contains a code that indicates the message was sent
   by the monitor.  This code is 1(.IPCCC) in the IP%CFC field (bits 30-32).

   The first word of the IPCF packet data block contains .IPCSA,  which  means
   that  the  second  and  subsequent  words  contain  designators for devices
   returned to the control of the resource allocator.

	.IPCFL/<.IPCCC>B32

	DATA/.IPCSA
	DATA+1/device designator
	DATA+2/device designator

	The ALLOC monitor call requires the process to have WHEEL or OPERATOR
	capability enabled.

	ALLOC ERROR MNEMONICS:

   ALCX1:    Invalid function
   ALCX2:    WHEEL or OPERATOR capability required
   ALCX3:    Device is not assignable
   ALCX4:    Invalid job number
   ALCX5:    Device already assigned to another job
   ALCX6:    Device assigned to user job, but will be given to allocator when
	     released
   DEVX1:    Invalid device designator



				ARCF	 JSYS 247

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

   RESTRICTIONS:    Some functions  require  WHEEL  or	OPERATOR  capabilities
		    enabled.

   ACCEPTS IN AC1:  JFN

	      AC2:  Function code.  The available functions and their argument
		    blocks are described below.

	      AC3:  (Function-dependent, normally 0)

   Code        Symbol			 Function

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

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

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

     3	       .ARRFR	 Request that the contents of a file  be  restored  to
			 disk.	 The contents of AC3 determine if .ARRFR waits
			 or returns without waiting for the  contents  of  the
			 file to be restored to disk.

			 Options for AC3

			 B0   AR%NMS	Do  not  wait  for  the  file  to   be
					restored.

			 B1   AR%WAT	Wait until the file is restored.

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

			 B0   AR%CR1	Clear information for run 1.
			 B1   AR%CR2	Clear information for run 2.

     5	       .ARSST	 Set tape information for a file.   This  function  is
			 used  to  set	information  for the first, second, or

			 both tape runs.  AR%O1 and AR%O2  are	used  together
			 when  restoring  files  to disk.  It requires enabled
			 WHEEL or OPERATOR privileges.

			 AC3 contains  a  pointer  to  an  argument  block  as
			 follows:

			 Word	 Symbol   Contents

			   0	 .AROFL   Flags:

					  B0(AR%O1)  Set information  for
						     run 1.

					  B1(AR%O2)  Set information  for
						     run 2.

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

					  B3(AR%ARC) Set  FB%ARC  in  the
						     FDB   (archive   the
						     file.)

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

			   1	 .ARTP1   Tape 1 identification.

			   2	 .ARSF1   TSN 1,,TFN  1  -  Tape  saveset
					  number  in  the  left  half and
					  tape file number in  the  right
					  half.

			   3	 .ARTP2   Tape 2 identification.

			   4	 .ARSF2   TSN  2,,TFN  2  -  similar   to
					  .ARSF1.

			   5	 .ARODT   time and date of tape write  in
					  internal   format;   0  implies
					  present time.

			   6	 .ARPSZ   Number of pages  in  the  file.
					  This	word  can  be set only if
					  AR%O1 and AR%O2 are set first.

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

	  7	.ARGST	  Get tape information for  file.   AC3  contains

			  the  address	of an argument block that has the
			  same format as the block for .ARSST.

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

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

			  ARCF ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capabilities required
   ARGX02:   Invalid function code
   ARCFX2:   File already has archive status
   ARCFX3:   Cannot  perform  ARCF  functions  on  nonmultiple	directory
	     devices
   ARCFX4:   File is not on line
   ARCFX5:   Files are not on the same device or structure
   ARCFX6:   File does not have archive status
   ARCFX7:   Invalid parameter for .ARSST
   ARCFX8:   Archive not complete
   ARCFX9:   File not off line
   ARCX10:   Archive prohibited
   ARCH11:   Archive requested, modification prohibited
   ARCH12:   Archive requested, delete prohibited
   ARCX13:   Archive system request not completed
   ARCX14:   Restore failed
   ARCX15:   Migration prohibited
   ARCX16:   Cannot exempt off-line file
   ARCX17:   FDB improper format for ARCF
   ARCX18:   Retrieval wait cannot be fulfilled for waiting process
   ARCX19:   Migration already pending



			      ASND     JSYS 70

   Assigns a device to the caller.  The successful return is given if the
   the device is already assigned to the caller.

   ACCEPTS IN AC1:  device designator

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The RELD call can be used to release devices assigned to the caller.

   ASND ERROR MNEMONICS:

   DEVX1:    Invalid device designator
   DEVX2:    Device already assigned to another job
   ASNDX1:   Device is not assignable
   ASNDX2:   Illegal to assign this device

   ASNDX3:   No such device
   DSMX1:    File(s) not closed



			    ASNIQ%     JSYS 756
|
|  Assigns Internet queues for the ARPAnet TCP/IP interface.
|
|  RESTRICTIONS:    for  ARPAnet  systems  only.   Requires  NET   WIZARD
|		    capability (SC%NWZ).
|
|  ACCEPTS IN AC1:  Flags in the left half and a  pointer  to  the  Queue
|		    Descriptor Block in the right half.
|
|	      AC2:  Unused, must be 0
|
|	      AC3:  Unused, must be 0
|
|  RETURNS     +1:  failure, with error code in AC1 and  conflicting  job
|		    number in AC2
|
|	       +2:  success, with internet queue handle in  AC1  and  the
|		    maximum SNDIN% count in AC2
|
|  ASNIQ% Flags
|
|  Bit	 Symbol   Meaning
|
|  B0	 AQ%SCR   Use RPI device (secure)
|
|  B1	 AQ%SPT   Single-port protocol
|
|  B2	 AQ%ICM   Deliver ICMP error datagrams to this queue
|
|  Queue Descriptor Block Format:
|
|  Word  Symbol   Meaning
|
|   0	 .IQPRV   B0-23   Must be 0
|		  B24-31  Internet protocol number
|
|   1	 .IQFHV   B0-31   Internet foreign host value word
|
|   2	 .IQSHV   B0-31   Internet source  host  value	word;	used  for
|			  logical host selection
|
|   3	 .IQPTV   Internet port value word
|		  B0-15   Local port value
|		  B16-31  Foreign port value;  ignored if bit  AQ%SPT  is
|			  set
|
|   4	 .IQPRM   Mask word corresponding to .IQPRV
|
|   5	 .IQFHM   Mask word corresponding to .IQFHV
|
|   6	 .IQSHM   Mask word corresponding to .IQSHV

|   7	 .IQPTM   Mask word corresponding to .IQPTV;  use 0 for portless
|		  protocols
|
|   8	 .IQLEN   Length of argument block.
|
|  Mask words specify  those  bit  positions  where  an  exact	match  is
|  required.   Note  that  an  error  will occur unless the current Queue
|  Descriptor Block differs in masked bits from all other Internet queues
|  which are assigned at the time the ASNIQ% JSYS is executed.
|
|  ASNIQ% ERROR MNEMONICS:
|
|  ARGX22:   Invalid flags



				 ASNSQ%     JSYS 752
|
|	     Assigns a special message queue to a job.
|
|  RESTRICTIONS:    for  ARPANET  systems  only.   Requires  NET   WIZARD
|		    capability (SC%NWZ).
|
|  ACCEPTS IN AC1:  mask
|
|	      AC2:  header value
|
|  RETURNS     +1:  failure, error code in AC1
|
|	       +2:  success, special message queue assigned with  special
|		    queue handle in AC1
|
|  ASNSQ% ERROR MNEMONICS:
|
|  NTWZX1:   NET WIZARD capability required
|  ASNSX1:   Insufficient system resources (All special queues in use)
|  ASNSX2:   Link(s) assigned to another special queue



			     ATACH     JSYS 116

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

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

   ACCEPTS IN AC1:  B0(AT%CCJ) generate a CTRL/C interrupt to the  lowest
			       process	in  the job that is enabled for a
			       CTRL/C interrupt if the job  is	currently
			       attached to another terminal.  If this bit

			       is not set or if the job is currently  not
			       attached  to  another  terminal,  the  job
			       simply  continues  running  when   it   is
			       attached.

		    B1(AT%NAT) do  not	 attach.    Prevents   both   the
			       detaching of the job from its terminal and
			       the attaching of a remote job to the local
			       terminal.   Is  a  no-op unless the remote
			       job has a controlling terminal,	in  which
			       case   the  remote  job	is  detached  and
			       remains	detached.   This  bit  in  effect
			       makes ATACH like a remote DTACH.

		    B2(AT%TRM) attach  the  given  job	to  the  terminal
			       specified in AC4.  If this bit is not set,
			       the job is  attached  to  the  controlling
			       terminal of the caller.

		    B18-35     job number of the desired job.
		      (AT%JOB)

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

	      AC3:  byte pointer to  an  ASCIZ	password  string  in  the
		    caller's address space.

	      AC4:  number  of	the  terminal  to  be  attached  to   the
		    specified	job.	This   argument  is  required  if
		    B2(AT%TRM) is set.

   RETURNS     +1:  failure, error code in AC1.

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

   It is legal to attach to a job that has a controlling terminal if  one
   of the following conditions exists:

	1.  The job is logged in under the same  user  name  as  the  job
	    executing the ATACH.

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

	3.  The job executing the ATACH has WHEEL or OPERATOR  capability
	    enabled.

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

   If the controlling terminal is a PTY, a password is	not  required  in
   the following cases:

	1.  The owner  of  the	PTY  has  WHEEL  or  OPERATOR  capability
	    enabled.

	2.  The specified job is logged in with  the  same  name  as  the
	    owner of the PTY.

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

   ATACH ERROR MNEMONICS:

   ATACX1:   Invalid job number
   ATACX2:   Job already attached
   ATACX3:   Incorrect user number
   ATACX4:   Invalid password
   ATACX5:   This job has no controlling terminal
   ATACX6:   Terminal is already attached to a job
   ATACX7:   Illegal terminal number



			      ATI     JSYS 137

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

   ACCEPTS IN AC1:  terminal interrupt code,,channel number
		    (Refer to Section 2.6.6.)

   RETURNS     +1:  always

   If there is no controlling terminal (if  the  job  is  detached),  the
   assignments	are  remembered and are in effect when a terminal becomes
   attached.

   The DTI monitor call can be used to deassign a terminal code.

   Generates an illegal instruction interrupt on error conditions below.

   ATI ERROR MNEMONICS:

   TERMX1:   Invalid terminal code
   ATIX1:    Invalid software interrupt channel number
   ATIX2:    Control-C capability required



			     ATNVT     JSYS 274

   Creates the	Network  Virtual  Terminal  (NVT)  connection.	 See  the
   ARPANET manual for more details.

   RESTRICTIONS:    for use with ARPANET only

   ACCEPTS IN AC1:  flag bits in the left half and the JFN of the  opened
		    receive connection in the right half

	      AC2:  JFN of the opened send connection

   RETURNS     +1:  failure, with error code in AC1

	       +2:  success, with terminal designator  specific  to  this
		    NVT in AC1

   Flags for AC1:

   Bit	  Symbol    Meaning

|  B0	  AN%TCP    If set, this bit indicates that the right half of AC1
|		    contains the TCP JCN instead of a JFN.

   B2	  AT%NTP    If set, this bit indicates new TELNET protocol.
		    If clear, this bit indicates old TELNET protocol.

   ATNVT ERROR MNEMONICS:

   ATNX1:    Invalid receive JFN
   ATNX2:    Receive JFN is not open for read
   ATNX3:    Receive JFN is not open
   ATNX4:    Receive JFN is not a network connection
   ATNX5:    Receive JFN has been used
   ATNX6:    Receive connection has been refused
   ATNX7:    Invalid send JFN
   ATNX8:    Send JFN is not open for write
   ATNX9:    Send JFN is not open
   ATNX10:   Send JFN is not a network connection
   ATNX11:   Send JFN has been used
   ATNX12:   Send connection has been refused
   ATNX13:   Insufficient system resources (no NVTs)



			      BIN     JSYS 50

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

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  always, with the byte right-justified in AC2

   If the end of the file is reached, AC2 contains 0 instead of  a  byte.
   The	program  can  process  this  end-of-file condition if an ERJMP or
   ERCAL is the next instruction following the BIN call.

   The BOUT monitor call can be used to output a byte sequentially  to	a
   destination.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   BIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX1:     File is not open for reading
   IOX4:     End of file reached
   IOX5:     Device or data error



			     BKJFN     JSYS 42

   Backs up the source designator's pointer by one byte.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC1, if pertinent.
		    (This return actually decrements the pointer.)

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

   BKJFN, when referring to other designators, can be executed more  than
   once in succession.

   This call cannot be used with the DECnet devices SRV:  or DCN:.

   BKJFN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   BKJFX1:   Illegal to back up terminal pointer twice
   SFPTX2:   Illegal to reset pointer for this file
   SFPTX3:   Invalid byte number
   TTYX01:   Line is not active



			     BOOT     JSYS 562

   Performs basic maintenance and utility functions required for  loading

   and	dumping communications software.  The TOPS-20 system process that
   performs these functions uses a DIGITAL-supplied protocol  to  perform
   them.

|  On KL10 Model B hardware, the BOOT JSYS is used to  load  and  dump	a
   PDP-11 connected to a DTE20.

   RESTRICTIONS:    requires  WHEEL  or  OPERATOR  capabilities  enabled.
		    Some functions are hardware specific.

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block

   RETURNS     +1:  always

   The available functions and their argument blocks are described below.

	Code	Symbol	  Meaning

	 0	.BTROM	  Activate the	hardware  ROM  bootstrap  in  the
			  communications front end.

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

			  1    .BTERR	 Error status flags  returned  on
					 failure of the call

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

			  1    .BTERR	 Error status flags  returned  on
					 failure of the call

			  2    .BTSEC	 Address of bootstrap program  to
					 be loaded

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

			  1    .BTERR	 Error status flags  returned  on
					 failure of the call

			  2		 Not used and must be zero

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

			  4    .BTCNT	 Number of bytes to transfer

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

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

			  1    .BTPRV	 Version number of  the  protocol
					 to be used

			  Protocol types:

			  Symbol	 Meaning

			  .VN20F (0)	 RSX20F protocol
			  .VNMCB (1)	 MCB DECNET protocol

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

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

			  Protocol types:

			  Symbol	 Meaning

			  .VN20F (0)	 RSX20F protocol
			  .VNMCB (1)	 MCB DECNET protocol

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

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

			  Argument Block:

			  0    .BTDTE	 DTE-20 number

			  1    .BTERR	 Error status flags  returned  on
					 failure of the call

			  2		 Not used and must be zero

			  3    .BTFLG	 User-supplied flag word

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

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

			  5    .BTMPT	 Pointer to where data is  to  be
					 placed

	 14	.BTCLI	  Convert line id to port number

			  Argument Block:

			  0    .BTPRT	 Port number
			  1    .BTLID	 Pointer to ASCIZ line id

	 15	.BTCPN	  Convert NSP port number to line id

			  Argument Block:

			  0    .BTPRT	 Port number
			  1    .BTLID	 Pointer to ASCIZ line id

	 16	.BTD60	  Send a message to or receive a message  from	a
			  front  end  (a DN60) using the .VND60 protocol.
			  The  argument  block	controls   whether   this
			  function   sends   or   receives   a	 message.
			  (Requires DN60)

			  Argument Block:

			  0    .BT6DTE	 DTE number
			  1    .BT6ERR	 Error flags (returned):

|					 30   D6%BDP	  The  data  byte
|							  pointer  passed
|							  in the argument
|							  block is bad.
					 31   D6%ARD	  The	   PDP-11
							  attempted    to
							  send data  when
							  none	      was
							  expected.
					 32   D6%TRS	  DTESRV    timed
							  out waiting for
							  response header
							  from	the front
							  end.
					 33   D6%TDT	  DTESRV    timed
							  out waiting for
							  data	from  the
							  front end.
					 34   D6%TPO	  DTESRV    timed
							  out waiting for
							  the DTE  to  be
							  free.   Another
							  job  is   using
							  the  DTE and is
							  probably hung.
					 35   D6%NT6	  The  front  end
							  is  not running
							  DN60 protocol.

			  2    .BT6HBC	 Number  of  bytes  in	the  DN60
					 header.
			  2    .BT6HDR	 Address at which the DN60 header
					 begins.   This header contains 4
					 words,  which	contain  4  8-bit
					 bytes each.
			  3    .BT6DBC	 Number of bytes of data.
			  4    .BT6PTR	 Pointer to the first byte of the
					 data.
			  5    .BT6TMR	 Time  the   request   was   made
					 (returned).
			  6    .BT6TAS	 Time	 DTE	 was	 assigned
					 (returned).
			  7    .BT6THQ	 Time TOPS-20 queued  the  header
					 to the DTE.
|			  10   .BT6TRD	 Time  TOPS-20	 was   done   for
|					 response header.
|			  11   .BT6TDD	 Time TOPS-20 was done for data.
			  12   .BT6TFR	 Time	TOPS-20   satisfied   the
					 request.

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

   Generates an illegal instruction interrupt on error conditions below.

   BOOT ERROR MNEMONICS:

   BOTX01:   For group A processors, this message  indicates  an  illegal
	     line number.  For group B processors, this message indicates
	     an invalid DTE-20 number.
   BOTX02:   Invalid byte size
   BOTX03:   Invalid protocol version number
   BOTX04:   Byte count is not positive
   BOTX05:   Protocol initialization failed
   BOTX06:   GTJFN failed for dump file
   BOTX07:   OPENF failed for dump file
   BOTX08:   Dump failed
   BOTX09:   To -10 error on dump
   BOTX10:   To -11 error on dump
   BOTX11:   Failed to assign page on dump
   BOTX12:   Reload failed
   BOTX13:   -11 didn't power down
   BOTX14:   -11 didn't power up
   BOTX15:   ROM did not ACK the -10
   BOTX16:   -11 boot program did not make it to -11
   BOTX17:   -11 took more than 1 minute to reload;  will cause retry
   BOTX18:   Unknown BOOT error
   CAPX1:    WHEEL or OPERATOR capability required
   ARGX02:   invalid function



			      BOUT     JSYS 51

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

   ACCEPTS IN AC1:  destination designator

	      AC2:  the byte to be output, right-justified

   RETURNS     +1:  always

   The BIN monitor call can be used to input a byte sequentially from a
   source.

   Can cause several software interrupts or process terminations on
   certain file conditions.  (Refer to bit OF%HER of the OPENF call
   description.)

   BOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX2:     File is not open for writing
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end-of-file
   IOX11:    Quota exceeded

   IOX33:    TTY input buffer full
   IOX34:    Disk full
   IOX35:    unable to allocate disk - structure damaged



			      CACCT	JSYS 4

   Changes the account for the current job.

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

   ACCEPTS IN AC1:  byte pointer that points to the new account string in
		    the calling program's address space.  This call reads
		    the string until a null byte is  read,  or	until  39
		    characters are read.

		    If executed in section 0, this AC can contain a local
		    byte  pointer  or  an  account  number.   The account
		    number must be  in	bits  3-35,  and  bits	0-2  must
		    contain 5.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC1

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

   The GACCT monitor call can be used  to  return  the	account  for  the
   current job.

   CACCT ERROR MNEMONICS:

   CACTX1:   Invalid account identifier
   CACTX2:   Job is not logged in
   VACCX0:   Invalid account
   VACCX1:   Account string exceeds 39 characters



			     CFIBF     JSYS 100

   Clears the designated file input buffer.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  always

   Is a no-op if the source designator is not associated with a terminal.

   The CFOBF monitor call can be used to clear a designated  file  output
   buffer.

   Generates an illegal instruction interrupt on error conditions below.

   CFIBF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     CFOBF     JSYS 101

   Clears the designated file output buffer.

   ACCEPTS IN AC1:  destination designator

   RETURNS     +1:  always

   Is a no-op if the destination designator  is  not  associated  with	a
   terminal.

   The CFIBF call can be used to clear a designated file input buffer.

   Generates an illegal instruction interrupt on error conditions below.

   CFOBF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     CFORK     JSYS 152

   Creates a process inferior to the calling process.  (Refer to  Section
   2.7.)

   ACCEPTS IN AC1:  B0(CR%MAP) make the inferior process's map	the  same
			       as  the	current process's map by means of
			       indirect pointers.  If this bit is not on,
			       the inferior process will have no pages in
			       its map.  If desired, the creating process
			       can  then  use PMAP or GET to add pages to

			       the inferior's map.

		    B1(CR%CAP) make the inferior  process's  capabilities
			       the  same  as  the  current process's.  If
|			       this bit is not on, the	inferior  process
|			       has  no	capabilities  (all  bits  of  Job
|			       Capability Word are 0).

		    B3(CR%ACS) set the inferior process's  ACs	from  the
			       block  whose  address  is in AC2.  If this
			       bit is not on, the inferior  process'  ACs
			       are set to 0.

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

		    B18-35     PC value for the inferior process if CR%ST
		    (CR%PCV)   is on.

	      AC2:  address of 20 (octal) word	block  (optional).   This
		    block   contains  the  AC  values  for  the  inferior
		    process.  (Refer to bit CR%ACS above.)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, relative process handle in AC1

   The inferior process receives the same primary input and  output  JFNs
   as  the  current  process.	However,  the primary input and/or output
   files may be changed with the SPJFN monitor call.

   The CR%MAP argument in AC1 allows the inferior to see the same address
   space  as  that  of the superior.  The inferior process will have read
   and write access to the  superior's	address  space.   The  pages  are
   shared, and changes made by one process will be seen by the other.

   CFORK creates a nonvirgin process if:

	1.  CR%ST is set and

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

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

   The KFORK monitor call can be used to kill one or more processes.

   CFORK ERROR MNEMONICS:

   FRKHX6:   All relative process handles in use
   FRKHX8:   Illegal to manipulate an execute-only process
   CFRKX3:   Insufficient system resources



			     CHFDB     JSYS 64

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

|  RESTRICTIONS:    WHEEL or OPERATOR capability required to change  some
|		    words  in the FDB.	(Refer to Table 2-1 for the words
|		    requiring capabilities.)

   ACCEPTS IN AC1:  B0(CF%NUD) do not wait  for  the  disk  copy  of  the
			       directory to be updated.

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

		    B9-17      index into FDB indicating word to be
		    (CF%DSP)   changed

		    B18-35     JFN (for a disk file)
		    (CF%JFN)

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

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

   RETURNS     +1:  always

   Because each CHFDB call changes only one  word  in  the  FDB,  several
   calls must be executed to change several words.  Each call causes disk
   I/O.  To keep I/O to a minimum, the program should set bit  CF%NUD  on
   each  call.	 The setting of this bit on each call permits the program
   to run faster by allowing several changes to be made to the	FDB  with
   minimum disk I/O.

   To ensure that all the changes have been  written  to  the  disk,  the
   program  can  issue the last CHFDB call with bit CF%NUD off.  Also, if
   the program requires the FDB on the disk  to  be  updated  after  each
   call, it should execute each CHFDB call with bit CF%NUD off.

   There are a variety of calls used in manipulating the  FDB;	 see  the
   description of the FDB in Chapter 2 for information on these calls.

   Generates an illegal instruction interrupt on error conditions below.

   CHFDB ERROR MNEMONICS:

   CFDBX1:   Invalid displacement
   CFDBX2:   Illegal to change specified bits
   CFDBX3:   Write or owner access required
   CFDBX4:   Invalid value for specified bits
|  CFDBX5:   No FDB for non-directory devices
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators



			     CHKAC     JSYS 521

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

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

   ACCEPTS IN AC1:  length of the argument block in the right  half.   If
		    B0(CK%JFN)	is  on, word .CKAUD of the argument block
		    contains a JFN.

	      AC2:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success,  access  check  is   completed,   with   AC1
		    containing	-1 if access is allowed or 0 if access is
		    not allowed.

   The format of the argument block is as follows:

   Word      Symbol	    Meaning

     0	     .CKAAC	    Code of desired access to files.

     1	     .CKALD	    Byte pointer to user name string,  or  36-bit
			    user  number  of  user  whose access is being
			    checked.

     2	     .CKACD	    Byte pointer to directory name  string  (with
			    punctuation),  or  36-bit directory number to
			    which user whose access is being  checked  is
			    connected.

     3	     .CKAEC	    Enabled capabilities of user whose access  is
			    being checked.  (Refer to Section 2.7.1.)

     4	     .CKAUD	    Byte pointer to directory name  string  (with
			    punctuation),  or  36-bit directory number of
			    the  directory  containing	the  files  being
			    accessed.	If  B0(CK%JFN) of AC1 is on, this
			    word  contains  a  JFN  for  the  file  being
			    accessed.

     5	     .CKAPR	    Protection	of  the  files	being	accessed.
			    (Refer  to	Section  2.2.6.) This word is not
			    required if a JFN is supplied in word .CKAUD.

   Access codes are as follows:

	 0   .CKARD    read existing files
	 1   .CKAWR    write existing files
	 2   .CKAEX    execute existing files
	 3   .CKAAP    append to existing files
	 4   .CKADL    obtain directory listing of existing files
	 6   .CKADR    read the directory
	10   .CKACN    connect to the directory
	11   .CKACF    create files in the directory

   CHKAC ERROR MNEMONICS:

   CKAX1:    Argument block too small
   CKAX2:    Invalid directory number
   CKAX3:    Invalid access code
   CKAX4:    File is not on disk



			      CIS     JSYS 141

   Clears the software interrupt system for the current process.   Clears
   all interrupts in progress and all waiting interrupts.

   RETURNS     +1:  always



			     CLOSF     JSYS 22

   Closes a specific file or all files.

   ACCEPTS IN AC1:  B0(CO%NRJ) do not release the JFN.

		    B6(CZ%ABT) abort  any  output  operations	currently
			       being  done.   Close  the  file but do not
			       perform any  cleanup  operations  normally
			       associated   with  closing  a  file.   (If
			       output is to a magnetic tape, for example,
			       do  not	output remaining buffers or write
			       tape marks.  If output is to a disk  file,
			       do not change the end-of-file pointer.) If
			       output is to a new disk file that has  not
			       been	closed	  (and	  is	therefore
			       nonexistent), the file is closed and  then
			       expunged.

		    B7(CZ%NUD) do not update the copy of the directory on
			       the  disk.   (Refer to CF%NUD of the CHFDB
			       call description for further information.)

		    B18-35     JFN of the file being closed
		    (CO%JFN)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   If AC1 contains -1, all files (and all JFNs) at or below this  process
   (with  the exception of the primary I/O files and files that cannot be
   closed by this process) are closed.	This action is identical to  that
   taken  on  a  CLZFF call with AC1 containing the process handle .FHSLF
   (400000).

   The OPENF monitor call can be used to open a specific file.

   CLOSF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   CLSX1:    File is not open
   CLSX2:    File cannot be closed by this process
   CLSX3:    File still mapped
   CLSX4:    Device still active
   ENQX20:   Locked JFN cannot be closed
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged

   All output errors can occur.



			     CLZFF     JSYS 34

   Closes process' files.  Closes all files and/or releases all  JFNs  at
   and/or below a specified process.

   ACCEPTS IN AC1:   B0(CZ%NIF)  do  not   close   files   of	inferior.
				 processes

		     B1(CZ%NSF)  do not close files of this process.

		     B2(CZ%NRJ)  do not release JFNs.

		     B3(CZ%NCL)  do not close any  files;   only  release
				 nonopen JFNs

		     B4(CZ%UNR)  unrestrict files opened with  restricted
				 access   for	specified  process.   The
				 specified process must be the	same  as,
				 or  inferior  to,  the process executing
				 the call.

		     B5(CZ%ARJ)  wait until  file  can	be  closed,  then
				 close it, and release JFNs.

		     B6(CZ%ABT)  abort any  output  operations	currently
				 being	done.	Close the file but do not
				 perform any cleanup operations  normally
				 associated  with  closing  a  file  (for
				 example, do not output remaining buffers
				 or  write  tape  marks  if  output  to a
				 magnetic tape is aborted).  If output to
				 a new disk file that has not been closed
				 (file is nonexistent)	is  aborted,  the
				 file is closed and then expunged.

		     B7(CZ%NUD)  do not update the copy of the	directory
				 on  the  disk.   (Refer to CF%NUD of the

				 CHFDB	call  description   for   further
				 information.)

		     B18-35	 process handle
		     (CZ%PRH)

   RETURNS     +1:   always.  No action is taken if the call  is  in  any
		     way illegal.

   If AC1  contains  only  the	process  handle  .FHSLF,  the  action  is
   identical to that taken on a CLOSF call with AC1 containing -1.

   Generates an illegal instruction interrupt on error conditions below.

   CLZFF ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			    CNFIG%     JSYS 627
|
|  Returns configuration information  about  the  central  processor  and
|  operating  system environment for the system on which the monitor call
|  is executed.
|
|  ACCEPTS IN AC1:  function code
|
|	      AC2:  address of argument block
|
|  RETURNS     +1:  always
|
|  The available functions and their argument blocks are described below.
|
|	Code	Symbol	  Meaning
|
|	 0	.CFINF	  Return basic hardware and software information.
|
|			  Argument Block:
|
|			  0    .CFLEN	 Number   of	words	 returned
|					 (CF%WDP),,  length  of  argument
|					 block (CF%LOB)
|
|			  1    .CFIPR	 Type  of  processor.	 ID   for
|					 KL = .CFGKL(4)
|
|			  2    .CFISE	 CPU	    serial	  number,
|					 right-justified
|
|			  3    .CFIUC	 CPU  microcode  version  number,
|					 right justified

|			  4    .CFIHO	 CPU hardware options
|
|					 B0(CF%50Z)	Line power is  50
|							hertz.
|
|					 B1(CF%CHI)	Cache	       is
|							installed.
|
|					 B2(CF%CHN)	Channel  bit   in
|							the APRID word is
|							on.
|
|					 B3(CF%EKL)	CPU	is     an
|							extended KL10.
|
|					 B4(CF%MOS)	System	 has	a
|							master
|							oscillator.
|
|					 B5(CF%MCA)	System has  MCA25
|							pager cache.
|
|					 B6(CF%CH1)	Cache control bit
|							1.
|
|					 B7(CF%CH2)	Cache control bit
|							2.
|
|					 B8(CF%CI)	System has a CI.
|
|			  5    .CFIMO	 CPU microcode options
|
|					 B0(CF%T20)	TOPS-20    paging
|							implemented.
|
|					 B1(CF%EAD)	Microcode handles
|							extended
|							addresses.
|
|					 B2(CF%UCO)	Non-standard
|							microcode      is
|							loaded.
|
|			  6    .CFISO	 TOPS-20 static software options
|
|					 B0(CF%CFS)	CFS is installed.
|
|					 B1(CF%DCN)	DECnet	       is
|							installed.
|
|					 B2(CF%ARP)	ARPAnet        is
|							installed.
|
|			  7    .CFIVR	 TOPS-20 version number  obtained
|					 from location .JBVER.
|
|			  8    .CFILN	 Maximum  length  of  the  .CFINF
|					 argument block.
|
|	1	.CFCIN	  Return CFS information
|
|			  Argument Block:

|			  0    .CFLEN	 Number   of	words	 returned
|					 (CF%WDP),,  length  of  argument
|					 block (CF%LOB).
|
|			  1    .CFNCN	 Number   of   CFS   nodes    up,
|					 including the host system.
|
|			  2    .CFCDO	 CFS dynamic options
|
|					 B0(CF%CFR)	Host	      has
|							connected      to
|							another CFS  host
|							at least once.
|
|			  3    .CFCLN	 Maximum  length  of  the  .CFCIN
|					 argument block.
|
|	2      .CFCSE	  Return CI node number and serial number of each
|			  CFS  node.   The  numbers  are  returned  right
|			  justified in APRID format.  Bits 0-13  of  each
|			  word	are  reserved  for the future by DIGITAL.
|			  Information  will  be  returned  for	a   host,
|			  provided that the host is active and that there
|			  is valid information for the host.  Information
|			  for  the  first  host  will always be returned.
|			  The number  of  hosts  is  determined  by  word
|			  .CFNCN of the .CFCIN function.
|
|			  Argument Block:
|
|			  0    .CFLEN	 Number   of	words	 returned
|					 (CF%WDP),,  length  of  argument
|					 block (CF%LOB).
|
|			  1    .CFCS1	 CI node number (CF%CIN),, serial
|					 number of first host (CF%HSN).
|
|			  2		 CI node number (CF%CIN),, serial
|					 number of next host (CF%HSN).
|
|			  n    .CFCSn	 CI node number (CF%CIN),, serial
|					 number of last host (CF%HSN).
|
|	3	.CFCND	  Return node names of CFS hosts as 2-word  ASCIZ
|			  strings.   Information  will	be returned for a
|			  host provided that the host is active and  that
|			  there   is  valid  information  for  the  host.
|			  Information for the first host will  always  be
|			  returned.  The number of hosts is determined by
|			  word .CFNCN of the .CFCIN function.
|
|			  Argument Block:
|
|			  0    .CFNND	 Number   of	nodes	 returned
|					 (CF%NND),,  length  of  argument
|					 block (CF%LOB).
|
|			  1    .CFBP1	 Byte pointer to ASCIZ node  name
|					 of first host.
|
|			       .CFBP1+n  Start of area	where  node  name
|					 strings are placed.

|	4	.CFHSC	  Returns the information necessary to return the
|			  list	of HSC node names.  In the event that the
|			  argument block is not large enough, the  CFGBTS
|			  error  code  is  returned.   Since the argument
|			  block  must  be  long  enough  to  contain  all
|			  possible  HSCs,  it is suggested that it be set
|			  to the length C%SBLL3+1.
|
|			  Argument Block:
|
|			  0    .CFNHN	 Number   of	nodes	 returned
|					 (CF%NHN),,length     of    block
|					 (CF%LOB).
|
|			  1    .CFHP1	 Byte pointer to first node  name
|					 string
|
|			       .CFHP1+n  Start of an area  in  which  the
|					 monitor    placed    node   name
|					 strings.    These   are    ASCIZ
|					 strings   containing	the  node
|					 name.
|
|  Generates an illegal instruction interrupt on error conditions below.
|
|  CNFIG% ERROR MNEMONICS:
|
|  CFGBFC:   Function code out of range
|  CFGBTS:   Argument block too short
|  CFGIAB:   Invalid argument block address
|  CFGAAB:   Error accessing argument block
|  CFGINA:   Information not available for this function



			     COMND     JSYS 544

   Parses one field of a command that  is  either  typed  by  a  user  or
   contained in a file.  When this monitor call is used to read a command
   from a terminal, it provides the following features:

	1.  Allows the input of a command (including the guide words)  to
	    be given in abbreviated, recognition (ESC and CTRL/F), and/or
	    full input mode.

	2.  Allows the user to edit his input with  the  DELETE,  CTRL/U,
	    CTRL/W, and CTRL/R editing keys.

	3.  Allows fields of the command to be defaulted  if  an  ESC  or
	    CTRL/F  is typed at the beginning of any field, or if a field
	    is omitted entirely.

	4.  Allows a help message to be given if a question mark  (?)  is
	    typed at the beginning of any field.

	5.  Allows input of an indirect file (@file)  that  contains  the
	    fields for all or the remainder of the command.

	6.  Allows a recall of the correct portion of  the  last  command
	    (up  to  the  beginning  of  the  field  where  an	error was
	    detected) if the next command line begins with  CTRL/H.   The
	    correct  portion  of the command is retyped, and the user can
	    then continue typing from that point.

	7.  Allows input of a line to be continued onto the next line  if
	    the  user types a hyphen (-) immediately preceding a carriage
	    return.  (The carriage return is  invisible  to  the  program
	    executing  the  COMND call, although it is stored in the text
	    buffer.) The user can type the hyphen while he  is	typing	a
	    comment.  The comment is then continued onto the next line.

	    A hyphen not immediately followed by  a  carriage  return  is
	    parsed as ordinary text.

   The COMND call allows comments in the command line.	 A  command  line
   can	contain  a  comment  if  the  field  before  the comment has been
   terminated and the comment is preceded by an exclamation  point  or	a
   semicolon.	If  the  comment  starts with an exclamation point, COMND
   ignores all text between the exclamation point and either the  end  of
   the	line or the next exclamation point.  If the comment starts with a
   semicolon, COMND ignores all text on the remainder of the line.

   A command line can contain the name of an  indirect	command  file  so
   long  as  the  file	name comes at the beginning of a field.  It must,
   however, be the last item on the line, and its contents must  complete
   the	command.   The	user must follow the name of the indirect command
   file (after any recognition is performed) with a carriage return.

   If a carriage return does not end the command line  immediately  after
   the	name of the indirect command file, the system outputs the message
   ?INDIRECT FILE NOT CONFIRMED.  Also, if the user types a question mark
   (instead  of  the  file  specification  of the indirect file) after he
   types the at-sign (@) character, the message FILESPEC OF INDIRECT FILE
   is output.

   If the indirect file itself contains an  ESC  or  a	carriage  return,
   COMND  treats  them	as  spaces.   COMND  places  the  contents of the
   indirect file in the text buffer, but does not  display  them  on  the
   user's terminal.

   As the user types his command, the characters are placed in a  command
   text  buffer.   This  buffer can also include the command line prompt.
   Several byte pointers and counts reflect  the  current  state  of  the
   parsing of the command.  These pointers and counts are as follows:

	1.  Byte pointer to the beginning of  the  prompting-text  buffer
	    (.CMRTY).  This pointer is also called the CTRL/R buffer byte
	    pointer, since a CTRL/R causes COMND to redisplay the  prompt
	    contained  in this buffer, along with anything the user typed
	    on the command line before he typed the CTRL/R.

	    The buffer that contains the prompt need  not  be  contiguous
	    with the buffer containing the remainder of the command line.

	2.  Byte pointer to the beginning of the buffer that contains the
	    user's  input  (.CMBFP).  This is the limit back to which the
	    user can edit.

	3.  Byte pointer to the  beginning  of	the  next  field  of  the
	    command line to be parsed (.CMPTR).

	4.  Count of  the  space  remaining  in  the  text  input  buffer
	    (.CMCNT).

	5.  Count of the number of characters in the buffer that have not
	    yet been parsed (.CMINC).

   The illustration below is a logical arrangement of the  byte  pointers
   and	counts.   Remember  that  the  prompting  text buffer need not be
   adjacent to the text buffer.

						       .CMCNT

 
		!=======================================================!
		!	 !		!		  !		!
		!	 !		!		  !		!
		!=======================================================!
		^	 ^		^
		!	 !		!
		!	 !		!	       .CMINC
		!	 !		!
		!	 !		!
		!	 .CMBFP 	.CMPTR
		.CMRTY

 
		These byte pointers and other information  are	contained
		in  a  command	state  block whose address is given as an
		argument to the COMND monitor call.  The .CMINI  function
		initializes these pointers.

		COMND Parses  a  command  line	field  by  field.   COMND
		substitutes  default  values  for  missing  fields in the
		command line when the user types a carriage return,  ESC,
		CTRL/F,  or  question  mark.  These characters are called
		action characters because they cause the system to act on
		the  command  as  typed  so  far.   Other characters that
		terminate a field are space, tab, slash, comma,  and  any
		other nonalphanumeric character.

		Normally, parsing does not begin, and the COMND call does
		not  return  control  to  the  program,  until	an action
		character is typed.  But if  B8(CM%WKF)  is  on  in  word
		.CMFLG when the COMND call executes, parsing begins after
		each field is terminated.

		A program parses a command line by repeated COMND  calls.
		Each call specifies the type of field the program expects
		to be parsed.  The  program  supplies  this  information,
		placing  a  function  code  and  any  data needed for the
		function in a function descriptor block.   On  successful
		completion of each call, the byte pointers and counts are
		updated in the command state block, and any data obtained
		for the field is returned.

		The program executing the COMND call should not reset the
		byte  pointers	in  the  command  state  block	after  it
		completes parsing a command line.  It should set  up  the
		command  state	block  before  it  begins  to  parse  any
		commands, and then use the .CMINI function to  initialize
		the command state block before parsing each command line.
		This  allows  the  .CMINI  function  to  use  the  CTRL/H
		error-recovery feature.

		If the program resets the  pointers  and  counts  in  the
		command state block, instead of using the .CMINI function
		to do so, use of the  CTRL/H  feature  is  not	possible.
		When  a  CTRL/H  is  typed,  the  .CMINI  function allows
		recovery from an error in the last command  only  if  the
		following are both true:

		1.  The pointer to the	beginning  of  the  user's  input
		    (.CMBFP) and the pointer to the beginning of the next
		    field to be parsed (.CMPTR) are not equal.

		2.  The last character parsed in the previous command  is
		    not an end-of-line character.

		The COMND call allows the user to delete his typed  input
		with  the  DELETE, CTRL/W, and CTRL/U keys without regard
		to field boundaries.  When the user  deletes  part  of	a
		field  that  has  already  been  parsed,  the  COMND call
		returns to  the  program  with	B3(CM%RPT)  set  in  word
		.CMFLG,  or  the program resumes execution at the reparse
		address contained in word .CMFLG  of  the  command  state
		block.	 This  address should be the place in the program
		at which parsing of the command  line  begins.	 If  this
		address  is zero, the program must test AC1 for this bit,
		and reparse the  command  line	from  the  beginning,  if
		necessary.   (See  the	description of word .CMFLG of the
		command state block.)

		The calling sequence to the COMND call is as follows:

   ACCEPTS IN AC1:  address of the command state block

	      AC2:  address of the first alternative function  descriptor
		    block

   RETURNS     +1:  always (unless a reparse is needed and the right half
		    of .CMFLG is nonzero), with
		    AC1 containing flags in the left half and the address
			of  the  command  state  block in the right half.
			The flags are copied  from  word  .CMFLG  in  the
			command state block.
		    AC2 containing either the data obtained for the field
			or  a  monitor call error code if the field could
			not be parsed (CM%NOP is on in AC1).
		    AC3 containing in the left half the  address  of  the
			function  descriptor block given in the call, and
			in the right half the  address	of  the  function
			descriptor  block  actually  used.  Note that the
			contents of the right half identify uniquely  the
			type of atom that was parsed.

   The format of the command state block is shown below.

 
	   0			    17 18			35
	  !=======================================================!
   .CMFLG !	    Flag Bits	      ! Reparse Dispatch Address  !
	  !-------------------------------------------------------!
   .CMIOJ !	    Input JFN	      !        Output JFN	  !
	  !-------------------------------------------------------!
   .CMRTY !		 Byte Pointer to CTRL/R Text		  !
	  !-------------------------------------------------------!
   .CMBFP !	     Byte Pointer to Start of Text Buffer	  !

	  !-------------------------------------------------------!
   .CMPTR !	   Byte Pointer to Next Input To Be Parsed	  !
	  !-------------------------------------------------------!
   .CMCNT !		Count of Space Left in Buffer		  !
	  !-------------------------------------------------------!
   .CMINC !	   Count of Unparsed Characters in Buffer	  !
	  !-------------------------------------------------------!
   .CMABP !		 Byte Pointer to Atom Buffer		  !
	  !-------------------------------------------------------!
   .CMABC !		     Size of Atom Buffer		  !
	  !-------------------------------------------------------!
   .CMGJB !	       Address of GTJFN Argument Block		  !
	  !=======================================================!

 
			       Command State Block

   Word      Symbol    Meaning

     0	     .CMFLG    Flag bits  in  the  left  half,	and  the  reparse
		       dispatch  address  in  the  right half.	Some flag
		       bits can be set by the program executing the COMND
		       call;   others  can be set by the COMND call after
		       its execution.  The bits that can be  set  by  the
		       program	are described following the Command State
		       Block description.

		       The reparse dispatch address is	the  location  to
		       which control is transferred when a reparse of the
		       command is needed.  This happens when a user edits
		       characters in a field that was already parsed.

		       If  this  field	is  zero,  the	COMND  call  sets
		       B3(CM%RPT)  in  the  left  half	of this word, and
		       gives the +1 return when a reparse is needed.  The
		       program must then test the left half of AC1 to see
		       if CM%RPT is set.  If it is, the user must reenter
		       the  code  that	parses	the  first  field  of the
		       command.

		       The code at the reparse	dispatch  address  should
		       initialize  the	program's  state  to  what it was
		       after   the   last    .CMINI    function.     This
		       initialization  should include resetting the stack
		       pointer, closing and releasing any  JFNs  acquired
		       since  the  last .CMINI function, and transferring
		       control to the code immediately following the last
		       .CMINI function call.

     1	     .CMIOJ    Input JFN in the left half, and output JFN in  the
		       right half.  These designators identify the source
		       for the input of the command and  the  destination
		       for   the   output   of	 the  typescript.   These
		       designators are usually	.PRIIN	(for  input)  and
		       .PRIOU (for output).

     2	     .CMRTY    Byte pointer to the  beginning  of  the	prompting
		       text.

     3	     .CMBFP    Byte pointer to the beginning of the user's input.
		       The user cannot edit back past this pointer.

     4	     .CMPTR    Byte pointer to the beginning of the next field to

		       be parsed.

     5	     .CMCNT    Count of the space remaining in the  buffer  after
		       the .CMPTR pointer.

     6	     .CMINC    Count of the number of unparsed characters in  the
		       buffer after the .CMPTR pointer.

     7	     .CMABP    Byte pointer  to  the  atom  buffer,  a	temporary
		       storage buffer that contains the last field parsed
		       by the COMND call.  The terminator of the field is
		       not  placed  in	this  buffer.  The atom buffer is
		       terminated with a null.

    10	     .CMABC    The size of the atom buffer in  bytes.	The  atom
		       buffer  should be at least as large as the largest
		       field the program must parse.

    11	     .CMGJB    Address of a GTJFN  argument  block.   This  block
		       must  be at least 16(octal) words long and must be
		       writable.   If  a  longer  GTJFN  block	is  being
		       reserved,  the  count  in  the  right half of word
		       .GJF2 of the GTJFN argument block must be  greater
		       than four.

		       The GTJFN block is filled in  by  the  COMND  call
		       with arguments for the GTJFN call if the specified
		       COMND function requests a JFN  (functions  .CMIFI,
		       .CMOFI,	and  .CMFIL).  The user should store data
		       in this block on the .CMFIL function only.

   The flag bits that can be set by the user in the  left  half  of  word
   .CMFLG  in  the  Command  State Block are described below.  These bits
   apply to the parsing of the entire command and are preserved by  COMND
   after  execution.   See  the  end of the COMND JSYS discussion for the
   bits that are returned by COMND in the left half of word .CMFLG.

 
		   Bits Supplied in State Block on COMND Call

      Bit      Symbol	    Meaning

       6       CM%RAI	    Convert lowercase input to uppercase.

       7       CM%XIF	    Do not recognize the at-sign (@) character as
			    designating   an   indirect   file;   instead
			    consider   the    character    as	 ordinary
			    punctuation.   A  program  sets  this  bit to
			    prevent the input of an indirect file.

       8       CM%WKF	    Begin parsing after each field is  terminated
			    instead  of  only  after  an action character
			    (carriage return, ESC, CTRL/F, question mark)
			    is typed.  A program sets this bit if it must
			    change terminal characteristics in the middle
			    of a command.  Turning off echoing during the
			    input of a password is an example  of  a  use
			    for this bit.

			    Use of this bit is not recommended,  however,
			    because  terminal  wakeup  occurs  after each
			    field  is  terminated,   thereby   increasing
			    system overhead.

			    The recommended method of  changing  terminal
			    characteristics  within a command is to input
			    the    field    requiring	  the	  special
			    characteristic  on the next line with its own
			    prompt.   For  example,  if  a   program   is
			    accepting  a  password,  it  should  turn off
			    echoing after the .CMCFM function of the main
			    command  and  perform  the .CMINI function to
			    type the prompt requesting a password on  the
			    next line.

   The format of the function descriptor block is shown below.

 
	  0	      8 9	   17 18		       35
	 !=======================================================!
	 !  function   !  function   ! address of next function  !
   .CMFNP!    code     !    flags    !	   descriptor block	 !
	 !-------------------------------------------------------!
   .CMDAT!		Data for specific function		 !
	 !-------------------------------------------------------!
   .CMHLP!	    Byte pointer to help text for field 	 !
	 !-------------------------------------------------------!
   .CMDEF!	  Byte pointer to default string for field	 !
	 !-------------------------------------------------------!
   .CMBRK!	       Address of 4-word break mask		 !
	 !=======================================================!

 
			    Function Descriptor Block

   Word      Symbol		      Meaning

     0	     .CMFNP    Function  code  and  pointer  to   next	 function
		       descriptor block.
		       B0-8(CM%FNC)    Function code
		       B9-17(CM%FFL)   Function-specific flags
		       B18-35(CM%LST)  Address	of  the   next	 function
				       descriptor  block, or zero if this
				       is the  last  function  descriptor
				       block.

     1	     .CMDAT    Data for the specific function, if any.

     2	     .CMHLP    Byte pointer to the  help  text	for  this  field.
		       This  word  can	be  zero  if  the  program is not
		       supplying its own help text.  CM%HPP must  be  set
		       (in word 0) in order for this pointer to be used.

     3	     .CMDEF    Byte pointer to the default string for this field.
		       This  word  can	be  zero  if  the  program is not
		       supplying its own default string.  CM%DPP must  be
		       on in word 0 in order for this pointer to be used.

     4	     .CMBRK    Address of a  4-word  break  mask  that	specifies
		       which  characters  terminate a field.  Word .CMBRK
		       is ignored unless CM%BRK (B13) is on in word 0  of
		       the function descriptor block.

   The individual words in the function descriptor block are described in
   the following paragraphs.

   Words .CMFNP and .CMDAT of the function descriptor block

   Word .CMFNP contains the function code for the field to be parsed, and
   word  .CMDAT  contains  any	additional data needed for that function.
   The function codes, along with any required data  for  the  functions,
   are described below.

   Code      Symbol    Meaning

     0	     .CMKEY    Parse a keyword, such as  a  command  name.   Word
		       .CMDAT  contains  the  address of a keyword symbol
		       table.  The keyword table must be in  alphabetical
		       order.  See the TBLUK monitor call description for
		       more information on  the  format  of  the  keyword
		       table.

		       The table entries point to argument  blocks.   The
		       right  half  of	the first word of each such block
		       contains the following bits, which can be set when
		       B0-6  of  that first word are off and B7(CM%FW) is
		       set:

		       B35(CM%INV)    Suppress this keyword in	the  list
				      output on a question-mark (?).  The
				      program can set this bit to include
				      entries in the table that should be
				      output as part  of  the  help  text
				      because	they  are  not	preferred
				      keywords.  This bit  is  also  used
				      with  the  CM%ABR bit to prevent an
				      abbreviation from being output when
				      a question mark (?) is typed.

				      This bit can be set,  for  example,
				      to  allow  the  keyword  LIST to be
				      valid, even  though  the	preferred
				      keyword  may  be	PRINT.	 The LIST
				      keyword is not listed in the output
				      given  when  a question mark (?) is
				      typed.

		       B34(CM%NOR)    Do not recognize this keyword  even
				      if  an  exact match is typed by the
				      user and suppress  its  listing  in
				      the  list  output  when  a question
				      mark (?) is typed.  (Refer  to  the
				      TBLUK  call  description	for  more
				      information on using this bit.)

		       B33(CM%ABR)    Consider	this  keyword	a   valid
				      abbreviation  for  another entry in
				      the table.  The right half of  this
				      table  entry  points to the command
				      table  entry  of	the  keyword  for
				      which this is an abbreviation.  The
				      program can set this bit to include
				      entries  in the table that are less
				      than     the     minimum	   unique
				      abbreviation.

				      For example, this bit can be set to
				      include the entry ST (for START) in
				      the table.  If the user then  types
				      ST  as  a keyword, COMND accepts it
				      as a valid abbreviation  for  START

				      even  though  there  may	be  other
				      keywords beginning with ST.

				      To  suppress  the  output  of  this
				      abbreviation   in   the	list   of
				      keywords	output	when  a  question
				      mark (?) is typed, the program must
				      also set the CM%INV bit.

		       On a successful return, AC2 contains  the  address
		       of the table entry where the keyword was found.

		       Note that  keywords  in	the  table  that  contain
		       trailing spaces (such as FORTRAN literals) are not
		       recognized.

     1	     .CMNUM    Parse a number.	Word .CMDAT  contains  the  radix
		       (from  2  to  10)  of the number.  On a successful
		       return, AC2 contains the number.

     2	     .CMNOI    Parse a guide word string, but do  not  return  an
		       error  if no guide word is input.  Guide words are
		       output if the user terminated the  previous  field
		       with  ESC.   Guide  words  are not output, nor can
		       they be input, if the user has caused parsing into
		       the next field.

		       For COMND to input a guide word,  the  guide  word
		       field  must  be	delimited  by  parentheses.  Word
		       .CMDAT contains a byte pointer to an ASCIZ  string
		       that  contains  the  guide word.  This string does
		       not contain parentheses.

		       An error is returned only if a guide word is input
		       that  does not match the one expected by the COMND
		       call.

     3	     .CMSWI    Parse a switch.	A switch field must begin with	a
		       slash, and can end with a colon or any legal field
		       terminator.

		       Word .CMDAT  contains  the  address  of	a  switch
		       keyword symbol table.  (Refer to the TBLUK monitor
		       call description for the  format  of  the  table.)
		       Switch  entries	in  the  keyword  table  must not
		       contain a slash.   If  switch  requires	a  value,
		       however, its entry must end with a colon.

		       The data bits CM%INV, CM%NOR, and CM%ABR,  defined
		       for  the  .CMKEY function, can also be set on this
		       function.

		       On a successful return, AC2 contains  the  address
		       of  the	table  entry where the switch keyword was
		       found.

     4	     .CMIFI    Parse an input file specification.  This  function
		       causes  the  COMND  call  to execute a GTJFN call,
		       which attempts to parse the specification  for  an
		       existing file using no default fields.  Hyphens in
		       the file specification are treated as alphanumeric
		       characters.

		       The .CMGJB address (word 11 in the  command  state
		       block)  must  be  supplied,  but  the  GTJFN block
		       should be empty.  Data stored in the  GTJFN  block
		       is  overwritten by the COMND JSYS, and GTJFN flags
		       are set in the GTJFN block.

		       On a  successful  return,  AC2  contains  the  JFN
		       assigned.

		       See note following .CMFIL function.

     5	     .CMOFI    Parse an output file specification.  This function
		       causes  the  COMND  call  to execute a GTJFN call,
		       which parses the specification for either a new or
		       an  existing  file.  The default generation number
		       is the generation number of the existing file plus
		       1.   The  .CMGJB address must be supplied, but the
		       GTJFN block should be empty.  (Data stored in  the
		       block  will  be	overwritten  by  the  COMND JSYS.
		       Also,  certain  GTJFN  flags  are   set.)   On	a
		       successful  return, AC2 contains the JFN assigned.
		       Hyphens are treated as alphanumeric characters for
		       this function.

		       See note following .CMFIL function.

     6	     .CMFIL    Parse a general	(arbitrary)  file  specification.
		       This  function  causes the COMND call to execute a
		       GTJFN to attempt to parse  the  specification  for
		       the  file.   The  .CMGJB address must be supplied,
		       but data stored in  certain  words  of  the  GTJFN
		       block is overwritten by the COMND JSYS and certain
		       GTJFN flags  are  set  (see  note  below).   On	a
		       successful  return, AC2 contains the JFN assigned.
		       Hyphens are treated as alphanumeric characters for
		       this function.

		       Note that portions of  the  GTJFN  block  used  by
		       functions   .CMOFI,   .CMIFI,   and   .CMFIL   are
		       controlled by COMND.   The  following  list  shows
		       which  words  are  under  the control of COMND and
		       which words are under the control of the user:

		       GTJFN	  Controlled	    Characteristics
		       Word(s)	  by

		       .GJGEN	  COMND     1.	.CMOFI sets flags GJ%FOU,
						GJ%MSG,  and  GJ%XTN  and
						clears all other flags.

					    2.	.CMIFI sets flags GJ%OLD,
						and GJ%XTN and clears all
						other flags.

					    3.	.GMOFI	and  .GMIFI  zero
						the  right  half  of word
						.GJGEN.

					    4.	.CMFIL sets  flag  GJ%XTN
						and clears GJ%CFM.

		       .GJSRC	  COMND 	None

		       .GJDEV -
		       .GJJFN	  COMND/
				  USER		Functions   .CMIFI    AND
						.CMOFI give COMND control
						of these  words.   .CMFIL
						gives the user control of
						these words.

		       .GJF2 -
		       .GJBFP	  COMND 	None

		       .GJATR	  USER		Function .CMFIL gives the
						user   control	 of  this
						word.  .GJATR is not used
						for other functions.

     7	     .CMFLD    Parse an arbitrary field.  This function is useful
		       for fields not normally handled by the COMND call.
		       The   input,   as   delimited   by    the    first
		       nonalphanumeric character, is copied into the atom
		       buffer;	the delimiter is not  copied.	Note  the
		       following:

		       1.  This function will parse a null field

		       2.  Hyphens are treated as alphanumeric characters
			   for this function

		       3.  No validation is performed (such  as  filename
			   validation)

		       4.  No standard help  message  is  available  (see
			   description of word .CMHLP, below)

		       5.  The FLDBK. and BRMSK. macros can be	used  for
			   including  other characters in the field (such
			   as the asterisk (*) character)

    10	     .CMCFM    Confirm.  This function	waits  for  the  user  to
		       confirm	the  command  with  a carriage return and
		       should be used at the end  of  parsing  a  command
		       line.

    11	     .CMDIR    Parse a	directory  name.   Login  and  files-only
		       directories  are  allowed.   Word  .CMDAT contains
		       data  bits  for	this  function.   The	currently
		       defined bit is as follows:

		       B0(CM%DWC)     Allow  wildcard  characters  to  be
				      typed in a directory name.

				      On   a   successful   return,   AC2
				      contains	 the   36-bit	directory
				      number.

    12	     .CMUSR    Parse a user name.   Only  login  directories  are
		       allowed.  On a successful return, AC2 contains the
		       36-bit user number.

    13	     .CMCMA    Parse a comma.  This  function  sets  B1(CM%NOP-no
		       parse)  in  word .CMFLG of the command state block
		       and returns an error if a comma is  not	the  next
		       item  in  the  input.  Blanks can appear on either

		       side of the comma.  This function  is  useful  for
		       parsing a list of arguments.

    14	     .CMINI    Initialize the command line by setting up internal
		       monitor	pointers, typing the prompt, and checking
		       to see if the user typed  CTRL/H.   This  function
		       should  be  used  before  beginning  of	parsing a
		       command line, but not  before  reparsing  a  line.
		       Reinitializing the command line with this function
		       before  starting  to  reparse  the  command   line
		       prevents the use of the CTRL/H feature.

		       To use this function, the  user	first  moves  the
		       needed  data into the command state block and then
		       issues .CMINI.  If an error occurs while a line is
		       being  parsed, .CMINI is issued again by the COMND
		       JSYS to reinitialize the line.

		       For the second and all subsequent .CMINI  function
		       calls  for a given line, the user should not alter
		       the byte pointers  and  character  counts  in  the
		       command	state  block.  To do so would disable the
		       CTRL/H feature.	 This  feature	allows	the  user
		       program,  on parsing a bad atom, to print an error
		       message, reissue the prompt, and parse the command
		       line  again without forcing the user to retype the
		       entire line.

		       If .CMINI reads a CTRL/H character, .CMINI  resets
		       all  byte pointers and character counts except the
		       .CMINC count to their original state.  .CMINI sets
		       the  .CMINC  count  to the number of characters in
		       the buffer up to the bad atom.	These  characters
		       are  output  to	the  terminal  and  parsed again.
		       Control then passes to  the  reparse  address  (if
		       provided), and normal parsing resumes.  The effect
		       on the program is as if the  bad  atom  had  never
		       been typed.

    15	     .CMFLT    Parse a floating-point number.	On  a  successful
		       return, AC2 contains the floating-point number.

    16	     .CMDEV    Parse a device name.  A device name consists of up
		       to  six	alphanumeric  characters  terminated by a
		       colon (":").  On a successful return, AC2 contains
		       the device designator.

    17	     .CMTXT    Parse the input	text  up  to  the  next  carriage
		       return,	place  the  text  in the atom buffer, and
		       return.	If an ESC or CTRL/F is typed,  it  causes
		       the  terminal bell to ring (because recognition is
		       not available with this function) and is otherwise
		       ignored.   If  a  question  mark  (?) is typed, an
		       appropriate response is given,  and  the  question
		       mark  (?)  is not included in the atom buffer.  (A
		       question mark can be included in the input text if
		       it is preceded by a CTRL/V.)

    20	     .CMTAD    Parse a date and/or time field  according  to  the
		       setting	of bits CM%IDA and CM%ITM.  The user must
		       input the field as  requested.	Any  date  format
		       allowed by the IDTIM call can be input.	If a date
		       is not input, it is  assumed  to  be  the  current

 
		      TOPS-20 MONITOR CALLS
				     (COMND)

 
		       date.  If a time is not input, it is assumed to be
		       00:00:01.  When both the date and time fields  are
		       input,  they  must  be  separated  by  one or more
		       spaces.	If the fields are input separately,  they
		       must  be  terminated  with  a  space  or  carriage
		       return.	Word .CMDAT contains  bits  in	the  left
		       half  and an address in the right half as data for
		       the function.  The bits are:

		       B0(CM%IDA) Parse a date
		       B1(CM%ITM) Parse a time
		       B2(CM%NCI) Do not convert the date and/or time  to
				  internal  format.   (Refer  to  Section
				  2.9.2.)

		       The address in the right half is the beginning  of
		       a  three-word block in the caller's address space.
		       On a successful return, this block  contains  data
		       returned  from the IDTNC call executed by COMND if
		       B2(CM%NCI) was on in the COMND call (if the  input
		       date  and/or time field was not to be converted to
		       internal format).  If B2(CM%NCI) was  off  in  the
		       COMND  call,  on a successful return, AC2 contains
		       the internal date and time format.

    21	     .CMQST    Parse a quoted string up to the terminating quote.
		       The  delimiters	for  the  string  must	be double
		       quotation marks and are not  copied  to	the  atom
		       buffer.	 A double quotation mark is input as part
		       of the string if two double quotation marks appear
		       together.   This  function  is useful if the legal
		       field terminators and the action characters are to
		       be  included  as part of a string.  The characters
		       ?, ESC, and  CTRL/F  are  not  treated  as  action
		       characters,  and are included in the string stored
		       in the atom buffer.  Carriage return is an invalid
		       character in a quoted string and causes B1(CM%NOP)
		       to be set on return.

    22	     .CMUQS    Parse  an  unquoted  string  up	to  one  of   the
		       specified  break characters.  Word .CMDAT contains
		       the  address  of  a  4-word  block  of  128  break
		       character mask bits.  (Refer to word .RDBRK of the
		       TEXTI call description for an explanation  of  the
		       mask.)  The  characters	scanned are not placed in
		       the atom buffer.  On return, .CMPTR is pointing to
		       the  break character.  This function is useful for
		       parsing a string with an arbitrary delimiter.  The
		       characters  ?,  ESC, and CTRL/F are not treated as
		       action characters (unless they  are  specified  in
		       the  mask)  and	can  be  included  in the string.
		       Carriage return can also be included if it is  not
		       one of the specified break characters.

    23	     .CMTOK    Parse the  input  and  compare  it  with  a  given
		       string.	 Word .CMDAT contains the byte pointer to
		       the given string.  This function  sets  B1(CM%NOP)
		       in  word  .CMFLG  of  the  command state block and
		       returns if the next input characters do not  match
		       the given string.  Leading blanks in the input are
		       ignored.  This  function  is  useful  for  parsing
		       single or multiple character operators (e.g., + or
		       **).

    24	     .CMNUX    Parse  a  number  and  terminate  on   the   first
		       nonnumeric  character.	Word  .CMDAT contains the
		       radix  (from  2	to  10)  of  the  number.   On	a
		       successful  return, AC2 contains the number.  This
		       function is useful for parsing a number	that  may
		       not  be	terminated with a nonalphabetic character
		       (e.g., 100PRINT FILEA).

		       Note that nonnumeric identifiers can begin with	a
		       digit  (for example, 1SMITH as a user name).  When
		       a nonnumeric identifier and  a  number  appear  as
		       alternates  for a field, the order of the function
		       descriptor  blocks  is  important.    The   .CMNUX
		       function,  if  given first, would accept the digit
		       in the nonnumeric identifier  as  a  valid  number
		       instead	 of  as  the  beginning  character  of	a
		       nonnumeric identifier.

    25	     .CMACT    Parse an account string.  The input, as	delimited
		       by  the first nonalphanumeric character, is copied
		       into  the  atom	buffer;   the  delimiter  is  not
		       copied.	 No  verification is performed nor is any
		       standard help message available.   The  length  of
		       the  string  is	checked,  and  if  it  exceeds 39
		       characters, an error is generated.

    26	     .CMNOD    Parse a network node name.  A node  name  consists
		       of up to six alphanumeric characters followed by 2
		       colons ("::").  The node name must begin  with  an
		       alphabetic  character.	Lowercase  characters are
		       converted to uppercase characters.  The node  name
		       is copied into the atom buffer without the colons.

   In addition to the function code in bits  0-8  (CM%FNC),  .CMFNP  also
   contains  function-specific	flag  bits in bits 9-17 (CM%FFL), and the
   address of another function descriptor block in bits 18-35 (CM%LST).

   The flag bits that can be set in bits 9-17 (CM%FFL) are as follows:

   Bit	     Symbol    Meaning

|   11	     CM%NOC    Indicates  that	a  semicolon  does  not  begin	a
|		       full-line  comment and instead is matched with the
|		       specified  function  in	the  function  descriptor
|		       block.	If  this  bit  is  not set, the semicolon
|		       begins a full line comment.

    12	     CM%NSF    Indicates that a suffix is optional.  This bit  is
		       meaningful   only   with  the  .CMDEV  and  .CMNOD
		       functions.  If this bit is not set, the suffix  is
		       required.

    13	     CM%BRK    Notifies COMND that word .CMBRK	of  the  function
		       descriptor  block  contains  a pointer to a 4-word
		       break mask.  See description of	word  .CMBRK  for
		       more details.

    14	     CM%PO     The field is to be parsed only,	and  the  field's
		       existence   is  not  to	be  verified.	This  bit
		       currently applies to the .CMDEV,  .CMDIR,  .CMNOD,
		       and  .CMUSR  functions  and  is	ignored  for  the
		       remaining  functions.   On  return,   COMND   sets
		       B1(CM%NOP-no parse) only if the field typed is not

		       in the correct syntax.  Also, data returned in AC2
		       may not be correct.

    15	     CM%HPP    A byte pointer to a program-supplied help  message
		       for this field is given in word 2 (.CMHLP) of this
		       function descriptor block.

    16	     CM%DPP    A  byte	pointer  to  a	program-supplied  default
		       string  for this field is given in word 3 (.CMDEF)
		       of this function descriptor block.

    17	     CM%SDH    The output of the default help message  is  to  be
		       suppressed  if  the  user  types  a question mark.
		       (See below for the default messages.)

   The address of another function descriptor block can be given in  bits
   18-35  (CM%LST) of the .CMFNP word.	The use of this second descriptor
   block is described below.

   Usually one COMND call is executed for  each  field	in  the  command.
   However,  for some fields, more than one type of input may be possible
   (e.g., after a keyword field, the next field could be a  switch  or	a
   filename  field).   In  these cases, all the possibilities for a field
   must be tried in an order selected to test unambiguous cases first.

   When the COMND call	cannot	parse  the  field  as  indicated  by  the
   function code, it does one of two things:

	1.  It sets the current pointer and counts  such  that	the  next
	    call  will	attempt  to  parse the same input over again.  It
	    then returns with B1(CM%NOP) set in  the  left  half  of  the
	    .CMFLG  word in the command state block.  The caller can then
	    issue another COMND call  with  a  function  code  indicating
	    another  of the possible fields.  After the execution of each
	    call, the caller should test the CM%NOP flag to see that  the
	    field was parsed successfully.

	2.  If an address of another function descriptor block	is  given
	    in	CM%LST,  the  COMND  call  moves to this descriptor block
	    automatically and attempts to parse the field as indicated by
	    the function code contained in B0-8(CM%FNC) in word .CMFNP of
	    that block.  If the COMND call fails to parse the field using
	    this  new function code, it moves to a third descriptor block
	    if one is given.  This sequence continues  until  either  the
	    field  is  successfully  parsed  or  the  end of the chain of
	    function blocks is reached.  Upon  completion  of  the  COMND
	    call,  AC3	contains  the  addresses  of  the  first and last
	    function blocks used.

   By specifying a chained list of function blocks, the program can  have
   the	COMND  call  automatically  check all possible alternatives for a
   field and not have  to  issue  a  separate  call  for  each	one.   In
   addition,  if  the user types a question mark, a list is output of all
   the alternatives for the field as indicated by the  list  of  function
   descriptor blocks.

   Word .CMHLP of the function descriptor block

   This word contains a byte pointer to  a  program-supplied  help  text.
   The	COMND  call  outputs  this help if the user types a question mark
   when entering a command field.  Bit 15(CM%HPP) must be set in  word	0
   (.CMFNP) of the function descriptor block for this pointer to be used.

   If  B17(CM%SDH)  is	set  in  this  word,  COMND  outputs   only   the
   program-supplied  message.	If  B17(CM%SDH) is not set, COMND appends
   the default help message to the program-supplied message, and  outputs
   them both.

   If .CMHLP is zero, COMND outputs only the default message.

   The default help message depends on the particular function being used
   to  parse  the  current  field.  The following table lists the default
   help message for each function available in the COMND call.

			      Default Help Messages

   Function				     Message

   .CMKEY (keyword)	    one  of  the  following   followed	 by   the
			    alphabetical  list of valid keywords.  If the
			    user types a question mark in the  middle  of
			    the   field,   only  the  keywords	that  can
			    possibly match the field as  currently  typed
			    are output.  If no keyword can possibly match
			    the  currently  typed  field,  the	following
			    message   is  output:   keyword  (no  defined
			    keywords match this input).

			    If there  is  only	1  keyword,  the  keyword
			    becomes the HELP message.

   .CMNUM (number)	    The help message output depends on the  radix
			    specified  in .CMDAT in the descriptor block.
			    If the radix is octal, the	help  message  is
			    octal  number.   If the radix is decimal, the
			    help message is decimal number.  If the radix
			    is	any  other  radix,  the help message is a
			    number in base nn where nn is the radix.

   .CMNOI (guide word)	    None

   .CMSWI (switch)	    one  of  the  following   followed	 by   the
			    alphabetical  list	of valid switch keywords.
			    The same rules apply as for .CMKEY	function,
			    above.

   .CMIFI (input file)	    The help  message	output	 depends  on  the
   .CMOFI (output file)     settings of certain bits in the  GTJFN  call.
   .CMFIL (any file)	    If bit GJ%OLD is off and bit  GJ%FOU  is  on,
			    the   help	 message   is	output	filespec.
			    Otherwise,	the   help   message   is   input
			    filespec.

   .CMFLD (any field)	    None

   .CMCFM (confirm)	    confirm with carriage return

   .CMDIR (directory)	    directory name

   .CMUSR (user)	    user name

   .CMCMA (comma)	    comma

   .CMINI (initialize)	    None

   .CMFLT (floating point)  number

   .CMDEV (device)	    device name

   .CMTXT (text)	    text string

   .CMTAD (date)	    The help message depends on the bits  set  in
			    .CMDAT in the descriptor block.  If CM%IDA is
			    set, the help message is date.  If CM%ITM  is
			    set,  the  help message is time.  If both are
			    set, the help message is date and time.

   .CMQST (quoted)	    Quoted string

   .CMUQS (unquoted)	    Unquoted string if "?" is a break  character,
			    otherwise none

   .CMTOK (token)	    None

   .CMNUX (number)	    Same as .CMNUM

   .CMACT (account)	    None

   .CMNOD (node)	    node name

 
   Word .CMDEF of the function descriptor block

   This word contains a byte pointer to the ASCIZ string to  be  used  as
   the	default  for  this  field.   For  this pointer to be used, bit 16
   (CM%DPP) must be set in word 0 (.CMFNP) of the descriptor block.   The
   string  is  output  to  the destination, as well as copied to the text
   buffer, if the user types an ESC  or  CTRL/F  as  the  first  nonblank
   character  in  the  field.	If  the user types a carriage return, the
   string is copied to	the  atom  buffer,  but  is  not  output  to  the
   destination.

   When the caller supplies a list of  function  descriptor  blocks,  the
   byte  pointer  for  the  default  string must be included in the first
   block.  The CM%DPP bit and the pointer  for	the  default  string  are
   ignored  when  they appear in subsequent blocks.  However, the default
   string can be worded so that it applies  to	any  of  the  alternative
   fields.   The  effect  is  the same as if the user had typed the given
   string.

   Defaults for fields of a file specification can also be supplied  with
   the	.CMFIL	function.  If both the byte pointer to the default string
   and the JFN defaults have been provided, the  COMND	default  is  used
   first, and then, if necessary, the GTJFN defaults are used.

 
				    NOTE

		  The  function  descriptor  block,  whose
		  address  is  given in AC2, can be set up
		  by the FLDDB. and FLDBK. macros  defined
		  in  MACSYM.	(See  the end of the COMND
		  section  for	a  description	of   these
		  macros.)

 
   Word .CMBRK of the function descriptor block

   This word contains a pointer to  a  4-word  user-specified  mask  that
   determines  which characters constitute end of field.  The leftmost 32

   bits of each word correspond to a character	in  the  ASCII	collating
   sequence  (in  ascending  order).   If  the	bit  is  on  for  a given
   character, typing that character causes the COMND JSYS  to  treat  the
   characters  typed  so  far  as  a  separate	field  and  to parse them
   according to the function being used.  CM%BRK (B13) must be on in  the
   first  word	of  the  function descriptor block, or COMND ignores word
   .CMBRK.

   Ordinarily,	the  user  relies  on  COMND's	default  masks	 (varying
   according  to  function)  to  specify  which  characters signal end of
   field, and thus is not concerned with  word	.CMBRK	of  the  function
   block.   But  for  special  purposes such as allowing "*" or "%" to be
   part of a field, rather than a field delimiter, the user must  specify
   his own mask.  (In this example, the bits for "*" and "%" would be off
   in the mask word.) The user may inspect COMND's default masks (defined
   in MONSYM) for help in designing a custom mask.

   The following is a list of the COMND functions that use masks:

	Mask		  COMND       Changeable
	Symbols 	  Function    by User

	KEYB0. - KEYB3.   .CMKEY      Yes
	DEVB0. - DEVB3.   .CMDEV      Yes (only if parse-only)
	FLDB0. - FLDB3.   .CMFLD      Yes
	EOLB0. - EOLB3.   .CMTXT      Yes
	KEYB0. - KEYB3.   .CMSWI      Yes
|	User-specified	  .CMTAD      Yes
	USRB0. - USRB3.   .CMUSR      No
	FILB0. - FILB3.   .CMFIL      No
	FILB0. - FILB3.   .CMIFI      No
	FILB0. - FILB3.   .CMOFI      No
	internal	  .CMNUM      No
	FILB0. - FILB3.   .CMDIR      No
	internal	  .CMFLT      No
	ACTB0. - ACTB3.   .CMACT      No

   COMND will ignore any break masks that  are	specified  for	functions
   that do not allow user-modified masks.

   Note that specifying a zero mask with CM%BRK set will  cause  the  TTY
   line buffer to fill up and generate an error.

   On a successful return, the COMND call returns flag bits in	the  left
   half  of  AC1  and preserves the address of the command state block in
   the right half of AC1.  These flag bits are copied from word .CMFLG in
   the command state block and are described as follows.

			   Bits Returned on COMND Call

   Bit	     Symbol    Meaning

    0	     CM%ESC    An ESC was typed by the user as the terminator for
		       this field.

    1	     CM%NOP    The field could not be parsed because it  did  not
		       conform	to  the  specified function(s).  An error
		       code is returned in AC2.  If this bit is set, bits
		       0  (CM%ESC) and 2 (CM%EOC) might not contain valid
		       information.

    2	     CM%EOC    The field was terminated with a carriage return.

    3	     CM%RPT    Characters already  parsed  need  to  be  reparsed
		       because	the  user edited them.	This bit does not
		       need to be examined if the program has supplied	a
		       reparse	dispatch  address  in  the  right half of
		       .CMFLG in the command state block.

    4	     CM%SWT    A switch field was terminated with a colon.   This
		       bit is on if the user either used recognition on a
		       switch that ends with a colon or typed a colon  at
		       the end of the switch.

    5	     CM%PFE    The previous field was terminated with an ESC.

|  When a field cannot be parsed, B1(CM%NOP) is set in AC1, and an  error
|  code  is  returned in AC2.  Note that if a list of function descriptor
   blocks is given and an error code is returned, the error is associated
   with  the function that had the largest atom buffer after all function
   blocks have been tried without a successful parse of the field.

   NPXAMB:   ambiguous
   NPXNSW:   not a switch - does not begin with slash
   NPXNOM:   does not match switch or keyword
   NPXNUL:   null switch or keyword given
   NPXINW:   invalid guide word
   NPXNC:    not confirmed
   NPXICN:   invalid character in number
   NPXIDT:   invalid device terminator
   NPXNQS:   not a quoted string - does not begin with double quote
   NPXNMT:   does not match token
   NPXNMD:   does not match directory or user name
   NPXCMA:   comma not given
   COMX18:   invalid character in node name
   COMX19:   too many characters in node name

				     Macros

	     Several macros (defined in MACSYM)  are  available  to  make
	     using  the  COMND JSYS more convenient.  These macros are as
	     follows:

	     FLDDB.(TYP,FLGS,DATA,HLPM,DEFM,LST)

	  where:

	  TYP  = function type
	  FLGS = function flags
	  DATA = function-specific data
	  HLPM = help message
	  DEFM = default text
	  LST  = additional invocations of the FLDDB. macro (used only if
		 multiple function blocks are required)

	  This macro generates function descriptor blocks for COMND.  For
	  example, the following code performs a .CMINI function:

	  MOVEI T1,STEBLK	     ;Get address of COMND state block
	  MOVEI T2,[FLDDB.(.CMINI)]  ;Get address of function block
	  COMND

	  The following code performs a .CMKEY	function  (assuming  that
	  the keyword table started at address CMDTAB:

	  MOVEI T1,STEBLK	     ;Get address of COMND state block

	  MOVEI T2,[FLDDB(.CMKEY,<CM%DPP+CM%HPP>,CMDTAB,
		   <help text>,<default text>)]
	  COMND

   FLDBK.(TYP,FLGS,DATA,HLPM,DEFM,BRKADR,LST)

	  This is exactly the same as FLDDB., except that a provision has
	  been	made  for  the	address  of  the  first  word of a 4-word
	  character mask (BRKADR).   This  version  is	for  use  when	a
	  user-specified character mask is required.

   BRMSK.(INI0,INI1,INI2,INI3,ALLOW,DISALLOW)

	  where:

	  INI0 = first word of character mask
	  INI1 =     second word of character mask
	  INI2 =     third word of character mask
	  INI3 =     fourth word of character mask
	  ALLOW =    characters to allow in the mask
	  DISALLOW = characters to disallow in the mask

	  This macro generates 4-word character masks for use with  those
	  COMND  functions  that  allow the user to specify his own mask.
	  For example, executing the following code  allows  "*"  in  the
	  predefined mask for the .CMFLD function (FLDB0 thru BLDB3):

	  BRMSK.(FLDB0.,FLDB1.,FLDB2.,FLDB3.,<*>,)

	  Also, the BRMSK. macro may be invoked within the FLDBK. macro:

	  FLDBK.(TYP,FLGS,DATA,HLPM,DEFM,[
		 BRMSK.(INI0,INI1,INI2,INI3,ALLOW,DISALLOW)],LST)

 
   Generates an illegal instruction interrupt on error conditions below.

   COMND ERROR MNEMONICS:

   COMNX1:   Invalid COMND function code
   COMNX2:   Field too long for internal buffer
   COMNX3:   Command too long for internal buffer
   COMNX5:   Invalid string pointer argument
   COMNX8:   Number base out of range 2-10
   COMNX9:   End of input file reached
   COMX10:   Invalid default string
   COMX11:   Invalid CMRTY pointer
   COMX12:   Invalid CMBFP pointer
   COMX13:   Invalid CMPTR pointer
   COMX14:   Invalid CMABP pointer
   COMX15:   Invalid default string pointer
   COMX16:   Invalid help message pointer
   COMX17:   Invalid byte pointer in function block
   VACCX1:   Account string too long



			     CRDIR     JSYS 240

   Creates, changes, or deletes a directory entry.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

   ACCEPTS IN AC1:  byte pointer to ASCIZ string containing the structure
		    and  directory name.  The string must be of the form:
		    structure:<directory>.

	      AC2:  B0(CD%LEN)	set flags  and	length	of  the  argument
				block  from  the  values  given  in  word
				.CDLEN.

		    B1(CD%PSW)	set password from argument block

		    B2(CD%LIQ)	set  working  disk  storage  limit   from
				argument block

		    B3(CD%PRV)	set capability bits from argument block

		    B4(CD%MOD)	set mode bits from argument block

		    B5(CD%LOQ)	set permanent  disk  storage  limit  from
				argument block

		    B6(CD%NUM)	set directory number from argument  block
				(valid only when creating a directory)

		    B7(CD%FPT)	set default file protection from argument
				block

		    B8(CD%DPT)	set directory  protection  from  argument
				block

		    B9(CD%RET)	set default retention count from argument
				block

		    B10(CD%LLD) set last LOGIN date from argument block

		    B11(CD%UGP) set user groups from argument block

		    B12(CD%DGP) set directory groups from argument block

		    B13(CD%SDQ) set  subdirectory  quota  from	 argument
				block

		    B14(CD%CUG) set  user  groups  assignable	by   this
				directory from argument block

		    B15(CD%DAC) set default account from argument block

|		    B16(CD%PPN) set   project-programmer   number    from
|				argument block

		    B17(CD%DEL) delete this directory entry

		    B18-35(CD%APB) address of the argument block

	      AC3:  byte pointer to ASCIZ string containing the  password
		    of	the  directory.   This pointer is required when a

		    nonprivileged user is  changing  parameters  for  his
		    directory.

   RETURNS     +1:  always, with directory number in AC1

   This monitor call requires the  process  to	have  WHEEL  or  OPERATOR
   capability enabled unless one of the following conditions is true:

	1.  The specified directory is one to which the caller has  owner
	    access,  and  the caller is changing any one of the following
	    parameters:

		 password (.CDPSW)
		 default file protection (.CDFPT)
		 directory protection (.CDDPT)
		 default retention count (.CDRET)
		 default account (.CDDAC)

	    This feature is installation  dependent  and  is  enabled  by
	    issuing function .SFCRD of the SMON monitor call.

	2.  The specified directory is inferior to the one to  which  the
	    caller  is	currently  connected,  and  the  caller has owner
	    access to this inferior directory.

   Refer to Section 2.2.6 for the description of owner access.

   The format of the argument block is as follows:

      Word   Symbol    Meaning

	0    .CDLEN	    flag bits in the left half, and length of the
			    argument   block  in  the  right  half.   The
			    following bits are defined:

			    B0(CD%NSQ)	When restoring this directory, do
					not	update	  its	 superior
					directory's  quotas   (permanent,
					working, and subdirectory quotas)
					to account  for  this  directory.
					If  this bit is off, the superior
					directory's quotas  are  updated.
					This  bit is set by the DLUSER or
					DUMPER	program  to  retain   the
					superior  directory's quotas when
					restoring   its   subdirectories.
					The  process  must  have WHEEL or
					OPERATOR  capability  enabled  to
					set this bit.

			    B1 (CD%NCE) When restoring or  reconstructing
					this directory, do not change any
					directory   parameters	 if   the
					directory   currently  exists  on
					disk;  set the parameters only if
					the directory does not exist.  If
					this bit is  off,  the	directory
					parameters  as saved are restored
					for the directory.  This  bit  is
					set   by  the  DLUSER  or  DUMPER
					program to restore or reconstruct
					directories    from   out-of-date
					files  without	causing  existing

					directories  to  revert  to older
					parameters.   The  process   must
					have WHEEL or OPERATOR capability
					enabled to set this bit.

			    B2(CD%NED)	Set  default  on-line  expiration
					date from word .CDDNE.

			    B3(CD%FED)	Set  default  on-line  expiration
					date from word .CDDFE.

|			    B4(CD%RNA)	Reserved for DIGITAL
|
|			    B5(CD%PEN)	Set password  encryption  version
|					from  word  .CDPEV and encryption
|					date from word .CDPDT
|
|			    B6(CD%PED)	Set password expiration date from
|					word .CDPED
|
|			    B7(CD%PMU)	Set maximum  password  use  count
|					from .CDPMU

	1    .CDPSW	    byte pointer to password string, which  is	a
			    string  from  1 to 39 alphanumeric characters
			    (including hyphens).

	2    .CDLIQ	    maximum number of pages that can be used  for
			    working disk storage (also known as logged-in
			    quota).

	3    .CDPRV	    capabilities  for  this  user.    (Refer   to
			    Section 2.7.1 for the capability bits.)

	4    .CDMOD	    mode word.

			    B0(CD%DIR)	directory name can be  used  only
					to connect to (the directory is a
					files-only directory).	 If  this
					bit  is  off,  the directory name
					can be used for  logging  in  and
					connecting to.

			    B1(CD%ANA)	accounts are alphanumeric.   This
					bit  is  not used and is provided
					for  compatibility  with  systems
					earlier than TOPS-20 version 3.

			    B2(CD%RLM)	all  messages	from   the   file
					<SYSTEM>MAIL.TXT   are	 repeated
					each time the user logs  in.   If
					this   bit   is   off,	only  the
					messages not  previously  printed
					are output when the user logs in.

			    B7(CD%DAR)	If on, this  bit  indicates  that
					the   file   should  be  archived
					rather than migrated  to  virtual
					disk  when the on-line expiration
					date has been reached.

	5    .CDLOQ	    maximum number of pages that can be used  for
			    permanent	disk   storage	 (also	known  as

			    logged-out quota).

	6    .CDNUM	    directory number, valid only when creating	a
			    directory.	 An error code is returned if the
			    user  changes  the	number	of  an	 existing
			    directory	(CRDIX2)  or  gives  a	nonunique
			    number (CRDIX8).

	7    .CDFPT	    default    file    protection    (18    bits,
			    right-justified).

       10    .CDDPT	    directory	   protection	   (18	    bits,
			    right-justified).

       11    .CDRET	    default number of generations of a file to be
			    retained  in the directory (retention count).
			    Valid numbers are 0 to 63, with  0	being  an
			    infinite number.

       12    .CDLLD	    date of last login.

       13    .CDUGP	    address  of  user	group	list   for   this
			    directory.

       14    .CDDGP	    address of directory group list.

       15    .CDSDQ	    maximum number of  directories  that  can  be
			    created  inferior  to  this  directory.  This
			    parameter allows a user to create directories
			    with the BUILD command.

       16    .CDCUG	    address  of  user  group  list.   This   list
			    contains   the  group  numbers  that  can  be
			    assigned to subdirectories.

       17    .CDDAC	    byte pointer to default  account  string  for
			    this user.

       20    .CDDNE	    default on-line  expiration  date  and  time,
			    which  can	be  an	explicit  date	and  time
			    (internal format) or an interval  (in  days).
			    In	either	case, the specified date/interval
			    cannot  exceed  the  system  maximum.    This
			    parameter  is  read if CD%NED (1B2) or CD%FED
			    (1B3) in .CDLEN are set.  If a new	directory
			    is	 created   and	 this  parameter  is  not
			    specified, the system default is used.

			    An unprivileged user can modify his  defaults
			    to	be  less  than or equal to those that are
			    currently specified or  the  system  maximum,
|			    whichever  is  greater.   A  user  with WHEEL
|			    capability may override the  system  maximum.
|			    If	no  system  maximum  has  been specified,
|			    there is no on-line expiration date and  time
|			    associated with the directory.

	21   .CDDFE	    default  off-line  expunge	date  and   time.
			    Otherwise similar to .CDDNE (above).

|	22   .CDDRN	    reserved for DIGITAL.
|
|	23   .CDPEV	    version   number   of   password   encryption

|			    algorithm.
|
|	24   .CDPDT	    date password was encrypted.
|
|	25   .CDPED	    date password expires.
|
|	26   .CDPMU	    maximum use count for password.
|
|	27   .CDPPN	    TOPS-10 Project-Programmer number:	p,,pn
|			    requires WHEEL or OPERATOR capability to  set
|			    project  number  (p)  less	than 10;  project
|			    number cannot be 4.

   The format of  each	group  list  is  a  table  with  the  first  word
   containing  a  count of the number of words (including the count word)
   in the table and each subsequent word containing a group number.

   When CRDIR is being executed to create a directory, bits 0-17  of  AC2
   can	optionally be on or off.  If a particular bit is on, it indicates
   that the corresponding  argument  in  the  argument	block  should  be
   examined.  If the bit is off, it indicates that the argument should be
   defaulted.

   The following table lists the  bits	and  the  corresponding  argument
   defaults:

	   Bits 		   Argument Defaults

	B2(CD%LIQ)  maximum working disk file storage to 250 pages
	B3(CD%PRV)  no special capabilities
	B4(CD%MOD)  directory name that can be used for  logging  in  and
		    that  lists  the  messages from <SYSTEM>MAIL.TXT only
		    once
	B5(CD%LOQ)  maximum permanent disk file storage to 250 pages
	B6(CD%NUM)  the  first	unused	directory  number;    B6   should
		    normally be off.
	B7(CD%FPT)  default file protection to 777700
	B8(CD%DPT)  directory protection to 777700
	B9(CD%RET)  default file retention count to 1
	B10(CD%LLD) never logged in
	B11(CD%UGP) no user groups
	B12(CD%DGP) no directory groups
	B13(CD%SDQ) no ability to create inferior directories
	B14(CD%CUG) no assignable user groups for inferior directories
	B15(CD%DAC) no default account

   When CRDIR is being executed to change a directory and any of B0-17 of
   AC2 is off, the corresponding parameter is not affected.

   When CRDIR is being executed to delete a directory,	the  settings  of
   B0-17  of  AC2  are ignored.  A CRDIR call cannot be given to delete a
   directory that has directories inferior to it.

   The GTDIR call can be used to obtain the directory information.

   Generates an illegal instruction interrupt on error conditions below.

   CRDIR ERROR MNEMONICS:

   ACESX3:   Password required
   CRDIX1:   WHEEL or OPERATOR capability required
   CRDIX2:   Illegal to change number of old directory
   CRDIX3:   Insufficient system resources (Job Storage Block full)

   CRDIX4:   Superior directory full
   CRDIX5:   Directory name not given
   CRDIX6:   Directory file is mapped
   CRDIX7:   File(s) open in directory
   CRDIX8:   Invalid directory number
   CRDIX9:   Internal format of directory is incorrect
   CRDI10:   Maximum  directory  number  exceeded;   index  table   needs
	     expanding
   CRDI11:   Invalid terminating bracket on directory
   CRDI12:   Structure is not mounted
   CRDI13:   Request exceeds superior directory working quota
   CRDI14:   Request exceeds superior directory permanent quota
   CRDI15:   Request exceeds superior directory subdirectory quota
   CRDI16:   Invalid user group
   CRDI17:   Illegal   to   create   nonfiles-only   subdirectory   under
	     files-only directory
   CRDI18:   Illegal to delete logged-in directory
   CRDI19:   Illegal to delete connected directory
   CRDI20:   WHEEL, OPERATOR, or requested capability required
   CRDI21:   Working space insufficient for current allocation
   CRDI22:   Subdirectory quota insufficient for existing subdirectories
   CRDI23:   Superior directory does not exist
   CRDI24:   Invalid subdirectory quota



			      CRJOB	JSYS 2

   Creates a new job and optionally logs it in.  This monitor call causes
   the	functions  that are normally performed when a job is created (for
   example, assignment of a JSB, the primary I/O designators, and the job
   controlling terminal) to be performed for the new job.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

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

   ACCEPTS IN AC1:  flag bits,,0

	      AC2:  address of argument block

	      AC3:  (optional) If CRJOB is to be used to release  control
		    over  a  job previously created with CRJOB (bit 17 in
		    AC1 must be on), then AC3 contains the job number  of
		    the previously-created job.

   RETURNS     +1:  failure, with error code in AC1

	       +2:  success, with the number of the new job in AC1

   The flag bits defined in the left half of AC1 are as follows:

   Bit	   Symbol      Meaning

   0	   CJ%LOG      Log in the new job.  If this bit is off,  the  new

		       job is created but not logged in.

   1	   CJ%NAM      Set the user name and password from  the  argument
		       block.	If  this bit is off, the user name of the
		       caller is given to the new job.

   2-3	   CJ%ACT      Set the account of the new job to the following:

		       Code    Symbol	 Meaning

		       0       .CJUCA	 Use current account of caller.

		       1       .CJUAA	 Use account  from  the  argument
					 block.

		       2       .CJUDA	 Use  default  account	of   user
					 whose job is being created.

   4	   CJ%ETF      If set, place the TOPS-20 command processor in the
		       top-level  process  of  the  new job.  The command
		       processor reads its program  argument  block  (see
		       below) at the time it is started.

		       CJ%FIL and CJ%ETF interact in the following ways:

		       1.  If CJ%FIL is on and CJ%ETF is on, then  a  job
			   is  created	with  a top process consisting of
			   the TOPS-20 command processor and an  inferior
			   process  consisting	of the file to which word
			   .CJFIL points.

		       2.  If CJ%FIL is off and CJ%ETF is on, then a  job
			   is  created	with  a top process consisting of
			   the TOPS-20 command	processor.   No  inferior
			   process is created.

		       3.  If CJ%FIL is on and CJ%ETF is off, then a  job
			   is  created	with  a top process consisting of
			   the file to	which  word  .CJFIL  points.   No
			   inferior process is created.

		       The format of the program  argument  block  is  as
		       follows:

		       Word			 Contents

			0	 Count of words in block,  not	including
				 this word.

			1	 1B0+3B6+2B12+CR%PRA - indicates this  is
				 a  program argument block created by the
				 CRJOB JSYS.

			2	 1B0 + offset1 - offset1 is the offset in
				 this  block  of the first argument being
				 passed.

			3	 1B0 + offset2 - offset2 is the offset in
				 this  block of the second argument being
				 passed.

			n	 (offset1) This argument is a copy of the
				 flag  bits  from word 10 (.CJEXF) of the

				 CRJOB argument block, which contains the
				 flags	  for	 the   command	 language
				 processor.

			n+1	 (offset2)   This    argument	 contains
				 information   about  the  process  being
				 started:  the process handle in the left
				 half, and the entry vector offset in the
				 right half.  The entry vector offset  is
				 from  word  .CJSVF (word 4) of the CRJOB
				 argument block.

		       The program argument block is created by the CRJOB
		       monitor	call  and  is  passed to the process by a
		       PRARG  monitor  call  (performed   internally   by
		       CRJOB).	 The  user  does  not  specify any of the
		       information in the program argument  block.   Only
		       the  program  at  the  top  fork  level of the job
		       (usually the TOPS-20  EXEC)  can  read  the  PRARG
		       block.

   5	   CJ%FIL      Move the file to which  a  word	in  the  argument
		       block  points  into  a  process in the new job (by
		       means of a GET call).  If B4(CJ%ETF) is	off,  the
		       file is placed in the top-level process of the new
		       job.  If B4(CJ%ETF) is on, the file is  placed  in
		       the  process  designated  in  the Command Language
		       Processor's PRARG argument block (see below).

		       If B5(CJ%FIL) is off, no  file  is  moved  into	a
		       process	of the new job, and the top-level process
		       of the new job is the Command Language Processor.

   6	   CJ%ACS      Load the ACs from the value in the argument block.
		       The  ACs  are  loaded only if a program other than
		       the Command Language Processor is being run.

   7	   CJ%OWN      Maintain ownership of the  new  job.   This  means
|		       that when the caller logs out, the new job is also
|		       logged out.  However, the  new  job  can  also  be
|		       logged  out by the normal mechanisms.  If this bit
		       is off, control of the new job is released.

   8	   CJ%WTA      Do not start the new  job  until  it  is  attached
		       (using  ATACH JSYS) to a terminal.  If this bit is
		       off, the new job is started.

   9	   CJ%NPW      Do not check the password given when the  new  job
		       is logged in.  If this bit is off, the password is
		       checked unless the new job is being logged in with
		       the same user name as the caller, or with WHEEL or
		       OPERATOR capability enabled.

   10	   CJ%NUD      Do not update the  date	of  LOGIN  for	the  user
		       logging	in  to	the new job.  If this bit is off,
		       the date of LOGIN is updated, unless the  user  is
		       logging	in with the same user name as the caller,
		       or with WHEEL or OPERATOR capability enabled.

   11	   CJ%SPJ      Set (by means of a SPJFN call) the  primary  input
		       and  output  designators  from  the argument block
		       before  starting  the  job.    The   primary   I/O
		       designators are not changed for a Command Language

		       Processor in the top-level process of the new job;
		       they  are changed only for inferior processes.  If
		       this bit is off, the primary  I/O  designators  of
		       the new job are the job's controlling terminal.

   12	   CJ%CAP      Set the allowed user capabilities of the  new  job
		       (right  half)  to  be  the  same  as  the caller's
		       currently enabled capabilities, until the new  job
		       is logged in.  If this bit is off, the new job has
		       the user capabilities  associated  with	the  user
		       whose job is being created.

   13	   CJ%CAM      Set the allowed user capabilities of the  new  job
		       to   the   combination	of   (AND  function)  the
		       capability mask in the argument block and the  new
		       job's  user capabilities.  If this bit is off, the
		       new job has the capabilities associated	with  the
		       user whose job is being created.

   14	   CJ%SLO      Send an IPCF message to the PID	supplied  in  the
		       argument block when the new job is logged out.  If
		       this bit is off, no message is sent when  the  new
		       job is logged out.

		       The IPCF logout message has the following format:

		       Word			Contents

			0	 0,,.IPCLO
			1	 N,,# of job logged out.  N is the  count
				 of  the  remaining words in this message
				 (currently 10 octal).
			2	 flags,,reserved

				 Bits	Symbol	 Meaning

				  B0	SP%BAT	 job  is  controlled   by
						 batch.
				  B1	SP%DFS	 spooling is deferred.
				  B2	SP%ELO	 the job executed LGOUT.
				  B3	SP%FLO	 the job  was  forced  to
						 logout.   If this bit is
						 on, check word 10 of the
						 IPCF message (gives code
						 of most  recent  monitor
						 call error).  B3 will be
						 on only if the  job  has
						 an   interrupt   to   be
						 handled     by     MEXEC
						 (Mini-EXEC).
				  B4	SP%OLO	 the job was  logged  out
						 by  another job.  Word 6
						 of  the   IPCF   message
						 contains  the job number
						 of the job that did  the
						 logout.

			3	 job connect time
			4	 job CPU time
			5	 TTY number  of  job  at  logout  (-1  if
				 detached)
			6	 job number  of  the  job  that  did  the
				 logout

			7	 reserved
			10	 code of the  most  recent  monitor  call
				 error

   17	   CJ%DSN      Release ownership of the  previously  created  job
		       whose  number  is  in  AC3.  If this bit is on, it
		       overrides the setting of all other  bits  in  AC1;
		       and  no	change	is made to the job's status other
		       than the change in ownership.

   The format of the argument block (whose address is given in AC2) is as
   follows:

   Word 	Symbol	  Meaning

    0		.CJNAM	  Byte pointer to the user name string.

    1		.CJPSW	  Byte pointer to the password string.

    2		.CJACT	  5B2 + numeric account number or byte pointer to
			  account string.

    3		.CJFIL	  Byte pointer to the name  of	the  file  to  be
			  moved (by a GET call) into a process of the new
			  job.	The new job must have read access to  the
			  file.   The  process	into  which  the  file is
			  placed depends on the setting of B4(CJ%ETF).

    4		.CJSFV	  Offset in the entry vector to use as the  start
			  address  of  the  file  to  which  word  .CJFIL
			  points.  This offset is  the	argument  to  the
			  SFRKV call used to start the process.

    5		.CJTTY	  Terminal   designator   of   the   new    job's
			  controlling  terminal.   This  terminal must be
			  assigned by the caller.  The terminal  is  then
			  released  and  assigned to the new job.  If the
			  new  job  is	to  be	 detached,   the   .NULIO
			  designator (377777) is given.

    6		.CJTIM	  Connect-time for new	job  before  a	LGOUT  is
			  forced on it;  0 indicates no limit.

    7		.CJACS	  Address of a 16-word block whose  contents  are
			  to  be loaded in the new job's ACs if a program
			  other than the Command  Language  Processor  is
			  being run.

    10		.CJEXF	  Flag bits to be passed to the Command  Language
			  Processor  in  the top-level process of the new
			  job.	The bits are:

			  B0	 Suppress  the	herald	printed  by   the
				 Command Language Processor.

			  B1	 Move  the  file  to  which  word  .CJFIL
				 points  into the process whose handle is
				 in the PRARG block (see below).

			  B2	 Start the process at the offset  in  the
				 entry vector given in word .CJSFV.  This
				 process is  started  after  the  Command
				 Language Processor is initialized.

			  B3	 Output the text  printed  when  a  LOGIN
				 command  is given ( system messages, job
				 number,   or	terminal   number,    for
				 example).

			  This word is copied  into  the  PRARG  argument
			  block  passed to the Command Language Processor
			  (see below).

    11		.CJPRI	  Primary input and output  designators  for  the
			  inferior  processes  of  the	new  job.   These
			  designators must refer to  device  designators.
			  The Command Language Processor in the top-level
			  process of the new job executes an  SPJFN  call
			  to set these designators.

    12		.CFCPU	  Run-time limit for  the  new	job.   When  this
			  limit is reached, an interrupt is generated (by
			  a  TIMER  call),  and  the   Command	 Language
			  Processor  executes  a  LGOUT  call for the new
			  job.	A zero in this word  means  there  is  no
			  run-time limit on the job.

    13		.CJCAM	  Capability mask for the new job.  This mask  is
			  used only if CJ%CAM is set.

    14		.CJSLO	  PID to which an IPCF message is to be sent when
			  the new job is logged out.

   When CRJOB creates a new job, it also creates the  top-level  process,
   which  is  always a virgin process.	Thus, an execute-only program can
   be run as the top-level fork.

   The CRJOB call causes other monitor calls to be executed, depending on
   the particular function that is performed.

	Any GTJFN and OPENF errors can occur when obtaining the specified
	file.

	Any SFRKV error can  occur  when  starting  the  program  in  the
	specified file.

	Any LOGIN and account validation errors can occur when logging in
	the job.

   CRJOB ERROR MNEMONICS:

   CRJBX1:   Invalid parameter or function bit combination
   CRJBX2:   Illegal for created job to enter MINI-EXEC
   CRJBX4:   Terminal is not available
   CRJBX5:   Unknown name for LOGIN
   CRJBX6:   Insufficient system resources



			     CRLNM     JSYS 502

   Defines or deletes a logical name assignment.  Logical names are  used

   to specify a set of default values for each field requested by a GTJFN
   monitor call.  When a logical name is passed to the	GTJFN  call,  any
   fields  not specified by the user are supplied from the fields defined
   in the logical name definition.  (Refer to Section 2.2.2  and  to  the
   INLNM  and  LNMST  monitor  call  descriptions for more information on
   logical names.)

|  RESTRICTIONS:    Some functions require WHEEL or OPERATOR capability.

   ACCEPTS IN AC1:  function code

	      AC2:  byte pointer to the logical name (A terminating colon
		    is optional in the logical name.)

	      AC3:  byte pointer to the logical name definition string

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC3

   The codes for the functions are as follows:

   Code      Symbol  Meaning

   0	     .CLNJ1  delete one logical name from the job

|  1	     .CLNS1  delete one logical name from the  system  (WHEEL  or
|		     OPERATOR capability required)

   2	     .CLNJA  delete all logical names from the job

|  3	     .CLNSA  delete all logical names from the system  (WHEEL  or
|		     OPERATOR capability required)

   4	     .CLNJB  create a logical name for the job

|  5	     .CLNSY  create a logical  name  for  the  system  (WHEEL  or
|		     OPERATOR capability required)

   CRLNM ERROR MNEMONICS:

   ARGX09:   Invalid byte size
   CRLNX1:   Logical name is not defined
   CRLNX2:   WHEEL or OPERATOR capability required
   CRLNX3:   Invalid function
   GJFX4:    Invalid character in file name
   GJFX5:    Field cannot be longer than 39 characters
   GJFX6:    Device field not in a valid position
   GJFX7:    Directory field not in a valid position
   GJFX8:    Directory terminating delimiter is not preceded by  a  valid
	     beginning delimiter
   GJFX9:    More than one name field is not allowed
   GJFX10:   Generation number is not numeric
   GJFX11:   More than one generation number field is not allowed
   GJFX12:   More than one account field is not allowed
   GJFX13:   More than one protection field is not allowed
   GJFX14:   Invalid protection
   GJFX15:   Invalid confirmation character
   GJFX22:   Insufficient system resources (Job Storage Block full)
   GJFX31:   Invalid wildcard designator

|  DELETION - CVHST and CVSKT are now obsolete



			     DEBRK     JSYS 136

   Dismisses the software interrupt routine in progress and  resumes  the
   process  at	the  location  specified by the PC stored in the priority
   level table.  (Refer to Section 2.6.7.)

   RETURNS     +1:  only  if  no  software  interrupt  is  currently   in
		    progress and if an ERJMP or ERCAL instruction follows
		    the DEBRK

   Generates an illegal instruction interrupt on error conditions below.

   DEBRK ERROR MNEMONICS:

   DBRKX1:   No interrupts in progress



			     DELDF     JSYS 67

   Reclaims disk space by expunging disk files that have been marked  for
   deletion  with  DELF.  This call first checks to see that the user has
   connect access to  the  directory.	The  calling  process  must  have
   connect access to the directory to expunge files from it.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

   ACCEPTS IN AC1:  B0(DD%DTF) delete temporary files (;T) also

		    B1(DD%DNF) delete nonexistent files that are not  now
			       open

		    B2(DD%RST) rebuild the symbol table

		    B3(DD%CHK) check internal consistency  of  directory.
			       If  an  error  occurs,  the  symbol  table
			       should be rebuilt.  If B2(DD%RST) is  also
			       set,  it  is  ignored;  and the DELDF call
			       must be executed again with B2(DD%RST) set
			       to rebuild the symbol table.

	      AC2:  directory number

   RETURNS     +1:  always

   The directory number given in AC2 must be that of the user's connected
   or  logged-in  directory  unless  the  process  has	WHEEL or OPERATOR
   capability enabled, or the process has connect access to the directory

   being deleted.

   If errors still occur after the symbol table is rebuilt,  the  process
   should  restore  the directory from magnetic tape;  or the user should
   request help from the operator.

   When a file with archive status is deleted and expunged,  DELDF  sends
   an  IPCF  message to GALAXY.  This message contains all archive status
   information, which includes tape information, as well as  the  present
   file  name,	the  user  who	expunged  the  file,  and the time it was
   expunged.

   Generates an illegal instruction interrupt on error conditions below.

   DELDF ERROR MNEMONICS:

   ARGX26:   File is off line
   DELDX1:   WHEEL or OPERATOR capability required
   DELDX2:   Invalid directory number
   DELFX2:   File cannot be expunged because it is currently open
   DELFX4:   Directory symbol table could not be rebuilt
   DELFX5:   Directory symbol table needs rebuilding
   DELFX6:   Internal format of directory is incorrect
   DELFX7:   FDB formatted incorrectly;  file not deleted
   DELFX8:   FDB not found;  file not deleted



			      DELF     JSYS 26

   Deletes the specified disk file and, if the file is	closed,  releases
   the	JFN.   The  file  is  not expunged immediately, but is marked for
   later expunging either by the  system  or  with  the  DELDF	or  LGOUT
   monitor calls.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

   ACCEPTS IN AC1:  B0(DF%NRJ) do not release the JFN.

		    B1(DF%EXP) expunge the contents of	the  file.   This
			       also   deletes	the   FDB  entry  in  the
			       directory.   B0(DF%NRJ)	 and   B1(DF%EXP)
			       cannot be set simultaneously.

		    B2(DF%FGT) expunge the file but do not  deassign  its
			       addresses.  The process must have WHEEL or
			       OPERATOR capability enabled  to	set  this
			       bit.   This  bit  should be set only by an
			       operator or system specialist to delete	a
			       file  that  has	a damaged or inconsistent
			       index block.

		    B3(DF%DIR) delete and expunge a directory file.   The
			       process	 must	have  WHEEL  or  OPERATOR
			       capability enabled to set this bit.   This
			       bit  should  be set only by an operator or
			       specialist to delete a bad directory.

		    B4(DF%ARC) allow a file with  archive  status  to  be
			       deleted.

		    B5(DF%CNO) delete and expunge  the	contents  of  the
			       file  but preserve the file's name and FDB
			       as they were (with the  exception  of  the
			       page  count  and  the page table address).
			       Setting this bit causes the DELF  to  fail
			       if bit AR%NDL is set in word .FBBBT of the
			       FDB, or if a complete set of tape  back-up
			       information is not in the FDB.

		    B18-35     JFN of the file being deleted.
		      (DF%JFN)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, JFN is released unless B0(DF%NRJ) is  on  or
		    the file is open.

   By setting B0(DF%NRJ), the user can delete multiple files by giving	a
   JFN to GNJFN that represents a group of files and processing each file
   in the group.

   The DELF call takes the  +1	return	if  the  JFN  is  assigned  to	a
   nondirectory device.

   DELF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX9:    Invalid operation for this device
   DELFX1:   Delete access required
   DELFX2:   File cannot be expunged because it is currently opened
   DELFX3:   System scratch area depleted;  file not deleted
   DELFX4:   Directory symbol table could not be rebuilt
   DELFX5:   Directory symbol table needs rebuilding
   DELFX6:   Internal format of directory is incorrect
   DELFX7:   FDB formatted incorrectly;  file not deleted
   DELFX8:   FDB not found;  file not deleted
   DELFX9:   File is not a directory file
   DELF10:   Directory still contains subdirectory
   DLFX10:   Cannot delete directory;  file still mapped
   DLFX11:   Cannot delete directory file in this manner
   DELX12:   File has no pointer to offline storage
   DELX13:   File is marked "Never Delete"
   WHELX1:   WHEEL or OPERATOR capability required



			     DELNF     JSYS 317

   Deletes all but the specified number of generations of  a  disk  file.
   The	files  are  marked for deletion and are expunged at a later time,
   either automatically by the system or explicitly  with  the	DELDF  or
   LGOUT call.

   ACCEPTS IN AC1:  B0(DF%NRJ) do not release the JFN

		    B4(DF%ARC) allow a file with  archive  status  to  be
			       deleted.

		    B5(DF%CNO) delete and expunge  the	contents  of  the
			       file  but preserve the file's name and FDB
			       as they were (with the  exception  of  the
			       page  count  and  the page table address).
			       Setting this bit causes the DELNF to  fail
			       if bit AR%NDL is set in word .FBBBT of the
			       FDB or if a complete set  of  tape  backup
			       information is not in the FDB.

		    B18-35     JFN of the file being deleted

	      AC2:  the number of generations to retain

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, with the number of files deleted in AC2

   Starting at the file specified by the JFN, the DELNF  call  decrements
   the	generation  number,  first  retaining  the  specified  number  of
   generations before deleting the remaining generations.

   DELNF ERROR MNEMONICS:

   DELX13:   File is marked "Never Delete"
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DELFX1:   Delete access required



			      DEQ     JSYS 514

   Removes a request for a specific resource from  the	queue  associated
   with  that resource.  The request is removed whether the process has a
   lock for the resource, or  is  only	waiting  in  the  queue  for  the
   resource.

   This call can be used to remove any number of requests.  If one of the
   requests  cannot be dequeued, the dequeueing procedure continues until
   all requests that can be dequeued have been.  An error return is given
   for	the  last  request found that could not be dequeued.  The process
   can then execute the ENQC call to determine the current status of each
   request.   However,	if  the  process  attempts to dequeue more pooled
   resources than it originally allocated, the error return is taken  and
   none of the pooled resources are dequeued.

   Refer to the TOPS-20 Monitor Calls User's Guide for	an  overview  and
   description of the Enqueue/Dequeue facility.

|  RESTRICTIONS:    Some functions  require  enabled  WHEEL  or  OPERATOR
|		    capability	to  release  system  resource  locks,  or

|		    enabled WHEEL, OPERATOR, or ENQ capability to release
|		    global resource locks.

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

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument  block	(required  only  for  the
		    .DEQDR function)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The available functions are as follows:

      Code   Symbol			   Meaning

	0    .DEQDR	    Remove the specified requests from the queue.
			    This  function  is	the only one requiring an
			    argument block.

	1    .DEQDA	    Remove all requests for this process from the
			    queues.   This  action is taken on a RESET or
			    LGOUT call.  The error return is taken if the
			    process has not given an ENQ call.

	2    .DEQID	    Remove all requests that  correspond  to  the
			    specified	request   identifier(ID).    This
			    function allows  the  process  to  release	a
			    class  of locks in one call without itemizing
			    each lock in an argument block.  It is useful
			    when  dequeueing  in  one call the same locks
			    that were enqueued in one call.  To use  this
			    function,	the  process  places  the  18-bit
			    request ID in AC2.

   The format of the argument block for function .DEQDR is  identical  to
   that  given	on  the  ENQ  call.   (Refer  to  the  ENQ  monitor  call
   description.) However, the .ENQID word of the argument  block  is  not
   used on a DEQ call and must be zero.

   DEQ ERROR MNEMONICS:

   DESX5:    File is not open
   ENQX1:    Invalid function
   ENQX2:    Level number too small
   ENQX3:    Request and lock level numbers do not match
   ENQX4:    Number of pool and lock resources do not match
   ENQX6:    Requested locks are not all locked
   ENQX7:    No ENQ on this lock
   ENQX9:    Invalid number of blocks specified
   ENQX10:   Invalid argument block length
   ENQX11:   Invalid software interrupt channel number
   ENQX13:   Indirect or indexed byte pointer not allowed
   ENQX14:   Invalid byte size
   ENQX15:   ENQ/DEQ capability required
   ENQX16:   WHEEL or OPERATOR capability required
   ENQX17:   Invalid JFN
   ENQX18:   Quota exceeded
   ENQX19:   String too long

   ENQX20:   Locked JFN cannot be closed
   ENQX21:   Job is not logged in
   DESX8:    File is not on disk



			     DEVST     JSYS 121

   Translates the given device	designator  to	its  corresponding  ASCIZ
   device   name   string.    The   string  returned  contains	only  the
   alphanumeric device name;  it does not contain a colon.

   ACCEPTS IN AC1:  destination designator

	      AC2:  device designator

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC1, if pertinent

   The STDEV monitor call can be  used	to  translate  a  string  to  its
   corresponding device designator.

   DEVST ERROR MNEMONICS:

   DEVX1:    Invalid device designator DESX1:  Invalid source/destination
   designator  DESX2:	Terminal is not available to this job DESX3:  JFN
   is not assigned  IOX11:   Quota  exceeded  IOX34:   Disk  full  IOX35:
   Unable to allocate disk - structure damaged



			     DFIN     JSYS 234

   Inputs  a  double-precision,  floating-point   number,   rounding   if
   necessary.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  failure, error code in AC4 and updated string pointer
		    in AC1, if pertinent.

	       +2:  success, double-precision, floating-point  number  in
		    AC2  and  AC3  and	updated string pointer in AC1, if
		    pertinent.

   DFIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   FLINX1:   First character is not blank or numeric

   FLINX2:   Number too small
   FLINX3:   Number too large
   FLINX4:   Invalid format



			     DFOUT     JSYS 235

   Outputs a double-precision, floating-point number.

   ACCEPTS IN AC1:  destination designator

	      AC2:  first  word  of   a   normalized,	double-precision,
		    floating-point number

	      AC3:  second  word  of  a   normalized,	double-precision,
		    floating-point number

	      AC4:  format control word.  (Refer to Section 2.9.1.2.)

   RETURNS     +1:  failure, error code in AC4 and updated string pointer
		    in AC1, if pertinent.

	       +2:  success, updated string pointer in AC1, if pertinent.

   DFOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   FLOTX1:   Column overflow in field 1 or 2
   FLOTX2:   Column overflow in field 3
   FLOTX3:   Invalid format specified
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     DIAG     JSYS 530

   Reserves a channel and either a single device or all devices  attached
   to  that  channel.	This call is also used to release the channel and
   its devices.  When the request is made, no new activity  is	initiated
   on  the  requested channel, and the monitor waits for current activity
   on all devices connected to the channel to  be  completed.	When  the
   channel  becomes  idle,  the  process requesting the channel continues
   running.

   The DIAG JSYS can also be used to get and release memory.  The  .DGGEM
   function  is  used by the system program TGHA for performing its spare
   bit substitution.

   RESTRICTIONS:    requires  enabled  WHEEL,  OPERATOR,  or  MAINTENANCE
		    capability

   ACCEPTS IN AC1:  negative length of the argument  block  in	the  left
		    half,  and address of the argument block in the right
		    half.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The available functions are as follows:

   Function  Symbol    Meaning

      1      .DGACU    Assign the channel and a single	device.   Release
		       the device after the time limit specified.

		       Word    Contents

			0      function code
			1      device address
			2      time limit in milliseconds

      2      .DGACH    Assign the channel and all devices.

		       Word    Contents

			0      function code
			1      device address

      3      .DGRCH    Release the channel and all assigned devices.

		       Word    Contents

			0      function code
			1      device address

      4      .DGSCP    Set up the channel program.  The data transfer can
		       be  up to 50 pages.  This function locks in memory
		       the user page to which the  channel  control  word
		       points.	 This  function also causes the system to
		       update	the   Exec   Process	Table	 location
		       corresponding  to the channel with the appropriate
		       channel control word (physical address).

		       Word    Contents

			0      function code
			1      device address
			2      channel control word 0
			3      channel control word 1
			       .
			       .
			       .
		       n+2     channel control word n

      5      .DGRCP    Release the channel program.   The  page  for  the
		       specified  channel,  to	which  page  the  channel
		       control word points, is unlocked.   This  function
		       is  not	required  before specifying a new channel
		       program.

		       Word    Contents

			0      function code
			1      device address

      6      .DGGCS    Return the status of the  channel.   The  argument
		       block contains the logout area for the channel.

		       Word    Contents

			0      function code
			1      device address
		       2-5     4-word channel logout area

|   7-77	       Reserved for DIGITAL.

    100      .DGGEM    Get memory (for TGHA).

		       Word    Contents

			0      function code
			1      first page in user address space
			2      first physical memory page
			3      number of pages
			4      user  address  of   AR/ARX   parity   trap
			       routines

		       Upon successful return, this function accomplishes
		       the following:

		       1.  TOPS-20 has requested that all  of  the  front
			   ends refrain from accessing common memory.

		       2.  The hardware PI system has  been  turned  off;
			   no scheduling can occur.

		       3.  The time base and  interval	timer  have  been
			   turned off.

		       4.  All DTE byte transfers have been completed.

		       5.  All RH20 activity has ceased.

		       6.  The designated pages of  the  process  address
			   space   have   been	set  up  to  address  the
			   designated physical memory.	Note that this is
			   not	the  same  as  requesting  the pages with
			   PLOCK.  With the get memory function, the data
			   in	the   physical	memory	pages  have  been
			   retained,  and  ownership  of  the  pages   is
			   unchanged.

		       7.  The CST0 entries for each  of  the  designated
			   physical  pages  have  been	saved  and set as
			   follows:

			   a)  The age is set to the present age  of  the
			       requesting process.

			   b)  The process use field is set to all ones.

			   c)  The modified bit is set to one.

 
		       8.  The entire address  space  of  the  requesting
			   process has been locked in memory.  (Actually,
			   only the pages that existed at the time of the
			   DIAG  call are locked.  Therefore, the process
			   must ensure that all of  the  pages	it  needs
			   exist and are private when DIAG is executed.)

		       9.  The monitor has set up proper dispatch if TGHA
			   specified an AR/ARX trap address.

    101      .DGREM    Release memory (for TGHA)

		       Word    Contents

			0      function code

    102      .DGPDL    Inform  the  monitor  that  a  device   previously
		       unknown	to  it	is  now available for use (is now
		       online).   This	functon  is  used  with   devices
		       interfaced  through  the  DX20  (TX01, TX03, TX05,
		       TU70, or TU72).

		       Argument block:

		       Word    Contents

			0      function code
			1      primary channel number
			2      primary unit number
			3      primary	controller  number  (-1   if   no
			       controller)
			4      alternate channel number
			5      alternate unit number (should be  same  as
			       primary unit number)
			6      alternate  controller  number  (-1  if  no
			       controller)

|   103      .DGCSL    Reserved for DIGITAL
|
|   104      .DGUCD    CI-20 microcode management.
|
|		       Word    Contents
|
|			0      function code
|			1      subfunction code
|
|			       Code    Symbol	 Meaning
|
|				 0     .DGRIP	 microcode   reload    in
|						 progress
|				 1     .DGRLC	 microcode	   reload
|						 complete
|				 2     .DGDIP	 microcode    dump     in
|						 progress
|				 3     .DGDMC	 microcode dump complete
|
|   105      .DGRST    Reset any remote system on the CI
|
|		       Word    Contents

|			0      function code
|			1      system address:	channel,,node
|			       where channel (which CI) is 7  for  a  KL,
|			       and node is the CI node address
|			2      0 to set the force-bit to 0;  one  to  set
|			       the  force-bit  to  1.  Normally, a remote
|			       system will only allow itself to be  reset
|			       by  the	system	on  the  CI  that  did	a
|			       previous  reset	of  this   system.    The
|			       force-bit  allows  the  calling	system to
|			       force a reset whether or not  it  did  the
|			       previous reset of the remote system.
|
|			       Note:  Remote system may not support  this
|			       function.
|
|   106      .DGSTR    Start remote system
|
|		       Word    Contents
|
|			0      function code
|			1      system address:	channel,,node
|			       where channel (which CI) is 7  for  a  KL,
|			       and node is the CI node address
|			2      0 to use default start address  of  remote
|			       system;	  or  start  address  for  remote
|			       system if other than default
|
|			       Note:  Remote system may not support  this
|			       function.
|
|   107      .DGCTR    Port counter functions
|
|		       Word    Contents
|
|			0      function code
|			1      channel,,function
|			       For the CI-20 (KLIPA), the channel is 7.
|
|			       Code  Symbol  Meaning
|
|				0    .DGGTC  get counters
|				1    .DGGVC  release counters
|				2    .DGPTC  set counters.  This function
|					     will   set   the	nodes  to
|					     capture data and the data to
|					     capture.	  Note:    .DGCTR
|					     function 0 (.DGGTC) must  be
|					     executed prior to .DGPTC.
|				3    .DGRDC  read counters
|
|			2      If releasing counters, then
|
|			       0 = do not force  release.   Ownership  of
|				   counters  will  be  released  only  if
|				   current owner is current process.
|			       1 = force release ownership of counters.
|
|			       If setting counters, then mask,, threshold
|
|			3      nodes to capture data if setting counters.
|
|		       Words 2 - 15 are returned only if port counter

|		       function = 3.
|
|			2      counter,,   process   number   of   owner.
|			       Counter	is  incremented whenever the port
|			       counters are set (initial value =-1)
|			3      CI-20 microcode version
|			4      path 0 ACKs
|			5      path 0 NAKs
|			6      path 0 no responses
|			7      path 1 ACKs
|			8      path 1 NAKs
|			9      path 1 no responses
|		       10      number of datagrams discarded
|		       11      total number of transmits
|		       12      total number of receives
|		       13      node on which data is being collected
|		       14      packets received with CRC errors
|		       15      mover parity errors,, CBUS parity errors
|		       16      register PLIPE errors,, DATA PLIPE errors
|		       17      channel errors,, EBUS parity errors
|		       18      spurious channel errors,,  CBUS	available
|			       timeouts
|		       19      spurious  receive  attentions,,	 spurious
|			       transmit attentions
|		       20      transmit buffer parity  errors,,  transmit
|			       timeouts
|
|   110      .DGRSC    Read SPEAR counter (the number  of  SPEAR  packets
|		       queued  to  be  written	to  the error file).  The
|		       calling program should execute this function  both
|		       before  and after running any diagnostic test.  If
|		       the value of the SPEAR counter changes, then SPEAR
|		       entries	have  been produced, some of which may be
|		       relevant to the diagnostic.  This counter is never
|		       reset and never decremented.
|
|		       Word    Contents
|
|			0      function code
|			1      returned value of SPEAR counter
|
|   111      .DGENB    Enable/disable use of  .DGACH  (assign  controller
|		       and   all   devices).	This  function	allows	a
|		       diagnostic to gain control of the CI  by  allowing
|		       it  to assign the CI to itself for the duration of
|		       the test.  When the diagnostic has  completed  its
|		       testing,  it  should  issue  DIAG% function .DGRCH
|		       (release channel) and then issue .DGENB	a  second
|		       time to make the CI available to the system.
|
|		       Word    Contents
|
|			0      function code
|			1      RH20 slot number (7 for CI-20)
|			2      0 to disable .DGACH  and  prevent  further
|			       interruption of CI availability to system;
|			       -1 to enable .DGACH

   The device  address	given  in  some  of  the  argument  blocks  is	a
   machine-dependent  specification  for  the  channel	and  device to be
   assigned.  The devices that can be assigned must be	attached  to  the
   RH20  controller  and  must be mounted by a process with either WHEEL,
   OPERATOR, or MAINTENANCE capability enabled.  The format of the device

   address word is:

 
	  0	    2 3       9 10     23 24	 29 30		35
	 !=======================================================!
	 !  address  ! device  !    0	 !  unit   !   subunit	 !
	 !   type    !	code   !	 !	   !		 !
	 !=======================================================!

 
   DIAG ERROR MNEMONICS:

   DIAGX1:   Invalid function
   DIAGX2:   Device is not assigned
   DIAGX3:   Argument block too small
   DIAGX4:   Invalid device type
   DIAGX5:   WHEEL, OPERATOR, or MAINTENANCE capability required
   DIAGX6:   Invalid channel command list
   DIAGX7:   Illegal to do I/O across page boundary
   DIAGX8:   No such device
   DIAGX9:   Unit does not exist
   DIAG10:   Subunit does not exist
   DIAG11:   Device is already on-line



			     DIBE     JSYS 212

   Dismisses the process until the designated file input buffer is empty.

   ACCEPTS IN AC1:  file designator

   RETURNS     +1:  always

   Returns immediately	if  the  designator  is  not  associated  with	a
   terminal.

   The DOBE monitor call can be used to dismiss  the  process  until  the
   designated file output buffer is empty.

   Generates an illegal instruction interrupt on error conditions below.

   DIBE ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			      DIC     JSYS 133

   Deactivates the specified  software	interrupt  channels.   (Refer  to
   Section 2.6.1.)

   ACCEPTS IN AC1:  process handle

	      AC2:  36-bit word
		    Bit n means deactivate channel n

   RETURNS     +1:  always

   Software interrupt requests to deactivated channels are ignored except
   for	interrupts generated on panic channels.  Panic channel interrupts
   are passed to the closest  superior	process  that  has  the  specific
   channel enabled.

   The AIC monitor call is used to activate specified software	interrupt
   channels.

   Generates an illegal instruction interrupt on error conditions below.

   DIC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			      DIR     JSYS 130

   Disables the software interrupt system for a process.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always

   If software interrupt  requests  are  generated  while  the	interrupt
   system  is  disabled, the requests are remembered and take effect when
   the interrupt system is reenabled unless an intervening  CIS  call  is
   executed.   However,  interrupts  on  panic	channels  will	still  be
   generated even though the system is disabled.

   In addition, if the CTRL/C terminal code is assigned to a channel,  it
   will  still	generate  an interrupt that cannot be disabled with a DIR
   call.  CTRL/C interrupts can be disabled by deactivating  the  channel
   to which the code is assigned or by monitor action.

   The EIR monitor call can be used  to  enable  the  software	interrupt
   system for a process.

   Generates an illegal instruction interrupt on error conditions below.

   DIR ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			     DIRST     JSYS 41

   Translates the specified  36-bit  user  or  directory  number  to  its
   corresponding  string  and writes it to the given destination.  When a
   user number is given, the string returned is  the  corresponding  user
   name  without  any punctuation.  When a directory number is given, the
   string returned is the  corresponding  structure  and  directory  name
   including punctuation (structure:<directory>).

   ACCEPTS IN AC1:  destination designator

	      AC2:  user or directory number

   RETURNS     +1:  failure, with error code in AC1.

	       +2:  success,  string  written  to  destination,   updated
		    string pointer, if pertinent, in AC1

   The RCDIR monitor call can be used to translate a directory string  to
   its	corresponding  directory  number.   The RCUSR monitor call can be
   used to translate a user name string to its corresponding user number.

   DIRST ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DELFX6:   Internal format of directory is incorrect
   DIRX1:    Invalid directory number
   DIRX2:    Insufficient system resources
   DIRX3:    Internal format of directory is incorrect
   STRX01:   Structure is not mounted
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     DISMS     JSYS 167

   Dismisses this process for the specified amount of time.

   ACCEPTS IN AC1:  number of milliseconds for which the process is to be
		    dismissed

   RETURNS     +1:  when the elapsed time is up

   The maximum argument specifiable  in  AC1  is  400,,0  (18  hours,  38
   minutes,  28  seconds,  and	864  milliseconds).   If  this	value  is
   exceeded, the argument is ignored and  the  maximum	dismiss  time  is
   used.   The	time  resolution  is  limited to the scheduling frequency
   (about 20 milliseconds).



			     DOBE     JSYS 104

   Dismisses the process until	the  designated  file  output  buffer  is
   empty.

   ACCEPTS IN AC1:  destination designator

   RETURNS     +1:  always

   Returns immediately if designator is not associated with a terminal.

   The DIBE monitor call can be used to dismiss  the  process  until  the
   designated file input buffer is empty.

   Generates an illegal instruction interrupt on error conditions below.

   DOBE ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     DSKAS     JSYS 244

   Assigns or deassigns specific disk addresses.

   RESTRICTIONS:    requires WHEEL or OPERATOR capabilities enabled.

   ACCEPTS IN AC1:  B0(DA%DEA) deassign the specified  address.   If  the
			       address	is  currently  assigned,  control
			       returns to the next instruction	following
			       the  call (+1 return).  If the address was
			       not previously assigned, a BUGCHK occurs.

		    B1(DA%ASF) assign a  free  page  near  the	specified
			       address.    Assignment	is  on	the  same
			       cylinder  as  the  specified  address,  if
			       possible, or on a nearby cylinder.  If the
			       specified address is 0, a page is assigned

			       on  a  cylinder	that is at least one-half
			       free.  If the assignment is  not  possible
			       because	the disk is full, control returns
			       to  the	next  instruction  following  the
			       call.

		    B2(DA%CNV) convert the specified address according to
			       the setting of B3(DA%HWA).

		    B3(DA%HWA) the  specified  address	is   a	 hardware
			       address.    If	this   bit  is	off,  the
			       specified address is a software address.

		    B4(DA%INI) initialize  a  private  copy  of  the  bit
			       table.

		    B5(DA%WRT) write the private copy of the bit table to
			       a new bit table file.

|		    B6(DA%AIN) abort the initialization of a private copy
|			       of the bit table.

		    B18-35     disk address
		    (DA%ADR)

	      AC2:  device designator of structure.  If DA%CNV is  on  in
		    AC1, this argument is not required.

   RETURNS     +1:  failure,  address  already	assigned  or  cannot   be
		    assigned

	       +2:  success, address assigned in AC1

		    Generates an illegal instruction interrupt	on  error
		    conditions below.

   DSKAS ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required



			     DSKOP     JSYS 242

   Allows  the	process  to  reference	physical  disk	 addresses   when
   performing  disk transfers.	This monitor call requires the process to
   have WHEEL, OPERATOR, or MAINTENANCE capability enabled  to	read  and
   write  data.   However,  a  process	with  only MAINTENANCE capability
   enabled can write data only if it is using physical addresses (.DOPPU)
   and writing to a unit that is not part of a mounted structure.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled.   Some
		    functions	can   be   performed   with   MAINTENANCE
		    capabilities enabled.

   ACCEPTS IN AC1:  B0-1(DOP%AT)   field  indicating  the  address  type.
				   For	  physical   channel   and   unit
				   addresses, the value of the	field  is

				   1(.DOPPU) and the remainder of AC1 is
				   B2-6(DOP%CN)    channel number
				   B7-12(DOP%UN)   unit number
				   B13-35(DOP%UA)  unit address
				   For physical channel, controller,  and
				   unit numbers, refer to AC4.

				   For	a  structure   and   a	 relative
				   address,  the  value  of  the field is
				   2(.DOPSR) and the remainder of AC1 is
				   B2-10(DOP%SN)   structure   designator
|						   flag   (0   is  public
|						   structure).	 A  value
						   of	 -1   means   the
						   structure is indicated
						   by	 the	structure
						   designator  (refer  to
						   Section 2.4) in AC4.
				   B11-35(DOP%RA)  relative address

				   Any other values for  this  field  are
				   illegal.

	      AC2:  control flags in the left half and	a  count  of  the
		    number  of	words to transfer in the right half.  The
		    control flags are:

		    B9(DOP%NF)	 use   values	in   AC4   for	 channel,
				 controller, and unit numbers
		    B10(DOP%EO)  error if unit offline
		    B11(DOP%IL)  inhibit error logging
		    B12(DOP%IR)  inhibit error recovery
|		    B13(DOP%PS)  physical sector reference.  Intended  to
|				 permit  homeblocks  to  be  read/written
|				 when MSTR% JSYS functin  .MSRSP  is  not
|				 equal to MSTR% JSYS function .MSTSP.
		    B14(DOP%WR)  write data to the disk.  If this bit  is
				 off, read data from the disk.
		    B18-35	 word count.  If this count is less than
		    (DOP%CT)	 or  equal  to	1000,  the  data  to   be
				 transferred   cannot	straddle  a  page
				 boundary.   Thus  the	caller's   buffer
				 should  start	at  a  page  boundary and
				 cannot be longer than one page.

				 If this count is  more  than  1000,  the
				 data  to  be  transferred can straddle a
				 page boundary, so  the  caller's  buffer
				 need  not  start on a page boundary, and
				 the buffer can be larger than one  page.
				 Two restrictions apply, however.  First,
				 the buffer must be  a	multiple  of  the
				 size  of  the	sectors on the disk being
				 read or  written.   (Obtain  the  sector
				 size by using the .MSRUS function of the
				 MSTR JSYS.) Second, no error  processing
				 is done (the JSYS executes as though the
				 DOP%IL and DOP%IR bits were set).  On an
				 error,  the  pages must be read one at a
				 time to  determine  which  pages  caused
				 errors.

	      AC3:  address in caller's address space from which data  is

		    written or into which data is read.

	      AC4:  device designator of the  structure.   This  word  is
		    used if the value given for DOP%SN is -1.
					     or
		    physical channel, controller,  and	unit  numbers  if
		    B9(DOP%NF) in AC2 is on.  In this case,

		    B0-11(DOP%C2)   channel number
		    B12-23(DOP%K2)  controller number
		    B13-35(DOP%U2)  unit number

   RETURNS     +1:  always, AC1 is nonzero if an error occurred, or  zero
		    if no error occurred.

   If an error occurs and DOP%IL is on in the call, no error  logging  is
   performed.	If  DOP%IL  is	off, the standard system error logging is
   performed.

   If an error occurs and DOP%IR is on in the call,  no  retries  or  ECC
   corrections,  if  applicable,  are  attempted.   If DOP%IR is off, the
   standard system error recovery procedure is followed.

   An error occurs if the format for channel, controller, and unit number
   is used with Release 4 or any previous monitor.

   Generates an illegal instruction interrupt on error conditions below.

   DSKOP ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required
   DSKOX1:   Channel number too large
   DSKOX2:   Unit number too large
   DSKOX3:   Invalid structure number
   DSKOX4:   Invalid address type specified
   DECRSV:   DEC-reserved bits not zero



			     DTACH     JSYS 115

   Detaches the controlling terminal from the current  job.   (The  ATACH
   call  with bit 1 (AT%NAT) of AC2 set can be used to detach a job other
   than the current job.) A console-detached entry  is	appended  to  the
   accounting data file.

   RETURNS     +1:  always

   The DTACH call is ignored if the job is already detached.

   The ATACH monitor call is used to attach the controlling terminal to a
   specified job.



			      DTI     JSYS 140

   Deassigns a terminal interrupt code.

   ACCEPTS IN AC1:  terminal interrupt code; refer to Section 2.6.6

   RETURNS     +1:  always

   The DTI call is a  no-op  if  the  specified  terminal  code  was  not
   assigned by the current process.

   The ATI monitor call is used to assign a terminal code.

   Generates an illegal instruction interrupt on error conditions below.

   DTI ERROR MNEMONICS:

   TERMX1:   Invalid terminal code



			     DUMPI     JSYS 65

   Reads data words into memory in unbuffered data mode.  The  file  must
   be  open  for data mode 17.	(Refer to Section 2.4.7.5 for information
   about unbuffered magnetic tape I/O.)

   ACCEPTS IN AC1:  JFN

	      AC2:  B0(DM%NWT)	do not wait for completion  of	requested
				operation

		    B18-35	address of command list in memory
		    (DM%PTR)

   RETURNS     +1:  failure, error code  in  AC1,  pointer  to	offending
		    command in AC2

	       +2:  success, pointer in AC2 updated to last command

   The use of B0(DM%NWT) allows data  operations  to  be  double-buffered
   with  a resulting increase in speed.  When this bit is on, DUMPI/DUMPO
   returns immediately after the request  is  queued.	This  allows  the
   program  to	overlap  computations  with I/O transfers.  If the second
   request is then made, the program is blocked until the  first  request
   is  completed.   Generally,	for  a sequence of overlapped DUMPI/DUMPO
   calls, return from the Nth call indicates that the Nth-1  request  has
   completed  and  that  the Nth request is now in progress.  This bit is
   implemented only for magnetic tape.

   The GDSTS call  can	be  used  after  the  transfer	is  completed  to
   determine the number of bytes read.

   If an error occurs on the Nth request, the failure return is given  on
   the Nth+1 call, and the Nth+1 request is ignored.  This means that the
   program will discover an error on a request only after making the next
   request.   The  next  request is ignored to prevent improper operation

   and must be reissued after the error has been  processed.   The  GDSTS
   call can be executed to determine the cause for the error.

   COMMAND LIST FORMAT

   Three types of entries may occur in the command list.

	1.  IOWD n, loc - Causes n words to be transferred from the  file
	    to	locations  loc	through  loc+n-1  of  the process address
	    space.  The  next  command	is  obtained  from  the  location
	    following  the  IOWD.   For  magnetic-tape files, 1 IOWD word
	    reads 1 physical  tape  record.   For  labeled  magnetic-tape
	    files, the data format must be "U".

	    The IOWD pseudo-op generates XWD -n,loc-1.

	2.  XWD 0, y - Causes the next command to be taken from  location
	    y.	Referred to as a GOTO word.

	3.  0 - Terminates the command list.

 
   DUMPI ERROR MNEMONICS:

   DUMPX1:   Command list error
   DUMPX2:   JFN is not open in dump mode
   DUMPX3:   Address error (too big or crosses end of memory)
   DUMPX4:   Access error (cannot read or write data in memory)
   DUMPX5:   No-wait dump mode not supported for this device
   DUMPX6:   Dump mode not supported for this device
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   IOX1:     File is not opened for reading
   IOX4:     End of file reached
   IOX5:     Device or data error



			     DUMPO     JSYS 66

   Writes data words from memory in unbuffered data mode.  The file  must
   be  open  for data mode 17.	(Refer to Section 2.4.7.5 for information
   about unbuffered magnetic tape I/O.)

   ACCEPTS IN AC1:  JFN

	      AC2:  B0(DM%NWT)	do not wait for completion  of	requested
				operation

		    B18-35	address of command list in memory
		    (DM%PTR)

   RETURNS     +1:  failure, error code  in  AC1,  pointer  to	offending
		    command in AC2

	       +2:  success, pointer in AC2 updated to last command

   This call locks in memory the pages to be transferred.  Any attempt to
   write to these pages while DUMPO has them locked results in an illegal
   memory reference.

   The use of B0(DM%NWT) allows data  operations  to  be  double-buffered
   with  a resulting increase in speed.  When this bit is on, DUMPI/DUMPO
   returns immediately after the request  is  queued.	This  allows  the
   program  to	overlap  computations  with I/O transfers.  If the second
   request is then made, the program is blocked until the  first  request
   is  completed.   Generally,	for  a sequence of overlapped DUMPI/DUMPO
   calls, return from the Nth call indicates that the Nth-1  request  has
   completed  and  that  the Nth request is now in progress.  This bit is
   implemented only for magnetic tape.

   COMMAND LIST FORMAT

   Three types of entries may occur in the command list.

	1.  IOWD n, loc - Causes n words from loc through loc+n-1  to  be
	    transferred  from the process address space to the file.  The
	    next command is obtained  from  the  location  following  the
	    IOWD.  For mag-tape files, 1 IOWD word writes 1 physical tape
	    record.  For labeled mag-tape files, the data format must  be
	    "U".

 
					NOTE

		Dump mode output to a labeled tape can	override  the
		block-size  limit  specified  in  the  GTJFN.  If any
		write produces a block in  excess  of  the  specified
		block-size  parameter, then the file can be read only
		in dump mode.

 
	    The IOWD pseudo-op generates XWD -n,loc-1.

	2.  XWD 0, y - Causes the next command to be taken from  location
	    y.	Referred to as a GOTO word.

	3.  0 - Terminates the command list.

 
   The GDSTS call  can	be  used  after  the  transfer	is  completed  to
   determine the number of bytes written.

   DUMPO ERROR MNEMONICS:

   DUMPX1:   Command list error
   DUMPX2:   JFN is not open in dump mode
   DUMPX3:   Address error (too big or crosses end of memory)
   DUMPX4:   Access error (cannot read or write data in memory)
   DUMPX5:   No-wait dump mode not supported for this device
   DUMPX6:   Dump mode not supported for this device
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   IOX2:     File is not opened for writing
   IOX5:     Device or data error

   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     DVCHR     JSYS 117

   Returns the characteristics of the specified device.

   ACCEPTS IN AC1:  JFN or device designator

   RETURNS     +1:  always, with

	      AC1:  containing the device designator (even if a  JFN  was
		    given).
	      AC2:  containing the device characteristics word.
|	      AC3:  containing the job number  to  which  the  device  is
		    assigned  in the left half and the unit number in the
		    right half.  If the device is a structure or does not
		    have units, the right half is -1.

   The left half of AC3 contains -1 if the device is not assigned to  any
   job or -2 if the device allocator has ownership of the device.

			   Device Characteristics Word

   Bit		  Symbol	      Meaning

   0		  DV%OUT	 device can do output
   1		  DV%IN 	 device can do input
   2		  DV%DIR	 device has a directory
   3		  DV%AS 	 device is assignable with ASND
   4		  DV%MDD	 device has multiple directories
   5		  DV%AV 	 device is available or assigned to this
				 job
   6		  DV%ASN	 device is assigned by ASND
   8		  DV%MNT	 device is mounted
   9-17 	  DV%TYP	 device type
				   0	  .DVDSK       disk
				   2	  .DVMTA       magnetic tape
				   7	  .DVLPT       line printer
				   10	  .DVCDR       card reader
				   11	  .DVFE        front-end
						       pseudo-device
				   12	  .DVTTY       terminal
				   13	  .DVPTY       pseudo-terminal
				   15	  .DVNUL       null device
				   16	  .DVNET       ARPA network
				   22	  .DVDCN       DECnet active
						       component
				   23	  .DVSRV       DECnet passive
						       component
|  18		  DV%PSD	 device is a pseudo-device
   20-35	  DV%MOD	 data mode in which device can be opened
				   B20	  DV%M17       dump mode
				   B27	  DV%M10       image mode
				   B34	  DV%M1        small buffer mode

				   B35	  DV%M0        normal mode
   Generates an illegal instruction interrupt on error conditions below.

   DVCHR ERROR MNEMONICS:

   DEVX1:    Invalid device designator
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer



			      EIR     JSYS 126

   Enables the software  interrupt  system  for  a  process.   (Refer  to
   Section 2.4.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always

   The DIR monitor call can be used to	disable  the  software	interrupt
   system for a process.

   Generates an illegal instruction interrupt on error conditions below.

   EIR ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			      ENQ     JSYS 513

   Requests access to a specific resource by placing  a  request  in  the
   queue  for that resource.  This call can be used to request any number
   of resources.

   Refer to the TOPS-20 Monitor Calls User's Guide for	an  overview  and
   description of the Enqueue/Dequeue facility.

|  RESTRICTIONS:    Some functions  require  enabled  WHEEL  or  OPERATOR
|		    capability	to  acquire  system  resource  locks,  or
|		    enabled WHEEL, OPERATOR, or ENQ capability to acquire
|		    global resource locks.

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

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The available functions are as follows:

      Code   Symbol			   Meaning

	0    .ENQBL	    Queue the  requests  and  block  the  process
			    until  all requested locks are acquired.  The
			    error return is taken only if the call is not
			    correctly specified.

	1    .ENQAA	    Queue the requests and acquire the locks only
			    if	all  requested	resources are immediately
			    available.	No requests are  queued  and  the
			    error  return  is  taken  if  any  one of the
			    resources is not available.

	2    .ENQSI	    Queue  the	requests.    If   all	requested
			    resources  are  immediately  available,  this
			    function is identical to the .ENQBL function.
			    If	 all   resources   are	 not  immediately
			    available, the request is queued and the  the
			    call  fails with the ENQX6 error.  A software
			    interrupt  will  occur  when  all	requested
			    resources have been given to the process.

	3    .ENQMA	    Modify the	access	of  a  previously  queued
			    request.  (Refer to EN%SHR below.) The access
			    of each lock in this request is compared with
			    the  access  of  each  lock in the previously
			    queued request.  If the two accesses are  the
			    same, no modification is needed or made.

			    If the access in this request is  shared  and
			    the   access   in  the  previous  request  is
			    exclusive, the call succeeds.  If the  access
			    in	this  request is exclusive and the access
			    in	the  previous  request	is  shared,  this
			    function returns an error unless this process
			    is the only user of the lock.  If the  caller
			    is	the  only  user  of  this  lock, the call
			    succeeds.  The error return is also taken if:

			    1.	Any one of the specified locks	does  not
				have a pending request.

			    2.	Any one  of  the  specified  locks  is	a
				pooled resource.

			    This function checks each lock specified, and
			    the access is changed for all locks that were
			    given correctly.  If the call fails, the user
			    must  execute  the ENQC call to determine the
			    current state of each lock.

   The format of the argument block is as follows:

      Word   Symbol			   Meaning

	0    .ENQLN	    length  of	the  header  and  the  number  of
			    requested  locks in the left half, and length
			    of argument block in the right half.

	1    .ENQID	    software interrupt channel number in the left
			    half, and the request ID in the right half.

	2    .ENQLV	    flags and level number in the left half,  and
|			    JFN,  -1,  -2,  or	-3 in the right half (see
|			    word .ENQMS below)

	3    .ENQUC	    pointer to a  string  or  a  5B2+33-bit  user
|			    code.  (See word .ENQMS below)

	4    .ENQRS	    number of resources in pool in the left  half
			    and  number  of  resources	requested  in the
			    right half, or 0 in the left half and a group
|			    number  in	the right half.  (See word .ENQMS
|			    below)

	5    .ENQMS	    address of a resource mask block.

|			    Words  .ENQLV  through   .ENQMS   should   be
|			    repeated for each resource requested.

 
   The argument block is divided into two logical sections:  a header and
   individual  requests  for  each desired lock.  Words .ENQLN and .ENQID
|  form the header.  Word .ENQLV through word .ENQMS form the  individual
|  request  and are repeated for each lock being requested.  The words in
   the argument block are described in the following paragraphs.

   .ENQLN

   The length of the header (.ENHLN) is contained in bits  0  through  5.
   Currently,  the length of the header is two words.  (Note that a given
   length of zero or one is assumed to be equal to a length of two.)  The
   number  of  locks  being  requested	(.ENNLK)  is  contained in bits 6
   through 17, and the length of the argument block (.ENALN) is contained
   in bits 18 through 35.

   .ENQID

   The software interrupt channel specifies the number of the channel  on
   which  to generate an interrupt with the .ENQSI function.  The request
   ID is an 18-bit user-generated value used to identify  the  particular
|  resource.   This  ID is not currently used by the system but, instead,
|  is stored for future expansion of the facility.

   .ENQLV

   The following flags are defined:

   B0(EN%SHR)	  Access to this resource is to be shared.  If	this  bit
		  is not set, access to the resource is to be exclusive.

   B1(EN%BLN)	  Ignore the level number associated with this	resource.
		  Sequencing   errors	in  level  numbers  will  not  be
		  considered  fatal,  and  execution  of  the  call  will
		  continue.  If a sequencing error occurs, the successful
		  return is taken, and AC1 will  contain  an  error  code

		  indicating the sequencing error that occurred.

   B2(EN%NST)	  Allow ownership of this lock to be nested to any  level
		  within  a  process.	This  means  that  a  process can
		  request this resource again even though it already owns
		  it.	If  the  process  has a request in the resource's
		  queue or if the process  already  owns  the  lock,  the
		  ownership  of the lock is nested to a depth one greater
		  than the current depth.  If the process does not have a
		  request  in  the  resource's queue, the setting of this
		  bit has no effect, and the execution of  the	ENQ  call
		  continues.   When  a process has a nested lock, it must
		  DEQ the resource as many times as it	ENQed  it  before
		  the resource becomes available to other processes.

   B3(EN%LTL)	  Allow a long-term lock on this resource.  This notifies
		  the  system  that  this  resource  will  be  locked and
		  unlocked many times in a short period of time.  Setting
		  this bit permits a program to run faster if it is doing
		  multiple locks and unlocks on the same resource because
		  the argument block data is not deleted immediately from
		  the ENQ/DEQ data base when  a  DEQ  call  is	executed.
		  Thus,  the  time  required  to  re-create  the  data is
		  reduced.

   B9-17(EN%LVL)  Level number associated with this resource.

   The request is not queued and the error return is taken if  EN%BLN  is
   not set and

	1.  A resource with a level number less  than  or  equal  to  the
	    highest numbered resource requested so far is specified.

	2.  The level number of the current request does  not  match  the
	    level number supplied on previous requests for this resource.

   The right half of .ENQLV specifies the type of access desired for  the
   resource.   If  a  JFN  is  given, the file associated with the JFN is
   subject to the standard access protection of  the  system.	The  file
   associated  with  the  JFN  in the right half of .ENQLV must be opened
   before the ENQ is performed or an error will be generated.  If  -1  is
   given,  the resource can be accessed only by processes of the job.  If
   -2 is given, the resource can be accessed by any job  on  the  system.
   (The process must have ENQ capability enabled to specify -2.) If -3 is
   given, the resource can be accessed only by processes that have  WHEEL
   or OPERATOR capability enabled.

   .ENQUC

   This word is either a byte pointer or a 33-bit user	code,  either  of
   which  serves  to  uniquely	identify the resource to all users.  This
   quantity is the second part of the resource name.  (JFN, -1, -2, or -3
   is  the  first  part  of  the  resource  name.)  The  system  makes no
   association between these identifiers and any physical resource.

   The string identified by the byte pointer can  contain  bytes  of  any
   size  (from 1 to 36 bits), and is terminated by a null byte.  The byte
   size is specified by the byte pointer.   The  maximum  length  of  the
   string (including the terminating null byte) is 50 words.

   .ENQRS

   This word is used to  allocate  multiple  resources	from  a  pool  of

   identical  resources.   The left half contains the number of resources
   in the pool, and is	a  parameter  agreed  upon  by	all  users.   All
   requests  for  the  same  pooled resource must agree with the original
   count or the call fails.  The number of resources requested	from  the
   pool must be greater than zero if a pool exists, and must be less than
   or equal to the number in the pool.

   If the left half of this word is zero, the  system  assumes	only  one
   resource of the specific type exists.  In this case, if the right half
   of this word is positive, it is interpreted as the number of the group
   of users who can simultaneously access the resource.

   .ENQMS

   Obtains a single  lock  representing  many  specific  resources.   For
   example,  a	lock  can  be obtained on a particular data base, and the
   specific resources requested can be individual records  in  that  data
   base.

   This word contains an address of a mask block, consisting of  a  count
   word  and  a  group	of  mask words.  The first word of the mask block
   contains a count (in the right half-word) of the number  of	words  in
   the block, including the count word.  The remaining words each contain
   36 mask bits, where each bit represents a  specific	resource  of  the
   lock.  The maximum length of the mask block is 16 words.  All requests
   for the resources associated with the mask block must specify the same
   length  for	the block or an error return is taken.	Also, when a mask
   block is specified, the ENQ call must request exclusive access to  the
   resource  and the left half of word .ENQRS of the lock request must be
   zero.

   The set of resources comprising the lock is a parameter agreed upon by
   all	users.	 A  process can obtain exclusive access to all or some of
   the specific resources comprising the lock.	When a	process  requires
   exclusive  access  to  all the resources, it executes an ENQ call (for
   exclusive access) and does not specify a  mask  block.   A  successful
   return  is  given  if there are no other processes that have issued an
   ENQ call for that lock.   Otherwise,  the  process  blocks  until  the
   requested resources are available.

   When a process requires exclusive  access  to  some	of  the  specific
   resources  comprising the lock, it sets up the mask block and sets the
   bits corresponding to the specific resources it wants  to  lock.   The
   process then executes an ENQ call for exclusive access.  On successful
   execution of the ENQ call, the process has an exclusive lock  for  the
   resources  represented by the bits on in the mask.  The process blocks
   if another process owns an exclusive lock on  the  resource	and  that
   process' ENQ call has not specified a mask block.

   Once a mask block has been set up for a  set  of  specific  resources,
   subsequent  requests for a different set of resources will be honored.
   The set of resources being requested is considered  different  if  the
   bits on in one process' mask block are not on in another process' mask
   block.  When a subsequent request is  given	for  resources	that  are
   currently  locked  by  a process, the process with the request blocked
   until the last of the currently locked resources is	dequeued  by  the
   owner of the lock.

   A process can dequeue all or part of the original  ENQ  call  request.
   When  a DEQ call is executed, the bits on in the mask block of the DEQ
   call are compared with the bits on in  the  original  ENQ  call.   The
   resources  not  being dequeued remain locked and must be dequeued by a
   subsequent DEQ call.  This action allows a process to lock a number of

   resources  all at once, and then to release individual resources as it
   finishes with them.	However, a process cannot execute subsequent  ENQ
   calls  to  request  additional  resources  from those requested in its
   original ENQ call.

   ENQ ERROR MNEMONICS:

   DESX5:    File is not open
   ENQX1:    Invalid function
   ENQX2:    Level number too small
   ENQX3:    Request and lock level numbers do not match
   ENQX4:    Number of pool and lock resources do not match
   ENQX5:    Lock already requested
   ENQX6:    Requested locks are not all locked
   ENQX8:    Invalid access change requested
   ENQX9:    Invalid number of blocks specified
   ENQX10:   Invalid argument block length
   ENQX11:   Invalid software interrupt channel number
   ENQX12:   Invalid number of resources requested
   ENQX13:   Indirect or indexed byte pointer not allowed
   ENQX14:   Invalid byte size
   ENQX15:   ENQ/DEQ capability required
   ENQX16:   WHEEL or OPERATOR capability required
   ENQX17:   Invalid JFN
   ENQX18:   Quota exceeded
   ENQX19:   String too long
   ENQX20:   Locked JFN cannot be closed
   ENQX22:   Invalid mask block length
   ENQX23:   Mismatched mask block lengths
   DESX8:    File is not on disk



			     ENQC     JSYS 515

   Returns  the  current  status  of  the  given  resource  and   obtains
   information	about  the  state  of the queues.  This monitor call also
   allows privileged processes to manipulate access rights to the  queues
   and to perform other utility functions on the queue structure.

   Refer to the TOPS-20 Monitor Calls User's Guide for	an  overview  and
   description of the Enqueue/Dequeue facility.

   The ENQC monitor call has two calling sequences, depending on  whether
   the	process is obtaining status information or is modifying the queue
   structure.

   Obtaining Status Information

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

   ACCEPTS IN AC1:  function code (.ENQCS)

	      AC2:  address of argument block

	      AC3:  address of block in which to place status

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The function .ENQCS returns the status of the specified resources.

   The argument block is identical in format to the ENQ and DEQ  argument
   blocks.  (Refer to the ENQ monitor call description.)

   The status block has a 3-word entry for each resource specified in the
   argument  block.   This  entry  reflects  the  current  status  of the
   resource and has the following format:

 
	  0			   17 18		       35
	 !=======================================================!
	 !	  flag bits indicating status of resource	 !
	 !=======================================================!
	 !		     36-bit time stamp			 !
	 !=======================================================!
	 ! # of processes with lock  !	      request ID	 !
	 !=======================================================!

 
   The following flag bits are currently defined.

   B0(EN%QCE)	  An error has occurred  in  the  corresponding  resource
		  request  and	bits  18-35  contain an appropriate error
		  code.

   B1(EN%QCO)	  This process owns the lock.
   B2(EN%QCQ)	  This process is in the queue waiting for this resource.
		  This	bit is set if B1(EN%QCO) is set because a request
		  remains in the queue until a DEQ call is given.

   B3(EN%QCX)	  The lock has been allocated for exclusive access.

   B4(EN%QCB)	  This process is in  the  queue  waiting  for	exclusive
		  access  to the resource.  This bit is off if B2(EN%QCQ)
		  is off.

   B9-17(EN%LVL)  The level number of the resource.

   B18-35(EN%JOB) Job number of the owner of the lock.	 For  locks  with
		  shared access, this value will be the job number of one
		  of the  sharers.   However,  this  value  will  be  the
		  current  job's  number if the current job is one of the
		  sharers.  If the lock is not owned, the  value  is  -1.
		  If   B0(EN%QCE)   is	 on,   this  field  contains  the
		  appropriate error code.

   The time stamp indicates the last time a process was given  access  to
   the resource.  The time is in the universal date-time standard.  If no
   process currently has access to the resource, the word is zero.

   The number returned in the left half of the third word  indicates  the
   number of processes that currently have the resource locked for either
   exclusive access or shared access.

   The request ID is either the request ID of the current process if that
   process is in the queue, or the request ID of the owner of the lock.

   Modifying the Queue Structure

|  RESTRICTIONS:    These functions require  enabled  WHEEL  or  OPERATOR
|		    capability.

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

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The available functions, along with their argument block formats,  are
   as follows:

	Function     Argument Block	   Meaning

	.ENQCG	  One word containing	   Return the ENQ/DEQ quota for
		  a job number in the	   the specified job. The quota
		  right half. The left	   is returned in AC1.
		  half is ignored.

	.ENQCC	  One word containing	   Change the ENQ/DEQ quota for
		  the new quota in the	   the specified job. The process
		  left half and a job	   executing the call must have
		  number in the right	   WHEEL capability enabled or an
		  half. 		   error code is returned.

	.ENQCD	  A block of n words.	   Dump the ENQ/DEQ locks and
		  The first word is the    queue entries into the
		  length of the block (n). argument block. The process
		  Remaining words contain  executing the call must have
		  the returned		   WHEEL capability enabled or an
		  data. (See below.)	   error code is returned.

   The data returned in the argument  block  concerns  both  the  ENQ/DEQ
   locks  and  the  queues.  The data concerning the locks is in a 4-word
   block of the following format:

 
	       0	   8 9		17 18			    35
	      !=======================================================!
      .ENQDF  !    flags    !level number ! OFN, 40000+job#, -2, or -3!
	      !=======================================================!
      .ENQDR  !  total resources in pool  ! # of resources remaining  !
	      !=======================================================!
      .ENQDT  ! 	  time stamp of last request locked	      !
	      !=======================================================!
      .ENQDC  !       user code of lock or beginning of string	      !
	      !=======================================================!

 
   If there are no pooled resources, word .ENQDR has the format:

 
	       0			17 18			    35
	      !=======================================================!
      .ENQDR  ! 	    0		  !	  group number	      !
	      !=======================================================!

   The data concerning the queues is in a 2-word block of  the	following
   format:

 
	       0	   8 9		17 18			    35
	      !=======================================================!
      .ENQDF  !    flags    !software chan! job # creator queue entry !
	      !=======================================================!
      .ENQDI  !group # or number requested!	   request ID	      !
	      !=======================================================!

   The flags returned in the first word of each block are as follows:

      B0(EN%QCL) This block concerns data about the locks.  If	this  bit
		 is off, the block concerns data about the queues.

      B1(EN%QCO) This process owns the lock.

      B2(EN%QCT) This lock contains a text string.

      B3(EN%QCX) This lock is for exclusive access.

      B4(EN%QCB) This  process	is  blocked  until  exclusive  access  is
		 available.

   ENQC ERROR MNEMONICS:

   ENQX1:    Invalid function
   ENQX2:    Level number too small
   ENQX3:    Request and lock level numbers do not match
   ENQX4:    Number of pool and lock resources do not match
   ENQX5:    Lock already requested
   ENQX6:    Requested locks are not all locked
   ENQX7:    No ENQ on this lock
   ENQX8:    Invalid access change requested
   ENQX9:    Invalid number of blocks specified
   ENQX10:   Invalid argument block length
   ENQX11:   Invalid software interrupt channel number
   ENQX12:   Invalid number of resources requested
   ENQX13:   Indirect or indexed byte pointer not allowed
   ENQX14:   Invalid byte size
   ENQX15:   ENQ/DEQ capability required
   ENQX16:   WHEEL or OPERATOR capability required
   ENQX17:   Invalid JFN
   ENQX18:   Quota exceeded
   ENQX19:   String too long
   ENQX20:   Locked JFN cannot be closed
   ENQX21:   Job is not logged in
   DESX8:    File is not on disk



			     EPCAP     JSYS 151

   Enables the capabilities for the specified process.	(Refer to Section
   2.7.1 for a description of the capability word.)

   ACCEPTS IN AC1:  process handle

	      AC2:  capabilities the process can enable

	      AC3:  capabilities to enable

   RETURNS     +1:  always

   The capabilities in bits 0-8 and bits 18-35 of AC2 are matched (ANDed)
   with  the  corresponding  capabilities of both the calling process and
   the process specified in AC1.  The calling  process	can  only  enable
   those  capabilities	that  both  the  calling  process  and the object
   process have.

   The contents of AC2 are ignored if the process handle in  AC1  is  for
   the current process.

   The RPCAP monitor call can be used to obtain  the  capabilities  of	a
   process.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   EPCAP ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process



			     ERSTR     JSYS 11

   Translates a TOPS-20 error number to its corresponding text string and
   writes  the string to the specified destination.  This error number is
   the one returned in an AC (usually in AC1) on  a  JSYS  error  and  is
   associated  with  a	unique error mnemonic and text string.	The error
   numbers begin at 600010 and are defined in the system file MONSYM.MAC.
   (Refer  to  Appendix  B  for the list of error numbers, mnemonics, and
   text strings.)

   ACCEPTS IN AC1:  destination designator

	      AC2:  LH:  process handle
		    RH:  error number,	or -1 for the most  recent  error
			 in the specified process.  If an error number is
			 specified,  .FHSLF  should  be  specified in the
			 left half of AC2.

	      AC3:  LH:  a negative  count of the maximum number of bytes
			 in the string to be transferred,  or  0  for  no
			 limit
		    RH:  0

   RETURNS     +1:  failure, undefined error number

	       +2:  failure,  string  size  out  of  bounds  or   invalid
		    destination designator

|	       +3:  success, with updated byte pointer in AC1

|  Generates an illegal instruction interrupt on error conditions below.
|
|  ERSTR ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   FRKHX1:   Invalid process handle
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     ESOUT     JSYS 313

   Outputs an error string.  This monitor call reports an  error  in  the
   primary  input stream, and resynchronizes the input transaction.  This
   mechanism is convenient for communicating  with  a  user  who  made	a
   typing  error  and  may  have continued to type.  It also allows error
   messages to have a standard format.

   ACCEPTS IN AC1:  byte pointer to a  string  in  the	caller's  address
		    space.    The   string  is	terminated  with  a  null
		    character.

   RETURNS     +1:  always, with updated byte pointer in AC1

   The ESOUT call waits for the primary output buffer to empty	and  then
   outputs a carriage return, line feed, and question mark to the primary
   output designator.  Next, it  clears  the  primary  input  buffer  and
   outputs the error string to the primary output device.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)



			     FFFFP     JSYS 31

   Finds the first free page in the specified file.  A free page  is  one
   that  is  marked  as  not  being in use.  The FFFFP call is useful for
   finding a nonused page in a file before a PMAP call is  executed  that
   writes into that page.

   ACCEPTS IN AC1:  starting page number in left half, JFN in right half.

   RETURNS     +1:  always, with the JFN in the left half of AC1 and  the
		    page  number  in the right half of AC1, or a fullword
		    -1 in AC1 if there is no free page.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   FFFFP ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Illegal use of terminal designator or string pointer
   DESX5:    File is not open



			     FFORK     JSYS 154

   Freezes one or more processes.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always

   This suspends the processes (as soon as they are  stoppable	from  the
   monitor's  point  of view) in such a way that they can be continued at
   the place they were suspended.   However,  they  do	not  have  to  be
   continued;  they could be killed.

   The FFORK call is ignored if the referenced process is already frozen.

   The RFORK monitor call can be used to resume one or more processes.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   FFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     FFUFP     JSYS 211

   Finds the first used page of the file at or beyond the specified  page
   number.

   ACCEPTS IN AC1:  JFN in the left half, and the starting page number in
		    the right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, page number in the right half of  AC1.   The
		    left half of AC1 is unchanged.

   FFUFP ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator

   DESX3:    JFN is not assigned
   DESX4:    Illegal use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   FFUFX1:   File is not open
   FFUFX2:   File is not on multiple-directory device
   FFUFX3:   No used page found

 

 

|  DELETION - FLHST is now obsolete



			     FLIN     JSYS 232

   Inputs a floating-point number from the specified source.   This  call
   ignores  leading  spaces  and  terminates  on the first character that
   cannot be part of a floating point number.  If  that  character  is	a
   carriage return followed by a line feed, the line feed is also input.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  failure, error code in AC3 and updated string pointer
		    in AC1, if pertinent

	       +2:  success, single-precision, floating-point  number  in
		    AC2 and updated string pointer in AC1, if pertinent

   FLIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    file is not open
   FLINX1:   first character is not blank or numeric
   FLINX2:   number too small
   FLINX3:   number too large
   FLINX4:   invalid format



			     FLOUT     JSYS 233

   Outputs a floating-point number to the specified destination.

   ACCEPTS IN AC1:  destination designator

	      AC2:  normalized, single-precision, floating-point number

	      AC3:  format control word.  (Refer to Section 2.9.1.2.)

   RETURNS     +1:  failure, error code in AC3 and updated string pointer
		    in AC1, if pertinent

	       +2:     success,  updated  string  pointer  in	AC1,   if
		    pertinent

   FLOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    File is not open
   FLOTX1:   Column overflow in field 1 or 2
   FLOTX2:   Column overflow in field 3
   FLOTX3:   Invalid format specified
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged

 

 

   Returns the current account for the specified job.

   RESTRICTIONS:    some  functions  require   Confidential   Information
		    Access, WHEEL, or OPERATOR capabilities enabled.

   ACCEPTS IN AC1:  job number, or -1 for current job

	      AC2:  byte pointer to  string  where  alphanumeric  account
		    designator (if any) is to be stored

   RETURNS     +1:  always, with updated pointer to account string in AC2

   The GACCT monitor call  requires  the  process  to  have  Confidential
   Information	Access,  WHEEL,  or  OPERATOR  capability  enabled if the
   specified job number is not for the current job.

   The CACCT monitor call can be used  to  change  the	account  for  the
   current job.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   GACCT ERROR MNEMONICS:

   GACCX1:   Invalid job number
   GACCX2:   No such job
   GACCX3:   Confidential Information Access capability required



			     GACTF     JSYS 37

   Returns the abccount designator to which the specified file	is  being
   charged.

   ACCEPTS IN AC1:  JFN

	      AC2:  byte pointer to  string  in  caller's  address  space
		    where account string (if any) is to be stored

   RETURNS     +1:  failure, error code in AC1

	       +2:  success,  account  string  returned,  updated  string
		    pointer in AC2

	       +3:  success, 5B2+account number returned in AC2

   The SACTF monitor call can be used to set the  account  designator  to
   which the file is to be charged.

   GACTF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   GACTX1:   File is not on multiple-directory device
   GACTX2:   File expunged
   GACTX3:   Internal format of directory is incorrect



			     GCVEC     JSYS 300

   Returns the entry vector and the UUO locations for  the  compatibility
   package.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with entry vector length in the left half and
		    entry  vector  address  in the right half of AC2, and
		    UUO location in the left half and PC location in  the
		    right half of AC3.

   If use of the compatibility package has been disabled, AC2 contains -1
   on return.  If the compatibility package is not available, AC2 and AC3
   contain 0 on return.

   The SCVEC monitor call can be used to set the  entry  vector  for  the
   compatibility package.

   GCVEC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     GDSKC     JSYS 214

   Returns  information  on  the  given  structure's   disk   usage   and
   availability.  This call is useful in determining storage usage.

   ACCEPTS IN AC1:  device  designator,  must  be  a  designator  for	a
		    structure.	If the generic designator DSK:	is given,
		    the connected structure is assumed.

   RETURNS     +1:  always, with number of  pages  in  use  in	AC1,  and
		    number of pages not in use in AC2.

   GDSKC ERROR MNEMONICS:

   DEVX1:    Invalid device designator



			     GDSTS     JSYS 145

   Returns the status of a device for user I/O.  (Refer  to  Section  2.4
   for	the descriptions of the status bits.) This call requires that the
   device be opened.

   Also, this call will not return the status of  a  device  for  monitor
   I/O.   For  example, if GDSTS is executed after a tape mark is written
   (a monitor I/O operation) the GDSTS call will return the status of the
   last user record written.

   ACCEPTS IN AC1:  JFN

   RETURNS     +1:  always, with device-dependent status bits in AC2, and
		    device-dependent  information  in  AC3.  For magnetic
		    tape, AC3 contains the positive count  of  number  of
		    hardware  bytes actually transferred in the left half
		    and zero in the right half.  For  the  line  printer,
		    AC3  contains  the	last  value  of  the page counter
		    register, or -1 if there is no page counter register.

|  For TCP/IP, the return sequence for network-connection files is:
|
|	      AC2:  connection state (octal values 01 thru 16) in bits	0
|		    thru  3.   Refer to the .TCRCS function of the TCOPR%
|		    JSYS.

	      AC3:  foreign host number (octal)

|	      AC4:  foreign port number (octal)

   The GDSTS call is a no-op for devices without device-dependent  status
   bits.

   The SDSTS monitor call can be used  to  set	the  status  bits  for	a
   particular device.

   Generates an illegal instruction interrupt on error conditions below.

   GDSTS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open



			     GDVEC     JSYS 542

   Returns the entry vector for the Record Management System (RMS).

   RESTRICTIONS:    Requires RMS software (currently available only  with
		    BASIC and COBOL)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with entry vector length in the left half and
		    the entry vector address in the right half of AC2.

   The SDVEC monitor call can be used to set the entry vector for RMS.

   Generates an illegal instruction interrupt on error conditions below.

   GDVEC ERROR MNEMONICS:

   ILINS5:   RMS facility is not available



			      GET     JSYS 200

   Gets  a  save  file,  copying  or  mapping  it  into  the  process  as
   appropriate.   It  updates  the monitor's data base for the process by
   copying the entry vector and the list of program data vector addresses
   (PDVA's)  from  the save file.  (See the .POADD function of the PDVOP%
   monitor call.)

   This call can be executed for  either  sharable  or	nonsharable  save
   files  that	were  created  with  the  SSAVE  or  SAVE  monitor  call,
   respectively.  The file must not be open.

|  RESTRICTIONS:    Some functions require WHEEL or OPERATOR capability.

   ACCEPTS IN AC1:  process handle,, flag bits and a JFN.

	      AC2:  lowest process page number in left half, and  highest
		    process page number in right half;	or the address of
		    an argument block.	If this AC contains page numbers,
		    those  page  numbers control the parts of memory that
		    are loaded when GT%ADR is on.

   RETURNS     +1:  always

   The defined bits in AC1 are as follows:

 
      Bit      Symbol	    Meaning

      19       GT%ADR	    Use the memory address limits given  in  AC2.
			    If this bit is off, all existing pages of the
			    file (according to its directory) are mapped.

      20       GT%PRL	    Preload the  pages	being  mapped  (move  the
			    pages  immediately.)  If this bit is off, the
			    pages are read in from the disk when they are
			    referenced.

      21       GT%NOV	    Do not overlay existing pages and  do  return
			    an error.  If this bit is off, existing pages
			    will be overlaid.

      22       GT%ARG	    If this bit is on, AC2 contains  the  address
			    of an argument block.

      24-35    GT%JFN	    JFN of the save file

   The format of the argument block follows:

 
      Word     Symbol	    Meaning

      0        .GFLAG	    Flags that	indicate  how  the  rest  of  the
			    argument block is to be used.

      1        .GLOW	    Number of the lowest page in the process into
			    which  a  file  page  gets loaded.	This page
			    must  be  within  the  section  specified  by
			    .GBASE.

      2        .GHIGH	    Number of the highest  page  in  the  process
			    into  which  a  file  page gets loaded.  This
			    page must be within the section specified  by
			    .GBASE.

      3        .GBASE	    Number of the section  into  which	the  file
			    pages   are  loaded.   You	can  specify  the
			    section for single-section save  files  only;
			    use of this word with a multiple-section save
			    file causes an error.   The  file  pages  are
			    loaded into this section of memory regardless
			    of the section specified in the save file.

 
   The following flag bits are defined for use in .GFLAG:

 
      Bit    Symbol	    Meaning

      0      GT%LOW	    .GLOW contains the number of the lowest  page
			    within the process to use.

      1      GT%HGH	    .GHIGH contains the  number  of  the  highest
			    page within the process to use.

      2      GT%BAS	    .GBASE contains the number of the section  to
			    use.

      3      GT%CCH	    Clear the system's program cache.  (WHEEL  or
			    OPERATOR  capability  is  required for use of
			    this bit.)

      4      GT%CSH	    Place in cache the name of the program  being
			    loaded   into  memory.   (WHEEL  or  OPERATOR
			    capability is required for use of this bit.)

   When the GET call is executed for a sharable save file, pages from the
   file  are  mapped into pages in the process, and the previous contents
   of the process' page are overwritten.  If the file contains	data  for
   only  a  portion  of  the  process' page, the remainder of the page is
   zeroed.  Pages of the process not used by the file are unchanged.

   When the GET call is executed for a nonsharable save file,  individual
   words  of  the  file  are written into the process.	Since these files
   usually do not have words containing all zeros, a  GET  call  executed
   for	a nonsharable file never clears memory.  The GET call never loads
   the accumulators.

   The GET JSYS interacts with the JFN	of  the  file  that  the  GET  is
   performed upon in the following ways:

 
	1.  If the GET is performed on a CSAVE file, a file on a non-disk
	    device, or a file that has another JFN open on it, the JFN is
	    released.

	2.  Under normal conditions for a file with only one JFN open  on
	    it, if the GET succeeds, it will eventually cause an implicit
	    CLOSF for the file on which  the  GET  was	performed.   This
	    occurs  through  the  following  mechanism:   GET changes the
	    owner of the file from the process that issued the GET to the
	    process  into  which  the  file  is  mapped.  When the latter
	    process is killed, the JFN is released.

   Because a program can not be sure that GET has or has not released the
   JFN,  the  program  should  not  attempt  to release the JFN itself or
   attempt  to	use  the  JFN  again  (assuming  that  the  GET  actually
   succeeded).	 At  the time that a program tried to erroneously release
   the JFN itself, the JFN might be associated with a file other than the
   file  on which the GET was performed.  This can be a source of program
   errors that are difficult to trace.

   This  call  can  cause  several   software	interrupts   or   process
   terminations on some file conditions.

   A GET call performed on an execute-only process is illegal unless  the
   process  is	.FHSLF.  If the JFN specified in the GET call refers to a
   file for which the user only has execute-only access, then the process
   specified must be a virgin process.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   GET ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle

   FRKHX8:   Illegal to manipulate an execute-only process
   GETX1:    Invalid save file format
   GETX2:    System Special Pages Table full
   GETX3:    Illegal to overlay existing pages
   GETX4:    Illegal to specify .GBASE for multisection file.
   SSAVX1:   Illegal to save files on this device
   OPNX2:    File does not exist

   All file errors can occur.



			     GETAB     JSYS 10

   Returns a word from the specified system  table.   (Refer  to  Section
   2.3.2.)

   ACCEPTS IN AC1:  index into table in the left half, and  table  number
		    in the right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, 36-bit word from the specified table in AC1

   If -1 is given as the index, this call returns  the	negative  of  the
   length of the specified table.

   The table number can be obtained with the SYSGT  call.   However,  the
   recommended	procedure is to use the symbol definition from the MONSYM
|  file for the table number.  (Refer to Chapter 2 for the  system  table
|  definitions.)

   The GETAB monitor call requires the process to have	GETAB  capability
   available, but not enabled (SC%GTB in the process capability word).

   GETAB ERROR MNEMONICS:

   GTABX1:   Invalid table number
   GTABX2:   Invalid table index
   GTABX3:   GETAB privileges required



			     GETER     JSYS 12

   Returns the most recent error condition encountered in a process.  The
   most recent error is always saved in the Process Storage Block.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with process handle in left half of  AC2  and
		    most recent error condition in right half of AC2.

   The SETER monitor call can be  used	to  set  the  most  recent  error
   condition encountered in a process.

   GETER ERROR MNEMONICS:

   LSTRX1:   Process has not encountered any errors



			     GETJI     JSYS 507

   Obtains information about the specified job.

|  RESTRICTONS:     requires SC%GTB capability.

   ACCEPTS IN AC1:  job number, or -1  for  current  job,  or  400000+TTY
		    number

	      AC2:  negative of the length of the block in which to store
		    the  information  in the left half, and the beginning
		    address of the block in the right half

	      AC3:  word number (offset) of first entry desired from  job
		    information table

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, with updated pointer in  AC2  and	requested
|		    entries  stored  in specified block;  if the job does
|		    not exist, returns +2, with  -1  in  Word  0  of  the
|		    specified block

   When a terminal designator is given in AC1, the  information  returned
   is for the job running on that terminal.

   The system begins copying the entries from the job information  table,
   starting  with  the offset given in AC3, into the address specified in
   the right half of AC2.  The number of  entries  copied  is  minus  the
   number  given  in  the left half of AC2, or is the number remaining in
   the table, whichever is smaller.

   Because AC2 is updated on a successful return, it cannot be	used  for
   the returned data.

   The format of the job information table is as follows:

   Word  Symbol   Meaning

    0	 .JIJNO   Job number
    1	 .JITNO   Job's terminal number (-1 means the job is detached)
    2	 .JIUNO   Job's user number
    3	 .JIDNO   Job's connected directory number
    4	 .JISNM   Subsystem name (SIXBIT)
    5	 .JIPNM   Program name (SIXBIT)
    6	 .JIRT	  Run time (in milliseconds)
    7	 .JICPJ   Controlling PTY job number (-1 means	the  job  is  not
		  controlled by a PTY)
   10	 .JIRTL   Run time limit (as set by the TIMER call)

		  A zero means no time limit is in effect.
   11	 .JIBAT   Job is controlled by Batch, if -1 (as set by the  MTOPR
		  call)
   12	 .JIDEN   Default for magnetic tape density (as set by the  SETJB
		  call)
   13	 .JIPAR   Default for magnetic tape parity (as set by  the  SETJB
		  call)
   14	 .JIDM	  Default for magnetic tape data  mode	(as  set  by  the
		  SETJB call)
   15	 .JIRS	  Default number for magnetic tape record size	in  bytes
		  (as set by the SETJB call)
   16	 .JIDFS   Deferred spooling in effect, if 1 (as set by the  SETJB
		  call)
   17	 .JILNO   Job's logged-in directory number
   20	 .JISRM   Byte pointer to area to receive job's  session  remark.
		  This pointer is supplied by the user before issuing the
		  GETJI call.
   21	 .JILLN   The date and time of the user's last login  before  the
		  user logged in the current job
   22	 .JISRT   Job CPU time at start of last session.  To compute  CPU
		  time	for  this  session,  subtract  .JISRT  value from
		  current job CPU time (.JIRT).
   23	 .JISCT   Console time at start of last session.  To compute  the
		  console  time  for  this session, subtract .JISCT value
		  from	current  console  time	(obtainable  with   RUNTM
		  monitor call).
   24	 .JIT20   Indicates if job is at EXEC  level  or  program  level.
		  (-1 = EXEC, 0 = program)
   25	 .JISTM   Returns time when job  was  created  (when  CTRL/C  was
		  performed).  -1 is returned if the system time and date
		  were not set when the job started.
   26	 .JIBCH   Batch stream number and batch flags
|		  B0-1	 OB%WTO  Write-to-operator capabilities
|				 0  .OBALL   WTO (write to operator)  and
|					     WTOR (write to operator with
|					     reply)
|				 1  .OBNWR   No WTOR allowed
|				 2  .OBNOM   No message allowed
|		  B10	 OB%BSS  Indicates  that  field  OB%BSN   (below)
|				 contains a batch-stream number
|		  B11-17 OB%BSN  Batch-stream number
   27	 .JILLO   Logical location (node name) This  word  indicates  the
		  logical  location  of  the  job.   This job location is
		  typically used to cause output to be routed to a remote
		  station,  such as an IBM termination station or a DN200
		  remote station.
|  30	 .JILJI   Local job index.  Index into system-wide job tables.

   The current highest GETJI offset is given by symbol .JIMAX.

   GETJI ERROR MNEMONICS:

   GTJIX1:   Invalid index
   GTJIX2:   Invalid terminal line number
   GTJIX3:   Invalid job number
   GTJIX4:   No such job



			     GETNM     JSYS 177

   Returns the name of the program currently being used by the job.  This
   name  will  have  been  declared  previously  with  the SETNM or SETSN
   monitor call.

   RETURNS     +1:  always, with SIXBIT name of program in AC1



			    GETOK%     JSYS 574

   Requests  access  to  the   specified   system   resource   from   the
   installation's access-control program.

 
   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block (if required)

	      AC3:  length of the argument block (the maximum permissible
		    length is specified by symbol .GOKMZ)

	      AC4:  job number or user number request is for

   RETURNS     +1:  always, with 0 in  first  word  of	status	block  if
		    access granted

		    1B18 set to one +  error  number  in  first  word  of
		    status   block   if   request   denied.   An  illegal
		    instruction trap is generated.
   Function Codes:

	Code	  Symbol    Meaning

	 1	  .GOASD    Assign a device

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEADD   Device designator

	 2	  .GOCAP    Enable capabilities  (right  half  privileges
			    only)

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GENCP   New capability word

	 3	  .GOCJB    Allow CRJOB JSYS to be executed

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address

	 4	  .GOLOG    Allow LOGIN

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GELUN   User number

	 5	  .GOCFK    Allow CFORK (only done after n'th  fork).	N
			    is	  an	installation-defined	parameter
			    specified by monitor symbol DGOFKN.

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEFCT   Number of  forks  already  in
					    use by job

	 6	  .GOTBR    Set terminal baud rate

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GELIN   Line number
			     2	   .GESPD   Input speed ,, Output speed

	 7	  .GOLGO    Inform  the  access-control  program   of	a
			    logout.

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEUSD   Number of pages used
			     2	   .GEQUO   Directory quota
			     3	   .GERLG   Number  of	the  job  to   be
					    logged  out,  or  -1  if  the
					    requesting	job  is   to   be
					    logged out.

	 10	  .GOENQ    Allow setting of ENQ quota

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEEQU   Desired quota
			     2	   .GEEUN   Job number

	 11	  .GOCRD    Allow directory creation

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address

	 12	  .GOSMT    Allow MOUNT of structure

			    Must be given once	to  increment  the  mount
			    count and once to decrement the mount count.

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GESDE   Device designator

	 13	  .GOMDD    Allow entry to MDDT

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address

	 14	  .GOCLS    Set scheduler class for a job

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEJOB   Job number
			     2	   .GECLS   Class desired

	 15	  .GOCL0    Set scheduler class at login

			    This function is executed by the monitor when
			    a	login  occurs  and  class  scheduling  is
			    enabled   (but   not   by	accounts).    The
			    access-control  program  must  then determine
			    which class to put the user in.

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address

	 16	  .GOMTA    MT:  access request

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEACC   Access code from HDR1 label
			     2	   .GEUSN   User number
			     3	   .GEUNT   MT:  unit number
			     4	   .GEACD   Desired access bits (FP%xxx)
			     5	   .GELTP   Label type (.LTxxx)

	 17	  .GOACC    Allow ACCESS or CONNECT

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GOAC0   Flags from ACCES JSYS
			     2	   .GOAC1   Directory number

	 20	  .GOOAD    Allow device assignment due to OPENF

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address
			     1	   .GEADD   Device designator

	 21	  .GODNA    Allow access to DECNET

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   Error block address

	 22	  .GOANA    Allow ARPANET access

			    Argument block (user-specified):

			    Word   Symbol   Contents

			     0	   .GEERB   error block address

	 23	  .GOATJ    Allow ATTACH

			    Argument block (user-specified):

			    Word   Symbol   Contents

|			     0	   .GEERB   Error block address
|			     1	   .GOTJB   Target job number
|			     2	   .GOTTY   Source TTY number

   400000+n		    Customer-reserved functions

			    The argument block (user-specified)  has  the
			    same  format  as the error block format shown
			    below.  The contents of word 1 are ignored.

   Error block format (returned):

 
   Word  Symbol   Contents

    0	 .GESIZ   Count of words in this block (including this word)

    1	 .GEERN   Error Number

    2	 .GEPTR   Byte pointer to error string location

    3	 .GEBSZ   Maximum bytes user can accept in error string

   The format of the status block for user-defined functions will  depend

   on the design of the particular access-control program.

   The user supplies all arguments in the argument block.  In  the  error
   block,  the	user  supplies	words 0, 2, and 3.  If an error string is
   provided by the program doing the GIVOK%, then the  byte  pointer  and
   count  are  updated.   If the user is not interested in the reason for
   the rejection, the address of the error block can be 0.  If the  error
   block is less than 4 words, only the available words will be used.  If
   the byte pointer is 0, no string will be returned.

   Error codes are of the form 1B18+n.	They  are  not	standard  TOPS-20
   error  codes  and  therefore  cannot  be  given  to ERSTR to produce a
   string.  The access-control program must supply a  string  if  one  is
   needed.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   GETOK% ERROR MNEMONICS:

   ARGX04:   Argument block too small
   ARGX05:   Argument block too long
   ARGX26:   File is off line
   MONX01:   Insufficient system resources
   GOKER1:   Illegal function
   GOKER2:   Request denied by Access Control Facility



			     GEVEC     JSYS 205

   Returns the section-relative entry vector of  the  specified  process.
   (Refer  to  Section	2.7.3.)  The  process  must be one that runs in a
   single section of memory.  See the XGVEC% monitor call to  obtain  the
   entry vector of a multisection program.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with specified process' entry vector word  in
		    AC2

   The SEVEC monitor call can be used to set the process'  entry  vector.
   (Refer  to  the  PDVOP%  monitor call for a description of the program
   data vector.)

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   GEVEC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     GFRKH     JSYS 164

   Gets a handle on a process that currently is not known to  the  caller
   but is known to another process.  The handle returned can then be used
   by the caller to refer to the process of interest.

   ACCEPTS IN AC1:  handle of the  process  that  has  a  handle  on  the
		    process of interest

	      AC2:  process handle, used by the  process  named  in  AC1,
		    that  refers to the process of interest.  This handle
		    must be a relative handle (in  the	range  400000  to
		    400777) and must refer to an existing process.

   RETURNS     +1:  failure, with error code in AC1.

	       +2:  success, with a handle in AC1 that is usable  by  the
		    caller  to refer to the desired process.  This handle
		    is not the same as the one given in AC2 (is different
		    from  the  one used by the process in AC1 to refer to
		    the desired process).

   Generates an illegal instruction interrupt on error conditions below.

   GFRKH ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX6:   All relative process handles in use
   GFRKX1:   Invalid process handle



			     GFRKS     JSYS 166

   Returns the process structure of the current job from a given  process
   downward.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capability

   ACCEPTS IN AC1:  process handle of the starting point

	      AC2:  B0(GF%GFH) return relative process handles	for  each
			       process

		    B1(GF%GFS) return status for each process

	      AC3:  the left half contains the negative of the number  of
		    words  in  the  block  in  which to store the process
		    structure, and the right half contains the address of
		    the first word of the block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, all process handles are returned

   The handle of  the  current	process  is  always  returned  as  .FHSLF
   regardless  of  the setting of GF%GFH.  Any user can specify a process
   handle of .FHTOP (causing GFRKS to start with the top level	process).
   However,  the  user	must have WHEEL or OPERATOR capability enabled to
   specify .FHTOP, set	GF%GFH	and  receive  relative	handles  for  all
   processes  from  .FHTOP on down.  Otherwise, only process handles that
   the issuing process is entitled to receive will be returned.  Also, if
   the	request  will  cause  the  monitor to exceed the per-process fork
   handle limit, only that number of handles that  will  fit  within  the
   limit will be returned.

 
				  Table format

 
		 ===============================================
		 !		      ! 		       !
   3 words	 !	parallel      !      inferior	       !
   per entry	 !	pointer       !      pointer	       !
		 !		      ! 		       !
		 ===============================================
		 !		      ! 		       !
		 !	superior      ! process handle	       !
		 !	pointer       ! or 0 if GF%GFH	       !
		 !		      ! was off, or when no    !
		 !		      ! more process handles   !
		 !		      ! are left for the       !
		 !		      ! process 	       !
		 !		      ! 		       !
		 ===============================================
		 !					       !
   This word is  !		 status word		       !
   -1 if GF%GFS  !					       !
   is off.	 !					       !
		 ===============================================

 
				    NOTE

		  Pointers in table are  memory  addresses
		  of  other table entries, or 0 if no such
		  structure exists.

 

   The execution of the GFRKS call terminates before the  entire  process
   structure  has  been  returned  if  the  block  in  which to store the
   structure information is  too  small.   If  this  happens,  this  call
   returns  as	much  of  the  structure  as  can  fit in the block, then
   generates an error message.	If all process handles are in  use,  this
   call  returns  the entire structure, but the extra handles will not be
   assigned (will be zero).

   Generates an illegal instruction interrupt on error conditions below.

   GFRKS ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX6:   All relative process handles in use
   GFKSX1:   Area too small to hold process structure



			     GFUST     JSYS 550

   Returns the name of either the author of the file or the user who last
   wrote to the file.

   ACCEPTS IN AC1:  function code in the left half, and JFN of	the  file
		    in the right half

	      AC2:  pointer to the string in which to store the name

   RETURNS     +1:  always, with an updated string pointer in AC2

   The defined functions are as follows:

   Code      Symbol		      Meaning

     0	     .GFAUT    Return the name of the author of the file.

     1	     .GFLWR    Return the name of the user who last wrote to  the
		       file.

   The SFUST monitor call can be used to  set  the  name  of  either  the
   author of the file or the user who last wrote to the file.

   Generates an illegal instruction interrupt on error conditions below.

   GFUST ERROR MNEMONICS:

   GFUSX1:   Invalid function
   GFUSX2:   Insufficient system resources
   GFUSX3:   File expunged
   GFUSX4:   Internal format of directory is incorrect
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX8:    File is not on disk
   DESX10:   Structure is dismounted
   DELFX6:   Internal format of directory is incorrect
   DIRX2:    Insufficient system resources
   DIRX3:    Internal format of directory is incorrect



			    GIVOK%     JSYS 576

   Allows  a  privileged   access-control   program   (written	 by   the
   installation)  to  allow  or  disallow  a  user  program's access to a
   specified system resource.

   RESTRICTIONS:    Requires enabled WHEEL or OPERATOR capability.

   ACCEPTS IN AC1:  Request number (from RCVOK% message)

	      AC2:  0 = request granted

		    1B18 + error number = request denied

	      AC3:  pointer to ASCIZ string (maximum of 80 characters) or
		    0.	 This  string  is an error message or information
		    message to be returned to the user.

   RETURNS     +1:  always

   Generates an illegal instruction interrupt on error conditions below.

   GIVOK% ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   GOKER3:   JSYS not executed within ACJ fork



			     GJINF     JSYS 13

   Returns information pertaining to the current job.

   RETURNS     +1:  always, with

	      AC1   containing the user number under  which  the  job  is
		    running.

	      AC2   containing the directory number to which the  job  is
		    connected.

	      AC3   containing the job number.

	      AC4   containing the terminal number attached to	the  job,
		    or -1 if no terminal is attached to job.



			     GNJFN     JSYS 17

   Assigns the JFN to the next file in a group of files  that  have  been
   specified  with  wildcard  characters.   The next file in the group is
   determined by  searching  structures  and  directories  in  the  order
   described  in  Section  2.2.3.  The flags returned from the GTJFN call
   are given to the GNJFN call as an argument to indicate the  fields  of
   the file specification that contain wildcard characters.

   ACCEPTS IN AC1:  indexable file handle returned by GTJFN (i.e.,  flags
		    returned by GTJFN in the left half and the JFN in the
		    right half)

   RETURNS     +1:  failure, including no more files in the  group.   JFN
		    is	released if there are no more files in the group.
		    This return occurs on the first call to GNJFN  if  no
		    flags  indicating  wildcard fields are on in the left

		    half of AC1.

	       +2:  success, same JFN is assigned to the next file in the
		    group.   The following flags are set (if appropriate)
		    in the left half of AC1:

		      B13   GN%STR   structure changed
		      B14   GN%DIR   directory changed
		      B15   GN%NAM   name changed
		      B16   GN%EXT   file type changed

   The GNJFN call uses the flags returned in the left half of  AC1  on	a
   GTJFN  call	to  determine  the  fields  containing	wildcards and the
   default generation  number.	 Note  that  the  GNJFN  call  returns	a
   different  set  of  flags  in the left half of AC1 than the GTJFN call
   returns.  Because all calls to GNJFN should use the	flags  originally
   returned by GTJFN, programs must save the returned GTJFN flags for use
   in the GNJFN call.

   The file currently associated with the JFN must  be	closed	when  the
|  GNJFN call is executed.  The indexable file handle for a file that has
|  been renamed cannot be used as an argument to GNJFN.

   GNJFN will not find invisible files unless bit G1%IIN was set  in  the
   GTJFN call.

   GNJFN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   GNJFX1:   No more files in this specification
   OPNX1:    File is already open
   STRX09:   Prior structure mount required



			     GPJFN     JSYS 206

   Returns the primary JFNs of the specified process.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with primary input JFN in the  left  half  of
		    AC2,  and the primary output JFN in the right half of
|		    AC2.  Unless the primary JFNs have	been  reset,  AC2
|		    will contain -1 (777777,,777777), indicating TTY:  as
|		    the primary I/O source/destination.

   The SPJFN monitor call can be used to set the primary JFNs.

   Generates an illegal instruction interrupt on error conditions below.

   GPJFN ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process

   FRKHX3:   Invalid use of multiple process handle



			     GTAD     JSYS 227

   Returns the current date in the internal  system  format.   (Refer  to
   Section 2.9.2.)

   RETURNS     +1:  always, with  day  in  the	left  half  of	AC1,  and
		    fraction of day in right half of AC1

   If the system does not have the current date set, AC1 contains -1.

   The STAD monitor call can be used to set the system's date.


			     GTDAL     JSYS 305

   Returns the disk allocation for the specified directory.

   ACCEPTS IN AC1:  directory  number	(-1   indicates   the	connected
		    directory)

   RETURNS     +1:  always, with

	      AC1   containing the working disk storage limit  (logged-in
		    quota) for the directory.

	      AC2   containing the number of pages being used.

	      AC3   containing	 the   permanent   disk   storage   limit
		    (logged-out quota) for the directory.

   Generates an illegal instruction interrupt on error conditions below.

   GTDAL ERROR MNEMONICS:

   DIRX1:	    Invalid directory number
   DELFX6:	    Internal format of directory is incorrect



			     GTDIR     JSYS 241

   Returns information about the given directory.

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled.

   ACCEPTS IN AC1:  directory number (36-bit)

	      AC2:  address of argument block in caller's  address  space
		    in which to return the directory information

	      AC3:  byte pointer to the password string

   RETURNS     +1:  always, with updated byte pointer in AC3

   The argument block returned to the caller has the same format  as  the
   CRDIR call's argument block.  Word zero (.CDLEN) of the argument block
   must contain the length of the argument block in  which  GTDIR  is  to
   store the directory information being returned.  If this word is zero,
|  GTDIR assumes the length of the argument block  is  15  (octal)  words
|  long, and returns only 15 (octal) words.

   The password of the directory must be placed in the	string	to  which
   AC3 points.	Word 1(.CDPSW) of the returned argument block also points
   to this string.

   The count of words to be returned in the user group list is	given  in
   word  14  (.CDDGP) of the argument block.  This count must be one more
   than the number of words to be returned in the group  list.	 This  is
   because GTDIR returns a zero word as the last word in the group list.

   If the directory number given is zero, the GTDIR monitor call  returns
   the system default settings for the following directory parameters:

	working disk storage quota (.CDLIQ)
	permanent disk storage quota (.CDLOQ)
	default file protection (.CDFPT)
	default directory protection (.CDDPT)
	default file retention count (.CDRET)
	maximum number of subdirectories allowed (.CDSDQ)
	online expiration period (.CDDNE)
	offline expiration period (.CDDFE)

   Either one of the following	conditions  must  be  satisfied  for  the
   caller  to  obtain  all information (including the password) about the
   given directory:

	1.  the caller has WHEEL or OPERATOR capability enabled;

	2.  the caller has owner access to the directory.

|  Note that if password encryption is	enabled,  the  returned  password
|  will  be  encrypted.   To obtain all other information (other than the
|  password) of the given directory, the caller must have at least  owner
   access to the directory.  (Refer to Section 2.2.6 for a description of
   owner access.)

   Generates an illegal instruction interrupt on error conditions below.

   GTDIR ERROR MNEMONICS:

   GTDIX1:   WHEEL or OPERATOR capability required
   GTDIX2:   Invalid directory number
   MSTX32:   Structure was not mounted



			     GTFDB     JSYS 63

   Returns some or all of the file descriptor  block  for  the	specified
   file.  (Refer to Section 2.2.8 for the format of this block.)

   ACCEPTS IN AC1:  JFN

	      AC2:  number of words to be read in the left half  and  the
		    word  number (offset) of the first entry desired from
		    the file descriptor block in the right half.

	      AC3:  address in caller's address  space	for  storing  the
		    data returned

   RETURNS     +1:  always

   The following instruction will set up AC2 for reading the entire FDB:

	HRLZI  AC2,.FBLEN

   The program receives an error (GFDBX2) if it requests more words  than
   there are words remaining in the FDB.  For TOPS-20 V4, the size of the
   FDB has been increased.  If the left half of AC2 contains the  current
   maximum size of the FDB (i.e., .FBLEN), but the FDB is an older, small
   FDB, then the extra words will contain zeroes.

   See Section 2.2.8 for the various JSYS's used to modify the FDB.

   Generates an illegal instruction interrupt on error conditions below.

   GTFDB ERROR MNEMONICS:

   GFDBX1:   Invalid displacement
   GFDBX2:   Invalid number of words
   GFDBX3:   List access required
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators



			     GTHST     JSYS 273

   Obtains information about ARPANET hosts.

   RESTRICTIONS:    for ARPANET systems only

   ACCEPTS IN AC1:  function code

	      AC2:  function-specific argument

	      AC3:  function-specific argument

	      AC4:  function-specific argument

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, function-specific data returned in AC's

     Code   Symbol    Function

      0     .GTHSZ    Returns negative number  of  host  names,  negative
		      length of HSTSTS table, and local host number.

		      User-supplied arguments:

		      None

		      Returned data:

		      AC2:   -number host names,,0
		      AC3:   -length of HSTSTS table,,0
		      AC4:   local  host  number  (in	32-bit	 Internet
			     format)

      1     .GTHIX    Returns the name string associated with  the  host,
		      the  host number, and the host status.  If the name
		      returned is a nickname, HS%NCK is on in the  status
		      word.

		      User-supplied arguments:

		      AC2:   destination byte pointer
		      AC3:   index into name table (returned by GETAB)

		      Returned data:

		      AC2:   updated byte pointer
		      AC3:   host number
		      AC4:   host status

      2     .GTHNS    Returns the primary name for the given host number.

		      User-supplied arguments:

		      AC2:   destination byte pointer
		      AC3:   host number

		      Returned data:
		      AC2:   updated byte pointer
		      AC3:   host number
		      AC4:   host status

      3     .GTHSN    Translates the specified host name  string  to  its
		      host  number.  If the name specified is a nickname,
		      HS%NCK will be on in the status word.

		      User-supplied arguments:

		      AC2:   source byte pointer

		      Returned data:

		      AC2:   updated byte pointer
		      AC3:   host number
		      AC4:   host status

      4     .GTHHN    Returns the current status of the given host.

		      User-supplied arguments:

		      AC3:   host number

		      Returned data:

		      AC3:   host number
		      AC4:   host status

      5     .GTHHI    Returns the host number  and  status  of	the  host
		      having  the  specified  index  into the host status
		      table.

		      User-supplied arguments:

		      AC3:   index into HSTSTS (returned by GETAB)

		      Returned data:

		      AC3:   host number
		      AC4:   host status

|    6	    .GTHLN    Returns the host number of this host on an Internet
|		      network.
|
|		      User-supplied arguments:
|
|		      AC2:   network number, or host number of a network
|
|		      Returned data:
|
|		      AC3:   host number on specified network
|
|    7	    .GTHNT    Returns status table of an Internet network.
|
|		      User-supplied arguments:
|
|		      AC2:   network number, or host number of a network
|
|		      AC3:   address to store data
|
|		      AC4:   length,,offset

*   10	    .GTHLA    Returns address of network interfaces.

   Flags in host status word:

   Bits      Symbol    Meaning

    1B0      HS%UP     Host is up
    1B1      HS%VAL    Valid status
    7B4      HS%DAY    Day when up if currently down
   37B9      HS%HR     Hour
   17B13     HS%MIN    5 minute interval
   17B17     HS%RSN    Reason
    1B18     HS%SRV    Host is server
    1B19     HS%USR    Host is user
    1B20     HS%NCK    Nickname
   77B26     HS%STY    System type mask
    1B27     HS%NEW    RAS, RAR, RAP, etc

   System Type Flags (HS%STY)

   Bits      Symbol    Meaning

    1B26     .HS10X    TENEX
    2B26     .HSITS    ITS
    3B26     .HSDEC    TOPS-10
    4B26     .HSTIP    TIP
    5B26     .HSMTP    MTIP
    6B26     .HSELF    ELF
    7B26     .HSANT    ANTS
   10B26     .HSMLT    MULTICS
   11B26     .HST20    TOPS-20
   12B26     .HSUNX    UNIX

   GTHST% ERROR MNEMONICS:

   ARGX02:   Invalid function
   GTHSX1:   Unknown host number
   GTHSX2:   No number for that host name
   GTHSX3:   No string for that host number
   GTJIX1:   Invalid index



		      GTJFN	JSYS 20

   Returns a JFN for the specified file.  Accepts the  specification  for
   the file from a string in memory or from a file, but not from both.

   ACCEPTS IN AC1:  GJ%SHT plus other flag bits in  the  left  half,  and
		    default generation number in the right half

	      AC2:  source designator  from  which  to	obtain	the  file
		    specification.    (Refer   to  flag  bit  GJ%FNS  for
		    specific values.)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, flags in the left half of AC1, and  the  JFN
		    assigned  in  the  right  half of AC1.  (This word is
		    called an indexable file handle and is given  to  the
		    GNJFN call as an argument.) Updated string pointer in
		    AC2, if pertinent.

   All I/O errors can occur.  These errors cause software  interrupts  or
   process terminations, and only a single return (+1) is given.

   The string can represent the complete specification for the file:

	dev:<directory>name.typ.gen;attributes

|  For parse-only JFNs, the file specification is also allowed to be
|
|	node::dev:<directory>name.typ.gen;attributes

   One or more fields of the specification can be defined  by  a  logical
   name.   (Refer  to  Section 2.2.2.) If any fields are omitted from the
   specification, the system will provide the values shown below.

	device	     connected structure

	directory    connected directory

 
					     NOTE

			 If   neither	device	 nor   directory   is
			 specified,  the  default  is  DSK:,  not the
			 user's  connected  directory.	  If   either
			 device  or directory is specified, the other
			 is the user's connected structure/directory.

 
	name	     no default;  this field must be specified
	type	     null
	generation   highest existing number if  the  file  is	an  input
		     file.   Next  higher number if the file is an output
		     file.
	protection   protection of the next lower generation or  for  new
		     files, protection as specified in the directory.
	account      account  specified  when  user  logged  in,   unless
		     changed by the CACCT or SACTF call.

   The JFNS monitor call can be used to  obtain  the  file  specification
   string  associated  with  a	given  JFN.   The  flag  bits that can be
   specified in AC1 are described as follows.

 
				 GTJFN Flag Bits

 
     Bit     Symbol		 Meaning

      0      GJ%FOU		 The file given is  to	be  assigned  the
				 next higher generation number.  This bit
				 indicates that a new version of  a  file
				 is  to be created, and is usually set if
				 the file is for output use.

      1      GJ%NEW		 The file specification  given	must  not
				 refer to an existing file (the file must
				 be a new file).  This bit has no  effect
				 on a parse-only JFN.

      2      GJ%OLD		 The file specification given must  refer
				 to  an  existing  file.  This bit has no
				 effect on a parse-only JFN.

      3      GJ%MSG		 One of the appropriate messages is to be
				 printed  after the file specification is
				 obtained, if the  system  is  performing
				 recognition  on  the  file specification
				 and the user ends his input by typing an
				 ESC.

				 !NEW FILE!
				 !NEW GENERATION!
				 !OLD GENERATION!
				 !OK! if GJ%CFM (bit 4) is off
				 !CONFIRM! if GJ%CFM (bit 4) is on

      4      GJ%CFM		 Confirmation  from  the  user	will   be
				 required  (if	GJ%FNS	is  on) to verify
				 that the file specification obtained  is

				 correct.    (See  below  for  the  valid
				 confirmation characters.)

      5      GJ%TMP		 The file specified is to be a	temporary
				 file.

      6      GJ%NS		 Only  the  first  specification   in	a
				 multiple  logical  name assignment is to
				 be searched for the file ( do not search
				 beyond  the  first  name  in  a multiple
				 logical name assignment).

      7      GJ%ACC		 The JFN specified is not to be  accessed
				 by   inferior	processes  in  this  job.
				 However, another process can access  the
				 file  by  acquiring a different JFN.  To
				 prevent the file from being accessed  by
				 other	 processes,  the  user's  program
				 should  set  OF%RTD(B29)  in  the  OPENF
				 call.

      8      GJ%DEL		 Files	marked	as  deleted  are  to   be
				 considered  by  the  system  when  it is
				 searching for a file to  assign  to  the
				 JFN.

     9-10    GJ%JFN		 These bits are off in the short form  of
				 the GTJFN call.

     11      GJ%IFG		 The file specification given is  allowed
				 to  have  one	or  more  of  its  fields
				 specified with a wildcard  character  (*
				 or  %).   This  bit is used to process a
				 group of files and is generally used for
				 input	files.	The monitor verifies that
				 at least one value exists for each field
				 that contains a wildcard and assigns the
				 JFN to the first file in the group.  The
				 monitor  also	verifies  that fields not
				 containing wildcards represent a new  or
				 old  file  according  to  the setting of
				 GJ%NEW and GJ%OLD.  The GNJFN	call  can
				 then  be used to obtain the next file in
				 the group.  (Refer to Section 2.2.3  for
				 more  information on wildcard characters
				 in file specifications.)

     12      GJ%OFG		 The JFN is to	be  associated	with  the
				 given file specification string only and
				 not to the actual file.  The string  may
				 contain  wildcard characters (* or %) in
				 one  or  more	of  its  fields.   It  is
				 checked  for correct punctuation between
				 fields,  but  is  not	checked  for  the
				 validity  of any field.  This bit allows
				 a JFN	to  be	associated  with  a  file
				 specification	  even	  if   the   file
				 specification	does  not  refer  to   an
				 actual file.  The JFN returned cannot be
				 used to refer to an actual  file  (e.g.,
				 cannot be used in an OPENF call) but can
				 be used to  obtain  the  original  input
				 string  (via  JFNS).  The fields in this

				 string can then be used in a  GTJFN-long
				 form call as program defaults.  However,
				 if  the  original  string  contains  the
				 temporary   file  attribute  (;T),  this
				 attribute is not "remembered"	and  thus
				 is  not  returned  on the JFNS call even
				 though  the  bit  indicating	temporary
				 status   (JS%TMP)  is	set.   All  other
				 fields  (including  the  protection  and
				 account fields) can be returned by JFNS.

				 When both  B11(GJ%IFG)  and  B12(GJ%OFG)
				 are   on,  the  GTJFN	call  parses  the
				 specification	 given,   verifying   the
				 existence   of   each	 field.   When	a
				 wildcard character appears in	a  field,
				 the  GTJFN  call  checks  the	remaining
				 fields  for  correct	punctuation   and
				 returns a JFN for the file specification
				 string only.  That is, once  a  wildcard
				 character  is	seen, the action taken is
				 identical  to	that  taken   when   only
				 B12(GJ%OFG)  is  set.	 If  no  wildcard
				 character appears  in	the  string,  the
				 action  is the same as if both bits were
				 off.

     13      GJ%FLG		 Flags are to be  returned  in	the  left
				 half of AC1 on a successful return.

     14      GJ%PHY		 Job-wide logical names (those defined by
				 the  user)  are  to  be  ignored  by the
				 monitor for this call.

     15      GJ%XTN		 This bit is off in the short form of the
				 GTJFN call.

     16      GJ%FNS		 The  contents	 of   AC2   are   to   be
				 interpreted as follows:

				 1.  If this bit is on, AC2  contains  an
				     input  JFN  in  the left half and an
				     output JFN in the right  half.   The
				     input JFN is used to obtain the file
				     specification to be associated  with
				     the  JFN.	The output JFN is used to
				     indicate	the    destination    for
				     printing  the  names  of  any fields
				     being recognized.	 To  omit  either
				     JFN, specify .NULIO (377777).

				 2.  If this bit is off, AC2  contains	a
				     byte  pointer  to an ASCIZ string in
				     memory that specifies the file to be
				     associated with the JFN.

     17      GJ%SHT		 This bit must be on for the  short  form
				 of the GTJFN call.

     18-35			 The  generation  number  of   the   file
				 (between  1  and  377777)  or one of the
				 following:

				 0(.GJDEF)    to indicate that	the  next
					      higher generation number of
					      the file is to be  used  if
					      GJ%FOU (bit 0) is on, or to
					      indicate that  the  highest
					      existing	generation number
					      of the file is to  be  used
					      if  GJ%FOU  is  off.  (This
					      value is	usually  used  in
					      this field.)

				 -1(.GJNHG)   to indicate that	the  next
					      higher generation number of
					      the file is to be  used  if
					      no   generation  number  is
					      supplied.

				 -2(.GJLEG)   to indicate that the lowest
					      existing	generation number
					      of the file is to be used.

				 -3(.GJALL)   to   indicate   that    all
					      generation  numbers  (*) of
					      the file are to be used and
					      that   the  JFN  is  to  be
					      assigned to the first  file
					      in  the group.  (Bit GJ%IFG
					      must be set.)

   The GTJFN monitor call always reads the  terminating  character  after
   the	file  specification  string.   (This character can be obtained by
   executing  the  BKJFN  call	followed  by  a  BIN  call.)  The   valid
   terminating characters are:

	line feed		      left parenthesis
	CTRL/L			      right parenthesis
	CTRL/Z			      plus sign
	carriage return 	      comma
	exclamation point	      slash
	double quotation marks	      equals sign
	number sign		      at sign (@)
	ampersand		      space
	single quotation mark	      ESC

   All	of  these  characters  except  for  ESC  are  also   confirmation
   characters  (refer  to  bit	GJ%CFM	above)	and are called confirming
   terminators.  If a confirming terminator is typed after the string,	a
   confirmation  message  will not be typed to the user nor will the user
   be required to confirm the string obtained, regardless of the  setting
   of GJ%MSG and GJ%CFM.  On a successful return, the following flags are
   returned in the left half of AC1 if flag bit GJ%IFG, GJ%OFG, or GJ%FLG
   was on in the call.

 
		     Bits Returned on Successful GTJFN Call

 
     Bit       Symbol		 Meaning

      0        GJ%DEV		 The   device	field	of    the    file
				 specification	   contained	 wildcard
				 characters.

      1        GJ%UNT		 The unit field of the file specification
				 contained wildcard characters.  This bit
				 will  never  be  set  because	 wildcard
				 characters   are  not	allowed  in  unit
				 fields.

      2        GJ%DIR		 The  directory   field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      3        GJ%NAM		 The   filename   field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      4        GJ%EXT		 The  file  type  field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      5        GJ%VER		 The generation number field of the  file
				 specification	   contained	 wildcard
				 characters.

      6        GJ%UHV		 The file used has the highest generation
				 number  because a generation number of 0
				 was given in the call.

      7        GJ%NHV		 The  file  used  has  the  next   higher
				 generation  number  because a generation
				 number of 0 or -1 was given in the call.

      8        GJ%ULV		 The file used has the lowest  generation
				 number because a generation number of -2
				 was given in the call.

      9        GJ%PRO		 The  protection  field   of   the   file
				 specification was given.

     10        GJ%ACT		 The   account	 field	 of   the    file
				 specification was given.

     11        GJ%TFS		 The  file   specification   is   for	a
				 temporary file.

     12        GJ%GND		 Files	marked	for  deletion  were   not
				 considered  when  assigning  JFNs.  This
				 bit is set if GJ%DEL was not set in  the
				 call.

|    13        GJ%NOD		 The  node  name  field   of   the   file
|				 specification was given.

     17        GJ%INV		 Invisible files were not considered when
				 assigning  JFNs.   This bit is always on
				 for the short form GTJFN.

   GTJFN ERROR MNEMONICS:

   GJFX1:    Desired JFN invalid
   GJFX2:    Desired JFN not available
   GJFX3:    No JFNs available
   GJFX4:    Invalid character in filename
   GJFX5:    Field cannot be longer than 39 characters
   GJFX6:    Device field not in a valid position

   GJFX7:    Directory field not in a valid position
   GJFX8:    Directory terminating delimiter is not preceded by  a  valid
	     beginning delimiter
   GJFX9:    More than one name field is not allowed
   GJFX10:   Generation number is not numeric
   GJFX11:   More than one generation number field is not allowed
   GJFX12:   More than one account field is not allowed
   GJFX13:   More than one protection field is not allowed
   GJFX14:   Invalid protection
   GJFX15:   Invalid confirmation character
   GJFX16:   No such device
   GJFX17:   No such directory name
   GJFX18:   No such filename
   GJFX19:   No such file type
   GJFX20:   No such generation number
   GJFX21:   File was expunged
   GJFX22:   Insufficient system resources (Job Storage Block full)
   GJFX23:   Exceeded maximum number of files per directory
   GJFX24:   File not found
   GJFX27:   File already exists (new file required)
   GJFX28:   Device is not on-line
   GJFX30:   Account is not numeric
   GJFX31:   Invalid wildcard designator
   GJFX32:   No files match this specification
   GJFX33:   Filename was not specified
   GJFX34:   Invalid character "?" in file specification
   GJFX35:   Directory access privileges required
   GJFX36:   Internal format of directory is incorrect
   GJFX37:   Input deleted
   GJFX38:   File not found because output-only device was specified
   GJFX39:   Logical name loop detected
   GJFX40:   Undefined attribute in file specification
   GJFX41:   File name must not exceed 6 characters
   GJFX42:   File type must not exceed 3 characters
   GJFX43:   More than one ;T specification is not allowed
   GJFX44:   Account string does not match
   GJFX45:   Illegal to request  multiple  specifications  for	the  same
	     attribute
   GJFX46:   Attribute value is required
   GJFX47:   Attribute does not take a value
   GJFX48:   GTJFN input buffer is empty
   GJFX49:   Invalid attribute for this device
   GJFX51:   Byte count too small
|  GJFX55:   Illegal to use node name
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged
   DESX9:    Invalid operation for this device
   STRX09:   Prior structure mount required



		       GTJFN-LONG	 JSYS 20

   Returns a JFN for the specified file.  Accepts the  specification  for
   the	file  from  both a string in memory and from a file.  If both are
   given as arguments, the string is used first, and  then  the  file  is
   used  if  more  fields are needed to complete the specification.  This

   form also allows the program to specify nonstandard values to be  used
   for omitted fields and to request the assignment of a specific JFN.

   ACCEPTS IN AC1:  0 in the left half, and address of the  beginning  of
		    the  argument  table in the caller's address space in
		    the right half

	      AC2:  byte pointer to ASCIZ file	specification  string  in
		    the caller's address space, or 0 if none

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, flags in the left half of AC1, and  the  JFN
		    assigned  in  the  right  half of AC1.  (This word is
		    called an indexable file handle and is given  to  the
		    GNJFN call as an argument.) Updated string pointer in
		    AC2, if pertinent.

   All I/O errors can occur.  These errors cause software  interrupts  or
   process terminations, and only a single return (+1) is given.

   The format of the argument table specified by the right half of AC1 is
   described  below.  Words 0 through 10 (.GJGEN-.GJJFN) must be supplied
   in the long form of the GTJFN call.	The remaining words are optional,
   and if they are supplied, B15(GJ%XTN) of word .GJGEN must be on.

 
   Word      Symbol    Meaning

     0	     .GJGEN    Flag bits in the left half and  generation  number
		       in the right half.  (See below.)

     1	     .GJSRC    Input JFN in the left half and output JFN  in  the
		       right  half.   To  omit either JFN, specify .NULIO
		       (377777).

     2	     .GJDEV    Byte pointer to ASCIZ string  that  specifies  the
		       default	device to be used when none is given.  If
		       this word is 0,	the  user's  connected	structure
		       will be used.

     3	     .GJDIR    Byte pointer to ASCIZ string  that  specifies  the
		       default	directory  to be used when none is given.
		       The string should not include brackets around  the
		       name.

		       If this word is 0, the user's connected	directory
		       will be used.

     4	     .GJNAM    Byte pointer to ASCIZ string  that  specifies  the
		       default	filename  to  be used when none is given.
		       If this word is 0, either the string or the  input
		       JFN must supply the filename.

     5	     .GJEXT    Byte pointer to ASCIZ string  that  specifies  the
		       default	file  type to be used when none is given.
		       If this word is 0, the  null  file  type  will  be
		       used.

     6	     .GJPRO    Byte pointer to ASCIZ string  that  specifies  the
		       default	protection to be used when none is given.
		       If this word  is  0,  the  default  protection  as
		       specified  in  the  directory or the protection of

		       the next lower generation will be used.

     7	     .GJACT    Byte pointer to ASCIZ string  that  specifies  the
		       default account to be used when none is given.  If
		       this word is 0, the user's LOGIN  account  (unless
		       changed) will be used.

     10      .GJJFN    The JFN to associate with the  file  specification
		       if  flag  GJ%JFN  is set in word 0 (.GJGEN) of the
		       argument block.

     11      .GJF2     Extended argument block if B15(GJ%XTN)  is  on  in
		       the  left  half	of  .GJGEN.  This word contains a
		       second group of flags in the  left  half  and  the
		       count  of  the number of words following this word
		       in the argument block  in  the  right  half.   The
		       flags  in the left half specify additional control
		       over the GTJFN process.	The following  flags  are
		       defined:

		       B0(G1%RND) Return to the caller	if  the  filename
				  buffer  becomes  empty,  and	the  user
				  attempts to delete a	character.   This
				  can  occur if the user, when giving the
				  filename, types a  CTRL/U  or  types	a
				  DELETE  or CTRL/W and there are no more
				  characters in the buffer.

		       B2(G1%NLN) Filenames  cannot  be  longer  than	6
				  characters  and  file  types	cannot be
				  longer than 3 characters.  In addition,
				  the	 generation   number,	temporary
				  status, protection, and account  fields
				  cannot  be  specified  in the string or
				  the input data.

		       B3(G1%RCM) Return the confirmation message to  the
				  caller by placing it in the destination
				  buffer.

		       B4(G1%RIE) Return  to  the  caller  if  the  input
				  buffer  becomes  empty,  and	the  user
				  attempts to delete a character.

		       B5(G1%IIN) Files marked as  invisible  are  to  be
				  considered  by  the  system  when it is
				  searching for a file to assign  to  the
				  JFN.

		       B6(G1%SLN) Prohibit  the  expansion   of   logical
				  names.   If,	for  example,  user DBELL
				  defines  logical  name   ME:	  to   be
|				  PSA:<DBELL>  and  does a GTJFN for file
				  ME:FOO.BAR,  the   file   specification
				  stored in the JFN block will be:

|				       PSA:<DBELL>FOO.BAR

				  In this case, the logical name ME:  has
|				  been expanded to PSA:<DBELL>.  However,
				  if bit  G1%SLN  is  set,  and  a  GTJFN
				  performed  on  file  FOO.BAR,  the file
				  specification stored in the  JFN  block

				  is:

				       ME:FOO.BAR

				  In this case, the logical name has  not
				  been expanded.

|		       B7(G1%LOC) The node name cannot be specified.

     12      .GJCPP    Byte pointer to string where GTJFN is to store the
		       exact  copy  of the user's typescript (destination
		       string pointer).  This string will contain logical
		       names,  if  they  were typed by the user, and will
		       not contain the default fields  unless  they  were
		       generated through recognition.  This string allows
		       the caller to obtain a true  copy  of  the  user's
		       typescript.

     13      .GJCPC    Number  of  bytes  available  in  the  destination
		       string  to  which  .GTCPP  (word 12) points.  If a
		       pointer has been specified but this word is 0, the
		       monitor assumes the string contains 130 bytes.

     14      .GJRTY    Byte pointer to the text to  be	output	when  the
		       user  types  a CTRL/R (i.e., pointer to the CTRL/R
		       buffer).  This pointer  cannot  be  equal  to  the
		       pointer	given  in  AC2.  (Refer to the TEXTI call
		       for the definition of CTRL/R text.)

     15      .GJBFP    Byte pointer to the beginning of  the  destination
		       buffer.	(obsolete)

     16      .GJATR    Pointer to the file specification attribute block.

		       The attribute block has the following format:

		       Word    Contents

			0      Count  of   words   in	attribute   block
			       (including this word).
			1      Byte pointer to argument string.
			1+n    Byte pointer to argument string.

		       The ASCIZ argument strings are specified as:

		       keyword:attribute

		       The possible keywords and attribute values are  as
		       follows:

		       Keyword		  Attribute Value

		       A:		  Installation-defined	  account
					  string
		       BDATA:		  DECnet binary optional data
|		       BLOCK-LENGTH:	  Magnetic-tape block length  (in
|					  bytes)
		       BPASSWORD:	  DECnet binary password
		       CHARGE:		  DECnet account string
|		       COMPARTMENTS:n	  Connection
|					  compartmentalization:   16-bit,
|					  defaults to 0 (TOPS-20AN)
|		       CONNECTION:ACTIVE

 
		      TOPS-20 MONITOR CALLS
				(GTJFN Long Form)

 
|		       CONNECTION:PASSIVE Local  to  foreign   connection
|					  attribute;   defaults to ACTIVE
|					  (TOPS-20AN)
|		       DATA:		  DECnet optional data
|		       EXPIRATION-DATE:   Magnetic-tape expiration date
|		       FOREIGN-HOST:a.b.c.d
|					  Alternative  specification  for
|					  32-bit foreign host address
		       FORMAT:		  Magnetic-tape  record   format.
					  The  argument may be one of the
					  following:

					  Format  Meaning

					  F	  Fixed-length records
					  D	  Variable-length records
					  S	  Spanned
					  U	  Binary    files    with
						  36-bits per word

|		       HANDLING-RESTRICTIONS:n
|					  Connection
|					  handling-restrictions   option:
|					  16-bit (TOPS-20AN)
|		       LOCAL-HOST:a.b.c.d Alternate   specification   for
|					  32-bit local host number
		       OFF-LINE 	  NONE	-  display-only  keyword.
					  The attribute is set by setting
					  bit FB%OFF in  word  .FBCTL  of
					  the FDB block.
		       P:		  Octal file protection value
		       PASSWORD:	  DECnet password string
|		       PERSIST:n
|		       PERSIST:(n,m)	  Connection   opening	  attempt
|					  parameters:	0  to keep trying
|					  until successful, n to try  for
|					  n  seconds,  m  to  try every m
|					  seconds (TOPS-20AN)
		       POSITION:	  File	 sequence    number    to
					  position magnetic-tape to.
|		       RECORD-LENGTH:	  Magnetic-tape record length (in
|					  bytes)
|		       SECURITY:n	  Connection   security    field;
|					  16-bit,   system   default   if
|					  omitted (TOPS-20AN)
		       T		  NONE	-  display-only  keyword.
					  The attribute is set by setting
					  bit GJ%TMP in  word  .GJGEN  of
					  the GTJFN block.
|		       TIMEOUT:n	  Amount of time allowed to  pass
|					  while  waiting  for  a  message
|					  from a foreign system.  Default
|					  is  30  seconds;  no timeout if
|					  n=0.	(TOPS-20AN)
|		       TRANSMISSION-CONTROL:n
|					  Connection transmission-control
|					  option;   n  is a 24-bit number
|					  used by IP (TOPS-20AN)
|		       TYPE-OF-SERVICE:n  Connection	  type-of-service
|					  indicating  tradeoffs  made  in
|					  providing data transmission;	n
|					  is   the   low-order	 8  bits:
|					  default  is  0;   NET   WIZARD,

|					  WHEEL  or OPERATOR required for
|					  other than 0.  (TOPS-20AN)
		       USERID:		  DECnet user ID string

   The flag bits accepted in the left half of  .GJGEN  (word  0)  of  the
   argument  block  are basically the same as those accepted in the short
   form of the GTJFN call.  The entire	set  of  bits  is  listed  below.
   (Refer  to  GTJFN - SHORT FORM for more detailed explanations of these
   bits.) The flags that are different	in  the  two  forms  are  GJ%JFN,
   GJ%XTN, GJ%FNS, and GJ%SHT.

 
      Bit    Symbol		      Meaning

       0     GJ%FOU    Create a new version of the file.

       1     GJ%NEW    The file must not exist.

       2     GJ%OLD    The file must exist.

       3     GJ%MSG    Type  a	message  if  the  user	presses  ESC   to
		       terminate input.

       4     GJ%CFM    Confirmation from the user is required.

       5     GJ%TMP    The file is temporary.

       6     GJ%NS     Search only the first specification in a  multiple
		       logical name definition.

       7     GJ%ACC    The JFN cannot be accessed by inferior processes.

       8     GJ%DEL    Ignore the file deleted bit in the FDB.

      9-10   GJ%JFN    Associate the JFN supplied in .GJJFN (word 10)  of
		       the  argument  block  with the file specification.
		       The value of this field is interpreted as follows:

		       Value		   Meaning

		       0(.GJDNU)   Ignore the JFN supplied.
		       2(.GJERR)   Attempt to assign the JFN supplied and
				   return   an	 error	 if   it  is  not
				   available.
		       3(.GJALT)   Attempt to  assign  the  JFN  supplied
				   and, if it is not available, assign an
				   alternate.

      11     GJ%IFG    The  file  specification  can   contain	 wildcard
		       characters.

      12     GJ%OFG    Associate the  JFN  with  the  file  specification
		       string  and not the file itself.  This is termed a
		       "parse-only JFN", and allows the syntax of a  file
		       name  to be checked regardless of whether or not a
		       file of that name actually exists.

      13     GJ%FLG    Return flags in AC1 on  successful  completion  of
		       the call.

      14     GJ%PHY    The physical device is to be used.

      15     GJ%XTN    The argument block contains more than  10  (octal)

		       words.

      16     GJ%FNS    This bit is ignored for the long form of the GTJFN
		       call.

      17     GJ%SHT    This bit must be off for  the  long  form  of  the
		       GTJFN call.

   The generation number given in the right half of .GJGEN  (word  0)  of
   the argument block can be one of the following:

      0(.GJDEF)  to indicate that the next higher generation number is to
		 be used if GJ%FOU is on, or to indicate that the highest
		 existing generation number is to be used  if  GJ%FOU  is
		 off.

      -1(.GJNHG) to indicate that the next higher generation number is to
		 be used if no generation number is supplied.

      -2(.GJLEG) to indicate that the lowest existing  generation  number
		 is to be used if no generation number is supplied.
      -3(.GJALL) to indicate that all generation numbers are to  be  used
		 and  that the JFN is to be assigned to the first file in
		 the group, if no generation number  is  supplied.   (Bit
		 GJ%IFG must be on.)

      1-377777	 to indicate that the specified number is to be  used  as
		 the generation if no generation number is supplied.

   On a successful return, the following flags are returned in	the  left
   half of AC1 if flag bit GJ%IFG, GJ%OFG, or GJ%FLG was on in the call.

 
		     Bits Returned on Successful GTJFN Call

 
     Bit       Symbol		 Meaning

      0        GJ%DEV		 The   device	field	of    the    file
				 specification	   contained	 wildcard
				 characters.

      1        GJ%UNT		 The unit field of the file specification
				 contained wildcard characters.  This bit
				 will  never  be  set  because	 wildcard
				 characters   are  not	allowed  in  unit
				 fields.

      2        GJ%DIR		 The  directory   field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      3        GJ%NAM		 The   filename   field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      4        GJ%EXT		 The  file  type  field   of   the   file
				 specification	   contained	 wildcard
				 characters.

      5        GJ%VER		 The generation number field of the  file
				 specification	   contained	 wildcard
				 characters.

      6        GJ%UHV		 The file used has the highest generation
				 number  because a generation number of 0
				 was given in the call.

      7        GJ%NHV		 The  file  used  has  the  next   higher
				 generation  number  because a generation
				 number of 0 or -1 was given in the call.

      8        GJ%ULV		 The file used has the lowest  generation
				 number because a generation number of -2
				 was given in the call.

     10        GJ%ACT		 The   account	 field	 of   the    file
				 specification was given.

     11        GJ%TFS		 The  file   specification   is   for	a
				 temporary file.

     12        GJ%GND		 Files	marked	for  deletion  were   not
				 considered  when  assigning  JFNs.  This
				 bit is set if GJ%DEL was not set in  the
				 call.

|    13        GJ%NOD		 The  node  name  field   of   the   file
|				 specification was given.

     17        GJ%GIV		 Invisible files were not considerd  when
				 assigning  JFNs.  This bit is set by the
				 monitor if G1%IIN was	not  set  by  the
				 user in the GTJFN call.

   Refer to the short form of the  GTJFN  call	for  the  possible  error
   mnemonics.

 

 

|  DELETION - GTNCP is now obsolete



			     GTRPI     JSYS 172

   Returns the paging trap information for the specified process.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with
	      AC1   containing number of pager traps (i.e., the number of
		    times   a	trap  has  occurred  to  the  pager)  for
		    designated process since the process was started
	      AC2   containing number of page faults (i.e., the number of
		    times a trap has resulted in a page being swapped in)
		    for designated process since the process was started
	      AC3   containing	time  spent  (in  milliseconds)  in  page
		    routines  by designated process since the process was
		    started

   The number of pager traps will be greater than or equal to the  number
   of page faults.

   Generates an illegal instruction interrupt on error conditions below.

   GTRPI ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     GTRPW     JSYS 171

   Returns the trap  words.   This  monitor  call  allows  a  program  to
   retrieve information about a previous read, write, or execute trap.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with trap status word from last  memory  trap
		    in	AC1,  and  last monitor call that had an error in
		    AC2.

   The following bits are defined in the status word:

      B0(PF%USR)  page failure-user mode reference
      B5(PF%WRT)  page failure-write reference
      B14(TSW%RD) trap status-read (always on)
      B15(TSW%WT) trap status-write (same setting as B5)
      B16(TSW%EX) trap status-execute (always on)
      B17(TSW%MN) trap status-monitor mode reference (complement of B0)
      B18-35	  address of reference that caused the trap

   This information allows a program to determine the exact  cause  of	a
   memory trap and/or the effective virtual address that caused the trap.
   This information is sufficient to enable the program to  continue,  if
   desired, when the cause of the trap has been removed.

   The contents of AC1 is 0 if there have been no memory traps.

   Generates an illegal instruction interrupt on error conditions below.

   GTRPW ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     GTSTS     JSYS 24

   Returns the status of a file associated with a JFN.

   ACCEPTS IN AC1:  JFN in the right half

   RETURNS     +1:  always, with status in AC2.  If JFN is illegal in any
		    way, B10 of AC2 will be 0.

 
				 JFN STATUS WORD

      B0(GS%OPN)  file is open
      B1(GS%RDF)  if file is open (if bit 0 is on), it is open	for  read
		  access
      B2(GS%WRF)  if file is open, it is open for write access
      B3(GS%XCF)  if file is open, it is open for execute access
      B4(GS%RND)  if file is open, it is open for non-append access
      B7(GS%LNG)  file is longer than 512 pages
      B8(GS%EOF)  last read was past end of file
      B9(GS%ERR)  file may be in error (i.e.,  a  device  or  data  error
		  occurred)
      B10(GS%NAM) file specification is associated with this JFN
      B11(GS%AST) the JFN is parse-only (GJ%OFG was set in GTJFN call)
      B12(GS%ASG) JFN is currently being assigned
      B13(GS%HLT) I/O errors are considered terminating conditions
      B17(GS%FRK) This is a restricted	JFN  (GJ%ACC  was  set	in  GJTFN
		  call).  Only the process that received this JFN may use
		  it.  Other processes may get another JFN for this file.
      B18(GS%PLN) if set, any line numbers present in the file are passed
		  to  the program during input (SIN, BIN, etc).  If zero,
		  line numbers are stripped from the data passed  to  the
		  program.
      B32-35	  data mode of the file.  Refer to Chapter 2.
	(GS%MOD)

		       .GSNRM  normal data mode
		       .GSIMG  image mode

		       .GSSMB  small buffer mode
		       .GSDMP  dump mode

   If B0(GS%OPN) is not set on return, the file is not	opened,  and  the
   settings of bits 1 through 4 are indeterminate.

   The STSTS call can be used to set the status of a particular file.



			     GTTYP     JSYS 303

   Returns the terminal type number  for  the  specified  terminal  line.
   (Refer to Section 2.4.9.4 for the terminal type numbers.)

|  ACCEPTS IN AC1:  terminal designator

   RETURNS     +1:  always, with terminal type number in AC2  and  buffer

		    allocation	 numbers   (#  of  input  buffers  to  be
		    allocated in left half, and # of output buffers to be
		    allocated in right half) in AC3.  AC1 is unchanged.

   The STTYP monitor call can be used to set the terminal type number for
   a specified line.

   Generates an illegal instruction interrupt on error conditions below.

   GTTYP ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   TTYX01:   Line is not active



			     HALTF     JSYS 170

   Halts the current process and any inferior processes  of  the  current
   process.  Sets the process' PC to the next after the call and saves it
   in the Process Storage Block (PSB) in case the process  is  continued.
   The	user  can  continue  the  process by typing the CONTINUE command,
   which causes the process to start at the next instruction.

   Sets bits  1-17(RF%STS)  in	the  status  word  for	this  process  to
   2(.RFVPT).	Refer  to  the	RFSTS  monitor call for the format of the
   status word.

   If the top level process executes a HALTF call and does not have WHEEL
   or  OPERATOR  capability  enabled,  the job is logged out.  If the top
   level process executes a HALTF call and does have  WHEEL  or  OPERATOR
   capability enabled, control passes to mini-exec level.



			     HFORK     JSYS 162

   Halts one or more inferior processes.  (Refer  to  the  HALTF  monitor
   call description to halt the current process.)

   ACCEPTS IN AC1:  process handle (inferior processes only)

   RETURNS     +1:  always

   Sets bits 1-17(RF%STS) in the status word(s) for addressed  process(s)
   to  2(.RFVPT).   Refer to the RFSTS monitor call for the format of the
   status word.

   Generates an illegal instruction interrupt on error conditions below.

   HFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   HFRHX1:   Illegal to halt self with HFORK



			     HPTIM     JSYS 501

   Returns the	value  of  one	of  the  high  precision  system  clocks.
   Although  the main time base from interrupts generated by the internal
   system clock is in units of 1 millisecond, the clock provides  a  time
   base  in  units  of	10 microseconds.  The HPTIM monitor call provides
   access to the variables kept in these high precision units.

   ACCEPTS IN AC1:  number of the clock to read (see below)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success,  with  AC1  containing  the  value  of   the
		    specified clock

   The numbers for currently-defined clocks are:

	0    .HPELP    Elapsed time since system startup.  (Refer to  the
		       TIME call for obtaining the time in milliseconds.)

	1    .HPRNT    CPU runtime for this process.  (Refer to the RUNTM
		       call for obtaining the time in milliseconds.)

   HPTIM ERROR MNEMONICS:

   HPTX1:    Undefined clock number



			     HSYS     JSYS 307

   Initiates an orderly shutdown of  the  timesharing  operation  of  the
   system.   This  call causes periodic notices of the impending shutdown
   to be issued to all terminals.  It also causes any jobs  still  logged
   in at the designated shutdown to be logged out.

   RESTRICTIONS:    requires WHEEL, OPERATOR, or MAINTENANCE capabilities
		    enabled

   ACCEPTS IN AC1:  shutdown time with the date and time in the  internal
		    format.  (Refer to Section 2.9.2.)

	      AC2:  date  and  time  in  internal  format   when   system
		    operation  will  resume  (or 0 if unknown).  Used for
		    advisory messages only.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, shutdown procedure initiated

   The shutdown notice is issued immediately  to  all  terminals  if  the
   shutdown time is within two hours.  The notice is also sent two hours,
   one hour, 30 minutes, 10 minutes, 5 minutes, and one minute before the
   shutdown.

   The time when the system is expected to be placed back into	operation
   is not used directly by the monitor.  It is entered into a GETAB table

   where it may be examined with the GETAB monitor call.

   HSYS ERROR MNEMONICS:

   CAPX2:    WHEEL, OPERATOR, or MAINTENANCE capability required
   TIMEX1:   Time cannot be greater than 24 hours
   TIMEX2:   Downtime cannot be more than 7 days in the future



			     IDCNV     JSYS 223

   Converts separate numbers for the local year,  month,  day,	and  time
   into  the  internal date and time format.  (Refer to Section 2.9.2 for
   more information on the internal format.)

   ACCEPTS IN AC2:  year  in  the  left   half,   and	numerical   month
		    (0=January) in the right half

	      AC3:  day of the month (0=first day) in the left half,  and
		    0 in the right half

	      AC4:  B0(IC%DSA) apply daylight savings  according  to  the
			       setting	of  B1(IC%ADS).   If  B0  is off,
			       daylight  savings  is  applied	only   if
			       appropriate for the date.

		    B1(IC%ADS) apply daylight savings  if  B0(IC%DSA)  is
			       on.

		    B2(IC%UTZ) use time zone in B12-17.  If this  bit  is
			       off, the local time zone is used.

		    B3(IC%JUD) interpret the number in the right half  of
			       AC2  as	being in Julian day format (Jan 1
			       is day 1).

		    B12-17     time zone  to  use  if  B2(IC%UTZ)  is on.
		    (IC%TMZ)   (Refer  to  Section  2.9.2  for	the  time
			       zones.)

		    B18-35     local time in seconds since midnight.
		    (IC%TIM)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, AC2 contains the internal date and time, and
		    AC3 contains

		    B0 and B2	on for compatibility with the ODCNV call

		    B1(IC%ADS)	on if daylight savings was applied

		    B12-17	time zone used
		    (IC%TMZ)

   IDCNV ERROR MNEMONICS:

   DATEX1:   Year out of range
   DATEX2:   Month is not less than 12
   DATEX3:   Day of month too large
   DATEX5:   Date out of range
   DATEX7:   Julian day is out of range
   TIMEX1:   Time cannot be greater than 24 hours
   ZONEX1:   Time zone out of range



			     IDTIM     JSYS 221

   Inputs the date and time and converts them to the  internal	date  and
   time  format.   (Refer  to Section 2.9.2.) The IDTIM monitor call does
   not permit either the date or the time to be  entered  separately  and
   does  not  perform conversions for time zones other than the local one
   (unless the time zone is specified in the input string).  Refer to the
   IDTNC and IDCNV monitor calls descriptions for these functions.

   ACCEPTS IN AC1:  source designator

	      AC2:  format option flags (see below), 0 is the normal case

   RETURNS     +1:  failure, error code in AC2, updated string pointer in
		    AC1, if pertinent

	       +2:  success, updated string  pointer,  if  pertinent,  in
		    AC1, and the internal format date and time in AC2

   The format option flags in AC2 specify the interpretation to  be  used
   when a date or time specification is ambiguous.

 
			       IDTIM Option Flags

      B1(IT%NNM)  Do not allow the month to be numeric and ignore B2-3.

      B2(IT%SNM)  Interpret the second number in the date  as  the  month
		  (e.g.,  6/2/76  is  interpreted  as Feb.  6, 1976).  If
		  this bit is off, the first number is interpreted as the
		  month (e.g., 2/6/76 is interpreted as Feb.  6, 1976).

      B3(IT%ERR)  Return an error if the order of the day and month  does
		  not  agree  with  the setting of B2(IT%SNM) even though
		  the date can be successfully interpreted.  If this  bit
		  is off, a date which can be interpreted by assuming the
		  day and month are  in  the  opposite	order  than  that
		  specified   by   the	setting  of  B2(IT%SNM)  will  be
		  considered  valid.   For  example,  if  B2-3	are  off,
		  30/5/76 will be considered as a valid date.

      B7(IT%NIS)  Seconds cannot be included in a time specification.

      B8(IT%AIS)  Seconds must be included in a  time  specification  and
		  must be preceded by a colon.

		  If B7-8 are both off, seconds are optional  in  a  time
		  specification.   If specified, seconds must be preceded

		  by a colon.

      B9(IT%NAC)  Colon cannot be used to separate hours and minutes.

      B10(IT%AAC) Colon must be used to separate hours and minutes.

		  If B9-10 are both off,  a  colon  is	optional  between
		  hours and minutes.

      B11(IT%AMS) When	B7-10  are   off,   always   interpret	 a   time
		  specification containing one colon as hhmm:ss.
      B12(IT%AHM) When	B7-10  are   off,   always   interpret	 a   time
		  specification  containing one colon as hh:mm and return
		  an error if the first field is too large.  This differs
		  from	B7(IT%NIS)  in	that  seconds  can be included if
		  preceded by a second colon.

		  If B7-12 are all off, a time	specification  containing
		  one colon is interpreted as hh:mm if the first field is
		  small enough.  Otherwise it is interpreted as hhmm:ss.

      B14(IT%N24) Do not allow the time to be specified in 24-hour format
		  (e.g.,  1520	for 3:20 in the afternoon) and make AM or
		  PM specification mandatory.

      B15(IT%NTM) Do not allow the time specification to include AM,  PM,
		  NOON, or MIDNIGHT.

      B16(IT%NTZ) Do not allow a time zone to be specified.

|  If  AC2  is	0,  the  IDTIM	call  accepts  the  date  and	time   in
|  month/day/year  or  day/month/year  format.	Hyphens (-), slashes (/),
|  and spaces ( ) are valid delimiters.   In  cases  where  pure  numeric
   representation  is  used  for  the date (1/9/1967, for example), IDTIM
   checks the first number for being in the range:  0<n<13.  If the  test
   is  successful,  the first number is interpreted as the month.  If the
   test is unsuccessful, the test is made on the  second  number  and  if
   successful,	that  number  is  interpreted as the month.  Otherwise an
   error is generated.	For example:

	1.  5/6/1976 is interpreted as May 6, 1976

	2.  6/5/1976 is interpreted as June 5, 1976

	3.  13/5/1976 is interpreted as May 13, 1976

	4.  13/13/1976 generates an error

 
   IDTIM ERROR MNEMONICS:

   DILFX1:   Invalid date format
   TILFX1:   Invalid time format
   DATEX1:   Year out of range
   DATEX3:   Day of month too large
   DATEX5:   Date out of range

   All I/O  errors  are  also  possible.   These  errors  cause  software
   interrupts or process terminations as described under the BIN call.



			     IDTNC     JSYS 231

   Inputs the date and/or the time and converts it into separate  numbers
   for	the  local  year, month, day, or time.	The IDTNC call allows the
   date or time to be entered separately, which is not possible with  the
   IDTIM JSYS because neither one can be converted to the internal format
   without converting the other.  (Refer to Section 2.9.2.)

   ACCEPTS IN AC1:  source designator

	      AC2:  format option flags
		    In addition to the flags described in the IDTIM call,
		    the flags below can also be specified:

		    B0(IT%NDA) Do not input the date and ignore B1-3.  If
			       IT%NDA is off, the date must be input.

		    B6(IT%NTI) Do not input the time  and  ignore  B7-16.
			       If IT%NTI is off, the time must be input.

   RETURNS     +1:  failure, error code in AC2, updated  string  pointer,
		    if pertinent, in AC1

	       +2:  success, updated string pointer, if pertinent, in AC1

		    If the date was input,
		    AC2 contains the year in the left half, and the month
			(0=January) in the right half.
		    AC3 contains the day of the month  (0=first  day)  in
			the left half, and the day of the week (0=Monday)
			in the right half.

		    If the time was input,
		    AC4 contains
			B0(IC%DAS)  on if IT%NTI was set in  AC2,  or  if
				    IT%NDA was set in AC2 and a time zone
				    was input (for compatibility with the
				    ODCNV call).
			B1(IC%ADS)  on if a daylight  savings  time  zone
				    was  input,  or  if IT%NTI was set in
				    AC2.
			B0(IC%UTZ)  on if IT%NTI was set in  AC2,  or  if
				    IT%NDA was set in AC2 and a time zone
				    was input (for compatibility with the
				    ODCNV call).
			B3(IC%JUD)  on if a number in Julian  day  format
				    was input.
			B12-17	    the  time  zone if one  was input, or
			(IC%TMZ)    the  local	time  zone  if	none  was
				    input.   (Refer  to Section 2.9.2 for
				    the time zones.)
			B18-35	    time as seconds since midnight.
			(IC%TIM)

   A -1 returned in both AC2 and AC3 means the system date and time  have
   not been set.

   IDTNC ERROR MNEMONICS:

   DILFX1:   Invalid date format
   TILFX1:   Invalid time format

   All I/O  errors  are  also  possible.   These  errors  cause  software
   interrupts  or  process  terminations  as described under the BIN call
   description.

   The IDTNC call does not detect certain errors in date input,  such  as
   day	31  of	a  30-day  month.  These errors are detected by the IDCNV
   call.



			      IIC     JSYS 132

   Initiates software interrupts on the specified channels in a  process.
   (Refer to Section 2.6.)

   ACCEPTS IN AC1:  process handle

	      AC2:  36-bit word
		    Bit n on  means  initiate  a  software  interrupt  on
		    channel n.

   RETURNS     +1:  always

   Generates an illegal instruction interrupt on error conditions below.

   IIC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			     INLNM     JSYS 503

   Returns a logical name that is defined either for this job or for  the
   system.  (Refer to Section 2.2.2 and CRLNM and LNMST monitor calls.)

   ACCEPTS IN AC1:  function code in the left half, and  index	into  the
		    table of defined logical names in the right half

	      AC2:  byte pointer to the string for  storing  the  logical
		    name

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC2

   The available functions are:

   Code Symbol	  Meaning

	  0	  .INLJB    List the logical names defined for this job

	  1	  .INLSY    List the logical names defined for the system

   INLNM ERROR MNEMONICS:

   INLNX1:   Index is beyond end of logical name table
   INLNX2:   Invalid function



			    IPOPR%     JSYS 760
|
|  Performs Internet protocol network management operations.
|
|  RESTRICTIONS:    Requires NET WIZARD capability.
|
|  ACCEPTS IN AC1:  Function code
|
|	      AC2:  Function dependent argument
|
|	      AC3:  Function dependent argument
|
|  RETURNS     +1:  Always, with error code in AC1 on failure
|
|  Function Codes
|
|  Code  Symbol   Meaning
|
|  0	 .IPSNT   Change network state.  AC2 contains the ARPAnet network
|		  number  (10) and AC3 contains the desired network state
|		  (zero to disable;  non-zero to enable).
|
|  1	 .IPRNT   Read network state.  AC2 contains the  ARPAnet  network
|		  number  (10).   The  network	state  is returned in AC3
|		  (zero for disabled;  non-zero for enabled).
|
|  2	 .IPINI   Reload ARPAnet host table and Internet table.
|
|  3	 .IPGWY   Reload ARPAnet gateway routing table.



			      JFNS     JSYS 30

   Returns the file specification currently associated with the JFN.

   ACCEPTS IN AC1:  destination designator where the ASCIZ string  is  to
		    be written

	      AC2:  indexable file handle (refer to GTJFN), or pointer to
		    string

	      AC3:  format control bits to be  used  when  returning  the
		    string, or 0

	      AC4:  byte pointer to  string  containing  prefix  of  file
		    specification attribute

   RETURNS     +1:  always, with updated string pointer, if pertinent, in
		    AC1

   AC2 can have one of two formats, depending on B26(JS%PTR) in AC3.  The
   first  format  is  a word with either 0 or the flag bits returned from
   GTJFN in the left half and the JFN in the right half.  When	the  left
   half  is  0, the string returned is the exact specification associated
   with the JFN.  If the  given  JFN  is  associated  only  with  a  file
   specification  (i.e., it was obtained with B12(GJ%OFG) on in the GTJFN
   call), the string returned contains null fields for nonexistent fields
   or fields containing wildcards, and actual values for existent fields.

   When the left half is nonzero, the string returned  contains  wildcard
   characters  for  appropriate  fields  and 0, -1, or -2 as a generation
   number if the corresponding bit is on in the call.

   The second format (allowed only if B26(JS%PTR) of  AC3  is  on)  is	a
   pointer  to	the string to be returned.  This string is one field of a
   file specification.	The field is  determined  by  the  first  nonzero
   3-bit  field in AC3 or by the setting of B27(JS%ATR) or B28(JS%AT1) in
   AC3.  For example, if bits 6-8 (JS%NAM) of AC3 are nonzero,	then  the
   string  is interpreted as a filename field.	If B27(JS%ATR) is on, the
   string  is  interpreted  as	a  file  specification	 attribute.    If
   B28(JS%AT1)	is  on, the string is concatenated to the string to which
   AC4 points, and a colon is inserted between the two strings.   In  all
   cases,  the	string	is  output to the destination designator, and the
   appropriate punctuation is added.

   AC3 contains control bits for formatting the  string  being	returned.
|  B0-20  are  divided	into fields corresponding to the fields in a file
|  specification.  The value of the control bits  determines  the  output
|  for that field of the file specification.  The values are:

	0    (.JSNOF)  do not output this field
	1    (.JSAOF)  always output this field
	2    (.JSSSD)  suppress this field if it is the system default

   The bits that can be set in AC3 are as follows:

|	B0(JS%NOD)	Output for node field
|	B1-2(JS%DEV)	output for device field
	B3-5(JS%DIR)	output for directory field
	B6-8(JS%NAM)	output for filename field (2 is illegal)
	B9-11(JS%TYP)	output for file type field (2 is illegal)
	B12-14(JS%GEN)	output for generation number field
	B0-14(JS%SPC)	output for all file  specification  fields  named
			above.	 This field should have the same bits set
			as would  be  set  in  the  fields  above.   (See
			B35(JS%PAF) below.)
	B15-17(JS%PRO)	output for protection field
	B18-20(JS%ACT)	output for account field
	B21(JS%TMP)	return ;T if appropriate
	B22(JS%SIZ)	return size of file in pages
	B23(JS%CDR)	return creation date
	B24(JS%LWR)	return date of last write
	B25(JS%LRD)	return date of last read
	B26(JS%PTR)	AC2 contains pointer to the string being returned

	B27(JS%ATR)	return	 file	specification	 attributes    if
			appropriate
	B28(JS%AT1)	return the specific specification attribute whose
			prefix	is  indicated  by the string to which AC4
			points.  This bit  is  used  when  a  program  is
			processing  attributes	one at a time.	If JS%ATR
			is also set,  all  attributes  will  be  returned
			(WHEEL	capabilities  are required to receive the
			password).  See the description of the	long-form
			GTJFN for a list of file attributes.
	B29(JS%OFL)	return the "OFFLINE" attribute
	B32(JS%PSD)	punctuate the size and date fields
	B33(JS%TBR)	tab before all fields returned, except for  first
			field
	B34(JS%TBP)	tab before all fields that may be returned (i.e.,
			fields	whose  value  is given as 1 or 2), except
			for first field
|	B35(JS%PAF)	punctuate all fields from node through ;T

   If B32-35 are 0, punctuation between fields is not used.

   If AC3 is 0, the string is output in the format

|	node::dev:<directory>name.typ.gen;T

   The temporary  attribute  (;T)  is  not  returned  if  the  JFN  is	a
   parse-only  JFN (refer to GJ%OFG in the GTJFN description) or the file
   is not temporary.

   The punctuation used on each field is shown below.

	dev:<directory>name.typ.gen;attribute
	,size,creation date,write date,read date

   The GTJFN or GNJFN monitor call is used to  associate  a  JFN  with	a
   given file specification string.

   Generates an illegal instruction interrupt on error conditions below.

   JFNS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     KFORK     JSYS 153

   Kills one or more processes.  When a process is  killed,  all  private
   memory  acquired  by  the  process  and  its Process Storage Block are
   released.  Also, any JFNs the process has created  are  released,  and
   any	terminal  interrupt  assignments  that were acquired from another
   process are passed back.  (Note that because the  process  is  deleted

   asynchronously,  a  page of a file mapped into a lower process may not
   be unmapped before the KFORK call returns.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, unless the current process attempts  to  kill
		    itself

   The KFORK call will not release a process  handle  that  identifies	a
   process  already  killed  by another process.  In this case, the RFRKH
   call must be used to release the handle.

   The CFORK monitor call can be used to create an inferior process.

   Generates an illegal instruction interrupt on error conditions below.

   KFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   KFRKX1:   Illegal to kill top level process
   KFRKX2:   Illegal to kill self



			    LATOP%     JSYS 631
*
*
*  Performs Local Area Transport (LAT) functions for TOPS-20.
*
*  ACCEPTS IN AC1:  address of argument block
*
*  RETURNS     +1:  always
*
*  Generates an illegal instruction trap on failure with  error  code  in
*  AC1.
*
*  The possible LATOP% functions are as follows:
*
*
*  Code  Symbol 	    Meaning
*
*   0	.LASET	Set local node LAT parameters.	This function is used  to
*		set  the  dynamic  parameters  for  the host in the local
*		node.  WHEEL or OPERATOR privileges are required.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LASET
*		 2 .LAPRM  Parameter number for parameter being set.  The
*			   following  table  gives  the  relationship  of
*			   parameter number to dynamic parameter.
*
*			      1    MAX_CIRCUITS
*			      2    MAX_CONNECTS

*			      3    HOST_NUMBER
*			      4    LAT_TERMINAL_ACCESS_STATE
*			      5    HOST_RETRANSMIT_LIMIT
*			      6    HOST_CIRCUIT_TIMER
*			      7    HOST_MULTICAST_TIMER
*			     10    HOST_ACCESS_CODES
*			     11    HOST_NAME
*			     12    HOST_IDENTIFICATION
*			     13    HOST_SERVICE_NAME and
*				   HOST_SERVICE_NAME_RATING and
*				   HOST_SERVICE_DESCRIPTION
*
*		 3 .LAVAL  A function  dependent  parameter  value.   For
*			   parameters  1-7  this  is  the  new	parameter
*			   value.  For parameter 10 this is  the  address
*			   of  a  256  bit  mask  representing the access
*			   codes to be set.  For all others, this  is  an
*			   ASCIZ  string  pointer  to  the  string  which
*			   represents the parameter.   The  bit  mask  is
*			   arranged  32  bits  per  word,  left adjusted.
*			   This argument word is ignored  for  all  other
*			   parameters.

*		 4 .LAQUA  For parameter 13 only, a set of flags  in  the
*			   left  half and the service rating in the right
*			   half.  The meaning of the flag bits is:
*
*			   Symbol Bit		 Meaning
*
*			   LA%RAT   0 Set the rating as specified in  the
*				      right  half  of this argument word.
*				      If all ones, the rating is  set  to
*				      DYNAMIC.
*			   LA%DSC   1  Set  the  service  description  as
*				      specified   in  the  next  argument
*				      word.
*			   If any of these bits is set, the value for the
*			   corresponding service parameter is always set.
*			   If a particular bit is  not	set,  the  action
*			   taken  depends  on  whether or not the service
*			   name  previously   existed:	  if   previously
*			   existent,  the parameter value is not changed.
*			   Otherwise the default  for  the  parameter  is
*			   set.
*		 5 .LADSC  An  ASCIZ  string  pointer  to   the   service
*			   description	string	to  be set.  If LA%DSC is
*			   set and this parameter is  zero,  the  current
*			   service description will be cleared.
*
*
*   1	.LACLR	Clear local node's LAT parameters.  This function is used
*		to clear the dynamic parameters for the host in the local
*		node.  WHEEL or OPERATOR privileges are required.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LACLR
*		 2 .LAPRM  Parameter number for parameter being  cleared.
*			   Parameter   numbers	are  the  same	as  those
*			   defined for the .LASET function.  Parameters 4
*			   and 11 cannot be cleared.  To change them, the
*			   .LASET function must be used.
*		 3 .LAVAL  Address of a 256  bit  mask	indicating  which
*			   access  codes are to be cleared (parameter 10)
*			   or an ASCIZ pointer to the service name to  be
*			   cleared  (parameter	13).   The  bit  mask  is
*			   arranged 32	bits  per  word,  left	adjusted.
*			   This  argument  word  is ignored for all other
*			   parameters.

*   2	.LASCH	Show the local node's LAT parameters.  This  function  is
*		used   to   show   the	dynamic,  static,  and	permanent
*		parameters for the host in the local node.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LASCH
*		 2 .LABCT  Count of the show buffer provided by the  user
*			   into  which	the  data  is to be placed in the
*			   right half.	Returned with  the  buffer  count
*			   actually used in the left half.
*		 3 .LABFA3 Address of the show buffer.	The format of the
*			   buffer  returned  to  the  user  is	given  in
*			   Appendix B.
*
*
*   3	.LASTC	Show  connects.   This	function  is  used  to	show  all
*		currently  active  LAT	terminal connections at the local
*		node.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LASTC
*		 2 .LABCT  Count of the show buffer provided by the  user
*			   into  which	the  data  is to be placed in the
*			   right half.	Returned with  the  buffer  count
*			   actually used in the left half.
*		 3 .LABFA  Address of the show buffer.	The format of the
*			   buffer  returned  to  the  user  is	given  in
*			   Appendix B.
*
*
*   4	.LASAS	Show Adjacent Servers.	This function is used  to  return
*		information  about  one  or  more  LAT servers which have
*		access the local  LAT  host.   Information  for  as  many
*		servers  as  possible  is  kept in memory but if the data
*		base overflows, the oldest entry is deleted to make  room
*		for the latest.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LASAS
*		 2 .LABCT  Count of the show buffer provided by the  user
*			   into  which	the  data  is to be placed in the
*			   right half.	Returned with the count  actually
*			   needed in the left half.
*		 3 .LABFA  Address of the show buffer.
*		 4 .LAQUA  ASCIZ pointer to server  name  if  information
*			   about a specific server is requested.  Zero if
*			   a summary of all servers is requested.
*

*   5	.LASCO	Show Counters.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LASCO
*		 2 .LABCT  Count of the show buffer provided by the  user
*			   into  which	the  data  is to be placed in the
*			   right half.	Returned with  the  buffer  count
*			   actually used in the left half.
*		 3 .LABFA  Address of the show buffer.
*		 4 .LAQUA  ASCIZ pointer to server name  for  a  specific
*			   server, zero for the ALL SERVERS counter set.
*
*   5	.LAZRO	Zero Counters.
*
*	      Word  Symbol	Contents
*
*		 0 .LAACT  Length of the argument block,  including  this
*			   word.
*		 1 .LAFCN  .LAZRO
*		 2 .LABCT  unused
*		 3 .LABFA  unused
*		 4 .LAQUA  Server number for a specific server, zero  for
*			   the ALL SERVERS counter set.
*
*  LATOP% ERROR MNEMONICS:
*
*  ARGX02:   Invalid function
*  ARGX04:   Argument block too small
*  CAPX1:    WHEEL or OPERATOR capability required
*  LATX01:   Buffer size too small for available data
*  LATX02:   LAT parameter value out of range
*  LATX03:   LAT is not operational
*  LATX04:   Invalid or unknown LAT server name
*  LATX05:   Invalid LAT parameter
*  LATX06:   Invalid LAT parameter value
*  LATX07:   Invalid or unknown LAT service name
*  LATX08:   Insufficient LAT Resources
*  LATX09:   LAT Host name already set



			      LGOUT	JSYS 3

   Kills the specified	job  and  appends  an  accounting  entry  to  the
   accounting  data  file.   However, no entry is appended if the job was
|  never logged in (that is, a CTRL/C was typed, but no login occurred).

   RESTRICTIONS:    some functions require WHEEL or OPERATOR capabilities
		    enabled

   ACCEPTS IN AC1:  number of the job to be logged out,  or  -1  for  the
		    current job

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   When a specific job number is given in AC1, it must refer to either	a
   PTY	job  controlled  by  the current job or a job logged in under the
   same user name as the current job.  Otherwise, to give a specific  job
   number,  the  process  must have WHEEL or OPERATOR capability enabled.
   An argument of -1 must be given if the  current  job  wishes  to  kill
|  itself  (that  is,  the  job  number  given	cannot be the same as the
   current job).  Note that this monitor call  does  not  return  if  the
   argument in AC1 is -1.

   The LGOUT monitor call outputs the time used (both CPU  and	console),
|  the	job  number,  the current date and time, and the name of the user
|  who logged out the job if it is not the calling job.  This information
   is  output  on  the	terminal  to  which  the  job being logged out is
   attached.

   LGOUT ERROR MNEMONICS:

   LOUTX1:   Illegal to specify job number when logging out own job
   LOUTX2:   Invalid job number
   LOUTX3:   WHEEL or OPERATOR capability required
   LOUTX4:   LOG capability required
   LOUTX5:   Illegal to log out job 0



			    LLMOP%     JSYS 624
*
*
*  Provides access to Network Interconnect (NI)  Remote  Console  Service
*  and performs Ethernet Loopback operations.
*
*  ACCEPTS IN AC1:
*
*  RETURNS     +1:
*
*  Interface to NI Remote Console
*
*  This interface provides four basic functions;  gaining access  to  the
*  NI  Remote  Console Service, initiating a request, checking the status
*  of a pending request, and enabling to read unsolicited datagrams.
*
*  Access to the NI Remote Console Service is obtained through the use of
*  the	LLMOP%	JSYS.	The  LLMOP%  JSYS  provides  the following remote
*  console functions:
*
*	 o  .RCRID  - REQUEST IDENTITY
*
*	 o  .RCRCT  - REQUEST COUNTERS
*
*	 o  .RCIDS  - IDENTIFY SELF
*
*	 o  .RCRBT  - REMOTE BOOT
*
*	 o  .RCRPY  - READ REMOTE CONSOLE REPLY

*	 o  .RCAIC  - ASSIGN INTERRUPT CHANNEL
*
*	 o  .RCRSV  - RESERVE REMOTE CONSOLE
*
*	 o  .RCREL  - RELEASE REMOTE CONSOLE
*
*	 o  .RCSND  - SEND CONSOLE COMMAND
*
*	 o  .RCPOL  - CONSOLE RESPONSE POLL
*
*	 o  .RCABT  - CONSOLE ABORT
*
*	 o  .RCSTS  - OBTAIN STATUS
*
*	 o  .RCADR  - OBTAIN LOCAL CHANNEL ADDRESSES
*
*  The above LLMOP% functions are used to perform the actual  operations.
*  There  are  eight functions provided:  requesting a read-identity of a
*  remote system, requesting a read-counters, requesting transmission  of
*  the	system	identity with identify-self, forcing the boot of a remote
*  system, checking the status	of  a  request,  enabling  a  process  to
*  receive   unsolicited   remote   console  datagrams,  and  reading  an
*  unsolicited remote console datagram.
*
*  The appropriate function codes contained in AC1 are:

*  Request System Identity - .RCRID
*
*  This function causes a Read Identity protocol message to be
*  transmitted to the destination address node on the Ethernet.  The
*  .RCRPY function must be used to read the System Id reply message.
*  This function does not block the issuing process.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3.  It
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*  3		    .LMREQ     Request Number
*
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the requesting
*				   process to receive a software
*				   interrupt on the channel specified in
*				   LM%ICH;  if off, the LM%ICH field is
*				   ignored and no interrupts are given.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   The number of the PSI channel that the
*				   issuing process wants to interrupt
*				   when the System Id message arrives
*				   from the remote system.
*
*		   B18-B35(LM%REQ) Request Number
*
*				   This field is set by the JSYS upon
*				   return.  The returned request number
*				   must be used in any later .RCRPY,
*				   .RCABT, or .RCSTS calls.
*
*
*
*  Request Counters - .RCRCT
*
*  This function causes a Read Counters protocol message to be
*  transmitted to the destination address node on the Ethernet.  The
*  .RCRPY function must be used to read the System Id reply message.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id

*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*  3		    .LMREQ     Request Number
*
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the requesting
*				   process to receive a software
*				   interrupt on the channel specified in
*				   LM%ICH;  if off, the LM%ICH field is
*				   ignored and no interrupts are given.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   Number of the PSI channel to interrupt
*				   when the Counters message arrives from
*				   the remote system.
*

*		   B18-B35(LM%REQ) Request Number
*
*				   This field is set by the JSYS upon
*				   return.  The returned request number
*				   must be used in any later .RCRPY,
*				   .RCABT, or .RCSTS calls.
*
*
*  Identify Self - .RCIDS
*
*  This function causes a System ID protocol message to be transmitted to
*  the destination address node on the Ethernet.  This function blocks
*  the issuing process until the transmit completes.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*
*  Remote Boot - .RCRBT
*
*  This function causes a Boot protocol message to be transmitted to the
*  destination address node on the Ethernet.  This function blocks the
*  issuing process until the transmit completes.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*  3&4		    .LMPWD     Password Verification Code
*
*		   An 8 byte verification code transmitted to the remote
*		   system for its use in deciding whether to allow the
*		   boot request.
*
*  5		    .LMCIF     Control Information
*
*		   B26(LM%BDV) Boot Device

*				   0 = System Default
*				   1 = Specified Device
*
*		   B27(LM%BSV) Boot Server
*
*				   0 = System Default
*				   1 = Requesting System
*
*		   B28-B35(LM%PRO) Processor to boot
*
*				   0 = System Processor
*				   1 = Communication Processor
*
*  6		    .LMDID     Device Id
*
*		   Pointer to a counted/coded 8 bit byte string.
*

*  7		    .LMSID     Software Id
*
*		   Pointer to a counted/coded 8 bit byte string.
*
*
*
*  Read Remote Console Reply - .RCRPY
*
*  This function reads the response to a Request-ID or Read Counters
*  function.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B0(LM%MRF)  More Replies Flag
*
*				   If 1, there are still more replies
*				   available for this request.	(For use
*				   in conjunction with a request sent to
*				   a multicast address to which more than
*				   one node might respond.)
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMSRC     Source Address
*
*		   Two-word argument containing the source node physical
*		   address of the node that sent this reply, in the
*		   Ethernet KLNI port format.
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request Id
*
*				   The Request ID assigned by the .RCRID
*				   (Request System ID) or .RCRCT (Request
*				   Counters) function.
*
*  4		    .LMRBL     Console Response Buffer Length
*
*		   B0-B17(LM%RML) Returned Message Length
*
*				   Upon return, this argument contains
*				   the length of the received Remote
*				   Console data message.
*

*		   B18-B35(LM%MBL) Maximum Buffer Length
*
*				   Length of the Remote Console Data
*				   Buffer in bytes (provided by the
*				   user).  Limits the maximum length
*				   Remote Console data message that can
*				   be returned.
*
*  5		    .LMRBP     Console Request Buffer Pointer
*
*		   Byte pointer to the Remote Console Data buffer
*		   (provided by the user).
*
*
*  Assign Interrupt Channel - .RCAIC
*
*  This function assigns a software interrupt channel for the process to
*  be interrupted on when an unsolicited Ethernet Remote Console message
*  is received.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1		    .LMICF     Interrupt Channel Flags
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the channel in
*				   LM%ICH to be assigned;  if off, the
*				   channel is deassigned.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   The number of the PSI channel to
*				   interrupt when any Remote Console
*				   reply message is received that does
*				   not have a corresponding outstanding
*				   request message;  that is, an
*				   unsolicited reply message.  This
*				   function returns an error for all but
*				   the first process to request it.
*
*

*  Reserve Remote Console - .RCRSV
*
*  Causes transmission of a reserve remote console MOP message.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*  3-4		    .LMPWD     Password Verification Code
*
*		   A string of 8 8-bit bytes to verify access by the
*		   system whose console is to be reserved.
*
*
*  Release Remote Console - .RCREL
*
*  Causes transmission of a release remote console MOP message.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*

*  Send Console Command - .RCSND
*
*  This function sends ASCII console command data to the remote console
*  and polls for response data.  With no command data this function may
*  be used to poll for more response data without sending a command.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id and Console Command Flags
*
*		   B16(LM%CBF) Command Break Flag
*
*				   Precede data in the command data
*				   buffer with a break condition in the
*				   serial byte stream.
*
*		   B17(LM%MNO) Message Number
*
*				   A one bit sequence number that
*				   indicates the current Console
*				   Requestor command message.
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the destination node
*		   physical address in the Ethernet KLNI port format.
*
*  3		    .LMREQ     Request Number
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the requesting
*				   process to receive a software
*				   interrupt on the channel specified in
*				   LM%ICH;  if off, the LM%ICH field is
*				   ignored and no interrupts are given.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   The number of the PSI channel to
*				   interrupt when the Console Response
*				   and Acknowledge message arrives from
*				   the remote system.
*
*		   B18-B35(LM%REQ) Request Number
*
*				   This field is set by the JSYS upon
*				   return.  The returned request number
*				   must be used in any later .RCPOL,
*				   .RCABT, or .RCSTS calls.
*
*  4		    .LMRBL     Console Request Buffer Length
*
*
*		   B18-B35(LM%MBL) Maximum Buffer Length

*				   Length, in bytes, of the Remote
*				   Console Data to be sent (provided by
*				   the user).
*
*  5		    .LMRBP     Console Request Buffer Pointer
*
*		   Byte pointer to the Remote Console Data buffer
*		   provided by the user.
*
*
*  Console Response Poll - .RCPOL
*
*  This function polls for completion of the Send Console Command
*  function.  AC2 contains the address of an argument block.  The format
*  of the argument block is as follows:
*
*  0		    .LMCID     Channel-id and Returned Flags
*
*		   B7(LM%RDL)  Receive Data Lost Flag
*
*				   Set by local requester.  True if the
*				   response data buffer was too small to
*				   recieve all of the data that was sent
*				   from the remote node.
*
*		   B15(LM%RDO) Response Data Lost Flag
*
*				   True if the remote console server
*				   detected lost console data due to a
*				   buffer overrun or other error
*				   condition.  The data in the response
*				   data buffer is possibly incomplete.
*
*		   B16(LM%CDL) Command Data Lost Flag
*
*				   Set by the remote server.  True if the
*				   command data in the Console Command
*				   message was lost.
*
*		   B17(LM%MNO) Message Number
*
*				   A one bit sequence number that
*				   indicates the current Console
*				   Requestor command message being
*				   acknowledged.
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*

*  1&2		    .LMSRC     Source Address
*
*		   Two-word argument containing the source node physical
*		   address of the node that sent this reply, in the
*		   Ethernet KLNI port format.
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request Id
*
*				   The Request ID assigned by the .RCSND
*				   Send Console Command function.
*
*  4		    .LMRBL     Console Response Buffer Length
*
*
*		   B0-B17(LM%RML) Returned Message Length
*
*				   Upon return, this argument contains
*				   the length of the received Remote
*				   Console data message.
*
*		   B18-B35(LM%MBL) Maximum Buffer Length
*
*				   Length, in bytes, of the Remote
*				   Console Data Buffer (provided by the
*				   user).  Limits the maximum length
*				   Remote Console data message that can
*				   be returned.
*
*  5		    .LMRBP     Console Request Buffer Pointer
*
*		   Byte pointer to the Remote Console Data buffer
*		   provided by the user.
*
*  Abort Remote Console Request - .RCABT
*
*  This function aborts an outstanding Remote Console Request.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Not Used
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request ID
*
*				   The Request ID assigned by the .RCRID
*				   (Request System Id), .RCRCT (Request
*				   Counters), or .RCSND (Send Console
*				   Command) function.
*
*  Obtain Remote Console Request Status - .RCSTS

*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-ID
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1		    .LMSTF     Status and Flags
*
*		   Upon return, contains a status code for the request.
*
*		   B18-B35(LM%RTC) Status Return Code
*
*		   Status Return Codes are as follows:
*
*		   0	       .LMPND request pending, not complete
*		   1	       .LMSUC success, complete
*		   2	       .LMABT aborted
*		   3	       .LMTXF transmit failed
*		   4	       .LMCCE channel communication error
*
*  2		    .LMCST     Channel Status
*
*		   The status returned from the KLNI port driver.
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request ID
*
*				   The Request Id assigned by the .RCRID
*				   (Request System ID), .RCRCT (Request
*				   Counters), or .RCSND (Send Console
*				   Command) function.
*
*  Obtain Channel Addresses - .RCADR
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-ID
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMHWA     Hardware Address
*  3&4		    .LMPYA     Physical Address

*  Interface to NI Loopback Requestor/Server
*
*  The interface provides three basic functions:  checking the status  of
*  pending   requests,	 initiating   requests,   and  enabling  to  read
*  unsolicited datagrams.
*
*  The LLMOP% JSYS is  used  to  perform  the  actual  Ethernet  Loopback
*  operations.	  There   are	six  functions	provided:   requesting	a
*  loop-direct, requesting a loop-assisted, enabling a process to receive
*  unsolicited	loopback  datagrams, enabling a process to get a software
*  interrupt when a request completes, checking the status of a  request,
*  and reading an unsolicited loopback datagram.
*
*  All loopback operations are performed with  padding	enabled  for  the
*  Loopback protocol portal.
*
*  The appropriate function codes contained in AC1 are:
*
*  NI Ethernet Loop Direct - .ELDIR
*
*  This function builds an Ethernet Loopback message from data supplied
*  in the argument block, and transmits it to the destination address
*  supplied.  The caller must call the .ELRPY function to obtain the
*  looped reply message.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the remote destination
*		   node physical address in the Ethernet KLNI port
*		   format.
*
*  3		    .LMREQ     Request Number
*
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the requesting
*				   process to receive a software
*				   interrupt on the channel specified in
*				   LM%ICH;  if off, the LM%ICH field is
*				   ignored and no interrupts are given.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   Contains the number of the PSI channel
*				   to interrupt when the loopback reply
*				   message arrives from the remote
*				   system.
*
*		   B18-B35(LM%REQ) Request Number
*
*				   This field is set by the JSYS upon

*				   return.  The returned request number
*				   must be used in any later .ELRPY
*				   calls.
*
*  4		    .LMRBL     Loopback Request Data Buffer Length
*
*		   B18-B35(LM%MBL) Maximum Buffer Length
*
*				   Length, in bytes, of the data portion
*				   of the loopback message (provided by
*				   the user).  Maximum value is 1484.
*				   Data lengths less than 44 bytes are
*				   padded by the NI Port.
*
*  5		    .LMRBP     Loopback Request Data Buffer Pointer
*
*		   8 bit byte pointer to the data for use in the loopback
*		   operation.
*
*  NI Ethernet Loop Assisted - .ELAST
*
*  This function builds an Ethernet Loopback message from data supplied
*  in the argument block, and transmits it according to the type of
*  assistance requested.  The caller must call the .ELRPY function to
*  obtain the looped reply message.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-ID
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Destination Address
*
*		   Two-word argument containing the remote destination
*		   node physical address in the Ethernet KLNI port
*		   format.
*
*  3		    .LMREQ     Request Number
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the requesting
*				   process to receive a software
*				   interrupt on the channel specified in
*				   LM%ICH;  if off, the LM%ICH field is
*				   ignored and no interrupts are given.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   Contains the number of the PSI channel
*				   to interrupt when the loopback reply
*				   message arrives from the remote
*				   system.
*
*		   B18-B35(LM%REQ) Request Number
*
*				   This field is set by the JSYS upon

*				   return.  The returned request number
*				   must be used in any later .ELRPY
*				   calls.
*
*  4		    .LMRBL     Loopback Request Data Buffer Length
*
*		   B18-B35(LM%MBL) Maximum Buffer Length
*
*				   Length, in bytes, of the data portion
*				   of the loopback message (provided by
*				   the user).  Maximum value is 1476 for
*				   transmit and receive assistance
*				   requests, or 1468 for full assistance.
*				   Data lengths less than 44 bytes are
*				   padded by the NI Port.
*
*  5		    .LMRBP     Loopback Request Data Buffer Pointer
*
*		   8 bit byte pointer to the data for use in the loopback
*		   operation.
*
*  6&7		    .LMAST     Assistant Address
*
*		   Address of the node for use as the assistant in this
*		   loopback request.  It may not be a multicast address.
*
*  10		    .LMHLP     Assistance Level
*
*		   1	       .LMXMT Transmit
*
*				   A loop message is built for forwarding
*				   to the destination node and the local
*				   node.  The message is transmitted to
*				   the assistance address.
*
*		   2	       .LMRCV Receive
*
*				   A loop message is built for forwarding
*				   to the assistant and the local node.
*				   The message is transmitted to the
*				   destination address.
*
*		   3	       .LMFUL Full
*
*				   A loop message is built for forwarding
*				   to the destination, assistant and
*				   local node.	The message is
*				   transmitted to the assistant address.
*
*
*  Read Loopback Reply - .ELRPY
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.

*  1&2		    .LMSRC     Source Remote Assistant Address
*
*		   Upon completion of a loop assisted operation, contains
*		   the address of the remote system that satisfied the
*		   request.
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request ID
*
*				   Request number of the reply to be
*				   read.  If the reply has not yet
*				   arrived at the local node, the caller
*				   will be blocked until the reply
*				   message arrives.
*
*  4		    .LMRBL     Loop Response Buffer Length
*
*		   B0-B17(LM%RML) Returned Message Length
*
*				   Upon return, this argument contains
*				   the length of the received loop reply
*				   message data.
*
*		   B18-B35(LM%MBL) Maximum Buffer Length
*
*				   Maximum length, in bytes, of the Loop
*				   Response Data Buffer (provided by the
*				   user).
*
*  5		    .LMRBP     Loop Reply Buffer Pointer
*
*
*  Assign Interrupt Channel - .ELAIC
*
*  This function assigns a software interrupt channel for the process to
*  be interrupted on when an Ethernet Loopback reply is received.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-ID
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1		    .LMICF     Interrupt Channel Flags
*
*		   B0(LM%AIC)  Assign Interrupt Channel
*
*				   If on, this flag causes the channel in
*				   LM%ICH to be assigned;  if off, the
*				   channel is deassigned.
*
*		   B12-B17(LM%ICH) Interrupt Channel Number
*
*				   Contains the number of the PSI channel
*				   to interrupt when any Loopback reply
*				   message is received that does not have
*				   a corresponding outstanding request

*				   message;  that is, an unsolicited
*				   reply message.  This function returns
*				   an error for all but the first process
*				   to request it.
*
*
*  Abort Ethernet Loop Request - .ELABT
*
*  This function aborts an outstanding Ethernet Loop Request.
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-id
*
*		   B34-B35(LM%CID) Channel-id
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1&2		    .LMDST     Not Used
*
*  3		    .LMREQ     Request Number
*
*		   B18-B35(LM%REQ) Request ID
*
*				   The request number for the request to
*				   be aborted.
*
*
*  Obtain Ethernet Loopback Request Status - .ELSTS
*
*  AC2 contains the address of an argument block.  The format of the
*  argument block is as follows:
*
*  0		    .LMCID     Channel-ID
*
*		   B34-B35(LM%CID) Channel-ID
*
*				   A value in the range 0 to 3 that
*				   specifies the KLNI Ethernet Port to be
*				   used.
*
*  1		    .LMSTF     Status and Flags
*
*		   Upon return, contains a status code for the request.
*
*		   B18-B35(LM%RTC) Status Return Code
*
*		   Status Return Codes are as follows:
*
*		   0	       .LMPND request pending, not complete
*		   1	       .LMSUC success, complete
*		   2	       .LMABT aborted
*		   3	       .LMTXF transmit failed
*		   4	       .LMCCE channel communication error
*
*  2		    .LMCST     Channel Status
*
*		   The status returned from the KLNI port driver.
*
*  3		    .LMREQ     Request Number

*		   B18-B35(LM%REQ) Request ID
*
*				   Request ID assigned by the .ELDIR (NI
*				   Ethernet Loop Direct) or .ELAST (NI
*				   Ethernet Loop Assisted) function.
*
*  LLMOP% ERROR MNEMONICS:
*
*  WHELX1:   WHEEL or OPERATOR capability required
*  ARGX02:   Invalid function
*  LLMX01:   Transmit Datagram Failed
*  LLMX02:   LLMOP State is OFF
*  LLMX03:   Invalid byte pointer
*  LLMX04:   Nonexistent Request Number
*  LLMX05:   Invalid KLNI channel specified
*  LLMX06:   Configurator interrupts assigned to another process
*  LLMX99:   LLMOP Internal Error
*  ARGX13:   Invalid software interrupt channel number



			     LNMST     JSYS 504

   Translates a logical name to its original definition  string.   (Refer
   to Section 2.2.2 and the CRLNM and INLNM monitor calls descriptions.)

   ACCEPTS IN AC1:  function code

	      AC2:  pointer to the logical name.  The logical  name  must
		    not contain a terminating colon.

	      AC3:  pointer to the string where the original logical name
		    definition	is  to	be  written.   The  name returned
		    includes a terminating colon.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC3

   The codes for the functions are as follows:

   0	.LNSJB	  Obtain the job-wide definition of the logical name.
   1	.LNSSY	  Obtain the system definition of the logical name.

   LNMST ERROR MNEMONICS:

   GJFX22:   Insufficient system resources (Job Storage Block full)
   LNSTX1:   No such logical name
   LNSTX2:   Invalid function



			      LOGIN	JSYS 1

   Logs a job into the system.	 Useful  for  logging  in  from  an  idle
   terminal on which a CTRL/C has been typed.

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

   ACCEPTS IN AC1:  36-bit user number under which user will log in

	      AC2:  pointer to beginning of password string

	      AC3:  account number in  bits  3-35  if  bits  0-2  are  5.
		    Otherwise  contains  a  pointer to an account string.
		    If a null byte is not seen, the string is  terminated
		    after 39 characters are

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, date and time of  last  login  (in  internal
		    system  format;   refer to Section 2.9.2) in AC1, and
		    updated string pointers, if  pertinent,  in  AC2  and
		    AC3.

   The LOGIN monitor call does not require a password if the  controlling
   terminal  is  a pseudo-terminal and the controlling job either has the
   WHEEL or OPERATOR capability enabled or is logged in as the same  user
   being logged in for this job.

   If the call is successful, an accounting  entry  is	appended  to  the
   accounting  data file.  If the account validation facility is enabled,
   the LOGIN call verifies  either  the  account  given  or  the  default
   account of the user being logged in.

   LOGIN ERROR MNEMONICS:

   LGINX1:   Invalid account identifier
   LGINX2:   Directory is "files-only" and cannot be logged in to
   LGINX3:   Internal format of directory is incorrect
   LGINX4:   Invalid password
   LGINX5:   Job is already logged in
   LGINX6:   No more job slots available for logging in



			     LPINI    JSYS 547

   Loads the direct access Vertical Formatting Unit (VFU) or  translation
   Random  Access  Memory  (RAM)  for  the  line  printer.   This call is
   executed at system startup by the program that configures the system.

   RESTRICTIONS:    requires WHEEL or OPERATOR capabilities enabled

   ACCEPTS IN AC1:  JFN of file containing VFU or RAM

	      AC2:  status bits in the left half, and  function  code  in

		    the right half

	      AC3:  unit number of line printer

   RETURNS     +1:  always

   The following status bit is currently defined.

       B0(MO%LCP)   Line printer is a lowercase printer.

   The available functions are as follows:

   Code      Symbol    Meaning

    32	     .MOLVF    Load the VFU from the file indicated by the  given
		       JFN.

    34	     .MOLTR    Load the translation RAM from the  file	indicated
		       by the given JFN.

   The line printer must not be opened by any process when this  call  is
   executed.   If  a  condition  occurs that prevents the VFU or RAM from
   being loaded (e.g., the line printer is off line),  the  name  of  the
   file will be stored.  The VFU or RAM will then be loaded automatically
   the next time a process performs output to the line printer.

   Generates an illegal instruction interrupt on error conditions below.

   LPINI ERROR MNEMONICS:

   LPINX1:   Invalid unit number
   LPINX2:   WHEEL or OPERATOR capability required
   LPINX3:   Illegal to load RAM or VFU while device is OPEN



			     MDDT%    JSYS 777

   Transfers control to the MDDT program while preserving the context  of
   the	process  that  issued  the  MDDT% JSYS.  The terminal keyboard is
   activated and the user may enter commands to the MDDT program, or  may
   return to TOPS-20 command level by typing CTRL/C, or may return to the
   issuing process by typing CTRL/Z.

   RESTRICTIONS:  requires WHEEL or OPERATOR capabilities enabled

   The MDDT% JSYS accepts no arguments.

   MDDT% ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required



			    METER%     JSYS 766

   Returns the value of the execution  accounting  meter  or  the  memory
   reference  accounting meter.  These values do not represent time as in
   "clock time";  rather, they represent the amount of time that the EBOX
   was busy and how many times the MBOX was referenced by the EBOX.

   RESTRICTIONS:    available only on KL10 hardware

   ACCEPTS IN AC1:  function code

   RETURNS     +1:  always, with 59-bit value in AC2 and AC3

   Function Codes:

   Code      Symbol	Meaning

    1	     .MEREA	Read   process	 execution    accounting    meter
			doubleword.   Value  returned  is  EBOX busy time
			(number of EBOX ticks).

    2	     .MERMA	Read process  memory-reference	accounting  meter
			doubleword.   Value  returned  is  count  of MBOX
			references (number of MBOX ticks).

   The accounting meters have bits that allow executive PI  overhead  and
   executive  non-PI  overhead	to  be	included in the doubleword count.
   These are turned off by default (the monitor must be  rebuilt  to  set
   them),  so  (by  default)  the EBOX count does not include the monitor
   overhead of paging, scheduling, or swapping.  The EBOX count primarily
   includes  only  the	EBOX  time  spent  executing the instructions and
   JSYS's in the user's program.

   Interrupts caused by IO,  paging,  swapping,  and  so  on,  can  cause
   instruction	restarts or require pager refills, and these are included
   in the count.  Because these interrupts depend on a variety of  system
   variables,  such as load average, subsequent timings of the same event
   will  return  varying  count  values.   These  fluctuations	 can   be
   "smoothed"  by  timing  the event repeatedly and taking the average of
   the values returned.

   The MBOX reference count has  the  same  specifications  as	the  EBOX
   count,  and is subject to the same kind of fluctuations.  Cache hit/no
   hit introduces an additional source of  fluctuations.   Again,  timing
   the	event  repeatedly  and	taking the average of the values returned
   will "smooth" the counts.

   An event can be timed by an initial	execution  of  METER%,	a  DMOVEM
   instruction	to  save  the start value, and (after the event) a second
   execution of METER% followed by a DSUB instruction to find the elapsed
   number  of  ticks.	For  added accuracy, the average overhead for the
   timing sequence can be determined  and  subtracted  from  the  average
   count value for the timed interval.

   The following diagram illustrates the format of the value returned:

 
   !		  AC2		  !		AC3		 !
   !=============================================================!
   !	    High Order Part	  !0!  Low Order Part ! Reserved !
   !=============================================================!
   !0				35!0!1		    23!24      35!

   Note that the following instruction changes the format of  the  values
   returned by the METER% call to form a right-justified doubleword value
   in AC2 and AC3.

	ASHC AC2,-^D12

 
   METER% ERROR MNEMONICS:

   ARGX02:   Invalid function code
   METRX1:   METER% not implemented for this processor



			     MRECV     JSYS 511

   Retrieves an IPCF (Inter-Process Communication Facility) message  from
   the	process'  input queue.	Refer to the TOPS-20 Monitor Calls User's
   Guide  for  an  overview  and   description	 of   the   Inter-Process
   Communication Facility.

|  RESTRICTIONS:    Some  functions  require  WHEEL,  OPERATOR	or   IPCF
|		    capability enabled

   ACCEPTS IN AC1:  length of packet descriptor block

	      AC2:  address of packet descriptor block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success.  The packet is retrieved and placed into the
		    block   indicated	by  word  .IPCFP  of  the  packet
		    descriptor block.  AC1 contains  the  length  of  the
		    next  entry  in  the  queue  in the left half and the
		    flags from the next packet in the right  half.   This
		    returned  word  is	called the associated variable of
		    the next entry in the queue.  If the queue is  empty,
		    AC1 contains 0.

   The format of the packet descriptor block is as follows:

	Word	  Symbol    Meaning

	   0	  .IPCFL    Flags.    (Refer   to    the    MSEND    call
			    description.)  If  bit  IP%CFB is set in this
			    word, MRECV does not block until a packet  is
			    read.

	   1	  .IPCFS    PID of sender.  The caller	does  not  supply
			    this  PID;	 the  system fills it in when the
			    packet is retrieved.

	   2	  .IPCFR    PID of receiver.  This  PID  can  be  one  of
			    three values:  a specific PID, -1 to retrieve
			    messages  for  any	PID  belonging	to   this
			    process,  or  -2 to retrieve messages for any
			    PID belonging to this job.	When -1 or -2  is
			    supplied,  messages  are not retrieved in any

			    particular order except that messages from	a
			    specific  PID  are	returned  in the order in
			    which they were received.

|	   3	  .IPCFP    Pointer to	block  where  message  is  to  be
|			    placed  (length  of  message in the left half
|			    and starting address of message in the  right
|			    half).

	   4	  .IPCFD    User number of sender.

	   5	  .IPCFC    Enabled capabilities of sender.

	   6	  .IPCSD    Directory  number	of   sender's	connected
			    directory.

	   7	  .IPCAS    Account  string  of   sender.    The   caller
			    supplies  a  pointer  to  the block where the
			    account is to be placed.

	  10	  .IPCLL    Byte  pointer  to  area  to   store   logical
			    location (node name) of sender.

   The caller (receiver) does not  supply  the	information  in  words	4
   through  7;	 the  system  fills  in  the  words  when  the	packet is
   retrieved.  These words describe the sender at the  time  the  message
   was	sent  and  permit  the	receiver to validate messages.	If a byte
   pointer is supplied in word .IPCLL, the monitor will use it to  return
   the ASCIZ string for the logical location of the sender.

   Refer to the MSEND call description for the flags that can be  set  in
   word .IPCFL of the packet descriptor block.

   MRECV ERROR MNEMONICS:

   IPCFX1:   Length of packet descriptor block cannot be less than 4
   IPCFX2:   No message for this PID
   IPCFX3:   Data too long for user's buffer
   IPCFX4:   Receiver's PID invalid
   IPCFX5:   Receiver's PID disabled
   IPCF11:   WHEEL or IPCF capability required
   IPCF14:   No PID's available to this job
   IPCF15:   No PID's available to this process
   IPCF16:   Receive and message data modes do not match
   IPCF24:   Invalid message size
   IPCF25:   PID does not belong to this job
   IPCF26:   PID does not belong to this process
   IPCF27:   PID is not defined
   IPCF28:   PID not accessible by this process
   IPCF29:   PID already being used by another process
   IPCF31:   Invalid page number
   IPCF32:   Page is not private
   IPCF34:   Cannot receive into an existing page
|  IPCF36:   PID not assigned on this LCS processor


			     MSEND     JSYS 510

   Sends an IPCF (Inter-Process  Communication	Facility)  message.   The
   message  is	in  the  form  of  a packet and can be sent to either the
   specified PID or  the  system  process  <SYSTEM>INFO.   Refer  to  the
   TOPS-20  Monitor Calls User's Guide for an overview and description of
   the Inter-Process Communication Facility.

   RESTRICTIONS:    Some  functions  require  WHEEL,  OPERATOR,  or  IPCF
		    capability enabled.

   ACCEPTS IN AC1:  length of packet descriptor block

   AC2: 	    address of packet descriptor block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success.  The packet is sent to the receiver's  input
		    queue.  Word .IPCFS of the packet descriptor block is
		    updated with the sender's PID.  This updating is done
		    in	case  the  PID	was being defaulted or created by
		    this call.

   The format of the packet descriptor block is as follows:

	Word	  Symbol		   Meaning

	  0	  .IPCFL    Flags.  (See below.)

	  1	  .IPCFS    PID of sender;  or address of PID  if  IP%CFS
			    or	IP%CFR is set in WORD .IPCFL;  or 0 if no
			    PID exists for sender.   This  word  will  be
			    filled  in	by  the  monitor if the caller is
			    creating a PID (flag bit IP%CPD is on).

	  2	  .IPCFR    PID  of  receiver,	or  0  if   receiver   is
			    <SYSTEM>INFO.

	  3	  .IPCFP    Pointer to message block (length  of  message
			    in	the  left  half  and  starting address of
			    message in the right half).  When a packet is
			    sent   to  <SYSTEM>INFO,  the  message  block
			    contains  the  request  being   made.    (See
			    below.)

   The	following  flags  are  defined	in  word  .IPCFL  of  the  packet
   descriptor  block.  These flags can be set on both the MSEND and MRECV
   calls.

   Flags Set By Caller

      B0(IP%CFB)  Do not block process if there are no	messages  in  the
		  queue.   If this bit is set, an error is given if there
		  are no messages.

      B1(IP%CFS)  Use, as the sender's PID, the  PID  obtained	from  the
		  address  specified  in word .IPCFS.  Setting bit IP%CFS
		  notifies the	monitor  that  word  .IPCFS  contains  an
		  address,  and  the  sender's	PID  is  located  at that
		  address.
      B2(IP%CFR)  Use, as the receiver's PID, the PID obtained	from  the
		  address  specified  in word .IPCFR.  Setting bit IP%CFR

		  notifies the	monitor  that  word  .IPCFR  contains  an
		  address,  and  the  receiver's  PID  is located at that
		  address.

      B3(IP%CFO)  Allow one send request above the quota.   (The  default
		  send quota is 2.)

      B4(IP%TTL)  Truncate the message, if it is larger  than  the  space
		  reserved.  If this bit is not set, an error is given if
		  the message is too large.

      B5(IP%CPD)  Create a PID to use as the sender's PID and  return  it
		  in word .IPCFS of the packet descriptor block.  If flag
		  IP%CFS is set, this function returns the created PID in
		  the word to which the contents of .IPCFS points.

      B6(IP%JWP)  Make the created PID be job wide (i.e., permanent until
		  the  job logs out).  If this bit is not set, the PID is
		  temporary until the process executes the RESET  monitor
		  call.  If B5(IP%CPD) is not set, B6 is ignored.

      B7(IP%NOA)  Do not allow other processes to use  the  created  PID.
		  If B5(IP%CPD) is not set, B7 is ignored.

|     B8(IP%MON)  Reserved for DIGITAL's use.

      B18(IP%CFP) The packet is privileged.  (This bit can be set only by
		  a   process  with  IPCF  capability  enabled.)  When	a
		  privileged sender sets this bit, the	MRECV  and  MUTIL
		  calls  return  it set for any reply.	An error is given
		  if this bit is set by the sender and	the  receiver  is
		  not privileged.

      B19(IP%CFV) The packet is a page	of  data.   Word  .IPCFP  of  the
		  packet  descriptor block contains 1000 in the left half
		  and the page number in the right half.   The	page  the
		  packet is being sent to must be private.

      B21(IP%INT) Reserved for DIGITAL's use.

      B22(IP%EPN) Page number in word .IPCFP  of  the  packet  descriptor
		  block is 18 bits long.

 
					   NOTE

		      When a process sends a page of data with MSEND,
		      that page is removed from the process' map.

 

   Flags Returned After Call

   B20(IP%CFZ) A zero-length message was sent, and the packet consists of
		  only the packet descriptor block.

   B24-29(IP%CFE) Error code field for errors encountered by <SYSTEM>INFO
		  during a send or receive request.

		  Code Symbol		   Meaning

		  15   .IPCPI	 insufficient privileges
		  16   .IPCUF	 invalid function

		  67   .IPCSN	 <SYSTEM>INFO needs name
		  72   .IPCFF	 <SYSTEM>INFO free space exhausted
		  74   .IPCBP	 PID has no name or is invalid
		  75   .IPCDN	 duplicate name has been specified
		  76   .IPCNN	 unknown name has been specified
		  77   .IPCEN	 invalid name has been specified

   B30-32(IP%CFC) System and sender code.  This code can be set only by a
		  process  with  IPCF  capability  enabled.   The  system
		  returns the code  so	that  a  nonprivileged	user  can
		  examine it.

		  Code Symbol		   Meaning

		  1    .IPCCC	 sent by <SYSTEM>IPCF
		  2    .IPCCF	 sent by system-wide <SYSTEM>INFO
		  3    .IPCCP	 sent by receiver's <SYSTEM>INFO
|		  4    .IPCCG	 sent by system for QUEUE% JSYS

   B33-35(IP%CFM) Field for return of special messages.  This  field  can
		  be set only by a process with WHEEL capability enabled.
		  The  system  returns	the   information   so	 that	a
		  nonprivileged user can examine it.

		  Code Symbol		   Meaning

		  1    .IPCFN	 Process' input queue contains	a  packet
				 that  could not be delivered to intended
				 PID.

   When the MSEND call is used to send	a  packet  to  <SYSTEM>INFO,  the
   message  portion  of the packet (i.e., the first three words) contains
   the request.  This request has the following format:

	Word	  Symbol		   Meaning

	  0	  .IPCI0    user-defined code in the left  half  and  the
			    function   (see  below)  <SYSTEM>INFO  is  to
			    perform in the right half.	The  user-defined
			    code  is  used to associate the response from
			    <SYSTEM>INFO with the appropriate request.

	  1	  .IPCI1    PID that is to receive  a  duplicate  of  the
			    response  from <SYSTEM>INFO.  If this word is
			    0,	the  response  is  sent   only	 to   the
			    originator of the request.

	  2	  .IPCI2    argument for the  requested  function.   (See
			    below.)

   The functions that can be requested of <SYSTEM>INFO, along with  their
   arguments, are as follows:

      Function	  Argument	 Meaning

      .IPCIW	  name		 Return  the  PID  associated  with   the
				 specified  name.  The PID is returned in
				 word .IPCI1.

      .IPCIG	  PID		 Return  the  name  associated	with  the
				 specified  PID.  The name is returned in
				 word .IPCI1.

      .IPCII	  name in	 Assign  the  specified  name  to the PID
		   ASCIZ	 belonging  to	the  process  making  the
				 request.   The  temporary  or	permanent
				 status of the PID is specified  by  flag
				 bit   IP%JWP(B6)   when   the	 PID  was
				 originally created.

      .IPCIJ	  name in	 Identical to the .IPCII function.
		   ASCIZ

      .IPCIK	  PID		 Inform a PID when  certain  other  PID's
				 are  deleted.	 The  PID to be "watched"
				 for deletion is placed in  word  .IPCI2.
				 When  that  PID  is deleted, SYSTEM INFO
				 sends a message to  the  requesting  PID
				 with .IPCKM in the IP%CFE field, and the
				 deleted PID in word .IPCI1 the  message.
				 This function requires WHEEL or OPERATOR
				 privileges.

|     .IPCIS	  PID		 Disassociates	all  PIDs   with   names.
|				 However,  the	PID  remains.	To delete
|				 PID, use the .MUCHO and .MUDES functions
|				 of   the   MUTIL   monitor  call.   This
|				 function  (.IPCIS)  requires  WHEEL   or
|				 OPERATOR capability enabled.

   MSEND ERROR MNEMONICS:

   IPCFX1:   Length of packet descriptor block cannot be less than 4
   IPCFX4:   Receiver's PID invalid
   IPCFX5:   Receiver's PID disabled
   IPCFX6:   Send quota exceeded
   IPCFX7:   Receiver quota exceeded
   IPCFX8:   IPCF free space exhausted
   IPCFX9:   Sender's PID invalid
   IPCF11:   WHEEL or IPCF capability required
   IPCF12:   No free PID's available
   IPCF13:   PID quota exceeded
   IPCF14:   No PID's available to this job
   IPCF15:   No PID's available to this process
   IPCF19:   No PID for [SYSTEM]INFO
   IPCF24:   Invalid message size
   IPCF25:   PID does not belong to this job
   IPCF26:   PID does not belong to this process
   IPCF27:   PID is not defined
   IPCF28:   PID not accessible by this process
   IPCF29:   PID already being used by another process
   IPCF31:   Invalid page number
   IPCF32:   Page is not private
|  IPCF36:   PID not assigned on this LCS processor



			     MSFRK     JSYS 312

   Starts a process in monitor mode.  This call allows job  0  to  create
   multiple processes for handling various asynchronous monitor tasks.

 

   RESTRICTIONS:    requires WHEEL or  OPERATOR  capability  enabled,  or
		    execution from monitor mode

   ACCEPTS IN AC1:  process handle

	      AC2:  36-bit PC word, with user mode and other flags in the
		    left half and the virtual address in the right half

   RETURNS     +1:  always

   Because the starting context of the process is undefined, the  process
   being started should execute the following sequence of instructions at
   its starting address:

	FBGN:	MOVSI 1,UMODF	 ;fake user PC
		MOVEM 1,FPC	 ;simulate the JSYS call
		MCENTR		 ;establish usual top-level JSYS context

   Generates an illegal instruction interrupt on error conditions below.

   MSFRK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   CAPX1:    WHEEL or OPERATOR capability required



			     MSTR     JSYS 555

   Performs  various  structure-dependent  functions.	These	functions
   include   mounting	and   dismounting  structures,	incrementing  and
   decrementing mount counts for structures, and  setting  and	obtaining
   the status of structures.

 
   For regulated structures, the mount count must be  incremented  before
|  access  rights  or JFNs can be given.  All structures are regulated by
|  default  except  the  public  structure  or	any  structure	 declared
   non-regulated with the .MSSSS function of MSTR.

|  Some functions require a structure device designator as  an	argument.
|  Use the STDEV JSYS to obtain a device designator for a structure.

 
   RESTRICTIONS:    some   functions   require	 WHEEL,   OPERATOR,    or
		    MAINTENANCE capability enabled.

   ACCEPTS IN AC1:  length of the argument block in  the  left	half  and
		    function code in the right half

	      AC2:  address of the argument block

   RETURNS     +1:  always, with some functions  returning  data  in  the
		    argument   block.	 (Refer  to  individual  function
		    descriptions below.)

   The available functions are summarized below.

   Function	  Symbol    Privileged		     Meaning

      0 	  .MSRNU       Yes	   Return the status of the  next
					   disk unit.

      1 	  .MSRUS       Yes	   Return the status of the given
					   disk unit.

      2 	  .MSMNT       Yes	   Mount the given structure.

      3 	  .MSDIS       Yes	   Dismount the given structure.

      4 	  .MSGSS       No	   Return the status of the given
					   structure.

      5 	  .MSSSS       Yes	   Change the status of the given
					   structure.

      6 	  .MSINI       Yes	   Initialize	   the	    given
					   structure.

      7 	  .MSIMC       No	   Increment the mount count  for
					   the	given  structure  for the
					   job.

      10	  .MSDMC       No	   Decrement the mount count  for
					   the	given  structure  for the
					   job.

      11	  .MSGSU       No	   Return the job numbers of  the
					   users of the given structure.

      12	  .MSHOM       Yes	   Modify the home block  of  the
					   given structure.

      13	  .MSICF       No	   Increment the mount count  for
					   the	given  structure  for the
					   given fork.

      14	  .MSDCF       No	   Decrement the mount count  for
					   the	given  structure  for the
					   given fork.

      15	  .MSOFL       Yes	   Receive  interrupt  when  disk
					   comes on-line.

      16	  .MSIIC       Yes	   Ignore  increment  check   for
					   structure use

|     17	  .MSCSM       Yes	   Change     structure     mount
|					   attribute (CFS-20)

   Obtaining the Status of the Next Disk Unit - .MSRNU

   This function returns the status of the next disk unit on the  system.
   The	next disk unit is determined by searching the current channel and
   looking for the next physical unit on that channel.

|  RESTRICTIONS:  Requires  enabled  WHEEL,  OPERATOR,	 or   MAINTENANCE
|		  capability

   The .MSRNU function accepts the channel, controller, and unit  numbers
   in  the  first  three  words  of  the  argument  block.  The time this
   function is executed, the value for	each  of  these  numbers  is  -1.
   After successful completion of this function, the channel, controller,
   and unit numbers are updated, and the software information  about  the
   disk  drive	is  returned in the argument block.  To locate all drives
   available for mounting structures, the channel, controller,	and  unit
   numbers  returned  from  one  .MSRNU function call are supplied on the
   next one until all units on all channels have been searched.  When all
   units have been searched, the MSTR monitor call returns error MSTX18.

   The format of the argument  block,  whose  length  is  .MSRLN,  is  as
   follows:

   Word      Symbol			   Meaning

     0	     .MSRCH	    Channel number (0-7)

     1	     .MSRCT	    Controller number

     2	     .MSRUN	    Unit number (0-7)

     3	     .MSRST	    Returned  software	status	of   unit.    The
			    following status bits are defined:

			    B0(MS%MNT)	Unit  is  part	 of   a   mounted
					structure
			    B2(MS%DIA)	Unit is being used by an  on-line
					diagnostic program
			    B3(MS%OFL)	Unit is off line
			    B4(MS%ERR)	Unit  has  an  error   that   was
					detected during reading
			    B5(MS%BBB)	Unit has a  bad  BAT  block.   If
					this bit is on, the data returned
					word .MSRSN (word 4) and in words
					.MSRNS	through  .MSRFI  (words 6
					through 20) is indeterminate.
			    B6(MS%HBB)	Unit has a bad HOME block
			    B7(MS%WLK)	Unit is write locked
|			    B8(MS%2PT)	Unit is  potentially  dual-ported
|					between systems
			    B9-17	Type of disk unit
			    (MS%TYP)
					 1  .MSRP4   RP04
					 5  .MSRP5   RP05
					 6  .MSRP6   RP06
					 7  .MSRP7   RP07
					11  .MSRM3   RMO3
					24  .MSR20   RP20
|					27  .MSR80   RA80
|					30  .MSR81   RA81
|					31  .MSR60   RA60

     4	     .MSRSN	    Byte pointer to  ASCIZ  string  in	which  to
			    store  the	structure  name.  This pointer is
			    updated on return.

     5	     .MSRSA	    Byte pointer to  ASCIZ  string  in	which  to
			    store  the	structure  alias.   The  alias is
			    usually the same as the structure name.   The
			    alias  is  returned, and the pointer updated,
			    only if the structure is on line.

     6	     .MSRNS	    Logical unit number within the  structure  of
			    this  unit	in  the  left half, and number of
			    units in the structure in the right half.

     7	     .MSRSW	    Number  of	pages  for   swapping	on   this
			    structure.

    10-12    .MSRUI	    Unit ID (3 words of 11-formatted ASCII)

    13-15    .MSROI	    Owner ID (3 words of 11-formatted ASCII)

    16-20    .MSRFI	    File  system  ID  (3  words  of  11-formatted
			    ASCII)

    21	     .MSRSP	    Number of sectors per page

    22	     .MSRSC	    Number of sectors per cylinder

    23	     .MSRPC	    Number of pages per cylinder

    24	     .MSRCU	    Number of cylinders per unit

    25	     .MSRSU	    Number of sectors per unit

    26	     .MSRBT	    Number of bit words in bit table per cylinder

    27	     .MSRSE	    Serial  number  of	the  CPU  for  which  the
			    structure is used in booting the system

|   30	     .MSRLS	    Number of lost sectors per cylinder
|
|   31	     .MSRSS	    Number of sectors per surface
|
|   32	     .MSDSH	    High order serial number of disk drive
|
|   33	     .MSDSN	    Low order serial number of disk drive
|
|   34	     .MSTSP	    True number of sectors per page
|
|   35	     .MSMID	    Disk  pack	maintenance   identifier.    This
|			    number  is	the  same  for	all  packs  in	a
|			    structure.

|  The length of the argument block in words is given by symbol .MSRLN.

   The 11-formatted ASCII mentioned above  is  7-bit  ASCII  stored  four
   bytes to a 36-bit word in a format similar to that of a PDP-11:

 
	     0	 2	    9 10	17    20       28 29	     35
	     ==========================================================
	     !XX!   CHAR 1   !	 CHAR 0   !XX!	CHAR 3	 !  CHAR 2    !
	     ----------------------------------------------------------
	     !XX!   CHAR 5   !	 CHAR 4   !XX!	CHAR 7	 !  CHAR 6    !
	     ----------------------------------------------------------
	     !XX!   CHAR 9   !	 CHAR 8   !XX!	CHAR 11  !  CHAR 10   !
	     ==========================================================

 
   The following errors are possible on the failure of this function.

   MSTRX2:   WHEEL or OPERATOR capability required
   MSTRX3:   argument block too small

   MSTX14:   invalid channel number
   MSTX15:   invalid unit number
   MSTX16:   invalid controller number
   MSTX18:   no more units in system
   MSTX27:   specified unit is not a disk
   CAPX2:    WHEEL, OPERATOR, or MAINTENANCE capability required

 
   Obtaining the Status of a Given Disk Unit - .MSRUS

   This function returns the status of the given disk unit.   It  accepts
   the	channel, controller, and unit numbers in the first three words of
   the argument block.	After successful completion of this function, the
   channel,  controller, and unit numbers are unchanged, and the software
   information about the given disk unit  is  returned	in  the  argument
   block.

|  RESTRICTIONS:  Requires  enabled  WHEEL,  OPERATOR,	 or   MAINTENANCE
|		  capability

   The difference between this function and the .MSRNU function  is  that
   .MSRUS  does  not search for the next disk unit but rather returns the
   status for the given unit.  The .MSRNU function searches for the  next
   disk unit and returns the status for that unit.

   The format of the argument block is the  same  as  described  for  the
   .MSRNU function.

 
   Mounting a Given Structure - .MSMNT

   This function brings the given structure on line and normally makes it
   available  for  general  use.   Any	structure  other  than the public
   structure must be brought on line with  this  function.   (The  public
   structure is brought on line during the system startup procedure.)

|  .MSMNT can also be used to limit access to  structures  mounted  on	a
|  system  running  the  Common  File System, CFS-20.  Depending upon the
|  setting of the exclusive bit, MS%EXL,  structure  can  be  mounted  as
|  sharable or exclusive.  Sharable structures can be accessed by any job
|  running on any processor on the CI, as long as that processor has  not
|  excluded  the  specified  structure.  Exclusive structures can only be
|  accessed by jobs running on	the  processor	that  has  the	structure
|  mounted.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   It is recommended that the .MSRNU (Read Next Unit) function	be  given
   first  to  locate  all units in the structure.  Then the .MSMNT (Mount
   Structure) function can be given to read and verify the HOME blocks of
   each  unit  and  to	mount the structure.  If one or more units of the
   structure are write-locked, the structure cannot  be  mounted  and  an
   error is given.

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSTNM	    Pointer to the ASCIZ  string  containing  the
			    name of the structure (colon not allowed).

	1    .MSTAL	    Pointer to the ASCIZ  string  containing  the
			    alias of the structure.

	2    .MSTFL	    Flag bits in the left half, and the number of
			    units  in the structure (.MSTNU) in the right
			    half.  The bits that can be set in	the  left
			    half are:
			    B0(MS%NFH)	If one	of  the  HOME  blocks  is
					incorrect,  do not fix it, but do
					return an error.  If one  of  the
					HOME blocks is incorrect and this
					bit is off, the correct block  is
					copied	into  the bad HOME block,
					and   the   mounting	procedure
					continues.

			    B1(MS%NFB)	If one of the BAT (Bad Allocation
					Table)	blocks	is  incorrect, do
					not  fix  it  and  do  return  an
					error.	 If  this  bit is off and
					one  of   the	BAT   blocks   is
					incorrect,  the  correct block is
					copied into the bad BAT block and
					the mounting procedure continues.

			    B2(MS%XCL)	Mount the structure for exclusive
					use by this job.  This bit is set
					by  a  system  program	when   it
					initializes   or  reconstructs	a
					structure.  If this bit  if  off,
					the   structure  is  mounted  for
					general use.

			    B3(MS%IGN)	Ignore correctable errors in  the
					bit   table   and   in	the  root
					directory  on	this   structure.
					This  bit  is  set  by	a  system
					program when it reconstructs  the
					root  directory on a structure or
					rebuilds the bit table.  If  this
					bit   is  off  and  an	error  is
					detected, this	function  returns
					an error.

|			    B4(MS%EXL)	Mount structure exclusive to this
|					processor.   If  this bit is set,
|					only   jobs   running	on    the
|					processor  on which the structure
|					is mounted may	access	files  on
|					that structure.

	3    .MSTUI	    Beginning of unit information for  each  unit
			    in the structure.  The information is 3 words
			    long per unit, and the symbol for this length
			    is	.MSTNO.   The  first  3-word block is for
			    logical unit 0, and the last 3-word block  is
			    for  the  last  logical unit (.MSTNU-1).  The
			    offsets into the 3-word block are:

			    0	  .MSTCH   Channel number of unit

			    1	  .MSTCT   Controller  number	of   unit
					   (currently must be -1)

			    2	  .MSTUN   Unit number of unit

			    The number of  argument  words  per  unit  is
			    given by symbol .MSTNO (3).

   After successful completion of this function, the given  structure  is
   mounted  and  available  for  general use (unless bit MS%XCL was on in
   word .MSTFL of the argument block).	The following errors are possible
   on the failure of this function.

   MSTRX2:   WHEEL or OPERATOR capability required
   MSTRX3:   argument block too small
   MSTRX4:   insufficient system resources
   MSTRX5:   drive is not on line
   MSTRX6:   home blocks are bad
   MSTRX7:   invalid structure name
   MSTRX8:   could not get OFN for ROOT-DIRECTORY
   MSTRX9:   could not MAP ROOT-DIRECTORY
   MSTX10:   ROOT-DIRECTORY bad
   MSTX11:   could not initialize Index Table
   MSTX12:   could not OPEN Bit Table File
   MSTX13:   backup copy of ROOT-DIRECTORY is bad
   MSTX14:   invalid channel number
   MSTX15:   invalid unit number
   MSTX16:   invalid controller number
   MSTX17:   all units in a structure must be of the same type
   MSTX19:   unit is already part of a mounted structure
   MSTX20:   data error reading HOME blocks
   MSTX23:   could not write HOME blocks
   MSTX25:   invalid number of swapping pages
   MSTX27:   specified unit is not a disk
   MSTX30:   incorrect Bit Table counts on structure
   MSTX34:   unit is write-locked
   MSTX35:   too many units in structure
   MONX01:   insufficient system resources

 
   Dismounting a Given Structure - .MSDIS

   This function indicates that the given structure can be  removed  from
   the	system.   Any  mounted	structure other than the public structure
   (usually called PS:) can  be  dismounted  with  this  function.   (The
   public structure is dismounted at system shutdown.)

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   Files that are open at the  time  this  function  is  executed  become
   inaccessible, and the jobs that had the files open receive an error if
   they reference them.  Jobs that have mounted  the  structure  or  have
   connected  to  or  accessed	a  directory  on the structure receive an
   informational message on the terminal.  This message is

	[STRUCTURE name:  HAS BEEN DISMOUNTED]

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSDNM	    Pointer to ASCIZ string containing the  alias
			    of the structure, or device designator of the
			    structure.

   After successful completion of this function, the given  structure  is
   dismounted and can be physically removed from the system.

   The following errors are possible on the failure of this function.

   MSTRX2:   WHEEL or OPERATOR capability required
   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX24:   illegal to dismount the Public Structure

 
   Obtaining the Status of a Given Structure - .MSGSS

   This function returns the status of a mounted structure.  The supplies
   the	designators  for  the  structure  and  for  the  storage  of  the
   structure's physical ID.  After successful  completion  of  the  call,
   data is returned in the appropriate words in the argument block.

   The format of the argument  block,  whose  length  is  .MSGLN,  is  as
   follows:

   Word      Symbol	    Meaning

	0    .MSGSN	    Byte pointer to ASCIZ string  containing  the
			    alias  of the structure, or device designator
			    of the structure.

	1    .MSGST	    Returned status word.  The status bits are:

			    B0(MS%PS)	This  structure   is   a   public
					structure.

			    B1(MS%DIS)	This	structure    is     being
					dismounted  and  no further mount
					count increments are allowed.

			    B2(MS%DOM)	This  structure  is  a	 domestic
					structure.

			    B3(MS%PPS)	This  structure  is  the   public
					structure.

			    B4(MS%INI)	This	structure    is     being
					initialized.

			    B5(MS%LIM)	Directories on this structure are
					limited   to   the   size   of	a
					directory on a DECSYSTEM-2050 (30
					pages).

			    B6(MS%NRS)	Structure is non-regulated.

			    B7(MS%RWS)	Read-after-write   checking    is
					being done in the swapping area

			    B8(MS%RWD)	Read-after-write   checking    is
					being done in the data area

|			    B9(MS%ASG)	Disk assignments  are  prohibited
|					because bit table is bad
|
|			    B10(MS%MXB) Bit table is too  large  for  the
|					monitor address space
|
|			    B11(MS%CRY) Password encryption is enabled

|			    B12-14	Not used
|
|			    B15(MS%EXC) Structure is mounted exclusive to
|					this   processor;   if	off,  the
|					structure may be shared by  other
|					systems on the CI.
|
|			    B16(MS%IDX) Index table  file  for	OFNs  has
|					been set up
|
|			    B17(MS%CRD) The  root  directory   is   being
|					created on this structure.

	2    .MSGNU	    Number of units in structure.

	3    .MSGMC	    Mount count for this structure.   This  value
			    is	 determined   by  the  number  of  .MSIMC
			    (Increment Mount Count) functions  given  for
			    this   structure   by  all	users  since  the
			    structure was mounted.

	4    .MSGFC	    Open file count (i.e., number of open  files)
			    for this structure.

	5    .MSGSI	    Pointer to ASCIZ string in which to store the
			    structure's physical ID.

   The length of the argument block is given by symbol .MSGLN (6).

   After successful completion of this function, the status of the  given
   structure  is returned in the appropriate words of the argument block,
   and the pointer to the physical ID is updated to reflect the  returned
   string.

   The following errors are possible on the failure of this function.

   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted

 
   Changing the Status of a Given Structure - .MSSSS

   This function changes the status of a mounted structure.   The  caller
   can	change	four  of  the status bits in the structure's status word:
   the status of being dismounted, the	status	of  being  domestic,  the
   status  of  having read-after-write checking done in the swapping area
   of the disk, and the status of having read-after-write  checking  done
   in the data area.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   The format of the argument block, the length of which is .MSSLN, is:

      Word   Symbol	    Meaning

	0    .MSSSN	    Byte pointer to ASCIZ string  containing  the
			    alias  of the structure, or device designator
			    of the structure.

	1    .MSSST	    Word containing the new values for	the  bits
			    being changed.

	2    .MSSMW	    Mask containing the bits being changed.   The

			    bits that can be changed are:

			    B1(MS%DIS)	Structure is being dismounted

|			    B2(MS%DOM)	If set,  structure  is	domestic;
|					if not set, structure is foreign
|			    B6(MS%NRS)	If     set,	structure      is
|					non-regulated;	  if   not   set,
|					structure is regulated

			    B7(MS%RWS)	Read-after-write   checking    is
					being done in the swapping area

			    B8(MS%RWD)	Read-after-write   checking    is
					being done in the data area

   After successful completion of this function, the status of the  given
   structure  is  changed  according to the data supplied in the argument
   block.

   The following errors are possible on the failure of this function.

   MSTRX2:   WHEEL or OPERATOR capability required
   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX22:   illegal to change specified bits

 
   Initializing a Given Structure - .MSINI

   This function creates a new structure or repairs an existing structure
   during normal system operation.  The caller has the option of creating
   a new file system, reconstructing the root directory,  writing  a  new
   set of HOME blocks on the structure, or rebuilding the index block.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSINM	    Byte pointer to ASCIZ string  containing  the
			    name of the structure.

	1    .MSIAL	    Byte pointer to ASCIZ string  containing  the
			    alias of the structure.

	2    .MSIFL	    Flag bits in B0-11, function  value  (MS%FCN)
			    in	B12-17,  and number of units in structure
			    (.MSINU) in B18-35.

			    Flag Bits

			    B0(MS%NFH)	Do not fix HOME block if  one  is
					incorrect and do return an error.
					This bit  can  be  on  only  with
					function .MSRRD.  (See below.)

			    B1(MS%NFB)	Do not fix BAT block  if  one  is
					incorrect and do return an error.

			    B2(MS%XCL)	Mount	 this	 structure    for
					exclusive  use	by  this job.  If

					this bit is off, the structure is
					mounted for general use.

			    B3(MS%IGN)	Ignore errors in  the  bit  table
					and in the root directory on this
					structure.  If this  bit  is  on,
					B2(MS%XCL) must also be on.

			    Function Values

			    1	.MSCRE	Create a new file system

			    2	.MSRRD	Reconstruct the root directory

			    3	.MSWHB	Write a new set of HOME blocks

			    4	.MSRIX	Rebuild the index table

	3-5  .MSISU	    Beginning of unit information for  each  unit
			    in the structure.  The information is 3 words
			    long per unit, and the symbol for this length
			    is	.MSINO.   The  first  3-word block is for
			    logical unit 0, and the last 3-word block  is
			    for  the  last  logical unit (.MSINU-1).  The
			    offsets into the 3-word block are:

			    0	.MSICH	Channel number of unit

			    1	.MSICT	Controller   number    of    unit
					(currently must be -1)

			    2	.MSIUN	Unit number of unit

			    The number of arguments per unit is given  by
			    symbol .MSINO (3).

	6    .MSIST	    Status word (reserved for future use).

	7    .MSISW	    Number  of	pages  for   swapping	on   this
			    structure.

       10    .MSIFE	    Number  of	pages  for  the  front-end   file
			    system.

      11-13  .MSIUI	    Unit ID (3 words of ASCII)

      14-16  .MSIOI	    Owner ID (3 words of ASCII)

      17-21  .MSIFI	    File system ID (3 words of	ASCII)	(reserved
			    for future use)

       22    .MSIFB	    Number of pages for the file BOOTSTRAP.BIN.

       23    .MSISN	    Serial number  of  the  CPU  for  which  this
			    structure  is  used  in  booting system.  You
			    must supply this word when creating a  system
			    structure that does not have the name PS:.

   Words 6 through 16 (.MSIST through .MSIOI) of the argument block  must
   be  supplied when the MSTR call is being executed to create a new file
   system or to write  a  new  set  of	HOME  blocks.	After  successful
   completion  of  the	.MSCRE function, the structure is initialized and
   the following directories are created:

	<ROOT-DIRECTORY>
	<SYSTEM>
	<SUBSYS>
	<ACCOUNTS>
	<SPOOL>
	<OPERATOR>
	<SYSTEM-ERROR>

   The following errors are possible on the failure of this function.

   MSTRX2:   WHEEL or OPERATOR capability required
   MSTRX3:   argument block too small
   MSTRX4:   insufficient system resources
   MSTRX5:   drive is not on line
   MSTRX6:   home blocks are bad
   MSTRX7:   invalid structure name
   MSTRX8:   could not get OFN for ROOT-DIRECTORY
   MSTRX9:   could not MAP ROOT-DIRECTORY
   MSTX10:   ROOT-DIRECTORY bad
   MSTX11:   could not initialize Index Table
   MSTX12:   could not OPEN Bit Table File
   MSTX13:   backup copy of ROOT-DIRECTORY is bad
   MSTX14:   invalid channel number
   MSTX15:   invalid unit number
   MSTX16:   invalid controller number
   MSTX17:   all units in a structure must be of the same type
   MSTX19:   unit is already part of a mounted structure
   MSTX20:   data error reading HOME blocks
   MSTX23:   could not write HOME blocks
   MSTX25:   invalid number of swapping pages
   MSTX26:   invalid number of Front-End-File system pages
   MSTX27:   specified unit is not a disk
   MSTX28:   could not initialize Bit Table for structure
   MSTX29:   could not reconstruct ROOT-DIRECTORY
   MSTX30:   incorrect Bit Table counts on structure
   MONX01:   insufficient system resources

 
   Incrementing the Mount Count for the Job - .MSIMC

   Users  indicate  that  they	are  actively  using   a   structure   by
   incrementing  the  structure's  mount  count.   A  nonzero mount count
   informs the operator that the  structure  should  not  be  dismounted.
   Also,  an  IPCF  message  is sent to the Mountable Device Allocator to
   indicate that a user is using the structure.  The .MSIMC  function  is
   used to increment a structure's mount count.

   Note that incrementing the mount count is a requirement for	accessing
   files and directories on regulated structures.

   The job receives an error if the given structure is in the process  of
   being  dismounted  (i.e., a job has given the .MSSSS function with the
   MS%DIS bit on), or if the job is not logged in.

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSDEV	    Device designator, or byte pointer	to  ASCIZ
			    string containing the alias of the structure.

	1    .MSJOB	    (Optional) Number  of  job	(other	than  the
			    current  job)  whose  mount  count	is  to be

			    incremented.  This requires WHEEL or OPERATOR
			    capability to be enabled.

   After successful completion of this function, the mount count  of  the
   given structure has been incremented.

   The following errors are possible on the failure of this function.

   ARGX18:   invalid structure name
   CACTX2:   Job is not logged in
   LOUTX2:   Invalid job number
   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX31:   structure already mounted
   MSTX33:   structure is unavailable for mounting
   MONX01:   insufficient system resources
   STDVX1:   no such device
   STRX01:   structure is not mounted
   STRX02:   insufficient system resources

 
   Decrementing the Mount Count for the Job - .MSDMC

   This function indicates that the given structure is	no  longer  being
   used by the job executing the call.	If the job executing the call has
   previously incremented the mount count  for	this  structure  via  the
   .MSIMC   (Increment	 Mount	 Count)  function,  the  mount	count  is
   decremented.  If the job has not incremented the mount count, the  job
   receives  an  error.   If the structure is regulated, and the user has
   any assigned JFNs on the structure, is accessing the structure  or  is
   connected to the structure, an error is returned.

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSDEV	    Device designator, or byte pointer	to  ASCIZ
			    string containing the alias of the structure.

	1    .MSJOB	    (Optional) Number  of  job	(other	than  the
			    current  job)  whose  mount  count	is  to be
			    decremented.  This requires WHEEL or OPERATOR
			    capability to be enabled.

   The resource allocator receives an IPCF packet when	the  mount  count
   for	a structure is decremented.  The flag word (.IPCFL) of the packet
   descriptor block has a code of 1(.IPCCC) in	the  IP%CFC  field  (bits
   30-32).  This code indicates the message was sent by the monitor.  The
   first word of the packet data block contains  the  structure  dismount
   code  .IPCDS.  The second word contains the number of header words and
   the number of the job decrementing the mount count.	 The  third  word
   contains the device designator of the structure.  Thus,

	.IPCFL/<.IPCCC>B32

	DATA/.IPCDS
	DATA+1/number of header words (2),, job number
	DATA+2/device designator of structure

   After successful completion of this function, the mount count  of  the
   structure has been decremented and the IPCF message has been sent.

   The following errors are possible on the failure of this function.

   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX32:   structure was not mounted
   MSTX36:   illegal while JFNs assigned
   MSTX37:   illegal while accessing or connected to a directory
   ARGX18:   invalid structure name
   MONX01:   insufficient system resources
   STDVX1:   no such device
   STRX01:   structure is not mounted
   STRX02:   insufficient system resources

 
   Obtaining the Users on a Given Structure - .MSGSU

   This function returns the job  numbers  of  the  users  of  the  given
   structure.	Users  of  a  structure  are  divided into three classes:
|  users who have incremented the mount count (MOUNT STRUCTURE	command),
   users  who are connected to the structure (CONNECT command), and users
   who	have  accessed	the  structure	(ACCESS  command).   The   caller
   specifies the classes of users for which information is to be returned
   by setting the appropriate bits in the argument block.

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSUAL	    Byte pointer to ASCIZ string  containing  the
			    alias  of the structure, or device designator
			    of the structure.

	1    .MSUFL	    Flag bits in the left half and 0 in the right
			    half.  The bits that can be set are:

			    B0(MS%GTA)	Return users  who  have  accessed
					the structure.

			    B1(MS%GTM)	Return users who have incremented
					the mount count.

			    B2(MS%GTC)	Return users who are connected to
					the structure.

   After successful execution of this function, word 1 through	word  n+1
   (where  n  is  the  number  of  items  returned)  are updated with the
   following information.

      Word   Symbol	    Meaning

	1    .MSUFL	    Right half contains the number of  items  (n)
			    being returned.  Left half is unchanged.

	2    .MSUJ1	    Flag bits for the job in the left  half,  and
			    number of job in the right half.

	.		    .
	.		    .
	.		    .

      n + 1		    Flag bits for the job in the left  half,  and
			    number of job in the right half.

			    The bits returned for each	job  are  defined
			    as:

			    B0(MS%GTA)	Job has accessed structure.

			    B1(MS%GTM)	Job  has  incremented  the  mount
					count for structure.

			    B2(MS%GTC)	Job has connected to structure.

   The following errors are possible on the failure of this function.

   MSTRX1:   invalid function
   MSTRX3:   argument block too small
   STRX01:   structure is not mounted
   STDVX1:   no such device
   ARGX18:   invalid structure name
   MONX01:   insufficient system resources

 
   Specifying Word and Bits To Be Modified - .MSHOM

|  This function allows an enabled WHEEL or OPERATOR program to modify	a
|  word of the homeblock of a mounted structure.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   The format of the argument block is as follows:

      Word   Symbol	    Meaning

	0    .MSHNM	    Handle on alias such as pointer to string, or
			    device designator.

	1    .MSHOF	    Offset  specifying	which  word   should   be
			    changed.

	2    .MSHVL	    Value for new bits.

	3    .MSHMK	    Mask showing which bits should be changed.

   The following errors are possible on the failure of this function:

   MSTRX2:   insufficient privileges
   MSTRX3:   argument block too small
   MSTX21:   structure not mounted
   any errors "MODHOM" routine returns

 
   Incrementing the Mount Count for the Fork - .MSICF

   This function and the next (.MSDCF) allow job forks	to  independently
   mount  and dismount structures without contending with one another for
   control of the structure.  (This is primarily  intended  for  SYSJOB.)
   Note  that  when either a job mount or fork mount is possible, the job
   mount is preferred as it incurs less overhead.

   This function indicates that a fork is actively using a structure.  If
   the	structure  is  being  dismounted, the job receives an error.  The
   format of the argument block is:

      Word   Symbol	    Meaning

	0    .MSDEV	    Pointer to ASCIZ string containing the  alias
			    of the structure, or device designator of the
			    structure.

   The following errors are possible on the failure of this function.

   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX33:   structure is unavailable for mounting
   ARGX18:   invalid structure name
   MONX01:   insufficient system resources
   STDVX1:   no such device
   STRX01:   structure is not mounted
   STRX02:   insufficient system resources

 
   Decrementing the Mount Count for the Fork - .MSDCF

   This function indicates that a fork is no longer  using  a  structure.
   Note  that  if  a job-wide increment has been done, the fork may still
   access the structure.  The format of the argument block is:

      Word   Symbol	    Meaning

	0    .MSDEV	    Pointer to ASCIZ string containing the  alias
			    of the structure, or device designator of the
			    structure.

   The following errors are possible on the failure of this function.

   MSTRX3:   argument block too small
   MSTX21:   structure is not mounted
   MSTX32:   structure was not mounted
   MSTX36:   illegal while JFNs assigned
   MSTX37:   illegal while accessing or connected to a directory
   ARGX18:   invalid structure name
   MONX01:   insufficient system resources
   STDVX1:   no such device
   STRX01:   structure is not mounted
   STRX02:   insufficient system resources

 
   Receiving Interrupt when Disk Comes On-line - .MSOFL

   This function specifies who is to receive an  interrupt  when  a  disk
   comes  on-line.   It is provided for the Mountable Device Allocator in
   order to control the  disks	and  inform  the  operator  of	structure
   status.  Only one process on the system will receive the interrupts.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   The argument block has the following format:

      Word   Symbol	    Meaning

	0    .MSCHN	    Place this process on  a  software	interrupt
			    channel.  An interrupt is then generated when
			    a disk comes on-line.  If the channel  number
			    is	 given	 as  -1,  a  previously  assigned
			    interrupt channel will be deassigned.

 
   Ignoring Increment Check for Structure Use - .MSIIC

   Allows a process to	use  a	regulated  structure  without  previously
   incrementing the mount count.  Entries are made to the accounting file
   only on structure decrements, so this function will	enable	bypassing

   of accounting.

|  RESTRICTIONS:  Requires enabled WHEEL or OPERATOR capability

   There is no argument block.

   The following errors are possible:

   MSTRX2:   WHEEL or OPERATOR capability required

 
|	     Converting the Structure Mount Attribute - .MSCSM
|
|	     This function may be used to change the mount attribute of a
|	     structure on a CFS-20 system.  Under CFS-20, a structure may
|	     be mounted as sharable with other processors on the  CI,  or
|	     exclusive	to  a particular processor.  Exclusive structures
|	     can  only	be  accessed  by  jobs	running  on  the   owning
|	     processor.
|
|	     The structure may be mounted with MSTR% function .MSMNT with
|	     the  exclusive bit on or off.  This function, .MSCSM, may be
|	     used to change the setting of the exclusive  bit  while  the
|	     structure is mounted.
|
|  RESTRICTIONS:  Requires enabled  WHEEL  or  OPERATOR  capability,  and
|		  CFS-20 software.
|
|  The format of the argument block is as follows:
|
|  Word      Symbol	    Meaning
|
|     0      .MSCDV	    Structure device designator
|
|     1      .MSCST	    New mount attribute
|
|			    B4(MS%EXL)	0 to set structure sharable
|					1 to set structure exclusive



			     MTALN     JSYS 774

   Associates a  given	serial-numbered  magnetic  tape  drive	with  the
   specified logical unit number.  The MTALN call is a temporary call and
   may not be defined in future releases.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  slave type in left	half;	logical  unit  number  of
		    magtape in right half

	      AC2:  decimal serial number of magnetic tape drive

   RETURNS     +1:  always

   All units are searched for the specified serial number and slave type.
   When  they  are  found, the drive is associated with the given logical

   unit number.  The original unit is now  associated  with  the  logical
   unit number that the specified serial-numbered drive had before it was
   reassigned.

   The slaves recognized are

	.MTT45	  TU45 (The system default)
	.MTT70	  TU70
	.MTT71	  TU71
	.MTT72	  TU72
	.MTT77	  TU77
	.MTT78	  TU78

   Generates an illegal instruction interrupt on error conditions below.

   MTALN ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required
   DEVX1:    Invalid device designator
   OPNX7:    Device already assigned to another job



			     MTOPR     JSYS 77

   Performs various device-dependent  control  functions.   This  monitor
   call  requires either that the JFN be opened or the device be assigned
   to the caller if the device is an assignable device.

   Because of the device dependencies of the MTOPR call, programs written
   with  device-independent  code  should  not	use this call unless they
   first check for the type of device.

   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability
		    enabled.   Some  functions	require ARPANET or DECnet
		    software.

   ACCEPTS IN AC1:  JFN of the device

	      AC2:  function code (see below)

	      AC3:  function arguments or address of argument block  (see
		    descriptions of individual devices)

   RETURNS     +1:  always

   The functions listed for each device apply only to that device.  If	a
   function  applies to more than one device, its description is repeated
   for each applicable device.

   ARPANET Functions

   ARPANET  MTOPR  functions  are  described  below.   For   a	 complete
   description of their application, refer to the ARPANET manual.

   Code      Symbol    Meaning

    20	     .MOACP    If a connection is in the RFCR state, use of  this

		       function  will  cause  an RFC to be sent to accept
		       the connection.

    21	     .MOSND    If a connection	is  operating  in  buffered  send
		       mode,  use  of  this function causes all currently
		       buffered bytes to be sent.

    22	     .MOSIN    Causes the INS/INR command to be sent.

    24	     .MOAIN    Assigns	interrupt  channels  through  which   the
		       program is interrupted on either a change of state
		       (of the connection F.S.M) or receipt of an INS  or
		       INR message.  The INS/INR PSI channel is stored in
		       field MO%NIN (B0-5) of AC3 and  the  state  change
		       PSI  channel is stored in field MO%FSM (B12-17) of
		       AC3.  A value of 77 (octal)  in	either	of  these
		       fields prevents assignment of a PSI channel.

   DECnet Functions

   DECnet-20  MTOPR  functions	are  described	below.	 For  a  complete
   description of their application, refer to the DECnet manual.

   Code      Symbol		      Meaning

    24	     .MOACN    Allow a network task to enable software	interrupt
		       channels for any combination of the following work
		       types:

			    o  connect event pending
			    o  interrupt message available
			    o  data available

		       This function  requires	that  AC3  contain  three
		       9-bit   fields	specifying  the  changes  in  the
		       interrupt assignments for this link.  These fields
		       are:

		       Field	 Symbol    Used to Signal

		       B0-8	 MO%CDN    Connect event pending
		       B9-17	 MO%INA    Interrupt message available
		       B18-26	 MO%DAV    Data available

		       The contents of the fields are

		       Value	 Meaning

		       nnn	 The number of the channel to be enabled;
				 0-5 and 23-35 decimal
		       .MOCIA	 Clear the interrupt
		       .MONCI	 No change

    25	     .MORLS    Read the link status and return a 36-bit  word  of
		       information  regarding  the  status of the logical
		       link.  AC3 contains flag bits in the left half and
		       a  disconnect  code  in	the right half.  The flag
		       bits are

		       Symbol	 Bit	   Meaning

		       MO%CON	 B0	   Link is connected
		       MO%SRV	 B1	   Link is a server

		       MO%WFC	 B2	   Link   is   waiting	 for	a
					   connection
		       MO%WCC	 B3	   Link   is   waiting	 for	a
					   connection confirmation
		       MO%EOM	 B4	   Link has an entire message  to
					   be read
		       MO%ABT	 B5	   Link has been aborted
		       MO%SYN	 B6	   Link has been closed normally
		       MO%INT	 B7	   Link has an interrupt  message
					   available
		       MO%LWC	 B8	   Link   has	been   previously
					   connected

		       The disconnect/reject codes are as follows:

		       Symbol	 Value	   Meaning

|		       .DCX0	    0	   Reject or disconnect by object
		       .DCX1	    1	   Resource allocation failure
		       .DCX2	    2	   Destination	node   does   not
					   exist
		       .DCX3	    3	   Node shutting down
		       .DCX4	    4	   Destination process	does  not
					   exist
		       .DCX5	    5	   Invalid name field
|		       .DCX6	    6	   Destination	 process    queue
|					   overflow, object is busy
		       .DCX7	    7	   Unspecified error
		       .DCX8	    8.	   Third party aborted link
		       .DCX9	    9.	   User    abort    (asynchronous
					   disconnect)
|		       .DCX10	   10.	   Invalid node name
|		       .DCX11	   11.	   Local node shut down
		       .DCX21	   21.	   Connect initiate with  illegal
					   destination address
		       .DCX22	   22.	   Connect confirm  with  illegal
					   destination address
		       .DCX23	   23.	   Connect  initiate  or  connect
					   confirm   with   zero   source
					   address
		       .DCX24	   24.	   Flow control violation
		       .DCX32	   32.	   Too many connections to node
		       .DCX33	   33.	   Too	 many	connections    to
					   destination process
		       .DCX34	   34.	   Access not permitted
		       .DCX35	   35.	   Logical link services mismatch
		       .DCX36	   36.	   Invalid account
		       .DCX37	   37.	   Segment size too small
|		       .DCX38	   38.	   No response from  destination,
|					   process aborted
		       .DCX39	   39.	   No path to destination node
		       .DCX40	   40.	   Link aborted due to data loss
		       .DCX41	   41.	   Destination process	does  not
					   exist
		       .DCX42	   42.	   Confirmation   of   disconnect
					   initiate
		       .DCX43	   43.	   Image data field too long

		       If a disconnect code does not apply to the current
		       status  of the link, the right half of AC3 will be
		       zero.

    26	     .MORHN    Return the ASCII name of  the  host  node  at  the
		       other  end  of  the  logical  link.  This function

		       requires that AC3 contain a string pointer to  the
		       location where the host name is to be stored.  (If
		       the  byte  size	exceeds  eight	bits,  bytes  are
		       truncated to eight bits.)

		       The monitor call returns with an  updated  pointer
		       in AC3, and the host name stored as specified.

    27	     .MORTN    Return the unique task  name  that  is  associated
		       with  your  end	of  the logical link.  If you had
		       defaulted  the  task  name  in  the  network  file
		       specification,	  the	  call	   returns    the
		       monitor-supplied task  name.   In  DECnet-20,  the
		       default task name is actually a unique number.

		       This function requires that AC3 contain	a  string
		       pointer	to the location where the task name is to
		       be stored.  (If the byte size exceeds eight  bits,
		       bytes are truncated to eight bits.)

		       The monitor call returns with an  updated  pointer
		       in AC3 and the task name stored as specified.

    30	     .MORUS    Return  the  source   task   user   identification
		       supplied  in  the  connect initiate message.  This
		       function  requires  that  AC3  contain  a   string
		       pointer	 to   the   location   where   the   user
		       identification is to be stored.	(If the byte size
		       exceeds	eight  bits, bytes are truncated to eight
		       bits.)

		       The monitor call returns with an  updated  pointer
		       in  AC3	and  the  user	identification	stored as
		       specified.  If no user identification was supplied
		       by  the source task, AC3 continues to point to the
		       beginning of the string, and a null is returned as
		       the only character.

    31	     .MORPW    Return the source task's password as  supplied  in
		       the   connect  initiate	message.   This  function
		       requires that AC3 contain a string pointer to  the
		       location  where	the  password  is  to  be stored.
		       (Passwords  are	binary;   therefore,  the  string
		       pointer should accomodate 8-bit bytes.)

		       The monitor call returns with an  updated  pointer
		       in  AC3	and  the source task's password stored as
		       specified.  AC4 contains the number  of	bytes  in
		       the  string;   a  zero  value  indicates  that  no
		       password was supplied by the source task.

    32	     .MORAC    Returns the account string supplied by the  source
		       task   in  the  connect	initiate  message.   This
		       function  requires  that  AC3  contain  a   string
		       pointer	to  the location where the account string
		       is to be stored.  (If the byte size exceeds  eight
		       bits, bytes are truncated to eight bits.)

		       The monitor call return with an updated pointer in
		       AC3 and the source task's account number stored as
		       specified.  If no account string was  supplied  by
		       the  source  task,  AC3	continues to point to the
		       beginning of the string, and a null is returned as
		       the only character.

    33	     .MORDA    Return the optional data supplied in  any  of  the
		       connect	or  disconnect	messages.   This function
		       requires that AC3 contain a string pointer to  the
		       location  where	the  optional  user data is to be
		       stored.	(This file is binary;  the string pointer
		       should specify 8-bit bytes.)

		       The monitor call returns with an  updated  pointer
		       in  AC3 and the optional data stored as specified.
		       AC4 contains the  number  of  bytes  in	the  data
		       string;	 a  zero value indicates that no optional
		       data was supplied.

    34	     .MORCN    Return the object type that was used by the source
		       task  to  address  this	connection.   The  result
		       indicates whether the local task was addressed  by
		       its generic type or its unique network task name.

		       The monitor call returns with the object  type  in
		       AC3.  A zero object type indicates that the target
		       task was addressed  by  its  unique  network  task
		       name;   a  nonzero  value  indicates  that  it was
		       addressed by its generic object type.

    35	     .MORIM    Read interrupt message.	 This  function  requires
		       that  AC3  contain a byte pointer to the receiving
		       buffer.	(If the byte  size  exceeds  eight  bits,
		       bytes  are  truncated to eight bits.)  The maximum
		       message length is 16 bytes, and	the  buffer  size
		       should be at least 8 bits.

		       The monitor call returns with an  updated  pointer
		       in  AC3, the message stored in the buffer, and the
		       count of bytes received in AC4.

    36	     .MOSIM    Send an interrupt message.  This function requires
		       that  AC3  contain  a  byte pointer to the message
|		       (8-bit maximum) and that AC4 contain  a	count  of
		       the  bytes in the interrupt message (sixteen bytes
		       maximum).

    37	     .MOROD    Return the unique  identification  of  the  source
		       task.   This  identification  is  in the format of
		       object-descriptor, and the contents depend on  the
		       DECnet  implementation  on  the	remote	host.  In
		       addition, if the  source  task  is  running  on	a
		       system  that  provides  for  group and user codes,
		       this information is also returned.  If the  source
		       task  name  is  on  a  DECnet-20  host,	the  data
		       returned is TASK-taskname.  This function requires
		       that  AC3 contain a string pointer to the location
		       where the object-descriptor of the source task  is
		       to  be  stored.	 (If  the byte size exceeds eight
		       bits, bytes are truncated to eight bits.)

		       The monitor call returns with an  updated  pointer
		       in   AC3   and  the  object-descriptor  stored  as
		       specified.  In addition, if the source host system
		       uses  group  and user codes (sometimes referred to
		       as project and programmer  number  or  p,pn),  AC4
		       contains  the  group code in the left half and the
		       user code in the right half.  If the  source  host
		       system  does  not provide for group or user codes,
		       AC4 contains zeros.

    40	     .MOCLZ    Reject	a   connection	 either   implicitly   or
		       explicitly.   If  the  target  task closes its JFN
		       (via the CLOSF monitor call) before accepting  the
		       connection  either  implicitly  or explicitly, the
		       local NSP assumes that the connection is  rejected
		       and  sends  a  connect  reject message back to the
		       source task.  The reason given is process  aborted
		       (reject	code  38,  .DCX38).  The target task must
		       then reopen its JFN in order to receive subsequent
		       connect initiate messages.  In order to explicitly
		       reject a connect and at the  same  time	return	a
		       specific reject reason and set up 16 bytes of user
		       data, the target task must use the .MOCLZ function
		       of  the	MTOPR  monitor call.  The .MOLCZ function
		       does not close the JFN.

		       The function requires that

			    AC2 contain a reject code in  the  left  half
			    and  .MOCLZ  in  the  right half.  The reject
			    code is a 2-byte, NSP-defined decimal  number
			    indicating	the  reason that a target task is
			    rejecting  a  connection.	 Refer	 to   the
			    description of code 25, .MORLS, for a list of
			    disconnect/reject codes.

			    AC3 contain a string pointer to any  data  to
			    be returned.  (If the byte size exceeds eight
			    bits, bytes are truncated to eight bits.)

			    AC4 contain the count of bytes  in	the  data
			    string  (maximum16).   A  zero  indicates  no
			    data.

    41	     .MOCC     Accept	a   connection	 either   implicitly   or
		       explicitly.   Under  certain conditions, the local
		       NSP assumes that the connection	is  accepted  and
		       sends a connect confirm message back to the source
		       task.  These implicit conditions are

			    The target task attempts  to  output  to  the
			    logical  link (issues a SOUT or SOUTR monitor
			    call to the network).

			    The target task submits a read request to the
			    logical  link  (issues  a SIN or SINR monitor
			    call to the network).

			    The target task is in input wait  state  (has
			    enabled   itself   for   a	"data  available"
			    software interrupt).

		       In order to explicitly accept a connect	and  also
		       return  a  limited amount of data, the target task
		       must use the .MOCC function of the  MTOPR  monitor
		       call.   This  function requires that AC3 contain a
		       string pointer to any data to  be  returned.   (If
		       byte  size exceeds eight bits, bytes are truncated
		       to eight bits.)	AC4 must  contain  the	count  of
		       bytes in the data string to a maximum of 16 bytes.
		       A zero indicates no data.

    42	     .MORSS    Returns the maximum segment size that can be  sent
		       over  this link.  This value is the minimum of the

		       maximum segment size supported by the  remote  NSP
		       task,  the  segment  size  supported by the remote
		       network task, and the segment  size  supported  by
		       the  local  NSP task.  The local task can use this
		       value  to  optimize  the  format  of  data   being
|		       transmitted  over  the  link.   This  function  is
|		       illegal if the link is not in run state.

		       The monitor call returns the maximum segment size,
		       in bytes, in AC3.

    43	     .MOANT    Attach network terminal.  This function	passes	a
		       DECnet  logical link from the DECnet backround job
		       (MCBNRT) to TOPS-20 so that  TOPS-20  can  control
		       terminal  I/O to and from the DECnet logical link.
		       The MCBNRT program must establish the logical link
		       and exchange the necessary DECnet protocols before
		       this function of the MTOPR call is executed.

		       The JFN accepted by this function in  AC1  is  the
		       JFN of the DECnet logical link.

		       This call returns the line number  of  the  DECnet
		       logical link in AC2.

		       The TOPS-20 job	is  associated	with  the  DECnet
		       logical link until one of the following occurs:

		       1.  The logical link is broken by the foreign host
			   or by DECnet.

		       2.  The job logs out, more data comes through  the
			   logical  link, and the first character of that
			   data is not a CTRL/C.  If the first	character
			   is  a  CTRL/C,  a new job is created using the
			   same logical link.

    44	     .MOSNH    Sets the network host.  This function  causes  the
		       terminal  specified  in the argument block to send
		       data to and receive data from the  DECnet  logical
		       link.  The link connects the terminal on the local
		       host to a job  on  a  foreign  host.   The  DECnet
		       logical	 link	to   the  foreign  host  must  be
		       established by the user process before this  MTOPR
		       function can be executed.

		       This function requires the JFN of the logical link
		       in  AC1,  and the address of the argument block in
		       AC3.  The argument block has the following format:

		       Word Symbol    Contents

		       0	      The length of  the  argument  block
				      including this word.
		       1    .SHTTY    Identifier of the terminal that  is
				      controlling the local job.
		       2    .SHESC    Flags  in  the  left  half,   ASCII
				      escape character in the right half.
				      The flags defined are:

					SH%LPM	local page mode

   Front-End Functions

   Code      Symbol    Meaning

    3	     .MOEOF    Causes TOPS-20 to flush its buffers and	send  all
		       data to the front end.  Optionally, it will notify
		       the front end of the  end-of-file  condition.   If
		       AC3  is	zero, the buffers are flushed and the end
		       of file status is sent to the front end.   If  AC3
		       is non-zero, only the buffers are flushed.

		       This function is used for synchronization  between
		       a program running on TOPS-20 and a program running
		       on the front end.

    4	     .MODTE    Assign the specified device to the DTE  controller
		       on  the	front  end.  This function, which must be
		       performed before I/O is	allowed  to  the  device,
		       requires  AC3  to  contain  the	device type.  The
		       process must have  WHEEL  or  OPERATOR  capability
		       enabled.

		       Unless otherwise noted, the  JFN  must  be  opened
		       before the MTOPR function can be performed.

*   45	     .MOSLP    Set link parameters.   This  function  causes  the
*		       link parameters specified in the argument block to
*		       be set.
*
*		       The process must have WHEEL or OPERATOR capability
*		       enabled to use this function.
*
*		       This function requires the address of the argument
*		       block  be  in  AC3.   The  argument  block has the
*		       following format:
*
*		       Word Symbol    Contents
*
*		       0	      The length of the  argument  block,
*				      including this word.
*
*		       1    .SLPSS    The link segment size.   The  value
*				      actually	used  is  the  lowest  of
*				      these 3 values:  the  segment  size
*				      specified, the local node's maximum
*				      segment size, and the remote node's
*				      segment size.
*
*		       2    .SLPFC    The  flow  control   option.    The
*				      argument consists of two fields:
*
*				      B15-B17  MO%RFC  Remote  end   flow
*				      control
*				      B33-B35  MO%LFC  Local   end   flow
*				      control
*
*				      If a value for the remote end  flow
*				      control  is  given,  it is ignored.
*				      The possible values for  the  local
*				      end flow control are:
*
*		       Value	 Symbol    Meaning
*
*			 1	 NSF.CO    No flow control
*			 2	 NSF.CS    Segment flow control
*			 3	 NSF.CM    Message flow control

*   46	     .MORLP    Read link parameters.  This function  returns  the
*		       link  parameters.   The arguments to this function
*		       are the	same  as  those  to  _..MOSLP  (set  link
*		       parameters) function.
*
*		       No capabilities are required  for  this	function.
*		       Returned value of -1 means that the parameters for
*		       the link have not yet been decided.
*
*		       Note that the .MORSS MTOPR function can be used to
*		       retrieve the segment size.  There is no difference
*		       between the value of segment size returned by  the
*		       .MORSS  function and the .MORLP function, once the
*		       link is established.
*
*   47	     .MOSLQ    Set  link  quotas.    This   function   sets   the
*		       parameters related to link quotas.
*
*		       This function requires the address of an  argument
*		       block   in   AC3.   The	argument  block  has  the
*		       following format:
*
*		       Word Symbol    Contents
*
*		       0	      Length  of  the	argument   block,
*				      including this word.
*
*		       1    .SLQIP    Percent  of  link  quota	used  for
*				      input.   However,  a minimum of one
*				      buffer is reserved  for  input  and
*				      output.
*
*		       2    .SLQLQ    Link quota.  This function sets the
*				      quota  of  buffers for this logical
*				      link.  The number of  buffers  used
*				      depends  on  the	job quota, and on
*				      the availability	of  buffers.   If
*				      the  process does not have WHEEL or
*				      OPERATOR	capability  enabled,  the
*				      default value is used instead.
*
*		       3    .SLQIG    Input goal.  This function sets the
*				      goal  for the number of outstanding
*				      input  data   requests.	 If   the
*				      process  does  not  have	WHEEL  or
*				      OPERATOR	capability  enabled,  the
*				      default value is used instead.
*
*   50	     .MORLQ    Read link quota.  The arguments to  this  function
*		       are  the  same  as  those  to the .MOSLQ (set link
*		       quota parameters) function,  and  the  values  are
*		       returned in the argument block.
*
*   51	     .MORFT    Return the format type of the source process name.
*
*		       The monitor call returns the format type  in  AC3.
*		       The followng format types are defined:
*
*		       Value	      Symbol Meaning
*
*		       0    .FMTT0    Type 0.  The user must specify only
*				      a  non-zero object type;	the other
*				      fields must be zero or have a  zero
*				      length.

*		       1    .FMTT1    Type 1.  The user must not  specify
*				      an  object  type;   the PBOBJ field
*				      must be zero.  The user must supply
*				      a  process name up to 16 bytes long
*				      in the PBNAM field.
*
*		       2    .FMTT2    Type 2.  The user must not  specify
*				      an  object  type;   the PBOBJ field
*				      must be zero.  The user  must  fill
*				      in  the  PBGRP  and  PBUID  fields.
*				      Note that  only  the  low-order  16
*				      bits  of	each  half  of	a PPN are
*				      transmitted.  The user must  supply
*				      a  process name up to 14 bytes long
*				      in the PBNAM field.

   MTA/MT Functions

   The functions available for physical magnetic tape  drives  (MTA)  and
   logical  magnetic tape drives (MT) are described below.  Some of these
   functions  accept  arguments  in  AC3   (refer   to	 the   individual
   descriptions).   In	the following descriptions, a labeled tape is one
   acquired via a MOUNT command and has one of the following  attributes:
   ANSI, TOPS20, or EBCDIC.

   Code      Symbol    Meaning

    0	     .MOCLE    Clear any error flags from a previous MTOPR call.

    1	     .MOREW    Rewind the tape.  This function waits for activity
		       to  stop  before  winding the tape.  If sequential
		       data is being output, the last partial  buffer  is
		       written	before	the  tape  is  rewound.   Control
		       returns to  caller  when  rewinding  begins.   For
		       labeled	tapes,	this  function	causes	the first
		       volume in the set to be mounted and positioned  to
		       the  first  file  in the file set.  Since a volume
		       switch may be required, this function could  block
		       for a considerable amount of time.

		       Use function .MORVL to rewind the current volume.

    2	     .MOSDR    Set the direction of the  tape  motions	for  read
		       operations.  This function requires AC3 to contain
		       the desired direction.  If AC30, the  tape  motion
		       is   forwards;	 if  AC31,  the  tape  motion  is
		       backwards.

		       This function is not available for  labeled  tapes
		       and  will  return  an MTOX1 error if used for that
		       purpose.

    3	     .MOEOF    Write a tape mark.  This  function  requires  that
		       the  magnetic tape be opened for write access.  If
		       sequential data is being output, the last  partial
		       buffer is written before the tape mark.

		       For labeled  tapes,  issuing  this  function  will
		       terminate  the data portion of the file, write EOF
		       trailer labels and leave the  tape  positioned  to
		       accept  user  trailer  labels.	It is possible at
		       this point to write user trailer labels	or  close
		       the file.  A second .MOEOF function issued without
		       positioning the tape backwards  will  "close"  the

		       file (subsequent writes will create a new file).

    4	     .MOSDM    Set  the  hardware  data  mode  to  be  used  when
		       transferring  data  to  and  from  the tape.  This
		       function requires AC3 to contain the desired  data
		       mode:

		       0    .SJDDM    default system data mode
		       1    .SJDMC    dump mode (36-bit bytes)
		       2    .SJDM6    SIXBIT byte mode for 7-track drives
		       3    .SJDMA    ANSI ASCII mode (7  bits	in  8-bit
				      bytes)

		       4    .SJDM8    industry compatible mode
		       5    .SJDMH    High-density mode for TU70 and TU72
				      tape  drives only (nine 8-bit bytes
				      in two words).

		       For labeled tapes, this function is  allowed  only
		       if  the	file is opened in dump mode (.GSDMP).  If
		       this is not the case, an MTOX1 error is returned.

    5	     .MOSRS    Set  the  size  of  the	records.   This  function
		       requires  AC3  to  contain  the	desired number of
		       bytes in the records.  This  function  is  allowed
		       only  if  no  I/O  has been done since the JFN was
		       opened.

|		       This function is illegal for  labeled  tapes;   an
|		       MTOX1 error is returned.

		       The maximum size of the records (in bytes)  is  as
		       follows:

		       Hardware 	       Maximum
		       I/O Mode 	       Record Size (bytes)

		       System-default		---
		       Dump			8192
		       (dump is usual default)
		       SIXBIT		       49152
		       ANSI ASCII	       40960
		       Industry compatible     32768
		       High density		8192

		       The above values can be exceeded in the	execution
		       of  .MOSRS;  however, the first data transfer will
		       fail.

    6	     .MOFWR    Advance over one record in the direction away from
		       the  beginning of the tape.  If sequential data is
		       being read in the forward direction and not all of
		       the  record  has been read, this function advances
		       to the start of the next  record.   If  sequential
		       data  is  being	read in the reverse direction and
		       not all of the record has been read, this function
		       positions the tape at the end of that record.

		       For labeled tapes,  forward  space  will  position
		       over  a	logical  record.   This implies that many
		       physical records may be skipped (if  S  format  is
		       used)   perhaps	 involving  one  or  more  volume
		       switches.

    7	     .MOBKR    Space backward over one record  in  the	direction
		       toward  the  beginning of the tape.  If sequential
		       data is being read in the  forward  direction  and
		       not all of the record has been read, this function
		       positions the tape  back  to  the  start  of  that
		       record.	 If  sequential data is being read in the
		       reverse direction and not all of  the  record  has
		       been read, this function positions the tape to the
		       end  of	the  record  physically  preceding   that
		       record.

		       For labeled tapes, backward spacing will  position
		       over  a	logical  record.   This implies that many
		       physical records may be skipped (if  S  format  is
		       used)   perhaps	 involving  one  or  more  volume
		       switches.

    10	     .MOEOT    For unlabeled tapes,  advance  forward  until  two
		       sequential  tape  marks are seen and position tape
		       after the first tape mark.

		       For labeled tapes, this function will position the
		       volume  set beyond the end of the last file in the
		       set.  This is useful for adding a new file to  the
		       end  of	an  already  existing  volume  set.  This
		       function may take some time to complete as one  or
		       more volumes switches may be required.

    11	     .MORUL    Rewind and unload  the  tape.   This  function  is
		       identical  to the .MOREW function and also unloads
		       the tape if the hardware supports tape unloading.

		       This function is illegal for any tape acquired via
		       the MOUNT command.

    12	     .MORDN    Return  the  current  density   setting.    On	a
		       successful   return,   AC3  contains  the  current
		       density.

    13	     .MOERS    Erase three inches  of  tape  (i.e.,  erase  gap).
		       This  function  requires that the magnetic tape be
		       opened for write access.

		       This function is illegal for labeled tapes.

    14	     .MORDM    Return the hardware data mode currently being used
		       in   transfers	to  and  from  the  tape.   On	a
		       successful return, AC3 contains the  current  data
		       mode.

    15	     .MORRS    Return the size of the records.	On  a  successful
		       return,	AC3  contains  the number of bytes in the
		       records.

    16	     .MOFWF    Advance to the  start  of  the  next  file.   This
		       function  advances  the tape in the direction away
		       from the beginning of the  tape	until  it  passes
		       over a tape mark.

		       For labeled tapes, forward  space  will	skip  one
		       logical	file.	This  implies  that many physical
		       files may be skipped,  involving  perhaps  one  or
		       more volume switches.

    17	     .MOBKF    Space backward over one file.  This function moves
		       the  tape in the direction toward the beginning of
		       the tape until it  passes  over	a  tape  mark  or
		       reaches	the  beginning	of  the  tape,	whichever
		       occurs first.

		       For labeled tapes, backspace file will back up one
		       logical	file.	This  implies  that many physical
		       files may be skipped,  involving  perhaps  one  or
		       more volume switches.

 
					      NOTE

			   For labeled ANSI tapes,  the  monitor  can
			   compute  the  number  of  volume  switches
			   required to get to the  first  section  of
			   the	file.	Thus,  if  this  function  is
			   issued for  an  ANSI  tape,	at  most  one
			   volume  switch  will be required.  This is
			   not true for EBCDIC tapes.

 
		       Issuing this function when  the	tape  is  already
		       positioned  at  the first volume of the volume set
		       will not produce an error.   The  program  issuing
		       this  function must follow the .MOBKF with a GDSTS
		       call to	determine  if  the  BOT  was  encountered
		       during the backspacing operation.

    20	     .MOSPR    Set the parity.	This  function	requires  AC3  to
		       contain the desired parity:

		       0    .SJPRO    odd parity
		       1    .SJPRE    even parity

    21	     .MORPR    Return  the  current  parity.   On  a   successful
		       return, AC3 contains the current parity.

    22	     .MONRB    Return number of bytes remaining  in  the  current
		       record.	 On a successful return, AC3 contains the
		       number of bytes remaining.  This function is  only
		       meaningful during sequential I/O.

    23	     .MOFOU    Force any partial records  to  be  written  during
		       sequential output.

    24	     .MOSDN    Set the density.  The  function	requires  AC3  to
		       contain the desired density.

		       0    .SJDDN    default system density
		       1    .SJDN2    200 BPI (8 rows/mm)
		       2    .SJDN5    556 BPI (22 rows/mm)
		       3    .SJDN8    800 BPI (31 rows/mm)
		       4    .SJD16    1600 BPI (63 rows/mm)
		       5    .SJD62    6250 BPI (246 rows/mm)

		       This function is illegal for labeled tapes.

    25	     .MOINF    Return information about the tape.  This  function
		       requires   AC3  to  contain  the  address  of  the
		       argument block in which the information is  to  be
		       returned.   The format of the argument block is as
		       follows:

		       Word  Symbol		   Contents

			0    .MOICT   Length  of  argument  block  to  be
				      returned (not including this word)
			1    .MOITP   MTA type code
			2    .MOIID   MTA reel ID
			3    .MOISN   Channel, controller,  and  unit  in
				      the  left half and serial number in
				      the right half.
			4    .MOIRD   Number of reads done
			5    .MOIWT   Number of writes done
			6    .MOIRC   Record  number  from  beginning  of
				      tape

			7    .MOIFC   Number of files on tape
			10   .MOISR   Number of soft read errors
			11   .MOISW   Number of soft write errors
			12   .MOIHR   Number of hard read errors
			13   .MOIHW   Number of hard write errors
			14   .MOIRF   Number of frames read
			15   .MOIWF   Number of frames written
|			16   .MOICH   Channel number
|			17   .MOICO   Controller number
|			20   .MOIUN   Unit number
|			21   .MOIDH   High order serial number of drive
|			22   .MOIDN   Low order serial number of drive

		       The JFN need not be open for this function.

    26	     .MORDR    Return the  direction  that  the  tape  is  moving
		       during  read  operations.  On a successful return,
		       AC30 if	the  direction	of  the  tape  motion  is
		       forwards,  or  AC31  if	the direction of the tape
		       motion is backwards.

    27	     .MOSID    Set the reel identification of the  tape  mounted.
		       The process must have WHEEL or OPERATOR capability
		       enabled.  This function requires  AC3  to  contain
		       the  desired  36-bit reel ID.  The JFN need not be
		       open for this function.

    30	     .MOIEL    Inhibit error logging for the  tape.   If  AC3  is
		       non-zero,  error  logging  will	be  inhibited  on
		       subsequent operations on the tape drive.   If  AC3
		       is  zero,  error  logging  will be performed.  The
		       setting remains in effect until the JFN is closed.
		       Error  logging  occurs by default if no setting is
		       made with function .MOIEL.

    31	     .MONOP    Wait for all activity to stop.

    32	     .MOLOC    Specifies the first volume in a MOUNT request,  or
		       identifies  the "next" volume for a volume switch.
		       This   function	 requires   OPERATOR   or   WHEEL
		       capability.

		       AC3 contains a pointer to an argument block having
		       the following format:

		       Word   Symbol		    Contents

			 0    .MOCNT   count of words in the block
			 1    .MOMTN   MT unit number to  associate  with
				       this MTA

			 2    .MOLBT   label type (.LTxxx)
			 3    .MODNS   density
			 4    .MOAVL   address of volume labels
			 5    .MONVL   number of volume labels at .MOAVL
			 6    .MOCVN   volume number in the volume set
			 7    .MOVSN   SIXBIT file set identifier

		       The JFN need not be open for this function.

    37	     .MOSTA    Return current magtape status.  Argument block has
		       the following form and contents:

		       Word  Symbol   Contents

|			0    .MOCNT   Count  of  words	 in   the   block
|				      including this word (user-supplied)

|			1    .MODDN   Density flags (returned)

				      B1  SJ%CP2  200 BPI
				      B2  SJ%CP5  556 BPI
				      B3  SJ%CP8  800 BPI
				      B4  SJ%C16  1600 BPI
				      B5  SJ%C62  6250 BPI

|		       2     .MODDM   Data mode flags (returned)
				      Bit Symbol  Meaning

				      B1  SJ%CMC  core dump
				      B2  SJ%CM6  SIXBIT
				      B3  SJ%CMA  ANSI ASCII
				      B4  SJ%CM8  industry compatible
				      B5  SJ%CMH  high density mode

		       3     .MOTRK   Recording track flags (returned)

				      Bit Symbol  Meaning

				      B1  SJ%7TR  7-track drive
				      B2  SJ%9TR  9-track drive

			4    .MOCST   Tape status flags (returned)

				      Bit Symbol  Meaning

				      B0  SJ%OFS  off line
				      B1  SJ%MAI  maintenance	     mode
						  enabled
				      B2  SJ%MRQ  maintenance	     mode
						  requested
				      B3  SJ%BOT  beginning of tape
				      B4  SJ%REW  rewinding
				      B5  SJ%WLK  write locked

			5    .MODVT   Device type (returned)

				      Code	  Symbol Meaning

				       3  .MTT45  TU45 (system default)
				      17  .MTT70  TU70
				      20  .MTT71  TU71
				      21  .MTT72  TU72
				      13  .MTT77  TU77
				      19  .MTT78  TU78

		       The JFN need not be open for this function.

    40	     .MOOFL    Enable interrupts for  online/offline  transition.
		       Allows  a  process to be interrupted if a magnetic
		       tape drive's state changes from online to  offline
		       or   vice-versa	 and   when  a	rewind	operation
		       completes.  This function must be  performed  once
		       for  each  drive  for  which  interrupts are to be
		       enabled.   If  multiple	drives	are  enabled  for
		       interrupts,  then  a  .MOSTA  function  should  be
		       performed (for each drive) before  interrupts  for
		       the  drives  are enabled.  Then, when an interrupt
		       occurs, .MOSTA can be performed for each drive and
		       the  current  status of that drive can be compared
		       against the previous  status.   Thus,  it  can  be
		       determined which drive (or drives) interrupted.

		       This   function	 rquires   OPERATOR   or    WHEEL
		       capability.   The  JFN  need  not be open for this
		       function.

    42	     .MOPST    Declares the software interrupt channel to be used
		       by  the monitor to indicate that the UTL labels at
		       the end-of-volume or the UHL labels at  the  start
		       of the new volume are available.  If this MTOPR is
		       not  performed  before  an  EOV	 label	 set   is
		       encountered,  the  user	program will not be given
		       the opportunity to process the UTL or  UHL  labels
		       during the volume switch operation.

		       AC3 contains the PSI channel number to  set.   The
		       channel can be cleared by using -1 in AC3.

		       This function is for labeled tapes only.

    43	     .MORVL    Rewind current labeled tape volume.  This function
		       is for labeled tapes only.

    44	     .MOVLS    Switch volumes for an unlabeled multi-volume set.
		       If  an  unlabeled  tape	is   mounted   specifying
		       multiple  volumes  in  the volume set, the monitor
		       will not automatically perform a volume switch  at
		       the  end  of each volume.  The .MOVLS function may
		       be issued in such  a  case  to  perform	a  volume
		       switch.	This function is legal only for unlabeled
		       MT devices.

		       AC3 contains the  address  of  an  argument  block
		       having the following format:

		       Word   Contents

			0     count of words in block including this word
			1     flags,,function code
			2     argument (if required)

			      Available functions are:

			      Word  Symbol  Function

			       1    .VSMNV  mount absolute volume  number
					    (volume  number  in word 2 of
					    the argument block)
			       2    .VSFST  mount first volume in set

			       3    .VSLST  mount last volume in set
			       4    .VSMRV  mount relative volume  number
					    (volume  number  in word 2 of
					    the  argument  block).    For
					    .VSMRV,  the argument in word
					    2 of the  argument	block  is
					    the volume number relative to
					    the current mounted volume to
					    mount.    For   example,   if
					    volume   #2   is	currently
					    mounted    and    .VSMRV   is
					    performed with 2 in word 2 of
					    the   argument   block,  then
					    volume  4  will  be  mounted.
					    Specifying 1 in word 2 of the
					    argument block will mount the
					    next volume in the set.
			       5    .VSFLS  force   volume   switch   for
					    labeled  tape.  This function
					    is only for tapes  for  which
					    .MOSDS  has  previously  been
					    set.

    45	     .MONTR    Set no translate.

		       Sets or clears the EBCDIC to ASCII translate flag.
		       If the flag is set and the tape file being read is
		       from an IBM EBCDIC volume, then all data delivered
		       to the user program will be in its original EBCDIC
		       form.  If the flag is not set,  and  the  file  is
		       from an IBM EBCDIC volume, then all data delivered
		       to the user program will be in ASCII.  In order to
		       perform	this translation, certain information may
		       be lost (as the EBCDIC character set contains  256
		       codes  while the ASCII character set contains only
		       128 codes - see	Appendix  A  for  ASCII-to-EBCDIC
		       conversions).   Note that the setting of this flag
		       has no effect on the data delivered  by	the  MTU%
		       JSYS.	This  setting  applies	until  explicitly
		       changed	or  until  the	MT  is	dismounted.   The
		       default value of the flag is "clear" (translate).

|		       If AC3 is zero, the translate flag is cleared.  If
|		       AC3 is negative, the translate flag is set.

|		       This function is for labeled tapes only.  The  JFN
|		       need not be open for this function.

    46	     .MORDL    Read user header  labels.   Labels  must  be  read
		       immediately  after  the file is opened (and before
		       the first input is requested) or  after	a  volume
		       switch  has occurred and the volume switch PSI has
		       been generated.	.MORDL may be used to read either
		       the  UHL or UTL labels.	User header labels may be
		       read only if  the  file	is  opened  for  read  or
		       append.	 The  labels  may  be  a  maximum  of  76
		       characters long.

		       User trailer labels may be read at any  time.   If
		       the  program requests to read user trailer labels,
		       the tape will be positioned  to	the  EOF  trailer
		       section.

		       AC3 contains  a	byte  pointer  to  the	area  for

		       receiving the label.

		       On a successful	return,  AC2  contains	the  user
		       label   identifier.    This   will  be  the  ASCII
		       character following the UHL or the UTL.	AC3  will
		       contain an updated byte pointer.

		       This function is for labeled tapes only.

    47	     .MOWUL    Write user header labels or user  trailer  labels.
		       User  header  labels may be written only after the
		       file is opened (and  before  the  first	write  is
		       performed)  or when a PSI is generated, indicating
		       that a volume switch has  occurred.   User  header
		       labels  may  be written only if the file is opened
		       for write access.

		       User trailer labels may be read or written at  any
		       time.   If  the	program  requests  to  write user
		       trailer labels, the file will be  terminated  with
		       an  EOF trailer section.  Once user trailer labels
		       are written in this manner, no more  data  may  be
		       read or written.

		       User trailer labels may also be written	during	a
		       volume  switch  sequence.  Once the PSI indicating
		       EOV has been received, the user program may  write
		       a  UTL  label  into the EOV trailer section.  This
		       operation must be performed at interrupt level.

		       AC3 contains a byte pointer to the label contents.
		       This  string  must  contain  76 bytes of data (the
		       monitor will use only the first	76  bytes).   AC4
		       contains   a  label  identifier	code  (any  ASCII
		       character).

		       It is possible to encounter EOT while writing  the
		       first  UTL in the EOF trailer set.  This can occur
		       if the last data write overwrote the EOT mark.  In
		       this  instance,	the user program will receive the
		       EOV PSI from  within  the  code	writing  the  UTL
		       labels  for  the  file.	 It  is  not  possible to
		       receive an  EOV	PSI  while  writing  the  trailer
		       labels in the EOV set.

		       This function is for labeled tapes only.

    50	     .MORLI    Reads  the  available  fields  from  the  standard
		       volume and header labels.

		       AC3 contains a pointer to an argument block of the
		       form:

		       Word	Contents

			0	count of words in block
			1	word to store label type of this tape

				Value	Symbol	 Label Type

				  1	.LTUNL	 Unlabeled
				  2	.LTANS	 ANSI
				  3	.LTEBC	 EBCDIC
				  4	.LTT20	 TOPS-20

			2	byte pointer to area for  storing  volume
				name string
			3	byte pointer to area  for  storing  owner
				name string
			4	word  to   store   tape   format   (ASCII
				character)
			5	word to store record length
			6	word to store block length
			7	word to store creation date (in  internal
				format)
			10	word  to  store   expiration   date   (in
				internal  format).   Returns a -1 in this
				word if the date is invalid.
			11	byte pointer to  area  for  storing  file
				name string
			12	word to store generation number
			13	word to store version number
			14	word to store  mode  value  (form-control
				value).    The	 possible  modes  are  as
				follows:

				Mode
				Value	  Meaning

				space	  no line format characters are
					  present
				  A	  FORTRAN format control
					  characters are present
				  M	  All necessary line format
					  characters are present
				  X	  Data in stream mode

		       The user specifies only the block  count  and  the
		       byte  pointers;	the remaining values are returned
		       by the monitor.	If a zero is substituted for  any
		       of  the	byte pointers, then the associated string
		       is not returned.

		       This function is normally issued when the  JFN  is
		       open.   If issued when the JFN is closed, only the
		       first 3 words of the argument block are	returned.
		       If  the	tape is unlabeled, only the first word of
		       the argument block is returned.	For labeled tapes
		       only.

    51	     .MOSMV    Declares the value to be placed in the DEC-defined
		       "form-control"  field  in  the  HDR2  label.  This
		       field is not defined  in  the  ANSI  standard  but
		       should  be  specified  whenever	the  data file is
		       meant to be read with DEC-supplied software.  This
		       function merely declares the value to be placed in
		       the   label.    It   is	 the	user	program's
		       responsibility  to produce records that conform to
		       the declared mode.

		       AC3 contains one of the following modes:

		       Value	 Symbol    Mode

			 0	 .TPFST    X - (stream mode)
			 1	 .TPFCP    M - (all formatting control
					   present)
			 2	 .TPFFC    A - (FORTRAN control present)
			 3	 .TPFNC    space - (no controls present)

		       This function is for labeled tapes only.

    52	     .MOSDS    Set deferred volume switch.  Inhibits the  monitor
		       from doing an automatic volume switch and allows a
		       program	to  write  its	own  trailer  information
		       beyond	the   physical	end-of-tape  mark.   This
		       function is intended for labeled MT  devices  open
		       for writing in DUMP mode.
|
|   53	     .MOIRB    Return  the  block  status  of	the   DUMP   mode
|		       operation.   A  0  is returned if the request will
|		       not block, and a non-0 is returned if the  request
|		       will block.

   PLPT Functions

   The	functions  available  for  physical  line  printers  (PLPT)   are
   described  below.   Some  of  these functions accept the address of an
   argument block in AC3.  The first word of the argument block  contains
   the length (including this word) of the block.  Remaining words of the
   block contain arguments for the particular function.

   Code      Symbol    Meaning

    27	     .MOPSI    Enable for a software interrupt on nonfatal device
		       conditions.  Examples of these conditions are:

		       1.  Device changed from offline to online.
		       2.  Device changed from online to offline.
		       3.  Device's page counter has overflowed.

		       Other device errors or software conditions are not
		       handled	by  this  function;  instead they cause a
		       software interrupt on channel 11 (.ICDAE).

		       Argument Block:

|		       Word  Contents
|
|			0    word count including this word
|			1    interrupt channel number
|			2    flags.  The following flag is defined:

			     B0(MO%MSG)   Suppress  standard  CTY  device
					  messages.

    31	     .MONOP    Wait for all  activity  to  stop.   This  function
		       blocks  the  process  until  all data has actually
		       been sent to the printer  and  has  been  printed.
		       Because this function is transferring data, it can
		       return an IOX5 data error.

    32	     .MOLVF    Load the line printer's VFU  (Vertical  Formatting
		       Unit)  from  the  file  indicated  in the argument
		       block.

		       Argument Block:

|		       Word  Contents
|
|			0    word count including this word
|			1    JFN of the file containing the VFU

		       The system opens the file for input  with  a  byte

		       size  of 18 bits.  It closes the file and releases
		       the JFN when the loading of the VFU is complete.

    33	     .MORVF    Read the name of the current VFU  file  stored  in
		       the monitor's data base.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    pointer to destination area for  ASCIZ  name
|			     string
|			2    number of bytes in destination area

    35	     .MOLTR    Load the line printer's	translation  RAM  (Random
		       Access  Memory)	from  the  file  indicated in the
		       argument block.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    JFN of the file containing  the  translation
|			     RAM

		       The system opens the file for input  with  a  byte
		       size  of 18 bits.  It closes the file and releases
		       the JFN when the loading of the translation RAM is
		       complete.

    35	     .MORTR    Read the name of the current translation RAM  file
		       stored in the monitor's data base.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    pointer to destination area for  ASCIZ  name
|			     string
|			2    number of bytes in destination area

    36	     .MOSTS    Set the status of the line printer.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    software status  word,  with  the	following
|			     status bits settable by the caller:

			     B0(MO%LCP)   Set line printer as a lowercase
					  printer.

			     B12(MO%EOF)  Set bit MO%EOF in  the  printer
					  status  word when all data sent
					  to printer  has  actually  been
					  printed.   The  status word can
					  be  obtained	with  the  .MORST
					  function.

			     B14(MO%SER)  Clear   the	software    error
					  condition  on the line printer.
					  This condition  usually  occurs
					  on a character interrupt.

			     Other status  bits  can  be  read	with  the
			     .MORST  function  (see  below) but cannot be
			     set by the caller.

|			2    value for page counter register.  The caller
|			     can  indicate  the  number  of  pages  to be
|			     printed by specifying a value of  up  to  12
|			     bits  (4096).  Each time the printer reaches
|			     the top of a new  page,  it  decrements  the
|			     value  by one.  When the value becomes zero,
|			     the  printer  sets  status  bit  MO%LPC  and
|			     generates	 an   interrupt   if  the  .MOPSI
|			     function was given previously.
|
|			     If the caller specifies a value of 0 in  the
|			     register,	the system will maintain the page
|			     counter and will not generate  an	interrupt
|			     to  the caller when the page counter becomes
|			     zero.
|
|			     If the caller specifies a value of -1 in the
|			     register, the value will be ignored.

    37	     .MORST    Read the status of the line printer.   The  status
		       is  obtained from the front end, and the caller is
		       blocked until it receives the status.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    status  word.   The   following   bits   are
|			     defined:

			     B0(MO%LCP)   Line printer is  a  lower  case
					  printer.   This bit is set only
					  if a .MOSTS function	declaring
					  the	printer  lower	case  was
					  executed previously.

			     B1(MO%RLD)   Front end  has  been	reloaded.
					  This	bit  is reset to zero the
					  next	time  any  I/O	 activity
					  begins for the line printer.

			     B10(MO%FER)  A    fatal	hardware    error
					  occurred.	This	condition
					  generates a software	interrupt
					  on channel 11 (.ICDAE).

			     B12(MO%EOF)  All data sent  to  printer  has
					  actually been printed.

			     B13(MO%IOP)  Output to the line  printer  is
					  in progress.

			     B14(MO%SER)  A   software	  error    (e.g.,
					  interrupt    character,    page

					  counter overflow) occurred.

			     B15(MO%HE)   A  hardware	error	occurred.
					  This error generates a software
					  interrupt   on    channel    11
					  (.ICDAE).	This	condition
					  usually requires that the forms
					  be realigned.

			     B16(MO%OL)   Line printer is offline.   This
					  bit is set on the occurrence of
					  any  hardware  condition   that
					  requires operator intervention.

			     B17(MO%FNX)  Line printer does not exist.

			     B30(MO%RPE)  A RAM parity error occurred.

			     B31(MO%LVU)  The line printer has an optical
					  (12-channel tape reader) VFU.

			     B33(MO%LVF)  A  VFU  error  occurred.    The
					  paper has to be realigned.

			     B34(MO%LCI)  A character interrupt occurred.
					  This	 generates   a	 software
					  interrupt   on    channel    11
					  (.ICDAE).

			     B35(MO%LPC)  The page counter  register  has
					  overflowed.

			     Bits 2-17 contain the software  status  word
			     from  the	front end, and bits 20-35 contain
			     the hardware status word.

|			2    value of page counter register.  A value  of
|			     -1 indicates the printer has no page counter
|			     value defined.

    40	     .MOFLO    Flush any line printer output  that  has  not  yet
		       been printed.
   PCDP Functions

   The functions available for physical card punches (PCDP) are described
   below.  Like the PLPT functions, these functions accept the address of
   an argument block in AC3.  The first word of the  block  contains  the
   length  (including  this  word)  of the block.  Remaining words in the
   block contain arguments for the particular function.

   Code      Symbol		 Meaning

    27	     .MOPSI    Enable for a software interrupt on nonfatal device
		       conditions.  Examples of these conditions are:

		       1.  Device changed from offline to online.

		       2.  Device changed from online to offline.

		       Other device errors or software conditions are not
		       handled	by  this  function;  instead they cause a
		       software interrupt on channel 11 (.ICDAE).

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    interrupt channel number
|			2    flags.  The following flag is defined:

			     B0(MO%MSG)   Suppress  standard  CTY  device
					  messages.

    37	     .MORST    Read the status of the card punch.  The status  is
		       obtained  from  the  front  end, and the caller is
		       blocked until it receives the status.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    status word.  Bits 2-17 contain the software
|			     status  word  from  the  front end, and bits
|			     20-35 contain the hardware status word.

			     B10(MO%FER)  Fatal error condition
			     B12(MO%EOF)  All  pending	output	has  been
					  processed
			     B13(MO%IOP)  Output in progress
			     B14(MO%SER)  Software  error  has	 occurred
					  (would generate an interrupt on
					  an assigned channel)
			     B15(MO%HE)   Hardware  error  has	 occurred
					  (would  generate  interrupt  on
					  channel .ICDAE)
			     B16(MO%OL)   Card punch  is  offline.   This
					  bit	is   set   when  operator
					  intervention is required  (card
					  jam,	hopper	empty, or stacker
					  full).
			     B17(MO%FNX)  Card punch doesn't exist
			     B32(MO%HEM)  Hopper is empty or  stacker  is
					  full
			     B33(MO%SCK)  Stack check
			     B34(MO%PCK)  Pick check
			     B35(MO%RCK)  Read check
   PCDR Functions

   The functions available for physical card readers (PCDR) are described
   below.   These  functions  accept  the address of an argument block in
   AC3.  The first word of the block contains the length (including  this
   word)  of  the  block.  Remaining words in the block contain arguments
   for the particular function.

   Code      Symbol		 Meaning

    27	     .MOPSI    Enable for a software interrupt on nonfatal device
		       conditions.  Examples of these conditions are:

		       1.  Device changed from offline to online.

		       2.  Device changed from online to offline.

		       Other device errors or software conditions are not
		       handled	by  this  function;  instead they cause a
		       software interrupt on channel 11 (.ICDAE).

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    interrupt channel number
|		       2     flags.  The following flag is defined:

			     B0(MO%MSG)   Suppress  standard  CTY  device
					  messages.

    37	     .MORST    Read the status of the card reader.  The status is
		       obtained  from  the  front  end, and the caller is
		       blocked until it receives the status.

		       Argument Block

|		       Word  Contents
|
|			0    word count including this word
|			1    status word.   B2-17  contain  the  software
|			     status  word  from the front end, and B20-35
|			     contain the hardware status word.

			     B0(MO%COL)   Card reader is on  line.   This
					  bit  is  not	obtained from the
					  front end.

			     B1(MO%RLD)   Front end  has  been	reloaded.
					  This	bit  is reset to zero the
					  next time I/O  activity  begins
					  for the card reader.

			     10(MO%FER)   A    fatal	hardware    error
					  occurred.	This	condition
					  generates a software	interrupt
					  on channel 11 (.ICDAE).

			     B12(MO%EOF)  Card reader is at end of file.

			     B13(MO%IOP)  Input from the card  reader  is
					  in progress.

			     B14(MO%SER)  A   software	  error    (e.g.,
					  interrupt character) occurred.

			     B15(MO%HE)   A    fatal	hardware    error
					  occurred.  This error generates
					  a software interrupt on channel
					  11 (.ICDAE).

			     B16(MO%OL)   Card reader is off line.   This
					  bit is set on the occurrence of
					  any  hardware  condition   that
					  requires operator intervention.

			     B17(MO%FNX)  Card reader does not exist.

			     B31(MO%SFL)  The output stacker is full.

			     B32(MO%HEM)  The input hopper is empty.

			     B33(MO%SCK)  A card did not stack	correctly
					  in the output stacker.

			     B34(MO%PCK)  The card reader failed to  pick
					  a card correctly from the input
					  hopper.

			     B35(MO%RCK)  The card reader detected a read
					  error when reading a card.

 

   PTY Functions

   The functions  available  for  pseudo-terminals  (PTY)  are	described
   below.   Some  of  these functions accept arguments in AC3.	(Refer to
   the individual descriptions.)

   Code      Symbol		 Meaning

    24	     .MOAPI    Assign  PTY  interrupt  channels.   This  function
		       requires AC2 to contain
		       B0(MO%WFI)      enable waiting-for-input interrupt
		       B1(MO%OIR)      enable output-is-ready interrupt
		       B12-17(MO%SIC)  software interrupt channel  number
				       for   output   to  the  PTY.   The
				       channel number used for input from
				       the  PTY  is  one greater than the
				       channel number used for output  to
				       the PTY.
		       B18-35	       function code

    25	     .MOPIH    Determine if PTY job needs input.  On a successful
		       return,	AC2  contains 0(.MONWI) if PTY job is not
		       waiting for input or contains  -1(.MOWFI)  if  PTY
		       job is waiting for input.

    26	     .MOBAT    Set batch control bit.  This function requires AC3
		       to  contain  0(.MONCB)  if  the	job  is not to be
		       controlled by batch or to contain 1(.MOJCB) if the
		       job  is to be controlled by batch.  To obtain this
		       value, the process can  execute	the  GETJI  JSYS,
		       function .JIBAT.

 
   TTY Functions

   Code      Symbol    Meaning

    25	     .MOPIH    Determine if TTY job needs input.  On a successful
		       return,	AC2  contains 0(.MONWI) if TTY job is not
		       waiting for input or contains  -1(.MOWFI)  if  TTY
		       job is waiting for input.

    26	     .MOSPD    Set  the  terminal  line  speed.   This	 function
		       accepts in AC3 the desired line speed (input speed
		       in the left half and output  speed  in  the  right
		       half).	The  left  half of AC2 contains flag bits
		       indicating  the	type  of  line	being  set.    If
		       B0(MO%RMT)  is  on, the line is a remote (dataset)
		       line.  If B1(MO%AUT) is on, the line is	a  remote
		       autobaud  line  (is automatically set at 300 baud,
		       and the contents of AC3 are ignored.  The  process
		       must  have WHEEL or OPERATOR capability enabled to
		       set B0(MO%RMT) and B1(MO%AUT).  In addition, these
		       bits  can  only	be  set  at  start-up time.  They
		       cannot be set during timesharing.)

    27	     .MORSP    Return the terminal line speed.	On  a  successful
		       return,	left  half  of	AC2  contains  flag  bits
		       indicating the type of line, and AC3 contains  the
		       speed  (input  speed  in  the left half and output
		       speed in the right half).  If B0(MO%RMT) of AC2 is
		       on,  the  line is a remote line, and if B1(MO%AUT)
		       is on, the line is a remote  autobaud  line.   AC3
		       contains  the speed or contains -1 if the speed is
		       unknown or is not applicable.

    30	     .MORLW    Return the terminal page width.	On  a  successful
		       return, AC3 contains the width.

    31	     .MOSLW    Set  the  terminal  page  width.   This	 function
		       requires AC3 to contain the desired width.

    32	     .MORLL    Return the terminal page length.  On a  successful
		       return, AC3 contains the length.

    33	     .MOSLL    Set  the  terminal  page  length.   This  function
		       requires AC3 to contain the desired length.

    34	     .MOSNT    Specify if  terminal  line  given  in  AC1  is  to
		       receive	system	messages.  This function requires
		       AC3 to contain 0 (.MOSMY) to allow messages  or	1
		       (.MOSMN) to suppress messages.

    35	     .MORNT    Return a code indicating if terminal line given in
		       AC1   is   to   receive	system	messages.   On	a
		       successful return,  AC3	contains  0  (.MOSMY)  if
		       messages are being sent to this line or 1 (.MOSMN)
		       if messages are being suppressed to this line.

    36	     .MOSIG    Specify if input on this terminal line  is  to  be
		       ignored	when  the  line is inactive (i.e., is not
		       assigned or opened).  This function  requires  AC3
		       to  contain  0  if characters on this line are are
		       not to be ignored or 1 if characters on this  line
		       are  to	be  ignored.  When input is being ignored
		       and characters are  typed,  no  CTRL/G  (bell)  is
		       sent,  as  is  the normal case when characters are
		       typed on an inactive line.

    37	     .MORBM    Read the 128-character break mask.   The  argument
		       block  (filled  in  by monitor) is the same as for
		       .MOSBM (below).

    40	     .MOSBM    Set the 128-character break mask.

		       Argument Block:

		       E:    0,,4
		       E+1-E+4: character mask.  The leftmost 32 bits  of
				each  consecutive  word correspond to the
				ASCII character set in	ascending  order.
				For  example,  1B0  in	word  E+1 (of the
				argument block) corresponds to ASCII code
				000  (null),  1B1 in word E+1 corresponds
				to ASCII code 001 (SOH).  Bits	32-35  of
				each word must be zero.

    41	     .MORFW    Return the current value of  the  field	width  in
		       AC3.   Note  that  this may be less than the value
		       last set by .MOSFW.  If the field width is set  to

		       value  X  and  two  characters are read before the
		       .MORFW is executed, the	value  returned  will  be
		       X-2.   A  zero  returned  in AC3 indicates that no
		       field width is now in effect.

    42	     .MOSFW    Set the field width to the value in AC3.   A  zero
		       indicates that no field width is in effect.

    43	     .MOXOF    Enable/disable  pause-at-end-of-page  mode.   This
		       function  controls  the TOPS-20 feature that sends
		       exactly n  lines  of  data  to  the  terminal  and
		       suspends  data  transmission  (n  is  the terminal
		       length parameter, set by  function  .MOSLL).   The
		       user  may  manually  resume  data  transmission by
		       typing ^Q.

		       AC3 contains one of the following values:

		       0     .MOOFF Disable pause-at-end-of-page mode
		       1     .MOONX Enable pause-at-end-of-page mode

		       Note that this feature operates	independently  of
		       the  pause-on-command  mode implemented in the JFN
		       mode word (see bit TT%PGM of the JFN mode word).

    44	     .MORXO    Read the end-of-page mode.  This function returns,
		       in  AC3,  a one if PAUSE ON END-OF-PAGE is set for
		       the terminal, a zero otherwise.

    45	     .MOSLC    Set the terminal's line counter to value  in  AC3.
		       This   counter	is  incremented  by  the  monitor
		       everytime a linefeed is output  to  the	terminal.
		       The  monitor  clears this counter only when a line
		       becomes active.

    46	     .MORLC    Read the terminal's line counter and  return  with
		       its value in AC3.

    47	     .MOSLM    Set line  maximum  to  the  value  in  AC3.   This
		       function  sets  the  maximum  value  of	the  line
		       counter seen so far.   The  monitor  compares  the
		       line   counter  with  the  maximum  every  time	a
		       linefeed is typed, and if the line  counter  value
		       is  larger,  the  monitor sets the line maximum to
		       the value of the line counter.  When  TEXTI  moves
		       the  cursor  up on screen terminals, it decrements
		       the line counter.

    50	     .MORLM    Read the current value of  the  line  maximum  and
		       return with its value in AC3.

    51	     .MOTPS    Assign terminal interrupt channels.  An	interrupt
		       will  be  generated if a character is input, or an
		       output-buffer-empty condition occurs on output.

		       AC3 contains the address of  a  two-word  argument
		       block.	The  first word of the block contains the
		       number of words in the block (2), and  the  second
		       word  of the block contains the following:  output
		       PSI channel,,input  PSI	channel.   All	input  or
		       output  PSI  channels for the terminal are cleared
		       by placing a -1 in the appropriate half,  or  both
		       halves, of word 2 of the argument block.

    52	     .MOPCS    Set the	pause  and  unpause  characters  for  the
		       terminal.  This function requires that AC3 contain
		       the pause character in  the  left  half,  and  the
		       unpause	(continue-after-pause)	character  in the
		       right half.  The characters can be the  same,  but
		       should not be CTRL/Q or CTRL/S.

    53	     .MOPCR    Read    the    terminal	  pause    and	  unpause
		       (continue-after-pause)  characters.  This function
		       returns, in AC3, the pause character in	the  left
		       half, and the unpause character in the right half.
|
|   54	     .MORTF    Read the setting of  various  terminal  functions.
|		       This function returns the settings in AC3.
|		       B34(MO%NUM)     All   nonprivileged   SENDs    are
|				       refused.
|		       B35(MO%NTM)     All messages are refused.
|
|   55	     .MOSTF    Set or  clear  the  setting  of	various  terminal
|		       functions.   This function accepts the settings in
|		       AC3.
|		       B34(MO%NUM)     Refuse all nonprivileged SENDs.
|		       B35(MO%NTM)     Refuse all messages (SENDs, LINKs,
|				       nonprivileged  ADVICE,  privileged
|				       BOUTs and SOUTs).  Implements  the
|				       TERMINAL INHIBIT Command.

*   56	     .MOTCE    Set two-character escape sequence.  This  function
*		       requires  that  AC3 contain the 2-character escape
*		       sequence, right justified.  Neither character  can
*		       be  a  null,  and  the  2 characters cannot be the
*		       same.
*
*   57	     .MORTC    On  return,  contains   the   2-character   escape
*		       sequence, right justified.
*
*   60	     .MOCTM    Is  this  a  terminal  that  communicates  with	a
*		       processor using the CTERM protocol?  This function
*		       returns a 1 in AC3 if  the  terminal  is  a  CTERM
*		       terminal;  otherwise, it returns 0.
*
*   61	     .MOTXT    Set up for remote  TEXTI%  call.   Call	with  AC3
*		       containing  flags,,length,  where  flags  have the
*		       same format as  the  .RDFLG  word  in  the  TEXTI%
*		       monitor	call, and length is the maximum length of
*		       the  read.   The  following  flags  are	the  only
*		       significant ones:
*			     RD%RIE	  return if input buffer is empty
*			     RD%RAI	  raise input
*			     RD%NED	  disable some editing characters

   Generates an illegal instruction interrupt on error conditions below.

   MTOPR ERROR MNEMONICS:

   ANTX01:   No more network terminals available
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX9:    Invalid operation for this device
   DEVX2:    Device already assigned to another job
   IOX4:     End of labels encountered

   IOX5:     Device or data error
   MTOX1:    Invalid function
   MTOX2:    Record size was not set before I/O was done
   MTOX3:    Function not legal in dump mode
   MTOX4:    Invalid record size
   MTOX5:    Invalid hardware data mode for magnetic tape
   MTOX6:    Invalid magnetic tape density
   MTOX7:    WHEEL or OPERATOR capability required
   MTOX8:    Argument block too long
   MTOX9:    Output still pending
   MTOX10:   VFU or RAM file cannot be OPENed
   MTOX11:   Data too large for buffers
   MTOX12:   Input error or not all data read
   MTOX13:   Argument block too small
   MTOX14:   Invalid software interrupt channel number
   MTOX15:   Device does not have Direct Access (programmable) VFU
   MTOX16:   VFU or Translation RAM file must be on disk
   MTOX17:   Device is not on line
   MTOX18:   Invalid software interrupt channel number
   MTOX19:   Invalid terminal line width
   MTOX20:   Invalid terminal line length
*  MTOX21:   Illegal two-character escape sequence
   TTYX01:   Line is not active



			     MTU%     JSYS 600

   Allows privileged programs to perform various  utility  functions  for
   magnetic-tape  MT:  devices.  This JSYS differs from the MTOPR JSYS in
   that the invoking program need not have a JFN on the MT  nor  need  it
   even  have access to the MT.  It is used by MOUNTR to declare a volume
   switch error and by the access-control program (user supplied) to read
   file and volume labels.

   RESTRICTIONS:    Requires enabled WHEEL or OPERATOR capabilities

   ACCEPTS IN AC1:  function code

	      AC2:  MT unit number

	      AC3:  address of argument block

   RETURNS     +1:  always

   The functions and associated argument blocks are as follows:

   Code      Symbol    Function

|   1	     .MTNVV    Declare volume switch error

		       Argument Block:

		       Word   Symbol		    Contents

			 0    .MTCNT   count of words in block
			 1    .MTCOD   error code to return to user
			 2    .MTPTR   byte pointer to operator response

    2	     .MTRAL    Read labels

		       Argument Block:

		       Word   Symbol		    Contents

			 0    .MTCNT   count of words in block
			 1    .MTVL1   byte pointer to area to hold  VOL1
				       label
			 2    .MTVL2   byte pointer to area to hold  VOL2
				       label
			 3    .MTHD1   byte pointer to area to hold  HDR1
				       label
			 4    .MTHD2   byte pointer to area to hold  HDR2
				       label

		       If  any	of  the  byte  pointers  is   zero,   the
		       associated string is not returned.

		       The  label  values  are	always	returned  without
		       translation.   For  example,  if  the  tape  is an
		       EBCDIC labeled tape, the  returned  data  will  be
		       EBCDIC data.

    3	     .MTASI    return assignment information

		       Argument Block:

		       Word   Symbol		    Contents

			 0    .MTCNT   count of words in block
			 1    .MTPHU   returned  MTA  number   associated
				       with  the  MT.	If  there  is  no
				       association, .MTNUL is returned.

		       This function is used by MOUNTR	to  determine  if
		       there are any existing MT to MTA associations.

    4	     .MTCVV    Clear the volume ID for	the  specified	MT  unit.
		       This  request  will fail if the MT is opened or if
		       the  volume  belongs  to  a  labeled  volume  set.
		       Requires  WHEEL	or OPERATOR capabilities enabled.
		       There is no argument block.

   MTU% ERROR MNEMONICS:

   ARGX04:   Argument block too small
   ARGX05:   Argument block too long
   CAPX1:    WHEEL or OPERATOR capability required
   DESX1:    Invalid source/destination designator
   DESX9:    Invalid operation for this device
   IOX8:     Monitor internal error
   OPNX1:    File is already open
   OPNX8:    Device is not on line


			     MUTIL     JSYS 512

   Performs   various	IPCF   (Inter-Process	Communication	Facility)
   functions,  such  as  enabling and disabling PIDs, assigning PIDs, and
   setting quotas.  Refer to the TOPS-20 Monitor Calls User's  Guide  for
   an	overview  and  description  of	the  Inter-Process  Communication
   Facility.

   RESTRICTIONS:    some  functions  require  WHEEL,  OPERATOR,  or  IPCF
		    capability enabled

   ACCEPTS IN AC1:  length of argument block

	      AC2:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success.  Responses from the requested  function  are
		    returned in the argument block.

   The format of the argument block is as follows:

	Word	       Meaning

	  0	       Code of desired function.  (See below.)
	1 through n    Arguments   for	 the   desired	 function.    The
		       arguments, which depend on the function requested,
		       begin in word 1 and are given in the  order  shown
		       below.	Responses from the requested function are
		       returned in these words.

   The available functions, along with	their  arguments,  are	described
   below.

   Code      Symbol		      Meaning

     1	     .MUENB    Enable the specified PID to receive packets.   The
		       PID  must  have	been created by the caller's job.
		       Also, if the calling process was not  the  creator
		       of the PID, the no-access bit (IP%NOA) must be off
		       in the IPCF packet descriptor block.

		       Argument

			  PID

     2	     .MUDIS    Disable the specified PID from receiving  packets.
		       The  PID  must  have  been created by the caller's
		       job.  Also, if the calling  process  was  not  the
		       creator	of  the  PID,  the no-access bit (IP%NOA)
		       must be off in the IPCF packet descriptor block.

		       Argument

			  PID

     3	     .MUGTI    Return the PID associated with <SYSTEM>INFO.   The
		       PID is returned in word 2 of the argument block.

		       Argument

			  PID or job number

     4	     .MUCPI    Create a private  copy  of  <SYSTEM>INFO  for  the
		       specified   job.    The	 caller  must  have  IPCF
		       capability enabled.

		       Arguments

			  PID to be assigned to <SYSTEM>INFO
			  PID or number of job creating private copy

     5	     .MUDES    Delete the specified PID.  The caller must own the
|		       PID  being  deleted.   To  obtain ownership of the
|		       PID, the caller can first use the .MUCHO  function
|		       to assign the PID to the caller's job.

		       Argument

			  PID

     6	     .MUCRE    Creates a PID for the specified	process  or  job.
		       The  flags that can be specified are B6(IP%JWP) to
		       make the PID job wide and  B7(IP%NOA)  to  prevent
		       access  to  PID	from other processes.  The caller
		       must have  IPCF	capability  enabled  if  the  job
		       number  given  is not that of the caller.  The PID
		       created is returned in  word  2	of  the  argument
		       block.	If a job number is specified, the created
		       PID will belong to the top fork of the job.

		       Argument

			  flags,,process handle or job number

     7	     .MUSSQ    Set send and receive quotas for the specified PID.
		       The caller must have IPCF capability enabled.  The
		       new send quota is given in  B18-26,  and  the  new
		       receive	quota  is  given  in B27-35.  The receive
		       quota applies to the specified PID, but	the  send
		       quota  applies  to  the	job  to  which	that  PID
		       belongs.

		       Arguments

			  PID
			  new quotas

     10      .MUCHO    Change  the  job  number   associated   with   the
		       specified   PID.    The	caller	must  have  WHEEL
		       capability enabled.

		       Arguments

			  PID
			  new job number or PID belonging to new job

     11      .MUFOJ    Return  the  job  number   associated   with   the
		       specified PID.  The job number is returned in word
		       2 of the argument block.

		       Argument

			  PID

     12      .MUFJP    Return all PIDs associated with the specified job.
		       Two  words are returned, starting in word 2 of the

		       argument block, for each PID.  The first  word  is
		       the  PID.   The	second word has B6(IP%JWP) set if
		       the PID is job wide and B7(IP%NOA) set if the  PID
		       is not accessible by other processes.  The list is
		       terminated by a 0 PID.

		       Argument

			  job number or PID belonging to that job

     13      .MUFSQ    Return  the  send  and  receive	quotas	for   the
		       specified  PID.	The quotas are returned in word 2
		       of the argument	block  with  the  send	quota  in
		       B18-26  and  the  receive  quota  in  B27-35.  The
		       receive quota applies to the  specified	PID,  but
		       the  send  quota  applies to the job to which that
		       PID belongs.

		       Argument

			  PID

     15      .MUFFP    Return all PIDs associated with the  same  process
		       as  that  of  the specified PID.  The list of PIDs
		       returned  is  in  the  same  format  as	the  list
		       returned for the .MUFJP function (12).

		       Argument

			  PID

     16      .MUSPQ    Set the maximum number of  PIDs	allowed  for  the
		       specified   job.    The	 caller  must  have  IPCF
		       capability enabled.

		       Arguments

			  job number or PID
			  PID quota

     17      .MUFPQ    Return the maximum number of PIDs allowed for  the
		       specified  job.	The PID quota is returned in word
		       2 of the argument block.

		       Argument

			  job number or PID

     20      .MUQRY    Return the Packet Descriptor Block  for	the  next
		       packet  in the queue associated with the specified
		       PID.   An  argument  of	-1   returns   the   next
		       descriptor  block for the process, and an argument
		       of -2 returns the next descriptor  block  for  the
		       job.  The descriptor block is returned starting in
		       word 1 of the argument block.  The calling process
		       and  the  process that owns the specified PID must
		       belong to the same job.

		       Argument

			  PID

     21      .MUAPF    Associate the PID with the specified process.  The
		       calling	process  and  the  process  that owns the

		       specified PID must belong to the same job.

		       Arguments

			  PID
			  process handle

     22      .MUPIC    Place the specified PID on  a  software	interrupt
		       channel.  An interrupt is then generated when:

 
		       1.  The .MUPIC function is issued  while  the  PID
			   has one or more messages in its receive queue.

		       2.  The PID's receive queue changes its state from
			   empty  to  containing  a  message.  Subsequent
			   entries to a queue that is not  empty  do  not
			   cause an interrupt.

 
		       If the channel number is given as -1, the  PID  is
		       removed from its current channel.

		       The calling process and the process that owns  the
		       specified PID must belong to the same job.

		       Arguments

			  PID
			  channel number

     23      .MUDFI    Set the PID of <SYSTEM>INFO.  An error is given if
		       <SYSTEM>INFO  already  has a PID.  The caller must
		       have IPCF capability enabled.

		       Argument

			  PID of <SYSTEM>INFO

     24      .MUSSP    Place the specified PID into the system PID  table
		       at  the given offset.  The caller must have WHEEL,
		       OPERATOR, or IPCF capability enabled.  See  .MURSP
		       for a list of system PIDs.

		       Arguments

			  index into system PID table
			  PID

     25      .MURSP    Return a PID from the system table.   The  PID  is
		       returned  in  word  2  of the argument block.  The
		       system  PID  table  currently  has  the	following
		       entries:

			   0 .SPIPC   Reserved for DEC
			   1 .SPINF   PID of <SYSTEM>INFO
			   2 .SPQSR   PID of QUASAR
			   3 .SPMDA   PID of QSRMDA
			   4 .SPOPR   PID of ORION
|			   5 .SPNSR   PID of NETSER
|			   6 .SPCUS   PID of CUSTOM APPLICATION (used  by
|				      QUEUE%)
|			   7 .SDIPC   PID of DEBUG IPCC (used by QUEUE%)
|			  10 .SDINF   PID of DEBUG <SYSTEM>INFO (used  by

|				      QUEUE%)
|			  11 .SDQSR   PID  of  DEBUG  QUASAR   (used   by
|				      QUEUE%)
|			  12 .SDMDA   PID  of  DEBUG  QSRMDA   (used   by
|				      QUEUE%)
|			  13 .SDOPR   PID of DEBUG ORION (used by QUEUE%)
|			  14 .SDNSR   PID  of  DEBUG  NETSER   (used   by
|				      QUEUE%)
|			  15 .SDCUSf  PID  of  DEBUG  CUSTOM  APPLICATION
|				      (used by QUEUE%)

		       Argument

			  index into system PID table

     26      .MUMPS    Return the system-wide maximum packet  size.   The
		       size is returned in word 1 of the argument block.

     27      .MUSKP    Set PID to receive deleted PID messages.  Allows a
		       controller  task  to  be  notified  if  one of its
		       subordinate tasks crashes.  After this function is
		       performed,  if the subordinate PID is ever deleted
		       (via RESET or  the  .MUDES  MUTIL  function),  the
		       monitor	 will	send   an  IPCF  message  to  the
		       controlling PID notifying it that the  subordinate
		       PID  has  been  deleted.   This	message  contains
		       .IPCKP in word 0 and the deleted PID in word 1.

		       Argument

			  Source (subordinate) PID
			  Object (controller) PID

     30      .MURKP    Return controlling PID for this subordinate PID.

		       Argument

			  Source (subordinate) PID
			  Object (controller) PID (returned)

   MUTIL ERROR MNEMONICS:

   IPCFX2:   No message for this PID
   IPCFX3:   Data too long for user's buffer
   IPCFX4:   Receiver's PID invalid
   IPCFX5:   Receiver's PID disabled
   IPCFX6:   Send quota exceeded
   IPCFX7:   Receiver quota exceeded
   IPCFX8:   IPCF free space exhausted
   IPCFX9:   Sender's PID invalid
   IPCF10:   WHEEL capability required
   IPCF11:   WHEEL or IPCF capability required
   IPCF12:   No free PID's available
   IPCF13:   PID quota exceeded
   IPCF14:   No PID's available to this job
   IPCF15:   No PID's available to this process
   IPCF16:   Receive and message data modes do not match
   IPCF17:   Argument block too small
   IPCF18:   Invalid MUTIL JSYS function
   IPCF19:   No PID for [SYSTEM]INFO
   IPCF20:   Invalid process handle
   IPCF21:   Invalid job number
   IPCF22:   Invalid software interrupt channel number
   IPCF23:   [SYSTEM]INFO already exists

   IPCF24:   Invalid message size
   IPCF25:   PID does not belong to this job
   IPCF26:   PID does not belong to this process
   IPCF27:   PID is not defined
   IPCF28:   PID not accessible by this process
   IPCF29:   PID already being used by another process
   IPCF30:   job is not logged in
   IPCF32:   page is not private
   IPCF33:   invalid index into system PID table
   IPCF35:   Invalid IPCF quota
|  IPCF36:   PID not assigned on this LCS processor



			      NIN     JSYS 225

   Inputs an integer number, with  leading  spaces  ignored.   This  call
   terminates on the first character not in the specified radix.  If that
   character is a carriage return followed by a line feed, the line  feed
   is also input.

   ACCEPTS IN AC1:  source designator

	      AC3:  radix (2-10) of number being input

   RETURNS     +1:  failure, error code in AC3, updated  string  pointer,
		    if pertinent, in AC1

	       +2:  success, number in AC2 and updated string pointer, if
		    pertinent, in AC1

   NIN ERROR MNEMONICS:

   IFIXX1:   Radix is not in range 2 to 10
   IFIXX2:   First nonspace character is not a digit
   IFIXX3:   Overflow (number is equal to or greater than 235)
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open



			     NODE     JSYS 567

   Performs the following network  utility  functions:	 set  local  node
   name,  get  local  node  name,  set	local node number, get local node
   number, set loopback port, clear  loopback  port,  and  find  loopback
   port.

				    NOTE

		  Some of these functions  are	duplicated
		  in  the NTMAN% JSYS, which is preferred.
		  Also, some of the functions can only	be
		  used before DECnet initializes.

 
   RESTRICTIONS:    Some   functions   require	 WHEEL,   OPERATOR,    or
|		    MAINTENANCE capability, or DECnet Phase IV software.

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block

 
   RETURNS     +1:  always.  If an error occurs, an  illegal  instruction
		    trap is generated.

 
   The available functions and their argument blocks are described below.

    Code     Symbol    Function

     0	     .NDSLN    Set local node name

|		       Requires WHEEL  or  OPERATOR  capabilities.   This
|		       function   can	only   be   used   before  DECnet
|		       initializes.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    Byte pointer to ASCIZ node name.

     1	     .NDGLN    Get local node name

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    Byte pointer  to  destination  for
				       ASCIZ name of local node.

     2	     .NDSNM    Set local node number

|		       Requires WHEEL  or  OPERATOR  capabilities.   This
|		       function   can	only   be   used   before  DECnet
|		       initializes.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    Number to set (Phase II:  2 < n	<
				       127;    Phase   III:   from  1  to
				       .NDMAX)

     3	     .NDGNM    Get local node number

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    Returned node number

     4	     .NDSLP    Set loopback port (2020 only)

		       Requires   WHEEL,    OPERATOR	or    MAINTENANCE
		       capabilities.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDPRT    NSP  port  number.    The   .BTCLI
				       function  of the BOOT monitor call
				       converts a line number to  an  NSP
				       port number.

     5	     .NDCLP    Clear loopback port (2020 only)

		       Requires   WHEEL,   OPERATOR,	or    MAINTENANCE
		       capabilities.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDPRT    NSP port number.

     6	     .NDFLP    Find loopback port (2020 only)

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDPRT    NSP port number

				       1B0(ND%LPR) Loopback running
				       1B1(ND%LPA) Loopback port assigned

     7	     .NDSNT    Set network topology.

		       Sets the system's table of reachable nodes.

		       Requires WHEEL or OPERATOR capabilities.

		       Argument Block  for  monitors  prior  to  TOPS-20,
		       Version 5.1:

		       Word  Symbol    Contents

			0    .NDNND    Number of following words in right
				       half.  Left half is reserved.

			1    .NDCNT    Number of words in a node block

			2    .NDBK1    Addresses of N  node  blocks  (one
				       for  each  node	for which updated
				       information is to be  conveyed  to
				       the monitor).

		       Node Block:

		       Word  Symbol    Contents

			0    .NDNAM    Byte pointer to ASCIZ node name

			1    .NDSTA    Node state:

				       .NDSON	  On
				       Add to table of reachable nodes if
				       not already there.

				       .NDSOF	  Off
				       Remove from  table  if  previously
				       there.

			2    .NDNXT    Byte pointer to the DN20 name.

		       Argument Block for TOPS-20, Version 5.1:

		       Word  Symbol    Contents

			0    .NDNNO    Number  of   nodes   reported   in
				       topology message.

			1    .NDMSK    Address of topology message.

		       The topology message is made up	of  8-bit  bytes.
		       The  bytes  are left-justified within the topology
		       message word.  Each byte contains 4 2-bit fields.

		       A two-bit field giving the topology status  for	a
		       node has the following format:

					 00	Node not reachable

					 01	  (reserved)

					 10	Reachable Phase II node

					 11	Reachable Phase III node

		       The bit fields are packed  four	to  a  byte  (see
		       below),	low-order  to high-order.  The first byte
		       represents nodes 4, 3,  2,  1;	the  second  byte
		       represents nodes 10, 7, 6, 5;  and so on.

	  4   3   2   1   10  7   6   5   14  13  12  11  20  17  16  15
	-----------------------------------------------------------------
	!   !	!   !	!   !	!   !	!   !	!   !	!   !	!   !	!
	!   !	!   !	!   !	!   !	!   !	!   !	!   !	!   !	!
	-----------------------------------------------------------------

 
    10	     .NDGNT    Get network topology.

|		       Reads the system's table of  reachable  nodes  for
|		       the local area.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNND    Number of following words  in  the
				       right half (set by the user on the
				       call) and the number of nodes  for
				       which	the    monitor	 actually
				       returned data  in  the  left  half
				       (set by the monitor on return).

			1    .NDCNT    Number of words in  a  node  block
				       (returned).

			2    .NDBK1    Addresses of N  node  blocks  (one
				       for   each   node  for  which  the
				       monitor returned data;  returned).

			     .NDBK1+N  Start of an area  into  which  the
				       monitor	sequentially  placed node
				       blocks  (described   below).    If
				       there  is not enough space to hold
				       all of the information,	the  NODE
				       JSYS  will  return as much data as
				       will fit, and then fail with error
				       code ARGX04.  (Returned)

		       Node Block (Returned):

		       Word  Symbol    Contents

			0    .NDNAM    Byte pointer  to  the  ASCIZ  node
				       name

			1    .NDSTA    Node state

				       Code   Symbol	 Meaning

					0     .NDSON	 On

					1     .NDSOF

			2    .NDNXT    Obsolete (always 0)

			3-4    --      ASCIZ node name (if node name .LE.
				       4 characters, Word 4 NOT returned)

    11	     .NDSIC    Set topology interrupt channel

		       This function is used by a process wishing  to  be
		       notified  that  the  network topology has changed.
		       The program must do the .NDGNT function to  obtain
		       the current topology.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDCHN    Channel number on which interrupts
				       are desired.

    12	     .NDCIC    Clear topology interrupt channel

		       This function is used to  clear	the  request  for
		       interrupt  on  topology	change	(set  by function
		       .NDSIC).

    13	     .NDGVR    Get NSP version number

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNVR    Number of versions returned

			1    .NDCVR    Address of a block  in  which  the
				       NSP communications version will be
				       returned.  (Block format is  shown
				       below.)

			2    .NDRVR    Address of a block  in  which  the
				       NSP   routing   version	 will  be
				       returned.  (Block format is  shown
				       below.)

			Version Block:

			Word Symbol    Contents

			 0   .NDVER    Version number

			 1   .NDECO    ECO number

			 2   .NDCST    Customer change order

    14	     .NDGLI    Get line information

		       Returns information on lines known to NSP.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNLN    Number of following words in right
				       half  (set  by  user  on call) and
				       number  of  lines  (N)  for  which
				       information  was  returned  in the
				       left  half  (set  by  monitor   on
				       return).

			1    .NDBK1    Addresses   of	N    blocks    of
				       information   for  each	line  for
				       which the monitor will return data
				       to  the user.  The format of these
				       blocks is described below.

			     .NDBK1+N  Start of an area  into  which  the
				       monitor	will  sequentially  place
				       line blocks (described below).  If
				       there  is not enough space to hold
				       all of the information,	the  NODE
				       JSYS   will   store   as  much  as
				       possible and then fail with  error
				       code ARGX04.

		       Line Block:

		       Word  Symbol    Contents

			0    .NDLNM    line number
			1    .NDLST    State of Line

				       .NDLON	  On
				       .NDLOF	  Off
				       .NDLCN	  Controller loopback
				       .NDLCB	  Cable loopback

			2    .NDLND    Byte pointer to ASCIZ name of node
				       at the end of the line.

			3    .NDLSZ    Size of node block.

    15	     .NDVFY    Verify node name

		       This function  indicates  whether  the  node  name
		       supplied  by the user is in the monitor's database
		       of known nodes, and if that node  can  be  reached
		       currently.

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    Byte pointer to ASCIZ node name to
				       be checked.

			1    .NDFLG    Flags returned by monitor.

				       Flags:

|				       B0(ND%EXM) The	specified    node
|						  exactly  matches a node
|						  name in  the	monitor's
|						  node database.
*				       B1(ND%LGL) The  node  name  is	a
*						  legal node name.
*				       B2(ND%RCH) This node is reachable.
*				       B3(ND%RUK) The	reachability   of
*						  this	node  is  unknown
*						  because it  is  not  in
*						  this	system's  network
*						  area.

    16	     .NDRNM    Return a node name.

		       This function converts a node  number  to  a  node
		       name.  (TOPS-20, Version 5.1 only)

		       Argument Block:

		       Word  Symbol    Contents

			0    .NDNOD    The node number

			1    .NDCVR    Byte pointer  to  area  where  the
				       ASCIZ node name is to be returned.

*   17	     .NDCIN    Return connection information.
*
*		       This  function	returns   information	about	a
*		       connection.   To use this function, call the first
*		       time with words NB.JOB and NB.CHN containing zero.
*		       The  call  returns  information	about  the  first
*		       connection of the first job with a  connection  on
*		       the system.  Subsequent calls report the status of
*		       other channels in the job,  or,	if  all  channels
*		       have  been  reported,  will advance the job number
*		       until information about all jobs and channels  has
*		       been  returned.	A NODX11 error (job number out of
*		       range) is returned and NB.JOB is set to	-1  after
*		       all jobs and channels have been examined.
*
*		       Special jobs that have connections (NRT or  CTERM)
*		       are  identified	by having NB.JOB set to the ASCII

*		       name of the channel.
*
*		       The number of words requested  must  be	at  least
*		       NB.LEN.
*
*
*		       Argument Block:
*
*		       Word  Symbol    Contents
*
*			 0   NB.RTW    B0-17  (NBRTW) number   of   words
*				       returned
*			 0   NB.RQW    B18-35 (NBRQW) number   of   words
*				       requested
*			 1   NB.JOB    Job number, or -1 for no more jobs
*			 2   NB.CHN    Channel number of connection
*			 3   NB.OBJ    B0-17  (NBOBJ) receiver	   object
*				       type, or -1
*			 3   NB.STA    B18-23 (NBSTA) session	  control
*				       (link) state
*			 3   NB.XFL B24-26 (NBXFL) transmit flow  control
*				       option
*			 3   NB.RFL B27-29 (NBRFL) receive  flow  control
*				       option
*			 4   NB.GOL    B0-17  (NBGOL) receive	     data
*				       request goal
*			 4   NB.INQ    B18-35 (NBINQ) input   quota   for
*				       link
*			 5   NB.OTQ    B0-17  (NBOTQ) output  quota   for
*				       link
*			 5   NB.DNA    B18-35 (NBDNA) destination    node
*				       address (remote host name)
*			 6   NB.SSZ    B0-17  (NBSSZ) segment size  (byte
*				       count in segment)
*			 6   NB.RSN    B18-35 (NBRSN) reason	      for
*				       disconnect or reject
*			 7   NB.LLA    B0-17  (NBLLA) local link address
*			 7   NB.RLA    B18-35  (NBRLA) remote	     link
*				       address
*			10   NB.PKS    B0-17  (NBPKS) packets sent
*			10   NB.RKS    B18-35 (NBRKS) packets received
*			11   NB.TYP    B0     (NBTYP) 0   means   passive
*				       connection;     1   means   active
*				       connection
*			11   NB.VER    B1-3   (NBVER) version  of  remote
*				       NSP (03.2, 13.1, 24.0)
*			11   NB.JFN    B4-16  (NBJFN) JFN associated with
*				       channel
*			11   NB.FRK    B18-35 (NBFRK) process number  for
*				       channel
*
*   20	     .NDRDB    Read DECnet data blocks
*
*
*		       Argument Block:
*
*		       Word  Symbol    Contents
*
*			0    .NDRBT    Type of table to return
*
*				       0(.NDBTB) general
*				       1(.NDBSJ) session job
*				       2(.NDBSL) session line
*				       3(.NDBEL) end-user layer link

*				       4(.NDBRC) router's RCB
*				       5(.NDBCT) CTERM data block
*
*			1    .NDRBD    Destination of data
*
*			2    .NDRBJ    First argument for locating table
*
*			3    .NDRBC    Second argument for locating table
*
*   21	     .NDSDP    Set DECnet initialization parameters
*
*
*		       Argument Block:
*
*		       Word  Symbol    Contents
*
*			0    .NDPRM    type of parameter to set
*
*				       0(.NDRTR) routing type
*				       1(.NDMXA) maximum address
*				       2(.NDMXB) maximum buffers
*				       3(.NDDBL) default buffers per link
*				       4(.NDBSZ) buffer size
*				       4(.NDFLO) flow control
*
*			1    .NDVAL    Value of parameter.  This value is
*				       dependent  on  the functions being
*				       performed.   The   following   are
*				       valid function values:
*
*				       0(FCM.NO) no flow control (only if
*						 .NDFLO is specified)
*				       1(FCM.SG) segment   flow   control
*						 (only	 if   .NDFLO   is
*						 specified)
*				       4(RNT.L1) level-1 router (only  if
*						 .NDRTR is specified)
*				       5(RNT.NR) non-routing   (only   if
*						 .NDRTR is specified)
*
*   22	     .NDINT    Insert node table
*
*
*		       Argument Block:
*
*		       Word  Symbol    Contents
*
*			0    .NDNNN    Number of node definitions
*
*			1    .NDNTA    Address of node	table  consisting
*				       of   the   number  of  word  pairs
*				       specified by  .NDNNN.   Each  word
*				       pair is in the following format:
*					   word 0  node name in SIXBIT
*					   word 1  16 bit node address

   NODE ERROR MNEMONICS:

   ARGX02:   Invalid function
   ARGX04:   Argument block too small
   ARGX19:   Invalid unit number
   CAPX2:    WHEEL, OPERATOR, or MAINTENANCE capability required
   COMX19:   Too many characters in node name
   COMX20:   Invalid node name

   MONX06:   Insufficient system resources (No swappable free space)
   NODX02:   Line not turned off
   NODX03:   Another line already looped
*  NODX04:   No local node name defined
*  NODX05:   Function no longer supported
*  NODX06:   Resource allocation failure
*  NODX07:   Argument block not long enough
*  NODX10:   Channel number out of range
*  NODX11:   Job number out of range
*  NODX12:   Bad table designator
*  NODX13:   Bad 1st argument
*  NODX14:   Bad 2nd argument
*  NODX15:   No such table
*  NODX16:   DECnet is already initialized
   NSPX25:   Illegal DECnet node number
   NSPX26:   Table of topology watchers is full



			     NOUT     JSYS 224

   Outputs an integer number.

   ACCEPTS IN AC1:  destination designator

	      AC2:  number to be output

	      AC3:  B0(NO%MAG) output the magnitude.  That is, output the
			       number as an unsigned 36-bit number (e.g.,
			       output -1 as 777777 777777).

		    B1(NO%SGN) output a plus sign for a positive number.

		    B2(NO%LFL) output leading filler.  If this bit is not
			       set,  trailing  filler  is output, and bit
			       3(NO%ZRO) is ignored.

		    B3(NO%ZRO) output 0's as the leading  filler  if  the
			       specified   number   of	columns  (NO%COL)
			       allows filling.	If this bit is	not  set,
			       blanks are output as leading filler if the
			       number of columns allows filling.

		    B4(NO%OOV) output on column overflow  and  return  an
			       error.	If  this  bit  is not set, column
			       overflow is not output.

		    B5(NO%AST) output asterisks on column  overflow.   If
			       this  bit is not set and bit 4 (NO%OOV) is
			       set, all necessary digits  are  output  on
			       column overflow.

		    B11-17     number of columns (including  sign column)
		    (NO%COL)   to output.  If this field is  0,  as  many
			       columns as necessary are output.

		    B18-35     radix (2-36) of number being output
		    (NO%RDX)

   RETURNS     +1:  failure, error code in AC3

	       +2:  success, updated string pointer in AC1, if pertinent

   NOUT ERROR MNEMONICS:

   NOUTX1:   Radix is not in range 2 to 36
   NOUTX2:   Column overflow
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged

 

 

*
*
*			    NTINF%     JSYS NNN
*
*
*  Returns generic network information.
*
*  ACCEPTS IN AC1:  address of argument block
*
*  RETURNS     +1:  always
*
*			       Returning originating host  information	-
*			       .NWRRH
*
*			       This function  returns  information  about
*			       the  originating  host  of  a job.  It can
*			       also be used to return the  terminal  type
*			       for network and non-network terminals.
*
*			       Correct	set  up  of  the  argument  block
*			       requires   the	argument   block   count,
*			       function code, device designatror, and the
*			       byte pointer.  All other fields are filled
*			       in upon return.
*
*			       The argument block  must  be  at  least	7
*			       words in length (.NWNU1+1).
*
*			       The format of the argument block is:
*
*			       Word Symbol Meaning
*
*	  0	.NWABC	  Count of words  in  argument	block  (including
*			  this word).
*
*	  1	.NWRRH	  Function code
*
*	  2	.NWLIN	  TTY device designator;  job number  or  -1  for
*			  this job.
*
*	  3	.NWNNP	  Terminal type and flags
*
*			  B0-B8    Flags
*					B0  NW%NNN  No node name known

*			  B9-B17   Network type
*
*					  Value   Symbol Meaning
*
*					  0	  NW%NNT      non-network
*						  terminal
*					  1	  NW%TCP Internet TCP
*					  2	  NW%DNA DECnet
*					  3	  NW%LAT    Local    Area
*						  Terminal (LAT)
*
*			  B18-B35  Line type
*
*					  Value   Symbol Meaning
*
*					  0	  NW%UND	undefined
*						  terminal type
*					  1	  NW%FE     front     end
*						  terminal
*					  2	  NW%PT pseudo terminal
*					  3	  NW%MC NRT terminal
*					  4	  NW%TV TVT terminal
*					  5	  NW%CH CTERM terminal
*					  6	  NW%LH LAT terminal
*
*	     5	.NWNNU	  Node number word 1
*
*	     6	.NWNNU+1  Node number word 2 (word 2  is  only	used  for
*			     Ethernet adresses).
*
*  Generates illegal instruction trap on failure with error code in AC1.
*
*  NTINF% ERROR MNEMONICS:
*
*  ARGX02:	Invalid function
*  ARGX04:	Argument block too small
*  GTJIX2:	Invalid terminal line number
*  GTJIX3:	Invalid job number
*  GTJIX4:	No such job
*  TTYX01:	Line is not active
*
*  JSYSs CALLED:
*
*  BOUT
*  GTHST%



				  NTMAN%    JSYS 604

	     Provides  an  interface  between	the   DECnet-20   Network
	     Management  layer	and  lower  layers of the Digital Network
	     Architecture.

   RESTRICTIONS:    Requires WHEEL or OPERATOR capability

   ACCEPTS IN AC1:  address of argument block

|  RETURNS:	+1  always.

				    NOTE

		  Users  of  the  NTMAN%  JSYS	should	be
		  familiar  with  the  Network	Management
		  Specification.

 
   Format of Argument Block:

   Word      Symbol    Contents

    0	     .NTCNT    Number of words in this argument block

    1	     .NTENT    Entity on which to perform function

		       Code	 Symbol    Meaning

			0	 .NTNOD    Node
			1	 .NTLIN    Line
			2	 .NTLOG    Logging
			3	 .NTCKT    Circuit
			4	 .NTMOD    Module

    2	     .NTEID    Byte pointer  to  Entity  ID.   (See  the  Network
		       Management Specification for format.)

    3	     .NTFNC    Function to be performed

		       Code	 Symbol    Meaning

*			-4	 .NTSLM    Set global logging mask
|			-3	 .NTPSI    Set PSI  channel  for  reading
|					   events
			-2	 .NTMAP    Map node number/node name
			-1	 .NTREX    Return the local node ID
			 0	 .NTSET    Set Parameter
			 1	 .NTCLR    Clear Parameter
			 2	 .NTZRO    Zero all Counters
			 3	 .NTSHO    Show selected Items
			 4	 .NTSZC    Show and Zero All Counters
			 5	 .NTRET    Return List of Items
|			 6	 .NTEVQ    Process the event queue

    4	     .NTSEL    Selection criterion for function

		       Selectors for Show Selected Items (.NTSHO)

		       Code	 Symbol    Meaning

			0	 .NTSUM    Summary
			1	 .NTSTA    Status
			2	 .NTCHA    Characteristics
			3	 .NTCOU    Counters
			4	 .NTEVT    Event

		       Selectors for Return List of Items (.NTRET)

		       Code	 Symbol    Meaning

			-1	 .NTKNO    Known Items
			-2	 .NTACT    Active Items
			-3	 .NTLOP    Loop

    5	     .NTQUA    Byte pointer to function to qualifier

    6	     .NTBPT    Byte pointer to parameter data buffer.  Pointer is
		       updated to next available byte on return.

    7	     .NTBYT    Parameter data buffer length in bytes.  Written in
		       buffer	for  functions	.NTMAP,  .NTRET,  .NTREX,
		       .NTSHO, and .NTSZC.

   10	     .NTERR    Network Management return code.	(See the  Network
		       Management Specification for codes.)

   NTMAN% ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   ARGX09:   Invalid byte size
   ARGX17:   Invalid argument block length
   NTMX1:    Network Management unable to complete request



			     ODCNV     JSYS 222

   Converts the internal date and time format into separate  numbers  for
   local  weekday,  day,  month,  year, and time and does not convert the
   numbers to text.  (Refer to Section 2.9.2 for more  information.)  The
   ODCNV  call	gives the caller option of explicitly specifying the time
   zone and daylight savings time.

   ACCEPTS IN AC2:  internal date and time, or -1 for  current	date  and
		    time

	      AC4:  B0(IC%DSA) apply daylight savings  according  to  the
			       setting	of  B1(IC%ADS).   If  B0  is off,
			       daylight  savings  is  applied	only   if
			       appropriate for date.

		    B1(IC%ADS) apply daylight savings  if  B0(IC%DSA)  is
			       on.

		    B2(IC%UTZ) use time zone in B12-17(IC%TMZ).  If  this
			       bit is off, the local time zone is used.
		    B3(IC%JUD) apply Julian day format (Jan 1 is day 1 in
			       conversion)

		    B12-17     time zone to use if B2(IC%UTZ) is on.
		      (IC%TMZ)

   RETURNS     +1:  always, with

		    AC2 containing the year in the  left  half,  and  the
			numerical month (0January) in the right half.

		    AC3 containing the day of the month (0first  day)  in
			the  left half, and the day of the week (0Monday)
			in the right half.

		    AC4 containing

			B0 and B2   on for compatibility with  the  IDCNV
				    call

			B1(IC%ADS)  on if daylight savings was applied
			B3(IC%JUD)  on if Julian day format was applied
			B12-17	    time zone used
			  (IC%TMZ)
			B18-35	    local time in seconds since midnight
			  (IC%TIM)

   If IC%JUD is set, the Julian day (1Jan 1, 365non-leap Dec 31,  366leap
   Dec 31, etc) is returned in the right half of AC2 and the left half of
   AC3 is set to zero.

   ODCNV ERROR MNEMONICS:

   DATEX6:   System date and time are not set
   TIMEX1:   Time cannot be greater than 24 hours
   ZONEX1:   Time zone out of range



			     ODTIM     JSYS 220

   Outputs the date and time by converting the	internal  format  of  the
   date and/or time to text.  (Refer to Section 2.9.2.)

   ACCEPTS IN AC1:  destination designator

	      AC2:  internal date and time, or -1 for  current	date  and
		    time

	      AC3:  format option flags (see below), 0 is the normal case

   RETURNS     +1:  always,  with  updated  string  pointer  in  AC1,  if
		    pertinent

   The format option flags in AC3 indicate the format in which	the  date
   and time are to be output.

 
			       ODTIM Option Flags

 
      B0(OT%NDA)  Do not output the date and ignore B1-8.

      B1(OT%DAY)  Output the day of the  week  according  to  the  format
		  specified by B2(OT%FDY).

      B2(OT%FDY)  Output the full text for the day of the week.  If  this
		  bit is off, the 3-letter abbreviation of the day of the
		  week is output.

      B3(OT%NMN)  Output the month as numeric and ignore B4(OT%FMN).

      B4(OT%FMN)  Output the full text for the month.	If  this  bit  is
		  off, the 3-letter abbreviation of the month is output.

      B5(OT%4YR)  Output the year as a 4-digit number.	If  this  bit  is
		  off,	the year is output as a 2-digit number if between
		  1900 and 1999.

      B6(OT%DAM)  Output the day of the month after the month.	 If  this
		  bit is off, the day is output before the month.

      B7(OT%SPA)  Output  the	date   with   spaces  between  the  items
		  (e.g.,    6 Feb 76).	If B6(OT%DAM) is also on, a comma
		  is output after the day of the month (e.g., Feb 6, 76).

      B8(OT%SLA)  Output the date with slashes (e.g., 2/6/76).

		  If B7-8 are both off, the date is  output  with  dashes
		  between the items (e.g., 6-Feb-76).

      B9(OT%NTM)  Do not output the time and ignore B10-13.

      B10(OT%NSC) Do not output the seconds.  If this  bit  is	off,  the
		  seconds are output, preceded by a colon.

      B11(OT%12H) Output the  time  in	12-hour  format  with  AM  or  PM
		  following  the  time.   If this bit is off, the time is
		  output in 24-hour format.

      B12(OT%NCO) Output the time without a colon between the  hours  and
		  minutes.
      B13(OT%TMZ) Output the time and follow it with a	"-"  and  a  time
		  zone (e.g., -EDT).

      B17(OT%SCL) Suppress columnation of the date and time  by  omitting
		  leading  spaces  and	zeros.	This produces appropriate
		  output for a message.  If this bit is off, the date and
		  time are output in columns of constant width regardless
		  of the particular date or time.  However, full texts of
		  months and weekdays are not columnated.  This output is
		  appropriate for tables.

   If AC3 is 0, the ODTIM call outputs the date and time  in  columns  in
   the format

	     dd-mmm-yy	hh:mm:ss

   For example, 6-Feb-76  15:14:03.

   If AC3 is -1, the ODTIM call interprets the contents as if  B1-2,B4-7,
   and	B17 were on (i.e., AC3336001000000) and outputs the date and time
   in the format

	     weekday, month day, year hh:mm:ss

   as in Friday, February 6, 1976  15:14:03

   Additional examples are:

	Contents of AC3     Typical Text

	202201000000	    Fri 6 Feb 76 1:06
	336321000000	    Friday, February 6, 1976 1:06AM-EST
	041041000000	    6/2/76 106:03
	041040000000	    6/02/76 106:03

   ODTIM ERROR MNEMONICS:

   DATEX6:   System date and time are not set
   TIMEX1:   Time cannot be greater than 24 hours

   All I/O errors are also possible.  These errors cause software

   interrupts or process terminations as described for the BOUT call
   description.



			     ODTNC     JSYS 230

   Outputs the date and/or the time as separate numbers for  local  year,
   month,  day, or time.  (Refer to Section 2.9.2.) This JSYS is a subset
   of the ODTIM call because the output of dates and times not stored  in
   internal  format  is permitted.  Also, the caller has control over the
   time and zone printed.

   ACCEPTS IN AC1:  destination designator

	      AC2:  year in the left half, and numerical month (0January)
		    in the right half

	      AC3:  day of the month (0first day) in the left  half,  and
		    day  of  the week (0Monday), if desired, in the right
		    half

	      AC4:  B1(IC%ADS)	    apply daylight savings on output

		    B12-17(IC%TMZ) time zone in which to output

		    B18-35(IC%TIM) local time in seconds since midnight

	      AC5:  format  option  flags  (refer  to	ODTIM	for   the
		    description of these flags)

 
					    NOTE

			The only time zones that  can  be  output  by
			B13(OT%TMZ) are Greenwich and USA zones.

 
   RETURNS     +1:  always,  with  updated  string  pointer  in  AC1,  if
		    pertinent.

   ODTNC ERROR MNEMONICS:

   DATEX1:   Year out of range
   DATEX2:   Month is not less than 12
   DATEX3:   Day of month too large
   DATEX4:   Day of week is not less than 7
   ZONEX1:   Time zone out or range
   ODTNX1:   Time zone must be USA or Greenwich

   All I/O errors can occur.  These errors cause software  interrupts  or
   process terminations as described for the BOUT call description.



			     OPENF     JSYS 21

   Opens the given file.  Refer to the TOPS-20 Monitor Calls User's Guide
   for the explanations of the types of access allowed to a file.

   ACCEPTS IN AC1:  JFN (right half of AC1) of the file being opened.

	      AC2:  B0-5(OF%BSZ)  Byte size (maximum of 36 decimal).   If
				  a  zero byte size is supplied, the byte
				  size defaults to 36 bits.

		    B6-9(OF%MOD)  Data	mode  in  which  to  open   file.
				  Common data modes are:

				  Code	 Symbol   Mode
				    0	 .GSNRM   Normal (ASCII)
				    1	 .GSSMB   Small buffer
				   10	 .GSIMG   Image
				   17	 .GSDMP   Dump

|				  ARPAnet TCP/IP data modes:
|
|				  Code	 Symbol   Meaning
|
|				    1	 .TCMWI   Interactive
|				    2	 .TCMWH   High throughput
|				    3	 .TCMII   Immediate return
|				    4	 .TCMIH   Buffered	immediate
|						  return
				  (See Section 2.5 for	more  information
				  on software data modes.)

				  Useful modes for common devices are:

				   Device	 Data Modes

				   Disk 	 .GSNRM
				   Card Reader	 .GSNRM, .GSIMG
				    Card Punch	 .GSNRM, .GSIMG
				   PTY		 .GSNRM  (PTY	 receives
							 data  in mode of
							 its TTY)
				   Mag Tape	 .GSNRM, .GSDMP
				   TTY		 .GSNRM, .GSIMG

		    B18(OF%HER)   Halt on I/O device or data  error.   If
				  this	bit  is on and a condition occurs
				  that causes an I/O device or data error
				  interrupt,  the process will instead be
				  halted,  and	an  illegal   instruction
				  interrupt will be generated.	If bit is
				  off  and  the  condition  occurs,   the
				  interrupt    is    generated	 on   its
				  normally-assigned  channel.	This  bit
				  remains  in  affect for the entire time
				  that the file is open.

		    B19(OF%RD)	  Allow read access.

		    B20(OF%WR)	  Allow write access.

		    B21(OF%EX)	  Allow execute access.

		    B22(OF%APP)   Allow append access.

		    B23(OF%RDU)   Allow unrestricted read  access.   This
				  bit  allows  you  to	open  a  file for
				  reading  regardless	of   simultaneous
				  thawed  or  frozen openings of the file
				  for  reading	or   writing   by   other
				  processes or the process executing this
				  call.  You can use this bit only if you
				  do not use the OF%THW or OF%WR bits.

		    B25(OF%THW)   Allow thawed access.	If  this  bit  is
				  off,	the  file  is  opened  for frozen
				  access.

				  Frozen access means there can  be  only
				  one  writer of the file;  thawed access
				  means there can be many writers of  the
				  file.   A program manipulating a thawed
				  file must take into  account	the  fact
				  that other programs may open and modify
				  that file.  Thawed/frozen access has no
				  direct  effect  on readers of the file,
				  but it does have  the  indirect  effect
				  that	 is   described   in   the   next
				  paragraph.

				  The first  open  of  a  file	sets  the
				  precedent  for  future  opens:   if the
				  first  open	is   thawed,   then   all
				  subsequent   opens   must   be  thawed,
				  regardless if read or write  access  is
				  desired.    The  same  holds	true  for
				  frozen access.  This	condition  is  in
				  effect  until  the  last  close  of the
				  file.

				  See the descriptions of bits OF%DUD and
				  OF%RDU  for  the  interaction of OF%THW
				  with	those  bits.	Also,	see   the
				  description  of  the	PMAP JSYS for the
				  interaction of  PMAP	bit  PM%ABT  with
				  OF%DUD.

		    B26(OF%AWT)   Block program and print  a  message  on
				  the  job's  terminal	if access to file
				  cannot be permitted.	 The  program  is
				  blocked until access is granted.

		    B27(OF%PDT)   Do not update access dates of the file.

		    B28(OF%NWT)   Return  an  error  if  access  to  file
				  cannot be permitted.

				  If  B26  and	B28  are  both	off,  the
				  default is to return an error if access
				  to the file cannot be granted.

|		    B29(OF%RTD)   Enforce restricted  access.	No  other
|				  JFN  in  the	system can be opened with
|				  this file  until  the  current  JFN  is
|				  released.   This  bit requires that the
|				  user have  the  ability  to  set  WRITE
|				  access to the file.

		    B30(OF%PLN)   Disable  line   number   checking   and
				  consider  a line number as 5 characters
				  of text.

		    B31(OF%DUD)   Suppress   the   system   updating   of
				  modified  pages  in  memory  to  thawed
				  files on disk.  This bit is ignored for
|				  new  files, and for files on structures
|				  that are shared under CFS-20.

				  Ordinarily,  TOPS-20	updates  modified
				  memory pages to disk approximately once
				  each	minute.   OF%DUD  prohibits  this
|				  automatic  update.   However, there are
|				  two sources of "manual"  updating  that
|				  are not controlled by OF%DUD:
|
|				  1.  A CLOSF JSYS is performed
|				  2.  A UFPGS JSYS is performed
|

				  OF%DUD  and  OF%THW  interact  in   the
				  following ways:

				  OF%THW   OF%DUD   Effect

|				    0	    0/1     OF%DUD ignored
				    1	     0	    Perform	automatic
						    file page update
				    1	     1	    Suppress	automatic
						    file page update

		    B32(OF%OFL)   Open the device even if it is off-line.

		    B33(OF%FDT)   Force an update of the .FBREF date  and
				  time	(last  read)  in  the FDB.  Also,
				  increment  right  halfword  (number  of
				  file	references)  of .FBCNT count word
				  in the FDB.

		    B34(OF%RAR)   Wait if the file is offline.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

 
   Even though each type of desired file access can  be  indicated  by	a
   separate  bit,  some  accesses are implied when specific bits are set.
|  For example, the setting of the write access bit implies  read  access
|  if  the  process  is  allowed to read the file according to the file's
|  access code.  However, if an existing file is opened  and  only  write
   access  is  specified  (only  OF%WR	is set), contents of the file are
   deleted, and the  file  is  considered  empty.   Thus,  to  update  an
   existing file, both OF%RD and OF%WR must be set.

   Note that if OF%RD,	OF%WR,	and  OF%APP  are  all  zero,  OPENF  will
   generate  an  error.  OPENF works as follows for archived and migrated
   files:

 
			     Archived

	OPENF Access	      Online		    Offline

	    Read	       Ok		   Fail/Wait
	    Write	       Fail		   Fail
	    Append	       Fail		   Fail

 
			     Migrated

	OPENF Access	      Online		    Offline

	    Read	       Ok		   Fail/Wait
	    Write	       Ok
			       (discard
				implied)
	    Append	       Ok		   Fail/Wait
			       (discard 	   (discard
			       implied) 	   implied)

 
   The failure cases return an error  message  (OPNXnn).   The	fail/wait
   cases  return  an  error  for  failure  or wait until the OPENF can be
   successfully completed.

   The settings of OF%NWT  (never  wait  for  file  restore)  and  OF%RAR
   (retrieve  file  if	necessary)  determine  whether	a failure or wait
   occurs.  If OF%NWT is set on the OPENF call, OPENF alway fails (in the
   fail/wait cases).  If OF%RAR or the job default (See the SETJB monitor
   call.) is set, the OPENF will wait for the file to be  retrieved,  and
   then  complete  successfully.  In the Ok (discard implied) cases, tape
   pointers for the file, if any, are discarded.

   The CLOSF monitor call can be used to close a specific file.

   OPENF ERROR MNEMONICS:

   OPNX1:    File is already open
   OPNX2:    File does not exist
   OPNX3:    Read access required
   OPNX4:    Write access required
   OPNX5:    Execute access required
   OPNX6:    Append access required
   OPNX7:    Device already assigned to another job
   OPNX8:    Device is not on line
   OPNX9:    Invalid simultaneous access
   OPNX10:   Entire file structure full
   OPNX12:   List access required
   OPNX13:   Invalid access requested
   OPNX14:   Invalid mode requested
   OPNX15:   Read/write access required
   OPNX16:   File has bad index block
   OPNX17:   No room in job for long file page table
   OPNX18:   Unit Record Devices are not available
   OPNX23:   Disk quota exceeded
   OPNX25:   Device is write-locked
   OPNX26:   Illegal to open a string pointer
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   SFBSX2:   Invalid byte size
   TTYX01:   Line is not active


			      PBIN     JSYS 73

   Inputs the next sequential byte from  the  primary  input  designator.
   This call is equivalent to a BIN call with the source designator given
   as .PRIIN.

   RETURNS     +1:  always, with the byte right-justified in AC1

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   PBIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX5:    File is not open
   IOX1:     File is not open for reading
   IOX4:     End of file reached
   IOX5:     Device or data error



			     PBOUT     JSYS 74

   Outputs a byte sequentially to the primary  output  designator.   This
   call  is  equivalent  to  a	BOUT call with the destination designator
   given as .PRIOU.

   ACCEPTS IN AC1:  byte to be output, right-justified

   RETURNS     +1:  always

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   PBOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX2:     File is not open for writing
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end of file
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    unable to allocate disk - structure damaged


			    PDVOP%     JSYS 603

   Manipulates program data vectors (PDV's), which begin at program  data
   vector  addresses  (PDVA's).   Program  data vectors are used to allow
   user programs to obtain information about execute-only programs.

   ACCEPTS IN AC1:  function code

	      AC2:  address of the argument block

	      AC3:  byte pointer to a string in memory

   RETURNS     +1:  always, with data returned	in  the  data  block,  an
		    updated count in .POCT2 if needed.

   The following describes the format of the argument block to which  the
   address in AC2 points.

 
   Word      Symbol		      Meaning

 
     0	     .POCT1    Count 1, the  number  of  words	in  the  argument
		       block.

     1	     .POPHD    Handle of the process that the call is to affect

     2	     .POCT2    Count 2, the number of words in	the  data  block.
		       The  call  returns  two	counts in this word.  The
		       left half contains the number  of  words  of  data
		       available  for  the  call to return, and the right
		       half contains the number of  words  the	call  did
		       return  in  the	data block.  If the right half is
		       smaller than the left half,  the  call  could  not
		       return  all  the  data  available due to a lack of
		       room in the data block.

     3	     .PODAT    Starting address of the data block into which  the
		       call returns data

     4	     .POADR    Starting address of the range of memory

     5	     .POADE    Ending address of the range of memory

   The format of a program data vector is as follows:

	Word	  Symbol		Meaning

	  0	  .PVCNT    Length of the PDV (including this word).
	  1	  .PVNAM    The address of the name of	the  program  for
			    which  this  data vector exists.  The name is
			    in ASCIZ representation.  (In most	cases,	a
			    byte pointer should be created to access this
			    string.)
|	  2	  .PVEXP    Address of the exported information vector.
|	  3	  .PVREE    Reserved for DIGITAL.
	  4	  .PVVER    Program version number.
	  5	  .PVMEM    Address of a block of  memory  that  contains
			    data  describing  the program's address space
			    (a	memory	map).	See  the   LINK   manual,
			    Appendix G, for a description of this block.
|	  6	  .PVSYM    Address of the program symbol vector.
	  7	  .PVCTM    Time at which the program was compiled.

	 10	  .PVCVR    Version number of the compiler.
	 11	  .PVLTM    Time at which the program was loaded.
	 12	  .PVLVR    Version number of LINK.
	 13	  .PVMON    Address  of  a  monitor  data  block.    (Not
			    currently used.)
	 14	  .PVPRG    Address  of  a  program  data  block.    (Not
			    currently used.)
	 15	  .PVCST    Address of a customer-defined data block.

   Functions that require a range of memory locations (.POGET and .POREM)
   interpret words .POADR and .POADE as follows:

	 o  If .POADR and .POADE are both nonzero, then  .POADR  contains
	    the  first	address  in  the  range, .POADE contains the last
	    address  in  the  range,  and  the	range  includes  all  the
	    addresses between them.

	 o  If both .POADR and .POADE are  zero,  the  range  is  all  of
	    memory.

	 o  If .POADE is zero and .POADR is  not,  the	range  begins  at
	    .POADR  and  includes  all	higher	addresses  in the rest of
	    memory.

	 o  If .POADE is not zero, and .POADR is larger than  .POADE,  an
	    error results.

   You can use the following function codes in AC1.

   Code      Symbol			   Function

     0	     .POGET    For the process specified in word  .POPHD  of  the
		       argument  block,  this function returns all PDVA's
		       within the range of addresses specified	in  words
		       .POADR and .POADE of the argument block.

     1	     .POADD    This function adds the  PDVA's  specified  in  the
		       data  block  to	the  system's  data  base for the
		       specified  process.   The  PDVA's   must   be   in
		       ascending order within the data block.

     2	     .POREM    This function removes a set  of	PDVA's	from  the
		       system's data base for the specified process.  The
		       PDVA's removed are the ones within  the	range  of
		       addresses  specified in words .POADR and .POADE of
		       the argument block.

     3	     .PONAM    This function returns the ASCIZ name of a  program
		       in memory.  Word .POADR of the argument block must
		       contain a valid PDVA for  the  specified  process.
		       The  name returned is the one to which word .PVNAM
		       of the PDV points.

     4	     .POVER    This function returns the version of a program  in
		       memory.	Word .POADR must contain a valid PDVA for
		       the specified process.  The  version  returned  is
		       the one that word .PVVER of the PDV contains.

     5	     .POLOC    For the specified process, this	function  returns
		       all the PDVA's of PDV's for the specified program.
		       The byte pointer in  AC3  points  to  the  program
		       name.

   This call generates an illegal  instruction	interrupt  on  the  error

   conditions below.

   PVDOP% ERROR MNEMONICS:

|  ARGX06:   Invalid page number
   MONX02:   Insufficient system resources (JSB full)
   PDVX01:   Address in .POADE must be as large as address in .POADR
   PDVX02:   Addresses in .PODAT block must be in strict ascending order
   PDVX03:   Address in .POADR must be a program data vector address



			     PEEK     JSYS 311

|  Transfers a block of words from the monitor's  address  space  to  the
|  user's  address  space.  The desired monitor words must exist on pages
|  that have read access.  This monitor call is used to obtain data  from
   the	monitor  for maintenance and test purposes and should be executed
   only when GETAB information is not available.

   RESTRICTIONS:    requires WHEEL, OPERATOR, or  MAINTENANCE  capability
		    enabled

   ACCEPTS IN AC1:  word count	in  the  left  half,  and  first  virtual
		    address of the monitor in the right half

	      AC2:  first user address

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, the desired words are transferred.

   PEEK ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   PEEKX2:   Read access failure on monitor page



			     PLOCK     JSYS 561

   Acquires physical memory  and  places  a  designated  section  of  the
   process'  address  space in memory.	Allows the process to specify the
   memory pages to be used, or permits the system to select the pages.

   RESTRICTIONS:    requires WHEEL, OPERATOR, or  MAINTENANCE  capability
		    enabled

   ACCEPTS IN AC1:  address of first page if acquiring (locking) or -1 if
		    unlocking.

	      AC2:  process handle (currently .FHSLF only)  in	the  left
		    half and number of first page in the right half.

	      AC3:  control flags in the left half and	repeat	count  in
		    the right half.  The control flags are:

		    B0 (LK%CNT) right half of AC3 contains a count of the
				number of pages to lock.

		    B1 (LK%PHY) value in AC1 is the first  page  desired.
				If this bit is off and AC1 is not -1, the
				system selects pages.

		    B2 (LK%NCH) pages will not be cached.

		    B3 (LK%AOL) off-line pages are to be locked.

|		    B4 (LK%EPN) page number is absolute and not  relative
|				to a section.

   RETURNS     +1:  always

   If the PLOCK call is unable to honor any one of the requests to unlock
   any one of the pages specified by the repeat count, it will unlock all
   of the others.

   A page that was locked with the PLOCK call may be unmapped.	(Refer to
   the PMAP call.)  This will unlock the process' page and return the now
   unlocked physical page to its previous state.

   The page selected by the user must be capable of being placed off-line
   for the PLOCK call to acquire it.

   Generates an illegal instruction interrupt on error conditions below.

   PLOCK ERROR MNEMONICS:

   ARGX22:   Invalid flag
   ARGX24    invalid count



			      PMAP     JSYS 56

   Maps one or more complete pages from a file to a process (for  input),
   from  a process to a file (for output), or from one process to another
   process.  Also unmaps pages from a process and deletes  pages  from	a
   file.  Each of the five uses of PMAP is described below.

 
   Case I:  Mapping File Pages to a Process

   This use of the PMAP call does not actually	transfer  any  data;   it
   simply  changes  the  contents of the process' page map.  When changes
   are made to the  page  in  the  process,  the  changes  will  also  be
   reflected  in the page in the file, if write access has been specified
   for the file.

   ACCEPTS IN AC1:  JFN of the file in the left half, and the page number
		    in	the file in the right half.  This AC contains the
		    source.

	      AC2:  process handle in the left half, and the page  number
		    in	the  process in the right half.  This AC contains
		    the destination.

	      AC3:  B0(PM%CNT)	A count is in  the  right  half  of  AC3.
				This   count   specifies  the  number  of
				sequential pages to be mapped.	 If  this
				bit is not set, one page is mapped.

		    B2(PM%RD)	Permit read access to the page.

		    B3(PM%WR)	Permit write access to the page.

		    B4(PM%EX)	Reserved for future use.
				The symbol PM%RWX  can	be  used  to  set
				B2-4.

		    B5(PM%PLD)	Preload the page being mapped  (move  the
				page immediately instead of waiting until
				it is referenced).

		    B9(PM%CPY)	Create a private copy of the page when it
				is  written into (copy-on-write).  If the
				page  is  mapped  between  two	processes
				(Case  III  below),  both  processes will
				receive a private copy of the page.

|		    B10(PM%EPN) The  right  half  of  AC2   contains   an
|				extended  process  page  number.   If the
|				section  containing  the  page	does  not
|				exist,	an  illegal  instruction  trap is
|				generated.

		    B11(PM%ABT) Unmap  a  page	and  throw  its   changed
				contents  away.   This bit is significant
				only when unmapping  process  pages  that
				were  mapped  from  a  file  (see case IV
				below) and OF%DUD is set in the OPENF.

				Normally, if a page is unmapped  and  has
				been  changed  since  the  last  time the
				monitor updated the associated file page,
				the monitor will remove the page from the
				process and place it on a queue in  order
				to  update  the file page.  PM%ABT allows
				the page to be unmapped, but prevents the
				monitor  from  placing	the  page  on the
				update queue.

				This feature is useful	in  the  case  of
				erroneous  data  written to a mapped page
				of a file open for  simultaneous  access.
				In  this  case,  it is important that the
				erroneous page be discarded  and  not  be
				used  to  update  the file page.  Another
				application  is  to  allow  processes  in
				separate jobs to communicate by sharing a
				file page (and reading/writing the  page)
				and  avoid  the  overhead  of the monitor
				periodically updating the page.

		    B18-35	Number of pages to be mapped if
		    (PM%RPT)	B0(PM%CNT) is set.

   RETURNS     +1:  always

   This use of PMAP changes the map of the process such that addresses in
   the	process page specified by the right half of AC2 actually refer to
   the file page specified  by	the  right  half  of  AC1.   The  present
   contents  of the process page are removed.  If the page in the file is
   currently nonexistent, it will be created when it is written (when the
   corresponding page in the process is written).  If the process page is
   in a nonexistant section, an illegal instruction trap is generated.

   This use of PMAP is legal only if the file is opened for at least read
   access.  The access bits specified in the PMAP call are ANDed with the
   access  that  was  specified  when  the  file  was  opened.	 However,
   copy-on-write is always granted, regardless of the file's access.  The
   access granted is placed in the process'  map.   The  file  cannot  be
   closed  while  any  of  its	pages are mapped into any process.  Thus,
   before the file is closed, pages must be unmapped from each process by
   a PMAP call with -1 in AC1 (see below).

 
   Case II Mapping Process Pages to a File

   This use of the PMAP  call  actually  transfers  data  by  moving  the
   contents of the specified page in the process to the specified page in
   the file.  The process' map for that page becomes empty.

   ACCEPTS IN AC1:  process handle in the left half, and the page  number
		    within  the  process  in  the  right  half.   This AC
		    contains the source.

	      AC2:  JFN of the file in the left half, and the page number
		    within  the file in the right half.  This AC contains
		    the destination.

	      AC3:  access bits and repetition count.  (Refer to Case I.)

   RETURNS     +1:  always

   The process page and  the  file  page  must	be  private  pages.   The
   ownership  of  the  process page is transferred to the file page.  The
   present contents of the page in the file is deleted.

   The access granted to the file page is determined by ANDing the access
   specified in the PMAP call with the access specified when the file was
   opened.  This function does not update the file's  byte  size  or  the
   end-of-file	pointer in the file's FDB.  Failure to update these items
   in the FDB can prevent the reading of the file by sequential I/O calls
   such as BIN and BOUT.

   To update the file's FDB  after  using  this  PMAP  function,  do  the
   following:

	1.  Use the CLOSF call with the CO%NRJ bit set to close the  file
	    but keep the JFN.

	2.  Use the CHFDB call to update the end-of-file pointer and,  if
	    necessary, the byte size in the file's FDB.

	3.  Use the RLJFN call to release the JFN.

   (Refer to Section 2.2.8 for the format of the FDB fields.)

   Case III Mapping One Process' Pages to Another Process

   This use of the PMAP call normally does not	transfer  any  data;   it
   simply  changes  the contents of the page maps of the processes.  When
   changes are made to the page in one process, the changes will also  be
   reflected in the corresponding page in the other process.

   ACCEPTS IN AC1:  process handle in the left half, and the page  number
		    in	the  process in the right half.  This AC contains
		    the source.

	      AC2:  a second process handle in the left  half,	and  page
		    number  in	that  process in the right half.  This AC
		    contains the destination.

	      AC3:  access bits and repetition count.  (Refer to Case I.)

   RETURNS     +1:  always

   This use of PMAP changes the map of the destination process such  that
   addresses  in  the  page  specified	by the right half of AC2 actually
   refer to the page in the source process specified by the right half of
   AC1.  The present contents of the destination page are deleted.

   The access granted to the destination page is determined by the access
   specified  in  the  PMAP  call.   If  the  destination  page  is  in a
   nonexistant section, the  monitor  generates  an  illegal  instruction
   trap.

   Case IV Unmapping Pages In a Process

   As stated previously, a file cannot be closed if any of its pages  are
   mapped in any process.

   ACCEPTS IN AC1:  -1

	      AC2:  process handle in the  left  half,	and  page  number
		    within the process in the right half

	      AC3:  B0(PM%CNT)	Repeat	count.	 Only  the  process  page
				numbers are incremented.

		    B18-35     Number of pages to remove from process

   This format of the PMAP call removes the pages indicated in	AC2  from
   the process.

   A page that was locked with the PLOCK call may be unmapped.	Doing  so
   will  unlock  the  process'	page and return the now unlocked physical
   page to its previous state.

   Case V Deleting One or More Pages from a File

   Deletes one or more pages from a file on disk and does not affect  the
   address space of any process.

   ACCEPTS IN AC1:  -1

	      AC2:  JFN of the file in the  left  half	and  page  number
		    within the file in the right half.

	      AC3n: B0(PM%CNT)	Indicates that the  right  half  contains
		    the number of pages to delete.

		    B18-35	Number of pages to delete from file

   Illegal PMAP calls

   The PMAP call is illegal if:

	1.  Both AC1 and AC2 designate files.

	2.  Both AC1 and AC2 are 0.

	3.  The PMAP call designates a file with write-only access.

	4.  The PMAP call designates a file with append-only access.

	5.  The source and/or the destination designates an  execute-only
	    process and the process is not self (.FHSLF).

   Can cause several software interrupts on certain file conditions.

   Generates an illegal instruction interrupt on error conditions below.

   PMAP ERROR MNEMONICS:

   ARGX06:   Invalid page number
   CFRKX3:   Insufficient system resources
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX7:   Process page cannot exceed 777
   FRKHX8:   Illegal to manipulate an execute-only process
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged
   LNGFX1:   Page table does not exist and file not open for write
   PMAPX1:   Invalid access requested
   PMAPX2:   Invalid use of PMAP
   PMAPX3:   Illegal to move shared page into file
   PMAPX4:   Illegal to move file page into process
   PMAPX5:   Illegal to move special page into file
   PMAPX6:   Disk quota exceeded
   PMAPX7:   Illegal to map file on dismounted structure
   PMAPX8:   Indirect page map loop detected



			     PMCTL     JSYS 560

   Controls physical memory.  This call allows a  privileged  program  to
   add	or  remove  most  pages  of physical memory and to control use of
   cache memory.

   RESTRICTIONS:    Requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  function code

	      AC2:  length of the argument block

	      AC3:  address of the argument block

   RETURNS     +1:  always

   The defined functions and their argument blocks are as follows:

   Function	  Symbol		   Meaning

       0	  .MCRCE    Return  the  status  of  cache  memory.   The
			    status  is	returned  in  word  .MCCST of the
			    argument block.

			    Argument Block

			    0	.MCCST	 If B35(MC%CEN) is on, the  cache
					 is enabled.

       1	  .MCSCE    Set the status of cache memory.

			    Argument Block

			    0	.MCCST	 Enable the cache if  B35(MC%CEN)
					 is on.

       2	  .MCRPS    Return the status of the given page(s).   The
			    number  of	the page is given in word .MCPPN,
			    and its status is returned in word .MCPST.

			    Argument Block

			    0	.MCPPN	 Negative count in the left half;
					 number  of  physical page in the
					 right half

			    1	.MCPST	 Returned   page   status.    The
					 status  is represented by one of
					 the following values:

					 0   .MCPSA   Page  is	available
						      for normal use.

					 1   .MCPSS   Page   is   in	a
						      transition state.

					 2   .MCPSO   Page  is	off  line
						      because	 it    is
						      nonexistent.
						      Nonexistent  memory
						      is  marked  as  off
						      line    at   system
						      startup.

					 3   .MCPSE   Page  is	off  line
						      because the monitor
						      detected an error.

       3	  .MCSPS    Set the status of the given page.  The number
			    of	the page is given in word .MCPPN, and the
			    status value is given in word .MCPST.

			    Argument Block

			    0	.MCPPN	 Number of physical page.

			    1	.MCPST	 Status for page.  The status  is
					 represented   by   one   of  the
					 following values:

					 0   .MCPSA   Mark page available
						      for normal use.

|					 1   .MCPSS   Mark    page     in
|						      transition

					 2   .MCPSO   Mark page off  line
						      because it does not
						      exist.

					 3   .MCPSE   Mark page off  line
						      because  it  has an
						      error.

			    4	.MCRME	 Collect  information  about  MOS
					 memory    errors.    Store   the
					 information in  block	addressed
					 by AC3 and update AC2 on return.

   A list of those pages that PMCTL cannot acquire follows:

	1.  the EPT

	2.  the monitor's UPT

	3.  any page containing a CST0 entry

	4.  any page containing an SPT entry

	5.  the page containing MMAP

	6.  any page belonging to the resident free space pool
|
|	7.  any page containing a monitor page table

   In certain specialized monitors,  for  example  TOPS-20AN,  there  are
   additional  pages that cannot be acquired.  An estimate of the size of
   these areas follows:

	CST0   one word for every page of memory supported (two  to  four
	       pages)
	SPT    four pages
	MMAP   one page
	Resident Free Space Pool     two pages minimum

   Generates an illegal instruction interrupt on error conditions below.

   PMCTL ERROR MNEMONICS:

   CAPX2:    WHEEL, OPERATOR, or MAINTENANCE capability required
   PMCLX1:   Invalid page state or state transition
   PMCLX2:   Requested physical page is unavailable
   PMCLX3:   Requested physical page contains errors
   ARGX02:   Invalid function
   ARGX06:   Invalid page number



			     PPNST     JSYS 557

   Translates a project-programmer number  (a  TOPS-10	36-bit	directory
   designator)	to its corresponding TOPS-20 string.  The string consists
   of the structure name and a	colon  followed  by  the  directory  name
   enclosed  in  brackets.   This monitor call and the STPPN monitor call
   should  appear  only  in  programs  that   require	translations   of
   project-programmer  numbers.   Both	calls are temporary calls and may
   not be defined in future releases.

   ACCEPTS IN AC1:  destination designator

	      AC2:  project-programmer number (36 bits)

	      AC3:  byte pointer to structure name string for  which  the
		    given project-programmer number applies.

   RETURNS     +1:  always, with  string  written  to  destination,  with
		    updated byte pointer, if pertinent, in AC1

   If the structure name  string  is  a  logical  name,  then  the  first
   structure appearing in the logical name definition is used.

   Generates an illegal instruction interrupt on error conditions below.

   PPNST ERROR MNEMONICS:

   PPNX1:    Invalid PPN
   PPNX2:    Structure is not mounted
   GJFX22:   Insufficient system resources (Job Storage Block full)
   STDVX1:   No such device
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DELFX6:   Internal format of directory is incorrect
   DIRX1:    Invalid directory number
   DIRX2:    Insufficient system resources
   DIRX3:    Internal format of directory is incorrect
   STRX01:   Structure is not mounted
   STRX06:   No such user number
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     PRARG     JSYS 545

   Returns or sets up an argument block for the specified  process.   The
   monitor  stores  the  argument block in process storage block for this
   process.

   This call is useful for running a  program  whenever  another  program
   halts.   Examples  are  running  a  compiler  or re-executing the last
   compile-class command each time you exit an editor.

   This call uses the 200-word process storage block associated with each
   process.   User  programs  can only access this memory by means of the
   the PRARG monitor call.  A process and all of its  superior	processes
   can access the process storage block of a given process.  Furthermore,
   data associated with many different programs can  be  stored  a  given
   process storage block.

   ACCEPTS IN AC1:  function code in the left half, and a process  handle
		    in the right half

	      AC2:  address of argument block

	      AC3:  length of argument block

   RETURNS     +1:  always, with the number  of  words	of  data  in  the
		    returned argument block in AC3

   The codes for the functions are as follows:

      1      .PRARD    return the  arguments  beginning  at  the  address
		       specified in AC2

      2      .PRAST    set the arguments using the argument block at  the
		       address specified in AC2

   The PRARG argument block has the following format:

	Offset	   Meaning

	   0	   Number of argument blocks
	   1	   Relative address (from the start of this block) of the
		   first argument list
	   2	   Relative address of the second argument list . . .
	   N	   Relative address of the Nth argument list

   The argument list format is the following:

	Word	   Meaning

	 0	   Number of argument lists (must be 1)
	 1	   Entry type in the left half (must be 400740), and  the
		   address,  relative to the start of the argument block,
		   of the argument list in the right half (usually 2, but
		   other relative addresses are allowed)

   The argument list contains an ASCIZ string that is  the  name  of  the
   program  to	run;   or  the list contains a zero, which means that the
   last compile-class command is to be re-executed.

   Generates an illegal instruction interrupt on error conditions below.

   PRARG ERROR MNEMONICS:

   PRAX1:    Invalid PRARG function code
   PRAX2:    No room in monitor data base for argument block
   PRAX3:    PRARG argument block too large



			     PSOUT     JSYS 76

   Outputs a string sequentially to the primary output designator.

   ACCEPTS IN AC1:  byte pointer to  an  ASCIZ	string	in  the  caller's
		    address space

   RETURNS     +1:  always, with updated byte pointer in AC1

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   PSOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX2:     File is not open for writing
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end of file
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			    QUEUE%     JSYS 615
|
|  Provides a mechanism for communicating with the operator as well as	a
|  mechanism for initiating queue requests.
|
|  Two essential pieces of information are needed to use QUEUE%:
|
|	 o  Function type - Queueing request, write-to-operator
|
|	 o  Set of argument blocks appropriate for the function type
|
|  QUEUE% provides two classes	of  functions.	 One  class,  the  actual
|  queuing  functions, causes a job request to be presented to QUASAR for
|  processing, similar to submit and print  commands.	The  other  class
|  enables  limited  communications with the operator, providing the same
|  functions as the PLEASE program.
|
|
|
|  ACCEPTS IN AC1:  Length of argument block
|
|	      AC2:  Address of argument block
|
|  RETURNS     +1:  always
|
|  The user program builds the	main  argument	block  containing  header
|  information	and various other argument blocks that declare attributes
|  of the request.  The format of the main argument block is as follows:

|      Word   Symbol		     Meaning
|
|      0      .QUFNC	     B0-B7 (QF%FLG) Flag bits
|
|			      B0 (QU%NRS)  No response (don't wait)
|			      In addition  to  performing  the	requested
|			      function,  QUEUE% returns a response unless
|			      a  flag  is  set	explicitly  declining	a
|			      response.   For  the queuing functions, the
|			      response is an ASCII string indicating  the
|			      job   has   been	 accepted  (same  as  the
|			      acknowledgement line provided  in  response
|			      to  a  queue  request  in  the  EXEC).  The
|			      response has a slightly  different  meaning
|			      depending  on  use of the write-to-operator
|			      functions, as described below.
|
|			      B1 (QU%DBG)  Use the system-wide	debugging
|			      PID
|
|			     B8-B17 (QF%RSP) Length of response block  (1
|			      page maximum;  see QU%NRS)
|
|			     B18-B35 (QF%FNC) Function code
|
|			      Queuing  Functions  --  Queuing	functions
|			      perform  tasks  normally	accomplished with
|			      PRINT  and  SUBMIT  commands.   For   these
|			      functions,  a  file  descriptor argument is
|			      required before any other argument  blocks.
|			      Any  number of other argument blocks may be
|			      included after the  file	specification  to
|			      declare  various attributes of the request.
|			      These arguments are similar to the switches
|			      associated with those commands.
|
|			       1  .QUPRT   Print file
|			       2  .QUCDP   Punch cards
|			       3  .QUPTP   Punch paper tape
|			       4  .QUPLT   Plot file
|			       5  .QUBAT   Submit batch job
|			      10  .QUMNT   Mount volume set
|			      11  .QUDIS   Dismount volume set
|
|			      Write-to-Operator -- The	write-to-operator
|			      functions   perform   the   same	functions
|			      normally associated with use of the  PLEASE
|			      program.	 The  response	to  this  type of
|			      function depends on the  function.   For	a
|			      write-to-operator    without   reply,   the
|			      acknowledgement indicates that the  message
|			      has been received.  For a write-to-operator
|			      with reply, the process will remain blocked
|			      until  the operator responds to the message
|			      which should be in the form of  a  request.
|			      In  this	case,  the response is the actual
|			      reply.
|
|			      12  .QUWTO   Write-to-operator
|			      13  .QUWTR   Write-to-operator with reply
|
|      1      .QURSP	     Address of response block

|      2      .QUARG	     First of  n  contiguous  attribute  argument
|			     blocks.	 These	 specify   the	 function
|			     parameters.  Each	two-word  argument  block
|			     has the following general format:
|
|			      0  .QATYP    First word of argument block
|
|			      B0 (QA%IMM)  On implies immediate  argument
|			      value.  Argument value is contained in word
|			      .QADAT.
|
|			      B9-B17 (QA%LEN) Length of argument value (1
|			      if QA%IMM is set).
|
|			      B18-B35	(QA%TYP)   Argument   code   (see
|			      individual  argument block descriptions for
|			      possible codes).
|
|			      1  .QADAT    Address   of    argument    or
|			      argument value if QA%IMM is set.
|
|  The following section describes each of the attribute argument blocks.
|
|  Code       Symbol			   Function/Usage
|
|  10	      .QBFIL   This  argument  block  (file   specification)   is
|		       required  for  all queuing functions.  For a PRINT
|		       job, it indicates the file to be printed.   For	a
|		       BATCH  job,  it	indicates  the control file to be
|		       used for  the  batch  job.   The  file  descriptor
|		       argument  block must be specified before any other
|		       attributes.  Argument:  ASCII  text  (filename  as
|		       ASCII string).
|
|  11	      .QBCOP   Indicates the number of copies  to  be  generated.
|		       For  use exclusively with output (PRINT) requests.
|		       Argument:  Number of copies.
|
|  12	      .QBFRM   Indicates the form to  be  used	for  the  output.
|		       Form  indicates	paper type as well as some of the
|		       print characteristics such as width and length  of
|		       a   printed  page.   For  use  with  output  queue
|		       requests, PRINT.  Argument:  forms name in SIXBIT.
|
|  13	      .QBFMT   Describes the format  of  the  file.   Using  this
|		       information  the  printer  spooler  can	correctly
|		       interpret the  data  in	the  file  for	printing.
|		       Arguments:
|
|			1   .QBFAS   ASCII
|			2   .QBFFR   FORTRAN
|			3   .QBFCB   COBOL
|			4   .QBFAI   Augmented Image
|			5   .QBFSA   Stream ASCII
|			6   .QNF11   Eleven
|			7   .QBFIM   Image
|		       10   .QBF8B   8-bit ASCII
|
|  14	      .QBODP   Indicates whether certain  files  associated  with
|		       this request are to be deleted or kept (preserved)
|		       upon completion of the job.  For use with  any  of
|		       the  queuing  functions.   In  a  PRINT	job,  the
|		       printed files are  deleted  or  preserved.   In	a

|		       BATCH   job,  it  is  the  control  file  that  is
|		       preserved  or   deleted	 with	this   parameter.
|		       Argument:  0 to preserve, 1 to delete.
|
|  15	      .QBUNT   Indicates   the	 unit	(object)    number    and
|		       characteristics	of the object to process the job.
|		       For use with any of the	queuing  functions.   The
|		       unit  number  indicates	the  stream number in the
|		       case of a BATCH job.  The physical characteristics
|		       are only applicable to PRINT requests.  Arguments:
|
|		       1   .QBULC   Lower case printer
|		       2   .QBUUC   Upper case printer
|		       3   .QBUPH   Physical unit number provided in LH
|		       4   .QBUGN   Generic device
|
|  16	      .QBAFT   Allows a job to be started at  some  future  time.
|		       For  use  with  any  queuing  request.	Argument:
|		       Date/time in UDT format.
|
|  17	      .QBLIM   Limits the amount of resources allocated  to  this
|		       job.   Also  has  a  secondary use as an attribute
|		       that is considered in the scheduling of jobs.  For
|		       use  with any of the queuing functions.	For PRINT
|		       jobs, it indicates the maximum number of pages  to
|		       be printed.  For BATCH jobs, it indicates the time
|		       limit for the job.  Argument:   Limit  of  job  as
|		       number.
|
|  20	      .QBUNQ   Enables	 the   user   to    allow/disallow    the
|		       simultaneous  running of multiple batch jobs.  For
|		       use with BATCH requests only.  Arguments:
|
|		       1   .QBUNO   No
|		       2   .QBUYE   Yes
|
|  21	      .QBRES   Allows the job to  be  restarted  after	a  system
|		       failure.    For	use  with  BATCH  requests  only.
|		       Arguments:
|
|		       1   .QBRNO   No
|		       2   .QBRYE   Yes
|
|  22	      .QBLOG   Indicates the conditions upon which a log file  is
|		       to  be  generated.  Appropriate for use with BATCH
|		       jobs only.  Arguments:
|
|		       1   .QBLNL   No log file is to be generated.
|		       2   .QBLLG   Always generate a log file.
|		       3   .QBLLE   Generate a log file only if an  error
|				    occurs.
|
|  23	      .QBACT   Indicates  the  account	to  be	charged  for  job
|		       execution.   For  use  with all queuing functions.
|		       Argument:  ASCIZ text (account as ASCII string).
|
|  25	      .QBNOD   Associates    a	  node	  with	  the	 request.
|		       Interpretation  depends	on  the  context.   For a
|		       write-to-operator, this indicates that the message
|		       is   destined  for  operators  only  on	the  node
|		       specified.  For PRINT requests, it  indicates  the
|		       node on which the printing is to occur.	Argument:
|		       Node name in SIXBIT.

|  27	      .QBOID   Identifies the user by  his  logged  in	directory
|		       number.	  For	use  with  any	queuing  request.
|		       Argument:  user number.
|
|  30	      .QBNOT   Enables	the  requestor	to   be   notified   upon
|		       completion  of  the job.  For use with any queuing
|		       request.  Arguments:  0 if no notify,  1  (.QBNTY)
|		       to notify.
|
|  31	      .QBBLT   Indicates   how	 the   log   file    should    be
|		       created/disposed.   Appropriate for use with BATCH
|		       jobs only.  Arguments:
|
|		       1   .QBBND   Append  log  file  for  this  job  to
|				    currently existing log file.
|		       2   .QBBDE   Supersede the currently existing  log
|				    file.
|		       3   .QBBSP   Spool the log file on  completion  of
|				    the job.
|
|  32	      .QBJBN   Sets a jobname other than the  default  (generated
|		       from the first 6 characters of the filename in the
|		       queue request).	For use with any of  the  queuing
|		       functions.   Argument:	Jobname in SIXBIT (from 1
|		       to 6 SIXBIT characters).  This jobname can be used
|		       for  modifications  to the request with the MODIFY
|		       and CANCEL commands.
|
|  34	      .QBNTE   Allows up to 12 SIXBIT characters to be associated
|		       with  a	queuing  request as a note.  For use with
|		       output (PRINT) requests.  Argument:  SIXBIT text.
|
|  35	      .QBBGN   Specifies the beginning of processing of the  job.
|		       For   use  with	any  of  the  queuing  functions.
|		       Depending on the queuing function,  the	attribute
|		       can  have  different meanings.  For PRINT jobs, it
|		       indicates the number of the page on which printing
|		       is   to	begin.	 For  BATCH  jobs,  it	indicates
|		       processing  is  to  start  at  the   line   number
|		       indicated.   Argument:  Number indicating where to
|		       begin.
|
|  36	      .QBPRI   Allows the user to specify the priority of the job
|		       for  scheduling	purposes  only.  For use with any
|		       queuing	requests.    Argument:	  Number   0<#<63
|		       indicating  priority.  There are some restrictions
|		       on   which   priorities	 may   be   selected   by
|		       nonprivileged users.
|
|  40	      .QBMSG   Used to	send  a  text  message	from  one  GALAXY
|		       component   to	another,  generally  for  display
|		       purposes.  For use with write-to-operator messages
|		       (with  or  without  reply).  Argument:  ASCIZ text
|		       (text containing message).
|
|  41	      .QBTYP   Used to	send  a  text  message	from  one  GALAXY
|		       component   to	another,  generally  for  display
|		       purposes.  The sender of this type of  message  is
|		       checked	for  privileges,  since  it  replaces the
|		       header information of  the  OPR	display  message.
|		       For  use  with write-to-operator messages (with or
|		       without	reply).   Argument:   ASCIZ  text   (text
|		       containing message).

|  53	      .QBDTY   Indicates the type of display  message.	 For  use
|		       with  write  to operator messages (with or without
|		       reply).	Arguments:
|
|		       1   .QBCHK   Indicates BUGCHK display (monitor use
|				    only).
|		       2   .QBINF   Indicates BUGINF display (monitor use
|				    only).
|		       3   .QBSYS   Indicates  SYSTEM  messages  (monitor
|				    use only).
|
|  QUEUE% ERROR MNEMONICS:
|
|  QUEUX1:   Illegal argument list passed to QUEUE%%
|  QUEUX2:   Invalid function
|  QUEUX3:   Fatal error returned from application
|  QUEUX4:   Invalid message returned from ORION
|  QUEUX5:   Insufficient system resources (Job Storage Block full)
|  QUEUX6:   Illegal response length
|  QUEUX7:   Argument block too small



			     RCDIR     JSYS 553

   Translates the given directory  string  to  its  corresponding  36-bit
   directory number.

   A directory string contains a structure name  and  a  directory  name.
   The structure name must be followed by a colon, and the directory name
   must be enclosed in either square  brackets	or  angle  brackets.   No
   spaces  can	appear between the structure name and the directory name.
   Here is an example of a directory string:

				   PS:<SMITH>

   Recognition cannot be used on the structure name.   If  the	structure
   name  is  omitted  from  the string, the user's connected structure is
   used.  Wildcards cannot be used in the structure name field.

   Recognition can be used on the directory name field.  Recognition  can
   also  be  used on part of the directory name field, so that a user can
   employ recognition when typing  the	name  of  a  subdirectory.   When
   recognition	is  used  on  the directory name field, and the directory
   name is not ambiguous, the closing bracket is not required.

   Wildcards can be used in the directory  name  field.   Repeated  RCDIR
   calls  can  be executed to obtain the numbers of the directories whose
   names match the given directory string.  After the  first  call,  each
   subsequent  RCDIR  call  returns the number of the next directory that
   matches the directory string.

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

   ACCEPTS IN AC1:  flag bits in the left half

	      AC2:  byte pointer to ASCIZ string to be translated, a JFN,
		    a  36-bit  user  number, or a 36-bit directory number
		    (given for the purpose of checking its validity)

	      AC3:  36-bit directory number (given when stepping  to  the
		    next directory in a group of directories)

   RETURNS     +1:  always, with

		    AC1 containing flag bits in the left half

		    AC2 containing an updated byte pointer (if a  pointer
			was  supplied  as  the argument).  If recognition
			was used, this pointer reflects the remainder  of
			the  string  that  was	appended  to the original
			string.

		    AC3 containing a 36-bit directory number if execution
			of the call was successful

   Th flag bits supplied in the left half of AC1 are as follows:

   B14(RC%PAR)	  Allow partial recognition on the  directory  name.   If
		  the  name  given  matches  more than one directory, bit
		  RC%AMB is set on return and the string  is  updated  to
		  reflect the unique portion of the directory name.

		  If bit RC%PAR is not set, the name given  matches  more
		  than one directory, and recognition is being used, then
		  bit RC%AMB is set on return,	but  the  string  is  not
		  updated.

   B15(RC%STP)	  Step to the next directory in the group and return  the
		  number  of  that  directory.	 AC1 must have bit RC%AWL
		  set.	AC2 must contain  a  pointer  to  a  string  that
		  contains  wildcard  characters  in  the  directory name
		  field.  AC3 must contain a directory number.

   B16(RC%AWL)	  Allow  the   directory   name   to   contain	 wildcard
		  characters.	 The  directory  name  must  include  its
		  terminating bracket.	No recognition is performed on	a
		  directory name that contains wildcard characters.

		  This bit must be set if bit RC%STP is also set.

   B17(RC%EMO)	  Match the given string exactly.  When both  the  RC%PAR
		  and  RC%EMO bits are on, recognition is not used on the
		  string, and the string is matched exactly.

		  If this bit is off, recognition is used on the string.

   The flag bits returned in the left half of AC1 are as follows:

 
   On success

   B0(RC%DIR)	  Directory can be used only by connecting to it.  (It is
		  a files-only directory.)

		  If this bit is off, the user can also login to (if  the
		  directory  is  on  the public structure) or access this
		  directory.

   B1(RC%ANA)	  Obsolete

   B2(RC%RLM)	  All messages from <SYSTEM>MAIL.TXT are  repeated  every
		  time	the  user  logs in.  If this bit is off, messages
		  are printed only once.

   B6(RC%WLD)	  The directory name given contained wildcard characters.

 
   ON failure

   B3(RC%NOM)	  No match was found for the string given.  This  bit  is
		  returned  if	either	1) bit RC%EMO was on in the call,
		  and a string was  given  that  matched  more	than  one
		  directory;   or  2)  the  syntax  of	the fields in the
		  string is correct, but the structure is not mounted, or
		  the directory does not exist.

   B4(RC%AMB)	  The argument given was ambiguous.  This bit is returned
		  if  bit  RC%EMO was off, and if the string given either
		  matched more than one directory, or did not include the
		  beginning bracket of the directory name field.

   B5(RC%NMD)	  There  are  no  more	directories  in  the   group   of
		  directories.	This bit is returned if RC%STP was on and
		  the numbers of all the directories in  the  group  have
		  been returned.

   The RCDIR monitor call can be used in one of two  ways.   The  simpler
   way	is  to	translate  a directory string to its corresponding 36-bit
   directory number.  The string can be  either  recognized,  or  matched
   exactly.

   The second way of using the RCDIR  call  is	to  provide  a	directory
   string  that  corresponds  to  more	than  one directory, and then use
   repeated RCDIR calls to step through all the directories matching  the
   given string.  Each call obtains the number of the next directory that
   matches the given string.  When no more directories match the  string,
   the RC%NMD bit is set on the call's return.

   When obtaining a single directory number, RCDIR can accept  a  JFN,	a
   36-bit  user number, or a directory number.	When a JFN is supplied as
   an argument, the number returned is that of the  directory  containing
   the	file  associated with the JFN.	When a user number is supplied as
   an argument, the number returned is the logged-in directory	for  that
   user.   When a directory number is supplied, the RCDIR call checks the
   number's validity.	If  the  number  is  valid,  the  RCDIR  call  is
   successful, and this same number is returned.

   When obtaining  several  directory  numbers,  RCDIR	requires  AC2  to
   contain  a  pointer	to  a  directory  string  that	contains wildcard
   characters.	If the string does not contain wildcards, or if any thing
   other  than a string pointer is given in AC2, the stepping function is
   not performed, and the call returns with the RC%NMD bit set.

   Furthermore, the first RCDIR call executed must have bit RC%AWL set in
   AC1,  and  the pointer to the string in AC2.  If execution of the call
   is successful, AC3 contains the number of the directory  corresponding
   to  the  first directory that matches the given directory string.  For
   example, if the string given is <SMITH*> and the call  is  successful,
   the number returned corresponds to <SMITH>.

   Subsequent RCDIR calls must set bits RC%STP and RC%AWL in  AC1,  reset

   the pointer in AC2 (because it is updated on a successful RCDIR call),
   and leave in AC3 the directory number returned from the previous RCDIR
   call.   The	directory number in AC3 is accepted only if RC%STP is set
   in AC1, and a pointer to a string containing  wildcard  characters  is
   given in AC2.

   On successful execution of each  subsequent	RCDIR  call,  the  number
   returned  in AC3 corresponds to the next directory in the group.  When
   the number of the last directory in the group  has  been  returned,	a
   subsequent  RCDIR  call sets bit RC%NMD in AC1;  the content of AC3 is
   indeterminate.

   The RCUSR monitor call can be used to translate a user name string  to
   its	corresponding user number.  The DIRST monitor call can be used to
   translate  either  a  directory  number  or	a  user  number  to   its
   corresponding string.

   Generates an illegal instruction interrupt on error conditions below.

   RCDIR ERROR MNEMONICS:

   RCDIX1:   Insufficient system resources
   RCDIX2:   Invalid directory specification
   RCDIX3:   Invalid structure name
   RCDIX4:   Monitor internal error
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX8:    File is not on disk
   DESX10:   Structure is dismounted
   STRX01:   Structure is not mounted



			      RCM     JSYS 134

   Returns the word mask of the  activated  interrupt  channels  for  the
   specified  process.	(Refer to Section 2.6.1 and the AIC and DIC calls
   for information on  activating  and	deactivating  software	interrupt
   channels.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with 36-bit  word  in  AC1,  with  bit  n  on
		    meaning channel n is activated

   Generates an illegal instruction interrupt on error conditions below.

   RCM ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RCUSR     JSYS 554

   Translates the given user name string to its corresponding 36-bit user
   number.   The user name string consists of the user's name without any
   punctuation.  The string must be associated with a  directory  on  the
   public  structure  (usually	called	PS:)  that  is	not  a files-only
   directory.

   Recognition can be used on the string.  In addition,  the  string  can
   contain wildcard characters.

   ACCEPTS IN AC1:  flag bits in the left half

	      AC2:  byte pointer to ASCII string to be translated

	      AC3:  36-bit user number (given when stepping to	the  next
		    user name in a group)

   RETURNS     +1:  always, with

		    AC1 containing flag bits in the left half

		    AC2 containing   an   updated   byte   pointer.    If
			recognition  was  used, this pointer reflects the
			remainder of the string that is appended  to  the
			original string.

		    AC3 containing a 36-bit user number if  execution  of
			the  call  was	successful.  An example of a user
			number is:  500000,,261.

   The flag bits supplied in the left half of AC1 are  as  follows.   For
   additional  information on these bits, refer to the RCDIR monitor call
   description.

   B14(RC%PAR)	  Allow partial recognition on the user name string.

   B15(RC%STP)	  Step to the next user name in the group.

   B16(RC%AWL)	  Allow the user name to contain wildcard characters.

   B17(RC%EMO)	  Match the given string exactly.

   The flag bits returned in the left half of AC1 are  as  follows.   For
   additional  information on these bits, refer to the RCDIR monitor call
   description.

   On success

   B1(RC%ANA)	  Obsolete

   B2(RC%RLM)	  User sees all messages from <SYSTEM>MAIL.TXT every time
		  he  logs  in.   If  this  bit is off, the user sees the
		  messages only once.

   B6(RC%WLD)	  The user name given contained wildcard characters.

   On failure

   B3(RC%NOM)	  No match was found for the string given.  This bit will
		  be  on  if  the  string  given  refers  to a files-only
		  directory, if there is no directory  on  PS:	 that  is

		  associated with the user name string, or bit RC%EMO was
		  on in the call and a string was given that matched more
		  than one user.

   B4(RC%AMB)	  The string given was ambiguous because it matched  more
		  than one user.

   B5(RC%NMD)	  There are no more user names in the group.

   The RCDIR monitor call can be used to translate a directory string  to
   its	corresponding  directory  number.   The DIRST monitor call can be
   used to translate either a user number or a directory  number  to  its
   corresponding string.

   Generates an illegal instruction interrupt on error conditions below.

   RCUSR ERROR MNEMONICS:

   RCUSX1:   Insufficient system resources
   RCDIX4:   Monitor internal error
   STRX07:   Invalid user number
   STRX08:   Invalid user name



			     RCVIM     JSYS 751

   Retrieves a message from the ARPAnet special message queue.	The queue
   must have been previously assigned with the ASNSQ JSYS.

   RESTRICTIONS:    for ARPAnet systems only.

   ACCEPTS IN AC1:  B0		 If on, the user will  receive	a  96-bit
				 leader.  If off, the user will receive a
				 32-bit leader.
		    B1		 If on, the user will receive data in the
				 high-order  32  bits of each word of the
				 message.  If off, the user will  receive
				 data  in all 36 bits of each word of the
				 message.
		    B18-35:	 Special Queue Header

	      AC2:  address where extended message is to be stored

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, message block stored at address given in AC2

   The RCVIM JSYS will block until the message is received.

   See SNDIM JSYS for a description of the message format.

   RCVIM ERROR MNEMONICS:

   SQX1:     Special network queue handle out of range
   SQX2:     Special network queue not assigned



				 RCVIN%     JSYS 755
|
|  Receives an Internet message.
|
|  ACCEPTS IN AC1:  flags in the left half and an Internet  queue  handle
|		    in the right half.
|
|	      AC2:  byte pointer to buffer where message should be placed
|
|	      AC3:  not used, must be 0
|
|  RETURNS     +1:  failure, with error code in AC1
|
|	       +2:  success
|
|  Flags
|
|  Bits     Symbol   Meaning
|
|  B0	    RIQ%NW   If set, causes  RCVIN%  to  take  the  error  return
|		     rather than wait for a message.
|
|  Message Buffer
|
|  Word  Symbol   Meaning
|
|   0	 .INQBH   Maximum length of the message  buffer  (including  this
|		  word)  in the right half.  On return, the monitor fills
|		  in the actual length of the message plus one	(counting
|		  the count word) in the left half.
|
|   1	 .INQIH   First word of the IP header and message
|
|  RCVIN% ERROR MNEMONICS:
|
|  SQX1:     Special network queue handle out of range
|  SQX2:     Special network queue not assigned
|  SNDIX1:   Invalid message size
|  SNDIX2:   Insufficient system resources (no buffers available)
|  SNDIX3:   Illegal to specify NCP lines 0 - 72
|  SNDIX4:   Invalid header value for this queue
|  SNDIX5:   IMP down

 
			    RCVOK%     JSYS  575

 
   Allows the access-control program (written  by  the	installation)  to
   service  an	approval request in the GETOK% request queue after a user
   program has issued a GETOK% JSYS.

   RESTRICTIONS:    Requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  Address of argument block

	      AC2:  Length of argument block

   RETURNS     +1:  always

 
   Argument Block (returned):

   Word   Symbol     Contents

    0	  .RCFCJ     Function code,,job number of requestor
    1	  .RCUNO     User number
    2	  .RCCDR     Connected directory
    3	  .RCRQN     Request number
    4	  .RCNUA     # args actually passed to RCVOK% block,,# user  args
		     supplied in user block
    5	  .RCARA     Address of user arguments
    6	  .RCCAP     Capabilities enabled
    7	  .RCTER     Controlling terminal number (not device designator);
|		     or -1 if controlling terminal is detached
    10	  .RCRJB     Requested job number

    11		     User arguments
    .		     ..
    .		     ..
    11+n	     ..

   The argument block returned	contains  two  major  segments,  the  job
   section,  which  contains  information  about  the job that issued the
   GETOK% JSYS,  and  the  user  argument  section,  which  contains  the
   arguments  the  user supplied with the GETOK% call.	The user argument
   section immediately follows the job	section.   However,  as  the  job
   section's  length  may  grow  with  future  releases  of  TOPS-20, the
   access-control program should extract the address of the user argument
   section  from word .RCARA of the RCVOK% argument block.  The following
   sequence of instructions illustrates how to	index  through	the  user
   argument section of the RCVOK% argument block:

		;Build AOBJN pointer
		HLRZ	T1,ARGBLK+.RCNUA	;Get # user args passed
		MOVN	T1,T1			;Negate
		HRLZS	T1			;Move to left half-word
		HRR	T1,ARGBLK+.RCARA	;Get address of user args

	LP:	MOVE	T2,(T1) 		;Get user argument

		...
		...

		AOBJN	T1,LP

   If the access-control program wishes to reject the  requested  access,
   the	program  returns  an  error  code in AC2.  It can also provide an
   error string, which is copied to the caller of GETOK%  if  the  caller
   has provided a byte pointer for it.

   Generates an illegal instruction interrupt on error conditions below.

   RCVOK% ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   GOKER3:   JSYS not executed within ACJ fork



			     RDTTY     JSYS 523

   Reads input from  the  primary  input  designator  (.PRIIN)	into  the
   caller's  address space.  Input is read until either a break character
   is encountered or the given byte count is exhausted, whichever  occurs
   first.  Output generated as a result of character editing is output to
   the primary output designator (.PRIOU).

   The RDTTY call handles the following editing functions:

	1.  Delete the last character input (DELETE).

	2.  Delete back to the last punctuation character (CTRL/W).

	3.  Delete back to the beginning of the current line or,  if  the
	    current  line is empty, back to the beginning of the previous
	    line (CTRL/U).

	4.  Retype the current line from its beginning or, if the current
	    line is empty, retype the previous line (CTRL/R).

	5.  Accept the next character without regard to its usual meaning
	    (CTRL/V).

   By handling these functions, the RDTTY call	serves	as  an	interface
   between the terminal and the user program.

   ACCEPTS IN AC1:  byte pointer to  string  in  caller's  address  space
		    where input is to be placed

	      AC2:  B0(RD%BRK)	Break on CTRL/Z or ESC.
		    B1(RD%TOP)	Break on  CTRL/G,  CTRL/L,  CTRL/Z,  ESC,
				carriage return, line feed.
		    B2(RD%PUN)	Break on punctuation (see below).
		    B3(RD%BEL)	Break on end of line (carriage return and
				line feed, or line feed only).
		    B4(RD%CRF)	Suppress a carriage return and	return	a
				line feed only.
		    B5(RD%RND)	Return to user program if user	tries  to
				delete	beyond	beginning  of  the  input
				buffer (e.g.,  user  types  a  CTRL/U  or
				DELETE	past  the  first character in the
				buffer).  If this bit  is  not	set,  the
				call  rings the terminal's bell and waits
				for more input.
		    B7(RD%RIE)	Return to user program if input buffer is
				empty.	 If this bit is not set, the call
				waits for more input.
		    B9(RD%BEG)	Return to the user program  if	the  user
				attempts  to edit beyond the beginning of
				the input buffer.
		    B10(RD%RAI) Convert  lowercase  input  to	uppercase
				input.
		    B11(RD%SUI) Suppress CTRL/U indication (i.e., do  not
				print  XXX,  and on display terminals, do
				not  delete  the  characters   from   the
				screen).
		    B18-35	Number of bytes available in the  string.
				The  input  is terminated when this count
				is exhausted, even if the specified break
				character has not yet been typed.

		    If the left half of AC2 is 0, the input is terminated
		    on end of line only.

	      AC3:  byte pointer to prompting-text (CTRL/R buffer), or	0
		    if	no  text.  This text, followed by any text in the
		    input buffer, is output if the user types  CTRL/R  in
		    his first line of input.  If no CTRL/R text exists or
		    the user types CTRL/R on other than the first line of
		    input,  only  the  text  on  the current line will be
		    output.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated byte  pointer  in	AC1,  appropriate
		    bits  set  in the left half of AC2, and updated count
		    of available bytes in the right half of AC2

   The bits returned in the left half of AC2 on a successful return are:

		    B12(RD%BTM) Break character terminated the input.  If
				this  bit  is  not  set,  the  input  was
				terminated because  the  byte  count  was
				exhausted.
		    B13(RD%BFE) Control  was  returned	to  the   program
				because  the  user tried to delete beyond
				the beginning of  the  input  buffer  and
				RD%RND was on in the call.
		    B14(RD%BLR) The backup limit for editing was reached.

 
						  NOTE

				    Bits not described	are  reserved
				    for  use  by  the  monitor.   The
				    state of these bits on completion
				    of the RDTTY call is undefined.

 
   The punctuation break character set (RD%PUN) is as follows:

	CTRL/A-CTRL/F	    ASCII codes 34-36
	CTRL/H-CTRL/I	    ASCII codes 40-57
	CTRL/K		    ASCII codes 72-100
	CTRL/N-CTRL/Q	    ASCII codes 133-140
	CTRL/S-CTRL/T	    ASCII codes 173-176
	CTRL/X-CTRL/Y

   Upon completion of the call, the terminating character  is  stored  in
   the	string, followed by a NULL (unless the byte count was exhausted).
   Also, any CTRL/V, along with the character following it, is stored  in
   the string.

   RDTTY ERROR MNEMONICS:

   RDTX1:    Invalid string pointer
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			      RELD     JSYS 71

   Releases one or all devices assigned to the job.   When  a  device  is
   released  by  the job, the resource allocator receives an IPCF packet.
   (Refer to the ALLOC monitor call description for  the  format  of  the
   packet sent to the allocator.)

   ACCEPTS IN AC1:  device designator,	or  -1	to  release  all  devices
		    assigned to this job

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The ASND monitor call can be used to assign a device to the caller.

   If this JSYS is issued for a device on which the user has an open JFN,
   an error will be returned.

   RELD ERROR MNEMONICS:

   DEVX1:    Invalid device designator
   DEVX2:    Device already assigned to another job
   DEVX6:    Job has open JFN on device



			    RELIQ%     JSYS 757
|
|  Releases ownership of an Internet queue so that other jobs can  assign
|  it.
|
|  ACCEPTS IN AC1:  An Internet queue handle,  or  -1  for  all  Internet
|		    queue handles, or a job process handle
|
|	      AC2:  Not used, must be 0
|
|	      AC3:  Not used, must be 0
|
|  RETURNS     +1:  Failure, with error code in AC1
|
|	       +2:  Success
|
|  RELIQ% ERROR MNEMONICS:
|
|  SQX1:     Special network queue handle out of range
|  SQX2:     Special network queue not assigned
|
|
|
|
|



			    RELSQ%     JSYS 753
|
|  Deassigns  the  ARPANET  special  message  queue.   (The  LGOUT   JSYS
|  deassigns  all  special message queues.) All pending messages relative
|  to the specified queue(s) are discarded.
|
|  RESTRICTIONS:    for ARPANET systems only.
|
|  ACCEPTS IN AC1:  special queue handle (returned by ASNSQ),  or  -1  to
|		    deassign all special queues.
|
|  RETURNS     +1:  always
|
|  RELSQ functions as a no-op if an unassigned queue is specified in AC1.



			     RESET     JSYS 147

|  Closes all files at or below the  current  process  and  releases  all
|  JFNs;   kills  all inferior processes;  clears the PSI for the current
|  process;   sets  TT%WAK,  TT%ECO,  and  .TTASI  of	the   controlling
|  terminal's  JFN  mode word;	releases all PIDs of the current process;
|  dequeues all ENQ requests for the  current  process,  clears  PA1050's
|  entry  vector;   clears  any  software  traps  set  with  SWTRP%, and,
|  releases all process handles inferior to the current process or killed
|  with KFORK.

   RETURNS     +1:  always

   The RESET monitor call performs the following:

	1.  Closes all files at or below the current process and releases
	    all  JFNs.	 If  a	file is nonexistent (i.e., has never been
	    closed), it is closed and then expunged.

	2.  Kills all inferior processes.

	3.  Clears the current process' software interrupt  system.   The
	    channel  table  and  priority  level  table  addresses remain
	    unchanged from any previous settings.

	4.  Sets the following fields of the controlling  terminal's  JFN
	    mode word (refer to Section 2.4.9.1):

	    TT%WAK(B18-23)  to wake up on every character
	    TT%ECO(B24)     to cause echoing
	    .TTASI(B29)     to translate both echo and output (ASCII data
			    mode)

	    Remaining fields of the mode word are not changed.

	5.  Releases all of the current process' PIDs.

	6.  Dequeues all of the current process' ENQ requests.

	7.  Clears the compatibility package's entry vector.

	8.  Releases all process handles that can be released.	(Refer to
	    the RFRKH call description.)



			     RFACS     JSYS 161

   Returns the ACs of the specified process.

   ACCEPTS IN AC1:  process handle

	      AC2:  address of the beginning of a 20-word  (octal)  table
		    in	the caller's address space where the AC values of
		    the specified process are to be stored

   RETURNS     +1:  always

   The SFACS monitor call can be used to set  the  ACs	for  a	specified
   process.

   Generates an illegal instruction interrupt on error conditions below.

   RFACS ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX4:   Process is running
   FRKHX8:   Illegal to manipulate an execute-only process



			     RFBSZ     JSYS 45

   Returns the byte size for a specific opening of a file.  (Refer to the
   OPENF or SFBSZ call description for setting the byte size.)

   ACCEPTS IN AC1:  JFN

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, byte size right-justified in AC2

   RFBSZ ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open



			     RFCOC     JSYS 112

   Returns the control character output  control  (CCOC)  words  for  the
   specified terminal.	(Refer to Section 2.4.9.2.)

   ACCEPTS IN AC1:  file designator

   RETURNS     +1:  always, with output control words in AC2 and AC3

   The CCOC words consist of 2-bit  bytes,  each  byte	representing  the
   output  control  for  one  of  the  ASCII  codes  0-37.   If the given
   designator is not associated with  a  terminal,  the  CCOC  words  are
   returned  in  AC2 and AC3 with each 2-bit byte containing a value of 2
   (send actual code and account format action).

   The SFCOC monitor call can be  used	to  set  the  CCOC  words  for	a
   specified terminal.

   Generates an illegal instruction interrupt on error conditions below.

   RFCOC ERROR MNEMONICS:

   TTYX01:   Line is not active



			     RFMOD     JSYS 107

   Returns the JFN mode word associated with the specified file.   (Refer
   to  Section 2.4.9.1.)  The MTOPR monitor call should be used to return
   the page length and width fields,  especially  when	the  fields  have
   values  greater  than  127.	 The RFMOD call returns these fields as 1
   when their values are greater than 127.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  always, with mode word in AC2

   If the designator is not a terminal, the RFMOD call returns in  AC2	a
   word in the following format

    7B3+^D66B10+^D72B17+ 4 mode bits from the OPENF for the designator

   This setting of the left half of AC2 indicates that the designator has
   mechanical  form  feed, mechanical tab, lower case, page length of 66,
   and page width of 72.

   The SFMOD and STPAR monitor calls can be used to set various fields of
   the JFN mode word.

   RFMOD ERROR MNEMONICS:

   TTYX01:   Line is not active



			     RFORK     JSYS 155

   Resumes one or more processes that had  been  directly  frozen.   This
   monitor  call  does	not  resume  a	process  that has been indirectly
   frozen.  (Refer to Section 2.7.3.1.) Also, the RFORK  call  cannot  be
   used  to  resume a process that is suspended because of a monitor call
   intercept.  (Refer to the UTFRK call.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always

   The RFORK monitor call is a no-op if the referenced process(s) was not
   directly frozen.

   The FFORK monitor call can be used to freeze one or more processes.

   Generates an illegal instruction interrupt on error conditions below.

   RFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RFPOS     JSYS 111

   Returns the current position  of  the  specified  terminal's  pointer.
   (Refer  to  Section 2.4.9.1 for information on page lengths and widths
   of terminals.)

   ACCEPTS IN AC1:  device designator

   RETURNS     +1:  always, with AC2 containing position  within  a  page
		    (i.e.,  line  number)  in the left half, and position
		    within a line (i.e., column number) in the right half

   AC2 contains 0 if the designator is not associated with a terminal.

   The SFPOS monitor call  can	be  used  to  set  the	position  of  the
   terminal's pointer.

   Generates an illegal instruction interrupt on error conditions below.

   RFPOS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     RFPTR     JSYS 43

   Returns the current position of the specified file's pointer.

   ACCEPTS IN AC1:  JFN

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, byte number in AC2

   The SFPTR monitor call can be used to set the position of  the  file's
   pointer.

   RFPTR ERROR MNEMONICS:

   DESX1:	    Invalid source/destination designator
   DESX2:	    Terminal is not available to this job
   DESX3:	    JFN is not assigned
   DESX4:	    Invalid use of terminal designator or string pointer
   DESX5:	    File is not open



			     RFRKH     JSYS 165

   Releases the specified handle of a process.	A handle can be  released
   only  if  it describes either an existent process inferior to at least
   one other process in the job or a process that  has	been  killed  via
   KFORK (i.e., a nonexistent process).

   ACCEPTS IN AC1:  process handle, or -1 to release all relative handles
		    that can be released

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The process handles released when AC1 is -1 are the ones released on a
   RESET or a KFORK monitor call.

   RFRKH ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RFSTS     JSYS 156

   Returns the status of the specified process.

   SHORT FORM:

   ACCEPTS IN AC1:  0,,process handle

   RETURNS     +1:  always, with the status word in AC1 and the PC in AC2

 
   Flags:

   B0-17	     Unused, must be zero.

   The process status word has the following format:

	B0(RF%FRZ)	    The process is frozen.  If this bit  is  off,
			    the process is not frozen.

	B1-17(RF%STS)	    The  status  code  for  the   process.    The
			    following values are possible:

			    Value   Symbol		  Meaning

			      0     .RFRUN	The process is runnable.

			      1     .RFIO	The process is	dismissed
						for I/O.

			      2     .RFHLT	The process is	dismissed
						by    voluntary   process
						termination   (HFORK   or
						HALTF)	 or   was   never
						started.

			      3     .RFFPT	The process is	dismissed
						by     forced	  process
						termination.	   Forced
						termination  occurs  when
						bit  17(SC%FRZ)  of   the
						process  capability  word
						is not set.

			      4     .RFWAT	The process is	dismissed
						waiting    for	  another
						process to terminate.

			      5     .RFSLP	The process is	dismissed
						for a specified amount of
						time.

			      6     .RFTRP	The process is	dismissed
						because  it  attempted to
						execute a call	on  which
						an intercept has been set
						by its superior (via  the
						TFORK call).

			      7     .RFABK	The process is	dismissed
						because it encountered an
						instruction on	which  an
						address break was set (by
						means of the ADBRK call).
|
|			     10     .RFSIG	The process is	dismissed
|						because  it  attempted to

|						perform I/O on the signal
|						JFN.

       B18-35(RF%SIC)	    The number of the software interrupt  channel
			    that caused the forced process termination.

   The RFSTS call returns with -1 (fullword)  in  AC3  if  the	specified
   handle  is  assigned  but  refers  to  a  deleted  process.	 The call
   generates  an  illegal  instruction	interrupt  if	the   handle   is
   unassigned.

 
   LONG FORM:

   ACCEPTS IN AC1:  flags,,process handle

	      AC2:  address of status return block (used  for  long  form
		    only)

   RETURNS     +1:  always

   Flags:

   B0	  RF%LNG       Long form call (must be on)

   B1-17	       Unused, must be zero.

   In the long form call, RF%LNG is set  in  AC1  and  AC2  contains  the
   address  of a status-return block.  On the return, AC1 and AC2 are not
   modified.  The status-return block has the following format:

   Word     Symbol     Meaning

    0	    .RFCNT     Count of words returned in this block in the  left
		       half,  and  count  of  maximum  number of words to
		       return in right half (including this  word).   The
		       right half of this word is specified by the user.

    1	    .RFPSW     Process status  word.   This  word  has	the  same
		       format as AC1 on a return from a short call.  If a
		       valid,  but   unassigned,   process   handle   was
		       specified  in  AC1, then this word contains -1 and
		       no other words are returned.

    2	    .RFPFL     Process	PC  flags.   These  are  the  same  flags
		       returned in AC2 on a short call.

    3	    .RFPPC     Process PC.  This is the address;   no  flags  are
		       returned in this word.

    4	    .RFSFL     Status flag word.

		       Flags:

		       Bit    Symbol	Meaning

		       B0     RF%EXO	Process is execute-only
   Generates an illegal instruction interrupt on error conditions below.

   RFSTS ERROR MNEMONICS:

   DECRSV:   DEC-reserved bits not zero
   FRKHX1:   Invalid process handle

   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RFTAD     JSYS 533

   Returns the dates and times associated with the specified file.

   ACCEPTS IN AC1:  source designator

	      AC2:  address of argument block

	      AC3:  length of argument block

   RETURNS     +1:  always, with dates returned in the argument block

   The format of the argument block is as follows:

      Word   Symbol			   Meaning

       0     .RSWRT    Internal date and time file was last written.

       1     .RSCRV    Internal date and time file was created.

       2     .RSREF    Internal date and time file was last referenced.

       3     .RSCRE    System date and time of last write by the monitor.
		       (The  COPY  and RENAME commands in the EXEC change
		       this word, for example.)

       4     .RSTDT    Tape-write date and time for archived or  migrated
		       files.

       5     .RSNET    Online expiration date and time.  May  be  a  date
		       and  time  (in internal format) or an interval (in
		       days).  Intervals are limited to half-word values.

       6     .RSFET    Offline expiration date and time.  May be  a  date
		       and  time  (in internal format) or an interval (in
		       days).  Intervals are limited to half-word values.

   On a successful return, the values for the number of  words	specified
   in  AC3  are  returned  in  the argument block.  Words in the argument
   block contain -1 if any one of the following occurs:

	1.  The corresponding date does not exist for the file.

	2.  The designator is not associated with a file.
|
|	3.  The corresponding date is not currently  assigned  (that  is,
|	    the argument block contains more than 4 words).

   The following table illustrates which JSYS's set the  file  dates  and
   times:

    Word     GTJFN   OPENF   OPENF   CLOSF   SFTAD   RNAMF   ARCF
		     Read    Write   Write

   .RSWRT      -       -      Set      -      Set     FDB      -
   .RSCRV     Set      -       -       -      Set     FDB      -
   .RSREF      -      Set      -       -      Set     Set      -
   .RSCRE     Set      -       -      Set     Set*    FDB      -
   .RSTDT      -       -       -       -      Set*    FDB     Set*
   .RSNET      -       -       -       -      Set     FDB      -
   .RSFET      -       -       -       -      Set     FDB      -

   LEGEND:

     *	  Requires WHEEL or OPERATOR capability enabled.
     FDB  This word copied from source FDB to destination FDB.

   Generates an illegal instruction interrupt on error conditions below.

   RFTAD ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators



			      RIN     JSYS 54

|  Inputs a byte nonsequentially (that is, random byte	input)	from  the
   specified file.  The size of the byte is that given in the OPENF call.
   The RIN call can be used only when reading data from disk files.

   ACCEPTS IN AC1:  JFN

	      AC3:  byte number within the file

   RETURNS     +1:  always, with the byte right-justified in AC2

   If the end of the file is reached, AC2 contains 0.	The  program  can
   process  this  end-of-file  condition if an ERJMP or ERCAL is the next
   instruction following the RIN call.	Upon successful execution of  the
   call, the file's pointer is updated for subsequent I/O to the file.

   The ROUT monitor call can be used to output a byte nonsequentially  to
   a specified file.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   RIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   IOX1:     File is not open for reading
   IOX3:     Illegal to change pointer for this opening of file
   IOX4:     End of file reached
   IOX5:     Device or data error



			      RIR     JSYS 144

   Returns the	channel  and  priority	level  table  addresses  for  the
   specified  process.	 (Refer  to Section 2.6.3.) These table addresses
   are set by the SIR monitor call.  The process must run in one  section
   of memory.  To obtain the addresses of the channel and priority tables
   for a process that runs in multiple sections, use  the  XRIR%  monitor
   call.  (See also the XSIR% monitor call.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with the priority level table address in  the
		    left  half	of  AC2, and the channel table address in
		    the right half of AC2

   AC2 contains 0 if the SIR monitor call has not been	executed  by  the
   designated process.

   Generates an illegal instruction interrupt on error conditions below.

   RIR ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RIRCM     JSYS 143

   Returns the mask for reserved  software  interrupt  channels  for  the
   specified  process.	 A  process  is  able  to  read  its  own  or its
   inferiors' channel masks.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always,  with  the	reserved  channel  mask  for  the
		    specified process in AC2

   The SIRCM monitor call can be  used	to  set  the  mask  for  reserved
   software interrupt channels.

   Generates an illegal instruction interrupt on error conditions below.

   RIRCM ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RLJFN     JSYS 23

   Releases the specified JFNs.  A  JFN  cannot  be  released  unless  it
   either  has never been opened or has already been closed.  Also, a JFN
   cannot be released if it is currently being	assigned  by  a  process,
   unless  that process is the same as the one executing the RLJFN and is
   not at interrupt level.  The GS%ASG bit returned from a GTSTS call for
   the JFN indicates if the JFN is currently being assigned.

   ACCEPTS IN AC1:  JFN, or -1	to  release  all  JFNs	created  by  this
		    process  or  its  inferiors  that do not specify open
		    files

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   RLJFN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   RJFNX1:   File is not closed
   RJFNX2:   JFN is being used to accumulate filename
   RJFNX3:   JFN is not accessible by this process
   OPNX1:    File is already open



			      RMAP     JSYS 61

   Acquires a handle on a page in  a  process  to  determine  the  access
   allowed for that page.

   ACCEPTS IN AC1:  process handle in the left half, and  a  page  number
		    within the process in the right half

   RETURNS     +1:  always, with a handle on the page in AC1, and  access
		    information   in   AC2.   The  handle  in  AC1  is	a
		    process/file designator in the left half and  a  page
		    number  in	the  right  half.   This is called a page
		    handle.

   The access information returned in AC2 is as follows:

	B2(RM%RD)  read access allowed
	B3(RM%WR)  write access allowed
	B4(RM%EX)  execute access allowed
	B5(RM%PEX) page exists
	B9(RM%CPY) copy-on-write access

   If the page supplied in the call does not exist, RMAP returns a -1  in
   AC1 and a zero in AC2.

   Generates an illegal instruction interrupt on error conditions below.

   RMAP ERROR MNEMONICS:

   FRKHX1:   Invalid process handle



			     RNAMF     JSYS 35

   Renames an existing file.  The JFNs of both the existing file and  the
   new file specification must be closed.

   ACCEPTS IN AC1:  JFN of existing file  to  be  renamed  (i.e.,  source
		    file)

	      AC2:  JFN of new file specification (i.e., destination file
		    specification)

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, JFN in AC1 is released, and the JFN  in  AC2
		    is	associated  with  the  file  under  its  new file
		    specification

   If the JFN of the new file specification already refers to an existing
   file, the existing file's contents are expunged.

   When a file is renamed, many of the attributes of  the  existing  file
   are given to the renamed file.  The settings of the following words in
   the FDB (refer to Section 2.2.8) are copied from the existing file  to
   the renamed file.

	Word	  .FBCTL (FB%LNG, FB%DIR, FB%NOD, FB%BAT, FB%FCF)
	Word	  .FBADR
	Word	  .FBCRE
	Word	  .FBGEN (FB%DRN)
	Word	  .FBBYV (FB%BSZ, FB%MOD, FB%PGC)
	Word	  .FBSIZ
	Word	  .FBCRV
	Word	  .FBWRT
	Word	  .FBREF
	Word	  .FBCNT
	Word	  .FBUSW

   Note that the setting of FB%PRM (permanent file) does not get  copied.
   Thus,  if  a  file with bit FB%PRM on is renamed, the renamed file has
   FB%PRM off.	The existing file is left in a	deleted  state	with  its
   contents empty but its FDB existent.

   Renaming a file with tape information (an archived or  migrated  file)
   carries  the  tape  information  to	the new file name.  Renames which
   would effectively destroy a file with archive status will fail.

   RNAMF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   OPNX1:    File is already open
   RNAMX1:   Files are not on same device

   RNAMX2:   Destination file expunged
   RNAMX3:   Write or owner access to destination file required
   RNAMX4:   Quota exceeded in destination of rename
   RNAMX5:   Destination file is not closed
   RNAMX6:   Destination file has bad page table
   RNAMX7:   Source file expunged
   RNAMX8:   Write or owner access to source file required
   RNAMX9:   Source file is nonexistent
   RNMX10:   Source file is not closed
   RNMX11:   Source file has bad page table
   RNMX12:   Illegal to rename to self
   RNMX13:   Insufficient system resources



			      ROUT     JSYS 55

   Outputs a byte nonsequentially  (i.e.,  random  byte  output)  to  the
   specified  file.  The size of the byte is that given in the OPENF call
   for the JFN.  The ROUT call can be used only when writing data to disk
   files.

   ACCEPTS IN AC1:  JFN

	      AC2:  the byte to be output, right-justified

	      AC3:  the byte number within the file

   RETURNS     +1:  always

   Upon successful execution of the call, the file's pointer  is  updated
   for subsequent I/O to the file.

   The RIN monitor call can be used to input a byte nonsequentially  from
   a specified file.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   ROUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   IOX2:     File is not opened for writing
   IOX3:     Illegal to change pointer for this opening of file
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end of file
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     RPACS     JSYS 57

   Returns the accessibility of a page.

   ACCEPTS IN AC1:  Process/file designator in the left  half,	and  page
		    number within the process or file in the right half

   RETURNS     +1:  Always,   with   AC2   containing	 the	following
		    information:

		    B2(PA%RD)	read access allowed
		    B3(PA%WT)	write access allowed
		    B4(PA%EX)	execute access allowed
		    B5(PA%PEX)	page exists
		    B6(PA%IND)	indirect pointer
		    B9(PA%CPY)	copy-on-write
		    B10(PA%PRV) private page
		    B20(P1%RD)	read access allowed in first pointer
		    B21(P1%WT)	write access allowed in first pointer
		    B22(P1%EX)	execute access allowed in first pointer
		    B23(P1%PEX) page exists in first pointer
		    B27(P1%CPY) copy-on-write in first pointer

   The bits in the left half are  the  result  of  tracing  any  indirect
   pointer  chains,  and  the  bits in the right half contain information
   about the first pointer (the one in the map directly indicated by  the
   argument) only.

   The left half and right half information will be different only if  an
   indirect  pointer  was  encountered	in  the first map.  In this case,
   B6(PA%IND) is set, the left access is less than or equal to the  right
   half access;  and B9(PA%CPY) is set if it was found set at any level.

   The bits B5(PA%PEX) and B10(PA%PRV) always refer to the  last  pointer
   (first nonindirect pointer) encountered.

   The SPACS monitor call can be used to set the accessibility of a page.

   Generates an illegal instruction interrupt on error conditions below.

   RPACS ERROR MNEMONICS:

   ARGX06:   Invalid page number
   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX8:    File is not on disk
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RPCAP     JSYS 150

   Returns the capabilities for the specified process.	(Refer to Section

   2.7.1 for the description of the capability word.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with capabilities possible for  this  process
		    in	AC2, and capabilities enabled for this process in
		    AC3

   The EPCAP monitor call can be used to enable  the  capabilities  of	a
   process.

   Generates an illegal instruction interrupt on error conditions below.

   RPCAP ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX3:   Invalid use of multiple process handle



			     RSCAN     JSYS 500

   Places a text string in, or reads a text string from, the job's rescan
   buffer  (an	area of storage in the Job Storage Block).  This facility
   allows a program to receive information that will be used  as  primary
   input  for  another program before this other program reads input from
   the terminal.

   The RSCAN call has two steps:  the acceptance and the use of the  text
   string.   Each  step has a different calling sequence.  The first step
   is to accept the text string to be used as input  and  to  place  this
   string  in  the  rescan  buffer.   The  calling sequence for this step
   specifies, in AC1, a pointer to the text string  to	be  input.   Note
   that  the  string  stored in the rescan buffer is terminated by a null
   byte.

   The second step is to make the string available to the program,  which
   can	read  the  string by means of the BIN call.  The calling sequence
   for this second step specifies a function code of  0(.RSINI)  in  AC1.
   This code indicates that the last string entered at command level from
   the terminal is available for reading.

   The program executing the RSCAN call can determine when the	data  has
   been  read  by  issuing the function code 1(.RSCNT), which returns the
   number of characters remaining in the buffer.

   In other words, the first RSCAN call, specifying a  new  text  string,
   stores  the	string	in the rescan buffer, but does not cause it to be
   read.  A second RSCAN call must be given  before  the  string  can  be
   read.

   This second RSCAN causes the system to provide  input  from	the  most
   recent  string  stored, and can be given only once.	After this second
   RSCAN call, nothing will be read from the rescan buffer until  another
   RSCAN  call	specifies  a different text string.  In addition, the job
   receives input from the rescan buffer only if the source for input  in
   the	BIN  call  is the JFN of the controlling terminal.  If the source
   for input is other than the controlling terminal, input will not  come

   from the rescan buffer.

   ACCEPTS IN AC1:  byte pointer to a new text string, or 0 in	the  left
		    half and function code in the right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The defined functions are as follows:

   Function	  Symbol		   Meaning

       0	  .RSINI    Make the data  in  the  buffer  available  as
			    input  to any process in the current job that
			    is	reading   data	 from	its   controlling
			    terminal.

       1	  .RSCNT    Return the number of characters remaining  to
			    be	read  in  the buffer.  This function does
			    not cause data to be read;	 it  is  used  to
			    determine  when  all  the  data has been read
			    after making the data available.

   On a successful return, AC1 contains an  updated  byte  pointer  if	a
   pointer  was  given	in  the call.  Otherwise, AC1 contains either the
   number of characters in the rescan  buffer,	or  0  if  there  are  no
   characters.

   To clear the RSCAN buffer, supply a byte pointer (in AC1)  to  a  null
   string.

   RSCAN ERROR MNEMONICS:

   RSCNX2:   Invalid function code



			    RSMAP%     JSYS 610

   Reads a section map, and provides information about the mapping of one
   section of a fork's memory.

   ACCEPTS IN AC1:  fork handle,,section number

   RETURNS     +1:  Always,  with  map	information  in  AC1  and  access
		    information in AC2

   The map information returned in AC1 can be the following:

    -1			 no current mapping present

    0			 the mapping is a private section

    n,,m		 where n is a fork handle or a JFN, and  m  is	a
			 section  number.   If	n  is  a fork handle, the
			 mapping is an	indirect  or  shared  mapping  to
			 another  fork's  section.   If  n  is a JFN, the

			 mapping is a shared mapping to a  file  section.
			 These are called section handles.

   The access information bits returned in AC2 are the following:

      B2(SM%RD)   Read access is allowed

      B3(SM%WR)   Write access is allowed

      B4(SM%EX)   Execute access is allowed

      B5(PA%PEX)  The section exists

      B6(SM%IND)  The section was created using an indirect pointer.

   Generates an illegal instruction interrupt on error conditions below.

   RSMAP% ERROR MNEMONICS:

   ARGX23:	  Invalid section number
   ARGX28:	  Not available on this system



			     RTFRK     JSYS 322

   Returns the handle of the process that  was	suspended  because  of	a
   monitor  call  intercept  and  the  monitor	call that the process was
   attempting to execute.  The superior process monitoring the intercepts
   can	receive only one interrupt at a time.  Thus, the superior process
   should execute the RTFRK call after receiving an interrupt to identify
   the process that caused the interrupt.

   The system maintains a queue of the processes that have been suspended
   and	that are waiting to interrupt the superior process monitoring the
   intercepts.	The RTFRK call advances the processes on the queue;   and
   if the call is not executed, subsequent interrupts are not generated.

   See the description of the TFORK JSYS  for  more  information  on  the
   monitor call intercept facility.

   RETURNS     +1:  always, with AC1 containing the handle of the process
		    that  generated the interrupt, and AC2 containing the
		    monitor call instruction that caused the  process  to
		    be	suspended.   If no process is currently suspended
		    because of a monitor  call	intercept,  AC1  and  AC2
		    contain 0 on return.

   Because the process handle returned	in  AC1  is  a	relative  process
   handle, it is possible that a process is currently suspended, but that
   all relative handles are in use.  In  this  case,  the  caller  should
   release a relative process handle with the RFRKH call and then reissue
   the RTFRK call.

   Generates an illegal instruction interrupt on error conditions below.

   RTFRK ERROR MNEMONICS:

   FRKHX6:   All relative process handles in use



			     RTIW     JSYS 173

   Reads the terminal interrupt word (refer to	Section  2.6.6)  for  the
   specified  process  or  the	entire	job,  and  returns  the  terminal
   interrupt word mask.

   ACCEPTS IN AC1:  B0(RT%DIM) return  the  mask  for  deferred  terminal
			       interrupts

		    B18-35     process handle, or -5 for entire job
		    (RT%PRH)

   RETURNS     +1:  always, with the terminal interrupt mask in AC2,  and
		    the  deferred  terminal  interrupt	mask in AC3.  The
		    deferred interrupt mask  is  returned  only  if  both
		    B0(RT%DIM)	is on and the right half of AC1 indicates
		    a specific process.

   The STIW monitor call can be used to set the terminal  interrupt  word
   masks.

   Generates an illegal instruction interrupt on error conditions below.

   RTIW ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RUNTM     JSYS 15

   Returns the run time of the specified process or of the entire job.

   ACCEPTS IN AC1:  process handle, or .FHJOB (-5) for the entire job

   RETURNS     +1:  always,    with	runtime     (in     milliseconds)
		    right-justified  in AC1, a divisor to convert time to
		    seconds in AC2, and console time (in milliseconds) in
		    AC3.   AC2	always	contains  1000;   thus, it is not
		    necessary to examine its contents.

   Generates an illegal instruction interrupt on error conditions below.

   RUNTM ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   RUNTX1:   Invalid process handle -3 or -4



			      RWM     JSYS 135

   Returns the word mask for the interrupts waiting on software  channels
   for the specified process.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with

		    AC1 containing a 36-bit word with bit n  on,  meaning
			that an interrupt on channel n is waiting.

		    AC2 containing  the  status  of  the  interrupts   in
			progress.   Bit  n  on	in the left half means an
			interrupt of priority level  n	occurring  during
			execution  of user code is in progress.  Bit 18+n
			on in  the  right  half  means	an  interrupt  of
			priority  level  n  occurring during execution of
			monitor code is in progress.

   Generates an illegal instruction interrupt on error conditions below.

   RWM ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     RWSET     JSYS 176

   Releases the working set by removing all of the current process' pages
   from  its  working  set.  The pages are moved to secondary storage and
   are not preloaded the next time  the  process  is  swapped  in.   This
   operation is invisible to the user.

   RETURNS     +1:  always


			     SACTF     JSYS 62

   Sets the account to which the specified file is to be charged.

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

   ACCEPTS IN AC1:  JFN

	      AC2:  account number in bits 3-35 if bits  0-2  contain  5.
		    Otherwise,	contains  a  byte  pointer  to an account
		    string in the address space of  caller.   If  a  null
		    byte  is  not seen, the string is terminated after 39
		    characters are processed.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated string pointer in AC2

   If the account validation facility is enabled, the SACTF call verifies
   the	account  given	and  returns  an error if it is not valid for the
   caller.

   The GACTF monitor call can be used to obtain the account designator to
   which a file is being charged.

 
   SACTF ERROR MNEMONICS:

   DESX1:	    Invalid source/destination designator
   DESX3:	    JFN is not assigned
   DESX4:	    Invalid use of terminal designator or string pointer
   SACTX1:	    File is not on multiple-directory device
   SACTX2:	    Insufficient  system  resources  (Job  Storage  Block
	     full)
   SACTX3:	    Directory requires numeric account
   SACTX4:	    Write or owner access required
   VACCX0:	    Invalid account
   VACCX1:	    Account string exceeds 39 characters
   VACCX2:	    Account has expired



			     SAVE     JSYS 202

   Saves, in nonsharable format, pages of  a  process  in  the	specified
   file.   The	process  must  run  in	one section of memory.	(Refer to
   Section 2.8.1 for the format of a  nonsharable  save  file.	 See  the
   SSAVE monitor call for saving processes in sharable format.) This file
   can then be copied into a given process with the GET monitor call.

   ACCEPTS IN AC1:  process handle in the left half, and JFN in the right
		    half

	      AC2:  one table entry, or 0 in the left half and pointer to
		    the table in the right half (see below)

   RETURNS     +1:  always

   The table has words in the format:  length of the area to save in  the
   left  half  and  address  of the first word to save in the right half.
   The table is terminated by a 0 word.

   Nonexistent pages are not saved.  The SAVE call also does not save the
   accumulators.   Thus,  it  is  possible  to	save all assigned nonzero
   memory in section zero or the current section  with	the  table  entry
   777760,,20 in AC2.

   The SAVE call does not save section numbers as parts of addresses,  so
   all	addresses are section-relative.  Furthermore, the SAVE call saves
   only the section in which the call is executed.

   The SAVE call closes and releases the given JFN.

   Can cause several  software	interrupts  or	process  terminations  on
   certain file conditions.

   Generates an illegal instruction interrupt on error conditions below.

   SAVE ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process
   SAVX1:    Illegal to save files on this device
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged

   All file errors can also occur.



			     SCS%     JSYS 622
|
|  Provides an interface to the System Communications Service (SCS) layer
|  of  the  System Communications Architecture (SCA), allowing connection
|  management, data  transfer,	and  the  exchange  of	hardware/software
|  configuration  information  between	processes  on  different  systems
|  connected via the CI.
|
|  RESTRICTIONS:    Requires   WHEEL,	MAINTENANCE,   or   NET    WIZARD
|		    capability.
|
|  ACCEPTS IN AC1:  Function code
|
|	      AC2:  Address of argument block
|
|  RETURNS     +1:  Always,  with  returned  data  in	argument   block;
|		    generates an illegal instruction trap on failure.
|
|  SCA OVERVIEW
|
|  SCA is a systems communications architecture, in contrast to a network
|  communications   architecture   such  as  DNA.   SCS  is  the  systems
|  communications  service,  a	layer  of   the   SCA,	 which	 provides
|  communication between processes on different systems connected via the
|  CI (Computer Interconnect).
|
|  SCA is a multi-layer protocol, providing a set of connections  between
|  hosts on a CI.  The layers of SCA are described as follows:
|
|  Layer 3   the System Applications (SYSAP) layer represents  the  users
|	     of  SCS,  primarily software modules such as CFS (the Common
|	     File System) and MSCP (the Mass Storage Control Protocol).
|
|  Layer 2   the Systems Communications Service (SCS) layer provides  the
|	     process  and  system  addressing, connection management, and
|	     flow control necessary  to  multiplex  the  basic	port/port
|	     driver data services among multiple users.

|  Layer 1   the Port/Port  Driver  (PPD)  layer  controls  the  Physical
|	     Interconnect  layer  and  provides sequential data transfers
|	     between ports on the PI.
|
|  Layer 0   the Physical Interconnect (PI) layer supplies a multi-access
|	     or  point-to-point  interconnect,	eliminating  the need for
|	     complex routing facilities in SCA.   This	is  the  hardware
|	     layer.
|				    SCA
|	     SYSTEM A		   Layer	    SYSTEM B
|
|  +------+   +------+	 +------+	  +------+   +------+	+------+
|  | MSCP |   | SCS% |	 | CFS	| [SYSAP] | MSCP |   | SCS% |	| CFS  |
|  +------+   +------+	 +------+	  +------+   +------+	+------+
|      \	  |	     /		     \		 |	    /
|	\	  |	    /		      \ 	 |	   /
|	 \	  |	   /		       \	 |	  /
|     +-----------+-----------+ 	    +------------+-----------+
|     | 	 SCS	      |    [SCS]    |		SCS	     |
|     +-----------------------+ 	    +------------+-----------+
|		  |					 |
|		  |					 |
|	 +--------+--------+		       +---------+--------+
|	 |   PORT DRIVER   |	   [PPD]       |    PORT DRIVER   |
|	 +--------+--------+		       +---------+--------+
|		  |					 |
|	CI	  |		    [PI]		 |	  CI
|    ==================================================================
|
|  SCS Structure
|
|  The TOPS-20 monitor maintains a  data  structure,  called  the  system
|  block  list,  which represents the configuration of systems on the CI.
|  Systems are added to this structure as they come  online.   SCS  polls
|  regularly  to  determine  if  any  systems  have changed status.  Each
|  on-line system may have 0 or more connections active.
|
|  System blocks are maintained for each system on the CI, not	including
|  the	local node.  Information about the hardware and software for each
|  system is obtained when the system comes on-line.  The maximum  length
|  of the system block list is defined by symbol SQ%SBL.
|
|  The connection  block  is  linked  from  the  system  block	for  each
|  connection that has been requested or established.
|
|  SCA Buffers
|
|  The same pools  of  buffers	are  used  for	all  system  applications
|  (SYSAPs).   There are two buffer pools:  one for datagrams and one for
|  messages.  The caller must specify a particular buffer address in  the
|  argument  blocks  of the queue buffer functions.  The specified buffer
|  is placed in a pool	with  all  other  buffers  available  to  receive
|  incoming  data.   When the port has a datagram or message to store, it
|  takes the first empty buffer  from  the  appropriate  free  list,  and
|  returns  the  selected  buffer  name  in  the  appropriate word of the
|  argument block.
|
|  Buffers are restricted to one of two sizes:	150 (decimal)  words  for
|  datagram  buffers,  and  a  maximum	of 44 (decimal) words for message
|  buffers.  Function .SSRBS can be used to return the buffer sizes.
|
|
|  SCA Function Arguments

|  The following definitions apply to all SCS% function arguments:
|
|  ASCII source/destination process strings contain the name of the local
|  (source)  process or remote (destination) process.  These strings must
|  end on a null byte, and may be no longer than 16 bytes, not	including
|  the	null  byte.  Byte size must be at least 7-bit, but may be larger.
|  7-bit ASCII strings may be defined with the MACRO-20 ASCIZ pseudo-op.
|
|  Connection data is left-justified, 32-bit words of data to be sent out
|  with  the  connection request to the remote (destination) system.  The
|  maximum number of words of connection data that can be sent is defined
|  by  symbol  SQ%CDT.	 Note  that the monitor will copy SQ%CDT words of
|  connection data whether or not the calling program has  specified  the
|  maximum, so a full block should be allocated.
|
|  Messages are data packets with guaranteed delivery.	The  text  for	a
|  message  is	limited  to  44  36-bit  words.   The  text  must be left
|  justified, word aligned, 8-bit bytes for industry-compatible mode.
|
|  Datagrams are data packets  with  no  delivery  guarantee.	They  are
|  delivered  on  a  best  effort basis.  The text for a datagram sent in
|  industry-compatible	mode  must  be	packed	in  left-justified,  word
|  aligned, 8-bit bytes, and may be up to 150 words.
|
|  The optional path specification (OPS) allows the  calling  program  to
|  send a particular datagram or message over a particular hardware cable
|  (path).  The OPS is specified in B30-35(SC%OPS) of word .SQFLG in  the
|  function argument block.
|
|  The event queue is a record of events about which the calling  program
|  wishes  to  be  notified.   The  caller receives an interrupt when the
|  first event is placed on an empty queue;  thereafter, events  will  be
|  placed  on  the end of the queue without further notice to the caller.
|  The calling program must empty the queue upon receiving the interrupt.
|
|  SCA Interrupts
|
|  All notification of SCA events happen on four PSI channels:
|
|
|	 o  datagram available
|
|	 o  message available
|
|	 o  DMA transfer complete
|
|	 o  all other SCA  events,  including  virtual	circuit  closure,
|	    connection	management  events,  and all port and SCA-related
|	    errors.
|
|  To enable channels  for  SCA  interrupts,  the  calling  program  must
|  execute  the  .SSAIC  function  of  SCS%,  as well as doing all of the
|  normal procedures required to enable the PSI system for TOPS-20.  (See
|  Section 2.6.)
|
|  DMA
|
|  Direct Memory Access (DMA) refers  to  the  ability	of  a  peripheral
|  device  to  place  data  into  memory  or get data from memory without
|  intervention from the processor.
|
|  With SCS%, data may be placed directly in  memory  by  mapping  a  DMA
|  buffer.   Each  DMA	buffer	consists  of  segments	which  contain	a

|  contiguous set of 36-bit words within the  calling  program's  working
|  set.  Segments may not cross a page boundary and therefore, may not be
|  more than one page long.  Once a buffer has	been  mapped  for  a  DMA
|  transfer, the contents of that buffer may not be changed until the DMA
|  transfer has been acknowledged  complete.   If  the	contents  of  the
|  buffer  are modified prior to the acknowledgement, the modified buffer
|  may be transferred, and the original contents lost.
|
|  After the DMA transfer has been  acknowledged  complete,  the  calling
|  program  may unmap the DMA buffer.  Note that unmapping any DMA buffer
|  prior to the acknowledgement can have  severe  repercussions  for  the
|  calling  program  and its environs.	The calling process does not have
|  to ummap DMA buffers between data transfers, but must unmap	a  buffer
|  which  will	not  be  used further.	Unless unmapped, DMA buffers will
|  remain mapped until the next RESET or CLZFF monitor	call  or  process
|  deletion.
|
|
|  SCS% FUNCTION CODES
|
|  Code  Symbol   Function
|
|   0	 .SSCON   Request a connection with another node on the CI.  SCS%
|		  will	return as soon as the connection request has been
|		  sent.  The calling process  will  be	notified  by  PSI
|		  interrupt  when  the	request  is  granted,  or  if the
|		  request fails.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQSPN	 Byte pointer  to  ASCII  source  process
|				 name
|		   2	.SQDPN	 Byte  pointer	 to   ASCII   destination
|				 process name
|		   3	.SQSYS	 B0-17	 Node number of destination
|				 B18-35  high order 6 bits of connect ID
|		   4	.SQCDT	 Address of connection data
|		   5	.SQAMC	 Address  of  first  buffer  on   message
|				 buffer chain
|		   6	.SQADC	 Address  of  first  buffer  on  datagram
|				 buffer chain
|		   7	.SQRCI	 Returned connect ID
|		  10	.LBCON	 Length of the .SSCON block
|
|   1	 .SSLIS   Listen  for  a  connection;	the  calling  process  is
|		  notified via PSI interrupt when connection heard.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQSPN	 Byte pointer  to  ASCII  source  process
|				 name
|		   2	.SQDPN	 Byte  pointer	 to   ASCII   destination
|				 process name;	to listen for any process
|				 on  a	 particular   system,	set   the
|				 destination  process  to  -1.	 See word
|				 .SQSYS.
|		   3	.SQSYS	 B0-17	 Node number of destination
|				 B18-35  high order 6 bits of connect ID
|				 To  listen  for  a  particular   process

|				 (specified in .SQDPN) on any system, set
|				 the destination  SBI  to  -1.	 If  both
|				 .SQDPN  and  the left half of .SQSYS are
|				 set to -1, then any connect request  not
|				 destined  for	a particular process will
|				 match the listen.
|
|		   4	.SQLCI	 Returned connect ID
|		   5	.LBLIS	 Length of the .SSLIS block
|
|
|   2	 .SSREJ   Reject a connection with another node on the CI
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQREJ	 Rejection code indicating the reason for
|				 rejecting the connection
|		   3	.LBREJ	 Length of the .SSREJ block
|
|   3	 .SSDIS   Disconnect and close a connection
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQDIS	 Disconnect code  indicating  the  reason
|				 for closing the connection
|		   3	.LBDIS	 Length of the .SSDIS block
|
|   4	 .SSSDG   Send a datagram
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQAPT	 Address of datagram text
|		   3	.SQLPT	 Length of datagram text in words for
|				 high density and in bytes  for  industry
|				 compatible
|		   4	.SQFLG	 <flags>B29!<OPS>B35
|				 2(SC%MOD)    Mode flag:
|					      high density if set
|					      industry	 compatible    if
|					      clear
|				 30-35(SC%OPS)	     Optional	     path
|					      specification
|					      0 = .SSAPS field auto  path
|					      select
|					      1 = .SSPTA  use path A
|					      2 = .SSPTB  use path B
|					      .SSLOW	 Lowest value for
|					      SC%OPS field
|					      .SSHGH	 Highest    value
|					      for SC%OPS field
|				5   .LBSDG    Length of the .SSSDG block
|
|   5	 .SSQRD   Queue buffer(s) to receive a datagram;  the first  word
|		  of  each buffer is the address of the next buffer;  the

|		  first word of the last buffer contains 0 as the address
|		  of the next buffer
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQAFB	 Address of first buffer in buffer chain
|		   3	.LBQRD	 Length of the .SSQRD block
|
|   6	 .SSSMG   Send a message to a remote node
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQAMT	 Address of message text
|		   3	.SQLMT	 Length of message (in	8-bit  bytes  for
|				 industry  compatible  mode  and in words
|				 for high density mode)
|		   4	.SQFLG	 <flags>B29!<OPS>B35
|				 2(SC%MOD)    Mode flag:
|					      high density if set
|					      industry	 compatible    if
|					      clear
|				5   .LBSMG    Length of the .SSSMG block
|
|   7	 .SSQRM   Queue a buffer to receive a message;	the first word of
|		  each	buffer	is  the  address of the next buffer;  the
|		  first word of the last buffer contains 0 as the address
|		  of  the next buffer.	Buffer size is fixed at 38 36-bit
|		  words.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQAMB	 Address  of  first  message  buffer   in
|				 message buffer chain
|		   3	.LBQRM	 Length of the .SSQRM block
|
|  10	 .SSCSP   Return information about the state of a connection
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQCST	 Connection state (returned)
|		   3	.SQDCI	 Destination connect ID (returned)
|		   4	.SQBDN	 Byte  pointer	indicating  location   to
|				 start	destination process name;  may be
|				 either "real" byte pointer, or "generic"
|				 byte pointer (-1,,STRING);  if a generic
|				 byte pointer is used, the string will be
|				 written  as 16 word-aligned 8-bit bytes.
|				 (updated byte pointer returned)
|		   5	.SQSBI	 Node number (returned)
|		   6	.SQREA	 <source  disconnect  code>,,<destination
|				 disconnect code> (returned)
|		   7	.LBCSP	 Length of the .SSCSP block

|  11	 .SSRCD   Return configuration data about remote system
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect   ID	(optional);    if   zero,
|				 contents  of  word  .SQOSB  are  used to
|				 determine the target system (see below)
|		   2	.SQOSB	 Node number (optional);   either  .SQCID
|				 or  .SQOSB  must  be specified, but only
|				 one of the two may be specified
|		   3	.SQVCS	 <virtual circuit  state>,,<port  number>
|				 (returned)
|				 Virtual circuit states
|				 0 = VC.CLO   closed
|				 1 = VC.STS   start sent
|				 2 = VC.STR   start receive
|				 3 = VC.OPN   open
|		  4-5	.SQSAD	 Remote system address	(8,  8-bit  bytes
|				 returned)
|		   6	.SQMDD	 Maximum  datagram  size  at  destination
|				 (returned)
|		   7	.SQMDM	 Maximum  message  size  at   destination
|				 (returned)
|		  10	.SQDST	 Software type at destination  (4  bytes,
|				 8-bit ASCII string returned)
|		  11	.SQDSV	 Software  version  at	 destination   (4
|				 bytes, 8-bit ASCII string returned)
|		  12-13 .SQDSE	 Software edit level  at  destination  (8
|				 bytes, 8-bit ASCII string returned)
|		  14	.SQDHT	 Hardware type	code  at  destination  (4
|				 bytes, 8-bit ASCII string returned)
|		  15-17 .SQDHV	 Hardware  version  at	destination   (12
|				 bytes, 8-bit ASCII string returned)
|		  20-21 .SQNNM	 Destination port  node  name  (8  bytes,
|				 8-bit ASCII string returned)
|		  22	.SQPCW	 Port characteristics word (returned)
|		  23	.SQLPN	 Local port number (RH20  channel  number
|				 of CI-20) (returned)
|		  24	.LBRCD	 Length of the .SSRCD block
|
|  12	 .SSSTS   Return status information about a connection
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQFST	 <flags>,,<connect state code>
|				 Flags:
|				 B0(SC%MSA)   message available  -  there
|					      is  at  least  one  message
|					      available     for      this
|					      connection.
|				 B1(SC%DGA)   datagram available -  there
|					      is  at  least  one datagram
|					      available     for      this
|					      connection.
|				 B2(SC%DTA)   DMA transfer complete -  at
|					      least  one DMA transfer has
|					      completed.
|				 B3(SC%EVA)   event available - at  least

|					      one event is pending.
|				 Connect state codes:
|				 1(SQ%CLO)    closed
|				 2(SQ%LIS)    listening for connection
|				 3(SQ%CSE)    connect request sent
|				 4(SQ%CRE)    connect request received
|				 5(SQ%CAK)    connect	      acknowledge
|					      received
|				 6(SQ%ACS)    accept request sent
|				 7(SQ%RJS)    reject request sent
|				 10(SQ%OPN)   connection open
|				 11(SQ%DSE)   disconnect request sent
|				 12(SQ%DRE)   disconnect request received
|				 13(SQ%DAK)   disconnect	 response
|					      received
|				 14(SQ%DMC)   waiting	for    disconnect
|					      response
|
|		   3	.SQSBR	 <reserved>,,<node number of remote>
|		   4	.LBSTS	 Length of the .SSSTS block
|
|  13	 .SSRMG   Receive a message;  returns message text for either the
|		  calling fork or the specified connection
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID or -1;  if this word contains
|				 -1,  then  the  message  returned is the
|				 first one found for  the  calling  fork;
|				 if  this  word  contains any other value
|				 (that	is,  a	connect  ID),  then   the
|				 message  returned is the first one found
|				 for the specified connection.	In either
|				 case, if no message is found, an illegal
|				 instruction trap is generated.
|		   2	.SQARB	 Address  of  returned	 message   buffer
|				 (returned);   this address is an address
|				 in the caller's  working  set	that  was
|				 previously   specified   with	 function
|				 .SSQRM, and in  which	the  monitor  has
|				 placed  the  returned	message.   If  no
|				 .SSQRM has  been  executed,  an  illegal
|				 instruction trap is generated.
|		   3	.SQDFL	 B0-17(SC%FRM) Flags
|				    B18-35(SC%NRM) Node number of  remote
|				 system
|				 2(SC%MOD)    Mode flag:
|					      high density if set
|					      industry	 compatible    if
|					      clear
|		   4	.SQLRP	 Length of returned message;  this length
|				 is    returned    in	 bytes	 for   an
|				 industry-compatible  message,	 and   in
|				 words	for  a high density mode message.
|				 (See word .SQDFL above.)
|
|		   5	.LBRMG	 Length of the .SSRMG block
|
|  14	 .SSMAP   Associate a block of memory with an DMA buffer name  to
|		  be used in DMA data transfers

|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQXFL	 Flags and Mode field
|				 32(SQ%CVD) Do not clear the valid bit
|				 33(SQ%WRT) Read/Write if set host memory
|					      is writable
|				 34-35(SQ%DMD) Mode field
|					      0 = SQ%DIC   industry
|					      compatible mode
|					      1 = SQ%DCD   core dump
|					      2 = SQ%DHD   high   density
|					      mode
|		   2	.SQBNA	 Name of DMA buffer (returned)
|				 Followed by buffer  length  and  address
|				 pairs
|			.SQBLN	 Length of memory block in bytes for high
|				 density  and  8-bit  bytes  for industry
|				 compatible (see .SQBAD below).
|			.SQBAD	 Address of memory in  calling	program's
|				 working set for DMA transfer;
|				 words .SQBLN and .SQBAD are specified in
|				 pairs	for  each segment of a DMA buffer
|				 to be mapped.
|
|  15	 .SSUMP   Unmap a memory block assigned for DMA transfers
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQNAM	 Buffer name (returned by .SSMAP)
|		   2	.LBUMP	 Length of the .SSUMP block
|
|  16	 .SSSND   Transfer data to a remote host
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID for which transfer is  to  be
|				 done
|		   2	.SQSNM	 Buffer name of send buffer
|		   3	.SQRNM	 Buffer name of receive buffer
|		   4	.SQOFS	 <transmit offset>,,<receive offset>  The
|				 offsets  are  in  words for high density
|				 and in bytes for industry compatible.
|		   5	.LBSND	 Length of the .SSSND block
|
|  17	 .SSREQ   Request delivery of data for specified buffer
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID for which transfer is  to  be
|				 done
|		   2	.SQSNM	 Buffer name of send buffer
|		   3	.SQRNM	 Buffer name of receive buffer
|		   4	.SQOFS	 <transmit offset>,,<receive offset>  The
|				 offsets  are  in  words for high density
|				 and in bytes for industry compatible.

|		   5	.LBREQ	 Length of the .SSREQ block
|
|  20	 .SSAIC   Add interrupt channels for SCA events
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|
|		  1-4		 Up to 4 channel descriptor words of  the
|				 format:
|				 <interrupt type code>,,<channel for this
|				 code>
|				 Interrupt type codes:
|				 0  .SIDGA    interrupt    on	 datagram
|					      available
|				 1  .SIMSA    interrupt    on	  message
|					      available
|				 2  .SIDMA    interrupt on  DMA  transfer
|					      complete
|				 3  .SIPAN    interrupt  on   all   other
|					      events
|
|				 A  -1	for  the  channel   removes   the
|				 interrupt type.
|
|  22	 .SSRDG   Receive a datagram;  returns datagram text  for  either
|		  the calling fork or the specified connection.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID or -1;  if this word contains
|				 -1,  the  datagram returned is the first
|				 one found for the calling fork;  if this
|				 word  contains any other value (that is,
|				 a connect ID), the datagram returned  is
|				 the  first  one  found for the specified
|				 connection.
|		   2	.SQARB	 Address  of  returned	datagram   buffer
|				 (returned);   this address is an address
|				 in the caller's  working  set	that  was
|				 previously   specified   with	 function
|				 .SSQRD, and in  which	the  monitor  has
|				 placed  the  returned	datagram.   If no
|				 datagram is found, the content  of  this
|				 word  is  zero.   If  no .SSQRD has been
|				 executed  or  if  the	address  is   not
|				 writable, an illegal instruction trap is
|				 generated.
|		   3	.SQDFL	 B0-17(SC%FRM) Flags B18-35(SC%NRM)  Node
|				 number of remote
|		   4	.SQLRP	 Length  of  returned	datagram;    this
|				 length  is  returned  in  bytes  for  an
|				 industry-compatible  datagram,  and   in
|				 words	for a high density mode datagram.
|				 (See word .SQDFL above.)
|		   5	.LBRDG Length of the .SSRDG block
|
|  23	 .SSACC   Accept a connection with another node on  the  CI  that
|		  has requested a connection.

|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQCDA	 Address of 4-word connection data block
|		   3	.LBACC	 Length of the .SSACC block
|
|  24	 .SSGDE   Return the first entry from the data	request  complete
|		  queue and repeat until queue is empty.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID or -1
|		   2	.SQBID	 Buffer ID of buffer that  completed  DMA
|				 transfer (returned)
|		   3	.LBGDE	 Length of the .SSGDE block
|
|  25	 .SSEVT   Retrieve first entry from event queue;   this  function
|		  must be repeated until the event queue is empty.
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID or -1;  if -1, the next event
|				 for  the  calling  fork is returned;  if
|				 connect  ID,  the  next  event  for  the
|				 specified connection is returned.
|		   2	.SQESB	 Left  half  is  reserved  for	 DIGITAL.
|				 Right	half  is  node	number	of remote
|				 node.
|		   3	.SQEVT	 Event code (see .SQDTA below)
|		   4	.SQDTA	 Event data
|				 Event codes and data:
|				  1 .SEVCC    Virtual circuit broken
|					      .SQDTA	 contains     the
|					      pertinent SBI
|				  2 .SECTL    Connect to listen
|					      .SQDTA contains 4 words  of
|					      connection  data	from  the
|					      remote node
|				  3 .SECRA    Connection was accepted
|					      .SQDTA contains 4 words  of
|					      connection  data	from  the
|					      remote node
|				  4 .SECRR    Connection was rejected
|					      .SQDTA	 contains     the
|					      rejection reason code
|				  5 .SEMSC    Message  or  datagram  send
|					      complete
|					      .SQDTA contains address  of
|					      sent buffer
|				  6 .SELCL    Little credit left
|					      .SQDTA contains the  number
|					      of   credits   required  to
|					      restore	  the	  calling
|					      program's credit threshold
|				  7 .SENWO    Node went offline
|					      .SQDTA  contains	 SBI   of
|					      system which went offline

|				 10 .SENCO    Node came online
|					      .SQDTA  contains	 SBI   of
|					      system which came online
|				 11 .SEOSD    OK to send data
|					      .SQDTA is not used
|				 12 .SERID    Remote initiated disconnect
|					      .SQDTA is not used
|				 13 .SEPBC    Port broke connection
|					      .SQDTA is not used
|				 14 .SECIA    Credit is available
|					      .SQDTA is not used
|				    .SEMAX    Maximum event code.
|		  10	.LBEVT	 Length of the .SSEVT block
|
|  26	 .SSCRD   Cancel datagram receive;  removes the buffer queued for
|		  datagram reception
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQADB	 Address of buffer to dequeue;	 must  be
|				 address  of  previously  queued datagram
|				 buffer;   if  address	 not   found   by
|				 monitor,  causes  an illegal instruction
|				 trap
|		   3	.LBCRD	 Length of the .SSCRD block
|
|  27	 .SSCRM   Cancel message  receive;   removes  buffer  queued  for
|		  message reception
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 0,,<block length>;  on return
|				 <# of words processed>,,<block length>
|		   1	.SQCID	 Connect ID
|		   2	.SQADB	 Address of buffer to dequeue;	 must  be
|				 address  of  previously  queued  message
|				 buffer;  if the address is not found  by
|				 the monitor, illegal instruction trap is
|				 generated
|		   3	.LBCRM	 Length of the .SSCRM block
|
|  30	 .SSGLN   Get local node number
|
|		  Word	Symbol	 Contents
|
|		   0	.SQLEN	 <# of words processed>,, <block length>
|		   1	.SQLNN	 local node number
|		   2	.LBGLN	 Length of the .SSGLN block
|
|  35	 .SSRBS   Return minimum buffer sizes
|
|		  Word	Symbol	 Contents
|
|		  0	.SQLEN	 <# of words processed>,, <block length>
|		  1	.SQLMG	 Length  in  words  of	smallest  allowed
|				 message buffer
|		  2	.SQLDG	 Length in  words  of  smallest  datagram
|				 buffer
|		   3	.LBRBS	 Length of the .SSRBS block

|  36	 .SSRPS   Return path status
|
|		  Word	Symbol	 Contents
|
|		  0	.SQLEN	 <# of words processed>,,<block length>
|		  1	.SQRPN	 Node number
|		  2	.SQRPS	 Path status
|				    B0-17     Path A status
|				    B18-35    Path B status
|
|				 Status Definition
|				    SC%PGD = 1 path is good
|				    SC%PBD = 0 path is bad
|		   3	.LBRPS	 Length of the .SSRPS block
|
|  SCS% ERROR MNEMONICS:
|
|  SCSBFC:   Function code out of range
|  SCSBTS:   Argument block too short
|  SCSIAB:   Invalid argument block address
|  SCSNSN:   No source process name specified on connection request
|  SCSNEP:   Not enough privileges enabled
|  SCSNSC:   No such connect ID
|  SCSIID:   Invalid connect ID
|  SCSNBA:   Internal resources exhausted (No more SCA buffers)
|  SCSSCP:   DMA segment crosses a page boundary
|  SCSQIE:   Queue is empty
|  SCSFRK:   Fork does not own this SCS% data
|  SCSNMQ:   No buffers queued for message reception
|  SCSISB:   Invalid node number
|  SCSIBP:   Invalid byte pointer
|  SCSNDQ:   No datagram buffers queued
|  SCSENB:   Excessive number of buffers in queue request
|  SCSSTL:   DMA buffer segment too long
|  SCSTMS:   Too many DMA buffer segments
|  SCSNSB:   No such buffer
|  SCSNKP:   No known KLIPA on this system
|  SCSIPC:   PSI channel out of range
|  SCSIPS:   Invalid path spec
|  SCSIST:   Invalid SCS% interrupt type
|  SCSIDM:   Invalid DMA transmission mode
|  SCSIBN:   Invalid buffer name



			     SCTTY     JSYS 324

   Redefines the controlling terminal for the specified process  and  all
   of  its  inferiors.	 The controlling terminal can be redefined at any
   level in the job's process structure;  inferior processes  below  this
   level  uses	this  terminal	by default as their controlling terminal.
   Therefore, the controlling terminal of a process is defined to be:

	1.  The one that has been explicitly defined for it  by  a  SCTTY
	    call.

	2.  If no terminal has been explicitly defined for  the  process,
	    the terminal that has been explicitly defined for its closest
	    superior by a SCTTY call.

	3.  If no SCTTY call has been executed for  a  superior  process,
	    the job's controlling terminal.

   The effect of terminal interrupts on a  process  is	dictated  by  the
   controlling	terminal for the process.  This means that processes that
   have enabled specific terminal characters receives an  interrupt  when
   those  characters  are typed on the controlling terminal.  If no SCTTY
   call has been executed for any process in  the  job,  the  controlling
   terminal  for  all  processes  within the job is the job's controlling
   terminal.  (The job's controlling terminal is usually the one used  to
   log	in  and control the job.)  In addition to being the source of all
   terminal interrupts, the job's  controlling	terminal  serves  as  the
   primary  I/O designators (refer to Section 1.2.6) for all processes in
   the job, unless these designators have been changed for a process.

   When a SCTTY call  is  executed  for  a  process  within  a	job,  the
   controlling terminal and the source of terminal interrupts are changed
   for that process and all of its inferiors.  This  group  of	processes
   receives  interrupts  only  from  the  new controlling terminal and no
   longer from the job's controlling terminal.	 These	processes  cannot
   receive  or	change	terminal  interrupts  from  any other controlling
   terminals.  However, primary I/O continues to  be  received	from  and
   sent  to the job's controlling terminal if the primary I/O designators
   have not  been  changed.   For  most  applications,	the  primary  I/O
   designators should be changed with the SPJFN call to correspond to the
   new controlling terminal.

   ACCEPTS IN AC1:  function code in the left half, and process handle in
		    the right half

	      AC2:  terminal designator

   RETURNS     +1:  always

   The available functions are as follows:

      Code   Symbol			   Meaning

       0     .SCRET	    Return the designator of the  given  process'
			    controlling   terminal.   The  designator  is
			    returned in AC2.

       1     .SCSET	    Change   the   given   process'   controlling
			    terminal  to  the terminal designated in AC2.
			    The terminal designator cannot refer  to  the
			    job's  controlling	terminal.   This function
			    also changes the controlling terminal of  all
			    processes inferior to the given process.

       2     .SCRST	    Reset the given process' controlling terminal
			    to	the  job's  controlling  terminal.   This
			    function also resets the controlling terminal
			    of	 all  processes  inferior  to  the  given
			    process.

   Functions .SCSET and .SCRST require the process  to	have  the  SC%SCT
   capability (refer to Section 2.7.1) enabled in its capability word.

   The SCTTY monitor call  cannot  be  used  to  change  the  controlling

   terminal  for  the  current process or for any process superior to the
   current process.

   Generates an illegal instruction interrupt on error conditions below.

   SCTTY ERROR MNEMONICS:

   SCTX1:    Invalid function code
   SCTX2:    Terminal already in use as controlling terminal
   SCTX3:    Illegal to redefine the job's controlling terminal
   SCTX4:    SC%SCT capability required
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   DESX1:    Invalid source/destination designator
   DEVX2:    Device already assigned to another job



			     SCVEC     JSYS 301

   Sets the entry vector and the  UUO  locations  for  the  compatibility
   package.

   ACCEPTS IN AC1:  process handle

	      AC2:  entry vector length  in  the  left	half,  and  entry
		    vector address in the right half

	      AC3:  UUO location in the left half, and PC location in the
		    right half

   RETURNS     +1:  always

   The compatibility package's entry vector is as follows:

	Word	  Symbol	      Meaning

	  0	  .SVEAD    Entry address for interpreting UUOs

	  1	  .SVINE    Initial entry for setup and first UUO

	  2	  .SVGET    Entry for GET share file routine (obsolete)

	  3	  .SV40     Address to receive contents of location 40 on
			    the UUO call

	  4	  .SVRPC    Address to receive the return PC word on  the
			    UUO call

	  5	  .SVMAK    Entry for MAKE share file routine (obsolete)

	6 and 7   .SVCST    Communication  for	handling  CTRL/C,   START
			    sequences  between	the compatibility package
			    and the TOPS-20 Command Language

   The monitor transfers to the address specified in the  right  half  of
   AC2	on  any  monitor  call whose operation code is 040-077 (a monitor
   UUO).  This transfer occurs after the monitor stores the  contents  of

   location  40  and the return PC in the locations specified by the left
   half and right  half  of  AC3,  respectively.   The	entry  vector  is
   retained but is not used by the monitor.

   If AC2 is 0, the next UUO  causes  the  compatibility  package  to  be
   merged  into the caller's address space.  In this case, the UUO and PC
   locations  are  set	from  words  3	and  4,  respectively,	 of   the
   compatibility package's entry vector.

   If AC2 is -1, UUO simulation is disabled, and an occurrence of  a  UUO
   is  considered an illegal instruction.  This action is useful when the
   user is removing UUOs from a program.

   The GCVEC monitor call can be used to obtain the entry vector for  the
   compatibility package.

   SCVEC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX4:   Process is running
   FRKHX8:   Illegal to manipulate an execute-only process



			     SDSTS     JSYS 146

   Sets  the  status  of  a  device.   (Refer  to  Section  2.4  for  the
   descriptions  of  the status bits.) This call requires that the device
   be opened.

   ACCEPTS IN AC1:  JFN

	      AC2:  new status bits

   RETURNS     +1:  always

   The	SDSTS  call  is  a  no-op  for	 devices   that   do   not   have
   device-dependent status bits.

   The GDSTS monitor call can be used to obtain the  status  bits  for	a
   particular device.

   Generates an illegal instruction interrupt on error conditions below.

   SDSTS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX9:    Invalid operation for this device



			     SDVEC     JSYS 543

   Sets the entry vector for the Record Management System (RMS).

   RESTRICTIONS:    requires RMS software (currently available only  with
		    BASIC and COBOL)

   ACCEPTS IN AC1:  process handle

	      AC2:  entry vector length  in  the  left	half,  and  entry
		    vector address in the right half

   RETURNS     +1:  always

   The Record Management System's entry vector is as follows:

	Word	  Symbol	      Meaning

	 0	  .SDEAD    Entry address for the RMS calls
	 1	  .SDINE    Initial entry for the first RMS call
	 2	  .SDVER    Pointer to RMS version block
	 3	  .SDDMS    Address in which to store the RMS call
	 4	  .SDRPC    Address in which to store return PC word

   The GDVEC monitor call can be used to obtain the entry vector for RMS.

   Generates an illegal instruction interrupt on error conditions below.

   SDVEC ERROR MNEMONICS:

   ILINS5:   RMS facility is not available
   FRKHX8:   Illegal to manipulate an execute-only process



			     SETER     JSYS 336

   Sets the most recent error condition encountered by a  process.   This
   error condition is stored in the process' Process Storage Block.

   ACCEPTS IN AC1:  process handle

	      AC2:  error code that is to be set

   RETURNS     +1:  always

   The GETER monitor call can be used to obtain  the  most  recent  error
   condition encountered by a process.

   Generates an illegal instruction interrupt on error conditions below.

   SETER ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Process is running
   FRKHX8:   Illegal to manipulate an execute-only process



			     SETJB     JSYS 541

   Sets job parameters for the specified job.

   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability

		    enabled

   ACCEPTS IN AC1:  job number, or -1 for the current job

	      AC2:  function code

	      AC3:  value for function

   RETURNS     +1:  always

   The available  functions,  along  with  the	legal  values  for  these
   functions, are described below.

   Function	  Values		   Meaning

   .SJDEN(0)			 Set default for magnetic tape density.

		  .SJDDN(0)	   System default density
		  .SJDN2(1)	   200 bits/inch (8.1 rows/mm)
		  .SJDN5(2)	   556 bits/inch (22.5 rows/mm)
		  .SJDN8(3)	   800 bits/inch (32.2 rows/mm)
		  .SJD16(4)	   1600 bits/inch (65.3 rows/mm)
		  .SJD62(5)	   6250 bits/inch (246 rows/mm)

   .SJPAR(1)			 Set default for magnetic tape parity.

		  .SJPRO(0)	   Odd parity
		  .SJPRE(1)	   Even parity

   .SJDM(2)			 Set default for magnetic tape data mode.

		  .SJDDM(0)	   System default data mode
		  .SJDMC(1)	   Dump mode
		  .SJDM6(2)	   SIXBIT byte mode (7-track drives)
		  .SJDMA(3)	   ANSI  ASCII	mode  (7  bits	in  8-bit
				   bytes)
		  .SJDM8(4)	   Industry-compatible mode
		  .SJDMH(5)	   High-density mode for  TU70	and  TU72
				   tape  drives only (nine 8-bit bytes in
				   two words)

   .SJRS(3)			 Set default  for  magnetic  tape  record
				 size  in  bytes.   The maximum allowable
				 number of bytes depends on the  hardware
				 data mode specified for the drive:

					      Maximum
				 Data Mode    Number Bytes

				 default		     -
				 dump			   8192
				 SIXBIT 		  49152
				 ANSI ASCII		  40960
				 industry compatible	  32768
				 high density		   8192
   Function	   Values		       Meaning

   .SJRS(3)			 Note that the SETJB JSYS does not return
   (Cont.)			 an error message if the above values are
				 exceeded.   However,  the  OPENF  or the
				 first	data   transfer   (whichever   is
				 performed  first  after  function .SJDM)
				 fails.  Note that MTOPR function  .MOSRS

				 can  be  used	to  override  the default
				 record   size	 specified   with   SETJB
				 function .SJDM.

   .SJDFS(4)			 Set spooling mode.

		  .SJSPI(0)	   Immediate mode spooling
		  .SJSPD(1)	   Deferred mode spooling

   .SJSRM(5)			 Set remark for current job session.  AC3
				 contains   a	pointer  to  the  session
				 remark, which is updated on a successful
				 return.   The first 39 characters of the
				 session remark are placed in  the  job's
				 Job Storage Block.

   .SJT20(6)			 Indicate if job  is  at  EXEC	level  or
				 program level.

		  -1		   job is at EXEC level
		   0		   job is at program level

   .SJDFR(7)			 Set job  default  retrieval.	Allows	a
				 user  to override the system default for
				 OPENF.

		  .SJRFA(0)	   Any OPENF of a disk file  should  fail
				   if  file's  contents  are not on line.
				   This is the system default.
		  .SJRWA(1)	   Any OPENF of a disk file  should  wait
				   for	the  ARCF  JSYS  to  restore  the
				   contents of a file to disk.

   .SJBAT(10)			 Set batch flags and batch stream number

		  OB%WTO(3B1)	   Write to operator capabilities

				   .OBALL(0)	WTO (write  to	operator)
						and    WTOR   (write   to
						operator   with    reply)
						allowed
				   .OBNWR(1)	No WTR allowed
				   .OBNOM(2)	No message allowed

		  OB%BSS(1B10)	   OB%BSN (see below)  contains  a  batch
				   stream number
		  OB%BSN(177B17)   Batch stream number

   .SJLLO(11)			 Set job logical location (node name)

   The SETJB monitor call requires the process to have WHEEL or  OPERATOR
   capability  enabled to set parameters for a job other than the current
   job.

   The GETJI monitor call can be used to obtain the job parameters for	a
   specified job.

   Generates an illegal instruction interrupt on error conditions below.

   SETJB ERROR MNEMONICS:

   SJBX1:    Invalid function
   SJBX2:    Invalid magnetic tape density
   SJBX3:    Invalid magnetic tape data mode
   SJBX4:    Invalid job number
   SJBX5:    Job is not logged in
   SJBX6:    WHEEL or OPERATOR capability required
   SJBX7:    Remark exceeds 39 characters
   SJBX8:    Illegal to perform this function



			     SETNM     JSYS 210

   Sets the private name of the program being used by  the  current  job.
   This name is the one printed on SYSTAT listings.

   ACCEPTS IN AC1:  sixbit name used to identify program

   RETURNS     +1:  always

   The GETNM monitor call can be used to obtain the name of  the  program
   currently being used.


			     SETSN     JSYS 506

   Sets either the system name or the private name of the  program  being
   used by the current job.

   ACCEPTS IN AC1:  SIXBIT name to be used as the system name.	This name
		    is the one used for system statistics.

	      AC2:  SIXBIT name to be used as  the  private  name.   This
		    name is the same as the one set with the SETNM call.

   RETURNS     +1:  failure.  (Currently, there are  no  failure  returns
		    defined.)

	       +2:  success

   System program usage statistics are accumulated in the  system  tables
   SNAMES,  STIMES,  and  SPFLTS.  (Refer to Section 2.3.2.) To make this
   possible, the SETSN call must be executed by  each  job  whenever  the
   system  program  name  is  changed.	 In  the  usual case, the TOPS-20
   Command Language handles this.  The argument to SETSN should be:   for
   system  programs  (programs from SYS:), the filename, truncated to six
   characters and converted to SIXBIT;	for private programs, "(PRIV)".



			     SEVEC     JSYS 204

   Sets the entry vector of the specified process.  The process must  run
   in only one section of memory.  (Refer to Section 2.3.2.)

   ACCEPTS IN AC1:  process handle

	      AC2:  entry vector  word	(length  in  the  left	half  and
		    address of first word in the right half), or 0

   RETURNS     +1:  always

   A zero in AC2 removes the entry vector for the process.

   The GEVEC monitor call can  be  used  to  obtain  the  process'  entry
   vector.

   The XSVEC% monitor call sets the entry vector of a process  that  runs
   in a section other than section zero.

   Generates an illegal instruction interrupt on error conditions below.

   SEVEC ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process
   SEVEX1:   Entry vector length is not less than 1000



			     SFACS     JSYS 160

   Sets the ACs of the specified process.

   ACCEPTS IN AC1:  process handle

	      AC2:  address of the beginning of a 20(octal) word table in
		    the  caller's address space.  This table contains the
		    values to be placed into the  ACs  of  the	specified
		    process.

   RETURNS     +1:  always

   The specified process must not be running.

   The RFACS call can be used to obtain the ACs for a specified process.

   Generates an illegal instruction interrupt on error conditions below.

   SFACS ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX4:   Process is running

   FRKHX8:   Illegal to manipulate an execute-only process



			     SFBSZ     JSYS 46

   Resets the byte size for a specific opening of a file.  (Refer to  the
   OPENF and RFBSZ calls descriptions.)

   ACCEPTS IN AC1:  JFN

	      AC2:  byte size, right-justified

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The SFBSZ monitor call recomputes the EOF limit and the file's pointer
   based on the new byte size given.

   SFBSZ ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX8:    File is not on disk
   SFBSX1:   Illegal to change byte size for this opening of file
   SFBX2:    Invalid byte size



			     SFCOC     JSYS 113

|  Sets the control character output control  (CCOC)  for  the	specified
|  terminal,  which  must  be  assigned to the caller.	(Refer to Section
|  2.4.9.2 and the RFCOC call description.)

   ACCEPTS IN AC1:  file designator

	      AC2:  control character output control word

	      AC3:  control character output control word

   RETURNS     +1:  always

   The CCOC words consist of 2-bit  bytes,  each  byte	representing  the
   output control for one of the ASCII codes 0-37.

|  The SFCOC call is a no-op if the designator is not associated  with	a
|  terminal assigned to the caller.

   The RFCOC monitor call can be used to obtain  the  CCOC  words  for	a
   specified terminal.

|  Generates an illegal instruction interrupt on error conditions below.

   SFCOC ERROR MNEMONICS:

   DESX1:	    Invalid source/destination designator
   DESX2:	    Terminal is not available to this job
   DESX3:	    JFN is not assigned
   DESX5:	    File is not open
   DEVX2:	    Device already assigned to another job
   TTYX01:	    Line is not active



			     SFMOD     JSYS 110

   Sets the program-related modes for the specified terminal.  The  modes
   that can be set by this call are in the following bits of the JFN mode
   word.  (Refer to Section 2.4.9.1.)

	B0(TT%OSP)	output suppression control
	B18-B23(TT%WAK) wakeup control
	B24(TT%ECO)	echoes on
	B28-B29(TT%DAM) data mode

   ACCEPTS IN AC1:  file designator

	      AC2:  JFN mode word

   RETURNS     +1:  always

   The SFMOD call is a no-op if the designator is not associated  with	a
   terminal.

   The STPAR monitor call can be used to set device-related modes of  the
   JFN	mode  word,  and the RFMOD monitor call can be used to obtain the
   JFN mode word.

   SFMOD ERROR MNEMONICS:

   DESX1:	    Invalid source/destination designator
   DESX3:	    JFN is not assigned
   DESX5:	    File is not open
   DEVX2:	    Device already assigned to another job
   TTYX01:	    Line is not active



			     SFORK     JSYS 157

|  Starts the specified process in a single section.  If the  process  is

   frozen, the SFORK call changes the PC but does not resume the process.
   The RFORK call must be used to resume the process.

   ACCEPTS IN AC1:  flags,,process handle

		    Flags:

		    SF%CON(1B0)    Used to continue a  process	that  has
				   previously  halted.	If SF%CON is set,
				   the address in AC2 is ignored, and the
				   process  continues  from  where it was
				   halted.

	      AC2:  the PC of the process being started.  The PC contains
		    flags  in  the  left  half	and  the process starting
		    address in the right half.	 This  call  obtains  the
		    section number of the PC from the entry vector of the
		    process.

   RETURNS     +1:  always

   The SFRKV monitor call can be used to  start  a  process  at  a  given
   position in its entry vector.

   Generates an illegal instruction interrupt on error conditions below.

   SFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX5:   Process has not been started
   FRKHX8:   Illegal to manipulate an execute-only process



			     SFPOS     JSYS 526

   Sets the position of the  specified	terminal's  pointer.   (Refer  to
   Section  2.4.9.4  for  information  on  page  lengths  and  widths  of
   terminals.)

   ACCEPTS IN AC1:  file designator

	      AC2:  position within a page  (line  number)  in	the  left
		    half, and position with a line (column number) in the
		    right half

   RETURNS     +1:  always

   The SFPOS monitor call is a no-op if the designator is not  associated
   with a terminal or is in any way illegal.

   The RFPOS monitor call can be used to obtain the current  position  of
   the terminal's pointer.

   SFPOS ERROR MNEMONICS:

   TTYX01:   Line is not active



			     SFPTR     JSYS 27

   Sets the position of the specified file's pointer for  subsequent  I/O
   to  the  file.   The  SFPTR	call  specifying  a  certain byte number,
   followed by a BIN call, has the same effect as a RIN  call  specifying
   the same byte number.

   ACCEPTS IN AC1:  JFN

	      AC2:  byte number to which the pointer is to be set, or  -1
		    to set the pointer to the current end of the file

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The following comments concern line sequence numbers (LSNs):

   By default, the monitor ignores all LSNs and nulls  when  doing  input
   from  a file.  (Nulls are used to insure that the LSN starts on a word
   boundary.) When the first byte of the file is read, the monitor checks
   the	word  containing that byte to see if it is part of an LSN.  If it
   is not, the monitor sets  an  internal  flag  that  is  equivalent  to
   setting  OF%PLN in the OPENF.  This flag specifies that all bytes will
   be passed to the user program.  If the monitor's internal flag is  not
   set, then LSNs and nulls are suppressed.

   If the monitor has not checked the first word of the file (as  is  the
   case  when  a  process  executes  an  SFPTR JSYS to move the file byte
   pointer to a byte in some other word of the file) and the process  did
   not	set  OF%PLN  in the OPENF, then the monitor assumes that the file
   contains LSNs.  LSNs and nulls are not passed  to  the  user  program.
   Thus  nulls	will be suppressed even if the file contains no LSNs.  In
   this case, if it is desired that nulls should be passed  to	the  user
   program, then OF%PLN should be set in the OPENF, regardless of whether
   the file actually contains LSNs.

   The RFPTR monitor call can be used to obtain the current  position  of
   the file's pointer.

   SFPTR ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX8:    File is not on disk
   SFPTX1:   File is not open
   SFPTX2:   Illegal to reset pointer for this file
   SFPTX3:   Invalid byte number



			     SFRKV     JSYS 201

   Starts the specified process using the given  position  in  its  entry
   vector.

   ACCEPTS IN AC1:  process handle

	      AC2:  word (0-n) in the  entry  vector  that  contains  the
		    address  to  use  for  the	start address.	Word 0 is
		    always the primary start address, and word 1  is  the
		    reenter address.

   RETURNS     +1:  always

   The process starts execution at  the  address  that	is  the  starting
   address  of	the  entry vector plus the offset specified in AC2.  That
   location must contain an executable instruction.

   If the process has a TOPS-10 format entry vector  (JRST  in	the  left
   half),  then  the  left  half  of  AC2  in the SFRKV call is the start
   address offset.  The only legal offsets are 0 and 1, and they are only
   legal  for entry vector position 0 (start address).	Thus, for TOPS-10
   entry vectors, the left half of AC2 will be added to the  contents  of
   the	right half of .JBSA to determine the start address.  Entry vector
   position 0 means "use the contents of the right half of .JBSA (120) as
   the	start  address,"  and  position  1 means "use the contents of the
   right half of .JBREN (124) as the reenter address."

   Note that it is illegal to use an entry vector position other  than	0
   or 1 for an execute-only process.

   Generates an illegal instruction interrupt on error conditions below.

   SFRKV ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX4:   Process is running
   FRKHX8:   Illegal to manipulate an execute-only process
   SFRVX1:   Invalid position in entry vector



			     SFTAD     JSYS 534

   Sets the dates and times associated with the specified file.

   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  source designator

	      AC2:  address of argument block

	      AC3:  length of argument block

   RETURNS     +1:  always

   The format of the argument block is as follows:

      Word   Symbol    Meaning

       0     .RSWRT    Internal date and time file was last written.

       1     .RSCRV    Internal date and time file was created.

       2     .RSREF    Internal date and time file was last referenced.

       3     .RSCRE    System date and time of last write by the monitor.
		       (The  COPY  and RENAME commands in the EXEC change
		       this  word,  for  example.)  Requires   WHEEL   or
		       OPERATOR capability enabled.

       4     .RSTDT    Tape-write date and time of archived  or  migrated
		       files.	Requires  WHEEL  or  OPERATOR  capability
		       enabled.

       5     .RSNET    On-line expiration date and time, which can  be	a
		       date  and time (in internal format) or an interval
		       (in days).  Intervals  are  limited  to	half-word
		       values.	 Dates,  times,  and  intervals  can  not
		       exceed system or directory maximums.

       6     .RSFET    Offline expiration date and time, which can  be	a
		       date  and time (in internal format) or an interval
		       (in days).  Intervals  are  limited  to	half-word
		       values.	 Dates,  times,  and  intervals  can  not
		       exceed system or directory maximums.

   For words .RSWRT, .RSCRV, and  .RSREF,  the	new  values  are  checked
   against  the  current  date and time.  Values greater than the current
   date and time can be set only if the process  has  WHEEL  or  OPERATOR
   capability enabled.

   If the designator represents a device for which dates are  meaningless
   (dates  for	terminals, for example), or if any value given is -1, the
   given value is ignored, and the current date,  if  pertinent,  is  not
   changed.  If the argument block has more than four words, given values
   for these words are checked to be in valid format and then ignored, if
   valid.

   The following table illustrates which monitor calls set the file dates
   and times:

    Word     GTJFN   OPENF   OPENF   CLOSF   SFTAD   RNAMF   ARCF
		     Read    Write   Write

   .RSWRT      -       -      Set      -      Set     FDB      -
   .RSCRV     Set      -       -       -      Set     FDB      -
   .RSREF      -      Set      -       -      Set     Set      -
   .RSCRE     Set      -       -      Set     Set*    FDB      -
   .RSTDT      -       -       -       -      Set*    FDB     Set*
   .RSNET      -       -       -       -      Set     FDB      -
   .RSFET      -       -       -       -      Set     FDB      -

   LEGEND:

     *	  Requires WHEEL or OPERATOR capability enabled.
     FDB  This word copied from source FDB to destination FDB.

   The various SFTAD words map to words in the FDB block.  (The  mnemonic
   changes from .RS%%% to .FB%%%.)

   The RFTAD monitor call can be used  to  obtain  the	dates  and  times
   associated with a specified file.

   Generates an illegal instruction interrupt on error conditions below.

   SFTAD ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DATE6:    System date and time not set
   STADX2:   Invalid date or time
   CFDBX2:   Illegal to change specified bits
   OPNX25:   Device is write locked
   CAPX1:    WHEEL or OPERATOR capability required



			     SFUST     JSYS 551

   Sets the name of either the author of the file or the  user	who  last
   wrote to the file.

   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  function code in the left half, and JFN of	the  file
		    in the right half

	      AC2:  byte pointer to ASCIZ string containing the name

   RETURNS     +1:  always, with an updated byte pointer in AC2

   The defined functions are as follows:

      Code   Symbol			   Meaning

       0     .SFAUT	    Set the name of the author of the file.

       1     .SFLWR	    Set the name of the user who last  wrote  the
			    file.

   The GFUST monitor call can be used to return the name  of  either  the
   author of the file or the user who last wrote the file.

   The process must have WHEEL or OPERATOR capability enabled to set  the
   writer's  name or to have write or owner access to the file to set the
   author's name.

   Generates an illegal instruction interrupt on error conditions below.

   SFUST ERROR MNEMONICS:

   SFUSX1:   Invalid function
   SFUSX2:   Insufficient system resources

   SFUSX4:   File expunged
   SFUSX5:   Write or owner access required
   SFUSX6:   No such user name
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX8:    File is not on disk
   DESX10:   Structure is dismounted
   CAPX1:    WHEEL or OPERATOR capability required



			     SIBE     JSYS 102

   Tests to see if the designated file input buffer is empty.

   ACCEPTS IN AC1:  source designator

   RETURNS     +1:  (one of the following is true:)

 
		    1.	The device is an active terminal  and  the  input
			buffer is not empty.  AC2 contains a count of the
			bytes remaining in the input buffer.

		    2.	The device is not a terminal, is open  for  read,
			and  the input buffer is not empty.  AC2 contains
			a count of  the  bytes	remaining  in  the  input
			buffer.

 
	       +2:  (one of the following is true:)

 
		    1.	The  device  is  a  non-active	 terminal.    AC2
			contains the error code.

		    2.	The device is an active terminal  and  the  input
			buffer is empty.  AC2 contains zero.

		    3.	The device is not a terminal and is not open  for
			read.  AC2 contains zero.

		    4.	The device is not a terminal, is open  for  read,
			and  the  input  buffer  is  empty.  AC2 contains
			zero.

 
   The SOBE monitor call can be used to determine if the output buffer is
   empty,  and	the  SOBF  monitor  call  can be used to determine if the
   output buffer is full.

   SIBE ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned

   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			      SIN     JSYS 52

   Reads a string from the specified source  into  the	caller's  address
   space.   The  string  can  be  a  specified number of bytes, or can be
   terminated with a specific byte.

   ACCEPTS IN AC1:  source designator

	      AC2:  byte pointer to string in the caller's address space

	      AC3:  count of number of bytes in string, or 0

	      AC4:  byte (right-justified) on which  to  terminate  input
		    (optional)

   RETURNS     +1:  always, with updated byte pointers in AC2 and AC1, if
		    pertinent, and updated count in AC3, if pertinent

 
   The contents of AC3 controls the number of bytes to read.

		  AC3=0 The string being read  is  terminated  with  a	0
		  byte.

	AC3>0	  A string of the specified number of bytes is to be read
		  or a string terminated with the byte given in AC4 is to
		  be read, whichever occurs first.

	AC3<0	  A string of minus the specified number of bytes  is  to
		  be read.

   The contents of AC4 are ignored unless AC3 contains a positive number.

   The input is terminated when the byte count becomes 0,  the	specified
   terminating	byte  is  reached,  the end of the file is reached, or an
   error  occurs  during  the  transfer.   The	program  can  process  an
   end-of-file	condition  if  an  ERJMP or ERCAL is the next instruction
   following the SIN call.

   After execution of  the  call,  the	file's	pointer  is  updated  for
   subsequent  I/O to the file.  AC2 is updated to point to the last byte
   read or, if AC3 contained 0, the last nonzero byte read.  The count in
   AC3	is  updated  toward  zero by subtracting the number of bytes read
   from the number of bytes requested to  be  read.   If  the  input  was
   terminated  by  an  end-of-file interrupt, AC1 through AC3 are updated
   (where pertinent) to reflect the number of  bytes  transferred  before
   the end of the file was reached.

   When the SIN call is used to read data from a magnetic tape, the  size
   of  the  records  to  read  is  specified  with  either  the  SET TAPE
   RECORD-LENGTH command or the .MOSRS function of the MTOPR  call.   The
   default  record size is 1000(octal) words.  The record size must be at

   least as large as the largest record being read from the tape.

   The SIN call reads across record boundaries on the tape until it reads
   the	number of bytes specified in AC3.  The call gives the data to the
   program with no indication of tape marks.  Thus, if the record is 1000
   bytes  and  a  SIN call is given requesting 2000 bytes, it returns two
   full records to the program.

   When reading in reverse, both the number of bytes requested in AC3 and
   the	record	size  should  equal  the  size of the record on the tape.
   (Refer to Section 2.4.7.1 for more  information  about  magnetic  tape
   I/O.)

   This  call  can  cause  several   software	interrupts   or   process
   terminations  on certain file conditions.  (Refer to bit OF%HER of the
   OPENF call description.)

   Generates an illegal instruction interrupt on error conditions below.

   SIN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX1:     File is not open for reading
   IOX4:     End of file reached
   IOX5:     Device or data error
   IOX7:     Insufficient system resources (Job Storage Block full)
   IOX8:     Monitor internal error



			     SINR     JSYS 531

   Reads a record from the specified device  into  the	caller's  address
   space.   The  maximum  size	of  the  record to read is specified with
   either the SET TAPE RECORD-LENGTH command or the  .MOSRS  function  of
   the MTOPR call.  The default record size is 1000(octal) bytes.

   ACCEPTS IN AC1:  source designator

	      AC2:  byte pointer to string in the caller's address space

	      AC3:  count of number of bytes in string, or 0

	      AC4:  byte (right-justified) on which  to  terminate  input
		    (optional)

   RETURNS     +1:  always, with updated byte pointers in AC2 and AC1, if
		    pertinent, and updated count in AC3, if pertinent

   The contents of AC3 and AC4 are interpreted in the same manner as they
   are in the SIN monitor call.

   Each SINR call returns one record to the caller.  Thus, the caller can
   read  variable-length records by indicating in AC3 the number of bytes
   to read.  Upon execution of the call, AC3 is updated  to  reflect  the

   number of bytes read (i.e., the number of bytes in the record).

   The number of bytes read depends on the number of bytes requested  and
   the	record	size.	When  using SINR, the program must set the record
   size to a value greater than or  equal  to  the  actual  size  of  the
   largest  record  being  read from the tape, or an error (IOX5) will be
   returned.  If the SINR call requests the same number of bytes  as  the
   record  size,  the  requested number is given to the caller.  When the
   record size equals the size of the actual record,  all  bytes  in  the
   record  are	read, and AC3 contains 0 on return.  When the record size
   is larger than the actual record, all bytes of the  record  are  read,
   but AC3 contains the difference of the number requested and the number
   read.  If the SINR call  requests  fewer  bytes  than  in  the  actual
   record,  the  requested  number  is given to the caller, the remaining
   bytes are discarded, and an error (IOX10) is returned.  In all  cases,
   the	next  request  for  input begins reading at the first byte of the
   next record on the tape because a SINR call never reads across  record
   boundaries.

   When reading in reverse, the number	of  bytes  requested  (i.e.,  the
   count in AC3) should be at least as large as the size of the record on
   the tape.  If the requested number is smaller, the remaining bytes  in
   the record are discarded from the beginning of the record.

   The action taken on a SINR call differs from the action taken on a SIN
   call.   The	SIN  call  reads across record boundaries to read all the
   bytes in a file.  The SINR call does not read across record boundaries
   and	will  discard  some  bytes in the file if the requested number is
   smaller than the actual record.

|  For a TCP/IP transmission, SINR will return when a  TCP  message  with
|  the PUSH flag is received, or the byte count is exhausted.

   Generates an illegal instruction interrupt on error conditions below.

   SINR ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX1:     File is not open for reading
   IOX4:     End of file reached
   IOX5:     Device or data error
   IOX7:     Insufficient system resources (Job Storage Block full)
   IOX8:     Monitor internal error
   IOX10:    Record is longer than user requested



			      SIR     JSYS 125

   Sets the addresses of the channel and priority level  tables  for  the
   specified  process.	(Refer to Section 2.6.3.) The process must run in
   one section of memory.  The tables must also be in that  section.   To
   set	the table addresses for a process that runs in multiple sections,
   use the XSIR% monitor call.	(See also the XRIR% monitor call.)

   ACCEPTS IN AC1:  process handle

	      AC2:  address of the priority level table in the left half,
		    and address of the channel table in the right half

   RETURNS     +1:  always.  The addresses  in	AC2  are  stored  in  the
		    Process Storage Block.

   If the contents of the tables are changed after execution of  the  SIR
   call, the new contents will be used on the next interrupt.

   The RIR monitor call can be used to obtain the table addresses  for	a
   process that runs in a single section.

   Generates an illegal instruction interrupt on error conditions below.

   SIR ERROR MNEMONICS:

   SIRX1:    Table address is not greater than 20
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			     SIRCM     JSYS 142

   Sets the  mask  for	reserved  software  interrupt  channels  for  the
   specified inferior process.	Conditions occurring on software channels
   that have the corresponding mask bit set do not generate an	interrupt
   to the inferior process.  Instead, the conditions cause the process to
   terminate or freeze.

   ACCEPTS IN AC1:  inferior process handle

	      AC2:  channel mask with bits set for reserved channels

	      AC3:  deferred terminal interrupt word

   RETURNS     +1:  always

   The RIRCM monitor call can be used to obtain  the  mask  for  reserved
   software  interrupt	channels.   Although  a  process can read its own
   channel mask, it cannot set its own;  the SIRCM call can be given only
   for	inferior processes.  This call provides a facility for a superior
   process to monitor an inferior one (for example, illegal instructions,
   memory  traps).  However, if the inferior process contains an ERJMP or
   ERCAL symbol after instructions that generate an interrupt on failure,
   the	ERJMP  or  ERCAL  will	prevent  the generation of the interrupt.
   Thus, the superior will not be able to monitor the inferior	with  the
   SIRCM call.

   Generates an illegal instruction interrupt on error conditions below.

   SIRCM ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle

   FRKHX8:   Illegal to manipulate an execute-only process



			     SIZEF     JSYS 36

   Returns the length of an existing file.

   ACCEPTS IN AC1:  JFN

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, byte count that  referenced  the  last  byte
		    written  into  the	file  in AC2, and number of pages
		    (512 words) in file in AC3.  The byte count  returned
		    depends  on the byte size recorded in the FDB and not
		    on the byte size specified in the OPENF call.

   For a file with holes, the byte count in  AC2  does	not  reflect  the
   file's actual size.

   The GTFDB monitor call can be used to obtain the byte  size	in  which
   the file was written.

   SIZEF ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer



			     SJPRI     JSYS 245

   Sets the scheduler priority control	word.	This  word  controls  the
   priority of a job and the permissible range of queues that the job may
   run in.  The priority word is set for the  top  process  and  for  all
   existing  inferior  processes.  Also, the priority word is passed down
   to any forks that are created subsequent to the SJPRI call.

   RESTRICTIONS:    This JSYS is reserved for  DEC.   Requires	WHEEL  or
		    OPERATOR capability enabled.

   ACCEPTS IN AC1:  job number

	      AC2:  priority word

   RETURNS     +1:  always

   The priority word has the following format:

|  JP%RTG(B0-11)  is the percentage of CPU resources to be guaranteed for

|		  the job.  This value may be in the range 0<= n <=99.
|
|	JP%SYS(B18) is the flag (JP%SYS) that designates  the  job  as	a
|		  system job.  System jobs get a higher priority than all
|		  user jobs, and the scheduler gives them  all	the  time
|		  they need for execution.
|
|	JP%MNQ(B4-29) is the lowest priority queue the job  may  run  in.
|		  This	queue  is always specified as the desired queue +
|		  1.  For example, queue 2 is specified as 3.
|
|	JP%MXQ(B30-35) is the highest priority queue the job can run in

   A priority word  containing	zero  in  the  left  half  means  no  CPU
   percentage is being requested.  A priority word containing zero in the
   right half means no queue assignments are being requested.

   Because this call assigns priority to a job, it is  indeterminate  how
   processes  within  a  job  that compete for the job's run time will be
   scheduled.  Use of this call  for  a  job  containing  more	than  one
   process implies that the processes must cooperate.

   Note that the high queue is high in	priority  but  low  in	numerical
   value  while  the  low  queue is low in priority but high in numerical
   value.

|  The SPRIW monitor call can be used to set  the  priority  word  for	a
|  specified process.

   Generates an illegal instruction interrupt on error conditions below.

   SJPRI ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required
   SJPRX1:   Job is not logged in



			     SKED%     JSYS 577

   Reads or modifies the monitor's scheduler data base.

   RESTRICTIONS:    Some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  function code

	      AC2:  address of argument block

   RETURNS     +1:  always

   The available functions are:

   Code    Symbol    Function

    1	   .SKRBC    Read bias control	knob  setting.	 Return  a  value
		     indicating  the  setting  of  the bias control knob.
		     This setting determines whether the scheduler favors

		     compute-bound jobs or interactive jobs.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SAKNB	 Bias control knob setting

    2	   .SKSBC    Set bias control setting  to  the	specified  value.
		     The  setting of this value controls the bias between
		     interactive and compute-bound jobs.  The  lower  the
		     setting, the more interactive jobs are favored.  The
		     higher the setting, the more compute-bound jobs  are
		     favored.	Currently,  the value may be an integer n
		     such that 1<= n <=20.  Requires  WHEEL  or  OPERATOR
		     capabilities enabled.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SAKNB	 Bias control knob setting

    3	   .SKRCS    Read  class  parameters.	Returns   the	following
		     values:

		     1.  Class of the job

		     2.  Share of the processor allocated for this class.
			 The  share is returned as a floating-point value
			 n, such that 0<= n <=1.

		     3.  Amount of processor actually used by the  class.
			 The  amount used is returned as a floating-point
			 value n, such that 0<= n <=1.
   Code    Symbol			     Function

   3	   .SKRCS (Cont.)

		     4.  1 minute load average.  The load average = (J/P)
			 where	J  is  the number of CPU-runnable jobs in
			 the class for the  time  period  and  P  is  the
			 fraction  of CPU allocated to the class.  Thus 3
			 jobs running in a 50% class would produce a load
			 average of 6.

		     5.  5 minute load average

		     6.  15 minute load average

		 Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SACLS	 Class

		      2       .SASHR	 Share

		      3       .SAUSE	 Use

		      4       .SA1ML	 1 minute load average

		      5       .SA5ML	 5 minute load average

		      6       .SA15L	 15 minute load average

    4	   .SKSCS    Set class parameters (as described above).  Requires
		     WHEEL or OPERATOR capability.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SACLS	 Class

		      2       .SASHR	 Share

    5	   .SKICS    Start or stop the class  scheduler.   If  the  class
		     scheduler	is  being  started,  this  function  also
		     specifies	 the   mode   in   which    class-to-user
		     assignments  are  made and whether windfall is to be
		     allocated to the active classes or withheld from the
		     active   classes.	  Requires   WHEEL   or  OPERATOR
		     capability.

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SACTL	 Control flags

					 The flags are as follows:

					  Bit	 Symbol    Meaning

					  B0	 SK%ACT    Class by
							   accounts

					  B1	 SK%WDF    Withhold
							   windfall

					  B2	 SK%STP    Class
							   scheduler off

 
    6	   .SKSCJ    Set the class of a job.  This function takes a  pair
		     of  numbers,  the	job to set and the desired class.
		     If setting  the  class  of  the  calling  job,  this
		     function is not privileged.  If setting the class of
		     another  job,  it	 requires   WHEEL   or	 OPERATOR
		     capabilities  enabled.  In either case, the job must
		     be allowed to reside in  the  selected  class.   The
		     calling job may be designated by -1.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SAJOB	 Job number

		      2       .SAJCL	 Class of job

		      3       .SAWA	 Windfall allocation

    7	   .SKRJP    Read class parameters for a job

		     Returns the following values:

		     1.  Job's share of the  processor.   This	value  is
			 returned  as a floating-point value n, such that
			 0<= n <=1.

		     2.  Job's use  of	the  processor.   This	value  is
			 returned  as a floating-point value n, such that
			 0<= n <=1.

 
   Argument block:
		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (including this word)

		      1       .SAJSH	 Job's share allotment

		      2       .SAJUS	 Job's current use

    10	   .SKBCR    Read  the	class  setting	for  batch  jobs.   A  -1
		     indicates	that  there is no special class for batch
		     jobs.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SABCL	 Batch class

    11	   .SKBCS    Set batch class.  Specifies the class in  which  all
		     batch  jobs  will	run.   A  -1 indicates no special
		     class for batch jobs.  If this value  is  specified,
		     it  overrides the valid classes for any user running
		     a batch job.  Requires WHEEL or OPERATOR capability.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SABCL	 Batch class

    12	   .SKBBG    Run all batch jobs in the "dregs" queue.  The  dregs
		     queue  is	a  special queue whose processes are only
		     allowed to run when no normally scheduled	processes
		     are  available  to  run.  Requires WHEEL or OPERATOR
		     capability.

		     This function applies only if the class scheduler is
		     not being used.  The argument is either 0 (clear) or
		     non-zero (set).  A  non-zero  indicates  that  batch
		     jobs should be run in the "dregs" queue.

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SADRG	 Flag word

					 0 = don't run in dregs queue
					 non-zero = run in dregs queue

 
|   13	   .SKDDC    Set system class default

    14	   .SKRCV    Read status

		     Argument block:

		     Word     Symbol	 Contents

		      0       .SACNT	 Count of words in argument block
					 (Including this word)

		      1       .SACTL	 Flags

					 The flags are as follows:

					 Bit	 Symbol    Meaning

					 B0	 SK%ACT    Class by
							   accounts

					 B1	 SK%WDF    Withhold
							   windfall

					 B2	 SK%STP    Class
							   scheduler off

					 B3	 SK%DRG    Batch jobs are
							   being run in
							   dregs queue

							   SKED% ERROR
							   MNEMONICS:

   ARGX02:   Invalid function
   ARGX04:   Argument block too small
   ARGX08:   No such job
   ARGX15:   Job is not logged in
   ARGX25:   Invalid class
   ARGX29:   Invalid class share

   ARGX30:   Invalid KNOB value
   ARGX31:   Class scheduler already enabled
   CAPX1:    WHEEL or OPERATOR capability required
   SKDX1:    Cannot change class



			     SKPIR     JSYS 127

   Tests to see if the software  interrupt  system  is	enabled  for  the
   specified process.

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  failure, software interrupt system is off

	       +2:  success, software interrupt system is on

   The EIR monitor call is used to enable the software interrupt  system,
   and the DIR monitor call is used to disable the system.

   Generates an illegal instruction interrupt on error conditions below.

   SKPIR ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			     SMAP%     JSYS 767

   Maps one or more contiguous sections of memory.  This call removes any
   existing   mapping	from   the  section  or  sections  named  as  the
   destination.  To learn the contents of a section map, use  the  RSMAP%
   monitor call.  The four SMAP% functions are discussed below.

 
   Case I:  Mapping File Sections to a Process

   This function maps one or more sections of a file to a  process.   All
   pages  that exist in the source sections are mapped to the destination
   sections.

   To map a process section to a file, use the PMAP monitor call.

   ACCEPTS IN AC1:  source identifier:	JFN,,file section number

	      AC2:  destination identifier:  fork handle,,process section
		    number

	      AC3: flags,,count

				The  flags  determine	access	 to   the
				destination section, and the count is the
				number	of  contiguous	sections  to   be
				mapped.   The count must be between 1 and
				37.  The flags are as follows.

		   B2(SM%RD)	Allow read access

		   B3(SM%WR)	Allow write access

		   B4(SM%EX)	Allow execute access

		   B18-35	The number  of	sections  to  map.   This
				number must be between 1 and 37.

   RETURNS     +1: always

 
   Case II:  Mapping Process Sections to a Process

   This function maps one or more sections of memory from one process  to
   another.   All  pages  that exist in the source sections are mapped to
   the destination sections.

   ACCEPTS IN AC1:  source identifier:	fork handle,,section number

	      AC2:  destination identifier:  fork handle,,section number

	      AC3: flags,,count
				The  flags  determine	access	 to   the
				destination section, and the count is the
				number	of  contiguous	sections  to   be
				mapped.  This count must be between 1 and
				37.  All source sections that  exist  are
				mapped	 to  destination  sections.   The
				flags are as follows.

		   B2(SM%RD)	Allow read access

		   B3(SM%WR)	Allow write access

		   B4(SM%EX)	Allow execute access

		   B6(SM%IND)	Map  the  destination  section	using  an
				indirect   section   pointer.	Once  the
				destination section map is  created,  the
				indirect   section   pointer  causes  the
				destination  section  map  to  change  in
				exactly  the  same  way  that  the source
				section map changes.

		   B18-35	Count  of  the	 number   of   contiguous
				sections to be mapped.

   RETURNS     +1: always

   If you map a source section into a  destination  section  with  SM%IND
   set,  SMAP% creates the destination section using an indirect pointer.
   This means that the destination section will contain  all  pages  that
   exist in the source section, and the contents of the destination pages
   will be identical to the contents of the source pages.

   In addition, changes that occur in the source section map after  SMAP%

   creates  the  destination section cause the same changes to be made in
   the destination section  map.   This  ensures  that	both  the  source
   section and the destination section contain the same data.

   If SM%IND is not set, SMAP% creates the new	section  using	a  shared
   pointer.  After SMAP% maps the destination section, changes that occur
   in the source section's map do not cause any change in the destination
   section's  map.   Thus  after  a short time the source and destination
   sections might contain different data.

   If you request a shared pointer (SM%IND not set)  to  the  destination
   section,  what  happens  depends on the contents of the source section
   when the SMAP% call executes.  The outcome is one of the following.

	1.  If the source section does not exist, the SMAP% call fails.

	2.  If the source is a private section, a mapping to the  private
	    section  is  established,  and  the  destination  process  is
	    co-owner of the private section.

	3.  If the source section contains a  file  section,  the  source
	    section is mapped to the destination section.  Although files
	    do not actually have section boundaries,  this  monitor  call
	    views  them as having sections that consist of 512 contiguous
	    pages.  Each file section starts with a page number  that  is
	    an integer multiple of 512.

	4.  If the source section map is made by  means  of  an  indirect
	    section  pointer, SMAP% follows that pointer until the source
	    section is found to be nonexistent, a private section,  or	a
	    section of a file.

 

   Case III:  Creating a Section

   This function creates a new, private section.  It  does  not  map  any
   pages into the new section.

   A  process  must  use  SMAP%  to  create  a	non-zero  section  before
   referencing	such  a  section.   A  reference to a nonexistent section
   fails with an illegal memory reference error.  Note, however, that  if
   a  process  uses  PMAP  to  map  a  page to a nonexistant section, the
   monitor creates a private section and the PMAP succeeds.

   ACCEPTS IN AC1:  0

	      AC2:  destination identifier:  fork handle,,section number

	      AC3:  flags,,count

   The flags determine access to the destination section, and  the  count
   is  the  number  of	contiguous  private sections to be created.  This
   count must be between 1 and 37.  The flags are as follows.

		   B2(SM%RD)	Allow read access

		   B3(SM%WR)	Allow  write  access   to   the   created
				section.   This function sets this bit by
				default  to  avoid  the  creation  of	a
				read-only    or    execute-only   private
				section.

		   B4(SM%EX)	Allow  execute	access	to  the   created
				section.

		   B6(SM%IND)	Create	the  section  using  an  indirect
				pointer.

		   B18-35	Count  of  the	 number   of   contiguous
				sections to be created.  This number must
				be between 1 and 37.

   RETURNS     +1: always

 
   Case IV: Deleting Process Sections

   This  function  removes  (unmaps)  a  section  or  several  contiguous
   sections of a process.

   ACCEPTS IN AC1:  -1

	      AC2:  destination identifier:  fork handle,,section number

	      AC3:  0,,count
		    The count is the number of contiguous sections to  be
		    unmapped.  This number must be between 1 and 37.

   RETURNS     +1:  always

   If the section being removed (unmapped)  was  created  with	a  shared
   pointer,  and  if  the  removing fork is not the owner of the section,
   then SMAP% decrements the share count for the section and deletes  the
   shared  pointer.   This  is always true when the memory sections being
   deleted contain file sections.

   If the pointer being deleted is the last pointer to a private section,
   then  SMAP% clears the page table for that section.	But if the owning
   fork attempts to unmap a private section to	which  other  forks  have
   shared or indirect pointers, the SMAP% call fails.

   Generates an illegal instruction interrupt on error conditions below.

   ARGX23:   Invalid  section  number  ARGX24:	 Invalid  count   SMAPX1:
   Attempt to delete a section still shared SMAPX2:  Indirect section map
   loop detected



			      SMON     JSYS 6

   Sets various flags and parameters in the monitor's  data  base.   Most
   flag-oriented  items  are  set  by  specifying 1 in AC2 and cleared by
   specifying  0  in  AC2.   In  a  few  cases	(noted	in   the   text),
   flag-oriented  items  are  set by setting and clearing the appropriate
   bit(s) in AC2.  Value-oriented items are set to the value in AC2.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled.   Some
		    functions are for ARPANET systems only.

   ACCEPTS IN AC1:  function code

	      AC2:  new value for the indicated function

   RETURNS     +1:  always

   The codes for the functions are as follows:

     Code  Symbol      Meaning

      0    .SFFAC      FACT file entries are allowed.
      1    .SFCDE      CHECKD found errors.
      2    .SFCDR      CHECKD is running.
      3    .SFMST      Manual start is in progress.
      4    .SFRMT      Remote LOGINs (dataset lines) are allowed.
      5    .SFPTY      PTY LOGINs are allowed.
      6    .SFCTY      CTY LOGINs are allowed.
      7    .SFOPR      Operator is in attendance.
     10    .SFLCL      Local LOGINs (hardwired lines) are allowed.
     11    .SFBTE      Bit table errors found on startup.
     12    .SFCRD      Users   can   change    nonprivileged	directory
		       parameters with the CRDIR monitor call.
     13    .SFNVT      ARPANET terminal LOGINs are allowed.
|    14    .SFWCT      WHEEL LOGINs on CTY are allowed.
|    15    .SFWLC      WHEEL LOGINs on local terminals are allowed.
|    16    .SFWRM      WHEEL LOGINs on remote terminals are allowed.
|    17    .SFWPT      WHEEL LOGINs on PTYs are allowed.
|    20    .SFWNV      WHEEL LOGINs on network	virtual  terminals  (NVT)
|		       are allowed.
     21    .SFUSG      USAGE file entries are allowed.
     22    .SFFLO      Disk latency optimization using	the  RH20  backup
		       register  is  enabled.	This feature is not to be
		       enabled unless the M8555 board of the RH20  is  at
		       Revision   Level   D  AND  either  of  the  KL10-C
		       processor  is  at  Revision  Level  10  or  KL10-E
		       processor is at Revision Level 2.
     23    .SFMTA      If set, indicates that MOUNTR  magtape  allocation
		       is enabled.
     24    .SFMS0      Set system message level 0

		       AC2:  1 (SF%MS0) to set;  0 to clear

     25    .SFMS1      Set system message level 1

		       AC2:  1 (SF%MS1) to set;  0 to clear
|    26    .SFBGS      Send operator  messages	to  CTY;   if  off,  such
|		       messages  as  BUGINF,  BUGCHK,  and "resource low"
|		       will be sent to OPR terminals, rather than the CTY
|		       AC2:  1 (SF%BGS) to send to CTY;  0 to send to OPR
|    27    .SFMCB      Allow DECnet logins
|
|		       AC2:  1 (SF%MCB) to set;  0 to clear
|
|    30    .SFDPR      Enable disk preallocation.
     44    .SFNTN      Turn ARPANET on.
     45    .SFNDU      Reinitialize ARPANET if it is down.
     46    .SFNHI      Initialize ARPANET host table.
     47    .SFTMZ      Set the local time zone to the value given in AC2.
     50    .SFLHN      Set the local ARPANET host  number  to  the  value
		       given in AC2.
     51    .SFAVR      Account validation will be running on this system.
     52    .SFSTS      Enable/disable status reporting.
     53    .SFSOK      Set GETOK% defaults

		       AC2:  Flags,,GETOK% function code

		       Bit Symbol  Meaning

		       B0 SF%EOK   0 = Disable access checking
				   1 = Enable access checking

		       B1 SF%DOK   0 = Deny access if checking disabled
				   1 = Allow access if checking disabled

		       This   function	 should   be   given	by    the
		       access-control	 program    (supplied	 by   the
		       installation) to turn on access checking for  each
		       of  the desired functions.  It is also used to set
		       the default action for each function that  is  not
		       being   checked	by  the  access-control  program.
|		       Installation-defined  function  codes   (400000+n)
|		       must  be  enabled/disabled  by using function code
|		       400000,	regardless  of	the  installation-defined
|		       function  code given in the GETOK% call.  If there
		       is no access-control program, the  default  action
		       of  the GETOK% JSYS will be to deny access for any
		       installation-defined function code.

		       See the description of the GETOK% JSYS for  GETOK%
		       function codes.

      54   .SFMCY      Specifies the maximum  offline  expiration  period
		       (tape recycle period) in days, for ordinary files.
      55   .SFRDU      Read date update function
      56   .SFACY      Specifies the maximum  offline  expiration  period
		       (tape recycle period) in days, for archive files.
      57   .SFRTW      Sets/clears the	no-retrieval-waits  flag  in  the
		       monitor.  When set, this specifies that those file
		       retrievals  requests  that  are	waiting  for  the
		       retrieval should fail rather than wait.
      60   .SFTDF      Set tape mount controls

		       Flags:

		       Bit     Symbol	 Meaning

		       B0      MT%UUT	 1  unload unrecognizable tapes
					 0  treat unrecognizable tapes
					    as unlabeled

      61   .SFWSP      Enable working set preloading

|     62   .SFDST      Set Daylight Saving Time conversion method
|
|		       Value  Symbol  Meaning
|		       0      .DSTAU  Perform automatic DST changeover
|		       1      .DSTNV  Never perform DST changeover
|		       2      .DSTAL  Always perform DST conversion
|
|     63	       Reserved for DIGITAL.
|
|     64   .SFMSD      Set MSCP access for  disk  drive;   this  function
|		       allows or restricts other systems' access to local
|		       MASSBUS disks on a per drive basis.
|
|		       AC2 contains address of an argument block  in  the
|		       following format:

|		       Offset Symbol  Meaning
|		       0      .SVCNT  length of the block, including this
|				      word
|		       1      .SVTYP  flags	 and	  drive      type
|				      Flag:  B0(MS%DDU)  if    set,   the
|				      drive is RESTRICTED;  if	not  set,
|				      the drive is ALLOWED.
|		       2      .SVDSH  high order serial  number  of  disk
|				      drive
|		       3      .SVDSN  low order  serial  number  of  disk
|				      drive
|
|     65   .SFSPR      Set SPEAR event counter
|
|     66   .SFCOT      Set time  between  carrier  off	event  (including
|		       network	connection  being  broken)  and automatic
|		       logout  of  the	job.   AC2   is   the	time   in
|		       milliseconds.  The default is 5 minutes.
|
|     67   .SFHU0      Control hangup action for jobs not logged in
|
|		       AC2:  0 to not hang up;	1 to hang up
|		       The default is to hang up.
|
|     70   .SFHU1      Control hang up action for jobs logged in
|
|		       AC2:  0 to not hang up;	1 to hang up
|		       The default is to not hang up.
|
|     71   .SFXEC      Flag word for configurations for the EXEC
|
|		       AC2 Flags:
|		       B0(XC%FST) do not allow /FAST option on LOGIN
|
|     72   .SFSEA      Set Ethernet address.  AC2 contains  the  Ethernet
|		       interface  channel  number.   AC3  contains a byte
|		       pointer to the 6 (8 bit) byte Ethernet address.
|
|     73   .SFDCD      Set "don't care" disk.  Used to	indicate  that	a
|		       drive   may   be   accessed  without  coordinating
|		       accesses with other processors.	Arguments are the
|		       same as for the .SFMSD function, however, no flags
|		       are allowed.
|
|     74   .SFLTS      Set  Local  Area  Transport  (LAT)   state.    AC2
|		       contains  the LAT state:  LS.OFF for off, or LS.ON
|		       for on.

   The TMON monitor call can be  used  to  obtain  the	settings  of  the
   various monitor flags.

   Generates an illegal instruction interrupt on error conditions below.

   SMON ERROR MNEMONICS:

   SMONX1:   WHEEL or OPERATOR capability required
   SMONX2:   Invalid SMON function



			    SNDIM%     JSYS 750

   Places a message in a  previously  assigned	ARPANET  special  message
   queue.

   RESTRICTIONS:    for ARPAnet systems only.

   ACCEPTS IN AC1:  Bit0:	 If set, the message  contains	a  96-bit
				 leader.   If reset, the message contains
				 a 32-bit leader.
		    Bit1:	 If  set,  the	data   resides	 in   the
				 high-order  32  bits of each word of the
				 message.  If reset, the data resides  in
				 all 36 bits of each word of the message.
		    Bits 18-35:  Special Queue Header

	      AC2:  address of an extended message

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, message queued

   The RCVIM JSYS can be used to retrieve  a  message  from  the  special
   message queue.

   SNDIM ERROR MNEMONICS:

   SNDIX1:   Invalid message size
   SNDIX2:   Insufficient system resources (no buffers available)
   SNDIX3:   Illegal to specify NCP links 0-72
   SNDIX4:   Invalid header value for this queue
   SNDIX5:   IMP down
   SQX1:     Special network queue handle out of range
   SQX2:     Special network queue not assigned



			    SNDIN%     JSYS 754
|
|  Sends an Internet message.
|
|  ACCEPTS IN AC1:  Internet queue handle
|
|	      AC2:  Byte pointer to buffer that contains the  message  to
|		    be sent
|
|	      AC3:  Not used, must be 0
|
|  RETURNS     +1:  Failure, with error code in AC1
|
|	       +2:  Success
|
|  The message buffer must contain the total word count for the buffer in
|  word  0,  a	valid Internet header in B0-31 of words 1 through 5, and,
|  optionally, data in words 6 through n.
|
|  If .IQPTM was non-zero in the ASNIQ% call (the queue was assigned with

|  port-filtering  turned  on),  then  the  port(s)  must  be in the word
|  following the Internet header.   The  address  of  this  word  can  be
|  obtained  by adding the address of word -1 in the buffer to the number
|  in the Internet data offset field.
|
|  The monitor supplies the source host field  and  the  Internet  header
|  checksum  field  in	the  header.  The remainder of the header must be
|  supplied by the caller.
|
|  SNDIN% ERROR MNEMONICS:
|
|  SNDIX1:   Invalid message size
|  SNDIX2:   Insufficient system resources (no buffers available)
|  SNDIX3:   Illegal to specify NCP links 0-72
|  SNDIX4:   Invalid header value for this queue
|  SNDIX5:   IMP down
|  SQX1:     Special network queue handle out of range
|  SQX2:     Special network queue not assigned



			     SNOOP     JSYS 516

   Performs system performance	analysis.   The  process  can  patch  any
   instruction	in  the  monitor  with	this call.  For example, the user
   program can build a PC histogram by patching  an  instruction  in  the
   code for the 1.0-millisecond clock.

   The general procedure for using the SNOOP call is as follows:

	1.  The user program supplies a set of breakpoint  routines  that
	    are  called  by  the  monitor when control reaches one of the
	    patched instructions.  These routines  are	mapped	into  the
	    monitor's address space into an area selected by the monitor.
	    Thus, the routines must have self-relocating code or must  be
	    relocated  by  the	user  program  to where they will be run,
	    based on the monitor address supplied by the monitor.

	2.  The user program defines a number of  breakpoints,	analogous
	    to DDT breakpoints.

	3.  The   user	 program   inserts   all   of	the   breakpoints
	    simultaneously.

	4.  The user program goes to "sleep" or waits for terminal  input
	    while its breakpoint routines obtain control.

	5.  When the user  program  determines	that  the  routines  have
	    completed, it removes the breakpoints.

   The user program breakpoint routines run in the monitor address space,
   which  means  that  the addresses of the code and the data are monitor
   addresses.  The user program must modify these addresses, based on the
   values  returned  by  the monitor, after the initialization but before
   the	"snooping."   The   breakpoint	 routines   must   preserve   any
   accumulators  they  use.  Also, they must not cause a page fault if at
   interrupt level or if a patch has been made in the page fault  handler
   or  in  the	scheduler.  Thus, the breakpoint routines should test for

   swappable code being in memory before referencing  it.   If	swappable
   code  needs	to  be referenced, the swappable monitor can be locked in
   memory, if desired.	When a patch is made to a routine called at  many
   interrupt  levels, the program must specify a reentrant instruction to
   be used for patching.

|  RESTRICTIONS:    requires  enabled  WHEEL,  OPERATOR,  or  MAINTENANCE
|		    capability

   ACCEPTS IN AC1:  function code

	      AC2:  function-specific argument

	      AC3:  function-specific argument

	      AC4:  function-specific argument

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The following functions are available:

	Function  Symbol		   Meaning
	 Code

	   0	  .SNPLC    Declare and  lock  code  into  the	monitor's
			    address space.

			    AC2:  number of pages desired

			    AC3:  page number in user space of start of
				  breakpoint routines to be locked

			    On return, the pages are locked  contiguously
			    in	the  monitor's	address  space,  and  AC2
			    contains	the    monitor	  page	  numbers
			    corresponding to the given user page number.

	   1	  .SNPLS    Lock the swappable monitor.  This function is
			    useful   for   analyzing  swappable  data  at
			    interrupt  level.	On  return,  the   entire
			    swappable monitor is locked.

	   2	  .SNPDB    Define a breakpoint

			    AC2:  number of breakpoint

			    AC3:  address in monitor space to be patched.
				  The  patched	instruction can be a skip
				  type	  instruction	 or    a    PUSHJ
				  instruction,	 and   the   patching  is
				  similar to that in DDT.   The  routines
				  will receive control before the patched
				  instruction is executed.

			    AC4:  instuction to be  executed  before  the
				  patched  instruction	is executed.  The
				  instruction can be:

				  JSR LOC where  LOC  is  an  address  in
				  monitor space of the user's routine.

				  PUSHJ P,LOC when reentrant or recursive
				  code is patched.

				  AOS LOC to count frequency  of  monitor
				  execution points.

				  The	error	return	 is   given    if
				  breakpoints have already been inserted.

 
						NOTE

				Putting a SNOOP breakpoint on a PUSHJ
				or  other subroutine call instruction
				(including  JSYS,  MDISMS,  etc)  can
				cause  problems.   If  the process is
				not in a NOSKED state already, it can
				be rescheduled during the breakpoint,
				in  which  case  the  breakpoint   is
				removed, and the subsequent return is
				made to non-existent code.

 

	   3	  .SNPIB    Insert all breakpoints and start analyzing.

	   4	  .SNPRB    Remove all breakpoints and stop analyzing.

	   5	  .SNPUL    Unlock and release all storage, and  undefine
			    and remove all breakpoints.

	   6	  .SNPSY    Obtain the address of a monitor symbol.

			    AC2:  radix-50 symbol

			    AC3:  radix-50  program  name  if	a   local
				  address  is  desired.  If AC3 is 0, the
				  entire symbol table is searched.

			    On return, AC2 contains the  monitor  address
			    or value of the symbol.

|	   7	  .SNPAD    Obtain   a	 monitor    symbol.	(Requires
|			    MAINTENANCE capability)

			    AC2:  36-bit value of symbol that  is  to  be
				  looked   up  in  the	monitor's  symbol
				  table.

			    AC3:  radix-50 program name if a local  value
				  is  desired.	 If  AC3 is 0, the entire
				  symbol table is searched.

			    On return, AC2 contains  the  first  radix-50
			    monitor  symbol  that is closest to and has a
			    value less than the specified value, and  AC3
			    contains  the difference between the value of
			    the symbol returned and the specified value.

   SNOOP ERROR MNEMONICS:

   SNOPX1:   WHEEL or OPERATOR capability required
   SNOPX2:   Invalid function
   SNOPX3:   .SNPLC function must be first

   SNOPX4:   Only one .SNPLC function allowed
   SNOPX5:   Invalid page number
   SNOPX6:   Invalid number of pages to lock
   SNOPX7:   Illegal to define breakpoints after inserting them
   SNOPX8:   Breakpoint is not set on instruction
   SNOPX9:   No more breakpoints allowed
   SNOP10:   Breakpoints already inserted
   SNOP11:   Breakpoints not inserted
   SNOP12:   Invalid format for program name symbol
   SNOP13:   No such program name symbol
   SNOP14:   No such symbol
   SNOP15:   Not enough free pages for snooping
   SNOP16:   Multiply-defined symbol
   SNOP17:   Breakpoint already defined
   SNOP18:   Data page is not private or copy-or-write



			     SOBE     JSYS 103

   Tests to see if the designated file output buffer is empty.

   ACCEPTS IN AC1:  destination designator

   RETURNS     +1:  output buffer is not empty.  AC2 contains the  number
|		    of	bytes  remaining in output buffer, or 0 if output
|		    is in progress.

	       +2:  output buffer is empty;  AC2 contains 0.  This return
		    is	given  if  an  error  occurs  on  the  call;  AC2
		    contains the appropriate error code.

   If the designator is not associated with a terminal, the +2 return  is
   given.

   The SIBE call can be used to determine if the input buffer is empty.

   SOBE ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     SOBF     JSYS 175

   Tests to see if the designated file output buffer is full.

   ACCEPTS IN AC1:  file designator

   RETURNS     +1:  output buffer is not full.	This return is	given  if

		    an error occurs on the call;  AC2 will contain 0.

	       +2:  output buffer is full

   On either return, the number of bytes remaining in the  output  buffer
   is returned in AC2 (if no error occurred on the call).



			      SOUT     JSYS 53

   Writes a string from the  caller's  address	space  to  the	specified
   destination.   The  string  can  be	a  specified  number  of bytes or
   terminated with a specified byte.

   ACCEPTS IN AC1:  destination designator

	      AC2:  byte pointer to string to be written

	      AC3:  count of the number of bytes in string, or 0

	      AC4:  byte (right-justified) on which to terminate output

   RETURNS     +1:  always, with updated string pointers in AC2 and  AC1,
		    if pertinent, and updated count in AC3, if pertinent

   The contents of AC3 controls the number of bytes to write.

	AC3=0	  The string being written is terminated with a 0 byte.

	AC3>0	  A string of the specified number  of	bytes  is  to  be
		  written  or  a string terminated with the byte given in
		  AC4 is to be written, whichever occurs first.

	AC3<0	  A string of minus the specified number of bytes  is  to
		  be written.

   The contents of AC4 is  ignored  unless  the  contents  of  AC3  is	a
   positive number.

|  If AC3 is a negative number and the destination designator  refers  to
|  memory,  then  the  string  being written is terminated with a 0 byte.
|  The byte pointer is left positioned before this 0 byte.

   The output is terminated when the byte count becomes 0, the	specified
   terminating	byte  is reached, or an error occurs during the transfer.
   The specified terminating byte is copied to the destination.

   After execution of  the  call,  the	file's	pointer  is  updated  for
   subsequent  I/O to the file.  AC2 is updated to point to the last byte
   written or, if AC3 contained 0, the last nonzero  byte  written.   The
   count in AC3 is updated toward zero by subtracting the number of bytes
   written from the number of bytes requested to be written.

   When the SOUT call is used to write data to a magnetic tape, it  sends
   a  series  of  bytes packed into records of the specified record size.
   The size of the records to write is specified with either the SET TAPE
   RECORD-LENGTH  command  or the .MOSRS function of the MTOPR call.  The
   default record size is 1000(octal) words.  Thus, if the record size is

   1000  bytes,  two  SOUT calls, each writing 500 bytes, would write one
   record.  If during the writing, the end of tape mark  was  passed,  an
   error  (IOX5)  is  given.   However,  the  data  has been successfully
   written and the device status word has the MT%EOT bit set to  indicate
   this  condition.   Refer to Section 2.4.7.1 for more information about
   magnetic tape I/O.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

   Generates an illegal instruction interrupt on error conditions below.

   SOUT ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX2:     File is not opened for writing
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end of file
   IOX7:     Insufficient system resources (Job Storage Block full)
   IOX8:     Monitor internal error
   IOX11:    Quota exceeded
   IOX33:    TTY input buffer full
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     SOUTR     JSYS 532

   Writes a variable-length record from the caller's address space to the
   specified device.

   If the record is to be written to magnetic tape, the maximum  size  of
   the	 record   to   write  is  specified  with  either  the	SET  TAPE
   RECORD-LENGTH command or the .MOSRS function of the MTOPR  call.   The
   default record size is 1000(octal) bytes.

   ACCEPTS IN AC1:  destination designator

	      AC2:  byte pointer to string to be written

	      AC3:  count of number of bytes in string, or 0

	      AC4:  byte (right-justified) on which to	terminate  output
		    (optional)

   RETURNS     +1:  always, with updated byte pointers in AC2 and AC1, if
		    pertinent, and updated count in AC3, if pertinent

   The contents of AC3 and AC4 are interpreted in the same manner as they
   are in the SOUT monitor call.

   Each SOUTR call writes at least one	record.   Thus,  the  caller  can
   write variable-length records by indicating in AC3 the number of bytes
   to write in the record.  If the SOUTR call requests more bytes  to  be

   written than the maximum record size, then records of the maximum size
   are written, plus another record containing the remaining  bytes.   If
   the	SOUTR  call  requests  fewer  bytes than the maximum, or a number
   equal to the maximum, to be written, then  records  of  the	requested
   size are written.

   The SOUTR call differs from the SOUT  call  in  that  the  SOUTR  call
   writes  records on the tape upon execution of the call.  The SOUT call
   does not write a record on the tape until the number of bytes equal to
   the	record	size  have been written.  Thus, if a record is being made
   from several strings in the caller's address space, the SOUT call  can
   be used for the first strings and the SOUTR call for the last string.

|  For a TCP/IP transmission, SOUTR will set the TCP PUSH  flag  for  the
|  last  message  generated  by the call and force all data held in local
|  buffers to be sent immediately.

   Can cause several  software	interrupts  or	process  terminations  on
   certain  file  conditions.	(Refer	to  bit  OF%HER of the OPENF call
   description.)

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

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   IOX2:     File is not open for writing
   IOX5:     Device or data error
   IOX6:     Illegal to write beyond absolute end of file
   IOX7:     Insufficient system resources (Job Storage Block full)
   IOX8:     Monitor internal error
   IOX9:     Function legal for sequential write only
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     SPACS     JSYS 60

   Sets the accessibility of a page.  This call affects the map  word  of
   the page named in AC1 (no indirect pointers are allowed).

   ACCEPTS IN AC1:  process/file designator in the left  half,	and  page
		    number within the file or process in the right half

	      AC2:  access information

		    B2(PA%RD)  permit read access

		    B3(PA%WT)  permit write access

		    B4(PA%EX)  permit execute access

		    B9(PA%CPY) copy-on-write

   RETURNS     +1:  always

   When used to modify a process page, the SPACS call does not allow  any
   greater  access  than  can  be  obtained with the PMAP call (i.e., the
   access specified on the OPENF call  is  applied  to	SPACS  operations
   involving file pointers).

   The SPACS call does not allow bits to be set in a page that	does  not
   already exist.

   The RPACS monitor call can be used to obtain the  accessibility  of	a
   page.

   Generates an illegal instruction interrupt on error conditions below.

   SPACS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX5:    File is not open
   DESX8:    File is not on disk
   SPACX1:   Invalid access requested
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			     SPJFN     JSYS 207

   Sets the primary JFNs (.PRIIN and .PRIOU) for the specified process.

   ACCEPTS IN AC1:  process handle

	      AC2:  primary input JFN  in  the	left  half,  and  primary
		    output JFN in the right half

   RETURNS     +1:  always

   The JFNs given cannot be either 100 or  101.   These  JFNs  cause  the
   specified  process  to  receive an error on any primary I/O operation.
   If minus one is placed in the appropriate half  of  AC2,  the  primary
   input/output JFNs are set to the process' controlling terminal.

   The GPJFN monitor call can be used to obtain the primary JFNs.

   Generates an illegal instruction interrupt on error conditions below.

   SPJFN ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   DESX3:    JFN is not assigned



			     SPLFK     JSYS 314

|  Changes (splices) the process structure of a job.  This  monitor  call
|  allows  two types of changes to the process structure.  The first type
|  allows two parallel processes to be	spliced  such  that  one  process
|  becomes  the superior of the other.	The second type permits a process
|  to splice its inferior to its superior, thereby deleting  the  calling
|  process.   The paragraphs below describe the calling sequences for the
|  two types.
|
|  Case 1 - Inserting a process between a given process
|	    and one of its inferiors
|
|  In this case, the new  process  structure  provides	superior  process
|  capabilities  that were not available between parallel processes.  The
|  process that becomes the new superior must be either the one executing
|  the	SPLFK  call  or an inferior of it.  The new superior process must
|  not be the same as the new inferior process, and must not be  inferior
|  to  the  new  inferior  process.   The  new	inferior  and  all of its
|  inferiors will be frozen after execution of the SPLFK call.

   ACCEPTS IN AC1:  process handle of the new superior process

	      AC2:  process handle of the new inferior process

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, a process handle in AC1.  This handle may be
		    used by the new superior process (in AC1) to refer to
		    its new inferior (in AC2).

|  Case 2 - Removing a process as the superior of another process
|
|  In this case, the new process structure allows a process to	begin  or
|  continue  execution	as  a logical replacement of the calling process.
|  The calling process can splice only one inferior in place  of  itself.
|  After  the  execution  of the call, the calling process is halted, its
|  process' pages are unmapped, it is removed from the process structure,
|  and	it  is	completely  replaced  by the inferior process.	Any other
|  inferiors of the calling process are removed as well.  In other words,
|  the	calling process and its remaining inferiors will be treated as if
|  the process had been  removed  with	the  KFORK%  monitor  call.   The
|  process  that  is  spliced  to  the calling process' superior uses the
|  process handle of the calling process and continues with any functions
|  that  were being performed by the superior before the execution of the
|  SPLFK% call.
|
|  ACCEPTS IN AC1:  B0(SF%EXT) and the address of an  argument	block  in
|		    the following format:
|
|	    Word   Symbol    Meaning
|
|	    0	   .SFLEN    Length of argument block including this word
|
|	    1	   .SFCOD    Function code.  Currently, only the function
|			     .SFUNS  (code  1)	is  defined  to  remove a
|			     process  and  continue  or  start	the   new
|			     inferior.
|
|	    2	   .SFUIN    Process handle of the new inferior process
|
|	    3	   .SFUFL    Flags

|	    4	   .SFUA1    PC flags,,0  or  entry  vector  offset  (see
|			     description of flag bits below
|
|	    5	   .SFUA2    Starting address if SF%ADR is set
|
|  The flag bits in word .SFUFL are as follows:
|
|	    Bit    Symbol    Meaning
|
|	    0	   SF%CON    continue the new inferior from where it  was
|			     halted.   The  contents  of  word .SFUA1 are
|			     ignored.
|
|	    1	   SF%GO     start the new inferior at the  entry  vector
|			     offset in word .SFUA1.
|
|	    2	   SF%ADR    interpret the contents of words  .SFUA1  and
|			     .SFUA2  as flags and an address to start the
|			     new inferior process.  If this flag  is  not
|			     set,   the   contents  of	word  .SFUA1  are
|			     interpreted as an entry vector offset.
|
|  RETURNS     +1:  failure, error code in AC1
|
|	       +2:  success, a process handle in AC1.

   SPLFK ERROR MNEMONICS:

|  FRKHX1:   Invalid process handle
|  FRKHX2:   Illegal to manipulate a superior process
|  FRKHX3:   Invalid use of multiple process handle
|  FRKHX5:   Process has not been started
|  FRKHX8:   Illegal to manipulate an execute-only process
|  SFRVX1:   Invalid position in entry vector
   SPLFX1:   Process is not inferior or equal to self
   SPLFX2:   Process is not inferior to self
   SPLFX3:   New superior process is inferior to intended inferior



			     SPOOL     JSYS 517

   Defines and initializes a device to be used for input spooling or sets
   and reads the directory for a spooled device.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  length of  argument  block	in  the  left  half,  and
		    function code in the right half

	      AC2:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The format of the argument  block  is  different  depending	upon  the
   particular  function  desired.   The  available  functions, along with
   their argument block formats, are as follows:

	Code	  Symbol    Meaning

	 0	  .SPLDI    Define  an	input	spooling   device.    The
			    argument block is:

			    Word  Symbol  Meaning

			    0	  .SPLDV  Device  designator   of   input
					  device.

			    1	  .SPLNA  Pointer    to    name    string
					  comprising  the set of files to
					  be input.

			    2	  .SPLGN  Generation  number   of   first
					  file.      This    number    is
					  incremented by 1 each time  the
					  spooled device is opened.

	 1	  .SPLSD    Set the directory of the spooled device.  The
			    argument block is:

			    Word  Symbol  Meaning

			    0	  .SPLDV  Device  designator  of  spooled
					  device.

			    1	  .SPLDR  Directory number.  This  number
					  is   the   logged-in	directory
					  number of the user  who  opened
					  the spooled device.

			    This function requires the	process  to  have
			    WHEEL or OPERATOR capability enabled.
	Code	  Symbol		    Meaning

	 2	  .SPLRD    Read the directory	of  the  spooled  device.
			    The argument block is:

			    Word  Symbol  Meaning

			    0	  .SPLDV  Designator of spooled device.

			    The directory number of the spooled device is
			    returned in word 1 of the argument block.

   To read from a spooled input device, the user first defines	the  name
   of  the  files  comprising  his set of spooled input files.	The files
   have names in the format:

	STR:<SPOOLED-DIRECTORY>DEVICE-DIR#.NAME.1,2,3,...

   The spooled directory is the directory to receive  any  spooled  input
   from  the  device.	The  .SPLSD  function can be used by a privileged
   process to set the directory.  The default directory for  all  of  the
   spooled devices is <SPOOL>.

   The device is the name of the device being used for spooled input.  It
   is the same name that was given on the original GTJFN call.

   The directory number is the logged-in directory  number  of	the  user
   that opened the spooled device.

   The name is the name of the set of files  to  be  input.   The  .SPLDI

   function is used to define this name.

   The generation number begins with the value specified  by  the  .SPLDI
   function and increments by one each time the spooled device is opened.

   Thus, if the input spooler for the card reader (CDR) is reading  files
   for	a  user  whose	directory number is 23, then the files might have
   names like

	<SPOOL>CDR-23.BATCH-SEQUENCE-37.1,2,3,...

   To initialize the spooled card reader, the user would then execute the
   SPOOL  call giving "BATCH-SEQUENCE-37" as the name of the set of files
   to be input and "1" as the beginning generation number.

   SPOOL ERROR MNEMONICS:

   SPLX1:    Invalid function
   SPLX2:    Argument block too small
   SPLX3:    Invalid device designator
   SPLX4:    WHEEL or OPERATOR capability required
   SPLX5:    Illegal to specify 0 as generation number for first file
   SPLX6:    No directory to write spooled files into



			     SPRIW     JSYS 243

   Sets the priority word for the specified process.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  process handle

	      AC2:  priority word

   RETURNS     +1:  always

   Refer to the SJPRI monitor call description	for  the  format  of  the
   priority word.

   Generates an illegal instruction interrupt on error conditions below.

   SPRIW ERROR MNEMONICS:

   WHELX1:   WHEEL or OPERATOR capability required



			     SSAVE     JSYS 203

   Creates a sharable, save-format file for the given JFN by copying (not
   sharing)  pages  from  the given process.  (Refer to Section 2.8.2 for
   the format of a sharable save file.) This monitor  call  is	used  for

   creating  programs that can be shared.  It saves the file in groups of
|  contiguous pages for which the same	access	is  desired.   It  always
|  saves  the  entry  vector,  but saves only PDV addresses that point to
|  within the range of saved pages.  (Refer to PDVOP% description.) SSAVE
   closes and releases the given JFN.

   ACCEPTS IN AC1:  process handle in the left half, and JFN in the right
		    half

	      AC2:  one table entry, or  0  in	the  left  half  and  the
		    address of the table in the right half (see below)

|	      AC3:  second word of two-word table entry (if bit SS%EPN is
|		    set in AC2) or 0

   RETURNS     +1:  always

   If the pages to be saved are all in section	zero,  the  table  has	a
   one-word entry for each group of pages.

   If any of the groups of pages to be saved is in  a  non-zero  section,
   the	table  entry  for  that group is two words long (see below).  Bit
   SS%EPN must be set in the first word, and bits 27-35 are zero  in  the
   first  word.  The second word contains the number of the first page in
   the group (right-justified).

   A zero word ends the table.

   The first word of each table entry has the following format:

	Bit	  Symbol    Meaning

	0-17	  SS%NNP    Negative of the number of pages in each group
			    (right-justified).

	18	  SS%CPY    Allow copy-on-write access to  the	group  of
			    pages.

	19	  SS%UCA    Limit the access  according  to  the  current
			    access of the user's page.	(See below.)

	20	  SS%RD     Allow read access to the group of pages.

	21	  SS%WR     Allow write access to the group of pages.

	22	  SS%EXE    Allow execute access to the group of pages.

	23	  SS%EPN    Each table entry is two words long,  and  the
			    second  word  contains the page number of the
			    first page of each group.

	27-35	  SS%FPN    If SS%EPN is not set, this field contains the
			    number   of  the  first  page  in  the  group
			    (right-justified).	If SS%EPN  is  set,  this
			    field  is  zero,  and the number of the first
			    page in the group is  in  word  two  of  this
			    table entry.

   When B19(SS%UCA)  is  set,  the  access  to	the  group  of	pages  is
   determined  by ANDing the access bits specified in the table word with
   the corresponding access bits for the user's pages (as  determined  by
   the	RPACS  call).	This means that a given access is allowed only if
   both the SSAVE call indicates it and the page currently  has  it.   If
   B19(SS%UCA)	is  not  set, the access granted to the group of pages is

   that indicated by the bits set in the table word.

   The SSAVE call does	not  save  the	accumulators  nor  does  it  save
   nonexistent pages.

   The GET monitor call is used to map a file saved with the  SSAVE  call
   back into a given process.

   Can cause several  software	interrupts  or	process  terminations  on
   certain file conditions.

   Generates an illegal instruction interrupt on error conditions below.

   SSAVE ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   SSAVX1:   Illegal to save files on this device
   SSAVX2:   Page count (left half of table entry) must be negative
   SSAVX3:   Insufficient system resources (Job Storage Block full)
   SSAVX4:   Directory area of EXE file is more than one page
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged
   All I/O errors can also occur.



			     STAD     JSYS 226

   Sets the system's date.  (Refer to Section 2.9.2.)

   RESTRICTIONS:    Some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  day in the left half, and fraction of the day in  the
		    right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The	STAD  call  requires  the  process  to	have  WHEEL  or  OPERATOR
   capability enabled if the system's date is already set.

   The GTAD monitor call can be used to obtain the system's date.

   STAD ERROR MNEMONICS:

   STADX1:	    WHEEL or OPERATOR capability required
   STADX2:	    Invalid date or time



			     STCMP     JSYS 540

   Compares two ASCIZ strings in the caller's address space.   Note  that
   letters  are always considered as upper case, regardless of their case
   within the string.  Therefore, the strings ABC and abc are  considered
   an exact match.

   ACCEPTS IN AC1:  byte pointer to test string

	      AC2:  byte pointer to base string

   RETURNS     +1:  always, with

		    AC1 containing the compare code:

			B0(SC%LSS) Test string is less than base string.

			B1(SC%SUB) Test  string  is  a	subset	of   base
				   string.

			B2(SC%GTR) Test  string  is  greater  than   base
				   string.

		    AC2 containing base byte pointer, updated  such  that
			an  ILDB  instruction  will  reference	the first
			nonmatching byte.

   One string is considered less than another string if the  ASCII  value
   of  the  first  nonmatching character in the first string is less than
   the ASCII value of the character in the same position  in  the  second
   string.

   One string is considered a subset of another string	if  both  of  the
   following conditions are true:

	1.  From left to right, the ASCII values  of  the  characters  in
	    corresponding positions are the same.

	2.  The test string is shorter than the base string.

   Two strings are considered equal if the ASCII values of the characters
   in  corresponding  positions  are the same and the two strings are the
   same size.  In this case, the contents of AC1 is 0 on return.



			     STDEV     JSYS 120

   Translates the given device name string to  its  corresponding  device
   designator.

   ACCEPTS IN AC1:  byte pointer to the string to be translated

   RETURNS     +1:  failure, error code in AC2

	       +2:  success, device designator (refer to Section 2.4)  in
		    AC2

   The string to be translated is terminated by the  first  space  (ASCII
   code 40), null (ASCII code 0), or colon (ASCII code 72).

   The DEVST monitor call can be used to translate a device designator to
   its corresponding string.

   STDEV ERROR MNEMONICS:

   STDVX1:   No such device



			      STI     JSYS 114

   Simulates terminal input.

   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  file designator (only terminal designators are legal)

	      AC2:  character to be input, right-justified

   RETURNS     +1:  always

   The character is taken  from  the  accumulator  and	placed	into  the
   specified  terminal's input buffer whether or not the buffer is empty.
   The DIBE call can be used to prevent sending  an  interrupt	character
   (for  example,  CTRL/C)  before  the  program has processed all of the
   previous input.

   The STI monitor call requires the process to have  WHEEL  or  OPERATOR
   capability enabled if the specified terminal either is not assigned or
   opened by the process or is not accepting advice.  (Refer to the TLINK
   bit TT%AAD.)

   The use of this monitor call is not recommended  for  pseudo-terminals
   (PTYs).   The recommended procedure for placing a character in the PTY
   input buffer is to open the PTY for output with OPENF and then perform
   output with the BOUT call.

   Generates an illegal instruction interrupt on error conditions below.

   STI ERROR MNEMONICS:

   TTYX1:    Device is not a terminal
   DESX2:    Terminal is not available to this job
   DEVX2:    Device already assigned to another job
   WHELX1:   WHEEL or OPERATOR capability required
   TTYX01:   Line is not active



			     STIW     JSYS 174

   Sets the terminal interrupt word (refer  to	Section  2.6.6)  for  the
   entire  job	or  a specific process.  This call declares that terminal
   characters that usually cause an interrupt are instead to be passed to
   the	program as input.  In actuality, the STIW call sets the interrupt
   word mask, thus determining for each of the 36 terminal codes  if  the
   job	or  process  should  receive  an interrupt.  The call's effect is
   different, depending on whether the call is	being  executed  for  the
   entire job or for a specific process in the job.

   When the STIW call is executed for the entire job, codes corresponding
   to the bits on in the mask will cause an interrupt if a process in the
   job has enabled for an interrupt on that code.  If multiple	processes
   have  enabled  that	code,  the  lowest  inferior process receives the
   interrupt.  (If several  processes  at  the	same  lowest  level  have
   enabled   the  code,  the  process  that  receives  the  interrupt  is
   determined by the system.)  If no process has enabled that  code,  the
   character  corresponding  to the code is passed to the program.  Also,
   characters are passed to the program when their corresponding bits are
   off	in the mask, even if a process has enabled that code.  Initially,
   all codes are declared to cause an interrupt (i.e., all  bits  in  the
   mask  are  on), and the program can execute the RTIW call to determine
   the current status.	Thus if the program wishes  to	read  a  terminal
   interrupt character as input, it executes the STIW call for the entire
   job and turns off the mask bit corresponding to the character.

   When the STIW call is executed for a  specific  process  in	the  job,
   codes  corresponding  to  the  bits	on  in the mask are assumed to be
   enabled by the specific process and cause an interrupt if in fact they
   are	enabled.   If  the  process  has  not  enabled	for the code, the
   character corresponding to the  code  is  ignored,  if  it  is  typed.
   Characters  corresponding  to the bits off in the mask are assumed not
   to be enabled by the process.  This use of the STIW call is implicitly
   executed on an ATI call.

   Each time the STIW call is executed for a specific process,	the  mask
   is changed to reflect the bits changed in that process.

   The STIW call sets or clears specific terminal codes for a  particular
   process  without  actually  changing  the channel assignment that each
   code has.  The ATI call is used to set the channel assignment, and the
   DTI call is used to clear the assignment.

   The STIW call requires the process to have SC%CTC  capability  enabled
   to give -5 as an argument.

   ACCEPTS IN AC1:  B0(ST%DIM) set the deferred terminal  interrupt  mask
			       given in AC3

		    B18-B35    process handle, or -5 for entire job
		    (ST%PRH)

	      AC2:  terminal interrupt word mask.
		    Bit n on means terminal code n is enabled.

	      AC3:  deferred terminal interrupt word mask.
		    Bit n on means terminal code n is deferred.

   RETURNS     +1:  always

   The argument in AC3 is ignored, and no change is made to the  deferred
   interrupt word mask, if B0(ST%DIM) is not set or if the process handle

   in AC1 does not indicate a specific process.

   If multiple processes enable the same interrupt character and any  one
   of  the  processes declares it deferred, the character is deferred for
   all the processes that enabled it.

   The RTIW call can be used to obtain the terminal interrupt word masks.

   STIW ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			      STO     JSYS 246

   Simulates terminal output.

   ACCEPTS IN AC1:  file designator (only terminal designators are legal)

   RETURNS     +1:  always, with the character right-justified in AC2

   The character is taken from the specified terminal's output buffer and
   placed in the accumulator.  The process is blocked until the character
   is in the accumulator.

   The use of this monitor call is not recommended  for  pseudo-terminals
   (PTYs).   The  recommended  procedure for reading a character from the
   PTY output buffer is to open the PTY for input  with  OPENF	and  then
   perform input with the BIN call.

   STO ERROR MNEMONICS:

   TTYX1:    Device is not a terminal
   DESX2:    Terminal is not available to this job
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     STPAR     JSYS 217

   Sets the device-related modes for the specified terminal.   The  modes
   that can be set by this call are in the following bits of the JFN mode
   word.  (Refer to Section 2.4.9.1.)

   B1(TT%MFF)		    mechanical form feed
   B2(TT%TAB)		    mechanical tab
   B3(TT%LCA)		    lower case
   B4-B10(TT%LEN)	    page length
   B11-B17(TT%WID)	    page width

   B25(TT%ECM)		    echo control
   B30(TT%UOC)		    uppercase output control
   B31(TT%LIC)		    lowercase input control
   B32-B33(TT%DUM)	    duplex mode
   B34(TT%PGM)		    output page mode

   ACCEPTS IN AC1:  file designator

	      AC2:  JFN mode word

   RETURNS     +1:  always

   The STPAR monitor call is a no-op if the designator is not  associated
   with a terminal.

   The SFMOD monitor call can be used to set program-related modes of the
   JFN	mode  word,  and the RFMOD monitor call can be used to obtain the
   JFN mode word.

   When the page length and width fields are set  with	the  STPAR  call,
   they  have  a maximum range of 127.	The MTOPR call can be used to set
   these fields to values greater than 127.  A nonzero value of less than
   2  for  the length or less than 10 for the width causes STPAR to leave
   the field unchanged.

   STPAR ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX3:    JFN is not assigned
   DESX5:    File is not open
   DEVX2:    Device already assigned to another job
   TTYX01:   Line is not active



			     STPPN     JSYS 556

   Translates the  given  directory  name  string  to  its  corresponding
   project-programmer  number  (a  TOPS-10  36-bit directory designator).
   This  project-programmer  number  is  associated  with  the	structure
   containing  the  given  directory  and  is  valid only for the current
   mounting of that structure.	The STPPN  monitor  call  and  the  PPNST
   monitor  call should appear only in programs that require translations
   of project-programmer numbers.  Both calls are temporary calls and may
   not be defined in future releases.

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

   ACCEPTS IN AC1:  byte pointer to ASCIZ string containing the directory
		    name, a JFN, or a 36-bit directory number

   RETURNS     +1:  always,  with  the	corresponding  project-programmer
		    number in AC2

		    STPPN ERROR MNEMONICS:

   STRX02:   Insufficient system resources

   STRX03:   No such directory name
   STRX04:   Ambiguous directory specification
   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX8:    File is not on disk
   DESX10:   structure is dismounted



			     STSTS     JSYS 25

   Clears the status of a file.  (Refer to the GTSTS monitor call for the
   format of the JFN status word.)

   ACCEPTS IN AC1:  JFN in the right half

	      AC2:  STSTS flags.  If a given STSTS flag is zero, then the
		    associated	flag  in  the JFN status word is cleared.
		    If a given STSTS flag is one, no action is performed.
		    Any undocumented bits in AC2 are ignored.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The STSTS call is used to clear the following bits of the status word:

      B9(GS%ERR)  file may be in error
      B13(GS%HLT) I/O errors are terminating conditions (set by OPENF)
      B17(GS%FRK) this is  a  restricted  JFN.	 Only  the  process  that
		  received  it may use it.  Other processes may reference
		  the file with other JFNs.  (Set by GTJFN)

   STSTS ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer



			     STTYP     JSYS 302

   Sets the terminal type number for the specified terminal line.  (Refer
   to Section 2.4.9.4.)

   ACCEPTS IN AC1:  terminal designator

	      AC2:  terminal type number

   RETURNS     +1:  always

   The STTYP call sets the bits in the JFN mode word for mechanical  form
   feed and tab, lower case, and page length and width according to their
   settings  in  the  device  characteristics  word.   These   bits   can
   subsequently be changed with the STPAR monitor call.

   The GTTYP monitor call can be used to obtain the terminal type  number
   for a specified line.

   STTYP ERROR MNEMONICS:

   DESX1:	    Invalid source/destination designator
   DESX2:	    Terminal is not available to this job
   STYPX1:	    Invalid terminal type
   TTYX01:	    Line is not active



			     SWJFN     JSYS 47

   Swaps  the  association  of	two  JFNs  by  literally  exchanging  all
   information cells of each JFN.

   ACCEPTS IN AC1:  JFN

	      AC2:  another JFN

   RETURNS     +1:  always

   SWJFN ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   DESX2:    Terminal is not available to this job
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   SWJFX1:   Illegal to swap same JFN



			    SWTRP%     JSYS 573

   Provides a process with the ability to intercept  arithmetic  overflow
   or  underflow  conditions efficiently.  Use of the SWTRP% JSYS to trap
   for these conditions is more efficient in some applications than using
   the software interrupt system.

   SWTRP% also allows a process to declare its LUUO block for LUUO's

   ACCEPTS IN AC1:  process handle

	      AC2:  function code

	      AC3:  function-dependent argument

   RETURNS     +1:  always

   The functions are as follows:

   Code    Symbol    Function

    0	   .SWART    Set arithmetic trap location
		     AC3 contains the  address	of  the  arithmetic  trap
		     block  (see LUUO block below).  A zero in AC3 clears
		     the arithmetic trap.

    1	   .SWRAT    Read arithmetic trap location
		     Returns the trap block  address  in  AC3  (see  LUUO
		     block  below).   A zero is returned if an arithmetic
		     trap is not set.

    2	   .SWLUT    Set LUUO block address for non-zero sections
		     AC3 contains the address.	A zero in AC3 clears  the
		     location.	 See  below  for  the  format of the LUUO
		     block.

    3	   .SWRLT    Read LUUO block address
		     Returns the address in AC3.  A zero is  returned  if
		     no block is currently in effect.

		     The LUUO block has the following format:

 
		     Offset	    0	    12 13 17 18    26 27  30 31 35
				   ========================================
		     .ARPFL(0)	   ! PC flags !  0  ! opcode !	AC  !  0  !
				   ----------------------------------------
		     .AROPC(1)	   !  0  !	Location of LUUO +1	  !
				   ----------------------------------------
		     .AREFA(2)	   !  0  !	   E of the LUUO	  !
				   ----------------------------------------
		     .ARNPC(3)	   !  0  !	       New PC		  !
				   ========================================
				    0	5 6				35

 
|   4	   .SWSPD    Set PDL overflow trap
|   5	   .SWRPD    Read PDL overflow trap

   An LUUO executed in section	zero  will  store  the	opcode,  AC,  and
   effective  address  of  the LUUO in user location 40, and will execute
   the instruction in user location 41.  An LUUO executed in  a  non-zero
   section  makes  use	of the UPT (user process table).  SWTRP% allows a
   process to store the desired address in the	UPT  so  that  subsequent
   LUUO's will produce the desired effect.  The address in the UPT points
   to the LUUO block shown above.  This block is  stored  in  the  user's
|  address   space).	See  the  Processor  Reference	Manual	for  more
|  information on LUUO's.



			     SYERR     JSYS 527

   Places information in the System Error file	(ERROR.SYS).   (Refer  to

   the	 SPEAR	 Manual   for  information  on	the  system  error  file,
   <SYSTEM-ERROR>ERROR.SYS.)

   RESTRICTIONS:    requires WHEEL, OPERATOR, or  MAINTENANCE  capability
		    enabled

   ACCEPTS IN AC1:  address of argument block

	      AC2:  length of argument block

   RETURNS     +1:  always

   The first four words of the header block  must  contain  the  standard
   header information required by SPEAR.

   Generates an illegal instruction interrupt on error conditions below.

   SYERR ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   SYEX1:    Unreasonable SYSERR block size
   SYEX2:    No buffer space available for SYSERR



			     SYSGT     JSYS 16

   Returns the table number, table length, and word 0  of  the	specified
   system  table.   (Refer  to	Section 2.3.2 for the names of the system
   tables.)

   ACCEPTS IN AC1:  SIXBIT table name

   RETURNS     +1:  always, with

		    AC1 containing word 0 of the table

		    AC2 containing the negative of the number of words in
			the  table in the left half, and the table number
			in the right half

   The table number returned can be given to the GETAB monitor call as an
   argument.	However,   because   the   MONSYM  file  includes  symbol
   definitions for the system tables, execution of the SYSGT call is  not
   required to obtain the table number for the GETAB call.

   The contents of AC2 is 0 on return if  the  specified  table  was  not
   found.



			     TBADD     JSYS 536

   Adds an entry to a standard-formatted  command  table  used	for  user

   program command recognition.  (Refer to the TBLUK call description for
   the format of the command table.)

|  ACCEPTS IN AC1:  flag bits in the left half, and  address  of  word	0
|		    (header word) of table in the right half
|
|		    B0(TB%ABR)	 Abbreviations	are  present  in  keyword
|				 table.

	      AC2:  entry to be added to table.  (Refer to the TBLUK call
		    for the format of a table entry.)

   RETURNS     +1:  always, with address in the table of the new entry in
		    AC1

		    Generates an illegal instruction interrupt	on  error
		    conditions below.

   TBADD ERROR MNEMONICS:

   TADDX1:   Table is full
   TADDX2:   Entry is already in table



			     TBDEL     JSYS 535

   Deletes an entry from a standard-formatted command table used for user
   program command recognition.  (Refer to the TBLUK call description for
   the format of the command table.)

|  ACCEPTS IN AC1:  flag bits in the left half, and  address  of  word	0
|		    (header word) of table in the right half
|
|		    B0(TB%ABR)	 Abbreviations	are  present  in  keyword
|				 table.

	      AC2:  address of entry to  be  deleted.	This  address  is
		    returned in AC1 on a TBLUK call.

   RETURNS     +1:  always

		    Generates an illegal instruction interrupt	on  error
		    conditions below.

   TBDEL ERROR MNEMONICS:

   TDELX1:   Table is empty
   TDELX2:   Invalid table entry location



			     TBLUK     JSYS 537

   Compares the specified string  in  the  caller's  address  space  with
   strings  indicated  by  a  command  table.	The  table has a standard
   format, which is described below.

   This  call  is  used  to  implement	a  consistent  style  of  command
   recognition	and  command  abbreviation  for user programs.	The TBLUK
   call performs the function of string lookup	in  the  table,  and  the
   TBADD  and TBDEL calls perform the functions of adding to and deleting
   from the table.

   The command table has the following format:

	Word	       Meaning

	0	       Number of entries in the table (not including this
		       entry)  in  the	left  half, and maximum number of
		       entries in the table (not including this entry) in
		       the right half.

	1 through n    Address of an argument block  in  the  left  half;
		       the  right  half  of each table entry is available
		       for use by the user program.

   The argument block can have one of two formats.  Bits 0-7 of the first
   word  of  the argument block determine which format the argument block
   has.

   If bits 0-6 are all off and B7(CM%FW) is on, the string begins in  the
   next  word  of  the	argument  block,  and  the remainder of this word
   contains data bits relevant to the string.

   Table Entry

 
	      0 		       17 18			     35
	      !=======================================================!
	      ! 	  ADR		 !	for use by program    !
	      !=======================================================!

   Argument Block

 
	      0 	   6 7					     35
	      !=======================================================!
	ADR   !      0	    !1! 	     data bits		      !
	      !-------------------------------------------------------!
	      ! 		   start of string		      !
	      !=======================================================!

 
   The following bits are currently defined:

      Bit    Symbol			   Meaning

      34     CM%NOR    Do not recognize this string, even if a string  is
		       specified  that	matches  exactly, and consider an
		       exact match as ambiguous.  A program can set  this
		       bit to include entries that are initial substrings
		       of other entries in the table to enforce a minimum
		       abbreviation  of these other entries (for example,
		       to include D and DE in the table to enforce DEL as

		       the minimum abbreviation of DELETE).

       7     CM%FW     Indicate that the remainder of this word is a flag
		       word  containing data bits relevant to the string.
		       This bit must be on to  distinguish  a  flag  word
		       from a null string.

   If any bit of bits 0-6 of the first word of the argument block  is  on
   or if B7(CM%FW) is off, the string begins in that word.  In this case,
   the data bits do not apply and are assumed to be off.

   Table Entry

 
	      0 		       17 18			     35
	      !=======================================================!
	      ! 	  ADR		 !			      !
	      !=======================================================!

 
   Argument

 
	      0 						     35
	      !=======================================================!
	ADR   ! 		   start of string		      !
	      !=======================================================!

   The addresses in the command table must be  sorted  according  to  the
   alphabetical  order	of  the  strings.   Note  that letters are always
   considered as uppercase.  Therefore,  the  strings  ABC  and  abc  are
   considered  equivalent  strings.   This  order  results  in	efficient
   searching of strings and determination of ambiguous strings.

   The right half of each table entry can be used by the program  for  an
   address  to	a  dispatch  table  for the command or for a pointer to a
   parameter block  for  additional  information  about  the  call.   The
   contents of this half word is ignored by the three table calls.

   ACCEPTS IN AC1:  address of word 0 (header word) of table

	      AC2:  byte pointer to string in caller's address space that
		    is to be compared with the string in the table

   RETURNS     +1:  always, with

		    AC1 containing the address of the entry that  matches
			the input string or address where the entry would
			be if it were in the table.

		    AC2 containing recognition bits:

			B0(TL%NOM) The input string does  not  match  any
				   string in the table.
|			B1(TL%AMB) The input string matches more than one
|				   string  in  the  table (that is, it is
|				   ambiguous).
			B2(TL%ABR) The	 input	 string   is   a    valid
				   abbreviation of a string in the table.
			B3(TL%EXM) The input string  is  an  exact  match
				   with a string in the table.
		    AC3 containing a byte pointer to the remainder of the
			string	in  the  table	if  the  match	was on an
			abbreviation (TL%ABR is  on).	This  string  can

			then be output to complete the command.

			Generates an  illegal  instruction  interrupt  on
			error conditions below.

   TBLUK ERROR MNEMONICS:

   TLUKX1:   Internal format of table is incorrect



			    TCOPR%     JSYS 761
|
|  Provides access to the ARPAnet TCP/IP TCP:  device.
|
|  RESTRICTIONS:    Requires   WHEEL,	MAINTENANCE,   or   NET    WIZARD
|		    capability;  for ARPAnet systems only.
|
|  ACCEPTS IN AC1:  JFN of connection
|
|	      AC2:  function code
|
|	      AC3:  function argument or address of argument block
|
|	      AC4:  function-specific argument
|
|  RETURNS:	+1  Always
|
|  TCOPR% Functions:
|
|  Code  Symbol   Meaning
|
|   0	 .TCRCS   Read connection status
|		  AC3:	Address of argument block
|
|		  Word	Symbol	 Meaning
|
|		   0	.TCLEN	 Length of argument block
|
|		   1	.TCTFP	 Foreign port;	specified by field TC%TFP
|				 (B20-35), 16 bits, right-justified
|
|		   2	.TCTFH	 Foreign host;	specified by field TC%TFH
|				 (B4-35), 32 bits, right-justified
|
|		   3	.TCTLP	 Local port;  specified by  field  TC%TLP
|				 (B20-35), 16 bits, right-justified
|
|		   4	.TCTLH	 Local host;  specified by  field  TC%TLH
|				 (B4-35), 32 bits, right-justified
|
|		   5	.TCTRW	 Receive  window;   specified  by   field
|				 TC%TRW      (B20-35),	    16	    bits,
|				 right-justified
|
|		   6	.TCTSW	 Send window;  specified by field  TC%TSW
|				 (B20-35), 16 bits, right-justified
|
|		   7	.TCTCS	 Connection state;   specified	by  field

|				 TC%TCS (send state in left half,,receive
|				 state in right half)
|
|				     .TCNOT   Connection not open
|				     .TCFIN   Connection closed
|				     .TCSYA   Connection openable
|				     .TCSYS   Connection opening
|				     .TCSYN   Connection open
|
|		  10	.TCTBW	 Number   of	buffers    waiting    for
|				 acknowlegement;    specified	in  field
|				 TC%TBW (B28-35), 8 bits, right-justified
|
|		  11	.TCTBP	 Number  of  buffers   pending	 receipt;
|				 specified  in	field  TC%TBP (B28-35), 8
|				 bits, right-justified
|
|		  12	.TCTBS	 Buffer size;  specified in field  TC%TBS
|				 (B20-35), 16 bits, right-justified
|
|		  13	.TCTTS	 Type-of-service and security fields
|
|				 TC%TTS(B0-17)
|				 TC%TSF(B25-26)
|				 TC%TCF(B28-35)
|					      .TCTPR(B28-30) precedence
|					      .TCTST(B31) stream/datagram
|					      .TCTRE(B32-33) reliability
|					      .TCTSR(B34)
|					      speed/reliability
|					      .TCTSP(B35) speed
|
|		  14	.TCTTT	 Transmission timeout
|				 TC%TTT(B27-35)
|		  15	.TCTUD	 Urgent data information
|		  16	.TCTRA	 Retransmission parameters - Alpha
|				 TC%TRA       Alpha, a floating point
|					      number
|		  17	.TCTRB	 Retransmission parameters - Beta
|				 TC%TRB       Beta, a floating point
|					      number
|		  20	.TCTPI	 PSI channel assignment (see .TCSPC
|				 below)
|   1	 .TCSUD   Send urgent data
|		  AC3 contains:
|
|		  Word	Symbol	 Meaning
|
|		   0		 Pointer to data
|		   1		 Count of bytes or 0
|		   2		 Byte to terminate output on
|
|   2	 .TCPSH   Send all local buffered data immediately and set
|		  the TCP PUSH flag for the last message of the data
|		  being sent
|
|   3	 .TCSPA   Set passive/active flag.
|		  AC3:	Set 1 B(TC%APF) to indicate active; 0 to indicate
|		  passive
|
|   4	 .TCSPP   Set persistence parameters.  AC3 contains time to wait
|		  for connections.
|
|		  AC3:	 0    do not timeout connection

|			0,,n  attempt to connect for n seconds
|			m,,n  attempt to connect for n seconds at m
|			      intervals
|
|   5	 .TCSTP   Set timeout parameters.  AC3 contains time to wait
|		  before a timeout and must be in range 0 to 218-1.  If
|		  0, no time out
|		  will occur.
|
|   6	 .TCSRP   Set retransmission parameters.  AC3 points to an
|		  argument block containing:
|
|		  Word	Symbol	 Meaning
|
|		   0		 Alpha, a floating point number
|		   1		 Beta, a floating point number
|
|   7	 .TCSTS   Set type-of-service.	AC3 contains the type of service
|		  desired and must be in range 0 to 218 - 1. Only
|		  low-order 8 bits used.
|
|  10	 .TCSSC   Set security and compartment levels.	AC3 contains
|		  the security level (16 bits, right-justified) in the
|		  left half
|		  and the compartment level (16 bits, right-justified) in
|		  the right
|		  half.
|
|  11	 .TCSHT   Set handling restrictions and transmission control
|		  fields.
|		  AC3 contains handling-restrictions, a 16-bit value;
|		  AC4 contains
|		  transmission-controls, a 24-bit value.
|
|  12	 .TCSPC   Set PSI channels.  AC3 contains 4 6-bit channel
|		  assignments; specify 77 octal to disable interrupt on
|		  given channel.
|
|		  Flag			    Meaning
|
|		  TC%TPU	 Urgent data channel (1st byte)
|		  TC%TER	 Error channel (2nd byte)
|		  TC%TSC	 State change channel (3rd byte)
|		  TC%TXX	 Unused, must be 77 octal (4th byte)
|
|  13	 .TCRTW   Read a single entry from the	TCB.   AC3  contains  the
|		  word	of  the  TCB  that  is	desired.   On return, AC3
|		  contains the value of the word that was read.
|
|  14	 .TCSIL   Set the interrupt level for buffers.
|
|  15	 .TCLSR   Set the loose route to be used in message transmission.
|		  AC3  contains  a  pointer  to  an argument block of the
|		  form:
|
|		  Word	Meaning
|
|		   0	Length of block including this word
|		  1-n	Internet  address  of  next  node  to  route  to,
|				 right-justified.
|
|  16	 .TCSSR   Set  the  strict  route   to	 be   used   in   message
|		  transmission.   AC3  contains  a pointer to an argument
|		  block of the form:

|		  Word	Meaning
|
|		   0	Length of block including this word
|		  1-n	Internet  address  of  next  node  to  route  to,
|				 right-justified.
|
|  17	 .TCRLB   Read lower bound for retransmission.	 On  return,  AC3
|		  contains   the  number  of  seconds  in  floating-point
|		  format.
|
|  20	 .TCSLB   Set the lower bound for retransmission.   AC3  contains
|		  the number of seconds in floating-point format and must
|		  be greater than 0  and  less	than  the  current  upper
|		  bound.    Requires   WHEEL,	OPERATOR  or  NET  WIZARD
|		  capability.
|
|  21	 .TCRUB   Read upper bound for retransmission.	 On  return,  AC3
|		  contains   the  number  of  seconds  in  floating-point
|		  format.
|
|  22	 .TCSUB   Set upper bound for retransmission.  AC3  contains  the
|		  number  of seconds in floating-point format and must be
|		  greater than the current lower bound and less than 250.
|		  Requires WHEEL, OPERATOR, or NET WIZARD capability.



			     TEXTI     JSYS 524

   Reads input from a terminal or a file into a string	in  the  caller's
   address space.  Input is read until either a specified break character
   is encountered or the byte count is exhausted, whichever occurs first.

   When used for terminal input, the TEXTI  call  handles  the	following
   editing functions:

	1.  Delete the last character input (DELETE).

	2.  Delete back to the last punctuation character (CTRL/W).

	3.  Delete back to the beginning of the current line or,  if  the
	    current  line is empty, back to the beginning of the previous
	    line (CTRL/U).

	4.  Retype the current line from its  beginning  or,  if  current
	    line is empty, retype the previous line (CTRL/R).

	5.  Accept the next character without regard to its usual meaning
	    (CTRL/V).

   ACCEPTS IN AC1:  address of argument block

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, updated pointer in word .RDDBP,  appropriate
		    bits set in the left half of word .RDFLG, and updated
		    count in word .RDDBC of the argument block

   The format of the argument block is as follows:

	Word	  Symbol    Meaning

	 0	  .RDCWB    Count of words following  this  word  in  the
			    argument block.

	 1	  .RDFLG    Flag bits.	(See below.)

	 2	  .RDIOJ    Byte pointer to string, or input JFN  in  the
			    left  half	and  output JFN in the right half
			    (if RD%JFN is on in the  flag  word  .RDFLG).
			    The  input	JFN  is  where the input is being
			    read from, and the output JFN  is  where  any
			    output  generated  from  character editing is
			    placed.

	 3	  .RDDBP    Byte pointer to string  in	caller's  address
			    space   where   input   is	 to   be   placed
			    (destination string pointer).

	 4	  .RDDBC    Number of bytes available in the  destination
			    string (field width).

	 5	  .RDBFP    Byte  pointer  to  the   beginning	 of   the
			    destination  buffer.   This pointer indicates
			    the maximum limit to which the user can  edit
			    back  into the buffer with DELETE, CTRL/W, or
			    CTRL/U.  This buffer is  not  separate  (that
			    is,  is  not  disjoint)  from the destination
			    string.  On the first TEXTI, this pointer  is
			    normally  the  same  as  the destination byte
			    pointer (.RDDBP), but does not have to be the
			    same.  If the count in word .RDCWB is 4, then
			    the byte pointer in word .RDDBP will be  used
			    as the pointer to the destination buffer.

	 6	  .RDRTY    Byte  pointer  to  the   beginning	 of   the
			    prompting-text  (CTRL/R  buffer).  This text,
			    along  with  any  text  in	the   destination
			    buffer, is output if the user types CTRL/R on
			    his first line of  input.	If  there  is  no
			    CTRL/R text or the user types CTRL/R on other
			    than the first line of input, only	the  text
			    in	the  destination  buffer  will be output.
			    The CTRL/R	buffer	is  useful  for  retyping
			    characters	that  preceded	the user's input,
			    such as a prompt from the program.	The  text
			    in	this buffer cannot be edited by the user,
			    and if the user deletes back to  the  end  of
			    this  buffer,  his action is treated as if he
			    has deleted all of his input.  This buffer is
			    logically adjacent to the destination buffer,
			    but may be physically disjoint from it.  When
			    the  CTRL/R  buffer  is  disjoint, it must be
			    terminated with a null byte.

	 7	  .RDBRK    Address of a 4-word block of break	character
			    mask  bits.  If a bit is on in the mask, then
			    the corresponding character is  considered	a
			    break  character.	Any bits set in this mask
			    override break characters  set  in	the  flag
			    word.

			    The mask occupies the  leftmost  32  bits  of
			    each  word,  thereby  allowing  a mask of 128

			    bits.  The rightmost 4 bits of each word  are
			    ignored.   The mapping is from left to right.
			    The  ASCII	character  set	maps  into   this
			    128-bit mask.

			    If this word  is  zero,  there  is	no  break
			    character set mask defined.

	 10	  .RDBKL    Byte pointer  to  the  backup  limit  in  the
			    destination  buffer.   This pointer indicates
			    the position in  the  destination  buffer  to
			    which  the	user  can edit back without being
			    informed.  This pointer is used  to  indicate
			    to	the  program  that previously parsed text
			    has been edited and may need to  be  reparsed
			    by	the  program.	The pointer can either be
			    equal to the  start  of  the  buffer  pointer
			    (.RDBFP) or to the destination string pointer
			    (.RDDBP) or be between these two pointers.

   Words 5 through 10 (.RDBFP through .RDBKL) in the argument  block  are
   optional.   A  zero in any of the words means that no pointer has been
   given.

   The illustration below is a logical	arrangement  of  the  CTRL/R  and
   destination	buffers, with the placement of the pointers when they are
   given as not being equal.  Remember that the CTRL/R	buffer	does  not
   have  to be adjacent to the destination buffer and that two or more of
   these pointers can be equal.

				 destination buffer

					       can be edited

   !=======================================================!
   !  CTRL/R buffer;	  ! Can be edited, !	  !	   !
   !  cannot be edited,   ! but user is    !	  !	   !
   !  and will be output  ! informed	   !	  !	   !
   !  on a CTRL/R	  !		   !	  !	   !
   !=======================================================!

 
   CTRL/R	  Beginning of	      Backup	   Destination
   buffer	  destination	      limit	   string
   pointer	  buffer pointer      pointer	   pointer
   (.RDRTY)	  (.RDBFP)	      (.RDBKL)	   (.RDDBP)

 
   The flag bits that can be set in word 1 (.RDFLG) of the argument block
   are as follows:

	Bit    Symbol	    Meaning

	 0     RD%BRK	    Break on CTRL/Z or ESC.

	 1     RD%TOP	    TOPS-10  character	set.   Break  on  CTRL/G,
			    CTRL/K, CTRL/L, CTRL/Z, ESC, carriage return,
			    line feed.

	 2     RD%PUN	    Break on punctuation:

			    CTRL/A-CTRL/F     ASCII codes 34-37
			    CTRL/H-CTRL/I     ASCII codes 40-57
			    CTRL/N-CTRL/Q     ASCII codes 72-100

			    CTRL/S-CTRL/T     ASCII codes 133-140
			    CTRL/X-CTRL/Y     ASCII codes 173-176

	 3     RD%BEL	    Break on end of  line  (carriage  return  and
			    line feed, or line feed only).

	 4     RD%CRF	    Suppress a carriage return and return a  line
			    feed only.

	 5     RD%RND	    Return to user program if the user	tries  to
			    delete    beyond   the   beginning	 of   the
			    destination buffer.  If this bit is not  set,
			    the  TEXTI call causes the terminal's bell to
			    ring and waits for more input.

	 6     RD%JFN	    JFNs  have	been   given   for   the   source
			    designator	 (word	.RDIOJ	of  the  argument
			    block).  If this bit is not set,  the  source
			    designator is a pointer to a string.

	 7     RD%RIE	    Return to user program if the input buffer is
			    empty.   If  this  bit  is not set, the TEXTI
			    call waits for more input.

	 8     RD%BBG	    Not used

	 9     RD%BEG	    Causes  TEXTI  to  return  when  the   .RDBKL
			    pointer is reached and TEXTI is about to wait
			    for more input.

	 10    RD%RAI	    Convert lowercase input to uppercase input.

	 11    RD%SUI	    Suppress the CTRL/U indication if user  types
			    a  CTRL/U  (that  is, do not print XXX and on
			    display  terminals,   do   not   delete   the
			    characters from the screen).

|	 15    RD%NED	    Suppress the  editing  functions  of  editing
|			    characters (for example, CTRL-R, CTRL-U) that
|			    are in the user-supplied break mask.

   On a successful return, the following  bits	can  be  set  in  word	1
   (.RDFLG) of the argument block:

	Bit	  Symbol    Meaning

	 12	  RD%BTM    A break character terminated the  input.   If
			    this bit is not set, the input was terminated
			    because the byte count was exhausted.

	 13	  RD%BFE    Control was  returned  to  the  user  program
			    because  the  user tried to delete beyond the
			    beginning  of  the	destination  buffer   and
			    RD%RND was on in the call.

	 14	  RD%BLR    The backup limit for editing was reached.

   TEXTI ERROR MNEMONICS:

   ARGX17:   Invalid argument block length
   RDTX1:    Invalid string pointer
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged


			     TFORK     JSYS 321

   Sets and removes monitor call intercepts (JSYS traps)  for  the  given
   inferior processes.

   When the process attempts to execute a call on which an intercept  has
   been set, that process is suspended before it executes the call.  Once
   the process is suspended, the monitor passes control  to  the  closest
   superior process that is monitoring the execution of that call.

   The superior process can then use the RTFRK call  to  determine  which
   process caused the interrupt, and how to handle the interrupt.  It can
   use any of the process manipulation calls, and then use the UTFRK call
   to resume the suspended inferior process.

   Alternatively, the superior can simply decide to resume  the  inferior
   and	allow  it  to  execute	the  call.  In this case, the next higher
   superior  process  monitoring  the  intercepted   call   receives   an
   interrupt,  and  control is passed to that superior.  If each superior
   process monitoring the call decides to resume  the  suspended  process
   without changing its PC word, then the suspended process is allowed to
   execute the monitor call as it normally would.

   Note that an RTFRK should be performed when an interrupt is	received,
   or the monitored process will not trap again.

   RESTRICTIONS:    requires WHEEL, OPERATOR, or  MAINTENANCE  capability
		    enabled for use on execute-only processes

   ACCEPTS IN AC1:  function code in the left half, and process handle in
		    the right half

	      AC2:  software interrupt channel number in the  left  half,
		    and size (in bits) of the monitor call bit table

	      AC3:  address of monitor call bit table

   RETURN     +1:   always

   The available functions are as follows:

	Code   Symbol			   Meaning

	 0     .TFSET	    Set monitor call  intercepts  for  the  given
			    process.   The calls that will be intercepted
			    are indicated in the monitor call bit  table.
			    The  given	process  must  be  frozen.   This
			    function  is  illegal  for	an   execute-only
			    process.

	 1     .TFRAL	    Remove all monitor call  intercepts  for  the
			    given  process.   The process must be frozen.
			    This function is illegal for an  execute-only
			    process.

	 2     .TFRTP	    Remove for the given process only the monitor
			    call  intercepts  that  are  indicated in the
			    monitor call bit table.   The  given  process
			    must be frozen.  This function is illegal for
			    an execute-only process.
	Code   Symbol			      Meaning

	 3     .TFSPS	    Set the given software channel as the channel

			    on which to generate the interrupt.

	 4     .TFRPS	    Return in the left half of AC2  the  software
			    channel   on  which  the  interrupt  will  be
			    generated.

	 5     .TFTST	    Test if the caller is to be intercepted  when
			    it	attempts  to  execute  monitor calls.  On
			    successful return AC2 contains -1 if it is to
			    be	intercepted  or  0  if	it  is	not to be
			    intercepted.

	 6     .TFRES	    Remove intercepts set for all  inferiors  and
			    clear  the	software  channel assigned to the
			    interrupt for monitor call intercepts.

	 7     .TFUUO	    Set  monitor  call	intercepts  for   TOPS-10
			    monitor  calls  (UUOs) for the given process.
			    The process must be frozen.  This function is
			    illegal for an execute-only process.

	 10    .TFSJU	    Set monitor  call  intercepts  for	both  the
			    calls indicated in the monitor call bit table
			    and the TOPS-10 monitor calls.  This function
			    is	a  combination	of  functions  .TFSET and
			    .TFUUO.  The given process	must  be  frozen.
			    This  function is illegal for an execute-only
			    process.

	 11    .TFRUU	    Remove  monitor  call  intercepts	for   the
			    TOPS-10  monitor  calls.   The  given process
			    must be frozen.

   To set monitor call intercepts, the process must  first  issue  .TFSPS
   (code  3).  Then, .TFSET (code 0), .TFUUO (code 7) or .TFSJU (code 10)
   may be issued to set intercepts.

   The process handle in the right half of AC1 must refer to an  inferior
   process  or must be -4 to refer to all inferiors.  When intercepts are
   set for a given process, they also apply to all processes inferior  to
   the	given  process.   When a process is created, it is subject to the
   same intercepts as the process that created it.

   If the software channel is given as	77,  any  intercepts  bypass  the
   given process without causing either an interrupt to its superior or a
   suspended state of the process.

   The monitor call bit table contains a bit  for  each  of  the  TOPS-20
   monitor  calls.   When  a  bit  in  the table is on, the corresponding
   monitor call is to be intercepted when the given process  attempts  to
   execute  it.   If  the bit is off, the corresponding monitor call will
   not be intercepted.	The size of the bit table is 1000(octal) bits.

   A process can remove only the intercepts it previously set;	it cannot
   remove intercepts that other processes set.

   When the process being monitored attempts to execute  the  trapped-for
   JSYS,  the  process	and  its inferiors enter a suspended state.  This
   suspended state differs from the normal "frozen" state of a process in
   the following ways:

	1.  The inferiors of the monitored process  are  not  frozen  and
	    continue to operate.

	2.  The monitored process is resumed with the UTFRK monitor call.
	    RFORK will not resume the process.

 
	3.  All interrupts for the monitored process are queued  and  are
	    acted upon immediately after the UTFRK monitor call.

 
   After the suspension of the monitored process,  the	superior  process
   may do one of the following:

 
	1.  Allow the  monitored  process  to  resume  execution  of  the
	    intercepted JSYS.

	2.  Make changes in the  working  environment  of  the	monitored
	    process  and  allow  that  process to resume execution of the
	    intercepted JSYS.

	3.  Execute the intercepted  JSYS  on  behalf  of  the	monitored
	    process, and then allow the monitored process to continue.

 
   The user interface to the monitor call intercept facility is  provided
   for by three JSYS's:

 
	1.  TFORK  (trap)

	2.  RTFRK  (read)

	3.  UTFRK  (untrap)

 
	Generates an illegal instruction interrupt  on	error  conditions
	below.

   TFORK ERROR MNEMONICS:

   FRKHX8:   Illegal to manipulate an execute-only process
   TFRKX1:   Invalid function code
   TFRKX2:   Unassigned process handle or not immediate inferior
   TFRKX3:   Process not frozen



			     THIBR     JSYS 770

   Blocks the current process for the specified  elapsed  time	or  until
   awakened  by  a TWAKE monitor call, whichever occurs first.	The THIBR
   call is a temporary call and may not be defined in future releases.

   ACCEPTS IN AC1:  0 in the left half, and maximum number of seconds  to
		    block in the right half

   RETURNS     +1:  never

	       +2:  always, with time expired or TWAKE call occurred



				      TIME     JSYS 14

		    Returns the amount of time since the system was  last
		    restarted.

   RETURNS     +1:  always, with time (in  milliseconds)  right-justified
		    in AC1, and divisor to convert the time to seconds in
		    AC2.  AC2 always contains  1000;   thus,  it  is  not
		    necessary to examine its contents.

   This is a monotonically increasing number (when the system is running)
   independent of any resets of the time and date.



			     TIMER     JSYS 522

   Controls the amount of time either a  process  within  a  job  or  the
   entire  job	can  run.   An	interrupt  is generated when the time has
   elapsed.

   Only one process in the job is allowed to time the entire job.  If the
   job	is  already  being  timed,  an	error is given if another process
   attempts to time the job.  An error is also given if a  process  other
   than  the one that set the runtime limit of the job attempts to remove
   that limit.

   ACCEPTS IN AC1:  process handle in the left half, and function code in
		    the right half.

	      AC2:  time at which to generate an interrupt.  Refer to the
		    individual	function  descriptions	for  the specific
		    arguments.

	      AC3:  number of the software channel on which  to  generate
		    an interrupt when the time has expired.

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The available functions are as follows:

	Code   Symbol		 Meaning

	 0     .TIMRT	    Specify the total runtime of the entire  job.
			    This function allows one process within a job
			    to time the entire	job.   AC2  contains  the
			    total  runtime  in	milliseconds that the job
			    can  accumulate  before   an   interrupt   is
			    generated  on  the specified channel.  If AC2
			    contains 0, the limit on the runtime  of  the
			    job  is removed.  The process handle given in
			    AC1 must be .FHJOB (-5).

	 1     .TIMEL	    Specify  an  elapsed  time	after  which   an
			    interrupt is generated for the given process.
			    AC2 contains the number of milliseconds  that

			    can   now  elapse  before  the  interrupt  is
			    generated on the specified channel.

	 2     .TIMDT	    Specify an exact time at which  an	interrupt
			    is	generated  for	the  given  process.  AC2
			    contains  the  internal  format   (refer   to
			    section  2.6.3) of the date and time when the
			    interrupt is to be generated.

	 3     .TIMDD	    Remove any pending	interrupt  requests  that
			    are  to  occur  for  the process at the given
			    time.   AC2  contains  the	internal   format
			    (refer to section 2.9.2) of the date and time
			    of the interrupt request to be removed.   AC3
			    is not used for this function.

 
	 4     .TIMBF	    Remove any pending	interrupt  requests  that
			    are to occur for the process before the given
			    time.   AC2  contains  the	internal   format
			    (refer  to	section  2.9.2)  of  the date and
			    time.  AC3 is not used for this function.

	 5     .TIMAL	    Remove all pending	requests  for  the  given
			    process  including	the  runtime limit on the
			    entire  job.   AC3	is  not  used  for   this
			    function.

   The runtime limit for a job can be obtained via the GETJI monitor call
   (contents  of word .JIRT on return).  If the job's time limit has been
   exceeded, the value returned by the GETJI call will be zero.

   TIMER ERROR MNEMONICS:

   TIMX1:    Invalid function
   TIMX2:    Invalid process handle
   TIMX3:    Time limit already set
   TIMX4:    Illegal to clear time limit
   TIMX5:    Invalid software interrupt channel number
   TIMX6:    Time has already passed
   TIMX7:    No space available for a clock
   TIMX8:    User clock allocation exceeded
   TIMX9:    No such clock entry found
   TIMX10:   No system date and time



			     TLINK     JSYS 216

   Controls  terminal  linking.   (Refer  to  Section  2.4.9.5	for  more
   information.)
   RESTRICTIONS:    some functions require WHEEL or  OPERATOR  capability
		    enabled

   ACCEPTS IN AC1:  B0(TL%CRO)	Clear  link   from   remote   to   object
				designator.   If the remote designator is
				-1,  all  remote  links  to  the   object
				designator are cleared.

		    B1(TL%COR)	Clear  link   from   object   to   remote
				designator.   If the remote designator is
				-1, links from the object to  all  remote
				designators are cleared.

		    B2(TL%EOR)	Establish  link  from  object  to  remote
				designator.

		    B3(TL%ERO)	Establish  link  from  remote  to  object
				designator.

		    B4(TL%SAB)	Examine  B5(TL%ABS)  to   determine   the
				setting of the object designator's accept
				link bit.  If this  bit  is  off,  B5  is
				ignored.

		    B5(TL%ABS)	Set the object designator's  accept  link
				bit.   When  B4(TL%SAB) is on, the object
|				designator is accepting links;	if TL%ABS
|				is  off the object designator is refusing
|				links.

		    B6(TL%STA)	Examine  B7(TL%AAD)  to   determine   the
				setting of the object designator's accept
				advice bit.  If this bit is  off,  B7  is
				ignored.

		    B7(TL%AAD)	Set the object designator's accept advice
				bit.   When  B6(TL%STA) is on, the object
				designator is accepting advice if  TL%AAD
				is  on	and  refusing advice if TL%ADD is
				off.

		    B18-B35	Object designator
		    (TL%OBJ)

	      AC2:  remote designator in the right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success

   The object and remote designators must be either  4xxxxx  or  -1.   An
   object  designator  of  -1  indicates  the  controlling terminal.  The
   following restrictions apply  if  the  process  does  not  have  WHEEL
   capability enabled:

	1.  The object designator must specify this terminal.

	2.  The object-to-remote link must be specified before or at  the
	    same time as the remote-to-object link.

   If the accept bit of the remote designator is not set, a link from the
   object-to-remote  designator  causes  the  remote designator's bell to
   ring.  If the remote designator does not set the accept bit within  15
   seconds, the TLINK call returns an error.

   When terminals are linked together and a character  is  typed  on  one
   terminal,  the  same  ASCII character code is sent to all terminals in
   the link.  The character always appears in the output buffers  of  all
   terminals  regardless of the current mode of each individual terminal.
   The character is sent according to the data mode and terminal type  of
   the	terminal  that	originates  the  character.   For example, if one
   terminal originates a TAB and has mechanical tabs set,  all	terminals

   in the link receive the ASCII code for a TAB in their output buffers.

   TLINK ERROR MNEMONICS:

   DESX1:    Invalid source/destination designator
   TLNKX1:   Illegal to set remote to object before object to remote
   TLNKX2:   Link was not received within 15 seconds
   TLNKX3:   Links full
   TTYX01:   Line is not active



			      TMON     JSYS 7

   Returns various flags and parameters in the monitor's data  base.   In
   most  cases,  flag-oriented items return a 1 in AC2 if the flag is set
   and a 0 in AC2 if the flag is cleared.  In a few cases (noted  in  the
   text),  flag-oriented  items return the appropriate bit set or cleared
   in AC2.  Value-oriented items return the value  of  the  parameter  in
   AC2.

   ACCEPTS IN AC1:  function code

   RETURNS     +1:  always, with value of the function in AC2

   The codes for the functions are as follows:

     Code  Symbol		 Meaning

      0    .SFFAC      FACT file entries are allowed.
      1    .SFCDE      CHECKD found errors.
      2    .SFCDR      CHECKD is running.
      3    .SFMST      Manual start is in progress.
      4    .SFRMT      Remote LOGINs (dataset lines) are allowed.
      5    .SFPTY      PTY LOGINs are allowed.
      6    .SFCTY      CTY LOGINs are allowed.
      7    .SFOPR      Operator is in attendance.
     10    .SFLCL      Local LOGINs (hardwired lines) are allowed.
     11    .SFBTE      Bit table errors found on startup.
     12    .SFCRD      Users   can   change    nonprivileged	directory
		       parameters with the CRDIR monitor call.
     13    .SFNVT      ARPANET terminal LOGINs are allowed.
|    14    .SFWCT      WHEEL LOGINs on CTY are allowed.
|    15    .SFWLC      WHEEL LOGINs on local terminals are allowed.
|    16    .SFWRM      WHEEL LOGINs on remote terminals are allowed.
|    17    .SFWPT      WHEEL LOGINs on PTYs are allowed.
|    20    .SFWNV      WHEEL LOGINs on network	virtual  terminals  (NVT)
|		       are allowed.
     21    .SFUSG      USAGE file entries are allowed.
     22    .SFFLO      Disk latency optimization using	the  RH20  backup
		       register  is  enabled.	This feature is not to be
		       enabled unless the M8555 board of the RH20  is  at
		       Revision   Level   D  AND  either  of  the  KL10-C
		       processor  is  at  Revision  Level  10  or  KL10-E
		       processor is at Revision Level 2.
     23    .SFMTA      MOUNTR magtape allocation is enabled.
     24    .SFMS0      System message level 0 is set.
     25    .SFMS1      System message level 1 is set.
|    26    .SFBGS      Operator messages are sent to CTY;  if  off,  such

|		       messages as BUGINF, BUGCHK, and "resource low" are
|		       sent to OPR terminals, rather than the CTY
     27    .SFMCB      DECnet logins allowed
     30    .SFDPR      Disk preallocation is enabled.
     44    .SFNTN      ARPANET is on.
     45    .SFNDU      ARPANET will be reinitialized if it is down.
     46    .SFNHI      ARPANET host table will be initialized.
     47    .SFTMZ      Local time zone
     50    .SFLHN	ARPANET local host number
     51    .SFAVR      Account validation is running on this system.
     52    .SFSTS      Status reporting is enabled.
     53    .SFSOK      GETOK% defaults

|		       Required in AC2:  GETOK% function code
|
|		       Returned in AC2:  Flags,,GETOK% function code
|
|		       Flags:
|
|		       Bit Symbol  Meaning
|		       B0  SF%EOK  0 = Access checking is disabled
|				   1 = Access checking is enabled
|		       B1  SF%DOK  0 = Access is denied if checking
|				       disabled
|				   1 = Access is allowed if checking
|				       disabled
|
|		       Installation-defined  function  codes   (400000+n)
|		       must  be  enabled/disabled  by using function code
|		       400000,	regardless  of	the  installation-defined
|		       function  code  given in the GETOK% call.  See the
		       description of the GETOK% JSYS for GETOK% function
		       codes.

      54   .SFMCY      Maximum offline expiration period in days in  days
		       for ordinary files (tape recycle period).
      55   .SFRDU      Read date update function data
      56   .SFACY      Maximum offline	expiration  period  in	days  for
		       archive files (tape recycle period).
      57   .SFRTW      File-retrieval requests that are waiting  for  the
		       retrieval should fail rather than wait.
      60   .SFTDF      Tape mount controls

		       Flags:

		       Bit     Symbol	 Meaning

		       B0      MT%UUT	 1 = unload unrecognizable tapes
					 0 = treat unrecognizable tapes
					     as unlabeled
      61   .SFWSP      Enable working set preloading
|
|     62   .SFDST      Daylight Saving Time conversion method
|
|		       Value  Symbol  Meaning
|
|		       0      .DSTAU  Perform automatic DST changeover
|		       1      .DSTNV  Never perform DST changeover
|		       2      .DSTAL  Always perform DST conversion
|
|     63	       Reserved for DIGITAL.
|
|     64   .SFMSD      MSCP  access  for  disk	drive;	 refer	to  SMON%
|		       monitor	call  for  a  description of the argument

|		       block.  Upon return, AC2 contains 1 if  the  drive
|		       is ALLOWED;  0 if RESTRICTED.
|
|     65   .SFSPR      Read SPEAR event counter
|
|     66   .SFCOT      Read time between  carrier  off	event  (including
|		       network	connection  being  broken)  and automatic
|		       logout  of  the	job.   AC2   is   the	time   in
|		       milliseconds.
|
|     67   .SFHU0      Hangup action for jobs not logged in
|
|		       AC2:  0 to not hang up;	1 to hang up
|
|     70   .SFHU1      Hang up action for jobs logged in
|
|		       AC2:  0 to not hang up;	1 to hang up
|
|     71   .SFXEC      Flag word for configurations for the EXEC
|
|		       AC2 Flags:
|		       B0(XC%FST) do not allow /FAST option on LOGIN
|
|     72   .SFSEA      Read Ethernet address
|
|     73   .SFDCD      Read "don't care disk" status
|
|     74   .SFLTS      Read Local Area Transport (LAT) state.

   The SMON monitor call can be used to set various monitor flags.

   Generates an illegal instruction interrupt on error conditions below.

   TMON ERROR MNEMONICS:

   TMONX1:   Invalid TMON function



			     TTMSG     JSYS 775

   Sends a message to a specified terminal  or	to  all  terminals.   The
   TTMSG  call	is  a  temporary  call	and  may not be defined in future
   releases.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled to send
|		    to	 all  terminals.   Messages  sent  by  privileged
|		    callers may contain  a  maximum  of  581  characters;
|		    messages sent by non-privileged callers may contain a
|		    maximum of 526 characters.

   ACCEPTS IN AC1:  400000 + TTY number, or -1 to send to all terminals

	      AC2:  byte pointer to string in caller's address	space  to
		    be sent

   RETURNS     +1:  always

|  The message being sent is not formatted to the current  width  setting

|  of the destination terminal.

   The TTMSG monitor call is a no-op if the specified terminal	does  not
   exist.

   Generates an illegal instruction interrupt on error conditions below.

   TTMSG ERROR MNEMONICS:

   GTDIX1:   WHEEL or OPERATOR capability required
   TTMSX1:   Could not send message within timeout interval



			     TWAKE     JSYS 771

   Wakes the specified job that is blocked because of the execution of	a
   THIBR call.	If more than one process in a job is blocked because of a
   THIBR call, execution  of  the  TWAKE  call	causes	any  one  of  the
   processes  to be awakened.  The TWAKE call is a temporary call and may
   not be defined in future releases.

   ACCEPTS IN AC1:  0 in the left half, and number of job to be  awakened
		    in the right half

   RETURNS     +1:  failure, error code in AC1

	       +2:  success,  signal  sent.    Job   will   be	 awakened
		    immediately  if blocked by a THIBR call or as soon as
		    next THIBR call is executed.

		    TWAKE ERROR MNEMONICS:

   ATACX1:	    Invalid job number



			     UFPGS     JSYS 525

   Updates pages of the specified file.  This monitor  call  is  used  to
   guarantee  that  a  certain sequence of file pages has been written to
   the disk before any other operation is performed.

   ACCEPTS IN AC1:  JFN in the left half, and file  page  number  of  the
		    first page to be updated in the right half

	      AC2:  flags,,count of number of sequential pages to update

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, all modified pages are written to disk.  The
		    FDB is updated, if necessary.

   FLAGS:

	Bit	Symbol	  Meaning

	 0	UF%NOW	  Allows  performing   a   UFPGS   call   without
			  blocking.  The JSYS will not block even if some
			  pages need to be written to disk.

   If UF%NOW is not set, the UFPGS call causes the process to block until
   all writes to the disk are completed.

   UFPGS ERROR MNEMONICS:

   UFPGX1:   File is not opened for write
   DESX3:    JFN is not assigned
   DESX4:    Invalid use of terminal designator or string pointer
   DESX7:    Illegal use of parse-only JFN or output wildcard-designators
   DESX8:    File is not on disk
   LNGFX1:   Page table does not exist and file not open for write
   IOX11:    Quota exceeded
   IOX34:    Disk full
   IOX35:    Unable to allocate disk - structure damaged



			     USAGE     JSYS 564

   Controls accounting on the system by writing entries into the system's
   data  file.	 All  entries  to  the data file are made with this call.
   Examples of the types of entries entered into the data file	are  disk
   storage  usage  for	regulated  structures,	input  and output spooler
   usage, job session entry, and date and time changes.

   The file written by the USAGE call is  an  intermediate  binary  file,
   which  is converted by a system program to the final ASCII file.  Each
   entry in the final file is at least	two  records  long,  each  record
   being  defined  as  a  string  of  ASCII  characters terminated with a
   line-feed character.   The  first  record  contains	system	and  file
   information;   its  format  is  the	same for all entries.  Subsequent
   records contain data pertaining to  the  entry;   their  formats  vary
   according to the particular data being entered.

   Refer to the USAGE File Specification for  additional  information  on
   the system's data file.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  function code

	      AC2:  function argument or  address  of  record  descriptor
		    block

   RETURNS     +1:  always

   The available functions are as follows:

	Code	Symbol	  Meaning

	 0	.USENT	  Write an entry into  the  system's  data  file.

			  AC2	contains   the	 address  of  the  record
			  descriptor block.

	 1	.USCLS	  Close the system's data file,  which	is  named
			  PS:<ACCOUNTS>SYSTEM-DATA.BIN.    No  additional
			  entries are recorded into this file, and a  new
			  SYSTEM-DATA.BIN   is	 opened   for  subsequent
			  entries.

	 2	.USCKP	  Perform  a  checkpoint  of  all   jobs.    Data
			  recorded   during  a	checkpoint  includes  the
			  billable data (connect time  and  runtime,  for
			  example)  accumulated  during  the job session.
			  The session starts from time of  login  or  the
			  last	SET ACCOUNT command, and ends at the time
			  this function is performed.  The data collected
			  on  a  LOGIN	or SET ACCOUNT command is entered
			  into the session entry in the data  file.   The
			  default checkpoint interval is 10 minutes.

	 3	.USLGI	  Initialize a	checkpoint  entry  for	the  job.
			  This	function  is used internally by the LOGIN
			  monitor call.  AC2 contains the address of  the
			  record descriptor block.

	Code	Symbol			    Meaning

	 4	.USLGO	  Terminate the checkpoint entry for the job  and
			  write  an  entry  into  the system's data file,
			  which  is  named  PS:<ACCOUNTS>SYSTEM-DATA.BIN.
			  This	function  is used internally by the LGOUT
			  monitor call.  AC2 contains the address of  the
			  record descriptor block.

	 5	.USSEN	  Terminate the current session, write	an  entry
			  into	the  system's  data  file, which is named
			  PS:<ACCOUNTS>SYSTEM-DATA.BIN, and initialize	a
			  new	checkpoint   entry  for  the  job.   This
			  function  is	used  internally  by  the   CACCT
			  monitor  call.  AC2 contains the address of the
			  record descriptor block.

	 6	.USCKI	  Set the checkpoint time interval.  AC2 contains
			  the interval in minutes.

	 7	.USENA	  Install the accounting data base from the  file
			  named  PS:<SYSTEM>ACCOUNTS-TABLE.BIN	into  the
			  running monitor.  The ACTGEN program uses  this
			  file to generate the list of valid accounts.

	 10	.USCAS	  Change accounting shift.   This  function  will
			  perform  a  "session	end"  function	for every
			  active job.

	 11	.USSAS	  Set accounting shifts.   Sets  the  times  when
			  automatic   accounting  shift  changes  are  to
			  occur.  This function takes an argument in  AC2
			  which  is a pointer to a block of the following
			  format:

			       table header

			       table entry

			       ...

			       table entry

			  The table header word contains  the  number  of
			  actual   entries  in	the  table  in	the  left
			  halfword,  and  the  maximum	number	of  table
			  entries  in  the  right  halfword.   Each table
			  entry is one word in the following format:

				   B0-B6     US%DOW Days of the week that
					     this  entry  is  in  effect.
					     Bit n is set if  this  entry
					     is  in effect for day n (0 =
					     Monday).
				   B7-B17     Unused, must be zero.
				   B18-B35   US%SSM  Time  of  day   that
					     automatic	  shift    change
					     should   occur.	Time   is
					     specified	in  seconds since
					     midnight.

			  The maximum number  of  table  entries  is  100
			  decimal.

	 12	.USRAS	  Read accounting shifts.  This function  returns
			  the  times  of the automatic shift changes that
			  were set with .USSAS.  AC2 contains the address
			  of  an argument block that is filled in by this
			  function.  The block has the same format as the
			  .USSAS  block.   Note  that  the right halfword
			  (maximum size) of  the  table  header  must  be
			  specified by the user for .USRAS.

   The record descriptor block, whose address is given in AC2, is set  up
   by  the  UITEM. macro defined in ACTSYM.MAC.  (Refer to Appendix D for
   the definition of the UITEM. macro.)  The names of  all  data  entries
   are generated by this macro.  The USENT. macro is used to generate the
   header of the record descriptor block.

   The format of the data generated by the USAGE call is a list of  items
   describing  the  entries  in  a single record.  This list has a header
   word containing the version numbers and the type of entry.	The  data
   words  follow  this	header with two words per data item.  The list is
   terminated with a zero word.

   Generates an illegal instruction interrupt on error conditions below.

   USAGE ERROR MNEMONICS:

   CAPX1:    WHEEL or OPERATOR capability required
   ARGX02:   Invalid function
   ARGX04:   Argument block too small
   ARGX05:   Argument block too long
   USGX01:   Invalid USAGE entry type code
   USGX02:   Item not found in argument list
   USGX03:   Default item not allowed



			     USRIO     JSYS 310

   Places the user program into user  I/O  mode  in  order  that  it  can
   execute  various  hardware  I/O  instructions.   The  user IOT flag is
   turned on in the PC of the running process.	 The  program  can  leave
   user  I/O  mode  by executing a JRSTF with a PC in which bit 6 is zero
   (for example, JRSTF @[.+1]).

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   RETURNS     +1:  failure, error code in AC1

	       +2:  success, user IOT flag is set

		    USRIO ERROR MNEMONICS:

   CAPX2:    WHEEL, OPERATOR, or MAINTENANCE capability required



			     UTEST     JSYS 563

   Provides a method for determining if every instruction in a section of
   monitor  code actually gets executed.  This monitor call does not test
   the code by executing it;  it confirms that a  test	of  the  code  is
   complete  by  reporting the instructions that were executed during the
   test.

   RESTRICTIONS:    requires WHEEL or OPERATOR capability enabled

   ACCEPTS IN AC1:  function code in the left half,  and  length  of  the
		    argument block in the right half.

	      AC2:  address of the argument block

   RETURNS     +1:  always

   The available functions are as follows:

	Code	Symbol	  Meaning

	 0	.UTSET	  Start testing of the code.

	 1	.UTCLR	  Stop testing of the code and update the bit map
			  in the argument block.

   The format of the argument block is as follows:

	Word	Symbol	  Meaning

	 0	.UTADR	  Address of the beginning of the section of code
			  that is to be tested.

	 1	.UTLEN	  Length of section of code that is to be tested.

	 2	.UTMAP	  Start of bit map representing the  instructions
			  that	are  to be tested in the section of code.
			  This map contains one bit for each location  in

			  the  section.   If  a bit is on in the map, the
			  corresponding instruction is to be tested.   If
			  a  bit is off, the corresponding instruction is
			  not to be tested.

			  Locations that  contain  data  and  that  would
			  cause the section of code to execute improperly
			  if that data were changed should not be tested.

 
   Internally, a copy of the code being tested is  placed  in  a  buffer,
   which  is  dynamically locked down during execution of the UTEST call.
   The system allows any monitor routine  to  be  tested  as  long  as	a
   pushdown  stack  to	which  AC P  (AC17) points is set up whenever the
   routine is called.

   After execution of the .UTCLR function, the	bit  map  is  changed  to
   reflect  the instructions that were actually executed during the test.
   If a bit is on in the map, the corresponding instruction was executed.
   If a bit is off, the corresponding instruction was not executed.

   Generates an illegal instruction interrupt on error conditions below.

   UTEST ERROR MNEMONICS:

   CAPX3:    WHEEL capability required
   UTSTX1:   Invalid function code
   UTSTX2:   Area of code too large to test
   UTSTX3:   UTEST facility in use by another process



			     UTFRK     JSYS 323

   Resumes the execution of a process that  is	suspended  because  of	a
   monitor  call  intercept.  The instruction where the execution resumes
   depends on the current PC word of the suspended process.   To  prevent
   the	suspended  process  from executing the call, the superior process
   handling the intercept can change the PC word (via the SFORK or  SFRKV
   call).   Then  on  execution  of the UTFRK call, the suspended process
   continues at the  new  PC.	If  the  superior  process  handling  the
   intercept  does  not change the PC word of the suspended process, then
   the next superior process intercepting that	particular  monitor  call
   will receive the interrupt.

   See the description of the TFORK JSYS  for  more  information  on  the
   monitor call intercept facility.

   ACCEPTS IN AC1:  flag bits in the left half, and process handle in the
		    right half

   RETURNS     +1:  always

   The flag bit that can be given in AC1 is as follows:

	Bit	Symbol		    Meaning

	 0	UT%TRP	  Cause  a  failure  return  for  the	suspended
			  process.    This  return  will  be  either  the

			  generation of an illegal instruction	interrupt
			  or   the   processing  of  an  ERJMP	or  ERCAL
			  instruction.

   The UTFRK monitor call is a no-op if

	1.  The process handle given is valid but the  process	specified
	    is not suspended because of a monitor call intercept.

	2.  The caller	is  not  one  of  the  processes  monitoring  the
	    suspended  process	and  therefore is not permitted to resume
	    the process.

 
   Generates an illegal instruction interrupt on error conditions below.

   UTFRK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			     VACCT     JSYS 566

   Verifies accounts by validating the supplied  account  for  the  given
   user.

|  RESTRICTIONS:    requires WHEEL or OPERATOR capability, unless  caller
|		    is validating his current account
   ACCEPTS IN AC1:  36-bit user number, 36-bit directory number, or -1 to
		    validate the account for the current user

	      AC2:  byte pointer to account string

   RETURNS     +1:  always, with updated pointer in AC2

		    Generates an illegal instruction interrupt	on  error
		    conditions below.

   VACCT ERROR MNEMONICS:

   VACCX0:   Invalid account
   VACCX1:   Account string exceeds 39 characters
   VACCX2:   Account has expired
   MONX02:   Insufficient system resources (JSB full)
   DELFX6:   Internal format of directory is incorrect
   DIRX1:    Invalid directory number
   DIRX3:    Internal format of directory is incorrect
   STRX01:   Structure is not mounted
   OPNX9:    Invalid simultaneous access
   OPNX16:   File has bad index block



			     WAIT     JSYS 306

   Dismisses the current process indefinitely and does	not  return.   If
   the software interrupt system is enabled for this process, the process
   can be interrupted out of the wait state.  Upon execution of  a  DEBRK
   call,  the  process	continues to wait until the next interrupt unless
   the interrupt routine changes the PC word.  In this case, the  process
   resumes  execution  at  the new PC location.  If the interrupt routine
   changes the PC word, it must set the user-mode bit (bit 5) of  the  PC
   word.  (Refer to Section 2.6.7.)



			     WFORK     JSYS 163

|  Causes the current process to wait for a specific inferior process  or
|  all inferior processes to terminate (voluntarily or involuntarily).	A
   process is considered terminated if its  state  is  either  .RFHLT  or
   .RFFPT (refer to RFSTS JSYS for a description of process status).

|  ACCEPTS IN AC1:  inferior process handle, or -4 (.FHINF)in  the  right
|		    half  to  wait  for  all of the inferior processes to
|		    terminate

|  RETURNS     +1:  always, when the specified process(es) terminate
|
|  This call  returns  immediately  if	the  specified	process(es)  have
|  already terminated.

   Generates an illegal instruction interrupt on error conditions below.

   WFORK ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process



			     WILD%     JSYS 565

   Compares a possibly wild string (one containing wild-card  characters)
   against  a  non-wild  string  to  see  if  the latter matches the wild
   string.  For example, "AND" would be a legal match for the wild string
   "A*D".   Likewise  "AND"  would  be	a legal match for the wild string
   "A%%".  The	WILD%  JSYS  will  also  compare  a  possibly  wild  file
   specification  with a non-wild file specification.  (See Section 2.2.3
   for a description of wild-card characters.)

 

   ACCEPTS IN AC1:  flags in the left half, function in the right half

	      AC2:  wild argument - JFN or byte pointer to string

	      AC3:  non-wild argument - JFN or byte pointer to string

 
   RETURNS     +1:  always, with information returned in AC1.

 
   The available functions are as follows:

	Code	Symbol	  Meaning

	 0	.WLSTR	  Compare  a  non-wild	string	against  a   wild
			  string.   AC2 contains a byte pointer to a wild
			  string and AC3 contains a  byte  pointer  to	a
			  non-wild string.  By default, the comparison is
			  made without regard to what kind of  characters
			  the  strings	contain.   Thus tabs, spaces, and
			  carriage returns, for example, are treated just
			  as  letters are.  The following flag can be set
			  in AC1:

			  B0(WL%LCD)	Lower case characters are  to  be
					treated  as  distinct  from upper
					case letters.  If this bit is not
					set,  a lower case character will
					match  the  corresponding   upper
					case character.

			  On  return,  AC1  contains  zero  if	a   match
			  occurred,  or  the  following flags if no match
			  occurred:

			  B0(WL%NOM)	If set, this bit  indicates  that
					the non-wild string did not match
					the wild string.

			  B1(WL%ABR)	If set, this bit  indicates  that
					the   non-wild	 string   is  not
					matched, but is  an  abbreviation
					of  the wild string.  If this bit
					is  set,  it  implies  that   bit
					WL%NOM is also set.

	Code	Symbol			    Meaning

	 1	.WLJFN	  Compare a non-wild file specification against a
			  wild	file  specification.   AC2 contains a JFN
			  with flags (as returned by GTJFN) for the  wild
			  file and AC3 contains a JFN (without flags) for
			  the non-wild file.   On  return,  AC1  contains
			  zero	if  a  match  occurred.   Otherwise,  the
			  following  flags  are  returned  (in	AC1)   to
			  indicate  which parts of the file specification
			  do not match:

			  B1(WL%DEV)	Device field does not match
			  B2(WL%DIR)	Directory field does not match
			  B3(WL%NAM)	Name field does not match
			  B4(WL%EXT)	File type does not match
			  B5(WL%GEN)	Generation number does not match

   If a parse-only JFN is given (see  section  2.2.3),	and  one  of  the
   fields  is  not  specified  (such  as a file name), that field will be
   treated as a null field.  Thus the filenames  PS:<DBELL>FOO.BAR.3  and
   PS:<DBELL>.BAR.3 will not match.

   WILD% ERROR MNEMONICS:

   DESX3:    JFN is not assigned
   RDTX1:    Invalid string pointer
   ARGX02:   Invalid function
   ARGX22:   Invalid flags



			    WSMGR%     JSYS 623
|
|  Manages the working set of a process.
|
|  ACCEPTS IN AC1:  function code
|
|	      AC2:  pointer to argument block
|  RETURNS     +1:  always
|
|  The available functions are:
|
|
|	Code	Symbol			    Meaning
|
|	 1	.WSCLR	  Clear the working set of the	calling  process.
|			  This function is similar to the RWSET% call.
|
|	 2	.WSRMV	  Remove specified pages from the working set  of
|			  the  calling	process.  Usually these pages are
|			  then swapped out of memory.  The argument block
|			  specifies the pages to remove.
|
|	 3	.WSGET	  Get pages into memory for the calling  process.
|			  The  process' working set is not affected.  The
|			  pages  specified  by	the  argument  block  are
|			  brought   into  memory  so  that  an	immediate
|			  reference will not  cause  the  process  to  be
|			  blocked.   This  function  is  identical to the
|			  PM%PLD  function  of	the  PMAP%  call.    This
|			  function  does not create pages and thus is not
|			  valid for nonexistent pages.
|
|	 4	.WSRWS	  Read working set information	for  the  calling
|			  process   or	 one   of   its  inferiors.   The
|			  information is returned in the argument  block,
|			  with the left half of the first word containing
|			  the count of the number of pairs returned.   If
|			  the  caller  did  not  provide  enough room for
|			  returning  the  working  set,  the  count  will
|			  reflect  the	number	of  pairs  that  would be
|			  needed.  This function may change  the  working
|			  set  for the calling process since the function
|			  returns data into  the  user's  address  space.
|			  The data returned reflects the process' working
|			  set at some time during the  execution  of  the
|			  call.
|
|  The argument block has the following format:
|
|			  count of pairs in block followed  by	pairs  of

|			  words  with the count in the first word and the
|			  page number in the second word.
|
|			  Generates an illegal instruction  interrupt  on
|			  error conditions below.
|
|  WSMGR% ERROR MNEMONICS:
|
|  ARGX06:   Invalid page number
|  ARGX24:   Invalid count
|  FRKHX1:   Invalid process handle



			    XGSEV%     JSYS 614

   Gets an extended special entry vector that has been set to  allow  use
   of TOPS-10 Compatibility and RMS entry vectors in non-zero sections.

 
   ACCEPTS IN AC1:  vector type code,,fork handle

   RETURNS     +1:  always, with length of entry vector in AC2, and flags
		    in	bits  0-5 of AC3, address of entry vector in bits
		    6-35 of AC3.

   Generates an illegal instruction trap on error return.

 
   See XSSEV% for a list of vector type codes.

   Flags returned in bits 0-5 of AC3 are the same  as  those  listed  for
   XSSEV%.

   XGSEV% ERROR MNEMONICS

   XSEVX1:   Illegal vector type



			    XGTPW%     JSYS 612

   Returns the page-fail words.  This monitor call allows  a  program  to
   retrieve information about a previous page-fail trap.

   ACCEPTS IN AC1:  process handle

	      AC2:  address of block in which to return data.  The  first
		    word  of  the  data  block must contain the number of
		    words in the argument block.  The other words of  the
		    data block should contain zero.

   RETURNS     +1:  always, with page-fail  data  returned  in	the  data
		    block

   The data block has the following format:

	  !=======================================================!
	  !	Length of the data block, including this word	  !
	  !=======================================================!
	  !  page-fail flags  ! 				  !
	  !-------------------------------------------------------!
	  !	       Address that referenced the page 	  !
	  !=======================================================!
	  ! MUUO opcode & AC  ! 				  !
	  !-------------------------------------------------------!
	  !	 !     30-bit Effective address of the MUUO	  !
	  !=======================================================!

      B0(PF%USR)  page failure on a user-mode reference
      B1(PF%WTF)  page failure on a write reference

   This information allows a program to determine the exact  cause  of	a
   memory  trap  and  the effective virtual address that caused the trap.
   This information is sufficient to enable the program to  continue,  if
   desired, when the cause of the trap has been removed.

   Generates an illegal instruction interrupt on error conditions below.

   GTRPW ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



			    XGVEC%     JSYS 606

   Returns the entry vector of the specified process.  The process can be
   one	that  runs  in one or more sections of memory.	(Refer to Section
   2.7.3.)

   ACCEPTS IN AC1:  process handle

   RETURNS     +1:  always, with length  of  the  entry  vector  in  AC2,
		    address of the entry vector in AC3

   The XSVEC% monitor call can be used to  set	the  entry  vector  of	a
   process that runs in one or more sections of memory.

   Generates an illegal instruction  interrupt	on  the  following  error
   conditions:

   XGVEC% ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle



|			    XPEEK%     JSYS 626
|
|  Performs monitor data retrieval functions,  allowing  the  process  to
|  obtain  various  function-related data from the monitor.  This monitor
|  call allows access to data in extended sections of the monitor.
|
|  RESTRICTIONS:    requires WHEEL, OPERATOR, or  MAINTENANCE  capability
|		    enabled
|
|  ACCEPTS IN AC1:  address of argument block
|
|  RETURNS     +1:  always
|
|  The available functions are described below.
|
|	 Code	Symbol	  Function
|
|	  1	.XPPEK	  Transfers a block of words from  the	monitor's
|			  address space to the user's address space.
|
|  The desired monitor words must exist on pages that have read access.
|
|  The argument block has the following format:
|
|	 Word	Symbol	  Meaning
|
|	  0	.XPABL	  Length of argument block including the header.
|
|	  1	.XPFNC	  Function code.
|
|	  2	.XPCN1	  Count of words to transfer.  Current maximum is
|			  one section.
|
|	  3	.XPCN2	  Count  of  words  actually  transferred.   This
|			  differs  from the number requested if an error,
|			  such as an illegal  write,  occurs  during  the
|			  transfer.
|
|	  4	.XPMAD	  Location in the monitor's  address  space  from
|			  which to start the transfer.
|
|	  5	.XPUAD	  Location in the user's address space into which
|			  to start the transfer.
|
|  Generates an illegal instruction interrupt on error conditions below.
|
|  XPEEK% ERROR MNEMONICS:
|
|	     CAPX2:  WHEEL, OPERATOR, or MAINTENANCE capability required
|  PEEKX2:   Read access failure on monitor page
|  ARGX04:   Argument block too small



				  XRIR%     JSYS 601

	     Reads the addresses of the channel and priority level tables
	     for  the specified process.  (Refer to Section 2.6.3.) These

	     addresses must be set with the XSIR% monitor call.

 
   ACCEPTS IN AC1:  process handle

	      AC2:  address at which to begin the argument block

   RETURNS     +1:  always.  The argument block contains the  information
		    stored in the Process Storage Block.

   The format of the returned argument block is as follows:

	  !=======================================================!
	  !   Length of the argument block, including this word   !
	  !-------------------------------------------------------!
	  !	     Address of the interrupt level table	  !
	  !-------------------------------------------------------!
	  !		Address of the channel table		  !
	  !=======================================================!

   To see the format of the channel and interrupt level tables, refer  to
   Section 2.6.3.



			    XRMAP%     JSYS 611

   Acquires a handle on a page in  a  process  to  determine  the  access
   allowed for that page.

   ACCEPTS IN AC1:  process handle in the left	half,  and  zero  in  the
		    right half

	      AC2:  address of the argument block

   RETURNS     +1:  always, with a handle on the page in word  1  of  the
		    returned  data  block, and access information in word
		    2.	The handle in word 1 is a process/file designator
		    in the left half and a page number in the right half.

   The argument block addressed by AC2 has the following format:

	  !=======================================================!
	  !   Length of the argument block, including this word   !
	  !=======================================================!
	  !	   number of pages on which to return data	  !
	  !-------------------------------------------------------!
	  !	   number of the first page in this group	  !
	  !-------------------------------------------------------!
	  !	  address at which to return the data block	  !
	  !=======================================================!
	  \			      . 			  \
	  \			      . 			  \
	  \			      . 			  \
	  !=======================================================!
	  ! number of pages in this group on which to return data !
	  !-------------------------------------------------------!
	  !	   number of the first page in this group	  !
	  !-------------------------------------------------------!

	  !	  address at which to return the data block	  !
	  !=======================================================!

   The number of words in the argument block is three times the number of
   groups  of pages for which you want access data, plus one.  Each group
   of pages requires three arguments:  the number of pages in the  group,
   the	number	of  the first page in the group, and the address at which
   the monitor is to return the access data.

   Note that the address to which the monitor returns data should be in a
   section of memory that already exists.
   The access information returned for each group of pages  specified  in
   the argument block is the following:

	B2(RM%RD)  read access allowed
	B3(RM%WR)  write access allowed
	B4(RM%EX)  execute access allowed
	B5(RM%PEX) page exists
	B9(RM%CPY) copy-on-write access

   XRMAP% returns a -1 for each page specified in the argument block that
   does not exist.  It also returns a zero flag word for each such page.

   Generates an illegal instruction interrupt on error conditions below.

   XRMAP% ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   ARGX17:   Invalid argument block length



			    XSFRK%     JSYS 605

   Starts the specified process in a non-zero section of memory.  If  the
   process  is frozen, the XSFRK% call changes the PC but does not resume
   the process.  The RFORK call must be used to resume execution  of  the
   process.

   ACCEPTS IN AC1:  flags,,process handle

		    Flags:

		    SF%CON(1B0)    continue a process  that  has  halted.
				   If  SF%CON  is set, the address in AC3
				   is ignored and the  process	continues
				   from where it was halted.

	      AC2:  PC flags in the left half, 0 in the right half

	      AC3:  address to which this call is to set the PC

   RETURNS     +1:  always

 
   The SFRKV monitor call can be used to  start  a  process  at  a  given
   position in its entry vector.

   Generates an illegal instruction interrupt on error conditions below.

   XSFRK% ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX5:   Process has not been started
   FRKHX8:   Illegal to manipulate an execute-only process



			     XSIR%     JSYS 602

   Sets the addresses of the channel and priority level  tables  for  the
   specified  process.	(Refer to Section 2.6.3.) This process can run in
   one or more sections of memory.

   ACCEPTS IN AC1:  process handle

	      AC2:  address of the argument block

   RETURNS     +1:  always.  The addresses  in	the  argument  block  are
		    stored in the Process Storage Block.

   The format of the argument block is as follows:

	  !=======================================================!
	  !   Length of the argument block, including this word   !
	  !-------------------------------------------------------!
	  !	     Address of the interrupt level table	  !
	  !-------------------------------------------------------!
	  !		Address of the channel table		  !
	  !=======================================================!

   To see the format of the channel and interrupt level tables, refer  to
   Section 2.6.3.

   If the contents of the tables are changed after execution of the XSIR%
   call, the new contents will be used on the next interrupt.

   The XRIR% monitor call can be used to obtain the table  addresses  set
   with the XSIR% monitor call.

   Generates an illegal instruction interrupt on error conditions below.

   XSIR% ERROR MNEMONICS:

   ARGX04:   Argument block too small
   ARGX05:   Argument block too long
   SIRX1:    Table address is not greater than 20
   XSIRX2:   Level table crosses section boundary
   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate a superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process



			    XSSEV%     JSYS 613

   Allows setting of extended special entry vector for use  with  TOPS-10
   Compatibility and RMS entry vectors in non-zero sections.

   ACCEPTS IN AC1:  vector type code,,fork handle

	      AC2:  length of entry vector

	      AC3:  flags in bits 0-5, address of entry  vector  in  bits
		    6-35

   RETURNS     +1:  always

 
   In order to be called  from	any  section,  the  called  program  must
   provide  extended  format  PC  and  UUO  words.   A	flag  in the call
   specifies whether the program expects new or old  format  words.   Old
   format words should only be used for old versions of the program still
   running in Section 0.

   The vector type codes supplied in the left half of AC1 are as follows:

      Code	  Symbol    Meaning

	0	  .XSEVC    TOPS-10 Compatibility
	1	  .XSEVD    RMS

 
   The flags set in bits 0-5 of AC3 are:

      Flag	  Symbol    Meaning

       B1	  XS%EEV    Extended entry vector.  If this  bit  is  on,
			    the  entry vector points to a 2-word extended
			    PC and to an extended format  UUO  word.   If
			    this  bit  is off, the entry vector points to
			    old format PC and UUO words.

			    XSSEV% ERROR MNEMONICS:

   XSEVX1:   Illegal entry vector type
   XSEVX2:   Invalid entry vector length



			    XSVEC%     JSYS 607

   Sets or clears the entry vector of the specified process.  The process
   can	be  one  that  runs in one or more sections of memory.	(Refer to
   Section 2.7.3.)

   ACCEPTS IN AC1:  process handle

	      AC2:  length of the entry vector, or 0

	      AC3:  address at which the entry vector starts

   RETURNS     +1:  always

   A zero in AC2 clears the process entry vector.

   The XGVEC% monitor call can be used to obtain the entry vector of  the
   process.

   Generates an illegal instruction interrupt on error conditions below.

   XSVEC% ERROR MNEMONICS:

   FRKHX1:   Invalid process handle
   FRKHX2:   Illegal to manipulate superior process
   FRKHX3:   Invalid use of multiple process handle
   FRKHX8:   Illegal to manipulate an execute-only process
   SEVEX1:   Entry vector length is not less than 1000



	-FDB-contents  [ 2.1.8  File Descriptor Block ]

   Each file has an associated File Descriptor Block (FDB) that  contains
   various information about the file.  The format of the FDB is shown in
   Table 2-1.

   The description of each word or bit in the FDB indicates  whether  the
   user can change it, and if so, what types of access are required.  The
   types of access are:

        1.  WRITE - write access

        2.  OWNER - owner access

        3.  W/OPR - WHEEL or OPERATOR capabilities enabled


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

        1.  (R) - read

        2.  (S) - set

        3.  (C) - clear

        4.  (SC) - set/clear



                                    Table 2-1
                           File Descriptor Block (FDB)


     Word    Symbol                          Meaning


       0     .FBHDR         FDB header word.  Individual fields are  as
                            follows:


                            B0-B28      Reserved for DEC

                                        UNCHANGEABLE

                            B29-35(FB%LEN)
                                        Length of this file's FDB

                                        UNCHANGEABLE


       1     .FBCTL         B0(FB%TMP)  File is temporary.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      Y      Y

                            B1(FB%PRM)  File   is    permanent.     The
                                        contents  of  the  file  may be
                                        deleted, but the FDB may not.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      Y      Y

                            B2(FB%NEX)  File does not yet have  a  file
                                        type;   file  does  not  really
                                        exist.

                                        UNCHANGEABLE

                            B3(FB%DEL)  File is deleted.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      Y*     Y

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


       1     .FBCTL         B4(FB%NXF)  File does not exist  because it
             (Cont.)                    has not yet been closed.

                                        UNCHANGEABLE

                            B5(FB%LNG)  File is longer than 512 pages.

                                        UNCHANGEABLE

                            B6(FB%SHT)  Reserved for DEC.

                                        UNCHANGEABLE

                            B7(FB%DIR)  File is a directory.

                                        UNCHANGEABLE

                            B8(FB%NOD)  File is not to be saved by  the
                                        backup system.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         Y      Y      Y

                            B9(FB%BAT)  File may have one or  more  bad
                                        pages.  This bit indicates that
                                        I/O errors have occurred for  a
                                        page  (or  pages) of a file and
                                        the contents of these pages are
                                        suspect.

                                        This bit is  set  whenever  the
                                        system  has a disk I/O error on
                                        a page of an  open  file.   The
                                        faulty  disk  address  is  also
                                        added  to  the  list   in   the
                                        system's  BAT  blocks  for that
                                        disk structure.

                                        If an EXPUNGE is performed  for
                                        a  file for which bit FB%BAT is
                                        set,  the  system  performs  an
                                        additional   function   as   it
                                        releases the pages of the  file
                                        back  to the available resource
                                        pool:   it  checks  each   disk
                                        address in the file against the
                                        list  of  bad  regions  in  the
                                        structure's  BAT  blocks and if
                                        it finds  a  match,  it  leaves
                                        that page marked as "in use" in
                                        the bit map of  available  disk
                                        pages,  so that the faulty page
                                        is not reused.

                                        UNCHANGEABLE

       1     .FBCTL         B10(FB%SDR) Directory has subdirectories.
             (Cont.)
                                        UNCHANGEABLE

                            B11(FB%ARC) File   has   archive    status.
                                        Appropriate  words  in  the FDB
                                        (below) specify where the  file
                                        is archived.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      N      Y

                            B12(FB%INV) File is  invisible.   Invisible
                                        files can be seen only by using
                                        the G1%IIN option to GTJFN.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      Y      Y

                            B13(FB%OFF) File is offline.  This  is  set
                                        by  DELF  when  it  removes the
                                        contents from disk and  cleared
                                        when ARCF restores the contents
                                        to disk.

                                        JSYS        WRITE  OWNER  W/OPR

                                        DELF(S)       N      N      Y
                                        ARCF(C)       N      N      Y

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

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         Y      Y      Y

                            B18(FB%NDL) Do not delete  this  file.   Do
                                        not  delete even if overwritten
                                        by a write or a rename.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      N      Y
|  
|                           B19(FB%WNC) Last right not closed.
|  
|                           B20(FB%FOR) File  has  FORTRAN-style   line
|                                       printer     carriage    control
|                                       characters.

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


     Word    Symbol                          Meaning


       2     .FBEXL         Link to FDB of next file with the same name
                            but different file type.

                            UNCHANGEABLE

       3     .FBADR         Disk address of file index block.

                            UNCHANGEABLE

       4     .FBPRT         File access code.
                            LH:  500000

                            UNCHANGEABLE

                            RH:  file access bits.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      Y      N

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

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      N      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            GFUST(R)      Y      Y      Y
                            SFUST(SC)     N      Y      N

       7     .FBGEN         Generation and directory numbers of file.
                            LH(FB%GEN):  generation number of the file.

                                         UNCHANGEABLE

                            RH(FB%DRN):  monitor   internal   directory
                                         number of the file (only if B7
                                         of .FBCTL is on).

                                         UNCHANGEABLE

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

                            JSYS        WRITE  OWNER  W/OPR

                            SACTF         Y      Y      Y

      11     .FBBYV         File I/O information.

                            B0-B5(FB%RET)
                                        Number of generations to retain
                                        (retention   count).    If  two
                                        generations of  the  same  file
                                        have     different    retention
                                        counts, the count is taken from
                                        the  generation currently being
                                        used.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         Y      Y      Y

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

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         Y      Y      Y

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

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         Y      Y      Y

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

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      N      Y

      12     .FBSIZ         Number of bytes in  the  file.   (Refer  to
                            Section 2.2.11.)

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         Y      Y      Y

      13     .FBCRV         Date and time of creation of file.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         Y      Y      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         Y      Y      Y

      15     .FBREF         Date and time of last  nonwrite  access  to
                            file.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         Y      Y      Y

      16     .FBCNT         Count word.
                            LH:  number of writes to file.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      N      Y

                            RH:  number of references to file.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      N      Y

      17     .FBBK0         Used by DUMPER for backup purposes.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      N      Y

      20     .FBBK1         Reserved for DEC.

                            UNCHANGEABLE

      21     .FBBK2         Reserved for DEC

                            UNCHANGEABLE

      22     .FBBBT         The right half contains the number of pages
                            in  the file when the contents were deleted
                            from disk.

                            UNCHANGEABLE

                            The left half is  used  for  the  following
                            flags:

                            B1(AR%RAR)  User request for a file  to  be
                                        archived.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          Y      Y      Y

                            B2(AR%RIV)  System    request    for     an
                                        involuntary   migration   of  a
                                        file.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      N      Y

                            B3(AR%NDL)  Do not delete the  contents  of
                                        the  file  from  disk  when the
                                        archival is complete.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      Y      Y


                            B4(AR%NAR)  Resist  involuntary  migration.
                                        This  bit  is  a  note from the
                                        user  to  the   system   access
                                        control program asking that the
                                        file not be  moved  offline  if
                                        possible.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      Y      Y

                            B5(AR%EXM)  File is exempt from involuntary
                                        migration.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      N      Y

                            B6(AR%1ST)  First      pass      of      an
                                        archival-collection  run  is in
                                        progress.

                                        JSYS        WRITE  OWNER  W/OPR

                                        CHFDB         N      N      Y

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


     Word    Symbol                          Meaning

      22     .FBBBT         B7(AR%RFL)  Restore failed.  Set by ARCF to
             (Cont.)                    to indicate that the restore it
                                        is waiting for has failed.

                                        JSYS        WRITE  OWNER  W/OPR

                                        ARCF          N      N      Y

                            B10(AR%WRN) Generate a message warning that
                                        the  file's off-line expiration
                                        date is approaching.

                            7B17(AR%RSN)
                                        Reason file was moved offline:
                                        .AREXP(1)   file expired
                                        .ARRAR(2)   archiving was
                                                    requested
                                        .ARRIR(3)   migration was
                                                    requested

                                        JSYS        WRITE  OWNER  W/OPR
                                        ARCF(W)       N      N      Y
                                        GTFDB(R)      Y      Y      Y

                                        ts10,25,37,49,56,63
                            B18-B35(AR%PSZ)
                                        The right half of .FBBBT is
                                        used to store the number
                                        of pages in a file when the
                                        contents were removed from
                                        disk.

                                        JSYS        WRITE  OWNER  W/OPR
                                        ARCF(W)       N      N      Y
                                        GTFDB(R)      Y      Y      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            SFTAD         N      Y      Y

      24     .FBUSW         User-settable word.

                            JSYS        WRITE  OWNER  W/OPR

                            CHFDB         N      Y      Y

      25     .FBGNL         Address of FDB for next generation of file.

                            UNCHANGEABLE

      26     .FBNAM         Pointer to filename block.

                            UNCHANGEABLE

      27     .FBEXT         Pointer to file type block.
                            UNCHANGEABLE

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

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

                            JSYS        WRITE  OWNER  W/OPR

                            GFUST(R)      Y      Y      Y
                            SFUST(CS)     N      N      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            ARCF          N      N      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            SFTAD         Y      Y      Y



      33     .FBTP1         Contains the tape ID for the first archive
                            or collection run.

                            JSYS        WRITE  OWNER  W/OPR
                            ARCF          N      N      Y

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

                            JSYS        WRITE  OWNER  W/OPR

                            ARCF          N      N      Y

      35     .FBTP2         Tape ID for second archive or collection
                            run.  Otherwise
                            similar to .FBTP1.

                            JSYS        WRITE  OWNER  W/OPR

                            ARCF          N      N      Y

       36    .FBSS2         Saveset and tape file numbers for the
                            second archive 
                            or collection run.  Otherwise similar to
                            .FBSS1.

                            JSYS        WRITE  OWNER  W/OPR

                            ARCF          N      N      Y


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



	-TTY-MAGIC-BITS [ 2.3.9  Terminal (TTY:) ]

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


   The following status bits are defined for TTY's.

   Bit       Symbol                         Meaning

   B35       GD%PAR    The TTY will tolerate a parity bit.   Any  program
                       producing  binary  output  for  a TTY should check
                       this bit to determine if it should  apply  parity.
                       If parity is to be applied, the TTY must be opened
                       with  an  8-bit  bytesize;   otherwise,  a   7-bit
                       bytesize must be used.

                       DECNET NVT's will not accept a parity bit.


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


                                    Table 2-9
                                  JFN Mode Word


     Bit    Symbol  Changed by                 Function


     0      TT%OSP     SFMOD   output   suppress   control    (1=ignore
                               output;  0=allow output)
     1      TT%MFF     STPAR   has mechanical form feed
     2      TT%TAB     STPAR   has mechanical tab
     3      TT%LCA     STPAR   has lower case
     4-10   TT%LEN     STPAR   page length
     11-17  TT%WID     STPAR   page width
     18-23  TT%WAK     SFMOD   wakeup control on:
                               B18: not used
            TT%IGN             B19: ignore the other TT%WAK bits
            TT%WKF             B20: formatting control character
            TT%WKN             B21: non-formatting control character
            TT%WKP             B22: punctuation character
            TT%WKA             B23: alphanumeric character
     24     TT%ECO     SFMOD   echos on
     25     TT%ECM     STPAR   echo mode
     26     TT%ALK     TLINK   accept links
     27     TT%AAD     TLINK   accept advice
     28-29  TT%DAM     SFMOD   terminal data mode
            .TTBIN             00:  no translation
            .TTASC             01:  translate both echo and output
            .TTATO             10:  translate output only
            .TTATE             11:  translate echo only
     30     TT%UOC     STPAR   upper case output control
                               0:   do not indicate
                               1:   indicate by 'X
     31     TT%LIC     STPAR   lower case input control
                               0:   no conversion
                               1:   convert lower to upper
     32-33  TT%DUM     STPAR   duplex mode
            .TTFDX             00:  Full duplex
            .TTHDX             10:  Character half duplex
            .TTLDX             11:  Line half duplex
                               01:  Reserved for DEC
     34     TT%PGM     STPAR   pause-on-command     mode      (1=enable
                               pause-on-command     mode,     0=disable
                               pause-on-command mode.)

                               This   function   enables/disables   the
                               TOPS-20  feature  that  allows a user to
                               manually stop TTY  output  with  ^S  and
                               resume  it  with ^Q.  See MTOPR function
                               .MOXOF for pause-at-end-of-page mode.
     35     TT%CAR             system carrier state;  on if line  is  a
                               dataset and the carrier is on.


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

   Bits 1, 2, and 3 (TT%MFF, TT%TAB, and TT%LCA) define  several  of  the
   mechanical  capabilities of the terminal and affect character handling
   on both input and output.  Form feeds and tabs are  simulated  if  the
   terminal  does  not  have  the  required  mechanical capability, or if
   simulation has been requested by the SFCOC call.

   Bits 4-10 (TT%LEN) determine the number of  line  feeds  necessary  to
   simulate  a  formfeed,  or  the  number of lines to fit on the display
   screen.   A  0  value  means  the  declared  length  of  the  page  is
   indefinitely large.

   Bits 11-17 (TT%WID) determine the point at which the output line  must
   be  continued  on  the  next  line by inserting a carriage return-line
   feed.  If 0, no line folding occurs.

   Bits 18-23 (TT%WAK) define the particular class  of  characters  that,
   when  input  from the terminal, will wake up a waiting program.  Refer
   to Section 2.4.9.3 for the definitions of the  wakeup  classes.   Note
   that  the  class-wakeup  scheme  is  maintained for compatibility with
   older programs.  Newer programs should use the .MOSBM function of  the
   MTOPR JSYS as it has more resolution and causes less system load.

   Bit 24 (TT%ECO) defines if echos are to be given.  If this bit is off,
   echoing is turned off.  This is useful when the program is accepting a
   password or is simulating non-standard echoing procedures.

   Bit 25 (TT%ECM) defines when the echo will occur.  If this bit is off,
   the  echo  will  occur when the program reads the character.  That is,
   the echo occurs immediately if the program is waiting for input or  is
   deferred  if  the  program  is  not  waiting  for  input.  This is the
   standard echo mode  which  produces  a  correctly  ordered  typescript
   (i.e.,  program  input  and  output  appear in the order in which they
   occurred).  If this bit  is  on,  the  echo  occurs  as  soon  as  the
   character  is  typed.  Note that this mode may cause editing to appear
   out of order on  the  typescript.   This  occurs  because  editing  is
   performed  as the program reads the character and not necessarily when
   the echo occurs.

   Bits 28-29 (TT%DAM) define the terminal data mode.  The four  possible
   data modes are:

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

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

        10   Disable the translation of  echo  (.TTATO).   In  all  other
             respects, same as .TTASC.

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


   The last two data modes allow the  user  to  selectively  disable  the
   translation   of   control  characters  for  input  or  output.   When
   translation  is  disabled,  control  characters   are   always   sent.
   Simulation  of  formatting  control  characters  is still performed if
   requested by  the control  words  of the RFCOC or SFCOC JSYS or if the
   device   does  not  have  the  required  mechanical  capability.   The
   translation  typically  results  in  some  control  characters   being
   indicated  by  graphics  instead  of  being  sent as is.  For example,
   disabling the translation of output characters is appropriate for some
   display  terminals  when  the  program  must send untranslated control
   characters to control the  display,  but  requires  that  the  control
   characters typed by the user be indicated in the usual way.

   Bit 30 (TT%UOC) specifies that upper case terminal  output  is  to  be
   indicated  by 'X (single quote preceding character that is upper case)
   if TT%LCA is not set.  This is primarily intended for  terminals  that
   are not capable of lower case output.

   Bit 31 (TT%LIC) specifies that lower case  terminal  input  is  to  be
   translated  to  upper  case  and  that  codes  175  and  176 are to be
   converted to code 33.  This is useful for older  terminals  that  send
   codes 175 or 176 in response to the ALT or ESC key.

   Bits 32-33 (TT%DUM) define the three duplex modes presently available.
   Full  duplex  (.TTFDX) requires the system to generate the appropriate
   echo for each character typed  in.   Character  half  duplex  (.TTHDX)
   assumes  the  terminal  will  internally echo each character typed but
   will require an additional echo  for  formatting  characters  such  as
   carriage  return.   Line  half duplex (.TTLDX) is similar to character
   half duplex but does not generate a line feed echo  after  a  carriage
   return.

   Bit 34 (TT%PGM) specifies the output mode.  In display mode, the  user
   can  create  a  pause in the output while he reads material that would
   otherwise quickly disappear off the screen.   The  output  is  stopped
   with  the  CTRL/S  character  and  started  with the CTRL/Q character.
   Also, output automatically  stops  whenever  a  page,  as  defined  by
   TT%LEN, has been output;  output is resumed with CTRL/Q.

   Bit 35 (TT%CAR) indicates  the  carrier  state.   If  the  line  is  a
   dataset,  this  bit  is on if the carrier is on.  If the line is not a
   dataset, this bit is undefined.



   2.3.9.2  Control Character  Output  Control - Each  terminal  has  two
   control  character output control (CCOC) words.  Each word consists of
   2-bit bytes, one byte for each of the control characters (ASCII  codes
   0-37).  The bytes are interpreted as follows:

        00:  ignore (send nothing)
        01:  indicate by ^X (where X is the character)
        10:  send character code
        11:  simulate format action

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


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

        F  formatting control character
        C  non-formatting control character
        P  punctuation character
        A  alphanumeric character

   Refer to Section 2.3.9.2 for the explanation of the control  character
   output control (CCOC) words.

   The following table lists the wakeup classes for the TOPS-20 character
   set (ASCII):


                                   Table 2-10
                          Wakeup Classes/CCOC Word Bits


     ASCII     Wakeup    CCOC        Character or Control Character
     code      class     word(bits)  


        0        C       1(B0,1)     Ctrl/@  null,break
        1        C       1(B2,3)     Ctrl/A
        2        C       1(B4,5)     Ctrl/B
        3        C       1(B6,7)     Ctrl/C
        4        C       1(B8,9)     Ctrl/D
        5        C       1(B10,11)   Ctrl/E
        6        C       1(B12,13)   Ctrl/F
        7        C       1(B14,15)   Ctrl/G  bell
       10        F       1(B16,17)   Ctrl/H  backspace
       11        P       1(B18,19)   Ctrl/I  horizontal tab
       12        F       1(B20,21)   Ctrl/J  line feed
       13        C       1(B22,23)   Ctrl/K  vertical tab
       14        F       1(B24,25)   Ctrl/L  form feed
       15        F       1(B26,27)   Ctrl/M  carriage return
       16        C       1(B28,29)   Ctrl/N
       17        C       1(B30,31)   Ctrl/O
       20        C       1(B32,33)   Ctrl/P
       21        C       1(B34,35)   Ctrl/Q
       22        C       2(B0,1)     Ctrl/R
       23        C       2(B2,3)     Ctrl/S
       24        C       2(B4,5)     Ctrl/T
       25        C       2(B6,7)     Ctrl/U
       26        C       2(B8,9)     Ctrl/V
       27        C       2(B10,11)   Ctrl/W
       30        C       2(B12,13)   Ctrl/X
       31        C       2(B14,15)   Ctrl/Y
       32        C       2(B16,17)   Ctrl/Z
       33        All     2(B18,19)   Escape (Altmode)
       34        C       2(B20,21)   Ctrl/Backslash
       35        C       2(B22,23)   Ctrl/Right Square Bracket
       36        CxD     2(B24,25)   Ctrl/Uparrow
       37        F       2(B26,27)   Ctrl/Backarrow
       40        P                    Space
       41        P                    !
       42        P                    "
       43        P                    #
       44        P                    $
       45        P                    %
       46        P                    &
       47        P                    '
       50        P                    (
       51        P                    )
       52        P                    *
       53        P                    +
       54        P                    ,
       55        P                    -
       56        P                    .
       57        P                    /
       60-71     A                    0-9
       72        P                    :
       73        P                    ;
       74        P                    <
       75        P                    =
       76        P                    >
       77        P                    ?
      100        P                     @
      101-132    A                     Upper Case Letters A-Z
      133        P                     [
      134        P                     \
      135        P                     ]
      136        P                     ^
      137        P                     _
      140        P                     Accent (Grave)
      141-172    A                     Lower Case Letters a-z
      173(1)     P                     Left Brace
      174(1)     P                     Vertical Bar
      175(1)     P                     Right Brace
      176(1)     P                     Tilde
      177        All                   Delete (Rubout)



                                    NOTE


                  1.  Escape(33)   and   Delete(177)   are
                      considered   to  be  in  all  wakeup
                      classes.

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

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




   2.3.9.4  Terminal  Characteristics  Control - The  various  types   of
   terminals   have  different  characteristics  for  output  processing,
   depending on their type and speed.  The characteristics  that  can  be
   associated with terminals are:

        1.  Mechanical form feed and tab

        2.  Lower case

        3.  Padding after carriage return

        4.  Padding after line feed

        5.  Padding after mechanical tab

        6.  Padding after mechanical form feed

        7.  Page width and length

        8.  Cursor commands

   Instead of setting each of these parameters for his line, the user can
   specify   a   terminal  type  number,  which  causes  the  appropriate
   parameters to be set.  Refer to the STTYP monitor call.   The  defined
   terminal types, along with their characteristics, are listed below.


                                   Table 2-11
                            Terminal Characteristics


     Number    Terminal    Symbol             Characteristics


        0    TTY model 33  .TT33    no mechanical form feed or tab, has
                                    upper  case  only, no padding after
                                    carriage  return  and  line   feed,
                                    padding  after  tab  and form feed,
                                    page width 72, page length 66

        1    TTY model 35  .TT35    has mechanical form feed  and  tab,
                                    has  upper  case  only,  no padding
                                    after  carriage  return  and   line
                                    feed,  padding  after  tab and form
                                    feed, page width 72, page length 66

        2    TTY model 37  .TT37    no mechanical  form  feed  or  tab,
                                    lower   case,   no   padding  after
                                    carriage  return  and  line   feed,
                                    padding  after  tab  and form feed,
                                    page width 72, page length 66

        3    TI/EXECUPORT  .TTEXE   no mechanical  form  feed  or  tab,
                                    lower  case, padding after carriage
                                    return only  page  width  80,  page
                                    length 66

        4-7                         reserved for customer


|       8     Default      .TTDEF   no mechanical  form  feed  or  tab,
|                                   lower   case,  full  padding,  page
|                                   width 72, page length 66
|  
|       9     Ideal        .TTIDL   has mechanical form feed  and  tab,
|                                   lower    case,   no   padding,   no
|                                   specified width and length
|  
|       10    VT05         .TTV05   no  mechanical   form   feed,   has
|                                   mechanical   tab,  has  upper  case
|                                   only,  no  padding  after  carriage
|                                   return  and tab, padding after line
|                                   feed and form feed, page width  72,
|                                   page length 20, has cursor commands
|  
|       11    VT50         .TTV50   no mechanical form feed or tab, has
|                                   upper  case  only, no padding, page
|                                   width  80,  page  length  12,   has
|                                   cursor commands
|  
|       12    LA30         .TTL30   no mechanical form feed or tab, has
|                                   upper case only, full padding, page
|                                   width 80, page length 66
|  
|       13    GT40         .TTG40   no mechanical  form  feed  or  tab,
|                                   lower  case, no padding, page width
|                                   80, page length 30
|  
|       14    LA36         .TTL36   no mechanical  form  feed  or  tab,
|                                   lower  case, no padding, page width
|                                   132, page length 66
|  
|       15    VT52         .TTV52   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24
|  
|       16    VT100        .TT100   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24, has cursor commands
|  
|                                   When  used  in   VT52   mode,   the
|                                   terminal  type  should  be  set  to
|                                   .TTV52.
|  
|       17    LA38         .TTL38   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding,  page  width   132,   page
|                                   length 66
|
|       18    LA120        .TT120   has mechanical form feed  and  tab,
|                                   lower  case, no padding, page width
|                                   132, page length 60
|  
|       35    VT125        .TT125   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24,   has   cursor   commands   and
|                                   graphics capabilities
|  
|       36    VK100        .TTK10   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 84, page length
|                                   24,  has  cursor commands and color
|                                   graphics capabilities
|  
|       37    VT102        .TT102   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24, has cursor commands
|  
|       39    VT131        .TT131   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24, has cursor commands
|  
|       40    VT200 series .TT200   no  mechanical   form   feed,   has
|                                   mechanical   tab,  lower  case,  no
|                                   padding, page width 80, page length
|                                   24,   has  cursor  commands;   some
|                                   models may have additional features


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

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

             10     .GSIMG   Image mode - allows buffered byte and string
                             I/O,   but   disables   format  control  and
                             simulation  and   translation   of   control
                             characters.  On input, if the byte size is 8
                             bits, a parity bit (odd)  is  returned  with
                             the   character.   The  parity  bit  is  the
                             high-order bit.  On  output,  attempting  to
                             send an 8-bit byte that has incorrect parity
                             may cause a  device  error.   However,  most
                             terminals ignore a user-supplied parity bit.

                             This mode can cause some  reduction  in  the
                             CPU  time  charged  to  a  job for doing TTY
                             output.  The reduction  is  small,  however,
                             for  TTY input.  This is because the average
                             process outputs many more characters than it
                             inputs  (the  average ratio is approximately
                             20  characters  output  for  each  character
                             input).



	-System-Tables   (section 2.2.2)

   The contents of several system tables are available  to  programs  for
   such  purposes  as  generating  status  reports  and collecting system
   performance statistics.  Each table is identified by a fixed  name  of
   up  to  six  characters, and consists of a variable number of entries.
   The -1 entry in each table is the  negative  of  the  number  of  data
   entries  in  the  table;   the data entries are identified by an index
   that increments from 0.

   Two calls exist for accessing tables.  The  first,  SYSGT,  accepts  a
   table  name  and returns the table length, its first data entry, and a
   number identifying the table.  The second, GETAB,  accepts  the  table
   number  returned  by  SYSGT,  or  obtained  from  the MONSYM file, and
   returns additional entries from the table.

   The system tables are as follows.  Numeric table indexes are given  in
   octal.   Parallel  tables,  those  for  which  a  given index produces
   related information, are indicated by  "(Pn)"  where  n  is  a  unique
   number for that set of parallel tables.


                                    Table 2-2
                                  System Tables


      Name     Index                            Contents


     APRID                         Processor serial number

     BLDTD                         Date and time system was generated

     DBUGSW                        Debugging information

               0                   state of operator coverage
                                   0 = unattended
                                   1 = attended
                                   2 = debugging
               1                   state of BUGCHK handling
                                   0=proceed
                                   1=breakpoint

     DEVCHR    (P1)                Device  characteristics   word,   as
                                   described  under  the  DVCHR JSYS in
                                   Chapter 3, except that B5 (DV%AV) is
                                   not meaningful.

     DEVNAM    (P1)                SIXBIT device  name  including  unit
                                   number, e.g., MTA3

     DEVUNT    (P1)           LH:  Job  number  to  which   device   is
                                   assigned   (with  ASND),  or  -1  if
                                   device is not  assigned,  or  -2  if
                                   reserved for device allocator.
                              RH:  unit number, or -1 if device has  no
                                   units (e.g., DSK:)


     DRMERR                        Information on drum errors

               0                   number of recoverable errors
               1 to n              varies depending  on  type  of  drum
                                   being used


     DSKERR                        Information on disk errors

               0                   number of recoverable disk errors
               1 to n              varies depending  on  type  of  disk
                                   being used

     DWNTIM                        Downtime information

               0                   date and time when  system  will  be
                                   shut down next
               1                   date  and  time  when  system   will
                                   subsequently be up

     HQLAV                         High queue load averages


     IMPLT1    c(P2)               ARPANET - 1 fullword for each link:

                              LH:  internal  connection  number,  index
                                   for:

                                   NETAWD
                                   NETBAL
                                   NETBTC
                                   NETBUF
                                   NETFSK
                                   NETLSK
                                   NETSTS

                                   or -1 if control link

                              RH:  B18-19  00  receive
                                           10  send
                                           11  free
                                           01  delete
                                   B20-27  host number
                                   B28-35  link number

                                           c (index)  is  derived  from
                                           bits 24-35 of NETAWD.

     IMPLT2    c(P2)               ARPANET - 1 fullword for each link:

                              LH:  B0-9    flags
                                   B10-17  byte size of buffer
                              RH:  address of input buffer

                                   c (index) is derived from bits 24-35
                                   of NETAWD.

     IMPLT3    c(P2)               ARPANET - 1 fullword for each link:

                              LH:  address of output buffer
                              RH:  message saved for retransmission

                                   c (index) is derived from bits 24-35
                                   of NETAWD.

     IMPLT4    c(P2)               ARPANET - 1 full word for each link

                              LH:  address of current buffer
                              RH:  message allocation in bits

                                   c (index) is derived from bits 24-35
                                   of NETAWD.

     JBONT     Job #               Owning job for CRJOB-created jobs.

     JOBNAM    Job #          LH:  reserved for DEC
                              RH:  index into the system program tables
                                   for the system program being used by
                                   this job  (determined  by  the  last
                                   SETSN call executed by the job)

     JOBPNM    Job #               SIXBIT name of  program  running  in
                                   this job

     JOBRT     Job #               CPU  time used by the job  (negative
                                   if no such job)

     JOBTTY    Job #          LH:  controlling terminal line number, or
                                   -1 if none (i.e., job is detached)
                              RH:  reserved for DEC

     LOGDES                        Logging information

               0                   designator for logging information

               1                   designator  for  job  0  and   error
                                   information

     LQLAV                         Low queue load averages

     NETHST    c(P2)               ARPANET  -  1  full  word  for  each
                                   internal connection:

                                   -1 if no foreign host, otherwise the
                                   same as IMPLT5.

                                   c (index) is derived from bits 24-35
                                   of NETAWD.

     NETAWD    c(P2)               ARPANET  -  1  full  word  for  each
                                   internal connection:

                                   B0-8    link number
                                   B9-17   unused
                                   B18-23  timeout countdown

                                   B24-35 index to link tables

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

     NETBAL    c(P2)               ARPANET - number of  bits  allocated
                                   to each internal connection

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

                                Table 2-2 (Cont.)
                                  System Tables


      Name     Index                            Contents


     NETBTC    c(P2)               ARPANET  -  byte  count  statistics:
                                   the  number of bits sent or received
                                   over each internal connection  since
                                   the socket was created.

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

     NETBUF    c(P2)               ARPANET  -  1  fullword   for   each
                                   internal connection:

                              LH:  bytes per buffer
                              RH:  buffer location -1

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

     NETFSK    c(P2)               ARPANET - foreign socket number  (32
                                   bits) for each internal connection

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

     NETLSK    c(P2)               ARPANET - local  socket  number  for
                                   each internal connection

                                   c  (index)  is  internal  connection
                                   (see IMPLT1).

     NETRDY                        ARPANET operational status table

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

|    MONVER                        Monitor version number (contents  of
|                                  location 137)

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

     NSWPGS                        Default swapping pages

     PTYPAR                        Pseudo-TTY parameter information

                  0           LH:  number of PTYs in system
                              RH:  TTY number of first PTY

     QTIMES    0 to n              Accumulated runtime of jobs on the n
                                   scheduler queues

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

     SNBLKS    (P3)                Number of  samples  in  working  set
                                   size integral

     SPFLTS    (P3)                Total  number  of  page  faults   of
                                   system program

     SSIZE     (P3)                Time integral of working set size

     STIMES    (P3)                Total runtime of system program

     SYMTAB                        SIXBIT  table  names  of  all  GETAB
                                   tables

     SYSTAT                        Monitor statistics.  The entries  in
                                   this table are as follows:

               0                   time with no runnable jobs
               1                   waiting time with 1 or more runnable
                                   jobs (waiting for page swapping)
               2                   time spent in scheduler
               3                   time spent processing pager traps
               4                   number of drum reads
               5                   number of drum writes
               6                   number of disk reads
               7                   number of disk writes
               10                  number of terminal wakeups
               11                  number of terminal interrupts
               12                  time integral of number of processes
                                   in the balance set
               13                  time integral of number of  runnable
                                   processes
               14                  exponential  1-minute   average   of
                                   number of runnable processes
               15                  exponential  5-minute   average   of
                                   number of runnable processes
               16                  exponential  15-minute  average   of
                                   number of runnable processes
               17                  time integral of number of processes
                                   waiting for the disk
               20                  time integral of number of processes
                                   waiting for the drum
               21                  number of terminal input characters
               22                  number of terminal output characters
               23                  number  of  system  core  management
                                   cycles
               24                  time spent doing postpurging
               25                  number of forced balance set process
                                   removals
               26                  time integral of number of processes
                                   in swap wait
               27                  scheduler  overhead  time  (same  as
                                   entry 2) in high precision units
               30                  idle time (same as entry 0) in  high
                                   precision units
               31                  lost time (same as entry 1) in  high
                                   precision units
               32                  user time
               33                  time integral of number of processes
                                   on  high queue.  (High queue is high
                                   priority, low numerical value.)
               34                  time integral of number of processes
                                   on  low  queue.   (Low  queue is low
                                   priority, high numerical value.)
               35                  sum of process disk-write waits
               36                  number  of  forced  adjustments   to
                                   balance set
               37                  integral of number of reserve  pages
                                   of all processes in memory
               40                  integral  of  number  of  pages   on
                                   replaceable  queue.  The replaceable
                                   queue contains pointers to all  free
                                   memory pages.
               41                  high precision pager trap time
               42                  number of context switches
|              43                  high   precision   time   spent   on
|                                  background   tasks.    These   tasks
|                                  include low-level data  transfer  in
|                                  communications   layers,   including
|                                  network   and    terminal    service
|                                  routines.
               44                  total system page traps
               45                  total saves from replacement  queue.
                                   A  "save" occurs when a desired page
                                   is found on  the  replacement  queue
                                   and need not be paged in.
               46                  number of pages removed from  memory
                                   during      system-wide      garbage
                                   collection
               47                  integral of number of  working  sets
                                   in memory
|              50                  wait time without swap waits in high
|                                  precision units
               51                  count of working set loads
               52                  count of runable  processes  removed
                                   from balance set
               53                  number of pages removed from  memory
                                   during      process-wide     garbage
                                   collection
|              54                  count of terminal input wakeups
|              55                  count   of   read-after-write   disk
|                                  verifications

                                                   NOTE

                                       This  table  is  subject  to
                                       change  (usually  additions)
                                       as  measuring  routines  are
                                       added to the system.


     SYSVER                        An  ASCIZ  string  identifying   the
                                   system name, version, and date.  The
                                   string has the following format:

                                   string, TOPS-20 Monitor n.m(o)-p

                                   where    "string"    is   the   text
                                   contained      in      the      file
                                   structure:<SYSTEM>MONNAM.TXT, "n" is
                                   the  major  version  number  (1 to 3
                                   digits), "m" is  the  minor  version
                                   number  (0  to 2 digits), "o" is the
                                   edit number (1 to 6 digits), and "p"
                                   is the number of the group that last
                                   edited the version (0 or 1 digit).

                                   If "m" is zero, it and its preceding
                                   period are omitted.  If "p" is zero,
                                   it  and  its  preceding  hyphen   is
                                   omitted.   Otherwise, the period and
                                   the hyphen are stored along with the
                                   other   information,  including  the
                                   spaces and parentheses as shown,  in
                                   the table.

     TICKPS                        One-word table containing number  of
                                   clock ticks per second.

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

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


   The system program being run by a specific job may be determined  from
   SNAMES, using an index obtained from table JOBNAM.
MONRD

                       MONRD%     JSYS 717


The MONRD% is used by non-privileged program to obtain  information  from
the JSB, PSB, a monitor symbol (restricted set of), and fork status.

ACCEPTS IN AC1:  function code

     AC2 through AC4:  dependent on the function (see description below)

RETURNS     +1:  always

Code  Symbol                         Meaning

  0   .RDTST     The test function is used in order to see if the MONRD%
                 JSYS is  implemented.  If  implemented, the  JSYS  will
                 return a value of .TSTNY  (123456 octal) if the  MONRD%
                 JSYS can  be executed  by anybody,  and .TSTNN  (654321
                 octal)  if  the  user  must  have  WHEEL  or   OPERATOR
                 capabilities enabled.  (AC2 must be zero.)

  1   .RDSYM     The read symbol function will get the  definition  (the
                 address  in  the  monitor) of the SIXBIT symbol in AC1.
                 If successful AC2 will contain the  definition  of  the
                 symbol.

  2   .RDJSB     The read JSB function allows you to read the contents a
                 word  in  the  JSB  (Job  Storage  Block).  The word is
                 referenced by an  offset  (contained  in  AC3)  from  a
                 symbol  (the  SIXBIT  value  of  which is in AC2).  AC4
                 contains the  job  number.   (Symbols  implemented  are
                 listed  below.)  On  successful return AC2 will contain
                 the contents of that word.

  3   .RDPSB     The read  PSB  function  is  the  same  as  the  .RDJSB
                 function except that it allows you to read from the PSB
                 (Proccess Storage Block) and not the JSB.  AC4 contains
                 the system fork number.

  4   .RDSTS     The read fork status function  returns  the  same  fork
                 information  as  the RFSTS JSYS in AC2 (if successful).
                 AC2 (on entry) contains the absolute fork  number  (not
                 relative fork handle) of the fork in question.

  5   .RDMAP     The read fork map function reads the access of a user
                 core page, given a page number (in AC2) and a system
                 fork number (in AC3). On a successful return, AC2
                 contains a page pointer:

	0		This page and all further pages are nonexistant
	0,,N		This page nonexistant, next existant page is N
	1XXXXX,,XXXXXX	Private page
	2XXXXX,,Fork	Shared page with given system fork index
	2XXXXX,,-OFN	Shared page with given file ofn
	3XXXXX,,Fork	Indirect page with given fork index
	3XXXXX,,-OFN	Indirect page with given file ofn

  6   .RDFST     The read fork status function, given a system fork
                 number (in AC2), returns the FKSTAT word for that
                 fork in AC2.  (This word is displayed by SYSDPY as
                 the scheduler test.)

  7   .RDPID     The read IPCF header function reads a word from the
                 header of a PID (given in AC2; the offset into the
                 header should be in AC3).

 10   .RDDLL     The read DECNET function dumps out the DECnet logical
                 link blocks into core. The right half of AC2 should
                 contain the address of a block into which to dump the
                 links, and the left half should contain the length of
                 the block.  The size of each link will be returned in
                 the left half of AC2, and the number of links will be
                 returned in the right half.

 11   .RDTTY     The read terminal database function gets a word from
                 the TTACTL data table.  AC2 should contain a symbol
                 name, AC3 the offset from the symbol, and AC4 the
                 terminal number.  The given word in the table will be
                 returned in AC2.

 12   .RDTTS     The read TTSTAT word function reads the terminal
                 characteristics word for a terminal (number given in
                 AC2) and returns it in AC2.

 13   .RDWSP     The read FKWSP word function, given a system fork
                 number in AC2, returns the FKWSP word for that fork
                 in AC2.  This word contains in the right half the
                 number of physical pages currently assigned to each
                 fork, and in the left half the preload size of the
                 fork when it enters the balance set.

 14   .RDRES     The read system resource status function, called with
                 the type of resource in AC2, returns the initial
                 value of the resource in AC3, and the current calue
                 in AC2.  Defined pools are:

	0    Total frdee resident blocks
	1    Swappable storage
	2    ENQ blocks
	3    Swappable network (DECnet core)
	4    Number of OFNs
	5    SPT slots
	6    Swapping pages
	7    Pages of user core used
       10    Number of forks used

Function:  Test  Read symbol  Read JSB   Read PSB  Fork status  Read page map
 AC1:     .RDTST  .RDSYM       .RDJSB     .RDPSB     .RDSTS        .RDMAP
 AC2:        0   sym-name     sym-name   sym-name  sys-fork-#      page-#
 AC3:       --      --         offset     offset       --        sys-fork-#
 AC4:       --      --          job-#   sys-fork-#     --            --

Function:  FKStat     IPCF  Decnet link   TTY Data  TTStat   FKWSP    Resources
 AC1:      .RDFST    .RDPID   .RDDLL       .RDTTY   .RDTTS   .RDWSP    .RDRES
 AC2:    sys-Fork-#    PID  -length,,buf  sym-name  tty-#  sys-fork-#   pool
 AC3:        --      offset     --         offset     --       --        --
 AC4:        --        --       --          tty-#     --       --        --

where:  sym-name is the SIXBIT value of the symbol to look for; sys-fork-#  is
        an absolute fork number; offset is the offset (from the symbol  name);
        job-# is the job number of the whose JSB or PSB to look at; length  is
        the size of the buffer to store the information in; pool is the number
        of the system resource pool, and tty-# is the terminal number (not tty
        designator) to get information for.

                       Table of Symbols for MONRD%

        CAPENB  CAPMSK  DSKDTB  FILBYN  FILBYT  FILDDN  FILDNM  FILNEN
        FILSTS  FILVER  FILOFN  FILDEV  FKCNT   FKPTRS  FKRT    INTDF
        JOBNO   JSVAR   JSVARZ  KIMUU1  LSTERR  MAXJFN  MLJFN   NUFKS
        PPC     PSVAR   PSVARZ  RESQTL  RSCNBP  SYSFK   TRAPPC  TTFLG1
        TTFLGS  TTICT   TTLINK  TTOCT   UPDL    UTRPCT

Generates illegal instruction interrupt if not implemented.

<GTWAA>

			GTWAA%  JSYS 702

Get weekly account allocation information.  NOTE:  this is a temporary
jsys, and may not be defined in future releases.

ACCEPTS IN AC1:  directory or user number.

	   AC2:  function bits in left half,length of argument block
		 in the right.

		  B0	(wa%rd)  Get allocation information and store in
				 data block.  Note: if both wa%rd and wa%in
				 are set, the new information is returned in
				 the argument block.

		  B1	(wa%wr)  Update allocation information from data block.
	
		  B2	(wa%in)  Increment allocation information from data
				 block.  Note: if both wa%wr and wa%in are
				 set, wa%in is ignored.

	   AC3:   address of argument block

RETURNS:   +1:   Always, with B17 (wa%ft) of AC2 set if current time is in the
		 "free time" block.

This is a temporary jsys, and may not be defined in future releases.
The argument block may be up to eighteen words in length. Its format
is given below.

	.WALW==:0		weekly console (login) allocation
	.WACW==:1		weekly cpu allocation
	.WAPW==:2		weekly pages-printed allocation
	.WALA==:3		this week's console (login) allocation
	.WACA==:4		this week's cpu allocation
	.WAPA==:5		this week's pages-printed allocation
	.WALC==:6		console time charged this week
	.WACC==:7		cpu time charged
	.WAPC==:10		pages charged
	.WALU==:11		console time used (cumulative this week)
	.WACU==:12		cpu time used (cumulative this week)
	.WAPU==:13		pages used (cumulative this week)
	.WALQ==:14		console time chargeable (cumul. this quarter)
	.WACQ==:15		cpu time chargeable (cumulative this quarter)
	.WAPQ==:16		pages chargeable (cumulative this quarter)
	.WALT==:17		console time used (cum. this quarter)
	.WACT==:20		cpu time used (cum. this quarter)
	.WAPT==:21		pages printed (cum. this quarter)

GTWAA% ERROR MNEMONICS:

ILINS2: Undefined JSYS

CAPX1:  WHEEL or OPERATOR capability required

GTWAX1: Invalid function code

GTWAX2: Invalid argument block length

STRX02: Insufficient system resources

DELFX6:	Internal format of directory is incorrect

DATEX6: System date and time are not set


<IDLE>

			IDLE%  JSYS 701

Determines the idle time of a job.

ACCEPTS IN AC1:	 job number

RETURNS:   +1:	 always, with the number of milliseconds since any fork
		 of the job was last in the run queue in AC1.

IDLE% ERROR MNEMONICS:

ARGX08:	No such job

<HANDS>

			HANDS%  JSYS 700

Used to access system tables efficiently.  Accepts a list of monitor
tables to be returned in their entirety to the user.

ACCEPTS IN AC1:	 Negative length of table in left half, address of table
		 in right half

RETURNS:    +1:	 Always, with the entirety of the specified system tables
		 transferred to the user's area.

The table entries are of the form <table number>,,<destination address>.

HANDS% ERROR MNEMONICS:

ARGX17:	Invalid argument block length

GTABX1:	Invalid table number

GTABX3:	GETAB capability required

PKOPR%

	PKOPR% (PacKet OPeRations) is a Stanford TOPS-20 monitor call for
performing network dependent packet (datagram) manipulations.  Although use
with the MEIS based Ethernet was its original motivation, the actual
implementation is general enough to handle datagram traffic on a number of
common transport mediums.

	PKOPR% is intended for implementing network protocols without
resorting to kernel development and its attendant problems.  Minor or
experimental protocols can be implemented with relative ease.  Network
monitoring and diagnostic software can also be developed using PKOPR%

	The concept of a triple of network type (transport medium), logical
network interface number, and protocol type is central to the PKOPR%
implementation.  One process on the host system signs up to receive
datagrams for one or more triples.  The datagrams are then processed by the
receiving process or are distributed to other processes. Other processes are
allowed to transmit datagrams for that particular triple.
PKOPR% (JSYS 703) has the following arguments in the AC's.

	AC1/ function code
	AC2/ argument block address
	AC3/ reserved, should be zero
	AC4/ reserved, should be zero

PKOPR% returns +1 always, illegal instruction interrupt on error.

The following function codes are defined.

	.PKOPN	   0	Sign up for a network/interface/protocol triple
	.PKCLZ	   1	Release assignment for a triple
	.PKRCV	   2	Receive next packet
	.PKSND	   3	Send a packet
	.PKOWF	   4	open a waif connection
	.PKCWF	   5	close a waif connection
	.PKRWF	   6	receive a waif packet
	.PKSPM	   7	set promiscuous mode on the interface
	.PKCPM	  10	clear promiscuous mode on the interface
	.PKSLL	  11	set local loopback mode on the interface
	.PKCLL	  12	clear local loopback mode on the interface
	.PKNCT	  13	read the interface's Network Control Table

The following offsets into the argument block are defined.

	.PKLEN     0	Count of words in block, including this word.
	.PKNET	   1	Network type code (see below)
	.PKINT     2	Network interface number (corresponds to Multinet NCT)
	.PKPRT	   3 	Protocol type (network dependent)
	.PKFLG	   4	Flag word
	.PKBUF	   5	Buffer address
	.PKBYT	   6	Packet length (network dependent)
	.PKNTD	   7	Network dependent data

The following network type codes are defined.

.PK3MB		0		3MB Ethernet using a Stanford MEIS
.PK10E		1		10MB Ethernet using a Stanford MEIS

Error codes (returned by all functions):

NTWZX1:	 NET WIZARD capability required.  Insufficient privileges.
ARGX02:	 Invalid function.  Bad function code or bad argument block address.
ARGX17:  Invalid argument block length.  Argument block too small.
DEVX5:	 No such device.  Illegal network type code or non-existent interface.
.PKOPN function
---------------

Sign up for an network/interface/protocol triple.  Process must have
NET-WIZARD or WHEEL privileges and the triple must not be in use by another
process.  A process may sign up for as many triples as there is available
monitor table space.
	For the MEIS based Ethernet the default data mode is 32 bits left
justified in a 36-bit word.  If the flag PK%MOD in the .PKFLG offset is set,
then the connection's MEIS data mode should be set from the .PKNTD offset.
The interface offset should contain the Multinet interface (NCT) number of
the network being used; consult SYSTEM:SITE-ADDRESS.TXT for your site's
interface assignments or use the .PKNCT function of PKOPR%.  The protocol
field should contain a 16 bit Ethernet type code, e.g. 1000 for PUP, 1001
for 3MB IP.  Note that is not possible to use PKOPR% in the Stanford monitor
to receive PUP or IP packets; packets for these protocols are intercepted
before they get to the PKOPR% support.

Argument block format:

	.PKLEN - length of argument block: minimum is 4
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - 16-bit Ethernet datagram type code
	.PKFLG - optional.  If PK%MOD is set, then use .PKNTD offset.
	.PKBUF - ignored.
	.PKBYT - ignored.
	.PKNTD - MEIS data mode, right justified.

Error codes:

OPNX7:  Device already assigned to another job.  Triple already assigned.
MONX01: Insufficient system resources.  No more table space,i.e. too many
	 triples or too many process input queues.
.PKCLZ function
---------------

	Release assignment of an network/interface/protocol triple.  The
process must own the assignment that is being released.

Argument block format:

	.PKLEN	- length of argument block: minimum is 4
	.PKNET  - network code (same as .PKOPN)
	.PKINT  - interface number (same as .PKOPN)
	.PKPRT  - protocol number (same as .PKOPN)

Error codes:

DESX5:  File is not open.  Process does not own triple being released.
.PKRCV function
---------------

	Receive next packet for this process.  Note that a process may have
multiple network/interface/protocol assignments.  This function will receive
the next packet queued for this process; a user is not able to determine
ahead of time which triple the packet belongs to.  The process must have
previously signed up for at least one triple and must have NET-WIZARD
capabilities.  The user supplies only the address of a buffer; the .PKNET,
.PKINT, .PKPRT, and .PKBYT offsets are filled in by the monitor when PKOPR%
returns. The user buffer must be long enough to accomodate the largest
possible Internet packet (currently 255 decimal words).
	There is some buffering of packets done by the monitor.  Currently
if there are more than five packets in the monitor's input queue for a
process, further datagrams are not accepted.  If a packet has not been read
by the user after a certain amount of time (presently 60 seconds), it will
be discarded.  If there are no packets available, PKOPR% will block until
one appears.
	For the MEIS based Ethernet the data mode used in reading the
packets is the same mode as specified by the .PKOPN function.  Unless the
data mode is 36-bit image mode, the .PKBYT offset contains the packet length
(including the encapsulation bytes) in octets.  In the 36-bit data mode the
packet length (including encapsulation) is given in 36-bit words.  The
format of the datagram header is the same as described in the .PKSND
function below.

Argument block format:

	.PKLEN - length of argument block: minimum is 7
	.PKNET - network type, updated by monitor on success
	.PKINT - interface number, updated by monitor on success
	.PKPRT - protocol number, updated by monitor on success
	.PKFLG - ignored.
	.PKBUF - buffer address
	.PKBYT - length of packet, updated by on success

Error codes:

IOX1:   File is not opened for reading.  No triple(s) have been signed up for.
RCDIX4: Monitor internal error.  Triple database vanished unexpectedly.
.PKSND function
----------------

	Send a packet over the Ethernet.  No special privileges are
required to send a packet, however some process in the system must be
signed up to receive the triple of network/interface/protocol specified
in the argument block.
	For the MEIS based Ethernet the data mode specified (or defaulted)
in the .PKOPN funtion is used in sending the packet.  The packet length in
.PKBYT is interpreted as words for the 36-bit data mode or as octets for the
other MEIS data modes.  These counts include the header octets of Ethernet
encapsulation.
	For the 3MB Ethernet the encapsulation octets are in the first
36-bit word of the user buffer and must contain the 8 bit destination
address in bits 0 through 7, the source address in bits 8 through 15, and
the Ethernet packet type in bits 16 through 31.
	For the 10MB Ethernet, the first 16 bits of the first 36-bit word
are ignored.  Following that "padding" are 48 bits of destination, 48 bits
of source, and 16 bits of datagram type code.  The high four bits of each
36-bit word are unused.

Argument block format:

	.PKLEN - length of argument block: minimum is 7
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - 16-bit protocol type
	.PKFLG - ignored.
	.PKBUF - buffer address
	.PKBYT - length of packet

Error codes:

FILX01: File is not open.  No process on system has signed up for the
	 selected triple.
ATSX11: Byte count is too large.  A zero, negative, or execessively large
	 byte count was given.
.PKOWF Function
---------------

	This function creates a special PKOPR% port for listening to waifs
on the specified interface. A waif is an Ethernet datagram that no other
process wants to claim.  There can only be one waif listener process at a
time.

Argument block format:

	Same as for .PKOPN, except that the .PKPRT offset is ignored.

Error codes:
	
	Same as returned by .PKOPN function. 
.PKCWF Function
---------------

Release assignment of the waif listening triple.


Argument block format:

	Same as for .PKCLZ, except that the .PKPRT offset is ignored.

Error codes:
	
	Same as returned by .PKCLZ function. 
.PKRWF Function
---------------

	Receive next packet in waif listener queue.  Behaves like the .PKRCV
function except that only waifs are received.

Argument block format:

	Same as for .PKRCV, except that the .PKPRT offset is ignored.

Error codes:
	
	Same as returned by .PKRCV  function.
.PKSPM Function
---------------

	Put the specified network interface into promiscuous receiver mode.
This causes the network hardware to accept all datagrams on the transport
medium, regardless of their actual destination.  The .PKCPM function returns
the network hardware to its original state.

At present this function is implemented only for MEIS devices.  Note that
due to the design of the MEIS hardware only one interface per MEIS
controller can be put into promiscuous mode at one time.

Argument block format:

	.PKLEN - length of argument block: minimum is 4
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - ignored

Error codes:
	
IOX5:	Device or data error.  Function is not supported by hardware.
	 Presently this function is supported only by MEIS hardware.
.PKCPM Function
---------------

	Clear promiscuous mode for the specified interface.

Argument block format:

	.PKLEN - length of argument block: minimum is 4
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - ignored

Error codes:
	
IOX5:	Device or data error.  Function is not supported by hardware.
	 Presently this function is supported only by MEIS hardware.
.PKSLL Function
---------------

	Put the specified interface into hardware loopback mode.  This
function is very useful for debugging software protocols on an active
network.  The .PKCLL function undoes the hardware loopback.

At present this function is implemented only for MEIS devices.  Note that
due to the design of the MEIS hardware only one interface per MEIS
controller can be put into promiscuous mode at one time.

Argument block format:

	.PKLEN - length of argument block: minimum is 4
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - ignored

Error codes:
	
IOX5:	Device or data error.  Function is not supported by hardware.
	 Presently this function is supported only by MEIS hardware.
.PKSLL Function
---------------

	Clear hardware loopback for the specified interface.

Argument block format:

	.PKLEN - length of argument block: minimum is 4
	.PKNET - network type code
	.PKINT - interface number
	.PKPRT - ignored

Error codes:
	
IOX5:	Device or data error.  Function is not supported by hardware.
	 Presently this function is supported only by MEIS hardware.
.PKNCT Function
---------------

This function copies the Multinet Network Control Table (NCT) of the
specified interface into the user specified buffer.  An error is returned if
no such NCT exists.  To discover the network interfaces on a system, start
with .PKINT containing zero and increment that interface number until PKOPR%
finally returns an error.  The .PKNET offset is updated each time with the
PKOPR% hardware type code for the interface.  If there is no PKOPR% support
for a particular NCT, 777777 is returned as the hardware type.

The file ANAUNV.MAC contains the structure definitions for the NCT.

Argument block format:

	.PKLEN - length of argument block: minimum is 6
	.PKNET - ignored
	.PKINT - interface number
	.PKPRT - ignored
	.PKFLG - ignored.
	.PKBUF - buffer address

Error codes:	

ARGX17:	Invalid argument block length.  Argument block too small.
DEVX5:	No such device.  No such interface number.

ZZZZZZ

	ZZZZZZ the End