Google
 

Trailing-Edge - PDP-10 Archives - BB-J713A-BM - language-sources/qsrmac.mac
There are 45 other files named qsrmac.mac in the archive. Click here to see a list.
	UNIVER	QSRMAC  --  Parameter File for QUASAR

;
;
;                COPYRIGHT (c) 1975,1976,1977,1978,1979
;                    DIGITAL EQUIPMENT CORPORATION
;
;     THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY  BE  USED
;     AND COPIED ONLY IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE
;     AND WITH THE INCLUSION OF THE ABOVE COPYRIGHT NOTICE.   THIS
;     SOFTWARE  OR ANY OTHER COPIES THEREOF MAY NOT BE PROVIDED OR
;     OTHERWISE MADE AVAILABLE TO ANY OTHER PERSON.  NO  TITLE  TO
;     AND OWNERSHIP OF THE SOFTWARE IS HEREBY TRANSFERRED.
;
;     THE INFORMATION  IN  THIS  SOFTWARE  IS  SUBJECT  TO  CHANGE
;     WITHOUT  NOTICE  AND SHOULD NOT BE CONSTRUED AS A COMMITMENT
;     BY DIGITAL EQUIPMENT CORPORATION.
;
;     DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR RELIABILITY
;     OF  ITS  SOFTWARE  ON  EQUIPMENT  WHICH  IS  NOT SUPPLIED BY
;     DIGITAL.

	SEARCH	GALCNF		;GET CONFIGURATION DATA
	SEARCH	GLXMAC		;GET GALAXY SYMBOLS
	SEARCH	ORNMAC		;GET OPERATOR SYMBOLS
	SEARCH	D60UNV		;DN60 SYMBOLS

	.DIRECT	.NOBIN		;NO REL FILE...

IFN FTUUOS,<IF1,<PRINTX	Building a GALAXY-10 System>
		SEARCH UUOSYM	;GET TOPS10-UUO SYMBOLS
>  ;END OF IFN FTUUOS

IFN FTJSYS,<IF1,<PRINTX	Building a GALAXY-20 System>
		SEARCH MONSYM	;GET TOPS20-JSYS SYMBOLS
>  ;END OF IFN FTJSYS

	SALL			;SUPPRESS MACRO EXPANSIONS

%%.QSR==36			;MAJOR CHANGE NUMBER OF QSRMAC


QSRVER==4			;MAJOR VERSION NUMBER
QSRMIN==0			;MINOR VERSION NUMBER
QSRWHO==0			;LAST EDITOR
QSREDT==350			;EDIT NUMBER
SUBTTL	Table of Contents

;               TABLE OF CONTENTS FOR QSRMAC
;
;
;                        SECTION                                   PAGE
;    1. Table of Contents.........................................   2
;    2. Revision History..........................................   3
;    3. Accumulator Definitions...................................  11
;    4. Symbols derived from GALCNF...............................  12
;    5. Changable System Parameters...............................  13
;    6. Abbreviations Used in QUASAR-10...........................  14
;    7. RDB  --  Request Descriptor Block.........................  15
;    8. ROB  --  Requested Object Block...........................  17
;    9. QH   --  Queue Header Definitions.........................  18
;   10. QE   --  Queue Entry Definitions..........................  19
;   11. OBJ  --  Object Queue.....................................  21
;   12. PSB  --  Processor Status Block...........................  23
;   13. SPL  --  Spool Queue Definition...........................  24
;   14. CSM  --  Canonical SPOOL Message..........................  25
;   15. CLM  --  Canonical LOGOUT Message.........................  26
;   16. The Messages and their respective codes...................  27
;   17. The HELLO Message -- Function 1...........................  28
;   18. The RELEASE Message -- Function 2.........................  29
;   19. The CHECKPOINT and REQUEUE messages -- Functions 3 and 4..  30
;   20. The NEXTJOB and CREATE Messages -- Functions 5 and 7......  31
;   21. EQ   --  The External Queue Entry.........................  32
;   22. The ABORT Message -- Function 6...........................  40
;   23. The LIST Message -- Function 10...........................  41
;   24. The MODIFY Message -- Function 11.........................  42
;   25. The KILL Message -- Function 12...........................  44
;   26. The LIST ANSWER Message -- Function 13....................  45
;   27. The REQUEST FOR CHECKPOINT Message  --  Function 15.......  47
;   28. The DEFER Message  --  Function 16........................  48
;   30. Event Counters............................................  50
;   31. The COUNT Message  --  Function 20........................  52
;   32. The COUNTANSWER Message  --  Function 21..................  53
;   33. The SETUP/SHUTDOWN Message  --  Function 22...............  54
;   34. The RESPONSE-TO-SETUP Message  --  Function 23............  55
;   35. The OPERATOR-ACTION Message  --  Function 24..............  56
;   36. The HOLD/RELEASE Message  --  Function 25.................  57
;   37. The SPOOL Message - Function 26 (sent by IPCC)............  58
;   38. The LOGOUT Message - Function 27 (sent by IPCC)...........  60
;   39. IPCF Parameters...........................................  61
;   40. Common Parameters.........................................  62
;   41. Prolog macro for generating common header.................  63
;   42. Random Macros.............................................  64
;   43. Failsoft System Definitions...............................  65
;   44. QUASAR Fatal Error Codes..................................  66
;   45. Definition of the Known Queues............................  67
SUBTTL	Revision History

	COMMENT	\

Edit	Module	Explanation

   1	ALL	First System Version Of QUASAR-10 February, 1975

   2	QSRSCH	Operator NEXT Command Caused Batch Job Tables To Get Out Of Sync

   3	QSRMEM	Add New Routine For Cusp Version (CSPMEM) To Clean Core When
		Cusp Is Going Dormant.  Call It M$CLNC

   4	QSRMAC	Invent High Availability Queues
		The Pages Belonging To Them Remain Even If The Queue Is Empty
		Define QH.HAQ In The Queue Header Flags, Include In QUEUES Macro
	QSRMEM	Have M$GCOL Collect Empty Pages That Are Not High Availability
		Remove Some Checks From M$PFRE

   5	QSRSCH	Clean up some code in SCHSTR to remove an extra
		call to I$VSTR.
	QSRIPC	Have SNDFAI save the correct address of a requeued message
		in the IPS entry, and also have it requeue "all"
		messages to SYSINF whether the error was recoverable
		or not.
	QSRQUE	Q$KLPD clobbers H and AP causing a great deal of trouble.
		Preserve both of them.  Also take check out of Q$RTMS for
		the message type, and call Q$KLPD for all returned messages.

   6	QSRFSS	Move index-SAT words into the index itself.
		Start integrating code for multiple sections.
	QSRINT	Start moving code to open the master queue files into QSRINT
		from QSRFSS.

   7	QSRFSS	Fully integrate code for multiple sections.
	QSRINT	On TOPS10 whenever master queue file is extended,
		force the RIBs to be written.  On fatal STOPCDs,
		store away acs so they can be found easily.
		Call M$IPRM when an IPCF receive failed with error IPCUP%.
	QSRMEM	Install M$IPRM

  10	QSRMAC	Define the TEXT Message as an acknowledgement of an operation.
	QUASAR	Implement the global string routines to build the TEXT message.
		Give TEXT message as a return if the caller sets MS.ACK non-zero.
	QSRINT	Invent I$WHEEL to check if caller is an operator of some flavor.
	QSRQUE	Call I$WHEEL in HELLO message processor.
		Send explicit TEXT acknowledgements after KILL, MODIFY, LIST.
	QSRSCH	Call I$WHEEL during default processing if (.EQDIR .NE. G$DIR)
  11	ALL	Insert code for the 6.02 device names.
	QSRQUE	Move changable data from the internal queue to the external
		queue request during Q$NEXTJOB.
	QSRSCH	Insure the Batch job limits for cards, paper tape, etc...,
		get applied to the spooled requests.
	QSRINT	Complete moving code to open master files from QSRFSS.

  12	QSRSCH	Broadcast TEXT message with TX.NMS set now that it has been defined
	QSRQUE	Remove the old Q$SYNC code.
	CSPQSR	Watch for in-coming TEXT messages

  13	ALL	This is the version of QUASAR-10 sent to Field Test, June, 1975.

  14	QSRMAC	Eliminate most of edit 12 and instead invent the Request For Checkpoint
		message.  Every SPLMBC minutes, ask the component to Checkpoint itself.
		Add a word to the PSB to contain the next time to request a checkpoint.
		Define ABO.DI in the ABORT message as the directory of the requestor.
	QSRSCH	Keep track of the Checkpoint time, send during the scheduling loop.
		The Request for Checkpoint message serves a dual purpose.
		  1)  The individual spoolers don't need to watch the time for Checkpoints
		  2)  The message is used to determine if the component is still alive
		Therefore, dead interlock recovery is done every SPLMBC minutes.
	QSRMEM	Have ANYOUT look for pages to destroy first.
	QSRQUE	Install Q$RCK to actually send out the Request for Checkpoint message.
		Include directory of sender in ABORT message.

  15	QSRMAC	Define the Canonical SPOOL Message.
	QSRINT	Invent a new class of routines, the FD Manipulaters.
	QSRQUE	Use the Canonical SPOOL Message throughout the spooling subroutines.
		Generalize SPLINC to include based on the Canonical SPOOL Message,
			call it Q$INCL.
	QSRSCH	Build a Canonical SPOOL Message in S$RELE, call Q$INCL for the Log File.

  16	ALL	Major Change of QSRMAC (#27).
	QSRMAC	Include /REPORT FP areas in all requests.
		This adds 2 words to the minimum FP size.
	QSRQUE	Set and check the Request Doesn't Exist bit instead of the old ones.
	QSRSCH	Set RDE in the external request during SCHDEF if all files are /REMOVEd.
	QSRINT	Monitor change to 6.02. The extension of a spooled LL or LU is LPT.

  17	GALGEN	Ask for Automatic Forms Change Threshold.
	QSRMAC	Define FRMTHR = the answer from GALGEN.
		Add definition of the DEFER Message.
		Define the Canonical LOGOUT Message.
	QSRQUE	Include Q$DEFER to operate on the Defer Message.
		Implement File-Specific Modifies.
		Use the Canonical LOGOUT Message in Q$LOGOUT.
	QSRMEM	Define co-routine ".SAVAP" to save/restore AP.
		Add ".CALLn" to save/restore the preserved acs.
	QSRSCH	Use FRMTHR instead of the absolute 100.
		Build a Canonical LOGOUT Message in S$RELE.
	QSRINT	Add I$FMCH to compare 2 FDs with masks.
  20	GALGEN	Add question for enforcing the jobs core limit.
		If the answer is YES, ask for the default value of /CORE.
		If the answer is NO, define the default = 0.
	QSRMAC	Extract INPCOR = G.ICOR (the GALGEN value).
	QSRSCH	Insert code in INPSCH to use the core values.

  21	ALL	Become version 1A

  22	ALL	Major Change of QSRMAC (#30).
	QSRINT	Get the maximum IPCF packet size from the operating system during
		initialization and store it in G$MPS.
		Install I$CSM for TOPS20.
	QSRQUE	Determine the entry size for the IPC and IPS queues at runtime using
			the maximum packet size in G$MPS.
		Include the number of files in File-Specific Modify, re-work
			Q$MODIFY, Q$KILL, Q$DEFER, BLDKMS, FILMOD.
	QUASAR	Use G$MPS whenever a check must be made for the maximum IPCF packet size.

  23	QSRMAC	Define the Universal Directory Specification
	QUASAR	Remove G$LOCS, G$SDIR, and G$FFAD
	QSRINT	Add more TOPS20 routines

  24	ALL	Make consistent use of connected and logged in
		directories in TOPS20.

  25	QSRIPC	If C$GET does a query which returns false, clear IPCPND.
	QSRINT	Add I$READ and I$WRIT for TOPS20.
		Add I$CRIP routine.
	QSRFSS	Call I$CRIP in the appropriate places.

  26	**NOTE	[SYSTEM]QUASAR no longer requires [SYSTEM]INFO
	QSRMAC	Add a bit in the external queue to indicate that the creator
		of a request was privileged at the time of creation.
		This will reduce the number of CHKACC's required in the spoolers.
	QSRSCH	Set the Privilege bit appropriately.
	QUASAR	Dispatch messages from [SYSTEM]IPCC independently.
	QSRIPC	Move code to establish a PID into QSRINT.
		Remove C$ISM since QUASAR handles the dispatch.
	QSRINT	Add I$EPID and associated routines for acquiring a PID.
	CSPQSR	Remove code for [SYSTEM]INFO, call [SYSTEM]IPCC instead.

  27	ALL	Major Change of QSRMAC (#31).
	QSRMAC	Make .EQPAT optional and TOPS10 only.
	QUASAR	Lay the groundwork for handling multiple PIDs.
		Add G$SFAL to notify all concerned of an invalid PID.
		Isolate dispatch for messages directed to [SYSTEM]QUASAR (G$QPID).
	QSRQUE	Remove Q$RTMS, G$SFAL directly calls Q$KLPD.
	QSRIPC	Add C$GIPC to get a specific response from [SYSTEM]IPCC.
		Re-arrange SNDFAI to call G$SFAL.
	QSRMEM	Define co-routine ".SAVEH" to save/restore H.
  30	QSRINT	Break up QSRINT into the appropriate modules.
		Name the new ones QSRT10 & QSRT20.

  31	QSRQUE	Have CHKMCH just check for matching owner field
		rather than complete directory.
	QSRSCH	If the request protection field is 0 fill in a default
		protection using the contents of G$SPRT.

  32	QSRMAC	Define TX.MOR indicating another ACK to follow.
	QUASAR	If TX.MOR is set at G$MSND, don't clear G$ACK.
		Add G$CSIX for sixbit conversions.
		Add G$CCHR for a Single Characters.
	QSRQUE	Have Q$CREATE send an explicit acknowledgement indicating:
		    Quename:Jobname=/SEQUENCE:s, n Files

  33	QSRSCH	Could ask for Forms Change for non-existant (EQ.RDE) requests,
			Override Forms Type for those requests.

  34	GALGEN	Ask Questions about conversions from Blocks to "Units".
	QSRMAC	Extract the answers.  Define EQ.NBL in .EQLM2 for Output Queues.
	QSRQUE	Replace code that deals with Spooled Limits with some that counts blocks.
	QSRSCH	Convert blocks to limit appropriately during default filling.

  35	QSRMAC	Invent the "listable" bit (QH.LST) in the queue header.
		Put in CLQ message.
		Add new bit to batch release message to flag that the
		log file is to be printed.
	QSRQUE	Check "listable" bit on LIST requests.
		ACK for CREATE in 'INP' with an after parameter was wrong
		because H pointed to 'AFT'.
	QSRSCH	Zero copies field for log file if RL.PRL is off.

  36	QSRSCH	Default the /OUTPUT field in SCHDEF('INP').

  37	ALL	Become version 2.
		Major change of QSRMAC (#32).
	QUASAR	Provide LUUO handler for new STOPCD calls.
	QSRMAC	Remove definitions now found in SBSMAC, Search it.
		Make the same change to the PROLOGUE Macro.
		Re-arrange CHECKPOINT and REQUEUE messages so that the
			entire block is available for CHECKPOINT information.
	QSRT20	Have I$KSYS return seconds to shutdown minus 1 minute.
		Set up IPCF quotas during I$EPID.
		Change I$STCD to accept standard calls.
	QSRT10	Change I$STCD to accept standard calls.
	QSRSCH	Ask for checkpoint from all components after KSYS has expired.
	QSRQUE	Don't give extended "ACK" during create of "RDE" requests.
		Change Q$CHECKPOINT and Q$REQUEUE to account for
			the changes to those messages.
	CSPQSR	Accept indicator in call to CSPINI as:
		  0 = old style call
		 -1 = caller will handle interrupt system.
  40	QSRQUE	Deferred requests recovered from the failsoft file had
			/LIMIT:0 sent to the spooler.
		Move Q$CDIN to inline code in KILPSB.
	QUASAR	Add G$MCOR as minimum system value of /CORE.
	QSRT10	Fill in G$MCOR with %CNMMX.
		If IO.BKT is set on Master file, use SETSTS to clear it.
	QSRT20	Set G$MCOR = 0, there is no system minimum.
	QSRSCH	Check value of G$MCOR after defaulting /CORE.
		Use G$MCOR in input scheduling as PSB minimum.
	QSRIPC	PDL used during IPCF interrupts was too short.
		Could miss a call to I$POST.

  41	QSRQUE	Report words not being cleared during Q$INCL.
		Could MODIFY a file if it had been /REMOVEd previously.
	QUASAR	Wrong ac loaded on returned packets.

  42	QSRMEM	Re-define free space management to optimize size and paging.
		Add M$MOVE for moving entries between queues.
	QSRMAC	Define the "route" message (function 17) to change the routing
		  of output from one station to another.
		Include S$USE as scheduling vector for the USE queue.
	QUASAR	Add dispatch entry 17 to S$ROUTE.
	QSRSCH	Install S$ROUTE and tables required, convert station
		  numbers in OUTREJ.
		Assume forms are frozen if "NO OPERATOR ON DUTY".
		Apply the bias (SPLLIM) on a per file basis.
		Add linking dispatch for the USE Queue (S$USE).
	QSRT10
	QSRT20	Install I$OPER to check if an operator is present.
	QSRQUE	Call M$MOVE during Q$REQUEUE, Q$NEXTJOB, Q$CKAF, and KILPSB.

   43	GALGEN	Don't convert LPT limit factor from pages/page to
		pages/block.  Add a question for the number of minutes before
		system shutdown to stop scheduling automatic forms changes.
	QSRMAC	Extract new symbol from GALCNF.
	QSRSCH	If KSYS is set and is less than FRMKSY minutes away,
		don't schedule a forms change.
		PRIO:0 now means default.  Default it in SCHDEF, and change
		link-in routines to make PRIO:1 do fifo linking.
	QSRT20	Maintain spooled file-sizes in pages on -20.

   44	QSRADM	Add new module QSRADM  to handle system 
		administrative functions.  Move all the routing routines
		from QSRSCH to QSRADM.
	QSRMAC	Include .REQUIRE for QSRADM in PROLOGUE  macro.
	QUASAR	Call A$INIT, and dispatch to A$ORTE on a
		ROUTE message.
	QSRSCH	Remove routing code and put in QSRADM.

   45	ALL	Cleanup accumulator conventions in all QUASAR modules.
		P registers "must" be saved by ALL routines which use them.
   46	ALL	Major change of QSRMAC (#33).
		Start rearranging code and data-structures to allow for
		new user and directory number format on TOPS20.
	QSRMAC	Add account string block to the EQ.
		Define the Request Descriptor Block (RDB).
		Invent new CBL error code.
	QSRT10	Invent I$EQQE, I$QELA, I$SMEQ, I$RMCH, I$DFEQ.
		Make I$VSTR much smarter.
		Remove I$DCHK.
	QSRT20	Invent I$EQQE, I$QELA, I$SMEQ, I$RMCH, I$DFEQ.
		Write I$VSTR.
		Remove I$DCHK.
		Start removing/changing JSYSes which are non-
		existant or different in TOPS20 release 2.
	QSRMEM	Invent M$PCNT to determine whether a given
		number of pages can be acquired.
	QSRQUE	On LISTANSWER keep track of the number of pages
		needed to build the listing and if the number of pages needed
		to build the last listing are not available give the new
		CBL error.

   47	ALL	Start putting in event counters.
	QSRQUE	Remove all PSB handling routines, Q$RCK, Q$HELLO, and Q$KLPD.
		Move the ACK call from Q$LIST and move it to Q$LANSWER
		after check for %CBL since otherwise user never gets CBL error.
	QSRADM	Insert all PSB handlers and routines removed from QSRQUE.
		Invent COUNT and CNTANSWER messages.
	QSRT20	Put in STGWLD routine to compare a "wild"
		string against a base string.
		Uninvent I$MSTR, it wasn't useful on -20.
	QSRT10	Uninvent I$MSTR and have I$VSTR do its work.

   50	QSRMAC	Define flags for calling C$SEND.
	QSRMEM	In M$MOVE, if moving to a queue with no scheduling
		vector defined, use M$ELNK to link the entry in.
	QSRSCH	Remove scheduling vector for USE QUEUE.
	QSRIPC	Modify calling sequence to C$SEND to optionally
		allow specification of additional action to be performed.
	QSRT10	Cleanup I$EPID a little.
		Add some more debugging aids, i.e. the CRASH routine.
	QSRT20	Change I$CHAC to allow access only if caller
		is a wheel or the request owner.
		Add some more debugging aids, i.e. the CRASH routine.

    51	QSRMEM	Call new routine I$MFFP to find first free page in
		my address space during initialization.
	QSRT10	Add new routine I$MFFP.
	QSRT20	Add new routine I$MFFP.
   52	QSRMAC	Add QUASAR job number to COUNTANSWER.
	QSRT10	Set job number in COUNTANSWER.
	QSRT20	Set job number in COUNTANSWER and fix problems with I$VSTR.

   53	QSRMEM	Incorporate performance improvements in garbage collection
		and free page searching.
	QSRT10	GETTAB directories for prime and redundant queues at
		initialization time on -10.

   54	QSRT10	Make I$GTAB into a local routine.
	QSRT20	Extract structure from spooled file name and store it
		in the CSM so FTSPLIT works on the -20.
	QSRIPC	Set "truncate if too long" on all receives.
	CSPQSR	Set "truncate if too long" on all receives.
	GALGEN	Ask about FTSPLIT on the -20.

   55	QSRSCH	Call routines in operating system interface to handle
		/UNIQUE checking of directories.
	QSRT10
	QSRT20	Add I$UQST, I$UQCL, I$UQCH to worry about /UNIQUE directory
		checking for batch requests.

;;First field-test release of GALAXY release 2, Jan, 1977

   56	QSRMAC	Invent the RDE queue.
	QSRQUE	Place jobs which get the RDE bit set into a
		separate queue, the RDE queue.
	QSRSCH	If a known component has said that it can handle RDE jobs,
		try to schedule it one before checking the processing queue.
	QSRT10	Make the maximum IPCF packet size equal to the
		MAX(SPL.SZ,monitor supplied maximum).

   57	QSRSCH	Add the "bias" to the limit for each copy of each file
		rather than each file.
200	QSRMAC	Begin release 3 development.  Major change of QSRMAC (#34).
		Take length of FD out of the FP and add a length field to the FD.
		Define two new queues, XFR and BIN.
	ALL	Use new FD/FP format.  This change affects the format
		of the CSM, FP, MODIFY message.
	QSRSCH	Add a release entry to scheduling vectors (SCHREL).
		Add vectors for the new queues.
	QSRQUE	Call the SCHREL entry instead of S$RELE.

201	QSRT20	Fix some problems with edit 200.

202	QSR???	Change all QUASAR modules to use the new GLXLIB conventions,
		routines and symbols. Also add some debugging code.
203	QSR???	Integrate more of GLXLIB

204	QSR???	Change to use the new GLXLIB segment

205	QSR???	Begin adding QSROPR, ORION-QUASAR interface

206	QSRMAC	Remove file-specific modify symbols.
		Remove FP.IGN field from the FP.
	QSRSCH
	QSRQUE	Remove group 2 (file-specific) modify, and make the various
		parameters part of the group 1 (queue-specific) modify parameters.
	QSRT10
	QSRT20	Remove I$FMCH.

207	QSR???	Make use of the GLXLIB module GLXINT for interrupt handling
		and common operating system tasks.

210	QSR???	Move TEXT message to GLXMAC

211	QSRMAC	Major change 35 to %%.QSR, message format change (.MSxxx)

212	QSRMAC	Make /UNIQUE values 1 and 2 rather than 0 and 1 so that it can be default.
		Make /RESTART a 2 bit field with values 1 and 2 for the same reason.
	QSRSCH	Default the /UNIQUE and /RESTART fields.

213	QSRMAC	Add canonical device types
	QSRADM	Add new object queue creation code
	QSRTx0	Add I$NLDV for finding number of local devices of type 'xxx'

214	QSRMAC	Insert new definitions for the PSB and the HELLO message.
		Insert definitions for new SETUP and RESPONSE-TO-SETUP messages.
	QSRSCH	Re-write entire module from scratch to implement new scheduling
		algorithms.
	QSRADM	Re-write A$HELLO and KILPSB to keep up with all the other changes.

215	ALL	Due to interim release on the -20 called version 3,
		make this version 4 of GALAXY.  Continue with new
		scheduling changes.

216	QSRMAC	Change ROUTE message to use full words for nodes, to allow
	QSRADM	TOPS20 style node names

217	QSRMAC	Add symbol for file spooler XFRSPL OBJect type.
		Add mask symbol for flags in flags word of HELLO message.

220	QSRMAC	Get rid of the AFT queue and keep AFT jobs in the
	QSRQUE	appropriate external queue.
	QSRSCH

221	QSRMAC	Add new Table of Contents.

222	QSRQUE
	QSRSCH	Make jobs which have been scheduled and checkpointed at
		least once get restarted sooner after a system crash by
		invisibly bumping its priority.

223	ALL	Remove FTSPLIT conditional in preparation of new general
		dependency list.

224	QSRMAC	Define new data-structures (and re-define old ones) for new
		dependency list.

225	QSRMAC	Create the QSRMDA module which will contain all the routines
	QSRMDA	which do things with file-structures.  Include the .REQUIRE
		for QSRMDA in the PROLOGUE macro.

226	QSRMAC	Invent the RDR queue for Readers (card).  Take the structure
	QSRSCH	word out of the LISTANSWER message and just include a bit
	QSRQUE	which indicates waiting for structure.

227	QSRT10	Add a routine to validate objects.
	QSRADM	Add the hooks to call the object validation routine.
	QSRMAC	Add INPMAX which defines the maximum number of Batch
		streams which can be started.
230	QSRMAC	Change PROLOGUE macro to .REQUIRE QSRSHO if QUASAR is defined.
	QSRSHO	Add a new QUASAR module for display messages.

231	QSRMAC	Remove .REQUIRE Statements for all Modules
		and Create a Separate Command file QUASAR.CMD
		to load the module.

232	ALL	Remove PROLOGUE macro from QSRMAC. Use PROLOGUE in GLXMAC.

233	ALL	Changed DEFLIM OUTP to be compatible with QMANGR
234	QSRADM	Modified The route processor for the new
		message types.
	QSRDSP	Added the SHOW ROUTE TABLE message processor.

235	QSRMAC	Modified INPMAX so as to get its value as a GALGEN parm.
	QUASAR	Added G$NBAT as a global parm. Used to keep track
		of the number of batch streams started.
	QSRT10	Modified I$VOBJ to use G$NBAT
	QSRSCH	Modified the SHUTDOWN code to Update G$NBAT.

236	QSRMAC	Define  a  symbol representing the number of
                words used for the .EQLIM block.  Also,  get 
                rid of the old .EQ??? and EQ.??? symbols.
237	QSRMAC	Add IBM and Card Reader queues
	QSRSCH	Add Card Reader scheduling code. IBM is the same as card punch.

240	QSRMAC	Add the new Network data base structure.
	QSRSCH	Modify all calls to network subrutines to use the new routines
	QSRADM	Deleted all network support from this module
	QSRNET	Added this new QUASAR module in support of Networks.

241	QSRDSP	Modified the queues display to its new format.
	QSRSCH	Modified the scheduler so that network devices get shutdown
		when the queue is empty.

242	QSRT10	Fixed I$LGFD so that it generates ledgible file names
	QSRMDA	Fixed a bug in D$ESTR which allowed null structure names.

243	QSRADM	Added support for SET LIMIT-EXCEEDED commands.
	QSRMAC	Here also
	QSRMAC	Added support for DISP:RENAME

244	QSRMAC	Modify the Spool Msg structure for DISP:RENAME
	QSRT10	Add more DISP:RENAME code

245	QSRT10	Complete the DISP:RENAME coding

246	QSRQUE	Fix a bug which caused create's with bad structure names
		to be fail-softed. This caused QUASAR to stopcode
		if it was restarted since when Q$CREATE rejected the
		entry the second time, QSRFSS couldnt handle it.

247	QSRMAC	Add .FPINF to the EQ for the card reader
	QSRSCH	Add defaults for the SPRINT queue
	QSRT10	Fix I$CSM for DISP:RENAME

250	QSRMAC	Changed a duplicate definition of SP.DFR under SPL.SF
		to SP.FLG.
	QSRT10	Changed I$CSM to use the new definition.

251	QSRT20	Fix a bug in I$CSM so that device numbers specified
		in the spool message FD are parsed.

252	QSRMAC	Expand EQ limit block to 6 words.
		Define a Device Status Update msg (Function 31).
		Change the Object queue entry OBJSTS to 1 word which
		will contain a code describing the Object status.
		Define the object status codes.
		Add operator intervention symbols, DEFLIM it, and add
		to the Object queue parameter words
		Add RSU.CD to the Response-to-Setup message. This
		contains an optional reason why the device count not
		be started.

253	QSRQUE	Fix the Request-Id logic so that RIDs are maintained
		after queue modification
	QSRSCH	Add code to INPFJB so that it checks the opr intrvn
		status before scheduling a job for a stream.
		Add code to default the opr intrvn status for batch jobs.

254	QSRIPC	Fix C$GET so that oversize packets are recieved properly.

255	QSRADM	Remove Set Job Priority - make it a Modify Command.
		Add code for Set OPr/NO-OPR Intrvn.
		Change A$OREQ, A$OHLD, A$OREL to use Req Id instead of
		Jobname & Seq number.
		Add A$DELETE to remove jobs from the queues
		Add A$STATUS to update the Object status via a device 
		status update message

256	QSRT10	Fix I$LGFD so that it generates unique funny-name
		log file-specs

257	QSRDSP	Re-write the Show Status and Show Parameters routines
		to display the data in a different format

260	QSRSCH	Add code
	QSRT10	     to support
	QSRQUE		 the /NOTIFY option

261	QSRMAC	Add %READN to object status code list.
	QSRADM	Fix A$OBST so the Free running objects are always set 'IDLE'
	QSRDSP	Fix DMPSTS so that the call to CHKSPC for the /AFTER parm
		is made after we're sure that there is a /AFTER parm
	QSRQUE	Modify NOTIFY routine to put out a crlf first.

262	QSRMAC	Delete Function 24, operator action message (Now obsolete)
	QUASAR	Add G$RMTE for remote operator queue requests
		It contains the node at which the operator is located.
	QSRQUE	Fix Q$CREATE so that the correct number of limit words
		are BLT'd from the EQ to the QE
		Modify FNDREQ so that if its checking an operator request,
		it looks at G$RMTE and only wins if the queue entry is
		destined for that operators remote station
	QSRSCH	Fixed LNKPRI so that priority 1 jobs are always linked
		to the end of the queue, regardless of limit specifications.
	QSRADM	Added a DOSCHD to the SET message processing routine
		Added code in A$MODIFY, A$OHLD, A$OREL, A$ODEL
		and GENRDB to support the .ORNOD block in operator msgs.
	QSRNET	Make QUASAR completly Node number/Node name knowledgable.
		Ie., make it so that it understands either an
		octal node number or a sixbit node name in all cases where
		a node value is referenced.

263	QSRMAC	Add symbols for /BATLOG: switch
	QSRSCH	Add code for /BATLOG: support

264	QSRMAC	Add %REQUE to the list of object status codes
	QSRSCH	Fix scheduling bug in batch for opr intrvn allowed
		Also add defaulting code for batch log type

265	QSRMAC	Change .QEJBN so that it contains 2 values:
		QE.UJN==0,,-1  ;Users Job Number
		QE.BJN==-1,,0  ;Batch Job Number
		Also change CHE.FL, adding CH.JBN which is the
		job number of the checkpointed batch job.
	QSRQUE	Modify Q$CHECKPOINT so that it save the batch job number.
		Add routine Q$NOTIFY to setup /NOTIFY parameters.
	QSRT10	Delete routine I$NOTF
	QSRT20	Delete routine I$NOTF

266	QUASAR	Deleted G$OLNK hack.
	QSRSCH	Deleted references to G$OLNK.

267	QSRMAC	Delete .OTBIN and .OTXFR symbols. Define them in GLXMAC.

270	QSRSCH	Add processing code for XFR queue.  Simple first come
		first serve scheduling.

271	QSRMAC	Add symbols QE.AVO, QE.AVI to redefine .QEITN for
		account verification (-10 only)
	QSRSCH	Add hooks for Account Verification
	QSRT10	Add routines I$VACT, I$ACCT. These two routines
	QSRT20	   are used for Account Verification. I$ACCT is
		   a no-op on the -20.

272	QSRMAC	Delete OBSNLP 
	QSRSCH	Delete code supporting OBSNLP. This modifies the
		scheduler such that it does not shut down objects
		just because there are no jobs in the queue AND
		there is another object which needs to be started.
		Remote objects will still be shut down when the
		Queue go empty.

273	QSRMAC	Add QH.INV to queue header flag.
		Add OBSINV to object flags
		Add node block to list queues request message (function 10)
		Add QH.INV to QUEUES macro.
	QSRADM	Add support for initializing invisible objects when the
		object gets started.
	QSRDSP	Add support in D$SHST and D$SHPR so that invisible objects
		are not displayed in status/parameters requests.

274	QSRMAC	Delete SPRINT .EQLIM definitions for CMOD, CSIZ, NCRDS.
		Add %EQUFT for file retrieval
		Add new object scheduling bit OBSINT (internal shutdown)
	QSRSCH	Modify CHKOBJ so that it shutsdown the object if its 
		remote or if OBSINT is lit.
	QSRT20	Modify I$DFEQ so that if the job name in the EQ is
		null,,it gets defaulted to the first 6 chars of the filename.
	QSRQUE	Rewrote Q$ARCHIVE so that it conforms to GALAXY standards.
	QSRADM	Changed GETOBJ so that the right field is checked when
		looking to see if the object is free running. (QH.TYP)
	QSRDSP	Changed DEPRET to fix a few bugs. (Wrong ac's, a PUSH and
		no POP, etc.)

275	QSRMAC	Add new message type .QONWA and description (function 36).
		Add FP.RCD to the BIN queue FP description.
	QSRNET	Add NODE Jsys to GETNODE routine.
		Modify N$INTR so that when a node goes offline, it
		searches the object queue looking for objects started
		and setup for that node. If it finds one, it sends a
		node went away message to the controlling spooler.
		When done, it sends ORION the same message.
	QSRT20	Change I$RDEF so that it picks up the tape info from
		the limit words instead of the checkpoint words.
	QSRQUE	Change Q$ARCHIVE so that it saves the tape info in
		the limit words instead of the checkpoint words.

276	QSRMAC	Move EQHSIZ to the end of the EQ header definition (where
		its supposed to be)

277	QSRMAC	Put all ARCHIVE definitions under TOPS20 conditional.
	QSRQUE	Move Q$ARCHIVE to QSRT20.
	QUASAR	Change Archive message entry point to I$ARCHIVE.

300	QSRMAC	Add a redefinition of the RDB for ARCHIVE requests.
		Delete the ARCHIVE definition's in the KILL msg.
		Add an ARCHIVE msg Create code (.QIRET) so that
		creates wont fail if Queue Creates are disabled.
	QSRQUE	Delete routine FNDFRR and make it work with FNDREQ.
	QSRT20	Delete all Archive notification routines (they
		were terribly written) and replace them with code
		that works.

301	QSRMAC	Change .EQUSR to .EQOWN (Just to be consistant)
		Add symbol EQNMSZ which is the length of .EQOWN.
		Add .QOCQE (Short Create message) to msg type table
	QSRQUE	Add Support code for .QOCQE (Short Create Message)
	QUASAR	Add .QOCQE to the QUASAR message Dispatch Table.

302	QSRMAC	Change .EQTIM to .EQSPR (SPARE)
	QSRADM	Delete 'Requeue' from Request-Id error message
	QSRQUE	Change create ack to put out # of files if greater then 1.

303	QSRT20	Change Archeive Notify to put flag on in .OFLAG and to
		use .CMDIR for the Directory

304	QSRMAC	Add SUP.PL for DN60 PORT,,LINE #'s to SETUP message

305	QSRMAC	Add SUP.ST For remote network status/flag bits in SETUP msg.

306	QSRMAC	Add .OOTAP to OBJPRM definition and OBDTAP to 
		line printer attributes for spooling to mag tape
	QSRADM	Modify A$OSTA to support spooling to mag tape
	QSRSCH	Modify SETUP to support spooling to mag tape

307	QSRMAC	Add NETBPM to network data base (Bytes Per Message)
	QSRADM	Add DN60 CALL11 Support

310	QSRMAC	Change INPMAX to default to 30 streams total
		Add INPLOG to default /OUTPUT:(LOG,NOLOG,ERROR)
		Change INPOIP to default to 1 (opr intrvn required)
	QSRSCH	Change INPDEF to use INPLOG to default the /OUTPUT: switch

311	QSRMAC	Add a new limit word to the card reader inperpreter .QE
		queue. This new field is CNOD which is the node where the
		card deck origionated.

312	QSRMAC	Remove error DRN - Duplicate Mount Request Name - from
		the QUASAR error list.
	QSRT20	Remove the code from U$MNT which checks for duplicate
		mount request names.
	QSRSCH	Modify LPTFJB so that if spooling to tape, it skips the
		device check

313	QSRMAC	Add a new queue for DBMS (DBM)
	QSRSCH	Add scheduling control vector for DBMS

314	QSRMAC	Add %OPRWT to list of Object status codes for DN60
		Add error code WFM (waiting for tape/structure mount) for
		R.ACE and Co.
	QSRT20	Have U$MNT always return through E$WFM.

315	QSRADM	Make A$OBST set remote stations which are internally
		shutdown show up as IDLE instead of NOT AVAILABLE
	QSRDSP	Fix a bug in PADLIN so that the correct byte count
		is calculated even if the count is negative.
	QSRNET	Fix a bug so that TOPS-10 603A and non-decnet
		TOPS-20 monitors will run. The bug fix is just to
		make sure that the central site status bits
		are not set to indicate that the node is offline.
	QSRQUE	Fix a bug - make sure that if a BIN (SPRINT) request
		is processed, that no NOTIFY takes place.

316	QSRADM	In the DEFINE command processor, start a batch stream for
		Emulation.
	QSRDSP	In the list file archiving code, if the user specified
		/ALL, list the archived file name (From .QECON)
	QSRT20	In the File Archiving defaulting code, stash the archived
		file name in the connected directory area (.EQCON)

317	QSRMAC	Add response to setup code %RSUNC for 
		'Port/Line not conditioned'
		Add another word to the network data base for port/line handles
		Add another word to the setup message for port/line handles
	QSRADM	Add code to A$DEFINE so that it generates a handle for
		that port/line number by which the front end and spoolers
		can identify one another. Use the UDT and save in net DB.
	QSRSCH	Modify the setup message processor so that it sends the
		port/line handle along if setuping up a DN60 remote station
		Modify the Response to setup code so that, if the line/port
		handles do not match(%RSUNC) we will re-define the port/line
		and retry the device setup.

320	QSRDSP	Add code to D$DMNT (Show Mount Queues) to support
		'INFO MOUNT/USER:xxxx'

*********** Start MDA Modifications/Additions **************

321	QSRMAC	Remove the TOPS20 conditional from the MOUNT structures.
	QSRT20	Remove The MOUNT message processor from the U$MNT code
		and make it D$CMDR to create the MDA MDR queue. Put it
		into QSRMDA.
		Add I$DFMR to default the system dependent data for the MDR.
	QSRDSP	Change all MNTQUE references to MDRQUE
	QSRMDA	Add D$INIT to initialize the MDA system
		Add D$CMDR to create an entry in the MDR queue.

322	QSRMAC	Change the disk mount block type codes so that they fall in
		line with the tape block codes.
		Add 2 new block types, .MDNAM, .MDACT for the user
		number, the user name, and the users account string.
	QSRMDA	Add the block processors for the new codes.

323	QSRMAC	Impliment Base Level -3 of MDA . Make Mucho changes/refinements
		to the MDA structures. Update all the Pictures for all QUASAR
		structures. Delete the File Retrieval cancel msg Structure.
	QSRT10	Add code for Initialization to build the UCB chain.
		Add routine I$OMNT to parse operator mount messages and
		send them off to the correct msg processor.
		Delete all U$xxxx routines and/or modify them to be I$xxxx.
	QSRQUE	Make Q$LOGOUT exit through the MDA logout processor D$LOGOUT.
	QSRMDA	Add mucho code to support base level -3 of MDA. This base level
		supports tape mounts (no AVR) and replaces the UMOUNT/OMOUNT
		interface for tapes.
	QSRDSP	Cleanup/fix the tape/disk mount queue display routine to use
		the MDA structures.

324	QSRMAC	Add Volume status (on-line/offline) message block definitions

325	QSRMAC	Delete the file archiving cancel message decsriptions
	QSRT20	Delete the code in I$RMCH for matching file archiving
		requests since the cancel message is going to look just
		like all other cancel messages.

326	QSRMAC	Add /NOTE:, /BEGIN:, and /PRIORITY: to the list of short
		create blocks.
	QSRADM	Make D60CND set the IBM node offline. Make A$OSND send
		the message if the destination node is an IBM station.
	QSRSCH	Make RSETUP set an IBM node Online if the setup is %RSUOK.
		Make RSETUP set the IBM node offline if the response if
		%RSUDE and we were setup prior to getting the response to
		setup.
	QSRMDA	Make some mods to get MDA code running on the -20.
	QSRDSP	Delete/Change D$SHRT (Show route tables) so that it dumps
		the network data base.
		Make D$SMNT dump the remarks if /ALL is specified.
		Add code for /SCRATCH in D$SMNT.
	QSRQUE	Add processing routines CRQNTE, CRQBGN, and CRQPRI for new
		short create message blocks.

327	QSRT20	Make I$CACV get the user number from the EQ.
		Re-arrange some code in I$DFEQ to make sure .EQOID is
		defaulted before account validation

330	QSRT20 	Fix a bug in the file archiving notification code which
		caused a DTL stopcode. Must asve AP across the NSNDIT
		subroutine call.

331	QSRMDA	Add finishing touches on volume switch support (tape).
		Put up latest version for everyone to use.
	QSRDSP	Add REMARK and LABEL TYPE on tape Q display

332	QSRMAC	Add error code CIU.
	QSRMDA	Fix a bug in MDA Identify code to prevent OPR from identifying
		the users current tape as the user next tape in volume switch.
	QSRT10	Delete temporary code for setting/clearing DVCMDA.

333	QSRMAC	Add new Message type .QOREW for MDA Tape Rewind
	QSRMDA	Add code to support the new rewind function
	QSRT10	Fix a bug (MDA) so that if the device is not available,
		we don't lite the AVR bit on startup.

334	QSRMAC	Add Error Code ICD, Illegal Connected Directory Specified.
		Modify the setup msg block for passing DN60 line conditioning
		block
	QSRT20	Return Error ICD if Connected directory error
		Add a WTO for a File Retrieval Request.
	QSRNET	Remove IBM check from N$NODE and only return TRUE is online
	QSRSCH	Re-Work S$RSETUP and remove the old DN60 crocks and add some
		new ones
		Delete routine CHKNODE and put the node online/offline checking
		in the scheduler and the object validation in GETOBJ(QSRADM).
		Modify SETUP to pass a correct DN60 line conditioning block
		to the spoolers.
	QSRADM	Delete the DN60 line conditioning routines (They're moving to
		the spoolers) and re-work the DN60 support code.
		Add some more object validation to GETOBJ.
	QSRMDA	Move the PUSHJ P,UNLOAD from CHKVOL to the device status msg
		processing routine.

335	QSRMAC	Expand the node went away message so that we can stuff the
		port,,line number in .OFLAG and lite %ONLINE in .MSFLG to
		make it a Node Online Message.
	QSRADM	Add code in KILPSB so that if we are killing a processor for
		an IBM remote, we set the node offline
	QSRNET	Add entry points N$NONL (online) and N$NOFF (offline) for IBM
		online/offline processing. Have it send a node-went-away or
		node-came-online message to Orion.
	QSRSCH	Make the RSETUP routines call N$NONL & N$NOFF for IBM remotes.

336	QSRMAC	Add .FPF8B for 8 bit files
	QSRSCH	Add DN60 Node offline call to the shutdown code.
		Also, send the setup msg to DN60 devices regardless of
		requests in the queue.
	QSRADM	Delete the code to set an IBM node offline in SHUTDOWN NODE

337	QSRDSP	Add support to the show status processor for the emulation
		spooler. If the emulation spooler is running, send the status
		message to it so that it can generate the ack back to the OPR.

340	QSRT10	Modify I$IPS so that it works the same on both the -10 and 
		-20. That is, if the message being sent is greater then the
		maximum packet size, then allow it to be sent anyway. We
		did this by allocating a page for the message and sending
		a page instead of a packet. This allows for GALAXY debugging
		where IP.CFL would not.

341	QSRSCH	TOPS20 QAR (20-00605) Delete the spooling to tape check
		in OUTFJB.

342	QSRADM	Add DN60 Signon support to DEFINE and SET NODE commands.
	QSRMAC	Add Node Status Bit NETSGN for Node Signon Required.
	QSRDSP	Modify D$NPRM to display Signon Required info

343	QSRMAC	Add a new status bit to the EQ for account validation required.
		Delete OBJECT status bit OBSAVW.
	QSRT10	Start adding code to support disk units in MDA. Build the
		UCB's and VOL's for disk drives in I$INIT.
		Make I$SACV always return true.
	QSRSCH	Delete the JUMPF .RETF following the call to I$SACV
		in NEXTJB. 
		Delete the JUMPF SCHD.4 following the PUSHJ P,SCHSCH(P2)
		in SCHD.2
		Change the PUSHJ P,EQDFLT at BINDEF to PUSHJ P,INPDEF
	QSRNET	In N$NONL, change the check for .OTIBM to .OTBAT
		Also, only send the Node online/node offline message to
		ORION if the node is termination
	QSRADM	In A$HELLO, $LOG the processor signon event.
		In KILPSB, $LOG the deletion of a PSB.
	QUASAR	Add support for account validation response from ACTDAE,
		so that we dispatch to the correct routine.

344	QSRSCH	Add OBSSIP to S$SHUT code to check if setup in progress for
		shutting down an object
	QSRADM	Add OBSSIP to A$SHUT to check for setup in progress when
		shutting down an object
	QSRDSP	Remove label type from /ALL Mount Queue Listing

345	QSRADM	Change A$OSHT to remove the OBSSIP bit check added above. 
		Instead, make A$OSHT call S$SHUT to shut down the object.
		Also, change SHUTNO to call S$SHUT to shut down an object.
	QSRT20	Zero the VL.SCR (chkp.5-2) bit if MOUNTR passes back a 
		Volume ID

346	QSRSCH	Add a hack (should be removed asap) to correct a problem
		in BINDEF where the CNOD limit word can get trashed by
		the call to INPDEF. Save the CNOD limit word across the call.

347	QSRT20	Modify I$AGE so that it always returns a value. If the
		calculated time difference is 0, then return 1 second.
	QSRT10	Same as Above.

350	QSRT20	Change the file archiving message processor so that it fills
		in the node name in the ROB and includes the object block in
		the $WTO that gets sent to the OPR. This will enable an 
		operator to screen out file retrieval messages.

	\	;End Of Revision History
SUBTTL	Accumulator Definitions


	AP==13			;ARGUMENTS FOR ALL M$xxxx ROUTINES

	E==14			;QUEUE ENTRY POINTER

	H==15			;QUEUE HEADER POINTER

	M==16			;MESSAGE POINTER
SUBTTL	Symbols derived from GALCNF

; DEFINE FEATURE TESTS SO THAT EACH MODULE NEED ONLY SEARCH QSRMAC

	XP	FTRQUE,FTRQUE		; ON = KEEP A REDUNDANT MASTER QUEUE
	XP	FTRJE,FTRJE		; ON = ADD RJE SUPPORT TO SPOOLERS
	XP	FTDN60,FTDN60		; ON = ADD DN60 SUPPORT TO SPOOLERS

; DEFINE BATCH JOB PARAMETERS

	XP	INPMAX,^D30		;DEFAULT MAX BATCH STREAMS STARTED.
	XP	INPTIM,G.ITIM		;DEFAULT BATCH JOB TIME LIMIT
	XP	INPCOR,G.ICOR		;DEFAULT BATCH JOB CORE LIMIT
	XP	INPPGS,G.ILPT		;DEFAULT PAGE LIMIT
	XP	INPCDS,G.ICDP		;DEFAULT PUNCHED CARD LIMIT
	XP	INPPTP,G.IPTP		;DEFAULT PAPER TAPE LIMIT
	XP	INPPLT,G.IPLT		;DEFAULT PLOTTER TIME
	XP	INPOIP,1		;OPERATOR INTERVENTION PARAMETER
	XP	INPLOG,G.ILOG		;BATCH /OUTPUT: DEFAULT

; DEFINE SPOOLING SYSTEM PARAMETERS

	XP	SPLPRI,G.DPRI		;PRIORITY FOR SPOOLED REQUESTS
	XP	MXUPRI,G.SPRI		;MAXIMUM USER PRIORITY
	XP	SPLMBC,G.NMBC		;NUMBER OF MINUTES BETWEEN CHECKPOINTS

	XP	FRMNOR,G.DNOR		;NAME OF "NORMAL" FORMS
	XP	FRMUNI,G.DNUC		;NUMBER OF UNIQUE CHARACTERS IN THE NAME
	XP	FLEACT,G.FLEA		;FORMS LIMIT EXCEEDED ACTION

		FRMSK1==MASK.(6*FRMUNI,6*FRMUNI-1)	;ANDX, LOAD MASK
		FRMSK2==MASK.(^D36-6*FRMUNI,^D35)	;TXZ STYLE MASK

	XP	LPTDIV,G.LPTD		;DIVISOR FOR CNVRTNG DSK BLKS TO PAGES
	XP	LPTMUL,G.LPTM		;MULTIPR FOR CNVRTNG DSK BLKS TO PAGES

	XP	CDPDIV,G.CDPD		;DIVISOR FOR CNVRTNG DSK BLKS TO CARDS
	XP	CDPMUL,G.CDPM		;MULTIPR FOR CNVRTNG DSK BLKS TO CARDS

	XP	PTPDIV,G.PTPD		;DIVISOR FOR CNVRTNG DSK BLKS TO FEET
	XP	PTPMUL,G.PTPM		;MULTIPR FOR CNVRTNG DSK BLKS TO FEET

	XP	PLTDIV,G.PLTD		;DIVISOR FOR CNVRTNG DSK BLKS TO FEET
	XP	PLTMUL,G.PLTM		;MULTIPR FOR CNVRTNG DSK BLKS TO FEET

;FAILSOFT SYSTEM PARAMETERS

	XP	FSSSTR,G.QSTR		;FILE-STRUCTURE FOR MASTER QUEUES
SUBTTL	Changable System Parameters

DEFINE PARAM(SYM,VAL,MIN,MAX),<
	IFDEF SYM,<
		IFL <SYM-MIN>,<PRINTX VALUE OF SYM IS TOO SMALL>
		IFG <SYM-MAX>,<PRINTX VALUE OF SYM IS TOO LARGE>
	>  ;END IFDEF SYM
	IFNDEF SYM,<SYM==VAL>
>  ;END DEFINE PARAM

	PARAM(EQLMSZ,6,1,20)		;EQ LIMITS WORDS
	PARAM(EQCKSZ,5,5,200)		;SIZE OF REQUEST CHECKPOINT AREA
	SYSPRM	EQNMSZ,2,10		;.EQOWN SIZE IN WORDS
	SYSPRM	VSNLEN,10,2		;VOLUME SET NAME LENGTH IN WORDS
	PARAM(STSSIZ,21,21,200)		;SIZE OF STATUS AREA IN OBJ AND CHKPNT
	PARAM(TIMONA,3,1,74)		;MINUTES TO WAIT FOR OBJ NOT AVAIL
	PARAM(OBPRSZ,5,5,200)		;NUMBER OF WORDS OF OBJECT PARAMS
SUBTTL	Abbreviations Used in QUASAR-10

COMMENT \

Abbreviation	Meaning
------------	-------

    ITN		Internal Task Name
    PDB		Packet Data Block (for IPCF)
    PSB		Program Status Block
    RQP		Relative Queue Pointer
    NJP		Number of Jobs being Processed
    DPA		Disk Page Address
    IDS		Internal Device Specifier
    CSM		Canonical SPOOL Message
    CLM		Canonical LOGOUT Message
    RDB		Request Descriptor Block

\
	SUBTTL	RDB  --  Request Descriptor Block

;THE REQUEST DESCRIPTOR BLOCK IS THE DATA-STRUCTURE USED TO REPRESENT
;	A REQUEST OR SET OF REQUESTS.  IT CONSISTS OF A JOBNAME WITH
;	WILDCARDS AND A POSITIVE MASK, A SEQUENCE NUMBER (WHICH IF 0
;	IMPLIES ALL JOBS WHICH FIT THE REST OF THE CRITERIA), AND AN
;	OPERATING SYSTEM DEPENDENT OWNER SPECIFIER WITH WILDCARDS.

;	!-------------------------------------------------------!
;	!                  SPECIFIED JOB NAME                   !
;	!-------------------------------------------------------!
;	!                     JOB NAME MASK                     !
;	!-------------------------------------------------------!
;	!               EXTERNAL SEQUENCE NUMBER                !
;	!-------------------------------------------------------!
;	!                 REQUEST ID NUMBER                     !
;	!-------------------------------------------------------!
;	                                                       
;	                 -----  TOPS10  -----                  
;	!                                                       !
;	!-------------------------------------------------------!
;	!              OWNER IDENTIFICATION (PPN)               !
;	!-------------------------------------------------------!
;	!                     OWNER ID MASK                     !
;	!-------------------------------------------------------!
;	
;	                 -----  TOPS20  -----                  
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	/            SPECIFICATION OF REQUEST OWNER             /
;	/                                                       /
;	/                                                       /
;	!                                                       !
;	!=======================================================!

	PHASE	0

.RDBJB:! BLOCK	1			;JOB NAME (SIXBIT)
.RDBJM:! BLOCK	1			;JOB NAME MASK
.RDBES:! BLOCK	1			;EXTERNAL SEQUENCE NUMBER
.RDBRQ:! BLOCK	1			;REQUEST ID NUMBER

TOPS10 <
.RDBOI:! BLOCK	1			;OWNER ID
.RDBOM:! BLOCK	1			;OWNER ID MASK
>  ;END TOPS10 CONDITIONAL

TOPS20 <
.RDBOW:! BLOCK	10			;REQUEST OWNER SPEC
>  ;END TOPS20 CONDITIONAL

RDBSIZ:!
	DEPHASE
	SUBTTL	ROB  --  Requested Object Block

;The ROB is used in any context where an object and
;	some attributes (or a particular object) must be specified.

;	!=======================================================!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!     DEVICE ATTRIBUTES     !   PHYSICAL UNIT NUMBER    !
;	!-------------------------------------------------------!
;	!                       NODE NAME                       !
;	!-------------------------------------------------------!
;	!              CUSTOMER DEFINED ATTRIBUTES              !
;	!=======================================================!

	PHASE	0

.ROBTY:! BLOCK	1			;OBJECT TYPE
.ROBAT:! BLOCK	1			;ATTRIBUTES (DEC)
	RO.PHY==1B0			;PHYSICAL UNIT SPECIFIED

	RO.ATR==-1,,0			;DEVICE ATTRIBUTES (SHORT CREATE ONLY)
	  %LOWER==1			;LOWER CASE DEVICE (SHORT CREATE ONLY)
	  %UPPER==2			;UPPER CASE DEVICE (SHORT CREATE ONLY)
	  %PHYCL==3			;PHYSICAL DEVICE   (SHORT CREATE ONLY) 
	  %GENRC==4			;GENERIC DEVICE    (SHORT CREATE ONLY) 

	RO.UNI==0,,-1			;PHYSICAL UNIT NUMBER
					;OTHER ATTRIBUTES ARE DEFINED
					; WITH THE OBJ DEFINITIONS
.ROBND:! BLOCK	1			;NODE NAME
.ROBUA:! BLOCK	1			;CUSTOMER DEFINED ATTRIBUTES

ROBSIZ:!

	DEPHASE
SUBTTL	DIB  --  Dependency Information Block

;Each job has a Dependency List associated with it.  Each entry in the
;	list is a DIB which describes one dependency which the job has.

	PHASE	0

.DIBDS:! BLOCK	1			;DEPENDENCY STATUS
	DI.SAT==1B0			;SATISFIED LAST PASS (FOR LIST MOSTLY)
	DI.TYP==0,,-1			;DEPENDENCY TYPE

.DIBDT:! BLOCK 1			;DEPENDENCY DATA

DIBSIZ:!

	DEPHASE


;Currently defined dependencies

;	Symbol		Value		Data
;	------		-----		-------------------------------

	.DTSTR==	1		;Adr of STR queue entry for structure
SUBTTL	QH   --  Queue Header Definitions

;	!=======================================================!
;	!        QUEUE NAME         !    FLAGS    ! QUEUE TYPE  !
;	!    3 SIXBIT CHARACTERS    !             !             !
;	!-------------------------------------------------------!
;	!      POINTER TO LAST      !     POINTER TO FIRST      !
;	!    ENTRY IN THIS QUEUE    !    ENTRY IN THIS QUEUE    !
;	!-------------------------------------------------------!
;	!    BASE OF SCHEDULING     ! SIZE OF AN  !# OF LIST PGS!
;	!   AND LINKING ALGORITHM   !    ENTRY    !  LAST TIME  !
;	!-------------------------------------------------------!
;	!   PTR TO FIRST ENTRY      !    PTR TO LAST ENTRY      !
;	!-------------------------------------------------------!
;	!                 SIZE OF EACH ENTRY                    !
;	!=======================================================!

	PHASE	0

.QHTYP:! BLOCK	1		;QUEUE TYPE WORD
	QH.NAM==-1,,0		;3 CHARACTER QUE NAME
	QH.FLG==777B26		;FLAGS
		QH.IPC==1B18	;QUEUE FOR IPCF, ADD IN G$MPS TO SIZE
		QH.INV==1B19	;OBJECT IS INVISIBLE
	QH.TYP==777B35		;QUEUE TYPE
		.QHTQS==0	;INTERNAL TO QUASAR
		.QHTOU==1	;AN OUTPUT QUEUE
		.QHTIP==2	;AN INPUT QUEUE
		.QHTMD==3	;MOUNTABLE DEVICE QUEUE
		.QHFRR==4	;FREE RUNNING DEVICE QUEUE
		.QHTAR==5	;ARCHIVE SYSTEM QUEUE

.QHLNK:! BLOCK	1		;LINK WORD
	QH.PTL==-1,,0		;POINTER TO LAST ENTRY
	QH.PTF==0,,-1		;POINTER TO FIRST ENTRY

.QHPAG:! BLOCK	1		;STORAGE INFORMATION
	QH.SCH==-1,,0		;SCHEDULER ENTRY VECTOR
		SCHLNK==0	;   LINK IN
		SCHSCH==1	;   SCHEDULE
		SCHDEF==2	;   FILL IN DEFAULTS FOR CREATE
		SCHMOD==3	;   PREFORM QUEUE DEPENDENT MODIFY
		SCHRJI==4	;   RELEASE JOB-OBJECT INTERLOCK
		SCHFJB==5	;   FIND A JOB FOR AN OBJECT

	QH.SIZ==777B26		;SIZE OF EACH ENTRY

.QHLIS:! BLOCK	1	;LIST FLAG (LIQxxx)
.QHAFT:! BLOCK	1	;AFTER TIME OF BEST AFTER JOB

QHSIZE:!			;SIZE OF A QUEUE HEADER

	DEPHASE
SUBTTL	QE   --  Queue Entry Definitions

;	!=======================================================!
;	!     LINK TO PREVIOUS      !       LINK TO NEXT        !
;	!  0 IF THIS IS THE FIRST   !  0 IF THIS IS THE FIRST   !
;	!=======================================================!
;	!  CREATION TIME OF ENTRY (INTERNAL DATE/TIME FORMAT)   !
;	!-------------------------------------------------------!
;	!      POINTER TO OBJECT QUEUE ENTRY FOR THIS REQ       !
;	!-------------------------------------------------------!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	/                                                       /
;	/                REQUESTED OBJECT BLOCK                 /
;	/                                                       /
;	!-------------------------------------------------------!
;	/                                                       /
;	/                 JOB INFORMATION BLOCK                 /
;	/                                                       /
;	!-------------------------------------------------------!
;	!                           !  DEPENDENCY LIST NUMBER   !
;	!-------------------------------------------------------!
;	!                   ENTRANCE PRIORITY                   !
;	!-------------------------------------------------------!
;	!   THE PROTECTION FIELD    !                           !
;	!-------------------------------------------------------!
;	!    DEADLINE PARAMETER (INTERNAL DATE/TIME FORMAT)     !
;	!-------------------------------------------------------!
;	!                                                       !
;	!               REQUEST LIMIT INFORMATION               !
;	!             CONTENTS ARE QUEUE DEPENDENT              !
;	!                        5 WORDS                        !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                       NOTIFY ID                       !
;	!-------------------------------------------------------!
;	!     BATCH JOB NUMBER      !     USER'S JOB NUMBER     !
;	!-------------------------------------------------------!
;	!     DISK PAGE ADDRESS     !                           !
;	!-------------------------------------------------------!
;	
;	!                 -----  TOPS 20  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                OWNER (LOGGED IN USER)                 !
;	!                      (10 WORDS)                       !
;	!-------------------------------------------------------!
;	!             CREATOR'S CONNECTED DIRECTORY             !
;	!                      (12 WORDS)                       !
;	!=======================================================!
	PHASE	0

.QELNK:! BLOCK	1		;LINK WORD
	QE.PTP==-1,,0		;POINTER TO PREVIOUS ENTRY
	QE.PTN==0,,-1		;POINTER TO NEXT ENTRY

QEHSIZ:!			;SIZE OF QUEUE-ENTRY-HEADER

.QECRE:! BLOCK	1		;INTERNAL CREATION TIME OF THIS ENTRY
.QEOBJ:! BLOCK	1		;POINTER TO OBJECT SERVICING THIS REQUEST
.QEITN:! BLOCK	1		;INTERNAL TASK NAME
	QE.AVO==770000,,00	;ACCT VALIDATION OBJECT TYPE (-10 ONLY)
	QE.AVI==007777,,-1	;ACCT VALIDATION ITN (-10 ONLY)
.QEROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
.QEJBB:! BLOCK	JIBSIZ		;JOB INFORMATION BLOCK
.QEDIN:! BLOCK	1		;DEPENDENCY INFORMATION
	QE.DLN==0,,-1		;DEPENDENCY LIST NUMBER
.QEIPR:! BLOCK	1		;ENTRANCE PRIORITY FOR THIS ENTRY
.QEPRT:! BLOCK	1		;REQUEST PROTECTION
	QE.PRO==-1,,0		;THE PROTECTION FIELD
.QEDED:! BLOCK	1		;DEADLINE PARAMETER
.QELIM:! BLOCK	EQLMSZ		;LIMITS WORDS
.QENID:! BLOCK	1		;/NOTIFY ID (LOGIN TIME, PID, DIRECTRY NBR)
.QEJBN:! BLOCK	1		;JOB NUMBERS (For /NOTIFY)
	QE.UJN==0,,-1		;USERS JOB NUMBER (ORIGIONAL JOB NUMBER)
	QE.BJN==-1,,0		;BATCH JOB NUMBER
.QESTN:! BLOCK	1		;REMOTE INFORMATION
	QE.DPA==-1,,0		;DISK PAGE ADDRESS
TOPS20 <
.QEOWN:! BLOCK	10		;REQUEST OWNER
.QECON:! BLOCK	12		;CONNECTED DIRECTORY
> ;END TOPS20

QNTSIZ:!			;SIZE OF THE QUEUE ENTRY
	SUBTTL JOB INFORMATION BLOCK (.QEJBB) DESCRIPTION




		.QEJOB==.QEJBB+JIB.JN	;EXTERNAL JOB NAME
		.QESEQ==.QEJBB+JIB.SQ	;EXTERNAL VALUES
		   QE.SEQ==-1,,0	;EXTERNAL SEQUENCE NUMBER
		   QE.ACT==1B21		;REQUEST REQUIRES ACCOUNT VALIDATION
		   QE.IAS==1B22		;REQUEST CONTAINS IN INVALID ACCT STRING
		   QE.NOT==3B24		;JOB REQUESTED /NOTIFY
		      %NOTTY==1		;NOTIFY VIA USERS TTY
		      %notml==2		;NOTIFY USER VIA MAIL
		      %notjb==3		;NOTIFY USERS JOB
		   QE.JBC==1B25		;JOB HAS BEEN CHECKPOINTED
		   QE.HBO==1B26		;JOB HELD BY OPERATOR
		   QE.PRV==1B27		;REQUEST CREATOR WAS PRIVILEGED
		   QE.SPL==1B28		;THIS REQUEST CONTAINS SPOOLED FILES
		   QE.RDE==1B29		;THIS REQUEST DOESN'T EXIST (CLEAN-UP)
		   QE.PRI==77B35	;EXTERNAL PRIORITY
		.QEOID==.QEJBB+JIB.US	;OWNER IDENTIFIER
		.QERID==.QEJBB+JIB.ID	;REQUEST ID.
TOPS10 <
		.QEUSR==.QEJBB+JIB.NM	;USER'S NAME (2 WORDS)
>

	DEPHASE
SUBTTL	OBJ  --  Object Queue

;For each object on the system, known to QUASAR, an entry in the OBJ queue
;	is made.  This queue is used for scheduling and for interfacing with
;	the operator control.

;	!=======================================================!
;	!                   Object type code                    !
;	!-------------------------------------------------------!
;	!               Unit number of this type                !
;	!-------------------------------------------------------!
;	!                  Node name in SIXBIT                  !
;	!-------------------------------------------------------!
;	!              PID which has object setup               !
;	!-------------------------------------------------------!
;	!   	    ITN of request currently on OBJect     	!
;	!-------------------------------------------------------!
;	!SCHEDULER STATE INFORMATION!  QUEUE HEADER FOR OBJECT  !
;	!-------------------------------------------------------!
;	!                   OBJect Timer Word                   !
;	!-------------------------------------------------------!
;	!            OBJect Attributes (DEC defined)            !
;	!-------------------------------------------------------!
;	!         OBJect Attributes (Customer defined)          !
;	!-------------------------------------------------------!
;	\           5 Word Object specific parameter            \
;	\                         area                          \
;	!-------------------------------------------------------!
;	!              CURRENT DEVICE STATUS CODE               !
;	!       (FILLED IN BY QUASAR, UPDATED BY SPOOLER)       !
;	!-------------------------------------------------------!
;	\               Current status, expressed               \
;	\                 in as an ASCIZ string                 \
;	!=======================================================!

;Define a macro which will allow a mapping between an object type
;	and various object-type specific data like the queue in
;	which jobs for that object reside, initial object parameters
;	etc.
;
;Format for each line is:
;	X	obj,que,<p1,p2,p3,p4,p5>
;
;where		obj is the object type specified as the XXX in .OTXXX
;		que is the queue in which jobs reside for this object
;		p1 - p5 are the initial contents of the 5 parameter
;			words when an object entry is created.
;			These are a single macro argument.

DEFINE	MAPOBJ,<
	X	BAT,INP,<<1,,77>,<0,,^D3600>,0,<INPOIP,,0>,<1,,^D512>>
	X	LPT,LPT,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	PTP,PTP,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	CDP,CDP,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	PLT,PLT,<<1,,77>,<1,,^D500>,<FRMNOR>,<FLEACT,,0>,0>
	X	RDR,RDR,<0,0,0,0,0>
	X	BIN,BIN,<0,0,0,0,0>
	X	DBM,DBM,<0,0,0,0,0>

   TOPS20 <
	X	XFR,XFR,<0,0,0,0,0>
	X	RET,RET,<0,0,0,0,0>
	X	NOT,NOT,<0,0,0,0,0>
          > ;END TOPS20

>  ;END DEFINE MAPOBJ

;OBJ definitions are on the following page
	PHASE	QEHSIZ		;APPEND TO QUEUE ENTRY HEADER

OBJTYP:! BLOCK	1			;OBJECT TYPE
OBJUNI:! BLOCK	1			;UNIT NUMBER OF THIS TYPE
OBJNOD:! BLOCK	1			;NODE THAT THIS UNIT IS ON
OBJPID:! BLOCK	1			;PID WHICH HAS THIS OBJ SETUP
OBJITN:! BLOCK	1			;ITN OF CURRENT REQUEST ON OBJECT
OBJSCH:! BLOCK	1			;SCHEDULER STATE INFORMATION
	OBSSTA==1B0			;OBJECT IS STARTED
	OBSSUP==1B1			;OBJECT IS SETUP
	OBSBUS==1B2			;OBJECT IS BUSY
	OBSSIP==1B3			;SETUP IN PROGRESS
	OBSIGN==1B4			;IGNORE THIS FOR A WHILE
	OBSDAA==1B5			;DEVICE (DEC) ATTRIBUTES AVAILABLE
	OBSSEJ==1B6			;SHUTDOWN AT END-OF-JOB
	OBSINV==1B7			;OBJECT IS INVISIBLE
	OBSINT==1B8			;DO AN INTERNAL SHTDWN WHEN QUEUE EMPTYS
	OBSHUT==1B9			;OBJECT IS INTERNALLY SHUTDOWN
	OBSFRR==1B10			;A FREE RUNNING DEVICE.
	OBSSTP==1B11			;STOPPED BY THE OPERATOR
	OBSSPL==1B13			;OBJECT IS SPOOLING TO TAPE
	OBSQUH==0,,-1			;ADDRESS OF QUEUE HEADER FOR OBJECT
OBJTIM:! BLOCK	1			;OBJECT TIMER
OBJDAT:! BLOCK	1			;DEC-DEFINED ATTRIBUTES
OBJCAT:! BLOCK	1			;CUSTOMER-DEFINED ATTRIBUTES
OBJPRM:! BLOCK	OBPRSZ			;DEPENDENT PARAMETERS
OBJSTS:! BLOCK  1			;CURRENT DEVICE STATUS CODE 
					;FILLED IN BY QUASAR, UPDTED BY SPOOLER
OBJST1:! BLOCK	STSSIZ			;CURRENT JOB STATUS IN ASCIZ
					;UPDATED BY THE SPOOLER

OBJSIZ:!				;SIZE OF AN OBJ QUEUE ENTRY


;DEFINITIONS OF WORDS WITHIN THE OBJPRM BLOCK

;COMMON MASKS
	OBPMIN==-1,,0			;MINIMUM VALUE
	OBPMAX==0,,-1			;MAXIMUM VALUE

;OUTPUT PARAMETERS (PRINTERS, PAPERTAPE, CARDPUNCH, PLOTTER)

	.OOPRI==0			;MIN AND MAX EXTERNAL PRIORITY
	.OOLIM==1			;MIN AND MAX OUTPUT LIMITS
	.OOFRM==2			;FORMS TYPE
	.OOFLG==3			;OUTPUT FLAGS
	   .OFLEA==-1,,0		;FORMS LIMIT EXCEEDED ACTION
	.OOTAP==4			;SIXBIT DEVICE NAME FOR SPOOLING TO TAPE
	;CONTINUED FROM THE PREVIOUS PAGE

;BATCH-STREAM PARAMETERS

	.OBPRI==0			;MIN AND MAX EXTERNAL PRIORITY
	.OBTIM==1			;MIN AND MAX RUNTIME LIMITS
	.OBFLG==3			;BATCH STREAM FLAGS
	   .OPRIN==-1,,0		;OPERATOR INTERVENTION FLAG
	       .OPINY==1		;ALLOW OPERATOR INTERVENTION JOBS
	       .OPINN==2		;NO OPERATOR INTERVENTION JOBS
	.OBCOR==4			;MIN AND MAX CORE LIMITS

;Retrieve-stream parameters

	.OBSTM==0			;Time stamp and flag
	.OBTAP==1			;Tape ID
	.OBSSN==2			;Saveset,,tape file #
	  OB.SSN==-1,,0			;Saveset
	  OB.TFN==0,,-1			;Tape file number
;OBJECT ATTRIBUTES (DEC)
;	(RESERVE BIT  0 FOR "PHYSICAL UNIT" SPECIFICATION BY THE USER)

;PRINTERS
	OBDLLC==1B1			;LOWERCASE PRINTER
	OBDLUC==1B2			;UPPERCASE PRINTER


	DEFINE	STATUS,<
	XLIST
		X	<Invalid>,%INVLD,100
		X	<Idle>,%IDLE,0
		X	<Active>,%ACTIV,0
		X	<Stopped>,%STOPD,0
		X	<Not Started>,%NSTRT,0
		X	<Not Available>,%NAVAL,0
		X	<No Ptys>,%NPTYS,.OTBAT
		X	<Offline>,%OFLNE,<.OTLPT,.OTPTP,.OTCDP,.OTPLT,.OTRDR>
		X	<System Full>,%SFULL,.OTBAT
		X	<Shutting Down>,%SHTDN,0
		X	<Aborting>,%CNCLG,0
		X	<Opr Resp Wait>,%OREWT,0
		X	<Aligning Forms>,%ALIGN,.OTLPT
		X	<>,%RESET,0
		X	<Reading>,%READN,.OTRDR
		X	<Requeing>,%REQUE,0
		X	<Shutting Down>,%SHUTD,0
		X	<Opr Output Wait>,%OPRWT,.OTLPT
	LIST
	>  ;END STATUS MACRO


	XXXX==0

	DEFINE X(A,SYM,VAL),<
	   SYM==XXXX
	XXXX==XXXX+1
	>


	;DEFINE THE OBJECT STATUS CODES

		STATUS

	;DEFINE THE HIGHEST STATUS CODE

		%STMAX==XXXX-1
SUBTTL	PSB  --  Processor Status Block

;	!=======================================================!
;	\                                                       \
;	\                The Queue Entry Header                 \
;	\                                                       \
;	!=======================================================!
;	!                   Process ID  (PID)                   !
;	!-------------------------------------------------------!
;	!                     Program Name                      !
;	!-------------------------------------------------------!
;	!  Current number of jobs   !  Maximum number of jobs   !
;	!-------------------------------------------------------!
;	!           Flags           !  Number of OBJect types   !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                 List of object types                  \
;	\                                                       \
;	\                  Maximum of 5 types                   \
;	!                                                       !
;	!=======================================================!


	PHASE	QEHSIZ			;APPEND TO THE QUEUE ENTRY HEADER
PSBPID:! BLOCK	1			;PROGRAM'S PID
PSBNAM:! BLOCK	1			;PROGRAM NAME
PSBLIM:! BLOCK	1			;CURRENT AND MAX NUMBER OF JOBS
	PSLCUR==-1,,0			;CURRENT NUMBER OF JOBS
	PSLMAX==0,,-1			;MAXIMUM NUMBER OF JOBS
PSBFLG:! BLOCK	1			;FLAGS AND NUMBER OF OBJ TYPES
	PSFNOT==0,,-1			;NUMBER OF OBJECT TYPES
PSBOBJ:! BLOCK	OBPRSZ			;LIST OF OBJECTS (UP TO OBPRSZ)

PSBSIZ:!				;SIZE OF A PSB

	DEPHASE
SUBTTL	SPL  --  Spool Queue Definition

;	!=======================================================!
;	/                                                       /
;	/                THE QUEUE ENTRY HEADER                 /
;	/                                                       /
;	!=======================================================!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!        JOB NUMBER         !     RETRIEVAL POINTER     !
;	!-------------------------------------------------------!
;	!                      FORMS TYPE                       !
;	!-------------------------------------------------------!
;	!                    AFTER PARAMETER                    !
;	!-------------------------------------------------------!
;	!                      NOTE FIELD                       !
;	!                       (2 WORDS)                       !
;	!-------------------------------------------------------!
;	!                           !      REQUEST LENGTH       !
;	!=======================================================!

	PHASE	QEHSIZ		;APPEND TO THE QUEUE ENTRY HEADER

SPLOID:! BLOCK	1		;OWNER'S ID
SPLROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
SPLJOB:! BLOCK	1		;JOB INFORMATION
	SPYJOB==-1,,0		;THE JOB NUMBER
	SPYDPA==0,,-1		;THE RETRIEVAL POINTER

SPLFRM:! BLOCK	1		;FORMS TYPE
SPLAFT:! BLOCK	1		;AFTER PARAMETER
SPLNOT:! BLOCK	2		;NOTE FIELD
SPLRQZ:! BLOCK	1		;SIZE OF CURRENT REQUEST
	SPYLEN==0,,-1		;THE LENGTH (FROM .MSTYP)

SPLSIZ:!			;SIZE OF THE SPOOL QUEUE ENTRIES

	DEPHASE

;DURING Q$FSPL, THE SPL QUEUE IS SCANNED TO COMPRESS MULTIPLE SPOOL REQUESTS INTO A
;	SINGLE REQUEST.  THE FOLLOWING DECISIONS ARE MADE WITH THE INPUT BEING
;	THE CURRENT SPOOL MESSAGE FROM THE MONITOR AND THAT QUEUE AND STATION TESTS
;	HAVE SUCCEEDED.

;	  INPUT		CURRENT QUEUE	ACTION

;	STN. GENERIC	STN. GENERIC	APPEND
;	REAL DEVICE	STN. GENERIC	APPEND AND CHANGE TO REAL DEVICE
;	LL:/LU:		STN. GENERIC	APPEND AND CHANGE TO LL: OR LU:

;	STN. GENERIC	REAL DEVICE	APPEND
;	REAL DEVICE	REAL DEVICE	APPEND IF DEVICES MATCH
;	LL:/LU:		REAL DEVICE	NEVER APPEND

;	STN. GENERIC	LL:/LU:		APPEND
;	REAL DEVICE	LL:/LU:		NEVER APPEND
;	LL:/LU:		LL:/LU:		APPEND IF BOTH FOR LL: OR FOR LU:
SUBTTL	STR  --  Structure Queue Definition

	PHASE	QEHSIZ			;APPEND TO QUEUE ENTRY HEADER

IFN FTUUOS,<
STRNAM:! BLOCK	2			;STRUCTURE NAME
>  ;END IFN FTUUOS

IFN FTJSYS,<
STRNAM:! BLOCK	^D16			;STRUCTURE NAME (TOPS-20) MAX 79 CHARS
>  ;END IFN FTJSYS

STRSTS:! BLOCK	1			;STRUCTURE STATUS
	STSSSV==1B0			;STRUCTURE STATUS VALID
	STSONL==1B1			;STRUCTURE IS ONLINE

STRSIZ:!				;SIZE OF THE STR QUEUE ENTRY

	DEPHASE
SUBTTL	NETWORK DATA BASE STRUCTURE


;	!=======================================================!
;	/							/
;	/		THE QUEUE ENTRY HEADER			/
;	/							/
;	!-------------------------------------------------------!
;	!		SIXBIT NODE (NETWORK) NAME		!
;	!-------------------------------------------------------!
;	!		   NODE (NETWORK) NUMBER		!
;	!-------------------------------------------------------!
;	!		ONLINE/OFFLINE STATUS			!
;	!-------------------------------------------------------!
;	!                   ROUTE ENTRY NAME                    !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                ASCIZ NETWORK NODE NAME                \
;	\                                                       \
;	!-------------------------------------------------------!
;	!                  CLEAR TO SEND DELAY                  !
;	!-------------------------------------------------------!
;	!                  RECORDS PER MESSAGE                  !
;	!-------------------------------------------------------!
;	!                   BYTES PER MESSAGE                   !
;	!-------------------------------------------------------!
;	!                  SILO WARNING LEVEL                   !
;	!-------------------------------------------------------!
;	!     NODE PORT NUMBER      !     NODE LINE NUMBER      !
;	!-------------------------------------------------------!
;	!         PORT/LINE HANDLE (FOR DN60 FRONT END)         !
;	!=======================================================!

		PHASE	QEHSIZ
TOPS20 <
	NETCOL:!			;-20 COLLATING SEQ BY NAME
>  ;END TOPS20 CONDITIONAL
	
	NETNAM:! BLOCK	1		;SIXBIT NODE NAME

TOPS10 <
	NETCOL:!			;-10 COLLATING SEQ BY NUMBER
>  ;END TOPS10 CONDITIONAL

	NETNBR:! BLOCK	1		;NODE NUMBER

	NETSTS:! BLOCK	1		;FLAG WORD
	   NT.FLG==770000,,0		;NETWORK FLAG BITS
		NETNSV==1B0		;  ONLINE/OFFLINE STATUS BIT IS VALID
		NETONL==1B1		;  ONLINE
		NETADD==1B2		;  THIS NODE ADDED LAST PASS
		NETIBM==1B3		;  NODE IS DN60 DRIVEN
		NETSHT==1B4		;  NETWORK SHUTDOWN IS IN PROGRESS
		NETSGN==1B5		;  NODE REQUIRES SIGNON PROCESSING
	   NT.TYP==7000,,0		;NETWORK TYPE
		DF.DEC==0		;  'DEC' NODE
		DF.378==1		;  3780 NODE
		DF.278==2		;  2780 NODE
		DF.HSP==3		;  HASP NODE
	   NT.MOD==700,,0		;NETWORK MODE
		DF.TRM==1		;  TERMINATION MODE
		DF.EMU==2		;  EMULATION MODE
	   NT.TOU==70,,0		;PROTOCOL TIMEOUT CATAGORY
		ST.PRI==1		;  PRIMARY
		ST.SEC==2		;  SECONDARY
	   NT.DTR==7,,0			;DATA TERMINAL READY
		ST.ON==1		;  ON
		ST.OFF==2		;  OFF

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	   NT.TRA==700000		;TRANSPARENCY
;		ST.ON==1		;  ON
;		ST.OFF==2		;  OFF
	   NT.XTA==77777		;EXTRA BITS

	NETRTE:! BLOCK	1		;ROUTE ENTRY NAME
	NETASC:! BLOCK	3		;ASCIZ NETWORK NODE NAME
	NETCSD:! BLOCK	1		;CLEAR TO SEND DELAY
	NETRPM:! BLOCK	1		;RECORDS PER MESSAGE
	NETBPM:! BLOCK	1		;BYTES PER MESSAGE
	NETSWL:! BLOCK	1		;SILO WARNING LEVEL
	NETPTL:! BLOCK	1		;PORT,,LINE NUMBER
	   NT.PRT==-1,,0		;NODE PORT NUMBER
	   NT.LIN==0,,-1		;NODE LINE NUMBER
	NETIDN:! BLOCK	1		;PORT/LINE HANDLE (FOR DN60 FRONT END)

	NETSIZ:!

		DEPHASE
SUBTTL	CSM  --  Canonical SPOOL Message

;	!=======================================================!
;	!        JOB NUMBER         !  STATION #  !    FLAGS    !
;	!-------------------------------------------------------!
;	!                      OWNER'S ID                       !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!              ENTERED (GTJFN'ED) FILENAME              !
;	!-------------------------------------------------------!
;	!                   SIZE OF THE FILE                    !
;	!-------------------------------------------------------!
;	!           FLAGS FOR .FPINF OF INCLUDED FILE           !
;	!-------------------------------------------------------!
;	!                      FORMS TYPE                       !
;	!-------------------------------------------------------!
;	!                     OUTPUT LIMIT                      !
;	!-------------------------------------------------------!
;	!                AFTER PARAMETER FOR JOB                !
;	!-------------------------------------------------------!
;	!                      NOTE FIELD                       !
;	!                       (2 WORDS)                       !
;	!-------------------------------------------------------!
;	!                           !     ADDRESS OF THE FD     !
;	!=======================================================!
;	
;	!                 -----  TOPS 10  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                 USER'S NAME IN SIXBIT                 !
;	!                       (2 WORDS)                       !
;	!=======================================================!


	PHASE	0

CSM.JB:! BLOCK	1		;JOB INFORMATION
	CS.JOB==-1,,0		;JOB NUMBER
	CS.LOC==777000		;NODE NUMBER (20-ONLY)
	CS.LOC==777000		;STATION NUMBER.
	CS.FLG==000777		;FLAGS
		CS.DFR==1B27	;DEFERRED MODE SPOOLING

CSM.OI:! BLOCK	1		;OWNER'S ID
CSM.RO:! BLOCK	ROBSIZ		;REQUESTED OBJECT
CSM.EN:! BLOCK	1		;ENTER'ED (GTJFN'ED) FILENAME
CSM.FS:! BLOCK	1		;SIZE OF THE FILE
CSM.FP:! BLOCK	1		;FLAGS FOR .FPINF OF INCLUDED FILE
CSM.FM:! BLOCK	1		;FORMS TYPE
CSM.LM:! BLOCK	1		;OUTPUT LIMIT
CSM.AF:! BLOCK	1		;AFTER PARAMETER FOR JOB
CSM.NT:! BLOCK	2		;NOTE FIELD
CSM.FD:! BLOCK	1		;FILE DESCRIPTOR INFORMATION
	CS.FDA==0,,-1		;ADDRESS OF THE FD TO INCLUDE

IFN FTUUOS,<
CSM.US:! BLOCK	2		;USER NAME (2 WORDS)
>  ;END IFN FTUUOS

CSMSIZ:!			;LENGTH OF THE CANONICAL SPOOL MESSAGE

	DEPHASE
SUBTTL	CLM  --  Canonical LOGOUT Message

;	!=======================================================!
;	!                     FUNCTION CODE                     !
;	!-------------------------------------------------------!
;	!         JOB NUMBER        !       FLAG SETTINGS       !
;	!=======================================================!


	PHASE	0

CLM.FC:! BLOCK	1			;FUNCTION CODE - CONTAINS:
					;	 .IPCSL IF FROM MONITOR
					;        .QIFNC IF INTERNAL
CLM.JB:! BLOCK	1			;JOB INFORMATION
	CL.JOB==-1,,0			;JOB NUMBER
	CL.BAT==1B18			;JOB IS A BATCH JOB
	CL.BQE==0,,-1			;THIS FIELD CONTAINS THE ADDRESS
					; OF THE BATCH JOB REQUEST (.QExxx)
					; IF IT IS AN INTERNAL CALL


CLMSIZ:!				;LENGTH OF THE CANONICAL LOGOUT MESSAGE

	DEPHASE
SUBTTL	The Messages and their respective codes

;THE FOLLOWING PAGES CONTAIN THE FORMAT OF THE VARIOUS MESSAGES WHICH
;	ARE SENT TO OR BY QUASAR TO VARIOUS SYSTEM COMPONENTS.

	   ;EXTERNAL OPERATIONS

		.QOHEL==1	;HELLO - ESTABLISH CONTACT
		.QOREL==2	;RELEASE - FINISHED A REQUEST
		.QOCHE==3	;CHECKPOINT - FAILSOFT A REQUEST
		.QOREQ==4	;REQUEUE - RETURN A REQUEST
		.QONEX==5	;NEXTJOB - REQUEST GIVEN TO A COMPONENT
		.QOABO==6	;ABORT - STOP PROCESSING THAT REQUEST
		.QOCRE==7	;CREATE - MAKE A REQUEST
		.QOLIS==10	;LIST - GET A CROSS SECTION OF THE QUEUES
		.QOMOD==11	;MODIFY - CHANGE THE PARAMETERS OF A REQUEST
		.QOKIL==12	;KILL - REMOVE A REQUEST
		.QOLAN==13	;ANSWER MESSAGE TO LIST REQUEST
		;       14	;FUNCTION 14 OBSOLETE TEXT MSG (.QOOBS)
		.QORCK==15	;CHECKPOINT-REQUEST MESSAGE
		.QODFR==16	;DEFER MESSAGE
		.QOROU==17	;ROUTING CHANGE
		.QOCOU==20	;COUNT MESSAGE
		.QOCAN==21	;COUNT ANSWER MESSAGE
		.QOSUP==22	;SETUP MESSAGE
		.QORSU==23	;RESPONSE-TO-SETUP MESSAGE
		;       24	;FUNCTION 24 OBSOLETE OPR ACTION MSG (.QOOAC)
		.QOHBO==25	;HOLD/RELEASE MESSAGE
		;	26	;MONITOR SPOOL MESSAGE
		;	27	;MONITOR LOGOUT MESSAGE

		.QOMNT==30	;TAPE MOUNT REQUEST (USER TO QUASAR)
		.QOSTU==31	;DEVICE STATUS UPDATE MESSAGE
		.QOMTR==32	;TAPE MOUNT RELEASE MSG (SAME AS .QOREL)
		.QOMTC==33	;TAPE MOUNT CHKPNT MSG (SAME AS .QOCHE)
		.QOMTA==34	;TAPE MOUNT ABORT MSG (QUASAR TO MTCON)
		.QOMAT==35	;TAPE MOUNT ATTRIBUTES REQUEST
		.QONWA==36	;NODE-WENT-AWAY NOTIFICATION MESSAGE
		.QOCQE==37	;CREATE QUEUE ENTRY (SHORT CREATE MSG)
		.QOREC==40	;TAPE RECOGNIZE MESSAGE (QUASAR TO TAPE LABELER)
		.QOTST==41	;TAPE STATUS MESSAGE (TAPE LABELLER TO QUASAR)
		.QOUNL==42	;TAPE UNLOAD MESSAGE (QUASAR TO TAPE LABELLER)
		.QOVMN==43	;TAPE VOLUME IN USE (REASSIGNED)
				;	(QUASAR TO TAPE LABELLER)
		.QOVDM==44	;TAPE VOLUME DEASSIGNED (QUASAR TO TAPE LAB)
		.QOVSR==45	;VOLUME SWITCH REQUEST (TAPE LAB TO QUASAR)
		.QOVSD==46	;VOLUME SWITCH DIRECTIVE (QUASAR TO TAPE LAB)
		.QOREW==47	;TAPE REWIND MESSAGE (QUASAR 2 TAPE LABELER)


	   ;INTERNAL OPERATIONS

		.QIFNC==1B18	;IF BIT 18 IS SET, THE CALL IS INTERNAL
				; AND THE REQUEST MAY BE INTERPRETED
				; DIFFERENTLY THAN EXTERNAL CALLS
		.QIRET==1B19	;If bit 18 is set, this is a
				;monitor archive request, so
				;dont bomb it if queue entry
				;is disabled.
SUBTTL	The HELLO Message -- Function 1

;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                     Program Name                      !
;	!-------------------------------------------------------!
;	!  QUASAR Internal Version  !           Flags           !
;	!-------------------------------------------------------!
;	!  Number of OBJect Types   !  Max no. concurrent jobs  !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                 List of object types                  \
;	\                                                       \
;	\           From 1 to 5 object types allowed            \
;	!                                                       !
;	!=======================================================!

	PHASE	MSHSIZ			;APPEND TO THE MESSAGE HEADER

HEL.NM:! BLOCK	1			;PROGRAM NAME
HEL.FL:! BLOCK	1			;INTERNAL VERSION AND FLAGS
	HEFVER==-1,,0			;INTERNAL VERSION NUMBER (%%.QSR)
	HEFFLG==0,,-1			;MASK FOR FLAGS
	HEFBYE==1B18			;PROCESSOR SAYING "GOOD BYE"
HEL.NO:! BLOCK	1			;NUMBER OF OBJ TYPES AND MAX NO JOBS
	HENNOT==-1,,0			;NUMBER OF OBJECT TYPES
	HENMAX==0,,-1			;MAXIMUM NUMBER OF JOBS
HEL.OB:! BLOCK	OBPRSZ			;LIST OF OBJECTS (UP TO OBPRSZ)

HEL.SZ:!				;SIZE OF THE HELLO MESSAGE

	DEPHASE
SUBTTL The RELEASE Message -- Function 2

;	!=======================================================!
;	/                                                       /
;	/                THE MESSAGE HEADER                     /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!=======================================================!

; EXTRA INFORMATION IS RETURNED BY BATCON DURING ITS RELEASE MESSAGE

;	!=======================================================!
;	!       FLAG SETTINGS       !      THE JOB NUMBER       !
;	!-------------------------------------------------------!
;	/                                                       /
;	/       STANDARD FD AREA DESCRIBING THE LOG FILE        /
;	/  THE LENGTH IS DERIVED FROM THE RELEASE MESSAGE SIZE  /
;	/                                                       /
;	!=======================================================!

	PHASE	MSHSIZ

REL.IT:! BLOCK	1		;INTERNAL TASK NAME

REL.SZ:!			;SIZE OF THE RELEASE MESSAGE

REL.BJ:! BLOCK	1		;BATCH JOB INFORMATION
	RL.DLG==1B0		;DELETE THE LOG FILE AFTER PRINTING
	RL.SPL==1B1		;LOG FILE IS SPOOLED
	RL.JOB==0,,-1		;THE JOB NUMBER

REL.FD:! BLOCK	FDXSIZ		;RESERVE SPACE FOR THE MAXIMUM FD RETURNED

REL.BL:!			;MAXIMUM LENGTH OF A BATCON RELEASE

	DEPHASE
SUBTTL	The CHECKPOINT and REQUEUE messages -- Functions 3 and 4

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	!                                                       !
;	/            CHECKPOINT/REQUEUE INFORMATION             /
;	/                                                       /
;	/                       (5 WORDS)                       /
;	!                                                       !
;	!-------------------------------------------------------!
;	!                  AFTER TIMER (REQ)                    !
;	!=======================================================!

	PHASE	MSHSIZ

REQ.IT:! BLOCK	1		;INTERNAL TASK NAME
REQ.FL:! BLOCK	1		;REQUEUE FLAGS
	RQ.HBO==1B0		;HOLD BY OPR
	RQ.RLC==1B1		;RESTART AT LAST CHECKPOINT
				;I.E. DONT UPDATE CHECKPOINT INFO
REQ.IN:! BLOCK	EQCKSZ		;CHECKPOINTING INFORMATION

REQ.SZ:!

	DEPHASE

	PHASE	MSHSIZ

CHE.IT:! BLOCK	1		;INTERNAL TASK NAME
CHE.FL:! BLOCK	1		;FLAG WORD
	CH.FCH==1B0		;DO A CHECKPOINT
	CH.FST==1B1		;UPDATE STATUS
	CH.JBN==0,,-1		;BATCH JOB NUMBER

CHE.MS:!			;MINIMUM SIZE OF CHECKPOINT MESSAGE

CHE.IN:! BLOCK	EQCKSZ		;CHECKPOINT INFORMATION
CHE.ST:! BLOCK	STSSIZ		;SPOOLER STATUS

CHE.SZ:!

	DEPHASE
;Definition of the request limit words for each object type

DEFINE DEFLIM(NAME,WORD,SIZE,POS),<
	RADIX 5+5
	IF1,<IFDEF L.'NAME,<PRINTX Mult. defined limit parameter NAME>>
	IFL <36-SIZE>,<PRINTX Illegal size for limit NAME>
	IFL <35-POS>,<PRINTX Illegal position for limit NAME>
	IFLE <EQLMSZ-WORD>,<PRINTX Illegal word for limit NAME>
	L.'NAME==<BYTE (18) WORD (9) SIZE,POS>
	RADIX 4+4
>  ;END DEFINE DEFLIM

;Batch job parameters
	DEFLIM	UNIQ,0,2,1		;/UNIQUE
	DEFLIM	REST,0,2,3		;/RESTART
	DEFLIM	OINT,0,2,5		;/OPRINT (OPR INTERVENTION)
	DEFLIM	OUTP,0,3,8		;/OUTPUT
	DEFLIM	DEPN,0,18,35		;/DEPENDENCY
	DEFLIM	CORE,1,18,17		;/CORE
	DEFLIM	TIME,1,18,35		;/TIME
	DEFLIM	SLPT,2,18,17		;SPOOLED LPT LIMIT
	DEFLIM	SCDP,2,18,35		;SPOOLED CDP LIMIT
	DEFLIM	SPTP,3,18,17		;SPOOLED PTP LIMIT
	DEFLIM	SPLT,3,18,35		;SPOOLED PLT LIMIT
	DEFLIM	ONOD,4,36,35		;BATCH OUTPUT DESTINATION NODE
	DEFLIM	BLOG,5,2,1		;/BATLOG

;Output job parameters
	DEFLIM	FORM,0,36,35		;FORMS
	DEFLIM	NBLK,1,18,17		;NUMBER OF BLOCKS
	DEFLIM	OLIM,1,18,35		;OUTPUT LIMIT
	DEFLIM	NOT1,2,36,35		;FIRST HALF OF NOTE
	DEFLIM	NOT2,3,36,35		;SECOND HALF OF NOTE
	DEFLIM	FLEA,4,2,1		;FORMS-LIMIT-EXCEEDED ACTION (SET BY OPR)

;Batch input parameters
	DEFLIM	CJOB,1,18,17		;NUMBER OF JOBS
	DEFLIM	CTIM,2,36,35		;START TIME
	DEFLIM	CNOD,3,36,35		;NODE AT WHICH READER IS LOCATED

TOPS20 <
;Archive tape parameters
	DEFLIM TDTD,0,36,35		;DUMPER timestamp
	DEFLIM TUFT,0,1,0		;Use 1st tape rather than 2nd if on
	DEFLIM TDAT,0,35,35		;Actual time stamp
	DEFLIM TID1,1,36,35		;Tape 1 ID
	DEFLIM TTN1,2,36,35		;Saveset and tape file #
	DEFLIM TTS1,2,18,17		; Saveset 1
	DEFLIM TTF1,2,18,35		;Tape file # 1
	DEFLIM TID2,3,36,35		;Tape 2 ID
	DEFLIM TTN2,4,36,35		;Saveset and tape file # 2
	DEFLIM TTS2,4,18,17		;Saveset 2
	DEFLIM TTF2,4,18,35		;Tape file # 2
> ;END TOPS20 CONDITIONAL
DEFINE GETLIM(AC,BLOCK,NAME),<
	IFNDEF L.'NAME,<PRINTX Undefined limit parameter NAME>
	..Z==BLOCK
	..O==<L.'NAME&777777000000>_-^D18
	..Z==..Z+..O
	..S==<L.'NAME&777000>_-^D9
	..P==<L.'NAME&777>
	..P==^D35-..P
	..Z==..Z+<..S>B11+<..P>B5
	LDB	AC,[EXP ..Z]
>  ;END DEFINE GETLIM

DEFINE STOLIM(AC,BLOCK,NAME),<
	IFNDEF L.'NAME,<PRINTX Undefined limit parameter NAME>
	..Z==BLOCK
	..O==<L.'NAME&777777000000>_-^D18
	..Z==..Z+..O
	..S==<L.'NAME&777000>_-^D9
	..P==<L.'NAME&777>
	..P==^D35-..P
	..Z==..Z+<..S>B11+<..P>B5
	DPB	AC,[EXP ..Z]
>  ;END DEFINE STOLIM
SUBTTL The NEXTJOB and CREATE Messages -- Functions 5 and 7


; The NEXTJOB Message, Function 5, is  the  message  which  instructs  a
; known  component to process a job.  The CREATE Message, Function 7, is
; sent to QUASAR by an unknown component as a request to create a job in
; one of the external queues.  Both of these messages are in the form of
; the External Queue Entry (EQ).
; 
; The External Queue Entry (EQ) consists of a header section followed by
; a list of file-specifications.
; 
; The header section has three (3) parts:
; 
;      1.  The operating system independent header which is required and
;          is the same on both operating systems.
; 
;      2.  The  operating  system  dependent  header  which  immediately
;          follows  the  operating  system  independent  header.   It is
;          required and is different for each operating system.
; 
;     The above parts comprise the minimum header size EQHSIZ.
; 
; 
;      3.  The operating system dependent optional parameters which when
;          present  immediately  follow  the  operating system dependent
;          part of the header.
; 
;
; The length of the entire header for a given request is stored  in  the
; header in .EQLEN<EQ.LOH>.
; 
; Following  the  header  sections  is   a   list   of   one   or   more
; file-specifications.  Each file-spec consists of a File-Parameter area
; (FP) followed by the standard File Descriptor area (FD).
SUBTTL	EQ   --  The External Queue Entry

;	!=======================================================!
;	\                                                       \
;	\                  THE MESSAGE HEADER                   \
;	\                                                       \
;	!=======================================================!
;	!               INTERNAL TASK NAME (ITN)                !
;	!-------------------------------------------------------!
;	! INTERNAL REQUEST VERSION  !     LENGTH OF HEADER      !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                REQUESTED OBJECT BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	\                                                       \
;	\                 JOB INFORMATION BLOCK                 \
;	\                                                       \
;	!-------------------------------------------------------!
;	!  REQUEST PROTECTION CODE  !NUMBER OF FILES IN REQUEST !
;	!-------------------------------------------------------!
;	!                    SPARE EQ FIELD                     !
;	!-------------------------------------------------------!
;	!      AFTER PARAMETER (INTERNAL DATE/TIME FORMAT)      !
;	!-------------------------------------------------------!
;	!       DEADLINE TIME (INTERNAL DATE/TIME FORMAT)       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\               REQUEST LIMIT INFORMATION               \
;	\             CONTENTS ARE QUEUE DEPENDENT              \
;	\                        5 WORDS                        \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST CHECKPOINT INFORMATION             \
;	\            MAINTAINED BY KNOWN COMPONENTS             \
;	\                     EQCKSZ WORDS                      \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                    ACCOUNT STRING                     \
;	\                                                       \
;	\                        8 WORDS                        \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	!         THE LAST FEW WORDS OF THE "EQ" HEADER         !
;	!       ARE OPERATING SYSTEM DEPENDENT AS FOLLOWS       !
;	
;	
;	!                 -----  TOPS 10  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                  USER NAME IN SIXBIT                  !
;	!                       (2 WORDS)                       !
;	!=======================================================!
;	!                                                       !
;	\                  PATH SPECIFICATION                   \
;	\                      (OPTIONAL)                       \
;	\                       SIX WORDS                       \
;	!                                                       !
;	!=======================================================!
;	
;	!                 -----  TOPS 20  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\              REQUEST OWNER SPECIFICATION              \
;	\                                                       \
;	\                      (10 WORDS)                       \
;	!                                                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\        CONNECTED DIRECTORY OF REQUEST CREATOR         \
;	\                                                       \
;	\                      (12 WORDS)                       \
;	!                                                       !
;	!=======================================================!
;	!               SPOOLED INPUT SET HANDLE                !
;	!=======================================================!
	PHASE	MSHSIZ

.EQITN:! BLOCK	1		;INTERNAL TASK NAME
.EQLEN:! BLOCK	1		;LENGTH WORD
	EQ.VRS==-1,,0		;VERSION NUMBER OF REQUEST (%%.QSR)
	EQ.LOH==0,,-1		;LENGTH OF THE HEADER ( e.g. EQHSIZ)

.EQROB:! BLOCK	ROBSIZ		;REQUESTED OBJECT BLOCK
.EQJBB:! BLOCK	JIBSIZ		;JOB INFORMATION BLOCK
.EQSPC:! BLOCK	1		;FILE SPECIFICATION WORD
	EQ.PRO==-1,,0		;REQUEST PROTECTION
	EQ.NUM==0,,-1		;NUMBER OF FILES IN THE REQUEST

.EQSPR:! BLOCK	1		;SPARE EQ FIELD
.EQAFT:! BLOCK	1		;AFTER PARAMETER (INTERNAL FORMAT)
.EQDED:! BLOCK	1		;DEADLINE TIME (INTERNAL FORMAT)
.EQLIM:! BLOCK	EQLMSZ		;NOTE THAT EQLMSZ IS DEFINED IN 
				;THE OVERALL STRUCTURE DEFINITION
.EQCHK:! BLOCK	EQCKSZ		;CHECKPOINT/REQUEUE INFORMATION

.EQACT:! BLOCK	10		;ACCOUNT STRING

EQISIZ:!

;END OF OPERATING SYSTEM INDEPENDENT HEADER  -  MORE OF CREATE MESSAGE FOLLOWS

	;THIS IS THE JOB INFORMATION BLOCK STRUCTURE DESCRIPTION

	.EQJOB==.EQJBB+JIB.JN	;JOB NAME (SIXBIT)
	.EQSEQ==.EQJBB+JIB.SQ	;EXTERNAL VALUES
	    EQ.SEQ==-1,,0	;EXTERNAL SEQUENCE NUMBER
	    EQ.ACT==1B21	;REQUEST REQUIRES ACCOUNT VALIDATION
	    EQ.IAS==1B22	;REQUEST CONTAINS AN INVALID ACCT STRING
	    EQ.NOT==3B24	;JOB REQUESTED /NOTIFY
	    EQ.JBC==1B25	;JOB HAS BEEN CHECKPOINTED
	    EQ.HBO==1B26	;JOB HELD BY OPERATOR
	    EQ.PRV==1B27	;REQUEST CREATOR WAS PRIVILEGED
	    EQ.SPL==1B28	;REQUEST CONTAINS SPOOLED FILES
	    EQ.RDE==1B29	;THIS REQUEST DOESN'T EXIST (CLEAN-UP)
	    EQ.PRI==77B35	;EXTERNAL PRIORITY
	.EQOID==.EQJBB+JIB.US	;-10(PPN), -20(USER NUMBER)
	.EQRID==.EQJBB+JIB.ID	;REQUEST ID
TOPS10 <
	.EQOWN==.EQJBB+JIB.NM	;TOPS-10 USER NAME IN SIXBIT (2 WORDS)
>
;BEGINNING OF OPERATING SYSTEM DEPENDENT HEADER


TOPS20 <
.EQOWN:! BLOCK	EQNMSZ		;EXTERNAL OWNER SPECIFICATION
.EQCON:! BLOCK	12		;CONNECTED DIRECTORY
>  ;END TOPS20 CONDITIONAL


;END OF OPERATING SYSTEM DEPENDENT HEADER


;BEGINNING OF OPERATING SYSTEM DEPENDENT OPTIONAL PARAMETERS

TOPS10 <			;MAKE ROOM FOR THE INPUT QUEUE PATH SPEC
.EQPAT:! BLOCK	6		;PATH
.EQPSZ:!			;SIZE OF HEADER WITH PATH
> ;END TOPS10 CONDITIONAL

TOPS20 <
.EQSIS:! BLOCK	1		;HANDLE FOR SPOOLED INPUT SET
> ;END TOPS20 CONDITIONAL

EQHSIZ:!			;TO DEFINE THE EQ HEADER SIZE


EQXSIZ:!			;MAXIMUM "DEFINED" SIZE OF AN EQ
				;THIS MAXIMUM SHOULD NOT BE ENFORCED SINCE
				; VARIOUS USER APPLICATIONS MAY PASS MORE

	DEPHASE
;	!=======================================================!
;	! LENGTH OF FILE-PARAM AREA !				!
;	!-------------------------------------------------------!
;	!FILE FMT !PAPR FMT!SPACING !    FLAGS    !   COPIES    !
;	!-------------------------------------------------------!
;	!         STARTING INFORMATION (CUSP DEPENDENT)         !
;	!-------------------------------------------------------!
;	!                    /REPORT WORD 1                     !
;	!-------------------------------------------------------!
;	!                    /REPORT WORD 2                     !
;	!-------------------------------------------------------!
;	!RCRD FMT!                                ! RECORD LGTH !
;	!-------------------------------------------------------!
;	!                     RECORD COUNT                      !
;	!=======================================================!

	PHASE	0

.FPLEN:! BLOCK	1		;SIZE WORD
	FP.LEN==-1,,0		;SIZE OF THE FP

	PHASE	1		;OUTPUT QUEUES

.FPINF:! BLOCK	1		;FILE PARAMETER INFORMATION
	FP.FFF==77B5		;FILE FORMAT
		.FPFAS==1	;ASCII
		.FPFFO==2	;FORTRAN
		.FPFCO==3	;COBOL
		.FPFAI==4	;AUGMENTED IMAGE (FOR BIN QUEUE)
		.FPFSA==5	;STREAM ASCII (FOR BIN QUEUE)
		.FPF11==6	;ELEVEN
		.FPFIM==7	;IMAGE (FOR XFR QUEUE)
		.FPF8B==10	;8 BIT ASCII FILE
		.FPMAX==.FPF8B	;MAX FP VALUE DEFINED

	FP.FPF==77B11		;PAPER FORMAT (SEE THE NEXT PAGE)
	FP.FSP==77B17		;SPACING CODE
	FP.DEL==1B18		;ON = DELETE THIS FILE
	FP.FLG==1B19		;THIS IS THE LOG FILE
	FP.NFH==1B20		;NO FILE HEADERS
	FP.SPL==1B21		;THIS IS A SPOOLED FILE
	FP.PCR==1B22		;SPOOLED CARD READER FILE
	FP.XXX==17B26		;EXTRA FLAG BITS
	FP.FCY==777B35		;COPY COUNT

.FPFST:! BLOCK	1		;STARTING POINT INFORMATION
.FPFR1:! BLOCK	1		;/REPORT WORD 1
.FPFR2:! BLOCK	1		;/REPORT WORD 2

FPMSIZ:!			;MINUMUM FP AREA SIZE

FPXSIZ:!			;MAXIMUM FP AREA SIZE

	PHASE	1		;BIN QUEUE

.FPINF:! BLOCK	1		;FP INFORMATION (SEE NEXT PAGE)
	FP.RCF==77B5		;RECORD FORMAT
	FP.RCL==777B35		;RECORD LENGTH (FOR FIXED FORMAT)
.FPRCD:! BLOCK	1		;RECORD COUNT

	DEPHASE
;PAPER FORMATS FOR LPT QUEUE (/PRINT)
	%FPLAR==1		;ARROW FORMAT
	%FPLAS==2		;ASCII FORMAT
	%FPLOC==3		;OCTAL FORMAT
	%FPLSU==4		;SUPPRESS FORMAT


;PAPER FORMATS FOR PTP QUEUE (/TAPE)
	%FPTAS==1		;ASCII FORMAT
	%FPTIM==2		;IMAGE FORMAT
	%FPTIB==3		;IMAGE BINARY FORMAT
	%FPTBI==4		;BINARY FORMAT


;PAPER FORMATS FOR CDP QUEUE (/PUNCH)
	%FPCAS==1		;ASCII FORMAT
	%FPCBC==2		;026 (BCD) FORMAT
	%FPCBI==3		;BINARY FORMAT
	%FPCIM==5		;IMAGE FORMAT


;PAPER FORMAT FOR PLT QUEUE  (/PLOT)
	%FPPIM==1		;IMAGE FORMAT
	%FPPAS==2		;ASCII FORMAT
	%FPPBI==3		;BINARY FORMAT

;VALUES FOR .EQLM1<EQ.OUT> (/OUTPUT FIELD)
	%EQONL==1		;NO LOG
	%EQOLG==2		;LOG FILE ALWAYS
	%EQOLE==3		;LOG FILE ON ERROR ONLY

;VALUES FOR .EQLM1<EQ.UNI> (/UNIQUE FIELD)
	%EQUNO==1		;/UNIQUE:NO
	%EQUYE==2		;/UNIQUE:YES

;VALUES FOR .EQLM1<EQ.RST> (/RESTART FIELD)
	%EQRNO==1		;/RESTART:NO
	%EQRYE==2		;/RESTART:YES

;VALUES FOR .EQLIM WORD 6 (BATCH ONLY)  (/BATLOG: FIELD)
	%BAPND==1		;APPEND OUTPUT LOG
	%BSCDE==2		;SUPERSEDE OUTPUT LOG
	%BSPOL==3		;SPOOL OUTPUT LOG

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


;DEFINITIONS FOR XFR QUE FP

	FP.RFM==FP.FPF		;RECORD FORMAT INSTEAD OF PAPER FORMAT
	FP.MRS==FP.FCY		;MAXIMUM RECORD SIZE INSTEAD OF COPIES

    ;VALUES FOR RECORD FORMAT (FP.RFM)

	%FPXFI==1		;FIXED LENGTH RECORDS
	%FPXVA==2		;VARIABLE LENGTH RECORDS

;VALUE FOR FILE RETREIVAL .EQLM1<EQ.UFT> 

	%EQUFT==1B0		;USE FIRST TAPE NOT SECOND IF LIT
	SUBTTL The ABORT Message -- Function 6

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                  INTERNAL TASK NAME                   !
;	!-------------------------------------------------------!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!                      UNIT NUMBER                      !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!-------------------------------------------------------!
;	!                      REASON CODE                      !
;	!-------------------------------------------------------!
;	!          ID OF PERSON REQUESTING THE CANCEL           !
;	!=======================================================!

	PHASE	MSHSIZ

ABO.IT:! BLOCK	1		;INTERNAL TASK NAME
ABO.TY:! BLOCK	1		;OBJECT TYPE
ABO.UN:! BLOCK	1		;UNIT NUMBER
ABO.NO:! BLOCK	1		;NODE
ABO.CD:! BLOCK	1		;CODE INDICATING CAUSE OF MESSAGE
	ABOUSR==1		; BY USER REQUEST
ABO.ID:! BLOCK	1		;ID OF PERSON REQUESTING THE KILL

ABO.SZ:!			;SIZE OF THE ABORT MESSAGE

	DEPHASE
SUBTTL	The LIST Message -- Function 10

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!		   	FLAG WORD			!
;	!-------------------------------------------------------!
;	!		      ARGUMENT COUNT			!
;	!=======================================================!

;			ARGUMENT DATA BLOCK

;	!-------------------------------------------------------!
;	! LENGTH OF ARGUMENT BLOCK  !     TYPE OF ARGUMENT	!
;	!-------------------------------------------------------!
;	\							\
;	\		   DATA FOR THE ARGUMENT		\
;	\							\
;	!=======================================================!

	;THE FLAG WORD (.OFLAG) CAN HAVE THE FOLLOWING BITS LIT:

		LS.FST==1B1	;YOU WANT A QUICK QUEUES LISTING.
		LS.ALL==1B2	;YOU WANT TO SEE EVERYTHING !!!


	;THE LIST QUEUES MESSAGE CONTAINS 2 BLOCKS.

		.LSQUE==0	;THE QUEUES YOU WANT TO LIST.
		.LSUSR==1	;THE USER ID FOR THE QUEUE ENTRYS YOU WANT.
		; .ORNOD	;THE NODE WHOSE QUEUE ENTRIES YOU WANT

	;THE .LSQUE BLOCK AND ITS POSSIBLE VALUES IS DEFINED BELOW.

		LIQBAT==1B0	;LIST THE BATCH QUEUE
		LIQLPT==1B1	;LIST THE PRINTER QUEUE
		LIQCDP==1B2	;LIST THE CARD-PUNCH QUEUE
		LIQPTP==1B3	;LIST THE PAPER-TAPE PUNCH QUEUE
		LIQPLT==1B4	;LIST THE PLOTTER QUEUE
		LIQMNT==1B6	;LIST THE TAPE MOUNT QUEUE
		LIQRET==1B7	;LIST THE RETRIEVAL QUEUE

		LIQOUT==LIQLPT+LIQCDP+LIQPTP+LIQPLT ;LIST ALL OUTPUT QUEUES.

		LIQALL==LIQOUT+LIQBAT+LIQRET+LIQMNT  ;LIST ALL THE QUEUES.

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


;	!=======================================================!
;	!		2	!		.LSQUE		!
;	!-------------------------------------------------------!
;	!	THE QUEUE(S) YOU WANT TO LIST			!
;	!=======================================================!

	;THE .LSUSR BLOCK IS DEFINED BELOW.

;	!=======================================================!
;	!		2	!		.LSUSR		!
;	!-------------------------------------------------------!
;	!	THE USER ID (PPN ON THE -10) OF THE		!
;	!		QUEUE ENTRYS YOU WANT			!
;	!=======================================================!

	;THE .ORNOD BLOCK IS DEFINED BELOW

;	!=======================================================!
;	!		2	!		.ORNOD		!
;	!-------------------------------------------------------!
;	!	    SIXBIT NODE NAME or OCTAL NODE #		!
;	!=======================================================!
	SUBTTL	The MODIFY Message -- Function 11

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                      QUEUE NAME                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST DESCRIPTOR BLOCK (RDB)             \
;	\                                                       \
;	\              TO DESCRIBE MODIFY REQUEST               \
;	!                                                       !
;	!-------------------------------------------------------!

; THE FOLLOWING BLOCK IS DUPLICATED FOR EACH "GROUP" TO BE MODIFIED
; THE LENGTH OF THE BLOCK IS DEPENDENT ON THE GROUP.
;  IF AN ELEMENT IS NOT TO BE CHANGED, SPECIFY -1 AS THE VALUE.

; ELEMENTS ARE POSITIONAL WITHIN A GROUP AND NO ENDING INDICATION IS NECESSARY
; AS THE VARIOUS LENGTH FIELDS DETERMINE THE NEXT OR END OF THE MESSAGE

; FOR DESCRIPTIONS OF THE GROUP ELEMENTS AND POSITIONS THE READER IS DIRECTED TO:
;	QSRQUE - MAJMOD FOR MAJOR REQUEST GROUP 0
;	QSRSCH - MODIFIERS FOR QUEUE DEPENDENT GROUP 1

;	!=======================================================!
;	!       GROUP NUMBER        !        WORD COUNT         !
;	!=======================================================!
	PHASE	MSHSIZ

MOD.OT:! BLOCK	1		;OBJECT TYPE

MOD.RQ:! BLOCK	RDBSIZ		;REQUEST DESCRIPTOR BLOCK

MOD.SZ:!			;MINIMUM SIZE OF A MODIFY REQUEST
MOD.FG:!			;FIRST GROUP WORD IN MODIFY REQUEST

	PHASE	0		;RELATIVE OFFSET

MOD.GN:! BLOCK	1		;GROUP WORD
	MODGPN==-1,,0		;THE GROUP NUMBER
		.GPMAJ==0	;MAJOR PARAMETERS (AFTER, PRIORITY, etc...)
		.GPQUE==1	;QUEUE DEPENDENT (FORMS, TIME LIMIT, etc...)

	MODGLN==0,,-1		;THE NUMBER OF ELEMENTS (INCLUDING THIS WORD)
MOD.GE:!			;THE FIRST GROUP ELEMENT TO BE MODIFIED
	DEPHASE


;IF MODIFYING /DEPENDENCY COUNT FOR INPUT QUEUES, 3 FORMS ARE RECOGNIZED

	.MODAB==0	;NEW VALUE IS ABSOLUTE CHANGE
	.MODPL==1	;NEW VALUE IS ADDITIVE
	.MODMI==2	;NEW VALUE IS SUBTRACTIVE
SUBTTL	The KILL Message -- Function 12

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                      QUEUE NAME                       !
;	!-------------------------------------------------------!
;	!                                                       !
;	\            REQUEST DESCRIPTOR BLOCK (RDB)             \
;	\                                                       \
;	\               TO DESCRIBE KILL REQUEST                \
;	!                                                       !
;	!-------------------------------------------------------!

	PHASE	MSHSIZ

KIL.OT:! BLOCK	1		;OBJECT TYPE

KIL.RQ:! BLOCK	RDBSIZ		;REQUEST DESCRIPTOR BLOCK

KIL.SZ:!			;SIZE OF KILL ENTRY
	DEPHASE
	SUBTTL	THE LIST ANSWER MESSAGE.

	;THE LIST ANSWER MESSAGE IS CONSTRUCTED AS FOLLOWS:

;	!=======================================================!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!=======================================================!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!=======================================================!
;	! HEADER LENGTH		!  HEADER BLOCK TYPE (.WTTYP)	!
;	!-------------------------------------------------------!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!-------------------------------------------------------!
;	! ANSWER LENGTH		!  ANSWER BLOCK TYPE (.WTTXT)	!
;	!-------------------------------------------------------!
;	\							\
;	\	THE QUEUES LISTING IN ASCIZ			\
;	\							\
;	!=======================================================!


	;THE FLAG WORD CAN CONTAIN THE FOLLOWING BITS:

		WT.MOR==WT.MOR		;MORE DISPLAY PAGES COMMING.
					;THIS IS ORIGIONALLY DEFINED IN ORNMAC.
SUBTTL	The REQUEST FOR CHECKPOINT Message  --  Function 15

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!                 INTERNAL TASK NUMBER                  !
;	!-------------------------------------------------------!
;	!                      OBJECT TYPE                      !
;	!-------------------------------------------------------!
;	!                      UNIT NUMBER                      !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!=======================================================!

	PHASE	MSHSIZ

RCK.IT:! BLOCK	1		;THE ITN
RCK.TY:! BLOCK	1		;THE OBJECT TYPE
RCK.UN:! BLOCK	1		;THE UNIT NUMBER
RCK.NO:! BLOCK	1		;THE NODE

RCK.SZ:!			;THE SIZE OF THE REQUEST FOR CHECKPOINT MESSAGE

	DEPHASE
SUBTTL The DEFER Message  --  Function 16

;	!=======================================================!
;	/                                                       /
;	/                  THE MESSAGE HEADER                   /
;	/                                                       /
;	!=======================================================!
;	!         QUEUE NAME FOR THE REQUEST (0 IF ALL)         !
;	!-------------------------------------------------------!
;	!    FLAGS     !  FUNCTION   !        JOB NUMBER        !
;	!=======================================================!

	PHASE	MSHSIZ

DFR.OT:! BLOCK	1		;THE OBJECT TYPE ( 0 IF ALL)
DFR.JB:! BLOCK	1		;JOB INFORMATION
	DF.FNC==777B17		;THE FUNCTION REQUESTED
		.DFREL==0	;RELEASE ALL DEFERRED FILES
		.DFKIL==1	;KILL ALL DEFERRED FILES

	DF.JOB==0,,-1		;THE JOB NUMBER

DFR.SZ:!			;SIZE OF THE DEFER MESSAGE

	DEPHASE
SUBTTL	Event Counters

;QUASAR MAINTAINS A SET OF EVENT COUNTERS FOR VARIOUS EVENTS THAT
;	MIGHT BE OF INTEREST.  THESE COUNTERS ARE PRIMARILY FOR THE
;	USE OF SOFTWARE DEVELOPMENT PEOPLE TO HELP KEEP A HANDLE ON
;	WHAT IS REALLY HAPPENING INSIDE OF QUASAR.
;
;TWO MESSAGES EXIST TO HANDLE THESE COUNTERS:
;	COUNT		FUNCTION 20	SENT TO REQUEST CURRENT COUNTS
;	CNTANSWER	FUNCTION 21	SENT AS RESPONSE TO COUNT MESSAGE

;FOLLOWING ARE THE MACROS USED TO MANIPULATE THE COUNTERS:

DEFINE	X(A,B),<
	XLIST
	INTERN	$$'A
	$$'A==$$
	$$==$$+1
	LIST
	SALL
>  ;END DEFINE X

DEFINE	$COUNT(A),<
	IFNDEF $$'A,<
		PRINTX UNDEFINED COUNTER A USED
	>
	AOS	G$ITEM##+$$'A
>  ;END DEFINE $COUNT

DEFINE	$SITEM(AC,A),<
	IFNDEF $$'A,<
		PRINTX UNDEFINED COUNTER A USED
	>
	STORE	AC,G$ITEM##+$$'A
>  ;END DEFINE $SITEM


;THE COUNTERS ARE DEFINE ON THE NEXT PAGE
;THE COUNTERS

DEFINE $ITEM,<
	XLIST
	X	(NOW,CURRENT TIME OF DAY)
	X	(STAR,QUASAR START TIME)
	X	(QJOB,QUASARS JOB NUMBER)
	X	(IPCI,TOTAL NUMBER OF IPCF INTERRUPTS RECEIVED)
	X	(RIPC,IPCF MESSAGES RECEIVED)
	X	(SIPC,IPCF MESSAGES SENT)
	X	(IPCF,IPCF SEND FAILURES)
	X	(IPCU,UNRECOVERABLE IPCF SEND FAILURES)
	X	(MREL,RELEASE MESSAGES RECEIVED)
	X	(MCHK,CHECKPOINT MESSAGES RECEIVED)
	X	(MREQ,REQUEUE MESSAGES RECEIVED)
	X	(MNXT,NEXTJOB MESSAGES SENT)
	X	(MABO,ABORT MESSAGES SENT)
	X	(MLST,LIST MESSAGES RECEIVED)
	X	(NLAP,LISTANSWER PAGES SENT)
	X	(SCRE,SUCCESSFUL CREATES DONE)
	X	(MMOD,MODIFY MESSAGES RECEIVED)
	X	(MKIL,KILL MESSAGES RECEIVED)
	X	(MDEF,DEFER MESSAGES RECEIVED)
	X	(ISPL,IMMEDIATE SPOOL MESSAGES RECEIVED)
	X	(DSPL,DEFFERED SPOOL MESSAGES RECEIVED)
	X	(MCAN,COUNTANSWER MESSAGES SENT)
	X	(SLCD,SCHEDULER LOOP COUNTDOWNS)
	LIST
	SALL
>  ;END DEFINE $ITEM

	$$=0				;START CLEAN
	$ITEM				;NOW CALL IT

	NITEMS=$$			;TOTAL NUMBER OF ITEMS
SUBTTL	The COUNT Message  --  Function 20

	PHASE	MSHSIZ

COU.SZ:!			;SIZE OF COUNT MESSAGE
	DEPHASE
SUBTTL	The COUNTANSWER Message  --  Function 21

	PHASE	MSHSIZ

CAN.BL:! BLOCK	NITEMS		;BLOCK OF ITEMS

CAN.SZ:!			;SIZE OF COUNTANSWER MESSAGE
	DEPHASE
SUBTTL The SETUP/SHUTDOWN Message  --  Function 22

;The SETUP message is sent to cause a component to service an object for
;	which we have a job..  The SHUTDOWN message is sent to cause a
;	component to give up control of a object.


;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                         Flags                         !
;	!-------------------------------------------------------!
;	!               Type of OBJect to set up                !
;	!-------------------------------------------------------!
;	!            Unit number of OBJect to set up            !
;	!-------------------------------------------------------!
;	!               Node to set up OBJect at                !
;	!-------------------------------------------------------!
;	!	 Port Number	!	Line Number		!
;	!-------------------------------------------------------!
;	!		Network Status Bits			!
;	!-------------------------------------------------------!
;	!		Port/Line Handle			!
;	!=======================================================!


		PHASE MSHSIZ		;START WITH STD. MESSAGE HEADER

SUP.FL:! BLOCK	1			;FLAGS
	SUFSHT==1B0			;SHUTDOWN INSTEAD OF SETUP
	SPLTAP==1B1			;BIT FOR PRINTER SPOOLER (SPOOL TO TAPE)
SUP.TY:! BLOCK	1			;TYPE OF OBJECT TO SET UP FOR
SUP.UN:! BLOCK	1			;UNIT NUMBER, OF THIS TYPE, TO SET UP
SUP.NO:! BLOCK	1			;SIXBIT NODE AT WHICH TO SET UP OBJ
SUP.CN:! BLOCK	CN$SIZ			;DN60 LINE CONDITIONING BLOCK
SUP.ST:! BLOCK	1			;NETWORK STATUS/FLAG BITS
					;SEE 'NETSTS' BIT VALUES

SUP.SZ:!				;SIZE OF THE SETUP MESSAGE

		DEPHASE
SUBTTL	The RESPONSE-TO-SETUP Message  --  Function 23

;The RESPONSE-TO-SETUP message is sent to QUASAR by a known component
;	after the component receives a SETUP message for an object.

;	!=======================================================!
;	\                                                       \
;	\                  The Message Header                   \
;	\                                                       \
;	!=======================================================!
;	!                    The OBJect Type                    !
;	!-------------------------------------------------------!
;	!                The OBJect Unit Number                 !
;	!-------------------------------------------------------!
;	!         The NODE at which the OBJect Resides          !
;	!-------------------------------------------------------!
;	!                   The RESPONSE Code                   !
;	!-------------------------------------------------------!
;	!                    RESPONSE REASON                    !
;	!-------------------------------------------------------!
;	!              The DEC Device Attributes                !
;	!=======================================================!

	PHASE	MSHSIZ			;STANDARD MESSAGE HEADER

RSU.TY:! BLOCK	1			;OBJECT TYPE
RSU.UN:! BLOCK	1			;UNIT NUMBER
RSU.NO:! BLOCK	1			;NODE
RSU.CO:! BLOCK	1			;RESPONSE CODE
	%RSUOK==0			;SETUP OK
	%RSUNA==1			;OBJECT NOT AVAILABLE (TRY AGAIN LATER)
	%RSUDE==2			;OBJECT DOESNT EXIST (DONT TRY AGAIN)
	%RSUNC==3			;OBJECT PORT/LINE NOT CONDITIONED
RSU.CD:! BLOCK	1			;RESPONSE REASON
					;SEE OBJECT STATUS CODES IN OBJECT
					;    QUEUE DESCRIPTION
RSU.DA:! BLOCK	1			;DEC DEVICE ATTRIBUTES

RSU.SZ:!

	DEPHASE
	SUBTTL	The HOLD/RELEASE Message  --  Function 25

;	!=======================================================!
;	\                                                       \
;	\                  THE MESSAGE HEADER                   \
;	\                                                       \
;	!=======================================================!
;	!                   THE OBJECT QUEUE                    !
;	!-------------------------------------------------------!
;	!                         FLAGS                         !
;	!-------------------------------------------------------!
;	\                                                       \
;	\               REQUEST DESCRIPTOR BLOCK                \
;	\                                                       \
;	!=======================================================!


	PHASE	MSHSIZ			;STANDARD MESSAGE HEADER

HBO.OT:! BLOCK	1			;OBJECT TYPE (QUEUE)
HBO.FL:! BLOCK	1			;FLAGS
	HB.FRL==1B0			;RELEASE FLAG
HBO.RQ:! BLOCK	RDBSIZ			;THE RDB SPECIFIED

HBO.SZ:!				;SIZE OF THE HBO MESSAGE

	DEPHASE
	SUBTTL	The SPOOL Message - Function 26 (sent by IPCC)

IFN FTUUOS,<
;	!=======================================================!
;	!          LENGTH           !    FUNCTION 26 - SPOOL    !
;	!-------------------------------------------------------!
;	!        JOB NUMBER         !  JBTLOC(J)  !    FLAGS    !
;	!-------------------------------------------------------!
;	!                      USERS NAME                       !
;	!                    2 SIXBIT WORDS                     !
;	!-------------------------------------------------------!
;	!              DEVICE INIT'ED BY THE USER               !
;	!-------------------------------------------------------!
;	!             STRUCTURE CONTAINING THE FILE             !
;	!-------------------------------------------------------!
;	!              MONITOR GENERATED FILE NAME              !
;	!-------------------------------------------------------!
;	!                   ENTERED FILE NAME                   !
;	!-------------------------------------------------------!
;	!                       FILE SIZE                       !
;	!-------------------------------------------------------!
;	!      FILE EXTENSION       !                           !
;	!-------------------------------------------------------!
;	!                   NUMBER OF COPIES                    !
;	!-------------------------------------------------------!
;	!                      FORMS NAME                       !
;	!-------------------------------------------------------!
;	!                     OUTPUT LIMIT                      !
;	!-------------------------------------------------------!
;	!SFL!                  FLAGS                  !DEV TYPE !
;	!-------------------------------------------------------!
;	!                   DEVICE ATTRIBUTES                   !
;	!-------------------------------------------------------!
;	!                         NODE                          !
;	!-------------------------------------------------------!
;	!                    AFTER PARAMETER                    !
;	!=======================================================!

	PHASE	0

SPL.HD:! BLOCK	1		;THE HEADER FROM IPCC
SPL.JB:! BLOCK	1		;USERS JOB NUMBER
	SP.JOB==-1,,0		;THE JOB NUMBER CLOSING THE SPOOLED FILE
	SP.LOC==777B26		;CURRENT REMOTE STATION (.LOCATE n)
	SP.BAT==1B27		;THIS IS FOR A BATCH JOB
	SP.DFR==1B28		;DEFERRED MODE SPOOLING

SPL.US:! BLOCK	2		;THE USERS NAME (2 SIXBIT WORDS)
SPL.DV:! BLOCK	1		;DEVICE INIT'ed BY THE USER (e.g. LPT0:)
SPL.ST:! BLOCK	1		;STRUCTURE CONTAINING THIS FILE
SPL.FN:! BLOCK	1		;MONITOR GENERATED FILE NAME
SPL.EN:! BLOCK	1		;ENTERED FILE NAME
SPL.FS:! BLOCK	1		;FILE SIZE (IN BLOCKS)
SPL.EX:! BLOCK	1		;FILE EXTENSION
	SP.EXT==-1,,0		;IN LEFT HALF
SPL.CP:! BLOCK	1		;# COPIES
SPL.FM:! BLOCK	1		;FORMS NAME
SPL.LM:! BLOCK	1		;OUTPUT LIMIT
SPL.SF:! BLOCK	1		;SPOOLING FLAGS
	SP.FLG==3B2		;SPOOLING FLAG LOCATION
	   .SPDFD==1		;DEFERED SPOOLING
	   .SPDFI==2		;IMMEDIATE SPOOLING
	SP.TYP==77		;TYPE OF EDVICE
SPL.DA:! BLOCK	1		;DEVICE ATTRIBUTES
SPL.ND:! BLOCK	1		;NODE
SPL.AF:! BLOCK	1		;AFTER PARM

SPL.SZ:!			;SIZE OF THE SPOOL MESSAGE
	DEPHASE

>  ;END IFN FTUUOS
IFN FTJSYS,<

;	!=======================================================!
;	!                  FUNCTION 26 - SPOOL                  !
;	!-------------------------------------------------------!
;	!      # HEADER WORDS       !        JOB NUMBER         !
;	!-------------------------------------------------------!
;	!           FLAGS           !      STATION NUMBER       !
;	!-------------------------------------------------------!
;	!                     PROGRAM NAME                      !
;	!-------------------------------------------------------!
;	!         BYTE SIZE         !  NUMBER OF PAGES IN FILE  !
;	!-------------------------------------------------------!
;	!          BYTE COUNT WHICH WOULD ADDRESS EOF           !
;	!-------------------------------------------------------!
;	!                                                       !
;	/               FILESPEC FOR SPOOLED FILE               /
;	!                                                       !
;	!=======================================================!

	PHASE	0
SPL.HD:! BLOCK	1		;HEADER FROM IPCC
SPL.JB:! BLOCK	1		;JOB INFORMATION
	SP.NHW==-1,,0		;NUMBER OF HEADER WORDS
	SP.JOB==0,,-1		;JOB NUMBER
SPL.FL:! BLOCK	1		;FLAGS
	SP.BAT==1B0		;JOB MAKE REQUEST IS A BATCH JOB
	SP.DFR==1B1		;REQUEST IS DEFERED
	SP.LOC==0,,-1		;STATION NUMBER
SPL.PG:! BLOCK	1		;NAME OF PROGRAM WRITING FILE
SPL.BV:! BLOCK	1		;CONTENTS OF FDBBYV
	SP.SIZ==0,,-1		;NUMBER OF PAGES IN FILE
SPL.EF:! BLOCK	1		;BYTE COUNT WHICH ADDRESSES TO EOF
SPL.FI:!			;BEGINNING OF FILESPEC FOR SPOOLED FILE

SPL.SZ:!			;SPOOL MSG SIZE

	DEPHASE

>  ;END IFN FTJSYS
SUBTTL	The LOGOUT Message - Function 27 (sent by IPCC)

IFN FTUUOS,<

;	!=======================================================!
;	!          LENGTH           !   FUNCTION 27 - LOGOUT    !
;	!-------------------------------------------------------!
;	!        JOB NUMBER         !  JBTLOC(J)  !    FLAGS    !
;	!=======================================================!

	PHASE	0

LGO.HD:! BLOCK	1		;THE HEADER FROM IPCC
LGO.JB:! BLOCK	1		;USERS JOB NUMBER
	LG.JOB==-1,,0		;THE JOB NUMBER OF THE USER LOGGING OUT
	LG.LOC==777B26		;THE CURRENT REMOTE STATION NUMBER OF THIS JOB
	LG.BAT==1B27		;THIS IS A BATCH JOB
	LG.DFR==1B28		;DEFERRED MODE SPOOLING

LGO.SZ:!			;SIZE OF THE LOGOUT MESSAGE

	DEPHASE

>  ;END IFN FTUUOS

IFN FTJSYS,<

;	!=======================================================!
;	!                 FUNCTION 27 - LOGOUT                  !
;	!-------------------------------------------------------!
;	!    NO. OF HEADER WORDS    !        JOB NUMBER         !
;	!-------------------------------------------------------!
;	!           FLAGS           !      STATION NUMBER       !
;	!=======================================================!

	PHASE 0

LGO.HD:! BLOCK	1		;HEADER FROM IPCC
LGO.JB:! BLOCK	1		;JOB INFORMATION
	LG.NHW==-1,,0		;NUMBER OF HEADER WORDS
	LG.JOB==0,,-1		;JOB NUMBER

LGO.FL:! BLOCK	1		;FLAG WORD
	LG.BAT==1B0		;THIS WAS A BATCH JOB
	LG.DFR==1B1		;DEFERRED MODE SPOOLING
	LG.LOC==0,,-1		;JOBS STATION NUMBER

LGO.SZ:!			;SIZE OF THE LOGOUT MESSAGE

	DEPHASE

>  ;END IFN FTJSYS
	SUBTTL	TAPE ONLINE MESSAGE Function 31 (sent by IPCC)


TOPS10 <

;	!=======================================================!
;	!	Length		!	Function code		!
;	!-------------------------------------------------------!
;	!		Device Name (Sixbit)			!
;	!-------------------------------------------------------!
;	!					!Device Type	!
;	!=======================================================!


		PHASE	0

	.TONHD:! BLOCK	1		;TAPE ONLINE MESSAGE HEADER
	.TONDV:! BLOCK	1		;TAPE ONLINE DEVICE
	.TONST:! BLOCK	1		;TAPE ONLINE DEVICE TYPE
	    TON.TY==77			;DEVICE TYPE

		DEPHASE
>
	SUBTTL	THE DEVICE STATUS UPDATE MESSAGE - FUNCTION 31


;	!======================================================	!
;	\							\
;	\		THE MESSAGE HEADER			\
;	\							\
;	!=======================================================!
;	\							\
;	\		THE REQUESTED OBJECT BLOCK		\
;	\							\
;	!=======================================================!
;	!		THE DEVICE STATUS CODE			!
;	!=======================================================!


		PHASE	MSHSIZ		;STANDARD MESSAGE HEADER

	STU.RB:! BLOCK	OBJ.SZ		;THE OBJECT BLOCK YOU WANT
	STU.CD:! BLOCK	1		;THE DEVICE STATUS CODE

	STU.SZ:!

		DEPHASE
	SUBTTL	TAPE DEASSIGN/DISMOUNT MESSAGE (IPCC FUNCTION 34)



;	!=======================================================!
;	!	3		!	     34			!
;	!-------------------------------------------------------!
;	!	        SIXBIT DEVICE NAME			!
;	!-------------------------------------------------------!
;	!		   DEVICE TYPE				!
;	!-------------------------------------------------------!
;	!		     JOB NUMBER				!
;	!=======================================================!


		PHASE	0

	.TDHDR:! BLOCK	1		;HEADER
	.TDDEV:! BLOCK	1		;SIXBIT DEVICE NAME
	.TDDVT:! BLOCK	1		;DEVICE TYPE
	.TDJBN:! BLOCK	1		;USER JOB NUMBER

		DEPHASE
	SUBTTL	NODE-WENT-AWAY NOTIFICATION MESSAGE (FUNCTION 36)



;	!=======================================================!
;	!							!
;	!		MESSAGE HEADER				!
;	!							!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!-------------------------------------------------------!


;	THE ONLY BLOCK DEFINED FOR THIS MESSAGE IS .OROBJ
;	IT DEFINES THE NODE WHICH WENT OFFLINE

;	The .OFLAG word will contain a port,,line # if the node was
;	an IBM remote. It will be zero otherwise.

;	Also: If the %ONLINE bit is lit in .MSFLG then this msg
;	      is a Node-Online Message

	%ONLINE==1B3		;MAKE THIS A NODE ONLINE MESSAGE
	SUBTTL	.QOCQE - CREATE QUEUE ENTRY MESSAGE (FUNCTION 37)

;	!=======================================================!
;	!							!
;	!		MESSAGE HEADER				!
;	!							!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!
;	!		ARGUMENT COUNT				!
;	!-------------------------------------------------------!

	;NOTE::: THE QUEUE TYPE BLOCK (.QCQUE) MUST PRECEED THE 
	;DEFINITIONS OF THE QUEUE DEPENDANT BLOCKS

	;THE MESSAGE BLOCK TYPES ARE:

	.QCFIL==10		;FILE SPEC BLOCK

	;This block is the Standard Galaxy FD with .QCFIL put in 
	;the right half of the .FDLEN word.

	.QCCOP==11		;NUMBER OF COPIES BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCCOP			!
;	!-------------------------------------------------------!
;	!	THE NUMBER OF COPIES OF THE FILE TO		!
;	!		   BE OUTPUT				!
;	!-------------------------------------------------------!

	.QCFRM==12		;FORMS TYPE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCFRM			!
;	!-------------------------------------------------------!
;	!	THE FORMS TYPE YOU WANT (SIXBIT)		!
;	!-------------------------------------------------------!

	.QCPTP==13		;FILE FORMAT BLOCK (ASCII, FORTRAN, ETC)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCPTP			!
;	!-------------------------------------------------------!
;	!  THE FILE FORMAT TYPE (SEE .FPINF - FP.FFF)		!
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.QCODP==14		;/DISP: OUTPUT DISPOSITION BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCODP			!
;	!-------------------------------------------------------!
;	!  OUTPUT FILE DISPOSITION - MUST BE 1 (FOR DELETE)	!
;	!-------------------------------------------------------!

	.QCUNT==15		;UNIT TYPE (/UNIT:, /LOWER, /UPPER)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCUNT			!
;	!-------------------------------------------------------!
;	!     DEVICE ATTRUBUTES ( %LOWER,%UPPER,%GENRC,%PHYCL)	!
;	!-------------------------------------------------------!

	.QCAFT==16		;/AFTER BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCAFT			!
;	!-------------------------------------------------------!
;	!	/AFTER TIME (IN UDT FORMAT)			!
;	!-------------------------------------------------------!

	.QCLIM==17		;LIMIT BLOCK (/TIME:, /PAGES:, ETC)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCLIM			!
;	!-------------------------------------------------------!
;	!   LIMIT BLOCK (# OF PAGES,ETC or TIME IN SECS)	!
;	!-------------------------------------------------------!

	.QCUNI==20		;/UNIQUE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCUNI			!
;	!-------------------------------------------------------!
;	!	/UNIQUE: VALUE (%EQUNO or %EQUYE)		!
;	!-------------------------------------------------------!

	.QCRES==21		;/RESTART BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCRES			!
;	!-------------------------------------------------------!
;	!	/RESTART: VALUE (%EQRNO or %EQRNY)		!
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.QCLOG==22		;/OUTPUT: (LOG,NOLOG,ERROR)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCLOG			!
;	!-------------------------------------------------------!
;	!   /OUTPUT: VALUE (%EQONL or %EQOLG or %EQOLE)		!
;	!-------------------------------------------------------!

	.QCACT==23		;/ACCOUNT: ACCOUNT STRING BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH 	!	.QCACT			!
;	!-------------------------------------------------------!
;	\							\
;	\	USERS ACCOUNT STRING IN ASCIZ			\
;	\							\
;	!-------------------------------------------------------!

	.QCQUE==24		;QUEUE TYPE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCQUE			!
;	!-------------------------------------------------------!
;	!   QUEUE TYPE (SEE GLXMAC OBJ.TY FIELD)		!
;	!-------------------------------------------------------!

	.QCNOD==25		;/NODE: DESTINATION NODE BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCNOD			!
;	!-------------------------------------------------------!
;	!   DESTINATION NODE NUMBER OR SIXBIT NODE NAME		!
;	!-------------------------------------------------------!

	.QCNAM==26		;USERS NAME BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH 	   !	.QCNAM			!
;	!-------------------------------------------------------!
;	\							\
;	\   USERS NAME (ASCIZ ON -20, SIXBIT ON THE -10)	\
;	\							\
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE

	.QCOID==27		;USERS NUMBER BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCOID			!
;	!-------------------------------------------------------!
;	! USERS ID (36 BIT USER ID ON -20, PPN ON -10)		!
;	!-------------------------------------------------------!

	.QCNOT==30		;/NOTIFY BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCNOT			!
;	!-------------------------------------------------------!
;	!	/NOTIFY VALUE (%NOTTY, %NOTML, %NOTJB)		!
;	!-------------------------------------------------------!

	.QCBLT==31		;/BATLOG: BLOCK

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCBLT			!
;	!-------------------------------------------------------!
;	!  /BATLOG VALUE (%BAPND or %BSCDE or %BSPOL)		!
;	!-------------------------------------------------------!

	.QCJBN==32		;JOB NAME

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCJBN			!
;	!-------------------------------------------------------!
;	!		SIXBIT JOB NAME				!
;	!-------------------------------------------------------!

	.QCCDI==33		;CONNECTED DIRECTORY BLOCK (-20 ONLY)

;	!-------------------------------------------------------!
;	!   BLOCK LENGTH (2)	!	.QCCDI			!
;	!-------------------------------------------------------!
;	!	36 BIT CONNECTED DIRECTORY NUMBER		!
;	!-------------------------------------------------------!

	.QCNTE==34		;/NOTE: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH 1-2	!	.QCNTE			!
;	!-------------------------------------------------------!
;	\							\
;	\		1 TO 12 SIXBIT CHARACTERS		\
;	\							\
;	!-------------------------------------------------------!

	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


	.QCBGN==35		;/BEGIN: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH (2)	!	.QCBGN			!
;	!-------------------------------------------------------!
;	!	BEGINNING PAGE NUMBER FOR STARTING OUTPUT	!
;	!-------------------------------------------------------!


	.QCPRI==36		;/PRIORITY: BLOCK

;	!-------------------------------------------------------!
;	!  BLOCK LENGTH (2)	!	.QCPRI			!
;	!-------------------------------------------------------!
;	!		PRIORITY (1 TO 20 OR 1 TO 77)		!
;	!-------------------------------------------------------!
	SUBTTL	RECOGNIZE MESSAGE (FUNCTION .QOREC - 40)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!


	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME 

	.RECDV==3		;DEFINE THE DEVICE NAME BLOCK TYPE

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	PHASE	0

.RECDN:! BLOCK	1		;SIXBIT DEVICE NAME
.RECSZ:!			;SIZE OF THE BLOCK

	DEPHASE

>;END TOPS10
	SUBTTL	Tape status message (.QOTST functions 41)

TOPS10<
;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

;The only legal block type in this message is .TLVOL, described below

;	!-------------------------------------------------------!
;	!	4		!	.TLVOL			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!-------------------------------------------------------!
;	!OFL!WLK!DEN!LAB!                                       !
;	!-------------------------------------------------------!
;	!                 SIXBIT VOLUME ID                      !
;	!=======================================================!

	PHASE	0

.TLDRV:!BLOCK	1			;SIXBIT DEVICE NAME

.TLSTS:!BLOCK	1			;STATUS BITS
	TS.OFL==1B0			;ON IF UNIT IS OFF-LINE
	TS.LOK==1B1			;ON IF UNIT IS WRITE-LOCKED
	TS.DEN==77B8			;ACTUAL DENSITY OF TAPE (SEE UUOSYM)
	TS.LAB==77B14			;LABEL TYPE (SEE UUOSYM)

.TLVOL:!BLOCK	1			;SIXBIT VOLUME ID
.TLSIZ:!

	DEPHASE
>;END TOPS10
	SUBTTL	TAPE DRIVE UNLOAD MESSAGE (FUNCTION .QOUNL - 42)

	;ALSO	TAPE DRIVE REWIND MESSAGE (FUNCTION .QOREW - 47)


;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!


	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME 

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!
SUBTTL	Volume Mounted message to tape labeller (.QOVMN = 43)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (2)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;ONE BLOCK IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME 

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	;THERE IS ONE VOLUME (SET) BLOCK ATTACHED TO THE MESSAGE
	;THIS BLOCK DESCRIBE THE INITIAL VOLUME BEING GIVEN TO THE
	;USER AND THE FIRST VOLUME IN THE VOLUME SET

	.VOLMN==4		;BLOCK TYPE FOR THE VOLUME BLOCK

;	!-------------------------------------------------------!
;	!         SIXBIT VOLUME ID FOR MOUNTED VOLUME		!
;	!-------------------------------------------------------!
;	!        SIXBIT VOLUME ID FOR FIRST VOLUME IN SET	!
;	!-------------------------------------------------------!
;	!LABEL TYPE!WLOCK!JOB #!				!
;	!-------------------------------------------------------!

	PHASE	0		;DEFINE THE CONTENTS OF THE BLOCK

.VMNIV:! BLOCK	1		;SIXBIT NAME OF INITIAL VOLUME
.VMNFV:! BLOCK	1		;SIXBIT NAME OF FIRST VOL IN SET
.VMNIN:! BLOCK	1		;INFORMATION ABOUT THE VOL SET
	VI.LTY==77B5		;LABEL TYPE
	VI.WLK==1B6		;WRITE LOCKED IF 1
	VI.JOB==777B17		;JOB NUMBER OF REQUESTOR
.VMNSZ:!			;SIZE OF THE BLOCK (WITHOUT HEADER)

>;END TOPS10
SUBTTL	Volume dismounted message to tape labeller (.QOVDS = 44)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;THE ONLY BLOCK DEFINED IS .RECDV WHICH CONTAINS THE
	;SIXBIT DEVICE NAME 

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!
>;END TOPS10
SUBTTL	Volume switch request from tape labeller (.QOVSR = 45)

TOPS10<

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (2)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;ONE BLOCK IS A .RECDV BLOCK WHICH HAS THE
	;SIXBIT DEVICE NAME OF THE DRIVE NEEDING A NEW VOLUME

;	!-------------------------------------------------------!
;	!	2		!	.RECDV			!
;	!-------------------------------------------------------!
;	!		SIXBIT DEVICE NAME			!
;	!=======================================================!

	;THE OTHER BLOCK DESCRIBES WHICH VOLUME OF THE SET IS
	;NEEDED BY THE USER ON THAT DRIVE

;	!-------------------------------------------------------!
;	!	2		!	.RLVOL			!
;	!-------------------------------------------------------!
;	!WRT!		RELATIVE VOLUME CODE			!
;	!=======================================================!

	.RLVOL=4

	PHASE	0

.RLVCD:! BLOCK	1			;SPACE FOR THE RELATIVE VOLUME CODE
	%VWRT==1B0			;WANT TO USE 'NEXT' VOLUME FOR WRITING
	RLV.CD==7			;WHERE THE CODE GOES
	  %RLNXT==1			;GET THE NEXT VOLUME
	  %RLPRV==2			;GET THE PREVIOUS VOLUME
	  %RLFIR==3			;GET THE FIRST VOLUME OF THE SET

.RLVSZ:!				;SIZE OF THIS BLOCK

	DEPHASE

>;END TOPS10
	SUBTTL Volume Switch Directive From MDA to Tape Labeler (.QOVSD - 46)

TOPS10<

;This message is sent by MDA in response to a volume switch request
;	message from the tape labeller.  It directs the labeller
;	to continue the labelling process on the same drive
;	or on another drive which the OPR/MDA has chosen

;	!=======================================================!
;	/							/
;	/		MESSAGE HEADER				/
;	/							/
;	!-------------------------------------------------------!
;	!		BLOCK COUNT (1)				!
;	!-------------------------------------------------------!
;	!		   FLAG WORD				!
;	!-------------------------------------------------------!

	;Flags for this message
	%VEOF==1B0			;There are no more volumes in the set
					;give EOT to the requestor
	%VABT==1B1			;OPR has aborted the volume
					;switch request

	;There are two blocks passed on this message
	;One is the Volume set directive block which describes
	;the two drives being swapped, and the other is a Volume
	;info block describing the new volume in use, its label type,
	;and its write enable/lock status


	.VSDBL==12		;VOLUME SET DIRECTIVE BLOCK

;	!-------------------------------------------------------!
;	!	4		!	.VSDBL			!
;	!-------------------------------------------------------!
;	!	INITIAL DRIVE NAME IN SIXBIT			!
;	!-------------------------------------------------------!
;	!	CURRENT DRIVE NAME IN SIXBIT			!
;	!-------------------------------------------------------!
;	!		CURRENT VOLUME NAME			!
;	!=======================================================!


		PHASE	0

	.VSDID:! BLOCK	1		;INITIAL DRIVE NAME
	.VSDCD:! BLOCK	1		;CURRENT DRIVE NAME

	VSDLEN:!			;BLOCK LENGTH

		DEPHASE

>;END TOPS10
SUBTTL	IPCF Parameters

;	!=======================================================!
;	\                                                       \
;	\                  QUEUE ENTRY HEADER                   \
;	\                                                       \
;	!=======================================================!
;	!                         FLAGS                         !
;	!-------------------------------------------------------!
;	!                     SENDER'S PID                      !
;	!-------------------------------------------------------!
;	!                    RECEIVER'S PID                     !
;	!-------------------------------------------------------!
;	!      COUNT OF WORDS       !    ADDRESS OF MESSAGE     !
;	!-------------------------------------------------------!
;	!                      SENDER'S ID                      !
;	!-------------------------------------------------------!
;	!             SENDER'S CAPABILITIES (PRIVS)             !
;	!-------------------------------------------------------!
;	!                                                       !
;	\                SENDER'S ACCOUNT STRING                \
;	\                      (10 WORDS)                       \
;	!                                                       !
;	!-------------------------------------------------------!
;	
;	!                 -----  TOPS 20  -----                 !
;	!                                                       !
;	!-------------------------------------------------------!
;	!             CONNECTED DIRECTORY OF SENDER             !
;	!-------------------------------------------------------!
;	\                                                       \
;	\                      END TOPS 20                      \
;	
;	!-------------------------------------------------------!
;	!                SENDER'S SPECIAL INDEX                 !
;	!=======================================================!


	PHASE	QEHSIZ		;APPEND TO THE QUEUE-ENTRY-HEADER

IPCFLG:! BLOCK	1		;FLAGS (SEE UUOSYM.MAC FOR DEFINITIONS)
IPCSDR:! BLOCK	1		;SENDERS PID
IPCRCR:! BLOCK	1		;RECEIVERS PID
IPCMES:! BLOCK	1		;MESSAGE INFORMATION
	IPM.CT==-1,,0		;COUNT OF WORDS
	IPM.AD==0,,-1		;ADDRESS OF THE MESSAGE

IPCHSZ==.-IPCFLG		;SIZE OF THE PDB FOR SEND

IPCSID:! BLOCK	1		;SENDERS ID
IPCPRV:! BLOCK	1		;SENDERS CAPABILITIES (PRIVS)

IPCACT:! BLOCK	10		;SENDERS ACCOUNT STRING.

IFN FTUUOS,<
	IPCCDI==IPCSID		;CONNECTED DIR=SENDER'S ID
>  ;END IFN FTUUOS

IFN FTJSYS,<
IPCCDI:! BLOCK	1		;CONNECTED DIRECTORY OF SENDER
>  ;END IFN FTJSYS

IPCRSZ==.-IPCFLG		;SIZE OF THE PDB FOR RECEIVE

IPCIDX:! BLOCK	1		;SENDER'S SPECIAL INDEX
	IPS.FL==SI.FLG		;GLXMAC SYMBOLS, FLAG FOR VALIDITY
	IPS.IX==SI.IDX		; AND INDEX WHEN IPS.FL IS ON

IPCDAT:!
IPCSIZ:!			;SIZE OF AN IPCF ENTRY (NOT COUNTING
				; THE MESSAGE)

	DEPHASE


;WHEN CALLING C$SEND FOR IPCF SENDS, BITS LIT IN AP ARE:

	IPS.TF==1B0		;TRY FIRST (IGNORE SCAN OF IPS QUEUE)
	IPS.ID==1B1		;IGNORE DUPLICATE (REQUESTED PID IN IPS)
	IPS.IF==1B2		;IGNORE FAILURE (THROW AWAY PACKET)
SUBTTL	Common Parameters

;THE PARAMETERS DEFINED HERE ARE ONES THAT ARE NEEDED BY QUASAR BUT ARE
;SYSTEM DEPENDENT.  TO MINIMIZE FEATURE TESTS AND DUPLICATION OF ROUTINES,
;QUASAR PARAMETERS ARE USED AND EQUATED TO THE CORRECT SYSTEM VALUE.

;**NOTE: THESE VALUES ARE NOT TO BE CONSTRUED AS 'OPTIONS' AND ANY CHANGES
;		WILL CAUSE UNPREDICTABLE RESULTS.


	SYSPRM	ACC.KM,.ACREN,.CKAWT		;KILL/MODIFY ACCESS CODE
	SYSPRM	INT.PI,0,0			;IPCF INTERRUPT CHANNEL OR OFFSET
	SYSPRM	INT.PL,1,1			;IPCF PRIORITY INTERRUPT LEVEL
	SYSPRM	FSSBKS,200,1000			;STANDARD BLOCKSIZE
	SYSPRM	FSSFIB,2,1			;BLK. # OF 1ST INDEX BLK
SUBTTL	Random Macros

;DOSCHD is a macro which may be called to flag that something has
;	happened which might allow a scheduling pass to bear fruit.

DEFINE DOSCHD,<
	IFN <%%.MOD-<SIXBIT /QUASAR/>>,<EXTERN G$SCHD>
	SETOM	G$SCHD
>  ;END DEFINE DOSCHD
SUBTTL	Failsoft System Definitions

;I/O CHANNELS
	ND	CMQ1,10			;FIRST MASTER QUEUE CHANNEL
	ND	CMQ2,11			;SECOND MASTER QUEUE CHANNEL

;OTHER SYMBOLS
	XP	FSSSTR,FSSSTR		;STRUCTURE FOR MASTER QUEUES
	ND	FSSPRT,277		;PROTECTION FOR MASTER QUEUES

;FILE FORMAT AND INDEX DEFINITIONS
	XP	FSSQFV,%%.QSR		;QUEUE FILE VERSION
	XP	FSSMRS,1000		;MAXIMUM REQUEST SIZE
	XP	FSSBPR,<FSSMRS/FSSBKS>	;MAXIMUM BLOCKS/REQUEST
	XP	FSSWPI,1000		;NUMBER OF WORDS/INDEX
	XP	FSSNIB,<FSSWPI/FSSBKS>	;NUMBER OF INDEX BLOCKS/SECTION
	XP	FSSFDB,<FSSFIB+FSSNIB>	;BLK. NO.  OF FIRST DATA BLOCK
	XP	FSSBPS,FSSWPI		;BLOCKS PER SECTION
	XP	FSSMNS,5		;MAXIMUM NUMBER OF SECTIONS

;MASTER FILE NAMES

IFN FTUUOS,<
	DEFINE	MQFNM1,<SIXBIT\QSRMS1\>	;THE PRIMARY MASTER
	DEFINE	MQFNM2,<SIXBIT\QSRMS2\>	;    REDUNDANT MASTER
	ND	DFSSTR,<SIXBIT /DSK/>	;STRUCTURE TO USE IF DEBUGGING
	ND	SPLSTR,<SIXBIT/DSK/>	;SPOOL STRUCTURE
>  ;END OF IFN FTUUOS

IFN FTJSYS,<
	DEFINE	MQFNAM,<ASCIZ\DSK:<SPOOL>PRIMARY-MASTER-QUEUE-FILE.QUASAR\>
	DEFINE	DMQFNM,<ASCIZ \DSK:PRIVATE-MASTER-QUEUE-FILE.QUASAR\>
	ND	SPLSTR,<ASCII/DSK:/>	;SPOOL STRUCTURE
>  ;END OF IFN FTJSYS


;REBUILD CODES
;	A REBUILD CODE IS STORED IN THE FILE INDEX ENTRY FOR EACH REQUEST
;	IN THE MASTER QUEUE FILE.  AT QUASAR INITIALIZATION THE CORRECT
;	ROUTINE IS CALLED WITH THE ENTRY BASED ON THE REBUILD CODE.

	%RBBAT==1			;BATCH JOB (INP, LPT, PLT, ...)
	%RBDEL==2			;DELETED FILES 
SUBTTL	QUASAR Fatal Error Codes

;ARGUMENTS USED ARE

;	X	'SUFFIX' , 'TEXT' , 'ERROR SEVERITY'

;THE EXPANDER IS TO DEFINE THE CORRECT 'X' MACRO

DEFINE	ERRCDS,<
	XLIST

	X	BMG,<Bad MODIFY Group>,MF.FAT
	X	ICM,<Illegal CREATE Message>,MF.FAT
	X	IFS,<Illegal File Specification>,MF.FAT
	X	ILM,<Illegal LIST Message>,MF.FAT
	X	IFD,<Illegally Formatted Device Name>,MF.FAT
	X	IMT,<Illegal Message Type>,MF.FAT
	X	INF,<Illegal Number of Files>,MF.FAT
	X	IPE,<Insufficient Privileges Enabled>,MF.FAT
	X	MTL,<Message Too Long>,MF.FAT
	X	MTS,<Message is Too Short>,MF.FAT
	X	NKC,<Not a Known Component>,MF.FAT
	X	NOR,<Number Out of Range>,MF.FAT
	X	NYO,<Not Your Object>,MF.FAT
	X	SNY,<Specified request is Not Yours>,MF.FAT
	X	UQS,<Unknown Queue Specified>,MF.FAT
	X	UOS,<Unknown Object Specified>,MF.FAT
	X	WVN,<Wrong Version Number>,MF.FAT
	X	IAS,<Invalid Account String Specified>,MF.FAT
	X	OHR,<Operator Has Restricted Queue Entry Commands>,MF.FAT
	X	IMM,<Illegal MOUNT Message>,MF.FAT
	X	MPN,<MOUNT Request Processor Not Running>,MF.FAT
	X	CDU,<Can't Default User Name>,MF.FAT
	X	CDD,<Can't Default Connected Directory>,MF.FAT
	X	NVM,<No Volume Mounted On Drive>,MF.FAT
	X	VAU,<Volume is Already in Use>,MF.FAT
	X	DAU,<Drive is Already in Use>,MF.FAT
	X	VIL,<Volume on Drive is Labeled>,MF.FAT
	X	URB,<User Requested Bypass Label Volumes>,MF.FAT
	X	URL,<User Requested Labeled Volumes>,MF.FAT
	X	URW,<User Requested Write-Locked Volumes>,MF.FAT
	X	URE,<User Requested Write-Enabled Volumes>,MF.FAT
	X	RDD,<Requested Density Does not Match Volume Density>,MF.FAT
	X	VND,<Requested Volume not on this Device>,MF.FAT
	X	IUD,<Illegal For UNAVAILABLE Device>,MF.FAT
	X	NSD,<No Such Device>,MF.FAT
	X	RLD,<Request Label Type Doesn't Match Volume Label Type>,MF.FAT
	X	DAD,<Drive is already available>,MF.FAT
	X	CDA,<Can't Delete an Allocated request>,MF.FAT
	X	CNI,<Command Not Yet Implemented>,MF.FAT
	X	IMO,<Invalid Message from ORION>,MF.FAT
	X	PRB,<Privileges Required for Bypass Label Processing>,MF.FAT
	X	NVI,<VOLID Required for This Volume>,MF.FAT
	X	CIU,<Cannot IDENTIFY the Users Current Volume>,MF.FAT
	X	ICD,<Illegal Connected Directory Specified>,MF.FAT

	LIST
	SALL
>  ;END OF DEFINE ERRCDS

DEFINE X(CODE,STRING,FLAGS),<
	ER$'CODE==..XX
	..XX=..XX+1
>;END DEFINE X

	..XX==1
	ERRCDS				;DEFINE THE ERROR OFFSETS
SUBTTL	Definition of the Known Queues

;ARGUMENTS USED ARE

;	X	'QUENAME' , 'ENTRYSIZE' , 'TYPE' , 'FLAGS' , 'SCHEDULER'

DEFINE	QUEUES,<

	XLIST

	X	INP,QNTSIZ,.QHTIP,0,S$INPT,LIQBAT
	X	LPT,QNTSIZ,.QHTOU,0,S$LPT,LIQLPT
	X	PTP,QNTSIZ,.QHTOU,0,S$PTP,LIQPTP
	X	CDP,QNTSIZ,.QHTOU,0,S$CDP,LIQCDP
	X	PLT,QNTSIZ,.QHTOU,0,S$PLT,LIQPLT
	X	RET,QNTSIZ,.QHTAR,QH.INV,S$RET,LIQRET
	X	NOT,QNTSIZ,.QHTAR,QH.INV,S$NOT,0
	X	BIN,QNTSIZ,.QHTIP,QH.INV,S$BIN,0
	X	XFR,QNTSIZ,.QHTOU,QH.INV,S$XFR,0
	X	DBM,QNTSIZ,.QHTOU,QH.INV,S$DBM,0
	X	RDR,QNTSIZ,.QHFRR,0,S$RDR,0
	X	IPC,IPCSIZ,.QHTQS,QH.IPC!QH.INV,0,0
	X	IPS,IPCSIZ,.QHTQS,QH.IPC!QH.INV,0,0
	X	SPL,SPLSIZ,.QHTQS,QH.INV,0,0
	X	PSB,PSBSIZ,.QHTQS,QH.INV,0,0
	X	OBJ,OBJSIZ,.QHTQS,QH.INV,0,0
	X	USE,USESIZ,.QHTQS,QH.INV,0,0
	X	STR,STRSIZ,.QHTQS,QH.INV,0,0
	X	NET,NETSIZ,.QHTQS,QH.INV,0,0

	LIST

>  ;END OF DEFINE QUEUES

	;DEFINE THOSE QUEUES WHICH ARE DEVICES.

DEFINE	DEVQUE,<
	X	BAT
	X	LPT
	X	CDP
	X	PTP
	X	PLT
	X	MNT
	X	RET
> ;END OF DEVICE QUEUES MACRO

	MAX	<QNTSIZ>	;INCLUDE ANY QUEUE THAT CAN HAVE AFTER OR INUSE
USESIZ==MAXSIZ			;DEFINE LARGEST ENTRY IN USE QUEUE
RDESIZ==MAXSIZ		;DEFINE LARGEST ENTRY IN RDE QUEUE


DEFINE	QUEHDR,<  ;MACRO TO GENERATE THE QUEUE HEADERS FROM THE QUEUES MACRO
	DEFINE	X(A,B,C,D,E,F),<	;DEFINE X FOR THE LATER EXPANSION OF QUEUES
HDR'A::	INSVL.(<SIXBIT\   A\>,QH.NAM)!INSVL.(C,QH.TYP)!D
	EXP	0
	IFDIF	<E> <0> ,<GLOB(E)>
	XWD	E,INSVL.(B,QH.SIZ)
	EXP	F
	EXP	0
	>  ;END OF DEFINE X
	QUEUES			;NOW EXPAND QUEUES
>  ;END OF DEFINE QUEHDR
	SUBTTL	MTCON MOUNT STRUCTURES

	;MOUNT REQUEST (SENT BY USER TO QUASAR)

;	!=======================================================!  /+\
;	\                                                       \   !
;	\                  THE MESSAGE HEADER                   \   !
;	\                                                       \   !
;	!=======================================================!   !
;	!        FLAGS THAT APPLY TO THE ENTIRE MESSAGE         !   !
;	!-------------------------------------------------------!   LM
;	!             SIXBIT NAME OF MOUNT REQUEST              !   !
;	!-------------------------------------------------------!   !
;	!        MOUNT ENTRY COUNT (MUST BE 1 FOR RLS 4)        !   !
;	!=======================================================!   !
;	!                 -----  TOPS 10  -----                 !   !
;	!                                                       !   !
;	!-------------------------------------------------------!   !
;	!                   SIXBIT USER NAME                    !   !
;	!                       (2 WORDS)                       !   !
;	!-------------------------------------------------------!   !
;	!                                                       !   !
;	\                  USER ACCOUNT STRING                  \   !
;	\                       IN ASCIZ                        \   !
;	\                      (10 WORDS)                       \   !
;	!                                                       !   !
;	!=======================================================!  \./

        PHASE MSHSIZ
.MMFLG:! BLOCK  1               ;FLAG WORD FOR MOUNT MESSAGE
	MM.WAT==1B0		;USER IS WAITING FOR IPCF ACK WHEN DONE
	MM.NOT==1B1		;USER WANTS NOTIFICATION VIA TRMOP.
.MMNAM:! BLOCK  1               ;SIXBIT NAME OF MOUNT REQUEST
.MMARC:! BLOCK  1               ;ARGUMENT COUNT FOR MOUNT MESSAGE

TOPS10 <
.MMUSR:! BLOCK	EQNMSZ		;SIXBIT USER NAME
.MMUAS:! BLOCK	10		;ASCIZ USER ACCOUNT STRING
>

.MMHSZ:!                        ;SIZE OF MOUNT MESSAGE HEADER
        DEPHASE
	SUBTTL	MOUNT REQUESTS (WITHIN THE MESSAGE)

;!=======================================================!  /+\
;!     ENTRY LENGTH (LE)     !         TYPE CODE         !   !
;!-------------------------------------------------------!   !
;!                REQUEST-SPECIFIC FLAGS                 !   !
;!-------------------------------------------------------!   !
;!                    SUBENTRY COUNT                     !   !
;!-------------------------------------------------------!   !
;!                     SUBENTRY # 1                      !   !
;!-------------------------------------------------------!   LE
;!                     SUBENTRY # 2                      !   !
;!-------------------------------------------------------!   !
;!                           .                           !   !
;!                           .                           !   !
;!                           .                           !   !
;!-------------------------------------------------------!   !
;!                     SUBENTRY # n                      !   !
;!=======================================================!  \./


        PHASE 0
.MEHDR:! BLOCK  1               ;MOUNT ENTRY HEADER WORD
	  .MNTTP==1		  ;Tape Mount Request Code
	  .MNTST==2		  ;Disk Mount Request Code
	  .DSMST==3		  ;Disk Dismount Request Code
.MEFLG:! BLOCK  1               ;FLAG WORD FOR ENTRY
.MECNT:! BLOCK  1               ;SUBENTRY COUNT
.MEHSZ:!                        ;SIZE OF HEADER
        DEPHASE


        PHASE 0
ARG.HD:! BLOCK  1               ;SUBENTRY HEADER WORD
        AR.LEN=-1,,0            ;LENGTH OF SUBENTRY
        AR.TYP=0,,-1            ;TYPE OF SUBENTRY
ARG.DA:!                        ;START OF DATA AREA
        DEPHASE
	SUBTTL	TAPE MOUNT REQUEST BLOCKS

	.MDINV==0		;BLOCK TYPE 0 IS INVALID

	.TMDEN==1		;MAG TAPE DENSITY CODE (.SJDxx)

;	!-------------------------------------------------------!
;	!	2		!	.TMDEN			!
;	!-------------------------------------------------------!
;	!		The Tape Density Code			!
;	!-------------------------------------------------------!

	.TMDRV==2		;MAG TAPE DRIVE TYPE

;	!-------------------------------------------------------!
;	!	2		!	.TMDRV			!
;	!-------------------------------------------------------!
;	!		.TMDR9 or .TMDR7			!
;	!-------------------------------------------------------!

		.TMDR9==1	;Nine Track Drive
		.TMDR7==2	;Seven Track Drive
		.TMDMX==2	; ?


	.TMLT==3		;Mag TAPE LABEL TYPE

;	!-------------------------------------------------------!
;	!	2		!	.TMLT			!
;	!-------------------------------------------------------!
;	!	.LTUNL or .LTANS or .LTEBC or .LTT20		!
;	!-------------------------------------------------------!


	.TMSET==4		;MAG TAPE SET NAME

;	!-------------------------------------------------------!
;	!	2		!	.TMSET			!
;	!-------------------------------------------------------!
;	!		sixbit Volume Set Name			!
;	!-------------------------------------------------------!


	.TMRMK==5		;Asciz Remark for the Operator

;	!-------------------------------------------------------!
;	!	length		!	.TMRMK			!
;	!-------------------------------------------------------!
;	\							\
;	\		An Asciz remark for the OPR		\
;	\							\
;	!-------------------------------------------------------!


	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


	.TMSTV==6		;Mag Tape Starting Volume

;	!-------------------------------------------------------!
;	!	2 or 3		!	.TMSTV			!
;	!-------------------------------------------------------!
;	!		Index into Volume set if length = 2	!
;	!-------------------------------------------------------!
;	!	Sixbit volume Id (Length = 3 & word 2 = 0)	!
;	!-------------------------------------------------------!



	.TMVOL==7		;Volume List

;	!-------------------------------------------------------!
;	!	Length		!				!
;	!-------------------------------------------------------!
;	\							\
;	\		Sixbit list of volumes			\
;	\							\
;	!-------------------------------------------------------!


	.TMVPR==10		;Volume Protection code For new volumes

;	!-------------------------------------------------------!
;	!	2		!	.TMVPR			!
;	!-------------------------------------------------------!
;	!	0		!	Protection Code		!
;	!-------------------------------------------------------!


	.TMINI==11		;Volume Initialization Parms

;	!-------------------------------------------------------!
;	!	2 or 3		!	.TMINI			!
;	!-------------------------------------------------------!
;	!		Tape Label Type				!
;	!-------------------------------------------------------!
;	!		User Number (Optional)			!
;	!-------------------------------------------------------!


	;CONTINUED ON THE NEXT PAGE
	;CONTINUED FROM THE PREVIOUS PAGE


	.SMNAM==12		;Disk Structure Name in sixbit

;	!-------------------------------------------------------!
;	!	2		!	.SMNAM			!
;	!-------------------------------------------------------!
;	!		Sixbit Structure Name			!
;	!-------------------------------------------------------!


	.SMALI==13		;Disk Structure Alias Name in sixbit

;	!-------------------------------------------------------!
;	!	2		!	.SMALI			!
;	!-------------------------------------------------------!
;	!		Sixbit Structure Alias			!
;	!-------------------------------------------------------!



	.TMLNM==14		;VOLUME SET LOGICAL NAME

;	!-------------------------------------------------------!
;	!	2		!	.TMLNM			!
;	!-------------------------------------------------------!
;	!		The Logical Volume Set name		!
;	!-------------------------------------------------------!


	%MDMAX==14		;Maximum block number allocated
	SUBTTL	.MEFLG BIT DEFINITIONS


;The following flags may be 
;present in the .MEFLG word of a tape-mount request:

;FLAG  BIT     MEANING
;----  ---     -------
TM%SCR==1B0      ; Request to access temporary volume set.
                 ; Implies TM%NEW, TM%NOV, TM%WEN
                 ; TM%OSV is ignored if set
TM%NEW==1B1      ; Creating new volume set.
                 ; Implies TM%NOV, TM%WEN
TM%VFY==1B2      ; Verify that user-supplied setname
                 ; matches setname of volume(s) being mounted.
                 ; Meaningful for labeled tapes only.
TM%OSV==1B3      ; Operator will be asked to key in list of
                 ; volume identifiers.
TM%WEN==1B4      ; Volume(s) must be mounted write-enabled.
                 ; If reset, must be mounted write-protected.
TM%BYP==1B5      ; If label-type is unlabeled, bypass any label
                 ; security checks.
TM%NUL==1B6      ; Do not unload volumes at volume-switch or
                 ; when DISMOUNT TAPE command given.
	SUBTTL	MOUNT REQUEST

;                   TAPE MOUNT REQUEST
;          IPCF MESSAGE SENT FROM QUASAR TO MTCON
;!=======================================================!
;!   MESSAGE LENGTH (512)    !   MESSAGE TYPE (.QOMNT)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!                  ACKNOWLEDGMENT CODE                  !
;!=======================================================!
;!                                                       !
;\      UNMODIFIED USER IPCF MESSAGE (MINUS HEADER)      \
;!                                                       !
;!-------------------------------------------------------!
;!                                                       !
;\                           0                           \
;!                                                       !
;!-------------------------------------------------------!
;!               INTERNAL TASK NAME (ITN)                !
;!-------------------------------------------------------!
;!                      USER'S PID                       !
;!-------------------------------------------------------!
;!             SIZE OF USER'S MOUNT MESSAGE              !
;!-------------------------------------------------------!
;!         ACK CODE FROM USER'S MESSAGE HANDLER          !
;!-------------------------------------------------------!
;!                  USER'S USER NUMBER                   !
;!-------------------------------------------------------!
;!              USER'S ENABLED CAPABILITIES              !
;!-------------------------------------------------------!
;!                                                       !
;\              USER'S ASCIZ ACCOUNT STRING              \
;!                                                       !
;!=======================================================!

	PHASE	762
.MMUMX:!                        ;MAXIMUM LENGTH OF USER MOUNT MESSAGE
.MMITN:! BLOCK  1               ;INTERNAL TASK NAME ASSIGNED BY QUASAR
.MMPID:! BLOCK  1               ;USER'S PID
.MMUMS:! BLOCK  1               ;SIZE OF USER'S MOUNT MESSAGE
.MMUCD:! BLOCK  1               ;ACK CODE FROM USER'S MESSAGE HEADER
.MMUNO:! BLOCK  1               ;USER'S USER NUMBER
.MMCAP:! BLOCK  1               ;USER'S ENABLED CAPABILITIES
.MMACT:! BLOCK  10              ;USER'S ASCIZ ACCOUNT STRING
        DEPHASE
	SUBTTL	Response to User Tape Mount Request

;After the user process has sent an IPCF message  to  QUASAR  to
;request  a  tape  mount, it will typically wait for a response,
;which will be sent when:
;     1.  QUASAR finds an error while parsing and validating the
;         user request;  the request is aborted.
;     2.  MTCON encounters  a  problem  trying  to  satisfy  the
;         request;  the request is aborted.
;     3.  MTCON  mounts  the  first  volume   of   the   request
;         successfully;   the  response  indicates  a successful
;         mount.

;The mount response message sent by MTCON or QUASAR to the  user
;will have the following format:

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMNA)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!     ACKNOWLEDGMENT CODE FROM USER'S MOUNT REQUEST     !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                      ENTRY COUNT                      !
;!-------------------------------------------------------!
;!                        ENTRY 1                        !
;!-------------------------------------------------------!
;!                           .                           !
;!                           .                           !
;!                           .                           !
;!-------------------------------------------------------!
;!                        ENTRY n                        !
;!=======================================================!


	;DEFINE THE MESSAGE TYPE

	.QOMNA==1		;TAPE MOUNT REQUEST ANSWER


;Either of two responses is conveyed:
;     1.  The request was completed successfully.  The  response
;         contains one .MNRDV and one .MNRTX.
;     2.  The request was aborted.  The  response  contains  one
;         .MNREC and possibly one .MNRTX.
	SUBTTL	MOUNT RESPONSES

;Mount response entry formats are described below:

	.MNREC==2		;Error Code

;     !=======================================================!
;     !        LENGTH (2)         !          .MNREC           !
;     !-------------------------------------------------------!
;     !             0             !    TOPS-20 ERROR CODE     !
;     !=======================================================!

	.MNRDV==1		;Device block

;     !=======================================================!
;     !      LENGTH (2 OR 3)      !          .MNRDV           !
;     !-------------------------------------------------------!
;     !           VOLUME SET NAME OR STRUCTURE NAME           !
;     !-------------------------------------------------------!
;     !       MT DEVICE DESIGNATOR (TAPE REQUESTS ONLY)       !
;     !=======================================================!

	.MNRTX==3		;Asciz Text

;     !=======================================================!
;     !          LENGTH           !          .MNRTX           !
;     !-------------------------------------------------------!
;     !                                                       !
;     \                      ASCIZ TEXT                       \
;     !                                                       !
;     !=======================================================!

	.MNSDV==4		;Sixbit Structure Alias

;	!=======================================================!
;	!	LENGTH		!	   .MNSDV		!
;	!-------------------------------------------------------!
;	!	SIXBIT STRUCTURE NAME				!
;	!=======================================================!

	.MNRNM==5		;Sixbit Mount Request Name

;	!=======================================================!
;	!	LENGTH		1	   .MNRNM		!
;	!-------------------------------------------------------!
;	!	SIXBIT MOUNT REQUEST NAME			!
;	!=======================================================!
	SUBTTL	CANCELING TAPE MOUNT REQUESTS


;Response to User Cancel Request

;MTCON will send the following message to the user PID to convey
;the actions taken as a result of the cancel request:

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMCA)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!     ACKNOWLEDGMENT CODE FROM USER'S MOUNT REQUEST     !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                   ENTRY COUNT                         !
;!=======================================================!

        PHASE MSHSIZ
.OFLAG:! BLOCK  1               ;FLAG WORD
.OARGC:! BLOCK  1               ;ENTRY COUNT
.OHDRS:!                        ;SIZE OF RESPONSE MESSAGE HEADER
        DEPHASE
	SUBTTL	ABORT MSG FROM QUASAR TO MTCON


	;THIS MESSAGE IS SENT BY QUASAR TO MTCON WHEN A USER
	;CANCELS 1 OR MORE OF HIS MOUNT REQUESTS


;!=====================================================	!
;!   MESSAGE LENGTH	!  MESSAGE TYPE (.QOMTA)	!
;!------------------------------------------------------!
;!	FLAGS		!	SUFFIX			!
;!------------------------------------------------------!
;!	    ACKNOWLEDGEMENT CODE			!
;!------------------------------------------------------!
;!		FLAG WORD (NONE)			!
;!------------------------------------------------------!
;!		ARGUMENT COUNT				!
;!------------------------------------------------------!
;!    ENTRY LENGTH	!   ENTRY TYPE (.MTPID)		!
;!------------------------------------------------------!
;!		    USERS PID				!
;!------------------------------------------------------!
;!    ENTRY LENGTH	!   ENTRY TYPE (.MTITN)		!
;!------------------------------------------------------!
;!		      ITN				!
;!------------------------------------------------------!
;!		      ITN				!
;!------------------------------------------------------!

;			ETC


;	THE MESSAGE BLOCK TYPES ARE:

	.MTPID==1	;USERS PID
	.MTITN==2	;A LIST OF ITN'S TO CANCEL
	SUBTTL	MOUNT RELEASE MESSAGE
;When  a  request  completes,  MTCON  notifies  the   user   (if
;appropriate)  and  sends  a  RELEASE message to QUASAR for that
;request.

;           RELEASE MESSAGE FROM MTCON TO QUASAR

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOREL)   !
;!-------------------------------------------------------!
;!           FLAGS           !       SIXBIT SUFFIX       !
;!-------------------------------------------------------!
;!                  ACKNOWLEDGMENT CODE                  !
;!=======================================================!
;!             INTERNAL TASK NAME OF REQUEST             !
;!=======================================================!




	;CHECKPOINT MESSAGE DEFINITIONS

	;THESE DEFINE THE OFFSETS INTO THE CHE.IN BLOCK OF THE
	;TAPE/DISK CHECKPOINT MESSAGE

	.MTSTA==0		;CHECKPOINT STATUS INFORMATION
	.MTVOL==1		;CHECKPOINT VOLUME INFORMATION
	  %VOLBL==0		;NO VOLUME PRESENT
	  %VOLSC==1		;SCRATCH VOLUME
	  			;WORD MAY ALSO CONTAIN A SIXBIT VOLUME ID
	.MTTYP==2		;CHECKPOINT VOLUME TYPE
				;SEE THE MOUNT REQUEST BLOCK CODES FOR TYPES
	SUBTTL	QUASAR TAPE MOUNT REQUEST QUEUE STRUCTURE

;	!=======================================================!
;	!		36 BIT USER ID				!
;	!-------------------------------------------------------!
;	/		ASCIZ USER NAME				/
;	/							/
;	!-------------------------------------------------------!
;	!	FLAGS		!	USERS JOB NUMBER	!
;	!-------------------------------------------------------!
;	!		SIXBIT REQUEST NAME			!
;	!-------------------------------------------------------!
;	/							/
;	/		USERS ASCIZ ACCOUNT STRING		/
;	/							/
;	!-------------------------------------------------------!
;	!		   USERS PID #				!
;	!-------------------------------------------------------!
;	!	# OF VSL'S	!	REQUEST ID		!
;	!-------------------------------------------------------!
;	/							/
;	/		POINTERS TO THE VOLUME			/
;	/		     SET LISTS				/
;	/							/
;	!-------------------------------------------------------!




		PHASE	0

	.MRUSR:! BLOCK	1	;36 BIT USER ID OR PPN (-10)
	.MRNAM:! BLOCK	EQNMSZ	;USER NAME (ASCIZ -20, SIXBIT -10)
	.MRJOB:! BLOCK	1	;USERS JOB NUMBER,,CAPABILITIES (IPCF MDB.PV)
	.MRREQ:! BLOCK	1	;SIXBIT REQUEST NAME
	.MRACT:! BLOCK	10	;USERS ACCOUNT STRING
	.MRPID:! BLOCK	1	;REQUESTORS PID
	.MRFLG:! BLOCK	1	;FLAG BITS FOR THIS MDR
	  MR.WAT==1B0		;SENDER IS WAITING FOR IPCF ACK WHEN DONE
	  MR.NOT==1B1		;SENDER WANTS NOTIFICATION BY TRMOP.
	.MRLOG:! BLOCK	1	;UNIVERSAL TIME OF LOGIN
	.MRRID:! BLOCK	1	;VOL SET COUNT,,REQUEST ID
	  MR.RID==0,,-1		  ;REQUEST-ID IN THE RIGHT HALF
	  MR.CNT==-1,,0		  ;VOLUME SET COUNT IN THE LEFT HALF
	.MRVSL:! BLOCK	1	;POINTERS TO THE VOLUME SET LISTS (MINIMUM 1)

	MDRLEN:!		;MINIMUM MDR QUEUE LENGTH

		DEPHASE
	SUBTTL	VOLUME SET LIST (VSL) STRUCTURE

;	!-------------------------------------------------------!
;	!                    POINTER TO MDR                     !
;	!-------------------------------------------------------!
;	!                       FLAG WORD                       !
;	!-------------------------------------------------------!
;	!         # TRACKS          !          DENSITY          !
;	!-------------------------------------------------------!
;	!                    VOLUME SET NAME                    !
;	!-------------------------------------------------------!
;	/                                                       /
;	/                 USER'S ASCIZ REMARKS                  /
;	/                                                       /
;	!-------------------------------------------------------!
;	!                VOLUME SET LOGICAL NAME                !
;	!-------------------------------------------------------!
;	!       VOLUME COUNT        !       VOLUME OFFSET       !
;	!-------------------------------------------------------!
;	!                POINTERS TO VOLUME LIST                !
;	!-------------------------------------------------------!

		PHASE	0

	.VSMDR:! BLOCK	1	;POINTER TO THE CONTROLLING MDR
	.VSFLG:! BLOCK	1	;MOUNT FLAG WORD 
	   VS.TMP==1B1		  ;THIS IS A TEMPORARY VOLUME SET
	   VS.NEW==1B2		  ;THIS IS A NEW VOLUME SET
	   VS.VFY==1B3		  ;WANT TO VERIFY VOLUME SET NAMES
	   VS.OPR==1B4		  ;OPR WILL BE ASKED FOR VOLUME SET LIST
	   VS.WLK==1B5		  ;0=WRITE ENABLED, 1=WRITE LOCKED
	   VS.NUL==1B6		  ;DONT UNLOAD TAPE ON DISMOUNT/VOL SWITCH
	   VS.TYP==7B9		  ;VOLUME TYPE 1=TAPE, 2=STRUCTURE, 3=DECTAPE
	     %TAPE==1		    ;THIS IS A TAPE MOUNT REQUEST
	     %DISK==2		    ;THIS IS A STRUCTURE MOUNT REQUEST
	     %DTAP==3		    ;THIS IS A DECTAPE MOUNT REQUEST
	     %DSMT==4		    ;THIS IS A DISMOUNT REQUEST
	   VS.LBT==17B13	  ;VOLUME LABEL TYPE FOR LABEL PROCESSING
	   VS.VSW==1B14		  ;Volume Switch in Progress
	.VSATR:! BLOCK	1	;MOUNT REQUEST ATTRIBUTES
	   VS.TRK==-1,,0	   ;TRACKS
	   VS.DEN==0,,-1	   ;DENSITY
	.VSVSN:! BLOCK	VSNLEN	;ASCIZ VOLUME SET NAME
	.VSREM:! BLOCK	^D12	;ASCIZ USER REMARKS (59 CHARS MAX)
	.VSLNM:! BLOCK	1	;VOLUME SET LOGICAL NAME (-10 ONLY)
	.VSUCB:! BLOCK	1	;POINTER TO LAST DEVICE ALLOCATED TO THIS VSL
	.VSCVL:! BLOCK	1	;VOL COUNT,,OFFSET TO THE CURRENT VOLUME
	   VS.OFF==0,,777000	  ;OFFSET TO THE CURRENT VOLUME
	   VS.LVL==0,,000777	  ;OFFSET TO LAST VOLUME USED
	   VS.CNT==-1,,0	  ;VOLUME COUNT
	.VSVOL:! BLOCK	1	;POINTERS TO THE VOLUME LIST

	VSLLEN:!		;MINIMUM LENGTH OF A VSL

		DEPHASE
	SUBTTL	VOLUME LIST STRUCTURE (VOL)



;	!-------------------------------------------------------!
;	!		SIXBIT VOLUME NAME			!
;	!-------------------------------------------------------!
;	!		VOLUME FLAG BITS			!
;	!-------------------------------------------------------!
;	!       MOUNT COUNT         !       OWNER OFFSET        !
;	!-------------------------------------------------------!
;	!		POINTER TO THE UCB			!
;	!-------------------------------------------------------!
;	/							/
;	/		POINTER(S) TO THE VSL(S)                /
;	/							/
;	!-------------------------------------------------------!

		PHASE	0

	.VLNAM:! BLOCK	1		;VOLUME NAME
	.VLFLG:! BLOCK	1		;VOLUME FLAG BITS
	   VL.STA==7B2			  ;VOLUME STATUS
	     %STAWT==0			    ;VOLUME IS WAITING
	     %STAAB==1			    ;VOLUME USE HAS BEEN ABORTED
	     %STAMN==2			    ;VOLUME IS MOUNTED
	     %STADM==3			    ;VOLUME IS TO BE DISMOUNTED
	   VL.SCR==1B3			  ;VOLUME IS A SCRATCH VOLUME
	   VL.SHR==1B4			  ;VOLUME IS TO BE SHARED (DISK ONLY)
	   VL.DEN==7B7			  ;VOLUME DENSITY
	   VL.LBT==17B11		  ;VOLUME LABEL TYPE
	.VLOWN:! BLOCK	1		;COUNT OF REQUESTORS,,OFFSET TO OWNER
	   VL.OFF==0,,-1		  ;OFFSET INTO .VLVSL FOR CURRENT OWNER
	   VL.CNT==-1,,0		  ;NUMBER OF REQUESTORS FOR THIS VOLUME
	.VLUCB:! BLOCK	1		;POINTER TO THE UCB
	.VLVSL:! BLOCK	1		;POINTER(S) TO THE VSL(S)

	VOLLEN:!			;MINIMUM VOLUME ENTRY LENGTH

		DEPHASE
	SUBTTL	UNIT CONTROL BLOCK STRUCTURE


;	!===============================================================!
;	!		    Device Name (Sixbit)			!
;	!---------------------------------------------------------------!
;	!		    Device Status Bits				!
;	!---------------------------------------------------------------!
;	!		     User Mount Count				!
;	!---------------------------------------------------------------!
;	!		      Volume Pointer				!
;	!===============================================================!



		PHASE	0

	.UCBNM:! BLOCK	1		;DEVICE NAME IN SIXBIT
	.UCBST:! BLOCK	1		;DEVICE STATUS BITS
	    UC.TRK==1B1			  ;TRACK STATUS 0=7TRK, 1=9TRK
	    UC.200==1B2			  ;DEVICE SUPPORTS 200 BPI
	    UC.556==1B3			  ;DEVICE SUPPORTS 556 BPI
	    UC.800==1B4			  ;DEVICE SUPPORTS 800 BPI
	    UC.1600==1B5		  ;DEVICE SUPPORTS 1600 BPI
	    UC.6250==1B6		  ;DEVICE SUPPORTS 6250 BPI
	    UC.AVR==1B7			  ;AVR BIT 1=ENABLED
	    UC.WLK==1B8			  ;UNIT WRITE LOCKED 1=LOCKED
	    UC.OFL==1B9			  ;UNIT IS OFFLINE 1=OFFLINE
	    UC.DVT==7B12		  ;UNIT DEV TYPE (%TAPE, %DISK, %DTAPE)
	    UC.KTP==7B15		  ;UNIT CONTROLLER TYPE
	    UC.AVA==1B16		  ;UNIT IS AVAILABLE FOR USE BY MDA
	    UC.VSW==1B17		  ;Ucb is in Volume Switch State
	.UCBCN:! BLOCK	1		;USER MOUNT COUNT
	.UCBVL:! BLOCK	1		;PTR TO VOLUME MOUNTED ON THIS DEVICE
	.UCBVS:! BLOCK	1		;POINTER TO THE VSL WHICH OWNS THIS UCB

	UCBLEN:!			;A UCB LENGTH

		DEPHASE
	SUBTTL  REQUEST FOR MOUNT ATTRIBUTES

;THIS IS A REQUEST TO QUASAR (ACTUALLY MTCON) FROM A USER TO RETURN
;ATTRIBUTES OF A MOUNTED DEVICE.  THE MESSAGE SENT BY THE USER
;CONTAINS ONLY THE HEADER AND THE DEVICE DESIGNATOR.  QUASAR
;ADDS THE PID AND CAPABILITIES WORDS AND PASSES THE MESSAGE TO
;MTCON, WHO THEN SENDS A REPLY TO THE USER'S PID.

;!=======================================================!
;!      MESSAGE LENGTH       !     MSG TYPE (.QOMAT)     !
;!-------------------------------------------------------!
;!                         FLAGS                         !
;!-------------------------------------------------------!
;!              USER'S ACKNOWLEDGMENT CODE               !
;!=======================================================!
;!                   DEVICE DESIGNATOR                   !
;!-------------------------------------------------------!
;!                      USER'S PID                       !
;!-------------------------------------------------------!
;!     USER CAPABILITIES     !        USER JOB #         !
;!=======================================================!

	PHASE MSHSIZ

.MATDV:! BLOCK	1		;DEVICE DESIGNATOR
.MATUS:!			;SIZE OF USER ATTRIBUTE REQUEST MESSAGE
.MATPD:! BLOCK	1		;USER'S PID
.MATCP:! BLOCK	1		;USER'S CAPABILITIES AND JOB NUMBER
.MATQS:! 			;SIZE OF QUASAR-TO-MTCON MESSAGE

	DEPHASE
	SUBTTL  RESPONSE TO REQUEST FOR MOUNT ATTRIBUTES

;!=======================================================!
;!      MESSAGE LENGTH       !   MESSAGE TYPE (.QOMAR)   !
;!-------------------------------------------------------!
;!                         FLAGS                         !
;!-------------------------------------------------------!
;!              USER'S ACKNOWLEDGMENT CODE               !
;!=======================================================!
;!                 FLAGS (NONE DEFINED)                  !
;!-------------------------------------------------------!
;!                      ENTRY COUNT                      !
;!-------------------------------------------------------!
;!                        ENTRY 1                        !
;!-------------------------------------------------------!
;!                           .                           !
;!                           .                           !
;!                           .                           !
;!-------------------------------------------------------!
;!                        ENTRY n                        !
;!=======================================================!


	;DEFINE THE MESSAGE TYPE

	.QOMAR==2		;TAPE MOUNT ATTRIBUTES ANSWER


;EACH ENTRY CONSISTS OF A 1-WORD HEADER (LENGTH IN LEFT HALF, TYPE
;IN RIGHT HALF) FOLLOWED BY THE ENTRY-SPECIFIC INFORMATION. THE
;FOLLOWING ENTRIES ARE RETURNED FOR MAGTAPE DEVICES:

;.TMVOL		LIST OF SIXBIT VOLIDS

;.TMSET		SIXBIT SETNAME

;.MATDD		DESIGNATOR OF MT DEVICE

.MATDD==100
SUBTTL  The ARCHIVE Message - Function 41 (sent by IPCC)

TOPS20 <

	PHASE 0
ARC.HD:!BLOCK	1		; Header

ARC.FN:!BLOCK	1		; Function and reason for message
	AR.FNC==0,,-1		; Function code
	AR.MOD==-1,,0		; Function modifier (reason)

ARC.PR:!BLOCK	1		; Protection of file
	AR.PRT==0,,-1		; LH is unused

ARC.T1:!BLOCK	1		; Tape ID #1

ARC.N1:!BLOCK	1		; Further tape #1 info
	AR.TSN==-1,,0		; Tape saveset number
	AR.TFN==0,,-1		; Tape file number

ARC.T2:!BLOCK	1		; Tape ID #2

ARC.N2:!BLOCK	1		; Saveset and file nos. for tape #2

ARC.TT:!BLOCK	1		; TAD file written to tape

ARC.AS:!BLOCK	10		; Account string

ARC.FL:!			; File name begins here

ARC.SZ:!			; Minimum size of ARCHIVE msg

	DEPHASE

>  ;END TOPS20 CODE
	END