Google
 

Trailing-Edge - PDP-10 Archives - bb-bt99q-bb - swil.x23
There is 1 other file named swil.x23 in the archive. Click here to see a list.
	UNIVER	SWIDEF	SWIL universal definitions (internal usage only)
	SUBTTL	Robert D. Houk/RDH

	SEARCH	JOBDAT,	MACTEN,	UUOSYM	;STANDARD DEFINITIONS

	SALL				;PRETTY LISTINGS
	.DIRECT	FLBLST			;PRETTIER LISTINGS

	COMMENT	\

COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984,1987,1988.  ALL RIGHTS RESERVED.


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.

\
	SUBTTL	Table of contents

;               TABLE OF CONTENTS FOR SWIL
;
;
;                        SECTION                                   PAGE
;    1. Table of contents.........................................   3
;    2. Version and Revision History..............................   3
;    3. Feature test definitions..................................   4
;    4. Register definitions......................................   5
;    5. Instruction definitions (OPDEFs, et al)...................   6
;    6. General definitions - Assembly parameters.................   7
;    7. Macro definitions - COPYRIGHT nonsense....................   8
;    8. Macro definitions - CRC table generation macro(s).........   9
;    9. Macro definitions - SCAN errors...........................  10
;   10. Macro definitions - STOPCD and WARNCD.....................  11
;   11. Robert D. Houk/RDH........................................  13
;   12. SCAN/WILD interface flags.................................  14
;   13. File Specification Block definitions......................  15
;   14. File Spec Block definitions, addenda......................  21
;   15. Macro definitions - DM, KEYS, KEYSG.......................  22
;   16. Macro definitions - SWTCHS and friends....................  23
;   17. Meta-Character definitions................................  26
;   18. DAP protocol definition...................................  27
;   19. DAP message field definitions.............................  29
;   20. DAP field manipulation macros.............................  44
;   21. Macros to build ASCIZ tables descr. DAP Flag and Value fields  59
;   22. Block storage macro definitions...........................  61
;   23. I/O Channel Data Block definitions........................  62
;   24. I/O CDB - Global data.....................................  63
;   25. I/O CDB - File control....................................  64
;   26. I/O CDB - File specification blocks, WILD blocks..........  66
;   27. I/O CDB - File Information
;        27.1   Name strings......................................  68
;        27.2   File attributes and parameters....................  69
;   28. I/O CDB - I/O control.....................................  72
;   29. I/O CDB - TOPS-10 interface...............................  74
;   30. I/O CDB - TOPS-20 interface...............................  75
;   31. I/O CDB - Network control.................................  76
;   32. I/O CDB - Network I/O.....................................  77
;   33. I/O CDB - DAP control.....................................  78
;   34. I/O CDB - Errata..........................................  80
;   35. I/O function-call definitions.............................  81
;   36. WILD input control block..................................  82
;   37. Status and error/exception codes..........................  84
;   38. Status codes - General purpose............................  85
;   39. Status codes - File access
;        39.1   general (FILOP.)..................................  86
;        39.2   DAP level.........................................  88
;        39.3   network level (TSK./NSP.).........................  89
;        39.4   miscellaneous.....................................  91
;   40. Status codes - I/O transmission
;        40.1   file level........................................  92
;        40.2   DAP/data level....................................  93
;        40.3   network level (TSK./NSP.).........................  94
;   41. Status codes - Data format and syntax.....................  96
;   42. Status codes - Environmental ("Acts of God") Errors.......  97
;   43. Status codes - Memory management..........................  98
;   44. Status codes - QUEUE and GALAXY related...................  99
;   45. Status codes - Miscellaneous.............................. 100
;   46. Status codes - Internal flow control...................... 101
;   47. Status codes - STOPCDs.................................... 102
;   48. Scheduler codes........................................... 103
	SUBTTL	Version and Revision History

MAJVER==13	;MAJOR VERSION LEVEL
MINVER==1	;MINOR (MAINTENANCE RELEASE) LEVEL
CSTVER==0	;CUSTOMER VERSION (WHO LAST . . .)
EDTVER==1057	;EDIT LEVEL

%%SWIL==:<BYTE (3)CSTVER(9)MAJVER(6)MINVER(18)EDTVER>

IF2,<	PURGE	CSTVER,MAJVER,MINVER,EDTVER>



;Initial creation as the Scan Wild I/O Library package for shipping with
;NFT-10 with the 7.02 monitor.
;
;The version number starts at 12, thus "preserving" the pre-SWIL version
;numbers as applied to SCAN, WILD, etc.  (Don't ask what happened to ver-
;sion 10 and 11!)
;
;The edit numbers start at 1000, thus "preserving" the pre-SWIL edit
;numbers as applied to SCAN, WILD, etc.

;1000	RDH	01-Jan-84
;	Incorporate into SWIL %12(1000), sync edit level at 1000.
;	Modules: SWIL,   SWIFIL, SWIWLD, SWILIO, SWINET, SWISCN, SWIHLP,
;		 SWIQUE, SWIERM, SWITOU, SWIMEM, SWIMSC

;1001	RDH	31-Mar-84
;	Problems with RT-11 systems.
;	Modules: SWIFIL

;1002	RDH	31-Mar-84
;	RSX/VAX/RT/etc file lengths not calculated correctly.
;	Modules: SWIFIL

;1003	RDH	20-Jun-84
;	.ASUID/USERID doesn't accept quoted strings for passwords.
;	Modules: SWISCN

;1004	RDH	16-Jul-84
;	Only request 3-part name messages from remote FAL if control of
;	the name messages is supported. Seen with VAX/VMS field test of
;	version 4 (first VAX implementation of DAP version 7).
;	Modules: SWIFIL

;1005	RDH	12-Oct-84	SPR 10-34696
;	Implement support for VAX/VMS "Stream-CR" and "Stream-LF" ASCII
;	files.
;	Modules: SWILIO

;1006	RDH
;	First pass at running in extended addressing (for DTECO %26).

;1007	RDH	28-Nov-84	SPR 10-35004
;	FX.APP (/APPEND switch) is defined in the .FXCTL word, but was
;	being referenced as if it were in the .FXMOD word, zapping the
;	FX.PRT (/OKPROT switch) flag.
;	Modules: SWISCN, SWIFIL

;1010	RDH	29-Nov-84
;	File attributes passed in the .IO??? words (e.g., .IOPRT)
;	were lost on a file create. For example, FAL would lose the
;	remote-specified file protection.
;	Modules: SWIFIL

;1011	DRB	24-Jan-85
;	Make .POPJ and .POPJ1 separately loadable (i.e. in their own PRGENDed
;	module) in order to avoid LNKMDS when .POPJ/.POPJ1 has already been
;	loaded elsewhere.
;	Modules: SWIMSC

;1012	DRB	25-Jan-85
;	Add scheduler calls to the ANF-10 non-blocking I/O.  Don't block
;	on NSP. enter passive if non-blocking or scheduler desired.
;	Modules: SWINET

;1013	DRB	25-Jan-85
;	IO.ENM is getting cleared on the first pass through XDBUF3 to do
;	DECnet output.  If the scheduler is called (due to non-blocking
;	I/O), we don't set end of message on subsequent attempts.  Rearrange
;	the code so that IO.ENM isn't cleared until the output is complete.
;	Modules: SWINET

;1014	DRB	25-jan-84
;	Change user/account validation to accept password strings longer
;	than six characters.  This is done by chaging the argument to
;	be a password string pointer, rather than a single SIXBIT word.
;	The block containing the string is assumed to be 7 words long
;	(big enough to fit 39 characters), and trailing zero filled.
;	Modules: SWIQUE

;1015	DRB	29-Jan-85
;	SWILIO improperly tests for a passive connection at ORNIX5.  It
;	assumes that .IOCCF has been loaded to M0, which it hasn't.
;	Modules: SWILIO

;1016	DRB	16-Apr-85
;	ACTDAE's error prefix for bad password changed from "ACTIPW" to
;	"ACTBPW".  Reflect the change in the QUEUE. interface.
;	Modules: SWIQUE

;1017	RDH	8-Aug-85
;	A wildcarded directory spec of the form [,,X*] would match files
;	from the spec [,,*]. A wildcarded directory spec of the form
;	[,,*,X*] would match files from the spec [,] (but not [,,*]).
;	Modules: SWIWLD

;1020	RDH	12-Aug-85
;	"Managed Memory" is lost when using ANF network I/O.
;	Modules: SWINET

;1021	RDH	14-Aug-85
;	ASSIGNed pathological name with logical name doesn't expand
;	correctly (e.g., .PATH X:=[1,2],[3,4], .ASSIGN X Y, .DIRECT Y:)
;	Modules: SWIWLD

;1022	LEO	09-Sep-85
;	Do Copyrights.
;	Modules: ALL

;1023	DRB	21-Nov-85
;	ACTDAE's interface changed a little.  Change SWIQUE to use 8 bit
;	ASCIZ password strings instead of SIXBIT, change some error codes
;	returned from ACTDAE.
;	Modules: SWIQUE

;1024	DRB	21-Nov-85
;	Change the DAP error suffix for device not found to "NSD", so that it
;	won't conflict with "directory not found".
;	Modules: SWIL

;1025	DRB	22-Nov-85
;	Close all of WILD's directory channels on an IOABO call.
;	Modules: SWIFIL, SWIWLD

;1026	RDH	25-Dec-85
;	Create new SWIFIL routine .IOZAP to "blow away" all I/O/etc.
;	associated with a CDB and return the CDB to initial state. Move
;	[1025]'s .LKABO from .IOABO to .IOZAP.
;	Modules: SWIFIL, SWIWLD

;1027	RDH	25-Dec-85
;	Enhance WILD's typeout of .UFD-like file specs (e.g., [1,2].UFD)
;	on (e.g.,) NSF errors.
;	Modules: SWIWLD

;1030	RDH	25-Dec-85
;	Don't type "No such nodes" error on non-network operations (e.g.,
;	search list empty).
;	Modules: SWIWLD

;1031	RDH	26-Dec-85
;	Constructs like "ABC'OR'DEF" lost last character of "ABC"
;	Modules: SWISCN

;1032	RDH	26-Dec-85
;	MCO 12262 Broke DIRECT/WILD and DECtapes. Be much more conservative
;	OPENing DECtapes (and hope DIRECT cooperates too).
;	Modules: SWIWLD

;1033	RDH	27-Dec-85
;	"+" (Concatenation) construction types out wrong in .TOFSB, should
;	be treated like "," construction. Note: "+" is not the same as the
;	"'OR'" operator.
;	Modules: SWITOU

;1034	RDH	28-Dec-85
;	/OPTION:"A B" put SCAN into a loop in .TI???.
;	Modules: SWISCN

;1035	RDH	28-Dec-85
;	"Directory is empty" message types out last str/dir searched, which
;	can be misleading - type back user spec instead.
;	Modules: SWIWLD

;1036	RDH	31-Dec-85
;	Spurious "WLDTMC" errors - if explicit non-wild output field is
;	specified and NO matching input field, don't cause a secondary
;	wildcarding error, just accept the specified output field.
;	Modules: SWIWLD

;1037	RDH	3-Jan-86
;	Bad date/time values (e.g., /AFTER:1-JAN-60) not detected and
;	reported properly.
;	Modules: SWISCN

;1040	RDH	3-Jan-86	SPR 10-35423
;	FAL not given an aborting ACCOMP message (i.e., an incoming DAP
;	message that occurs before FAL is through reading and sending
;	an input file). Edit 1040 supersedes edit 1015.
;	Modules: SWILIO

;1041	RDH	4-Jan-86	SPR 10-35424
;	No support for network Line Sequence Numbers.
;	Modules: SWIFIL, SWILIO

;1042	RDH	23-Jan-86
;	Add /IOMODE:A8CII to select 8-bit-ASCII I/O mode.
;	Modules: SWISCN, SWIFIL, SWILIO

;1043	BSC	24-Apr-86
;	Add two Macros to SWIL.MAC to support type-out of DAP messages from
;       SWINET and add code to SWINET to do the trace of DAP messages.
;
;	FVMSG builds a table of ASCIZ messages which describe Flag and
;       Value fields. These are the messages defined in the DAP Macro.
;
;	FVIDX builds a table, parallel to the DAPXCT table, which provides
;	an index into the messages table built by FVMSG.
;
;	Many flag field messages have been added to the DAP macro to make
;	the text descriptions available for tracing. Also the flag bits in
;	the DAP macro must be monotonically increasing for the .TFLAG routine
;	in SWINET to correctly match a flag with the description, hence the
;	(originally missing) reserved flags have been added with the text
;	description 'Reserved'.
;
;	To trace DAP messages   received  set FT$RCV==1 and
;	to trace DAP messages transmitted set FT$XMT==1 in SWIL.MAC (this file).
;	Then re-compile SWIL and SWINET and re-build SWIL.REL. This new SWIL.REL
;	can then be linked with either NFT or FAL depending on which is to be
;	traced. The trace feature should not be included in production versions
;	because, even with tracing disabled, the program is larger and slower.
;	It is permissible to have both FT$RCV==1 and FT$XMT==1 together, but
;	see documentation of the TRCRCV routine in SWINET regarding a minor
;	deficiency in the format of trace output when simultaneously tracing
;	messages received and transmitted.
;
;	Deposit 0 in .JBOPC (loc 130) to disable tracing (this is the default).
;	Deposit 1 in .JBOPC to trace to TTY: (best to set terminal width 132).
;	Deposit 2 in .JBOPC to trace to DSK:DAPTRC.LST. This file does not get
;	closed automatically. When finished tracing ^C and close via the .CLOSE
;	operating system command.
;	Modules: SWIL, SWINET

;1044	BSC	16-Jun-86
;	When a VAX file with the record attribute of FORTRAN carriage control
;	is transferred to the DEC-10 the user receives the message
;	? UNKNOWN ISF FLAGS IN IRAS90  when the file includes records beginning
;	with "0" or "-" which require conversion to multiple line-feeds.
;	AC T1 was incorrectly used as both a count of line-feeds and a byte
;	pointer. Fix is to use T2 as the count and T1 as the byte pointer.
;	Modules: SWILIO

;1045	BSC	18-Jun-86
;	When a file is transferred to another system which runs out of disk
;	quota the transfer hangs in EW. The problem arose because the
;       DECsystem-10 never sent a CONTINUE(ABORT) interrupt message so the
;       remote never sent the ACCOMP(RESPONSE) for which the DECsystem-10 was
;	waiting in EW state. The code to send CONTINUE interrupt messages was
;	never included in SWIL. This has now been added.
;	Modules: SWIL, SWIFIL, SWINET

;1046	RCB	2-Dec-86
;	Update handling of RESCAN for commands to accomodate MCO 13170.
;	Modules: SWISCN

;1047	TL	4-Dec-86
;	When a VAX sends an ASCII file of the form <FF>text <EOR>text2, and
;	the file has an implied <CR><LF> envelope, the <EOR> is not turned into
;	a <CR><LF>.  This because IS.ICL is being cleared when we see the <FF>,
;	assuming that the <FF> is at the end of the record.  This ain't 
;	necessarily so, as in VAX MACRO listings.  Instead, set the new flag
;	IS.ICE (CC envelop exists) at the start of record, and, when a non-
;	control character is encountered, re-set IS.ICL if IS.ICE is set in 
;	.IOISF.
;	Modules: SWIL, SWILIO

;1050	BAH	21-Jan-87
;	Edit 1043 added a macro TRC that conflicts with the instruction.
;	Change the macro to $TRACE.
;	Modules: SWIL, SWINET

;1051	KDO	20-Mar-87
;	Add ULTRIX support.
;	Modules: SWIL, SWIFIL, SWILIO

;1052	KDO	20-Jul-87
;	Routine E.UFE does GETSTS and SETSTS on channel WC even though
;	I/O is being done with an extended channel.
;	Modules: SWIWLD

;1053	JJF	22-Nov-1988	SPR:10-36232
;	Make a semi-reasonable assumption about two-digit years that are
;	less than 1964.  Assume that they mean 20xx instead of 19xx.
;	Fixes bug where NFT copies of VAX files with expiration dates
;	.GT. 1999 didn't work.
;	Module: SWISCN

;1054	JJF	30-Nov-88	SPR:10-35586
;	Attempt to handle remote directory filespecs a bit better.  If the
;	spec being parsed is coming from a DAP name message, instead of 
;	doing the usual PPN/alphanumeric directory test, assume that it is
;	a numeric directory.  This solves NFT's problem where it blew up
;	trying to deal with directories like [000000] or <7-EMACS>.
;	Invent a new entry point for .FILSP, called .FILSC, which will 
;	always treat directories as names.  Change .DPRNN so that it will
;	call the alternate entry point.
;	Modules: SWIFIL, SWISCN

;1055	KDO	3-Apr-89	SPR:10-36249
;	Need to differentiate between quoted and unquoted file names.
;	Modules: SWIL,SWISCN

;1056	KDO	3-Apr-89	SPR:10-36250

;	Handle funny ULTRIX file specifications:
;	   1. Very long file specifications
;	   2. Multiple extensions
;	   3. Illegal characters
;	Modules: SWIL, SWIFIL

;1057	JJF	10-Apr-89	SPR:10-36155
;	Implement support for 'append-mode' files.
;	Invent a new .IOCCF flag, named IO.APP, to indicate that the
;	remote wants to append to the file, and/or the file has been
;	placed into append mode.  Add code to the output initialization
;	routines to do a FILOP. append function if the flag is lit.
;	Modules: SWIL, SWILIO
	SUBTTL	Feature test definitions

;"SCAN" Feature tests

ND DEBUG$,1		;1=INCLUDE DEBUGGING FEATURES
ND ECHO$C,0		;1=ECHO COMMAND STRING AS CHARACTER PROCESSED
ND ECHO$P,0		;1=ECHO COMMAND STRING AS PHRASE PROCESSED
ND ECHO$W,0		;1=ECHO COMMAND STRING AS WORD PROCESSED
ND FT$ALT,0		;1=CONVERT 175,176 TO 033
ND FT$SFD,-1		;SUB-FILE DIRECTORIES
ND FT$TNX,0		;TENEX
ND FT$RCV,0		;[1043] 1=TRACE DAP MESSAGES RECEIVED
ND FT$XMT,0		;[1043] 1=TRACE DAP MESSAGES TRANSMITTED

IFN FT$RCV!FT$XMT,<FT$TRC==1> ;NEED COMMON CODE IF EITHER RCV OR XMT TRACE

ND FT$TRC,0		;[1043] OTHERWISE LEAVE OUT ALL TRACE CODE

DEFINE   RCV,<IFN FT$RCV> ;SHORT FEATURE TEST SWITCHES FOR NEATER LISTING
DEFINE NORCV,<IFE FT$RCV>
DEFINE   XMT,<IFN FT$XMT>
DEFINE NOXMT,<IFE FT$XMT>
DEFINE   $TRACE,<IFN FT$TRC>
DEFINE NOTRC,<IFE FT$TRC>
	SUBTTL	Register definitions

	M0=0		;ULTRA-SCRATCH AC, PASS RETURN CODES

	T1=1		;GENERAL SCRATCH/TEMP AC
	T2=2		; ANOTHER
	T3=3		;  AND ANOTHER
	T4=4		;   AND ANOTHER

	P1=5		;PRESERVED REGISTER
	P2=6		; ANOTHER
	P3=7		;  AND ANOTHER
	P4=10		;   AND ANOTHER

	IO=11		;I/O CDB ADDRESS
;	ID=12		;DAP BLOCK ADDRESS (FROM I/O CDB)


;15 - 16 RESERVED FOR AP/PF/CF/AD NAUSEUM USAGE (BLISS/FORTRAN/PASCAL/ETC.)

	P=17		;PROGRAM STACK POINTER


;SPECIAL AC USAGE (UGLY, BUT THAT IS SCAN'S CONVENTION)

	NM==P3			;NAME/VALUE REGISTER FOR INPUT ROUTINES
	CH==P4			;CHARACTER REGISTER FOR INPUT ROUTINES


;NOW SAVE SOME TREES

	.XCREF	M0, T1, T2, T3, T4, P1, P2, P3, P4, IO, P
	.XCREF	CH, NM
	SUBTTL	Instruction definitions (OPDEFs, et al)

;THE "EXTENDED" ADDRESSING INSTRUCTIONS THAT HAVEN'T MADE MACRO YET

OPDEF	XMOVEI	[SETMI]
OPDEF	XHLLI	[HLLI]


;GENERATE INSTRUCTION-FORMAT-INDIRECT-WORD

OPDEF	IFIW	[1B0]
 .NODDT	IFIW		;PRESERVE SETZ
	SUBTTL	General definitions - Assembly parameters

;SCAN-level parameters

ND	LN$ABF,200	;LENGTH OF INDIRECT BUFFER
ND	M$INDP,^D10	;MAX. INDIRECT DEPTH (-1=INF., 0=NONE)

	VRBADX==10	;/MESSAGE:ADDRESS   (*KROCK*)


;Network-level parameters

ND	$NTNBL,^D04	;NAME BLOCK LENGTH (WORDS)
ND	$NTSBL,^D12	;STRING BLOCK LENGTH (WORDS)
ND	$NTODL,^D08	;OPTIONAL DATA BLOCK LENGTH (WORDS)

ND	$NABFS,^D432	;DEFAULT ANF TSK CHANNEL BUFFER SIZE (BYTES)
			; (PRE-7.02 DN8X DEFAULT MSGMAX WAS ^D450)
ND	$NAIBF,4	;NUMBER OF ANF TSK CHANNEL INPUT BUFFERS
			; (TRANSLATED TO DATA REQUEST COUNT BY MONITOR)
ND	$NAIBX,100	;"EXTRA" ALLOCATION FOR ANF INPUT BUFFERS (WORDS)
			; ALLOWS FOR POSSIBLE "SEGMENT SIZE SKEW" WITH NFT'S
			; RUNNING UNDER (E.G.,) 7.01 WITH DIFFERENT SEGMENT SIZE
			; (TECHNICALLY ILLEGAL, BUT HAPPENS NONETHELESS,
			; AND THIS ENABLES IT TO WORK) - AVOIDS IO.BKT ERRORS
			;*** RESET TO 0 AFTER FIRST RELEASE


;Assorted values

ND	$ASCMX,^D8		;MAXIMUM ASCII SIZE (/PASSWORD, ETC.)
	SUBTTL	Macro definitions - COPYRIGHT nonsense

;The COPYRIGHT macro as used by the SWIL package is defined to ***NOT***
;assemble the copyright statement into actual code, but it will appear in
;the .REL files.
;
;As with the UUOSYM version of the macro of the same name, the format for
;the copyright statement is:
;
;COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984,1986,1988. ALL RIGHTS RESERVED.
;
;Where the year(s) is(are) specified as needed. Note that the trailing dot
;(or period) character is absolutely mandatory!!! It is the only period
;allowed in the copyright statement, and no text is allowed to follow the
;period!

DEFINE	COPYRIGHT,<.TEXT .;Copyright >
	SUBTTL	Macro definitions - CRC table generation macro(s)

DEFINE	BLDCRC(POLY),<

	.XCREF			;;CLEANER LISTINGS

	..ZZ==-1		;;INITIALIZE FOR "BYTE" LOOP
	REPEAT	^D256,<.CRC (POLY,\<..ZZ==..ZZ+1>)>  ;;GENERATE CRC TABLE

	IF2,<PURGE ..ZZ, ..CRC, ...CRC>  ;;PITCH GARBAGE SYMBOLS

	.CREF			;;BACK TO NORMAL CODE
> ;END BLDCRC MACRO



;HELPER TO BLDCRC MACRO

DEFINE	.CRC(POLY,BYTE),<

	..CRC=BYTE

	REPEAT	^D08,<
		...CRC=..CRC&1
		..CRC=..CRC_-1
		IFN	...CRC,<..CRC=..CRC^!POLY>>

	EXP	..CRC
> ;END .CRC MACRO
	SUBTTL	Macro definitions - SCAN errors

Repeat 0,<

;M.FAIL <FOO> SENDS FOO AS A FATAL ERROR

DEFINE	M.FAIL (A),<
	EXT	.FMSG
	PJSP	T1,.FMSG
	XLIST
	ASCIZ	\A\
	LIST
>

;M.FAIN <FOO> SENDS FOO AS A FATAL ERROR WITH N IN SIXBIT

DEFINE	M.FAIN (A),<
	EXT	.FMSGN
	PJSP	T1,.FMSGN
	XLIST
	ASCIZ	\A\
	LIST
>

;M.FAID <FOO> SENDS FOO AS A FATAL ERROR WITH N IN DECIMAL

DEFINE	M.FAID (A) <
	EXT	.FMSGD
	PJSP	T1,.FMSGD
	XLIST
	ASCIZ	\A\
	LIST
>

;M.FAIO <FOO> SENDS FOO AS A FATAL ERROR WITH N IN OCTAL

DEFINE	M.FAIO (A),<
	EXT	.FMSGO
	PJSP	T1,.FMSGO
	XLIST
	ASCIZ	\A\
	LIST
>

;M.MAIF <FOO> SENDS FOO AS A FATAL ERROR WITH N=ADDR OF FILE DESCRIPTOR

DEFINE	M.FAIF(A)<
	EXT	.FMSGF
	PJSP	T1,.FMSGF
	XLIST
	ASCIZ	\A\
	LIST
>

> ;end repeat 0
	SUBTTL	Macro definitions - STOPCD and WARNCD

;TEMP MACRO(S)

DEFINE	STOPCD(TXT,RTN,ADR,DIE),<
	IF2,	<IFNDEF .SPOPJ,<EXTERN .SPOPJ>>
	IFB	<TXT>,<
		IFB	<DIE>,<	HALT	.SPOPJ>
		IFNB	<DIE>,<	POP	P,.JBBLT
				HALT	DIE>
		>
	IFNB	<TXT>,<
		PUSHJ	P,[OUTSTR [ASCIZ\? TXT
\]
		IFB	<DIE>,<	JRST	.SPOPJ>
		IFNB	<DIE>,<	POP	P,.JBBLT
				JRST	DIE>]
		>
> ;END STOPCD MACRO DEFINITION

DEFINE	WARNCD(TXT,RTN,ADR,DIE),<
	PUSHJ	P,[SKIPLE S.MOAN##	;;WANT WARNINGS?
		OUTSTR [ASCIZ\% TXT
\]
	IFB	<DIE>,<POPJ	P,]>	;;RETURN TO INLINE CODE
	IFNB	<DIE>,<
		POP	P,.JBBLT	;;ADJUST STACK (REMEMBER DISPATCH)
		JRST	DIE]>		;;CONTINUE ELSEWHERE
> ;END WARNCD MACRO DEFINITION
	PRGEND			;END OF INTERNAL DEFINITIONS MODULE
	UNIVER	SWIL	SWIL universal definitions
	SUBTTL	Robert D. Houk/RDH

	SEARCH	SWIDEF			;INTERNAL-TO-SWIL DEFINITIONS
	SEARCH	JOBDAT,	MACTEN,	UUOSYM	;STANDARD DEFINITIONS

	SALL				;PRETTY LISTINGS
	.DIRECT	FLBLST			;PRETTIER LISTINGS

	COMMENT	\

SWIL  --  Definitions module for users of the SWIL package.

COPYRIGHT (c) DIGITAL EQUIPMENT CORPORATION 1984,1987,1988.  ALL RIGHTS RESERVED.


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.

\


%%SWIL==:%%SWIL		;MAKE VERSION AVAILABLE TO ALL
	SUBTTL	SCAN/WILD interface flags

;FLAGS FOR .ISCAN CALL

FS.ICK==1B0	;KROCK-MODE COMMAND SCANNING
FS.IFI==1B16	;INDIRECT FILE ILLEGAL IN COMMAND		[106]
FS.ICL==1B17	;IGNORE SPECIAL COMMAND-LINE HANDLING


;FLAGS FOR .TSCAN CALL

FS.MOT==1B18	;MULTIPLE OUTPUT SPECS POSSIBLE
FS.MIO==1B19	;MIXED INPUT AND OUTPUT SPECS


;FLAGS FOR .LKWLD CALL

FW.ADO==1B0	;ANY DEVICE OK (ELSE JUST DISK)
FW.DBS==1B1	;DO DIRECTORY BEFORE SUBDIRECTORY
FW.IFX==1B4	;IMMEDIATE FILE EXIT
FW.FBD==1B5	;RETURN DIRECTORY AS FILE BEFORE EXPANDING AS DIRECTORY
FW.FAD==1B6	;RETURN DIRECTORY AS FILE AFTER EXPANDING AS DIRECTORY


;FLAGS FOR .TDIRB CALL

TS.DRW==0	;SINGLE WORD
TS.DRP==1	;PATH POINTER
TS.DRB==2	;BIWORD (IE, SCAN SPEC FORMAT)


;VALUES FROM .VERBO

JWW.CN==1B33	;/VERBOS:CONTINUATION
JWW.FL==1B34	;/VERBOS:FIRST
JWW.PR==1B35	;/VERBOS:PREFIX
	SUBTTL	File Specification Block definitions

;FILE SPEC BLOCK VERSION
;
;THIS MUST APPEAR IN THE VARIOUS PROTOCOL BLOCKS WITH WHICH THE USER
;COMMUNICATES WITH "SCAN". THE FIRST WORD OF EACH PROTOCOL BLOCK IS THE
;VERSION WORD, OF THE FORMAT:
;
;	<MAJOR>,,<MINOR>
;
;WHERE <MAJOR> IS THE MAJOR PROTOCOL FORMAT USED, AND MINOR IS THE MINOR
;VARIATION WITHIN THE MAJOR FORMAT. <MAJOR> IS NOT AVAILABLE AS A SYMBOL,
;IT *** MUST *** BE HARDCODED INTO THE CALLING PROGRAM IN ORDER TO ENSURE
;THAT THE CALLER REALLY KNOWS WHAT VERSION IS BEING USED, AND HASN'T JUST
;RECOMPILED IN ORDER TO PULL THE SYMBOL OUT OF THIS FILE WITHOUT UPDATING
;THE CALLING PROGRAM. <MINOR> IS AVAILABLE AS SYMBOL "%%FXVE" SINCE ANY
;"MINOR" CHANGES CAN BE "FIXED" BY MERELY RECOMPILING THE PROGRAM.
;"MAJOR" CHANGES WOULD INCLUDE SUCH THINGS AS DELETING .FX--- WORDS OR
;CHANGING THE MEANING OF THE CONTENTS OF THE WORDS (ASCII RATHER THAN
;SIXBIT, ETC.); "MINOR" CHANGES WOULD INCLUDE SUCH THINGS AS SIMPLY ADDING
;NEW FIELDS OR RE-ARRANGING CURRENT FIELDS (BUT CHANGING THE ORDER OF THE
;NAME/MASK WORD PAIRS INTO MASK/NAME WORD PAIRS WOULD BE A "MAJOR" CHANGE).

;	12		;MAJOR PROTOCOL VERSION

;***	MACRO BUG: .FXLND MUST NOT BE FORWARD-REFERENCED IN PRGENDED UNIVER FILE
.FXLND==<.PTMAX-.PTPPN-1>  ;LENGTH OF DIRECTORY (UFD+SFD'S)
;***	END OF BUG

%%FXVE==<.FXLND_^D12>+106	;MINOR PROTOCOL VERSION
;WORDS IN FILE SPEC AREA

.FXLND==<.PTMAX-.PTPPN-1>  ;LENGTH OF DIRECTORY (UFD+SFD'S)
.FSLXX==^D55		;LENGTH (WORDS) OF STRING BLOCKS

	PHASE	0

.FXBZM:!		;START OF INITIALLY SETZM'ED REGION

.FXCTL:!BLOCK	1	;CONTROL FLAGS
.FXCTM:!BLOCK	1	;CONTROL MASK
.FXMOD:!BLOCK	1	;MODIFIER WORD
.FXMOM:!BLOCK	1	;MODIFIER MASK
.FXUSW:!BLOCK	2	;USER-RESERVED FLAGS WORD & MASK
.FXFLD:!BLOCK	1	;FIELD MASK (WHICH FIELDS PRESENT)
.FXNOD:!BLOCK	1	;NODE NAME (NON-ZERO IF NODE SPECIFIED)
.FXNOM:!BLOCK	1	;NODE NAME MASK
.FXDEV:!BLOCK	1	;DEVICE (NON-ZERO IF ANY PART OF SPEC)
.FXDEM:!BLOCK	1	;DEVICE MASK
.FXDIR:!BLOCK	1	;DIRECTORY WORD (NON-ZERO IF DIRECTORY SPECIFIED)
.FXDIM:!BLOCK	1	;DIRECTORY MASK
	BLOCK	2*<.FXLND-1>	;REST OF DIRECTORY (SFDS; 0 AT END OF PATH)
.FXNAM:!BLOCK	1	;NAME   (NON-ZERO IF NAME PRESENT)
.FXNMM:!BLOCK	1	;NAME MASK
.FXEXT:!BLOCK	1	;EXTENSION,,EXTENSION MASK  (NON-ZERO DOT PRESENT)
.FXGEN:!BLOCK	1	;FILE GENERATION

;THE KROCK STRING-BLOCK STUFF

.FSNOD:!BLOCK	1	;ADDRESS OF NODE NAME STRING
.FSDEV:!BLOCK	1	;ADDRESS OF DEVICE NAME STRING
.FSDIR:!BLOCK	1	;ADDRESS OF DIRECTORY NAME STRING
.FSNAM:!BLOCK	1	;ADDRESS OF FILE NAME STRING
.FSEXT:!BLOCK	1	;ADDRESS OF FILE TYPE NAME STRING
.FSGEN:!BLOCK	1	;ADDRESS OF FILE GENERATION STRING

.FSXXX:!BLOCK	.FSLXX	;THE ACTUAL STRING STORAGE AREA

.FXEZM:!		;END (+1) OF INITIALLY SETZM'ED REGION
;MORE WORDS IN THE FILE SPEC AREA

.FXBOM:!		;START OF INITIALLY SETOM'ED REGION

.FXBOA:!		;START OF ONE'ED SWITCH ATTRIBUTES
.FXBSZ:!BLOCK	1	;/BYTESIZE
.FXFSZ:!BLOCK	1	;/FRAMESIZE
.FXRSZ:!BLOCK	1	;/RECORDSIZE
.FXBLS:!BLOCK	1	;/BLOCKSIZE
.FXBFN:!BLOCK	1	;/BUFFERS
.FXEST:!BLOCK	1	;/ESTIMATE (SEE ALSO /CONTIGUOUS)
.FXVER:!BLOCK	1	;/VERSION
.FXEOA:!		;END (+1) OF ONE'ED SWITCH ATTRIBUTES

.FXBOC:!		;START OF ONE'ED SWITCH CONSTRAINTS
.FXBFR:!BLOCK	1	;/BEFORE
.FXSNC:!BLOCK	1	;/SINCE
.FXABF:!BLOCK	1	;/ABEFORE
.FXASN:!BLOCK	1	;/ASINCE
.FXPBF:!BLOCK	1	;/PBEFORE
.FXPSN:!BLOCK	1	;/PSINCE
.FXFLI:!BLOCK	1	;FILE MIN SIZE (WORDS)
.FXFLM:!BLOCK	1	;FILE MAX SIZE (WORDS)
.FXEOC:!		;END (+1) OF ONE'ED SWITCH CONSTRAINTS

.FXEOM:!		;END (+1) OF INITIALLY SETOM'ED REGION

.FXLEN:!		;LENGTH (+1) OF ONE FILE SPECIFICATION BLOCK

	DEPHASE		;KEEP MACRO FROM ILL MEM REFING LINK!
;SUB-FIELDS IN .FXCTL CONTROL FIELD

FX.RFM==17B3	;/RECFORMAT:(NONE, FIXED, VARIABLE, VFC, 36PACK)
FX.MCY==1B4	;/MACY11
FX.MEY==1B5	;/MECY11 (PRETTIER-PACKING MACY11)
FX.ALC==1B6	;/ALLOCATE (/ESTIMATE IS STILL SIZE)
FX.CTG==1B7	;/CONTIGUOUS (/ESTIMATE IS STILL SIZE)

FX.APP==1B12	;/APPEND
FX.DEL==1B13	;/DELETE (ON CLOSE)
FX.PRI==1B14	;/PRINT (ON CLOSE)
FX.SUB==1B15	;/SUBMIT (ON CLOSE)

FX.QRY==7B20	;/QUERY:(NEVER, TELL, ASK)
  FX.QRA==1B18	;/QUERY:ASK
  FX.QRT==1B19	;/QUERY:TELL
  FX.QRN==1B20	;/QUERY:NEVER
FX.QNY==1B21	;/QUERY:ASK DEFAULT TO "NO" ([Y/N] VS [N/Y])

FX.SCE==7B24	;/SCERROR:(NEVER, INSUFFICIENT, DIFFERENT)
FX.SCW==7B27	;/SCWILD:(ANY, FIELD, DFIELD, SAME, DSAME)
  FX.SCD==1B27	;/SCWILD:(DFIELD ! DSAME)

FX.DAM==17B31	;/DATAMODE:(ASCII, IMAGE)  (VALUE PARALLELS /IOMODE VALUES)
FX.IOM==17B35	;/IOMODE:(ASCII, BYTE, PIM, ETC...)
;FLAGS IN .FXFLD FIELDS-PRESENT MASK (ALSO USED BY .TOFSB)

FX.UND==1B0	;USER-SPECIFIED NODE NAME
FX.UDV==1B1	;USER-SPECIFIED DEVICE NAME
FX.UDR==1B2	;USER-SPECIFIED DIRECTORY NAME
FX.UNM==1B3	;USER-SPECIFIED FILE NAME
FX.UEX==1B4	;USER-SPECIFIED EXTENSION
FX.UGN==1B5	;USER-SPECIFIED GENERATION NUMBER
FX.UFS==1B6	;USER-SPECIFIED FILE-SPECIFIC SWITCH(ES)
FX.UGS==1B7	;USER-SPECIFIED GLOBAL SWITCH(ES)
  FX.UXX==FX.UND!FX.UDV!FX.UDR!FX.UNM!FX.UEX!FX.UGN!FX.UFS  ;FILE SPEC TYPED
FX.UQN==1B8	;USER-SPECIFIED QUOTED FILE NAME

FX.SND==1B9	;"STICKY DEFAULT" NODE NAME
FX.SDV==1B10	;"STICKY DEFAULT" DEVICE NAME
FX.SDR==1B11	;"STICKY DEFAULT" DIRECTORY NAME
FX.SNM==1B12	;"STICKY DEFAULT" FILE NAME
FX.SEX==1B13	;"STICKY DEFAULT" EXTENSION
FX.SGN==1B14	;"STICKY DEFAULT" GENERATION NUMBER
FX.SFS==1B15	;"STICKY DEFAULT" FILE-SPECIFIC SWITCH(ES)
FX.SGS==1B16	;"STICKY DEFAULT" GLOBAL SWITCH(ES)

FX.WND==1B18	;WILDCARD(S) PRESENT IN NODE NAME
FX.WDV==1B19	;WILDCARD(S) PRESENT IN DEVICE NAME
FX.WDR==1B20	;WILDCARD(S) PRESENT IN DIRECTORY NAME
FX.WNM==1B21	;WILDCARD(S) PRESENT IN FILE NAME
FX.WEX==1B22	;WILDCARD(S) PRESENT IN EXTENSION
FX.WGN==1B23	;WILDCARD(S) PRESENT IN GENERATION
  FX.WXX==FX.WND!FX.WDV!FX.WDR!FX.WNM!FX.WEX!FX.WGN	;"WILDCARDS" TYPED

;NOTE THAT THE WILDCARD-PRESENT FLAGS MUST BE ON IF ANY WILDCARDS ARE
;PRESENT IN THE CORRESPONDING FIELD; HOWEVER THE WILDCARD-PRESENT FLAGS
;DO NOT GUARANTEE THAT TRUE WILDCARDS ARE PRESENT - THEY MERELY INDICATE
;THAT IT MUST BE ASSUMED THAT WILDCARDS ARE PRESENT . . .

FX.DPJ==1B27	;PROJECT FIELD WAS DEFAULTED ("[,PN]")
FX.DPG==1B28	;PROGRAMMER FIELD WAS DEFAULTED ("[P,]")
FX.DPN==1B29	;PATH FIELD WAS DEFAULTED ("[]")
FX.DPT==1B30	;PATH FIELD WAS DEFAULTED ("[-]")
FX.DNP==1B31	;NAME FIELD DEFAULTED FROM PPN ("[P,PN].UFD")
FX.DNJ==1B32	;FX.DNP'ED PROJECT FIELD DEFAULTED ("[,PN].UFD"])
FX.DNG==1B33	;FX.DNP'ED PROGRAMMER FIELD DEFAULTED ("[P,].UFD")
FX.DNT==1B35	;FX.DNP'ED PPN FIELD DEFAULTED ("[-].UFD" - WELL, IT'S POSSIBLE)
;BYTES IN SCAN MOD WORD

FX.NDV==1B0	;(OBSOLETE) NULL DEVICE
FX.NUL==1B1	;(OBSOLETE) NULL EXTENSION
FX.DIR==1B2	;(OBSOLETE) DIRECTORY SPECIFIED   (MOD=0 IF [-])
FX.PHY==1B3	;/PHYSICAL
;	1B4	;FREE
FX.TRM==37B9	;CODE FOR SPEC'S TERMINATION (PARALLEL .CHGWD)
	.FXTRZ==00	;, (FILE EXPRESSION SEPARATOR)
	.FXTRA==01	;'AND'
	.FXTRO==02	;'OR'
	.FXTRN==03	;'NOT'
	.FXTRC==04	;+ (CONCATENATE)
	.FXTRB==06	;'BEGIN'
	.FXTRE==07	;'END'
	.FXTIA==11	;'IFAND'
	.FXTIN==13	;'IFNOT'
	.FXTIS==20	;'IFSAME'
	.FXTID==21	;'IFDIFFERENT'
	.FXTIO==22	;'IFOLDER'
	.FXTIY==23	;'IFNEWER'
	.FXTIL==24	;'IFSMALLER'
	.FXTIB==25	;'IFBIGGER'
FX.STR==1B10	;/STRS (DO WILD STRUCTURE STUFF)
FX.NOM==1B11	;/OKNONE
FX.PRT==1B12	;/OKPROT
FX.SUP==1B13	;/ERSUPERSEDE
FX.UID==1B14	;/OKUID
FX.ADO==1B15	;/ANYDEVICEOK (0 = /DSKONLY)

FX.SCN==1B18	;/SCAN (SFD TREE)
FX.LIB==1B19	;/LIB (DO/DON'T SEARCH LIB:)
FX.SYS==1B20	;/SYS (DO/DON'T SEARCH SYS:)
FX.NEW==1B21	;/NEW (DO/DON'T SEARCH NEW: ON SYS:)

FX.DEN==7B23	;/DENSITY					[105]
FX.PAR==1B24	;/PARITY
FX.PRO==777B35	;/PROTECTION

;NOT DEFAULTED IN .OSDFS (FROM SWITCH.INI)
FXNOTD==FX.NDV!FX.NUL!FX.DIR!FX.TRM

;ILLEGAL ON INPUT FILE
FXNOTI==FX.SUP

;ILLEGAL ON OUTPUT FILE
FXNOTO==FX.STR!FX.SCN!FX.LIB!FX.SYS!FX.NEW
	SUBTTL	File Spec Block definitions, addenda

;This shouldn't be here, but for the moment (geologically speaking) it is
;left here as a quick expedient way of getting everything (read "NFT") to
;work.
;					-RDH

DEFINE	SCNWRD(WRD,SIZ),
 <IFB <SIZ>,<WRD==<<..Z==..Z+1>-1>> IFNB <SIZ>,<WRD==<<..Z==..Z+<SIZ>>-<SIZ>>>>

	.XCREF
	..Z==.FXLEN
	.XCREF	..Z
	.CREF

;NOW DEFINE OUR OWN PRIVATE CUSTOM FILE-SPECIFIC BLOCKS

	.FX$B==..Z		;START OF "FILE ANSWERS"

;THE "ZERO'ED" BLOCKS FIRST, STRINGS AND THE LIKE

	.FX$BZ==..Z		;START OF ZERO'ED FILE ANSWERS

	SCNWRD	.FXPNM,2	;/DIAL (TELEPHONE NUMBER)
	SCNWRD	.FXPSW,$ASCMX	;/PASSWORD
	SCNWRD	.FXUID,$ASCMX	;/USERID
	SCNWRD	.FXUAC,$ASCMX	;/UACCOUNT (TO MATCH /USERID)
	SCNWRD	.FXUPW,$ASCMX	;/UPASSWORD (TO MATCH /USERID)

;THE "ONE'D" BLOCKS LAST, NORMAL "WORD" VALUES

	.FX$BO==..Z		;START OF ONE'D FILE ANSWERS

	SCNWRD	$FXUO0		;ONE'ED #0
	SCNWRD	$FXUO1		;ONE'ED #1
	SCNWRD	$FXUO2		;ONE'ED #2
	SCNWRD	$FXUO3		;ONE'ED #3
	SCNWRD	$FXUO4		;ONE'ED #4
	SCNWRD	$FXUO5		;ONE'ED #5
	SCNWRD	$FXUO6		;ONE'ED #6
	SCNWRD	$FXUO7		;ONE'ED #7
	SCNWRD	$FXUO8		;ONE'ED #8
	SCNWRD	$FXUO9		;ONE'ED #9

	.FX$E==..Z		;END OF "FILE ANSWERS"
	.FXMAX==:..Z		;SIZE OF FILE SPEC "SCAN" BLOCK
	SUBTTL	Macro definitions - DM, KEYS, KEYSG

; DM  ABBREVIATION,MAX,ADEFAULT,PDEFAULT
;	DEFINES SYMBOLS MX.ABBREVIATION,AD.ABBREVIATION, AND PD.ABBREVIATION
;	TO BE THE MAXIMUM ALLOWED VALUE, THE DEFAULT IF THE KEYWORD
;	IS ABSENT, AND THE DEFAULT IF THE KEYWORD IS PRESENT RESPECTIVELY
;	UNLESS THE CORRESPONDING SYMBOL IS ALREADY DEFINED.

	DEFINE	DM(ABBR,MAX,ADEF,PDEF),<
				ND	MX.'ABBR,MAX
				ND	AD.'ABBR,ADEF
				ND	PD.'ABBR,PDEF>


; KEYS (NAME,LIST)   WILL DEFINE A LIST OF KEYS BY NAME NAME
;	NAME CAN BE UP TO 4 CHARS.  (DEFINES NAME.T AND NAME.L)
;	LIST IS SIXBIT NAMES SEPARATED BY COMMAS.
;	DEFINES NAME CONCATENATED WITH START OF ITEM IN LIST
;	AS INDEX IN LIST UNLESS THE ITEM BEGINS WITH "*"

; KEYSG (NAME,LIST)   WILL DEFINE A LIST OF KEYS BY NAME NAME
;	NAME CAN BE UP TO 4 CHARS.  (DEFINES NAME.T AND NAME.L)
;	LIST IS SIXBIT NAMES SEPARATED BY COMMAS.
;	DEFINES GLOBAL NAME CONCATENATED WITH START OF ITEM IN LIST
;	AS INDEX IN LIST UNLESS THE ITEM BEGINS WITH "*"

	DEFINE	KEYS(NAME,LST),<
NAME'.L==0
NAME'.T:  IRP	(LST)<EXP  SIXBIT /LST/
			NAME'.L==NAME'.L+1
			..TEMP==0
			IRPC (LST)<IFIDN <LST><*>,<..TEMP==1>
					STOPI>
			IFE ..TEMP,<NAME'LST==NAME'.L>
		>
	PURGE	..TEMP
	>

	DEFINE	KEYSG(NAME,LST),<
NAME'.L==0
NAME'.T:  IRP	(LST)<EXP  SIXBIT /LST/
			NAME'.L==NAME'.L+1
			..TEMP==0
			IRPC (LST)<IFIDN <LST><*>,<..TEMP==1>
					STOPI>
			IFE ..TEMP,<NAME'LST==:NAME'.L>
		>
	PURGE	..TEMP
	>
	SUBTTL	Macro definitions - SWTCHS and friends

;SWITCH SCANNING MACROS AND TABLES

;SWTCHS IS THE MACRO LISTING ALL KNOWN SWITCHES
;IT INCLUDES THE NAME AND STORAGE LOCATION
;FOR VALUE TYPES, IT ALSO HAS THE MAX AND DEFAULT AND PROCESSOR
;FOR KEY-VALUE TYPES, IT POINTS TO THE KEYS AND HAS THE DEFAULT IF ANY
;FOR STAND-ALONE TYPES, IT HAS THE VALUE.

;WHEN THE SWITCH SCANNING TABLES ARE TO BE BUILT, INVOKE
;THE MACRO DOSCAN WITH 5-CHAR ARGUMENT TO USE AS SYMBOL PREFIX
;IT WILL DEFINE XXXXXN,L,P,M,D

; SL  NAME,STORAGE,TABLE-NAME,DEFAULT,FLAGS
;	DEFINES A LIST OF KEY-VALUES (SEE KEYS MACRO)
;	DEFAULT IS THE ORDINAL OR 0 IF NO DEFAULT
;	IF LH(STORAGE)=7777B11, STORAGE = ROUTINE TO PROCESS
;
; SP  NAME,STORAGE,PROCESSOR,ABBREVIATION,FLAGS
;	DEFINES A VALUE PARAMETER WHOSE DEFAULTS
;	    ARE DEFINED AT THE BEGINNING OF THE PROGRAM
;	    BY "DM" USING THE SAME ABBREVIATION
;	PROCESSOR IS THE JUMP ADDRESS IN SWITCH PROCESSING
;	    IT WILL BE CALLED WITH P1=SWITCH OFFSET IN TABLE
;	    AND P2=POINTER TO 4-WORD BLOCK OF INTERNAL OR EXTERNAL STUFF
;	IF MAX=0 AND FS.LRG, THEN ANY VALUE CAN BE STORED
;	    ELSE, 0.LE.VALUE.LE.MAX
;
;	0.LE.MAX,DEFAULT.LT.2**17 UNLESS FS.LRG
;
;	IF MAX=0 AND NOT FS.LRG, THEN PROCESSOR IS AN IMMEDIATE ACTION
;	    WHICH WILL ALWAYS BE CALLED
;	    ELSE, PROCESSOR WILL BE CALLED ONLY IF ":"
;
; SS  NAME,STORAGE,VALUE,FLAGS
;	DEFINES A STAND-ALONE PARAMETER
;
;	IN ALL CASES, STORAGE IS A BYTE POINTER.
;	    IF A FULL WORD, ONLY THE ADDRESS IS NEEDED
;	    IF A MULTIPLE WORD, THE BYTE SIZE IS 65-#WORDS (UP TO 28)
;	    IF A FILE SPECIFICATION, THE LENGTH IS HELD IN MX.ABBREVIATION
;	    IF POINTER IS 7777??,,?????? THEN RH(POINTER) IS DISPATCH
;		ADDRESS OF PROCESSOR WHICH TAKES KEYWORD SWITCH VALUES
;
; SN  NAME,STORAGE,FLAGS
;	DEFINES A STAND-ALONE PARAMETER WHICH TAKES VALUE
;	    1 IF /NAME, AND VALUE 0 IF /NONAME
	DEFINE	SL($NAME,$RESULT,$TABLE,$DEFAULT,$FLAGS),<
	X	$NAME,$TABLE'.T-1,<$RESULT>,$DEFAULT,-$TABLE'.L,$FLAGS
>

	DEFINE	SP($NAME,$RESULT,$PROCESSOR,$ABBR,$FLAGS),<
	X	$NAME,$PROCESSOR,<$RESULT>,PD.'$ABBR,MX.'$ABBR,$FLAGS
>

	DEFINE	SS($NAME,$RESULT,$VALUE,$FLAGS),<
	X	$NAME,0,<$RESULT>,$VALUE,0,$FLAGS
>

	DEFINE	SN($NAME,$RESULT,$FLAGS),<
	X	$NAME,0,<$RESULT>,0,0,FS.NOS!$FLAGS
>

;FLAGS WHICH CAN BE DEFINED IN SWITCH TABLE
FS.NFS==1B0	;THIS SWITCH IS NEVER PART OF A FILE SPECIFICATION
		; THIS SHOULD BE SET ON GLOBAL SWITCHES
		; ** VERY IMPORTANT TO GET RIGHT **
FS.LRG==1B1	;THE MAX AND DEFAULT VALUES ARE 0 OR .GT. 2**17
FS.NUE==1B2	;NO USER EXIT ON THIS SWITCH
FS.VRQ==1B3	;VALUE REQUIRED
FS.OBV==1B4	;OR BIT VALUES TO RIGHT HALF
FS.NOS==1B5	;SWITCH TAKES "NO" PREFIX (INTERNAL FOR SN MACRO ONLY)
FS.NCM==1B6	;SWITCH DOES NOT CONSTITUTE A COMMAND		[102]
		; (FOR /RUN, /OPTION, /EXIT)
FS.SKP==1B7	;SUCCESSFUL SWITCH PROCESSOR WILL SKIP RETURN

		;DON'T USE FS.R??, WHICH ARE DEFINED IN C.MAC
;MACRO TO BUILD THE TABLES FROM THE SWTCHS MACRO

	DEFINE	DOSCAN(PFX),<
	XALL


			;;TABLE OF SIXBIT SWITCH NAMES
DEFINE	X($NAME,$PROC,$POINT,$DEFLT,$MAX,$FLAGS),<
	EXP  SIXBIT  /$NAME/
>
PFX'N:	SWTCHS
PFX'L==.-PFX'N

			;;TABLE OF BYTE POINTERS TO STORE RESULT
IF2,<
DEFINE	X($NAME,$PROC,$POINT,$DEFLT,$MAX,$FLAGS),<
..TEMP==0
IRP $POINT,<
    IFE ..TEMP-1,<
	$POINT			;$NAME
    >
    IFE ..TEMP-2,<
	POINT	36,$POINT,35	;$NAME
    >
    IFIDN <$POINT><*P>,<..TEMP==1>	;;PARTIAL WORD
    IFIDN <$POINT><*F>,<..TEMP==2>	;;FULL WORD
>

IFB <$POINT>,<
	Z			;$NAME
..TEMP==1>
IFE ..TEMP,<
IFN <$POINT>_-^D24,<		;;THIS EVEN ALLOWS "POINT 1,2,FOO##"
..TEMP==1
	$POINT			;$NAME
>
IFE ..TEMP,<
	POINT 36,$POINT,35	;$NAME
	>
>>>
PFX'P:	SWTCHS

			;;TABLE OF  IF LT 0, IOWD KEY TABLE
			;;	OR  IF GE 0, XWD MAX,PROCESSOR
MX.==0
DEFINE	X($NAME,$PROC,$POINT,$DEFLT,$MAX,$FLAGS),<
IF2,<
IFE <$FLAGS>&FS.LRG,<IFG <$MAX>-377777,<PRINTX ?MAXIMUM OF /$NAME CANNOT BE GT 377777>>
>
..TEMP==1
IFN <$FLAGS>&FS.LRG,<IFN <$MAX>,<..TEMP==0>>
IFN ..TEMP,<
	XWD	$MAX,$PROC	;$NAME
>
IFE ..TEMP,<
	XWD	[$MAX],$PROC	;$NAME
>
>
PFX'M:	SWTCHS

			;;FLAGS,,DEFAULT VALUE
PD.==0
DEFINE	X($NAME,$PROC,$POINT,$DEFLT,$MAX,$FLAGS),<
IF2,<
IFL <$DEFLT>,<IFN <$DEFLT>+1,<PRINTX ?DEFAULT OF /$NAME CANNOT BE NEGATIVE>>
IFE <$FLAGS>&FS.LRG,<IFG <$DEFLT>-777777,<PRINTX ?DEFAULT OF /$NAME CANNOT BE GT 777777>>
>
IFB <$FLAGS>,<..TEMR==0>
IFNB <$FLAGS>,<..TEMR==($FLAGS)>
..TEMP==1
IFN <$FLAGS>&FS.LRG,<IFN <$DEFLT>,<..TEMP==0>>
IFN ..TEMP,<
	XWD	..TEMR,$DEFLT	;$NAME
>
IFE ..TEMP,<
	XWD	..TEMR,[$DEFLT]	;$NAME
>
>
PFX'D:	SWTCHS
	PURGE	..TEMP,..TEMR
	SALL
>
	SUBTTL	Meta-Character definitions

;FUNNY CHARACTERS (NOT IN MACTEN)

.CHDLE==20	;DATA LINK ESCAPE
.CHDC1==21	;DEVICE CONTROL (1)
.CHDC2==22	;DEVICE CONTROL (2)
.CHDC3==23	;DEVICE CONTROL (3)
.CHDC4==24	;DEVICE CONTROL (4)


;SPECIAL CHARACTERS FOR SCAN

.CHALX==0	;ALTMODE
.CHEOL==-1	;END OF LINE
.CHEOF==-2	;END OF FILE


;GUIDE WORDS (TURNED INTO PSEUDO CHARACTERS)
;MUST PARALLEL .FXT?? DEFINTIONS

.CHGWD==4000	;BASE OFFSET

.CHAND==4001	;'AND'
.CHOR==04002	;'OR'
.CHNOT==4003	;'NOT'
.CHBEG==4006	;'BEGIN'
.CHEND==4007	;'END'
.CHIFA==4011	;'IFAND'
.CHIFN==4013	;'IFNOT'
.CHISA==4020	;'IFSAME'
.CHIDF==4021	;'IFDIFFERENT'
.CHIOL==4022	;'IFOLDER'
.CHINE==4023	;'IFNEWER'
.CHISM==4024	;'IFSMALLER'
.CHIBG==4025	;'IFBIGGER'
	SUBTTL	DAP protocol definition


COMMENT	\

The DAP (Data Access Protocol) messages are defined via the following
macros.

	XM	Defines a DAP message type
	XD	Defines a field within a DAP message
		Field types are:
			A  1	ASCII characters
			B  2	Binary (integer)
			C  3	Binary, 5 DAP bytes compressed into 1 -10 word
			F  4	Flags
			I  5	Image (8-bit bytes)
			M  6	Menu
			T  7	Time (1 word internally)
		Field type modifiers are:
			V	Variable field length
			X	Extensible field
		XF	Defines a flag within a DAP field
		XV	Defines a value within a DAP field

DAP message types are of the form $DHnam where "nam" is the name of the
DAP message type (e.g., $DHCFG is a DAP configuration message).

DAP fields are known by three letter names, from which the following
symbols come about:

	$DAnam	Global index into the DAP execution table
	$DBnam	Length of field in DAP bytes
	$DLnam	Length of the field in PDP-10 words
	$DTnam	Type of field (ASCII, flags, etc.)

DAP flags are known by three letter names, from which the following
symbols are derived:

	DB$flg	DAP flag bit number
	DF$flg	Internal (PDP-10) bit number
	D1$flg	First-word bit mask a la DF$flg
	D2$flg	Second-word bit mask

DAP field values are known by three letter names of the form $DVnam.

The DAP "execution" table is built from the DAP definition which follows.
The execution table has an entry for each DAP message type. Following each
DAP message type entry is a series of entries, one for each field within
the DAP message type.
There are two major macros used which generate the usable DAP information:
the DAP macro; and the DODAP macro.

The DAP macro defines the actual DAP protocol, symbols, and so on, but
is not of itself any use to the program. It is the DAP macro that is visable
to the user (and which hopefully looks nice and is understandable).

The DODAP macro actually generates useful symbols, tables, and so forth.
The DODAP macro takes a single argument which controls how DODAP will expand
the DAP macro into program-usable symbols/tables/whatever. The arguments are:

	DEF	Define all of the program symbols associated with the DAP
		protocol as well as the DAP storage offsets within the DAP
		block within the I/O CDB. No binary code is generated.

	XCT	Generates the DAP "execution" table - the program table which
		defines the DAP protocol message-field by message-field.

	IDX	Generates the index table for the execution table - the
		program table which is used for finding the start of a
		particular message template within the execution table.

	XTX	Generates the text table which parallels the execution table
		and which is used for DAP protocol errors.

	STS	Generates the status code table for all DAP I/O-related
		status codes and associated text meaning.

	CLN	Clean up the listing by .XCREFfing junk symbols (so they do
		not clutter up the CREF listing) and PURGEing  those
		symbols no longer needed.
\
	SUBTTL	DAP message field definitions

;Following is a complete (5.3) DAP specification. The following definition
;is used to later build the DAP "execution" table used in both the recep-
;tion and transmission of DAP messages to remote systems. Although there
;is no message type 0 within DAP itself, that position is effectively oc-
;cupied by the template for the generic DAP message header.
;
;Entries marked "(**)" are "local" facilities not available in other
;strict implementations of DAP.

DEFINE	DAP,<

;(xxx) DAP MESSAGE HEADER

XM	DAP,0,<DAP message type>
	XD	MHF,5FX,,<Message header flags>
		XF	SID,0,<Stream ID field present>
		XF	HLN,1,<LENGTH field present>
		XF	HL2,2,<LEN256 field present>
		XF	BCT,3,<BITCNT field present>
		XF	XX1,4,<Reserved>
		XF	SHX,5,<SYSPEC field present>
		XF	MOR,6,<More data coming>
	XD	SID,1B,,<Stream identification>
	XD	HLN,1B,,<Message data length (LSB)>
	XD	HL2,1B,,<Message data length (MSB)>
	XD	BCT,1B,,<Trailing (unused) bit count>
	XD	SHX,4IV,,<SYSPEC system-specific data>


;(001) CONFIGURATION

XM	CFG,1,<Configuration>
	XD	MSZ,2B,,<Maximum DAP protocol message size>
	XD	OST,1B,,<Operating system type>
		XV	ORT,1,<RT-11>
		XV	ORE,2,<RSTS/E>
		XV	ORS,3,<RSX-11S>
		XV	ORM,4,<RSX-11M>
		XV	ORD,5,<RSX-11D>
		XV	OIA,6,<IAS>
		XV	OVX,7,<VAX/VMS>
		XV	OT2,8,<TOPS-20>
		XV	OT1,9,<TOPS-10>
		XV	OR8,10,<RTS-8>
		XV	OS8,11,<OS-8>
		XV	ORP,12,<RSX-11M+>
		XV	OCP,13,<COPOS/11>
		XV	OPS,14,<P/OS>
		XV	OEL,15,<ELAN>
		XV	OCM,16,<CP/M>
		XV	OMS,17,<MS-DOS>
		XV	OX3,18,<ULTRIX-32>
		XV	OX1,19,<ULTRIX-11>
			$DVOMX==$DVOX1	;Maximum known operating system type
	XD	FST,1B,,<File system type>
		XV	F11,1,<RMS-11>
		XV	F20,2,<RMS-20>
		XV	F32,3,<RMS-32>
		XV	FF1,4,<FCS-11>
		XV	FRT,5,<RT-11>
		XV	FNS,6,<No file system supported>
		XV	FT2,7,<TOPS-20>
		XV	FT1,8,<TOPS-10>
		XV	FO8,9,<OS-8>
		XV	F3S,10,<RMS-32S>
		XV	FCM,11,<CP/M>
		XV	FMS,12,<MS-DOS>
		XV	FX3,13,<ULTRIX-32>
		XV	FX1,14,<ULTRIX-11>
			$DVFMX==$DVFX1	;Maximum known file system type
	XD	DVR,1B,,<DAP protocol version>
	XD	DVE,1B,,<DAP ECO level>
	XD	DVU,1B,,<DAP user (customer) mod level>
	XD	DVS,1B,,<DAP software (release) version>
	XD	DVT,1B,,<DAP user software version>
	XD	CNF,10FX,,<Generic configuration flags>
		XF	FPA,0,<File preallocation>
		XF	SFO,1,<Sequential file organization>
		XF	RFO,2,<Relative file organization>
		XF	DFO,3,<Direct file organization>
		XF	FXC,4,<File extension via CONTROL(EXTEND)>
		XF	SFT,5,<Sequential file transfer>
		XF	RAR,6,<Random access by relative record number>
		XF	RAB,7,<Random access by virtual block number>
		XF	RAK,8,<Random access by key>
		XF	RAH,9,<Random access by hash code>
		XF	RAA,10,<Random access by record file address>
		XF	MFO,11,<Multi-keyed indexed file organization>
		XF	SWA,12,<Switching record access mode>
		XF	APN,13,<Append file access>
		XF	CMF,14,<Command file submission/execution>
		XF	CCP,15,<Data compression>
		XF	MDS,16,<Multiple data streams>
		XF	DFC,17,<Return file attributes via CONTROL(DISPLAY)>
		XF	BLR,18,<Blocking of messages up to response>
		XF	BLU,19,<Unlimited blocking of DAP messages>
		XF	C25,20,<Extended length field in header>
		XF	FCK,21,<File data checksuming>
		XF	KEA,22,<Key definition attributes message>
		XF	AEA,23,<Allocation attributes message>
		XF	SEA,24,<Summary attributes message>
		XF	DIR,25,<Directory listing capability>
		XF	TEA,26,<Date/time attributes message>
		XF	PEA,27,<Protection attributes message>
		XF	LEA,28,<Access control list message>
		XF	SPO,29,<Spooling via FOP field>
		XF	CMS,30,<Command file via FOP field>
		XF	FDE,31,<File deletion via FOP field>
		XF	DFS,32,<Default file specification>
		XF	SRA,33,<Sequential record access>
		XF	FTR,34,<File transfer recovery>
		XF	BTC,35,<BITCNT field of data message>
		XF	WST,36,<Warning STATUS mesage>
		XF	REN,37,<File rename via ACCESS message>
		XF	WLD,38,<File wildcarding>
		XF	CGN,39,<GO/NOGO via ACCOPT field>
		XF	NAM,40,<Name message>
		XF	DSG,41,<DAP message segmentation>
		XF	CFA,42,<Change of main attributes via ACCOMP(CHANGE)>
		XF	CFD,43,<Change of date/time via ACCOMP(CHANGE)>
		XF	CFP,44,<Change of protection via ACCOMP(CHANGE)>
		XF	CFN,45,<Change of file name via ACCOMP(CHANGE)>
		XF	MAR,46,<Return of modified attributes on create>
		XF	N3D,47,<3-part NAME messages via DISPLAY field>
		XF	CRA,48,<Change of main attributes via ACCESS(RENAME)>
		XF	CRD,49,<Change of date/time via ACCESS(RENAME)>
		XF	CRP,50,<Change of protection via ACCESS(RENAME)>
		XF	BLC,51,<BLKCNT field in CONTROL message>
		XF	OVO,52,<Octal file version only>


;(002) ATTRIBUTES

XM	ATR,2,<Main attributes>
	XD	M02,6MX,,<Attributes message menu>
	XD	DTY,2FX,,<Data type>
		XF	ASC,0,<7-bit ASCII characters>
		XF	IMG,1,<Image 8-bit bytes>
		XF	EBC,2,<EBCDIC characters>
		XF	CPR,3,<Compressed format>
		XF	EXE,4,<Executable code>
		XF	PRV,5,<Privileged code>
		XF	XX2,6,<Reserved>
		XF	ZOD,7,<Zero on delete>
	XD	ORG,1B,,<File organization>
		XV	OSQ,0,<Sequential>
		XV	ORL,16,<Relative>
		XV	OID,32,<Indexed>
		XV	OHS,48,<Hashed>
	XD	RFM,1B,,<Record format>
		XV	FNR,0,<No (undefined) record format>
		XV	FFX,1,<Fixed length records>
		XV	FVR,2,<Variable length records>
		XV	FVF,3,<Variable with fixed control>
		XV	FST,4,<[ASCII] Stream format>
		XV	FSL,5,<[ASCII] Stream-LF format>
		XV	FSC,6,<[ASCII] Stream-CR format>
	XD	RAT,3FX,,<Record attributes>
		XF	FCC,0,<FORTRAN carriage control>
		XF	ILC,1,<Implied <LF><CR> envelope>
		XF	PRN,2,<VAX Print-file carriage control>
		XF	NSB,3,<Records do not span physical blocks>
		XF	EFC,4,<Embedded format control>
		XF	CCC,5,<COBOL carriage control>
		XF	LSA,6,<Line-sequence-numbered ASCII>
		XF	MCY,7,<MACY11 format>
	XD	BLS,2B,,<Physical block size (bytes) for device>
	XD	MRS,2B,,<[Maximum] record size (bytes)>
	XD	ALQ,5CV,,<Allocation quantity (blocks)>
	XDE	BKS,1B,,<Bucket size (blocks)>
	XD	FSZ,1B,,<Fixed header size of variable length record>
	XDE	MRN,5CV,,<Maximum record number>
	XD	RTS,40AV,,<Run-time system name>
	XD	DEQ,2B,,<Default extension (growth) quantity (blocks)>
	XD	FOP,6FX,,<File access options>
		XF	RWO,0,<Rewind on OPEN>
		XF	RWC,1,<Rewind on CLOSE>
		XF	XX3,2,<Reserved>
		XF	EOT,3,<Skip to EOT>
		XF	DLC,4,<Don't lock file if not properly CLOSEd>
		XF	DRF,5,<Directory file>
		XF	FLK,6,<File locked>
		XF	CTG,7,<Contiguous allocation required>
		XF	SUP,8,<Supersede extant file on CREATE>
		XF	NEF,9,<Do not skip to EOF on OPEN for PUT>
		XF	TMP,10,<Temporary file>
		XF	TMD,11,<Temporary file, mark for DELETE on CLOSE>
		XF	XX4,12,<Reserved>
		XF	DMO,13,<Rewind and dismount on CLOSE>
		XF	WCK,14,<Enable write checking>
		XF	RCK,15,<Enable read checking>
		XF	CIF,16,<CREATE new file if one doesn't exist>
		XF	OLF,17,<Override lock on file on OPEN>
		XF	SQO,18,<Sequential access only>
		XF	MXV,19,<Maximize version number>
		XF	SPC,20,<Spool file to line printer on CLOSE>
		XF	SCF,21,<Submit as command file on CLOSE>
		XF	DLT,22,<Delete file on CLOSE>
		XF	CBT,23,<Try for contiguous file, ok if fails>
		XF	WLF,24,<Wait for locked file>
		XF	DFW,25,<Deferred write>
		XF	TEF,26,<Truncate to EOF on CLOSE>
		XF	OFP,27,<Output file parse>
	XD	BSZ,1B,,<Byte size (bits per logical data byte)>
	XD	DEV,6FX,,<Device characteristics>
		XF	REC,0,<Record-oriented>
		XF	CCL,1,<Carriage-control>
		XF	TRM,2,<Device is a terminal>
		XF	MDI,3,<Directory-structured>
		XF	SDI,4,<Single-directory only>
		XF	SQD,5,<Sequential block oriented (e.g., MTA)>
		XF	NUL,6,<Device is NUL:>
		XF	FOD,7,<File-oriented (e.g., disk or tape)>
		XF	DSH,8,<Device is sharable>
		XF	SPL,9,<Device is being spooled>
		XF	MNT,10,<Device is currently mounted>
		XF	DMT,11,<Device is marked for dismount>
		XF	ALL,12,<Device is allocated>
		XF	IDV,13,<Can do input>
		XF	ODV,14,<Can do output>
		XF	SWL,15,<Software write-locked>
		XF	AVL,16,<Available for use>
		XF	ELG,17,<Error logging enabled>
		XF	MBX,18,<Device is a mailbox>
		XF	RTM,19,<Real time in nature>
		XF	RAD,20,<Random access>
		XF	DRC,21,<Read-checking enabled>
		XF	DWC,22,<Write-checking enabled>
		XF	FRN,23,<Foreign in nature>
		XF	NDV,24,<Network device>
		XF	GDV,25,<Generic device>
	XD	SDC,6FX,,<Spooling device characteristics>
$TRACE <    	XF	RCO,0,<Record-oriented>
		XF	CRG,1,<Carriage-control>
		XF	TTY,2,<Device is a terminal>
		XF	DRS,3,<Directory-structured>
		XF	SDO,4,<Single-directory only>
		XF	SQB,5,<Sequential block oriented (e.g., MTA)>
		XF	DNL,6,<Device is NUL:>
		XF	FOR,7,<File-oriented (e.g., disk or tape)>
		XF	SHD,8,<Device is sharable>
		XF	SPD,9,<Device is being spooled>
		XF	CMN,10,<Device is currently mounted>
		XF	MKD,11,<Device is marked for dismount>
		XF	ALD,12,<Device is allocated>
		XF	CDI,13,<Can do input>
		XF	CDO,14,<Can do output>
		XF	WLK,15,<Software write-locked>
		XF	AVU,16,<Available for use>
		XF	ELE,17,<Error logging enabled>
		XF	MAI,18,<Device is a mailbox>
		XF	RLT,19,<Real time in nature>
		XF	RAC,20,<Random access>
		XF	RCE,21,<Read-checking enabled>
		XF	WCE,22,<Write-checking enabled>
		XF	FGN,23,<Foreign in nature>
		XF	NET,24,<Network device>
		XF	GEN,25,<Generic device>    > ;;END $TRACE
	XD	LRL,2B,,<Longest record length within file>
	XD	HBK,5CV,,<Highest virtual file block allocated>
	XD	EBK,5CV,,<End of file virtual block number>
	XD	FFB,2B,,<First free byte in EBK>
	XD	SBN,5CV,,<Starting block number of file on media>


;(003) ACCESS

XM	ACS,3,<File access>
	XD	AFC,1B,,<Access function>
		XV	ARD,1,<Open file (for read)>
		XV	AWR,2,<Open file (for write)>
		XV	ARN,3,<Rename>
		XV	ADL,4,<Delete>
		XV	ADR,6,<Directory list>
		XV	ASB,7,<Submit as command file>
		XV	AEC,8,<Execute command file>
	XD	AOP,5FX,,<Access options>
		XF	OKE,0,<I/O errors are not fatal>
		XF	MAC,1,<Modify attributes as needed for create>
		XF	ACK,3,<Checksum the file data>
		XF	GNG,4,<Go/Nogo (wait for confirmation)>
	XD	FIL,255AV,,<File specification>
	XD	FAC,3FX,,<File access operations>
		XF	PUT,0,<Put access>
		XF	GET,1,<Get access>
		XF	DEL,2,<Delete access>
		XF	UPD,3,<Update access>
		XF	TRN,4,<Truncate access>
		XF	BIO,5,<Block-mode I/O>
		XF	BRO,6,<Switching between block and record I/O>
		XF	APP,7,<Append Access>
	XD	SHR,3FX,,<Shared file access operations>
		XF	PUT,0,<Put access>
		XF	GET,1,<Get access>
		XF	DEL,2,<Delete access>
		XF	UPD,3,<Update access>
		XF	MSA,4,<Multiple-stream access>
		XF	UPI,5,<User-provided interlocking>
		XF	NIL,6,<No access by other users>
	XD	ADS,4FX,,<Access display requested>
		XF	DMA,0,<Main attributes>
		XF	DKD,1,<Key definition attributes>
		XF	DAA,2,<Allocation attributes>
		XF	DSA,3,<Summary attributes>
		XF	DDT,4,<Date and time attributes>
		XF	DFP,5,<File protection attributes>
		XF	XX5,6,<Reserved>
		XF	DAC,7,<Access control list attributes>
		XF	DNM,8,<Name message with resultant file>
		XF	DN3,9,<3-part name messages (vol, dir, fil)>
	XD	PSW,40AV,,<File password>


;(004) CONTROL

XM	CTL,4,<Control>
	XD	CFC,1B,,<Control function>
		XV	CGT,1,<Get (read) record or block>
		XV	CON,2,<Connect (initialize) data stream>
		XV	CUP,3,<Update current record>
		XV	CPT,4,<Put (write) record or block>
		XV	CDL,5,<Delete current record>
		XV	CRW,6,<Rewind file>
		XV	CTN,7,<Truncate file>
		XV	CMD,8,<Modify file attributes>
		XV	CRR,9,<Release (unlock) record>
		XV	CFR,10,<Free (unlock) all records>
		XV	CXB,11,<EXTEND-BEGIN via following allocation>
		XV	CFL,12,<Flush out I/O data>
		XV	CNV,13,<Next volume processing>
		XV	CFI,14,<Find record>
		XV	CXE,15,<EXTEND-END>
		XV	CDS,16,<Display (retrieve) file attributes>
		XV	CFS,17,<Forward space the file (blocks)>
		XV	CBS,18,<Backspace the file (blocks)>
		XV	CCP,19,<Checkpoint the file>
		XV	CRG,20,<Get (read) recovery>
		XV	CPG,21,<Put (write) recovery>
	XD	M04,4MX,,<Control message menu>
	XD	RAC,1B,,<Record access mode>
		XV	CSR,0,<Sequential record access>
		XV	CKY,1,<Keyed access>
		XV	CRF,2,<Random access by record file address>
		XV	CSF,3,<Sequential file access>
		XV	CBM,4,<Block-mode access>
		XV	CBF,5,<Block-mode file transfer>
	XDE	KEY,255IV,,<Access key>
	XDE	KRF,1B,,<Key of reference>
	XD	ROP,6FX,,<Record level operations>
		XF	EOF,0,<Position to EOF>
		XF	FDL,1,<Fast record delete>
		XF	UIF,2,<Update existing records>
		XF	CSH,3,<Use hash code>
		XF	LOA,4,<Follow fill quantities>
		XF	ULK,5,<Manual locking/unlocking>
		XF	TPT,6,<Truncate put>
		XF	RHD,7,<Read ahead>
		XF	WBH,8,<Write behind>
		XF	KGE,9,<Key is greater than or equal>
		XF	KGT,10,<Key is greater than>
		XF	NLR,11,<Do not lock record>
		XF	RLR,12,<Read locked record>
		XF	BLI,13,<Block I/O>
		XF	CKL,14,<Compare for key limit reached>
		XF	NXR,15,<Non-existant record processing>
		XF	WLR,16,<Wait for locked record>
		XF	RRL,17,<Read record regardless of lock>
		XF	LRR,18,<Lock record for read only>
	XDE	HSH,5IV,,<Hash code>
	XD	CDS,4FX,,<Control display requested>
	XD	BLK,1B,,<Block count ("blocking factor") per I/O operation>


;(005) CONTINUE

XM	CNT,5,<Continue transfer>
	XDS	M05,4MX,,<Internal CONTINUE message menu>
	XD	C2F,1B,,<Continue function code>
		XV	CTA,1,<Try again>
		XV	CSK,2,<Skip and continue>
		XV	CAB,3,<Abort current file operation>
		XV	CRS,4,<Resume processing>
		XV	CTR,5,<Terminate ACCESS operation>


;(006) ACKNOWLEDGE

XM	ACK,6,<Acknowledge>


;(007) ACCESS COMPLETE

XM	ACM,7,<Access complete>
	XDS	M07,4MX,,<Internal ACCOMP message menu>
	XD	A2F,1B,,<Access completion function>
		XV	ACL,1,<Close current file>
		XV	ARS,2,<Response (to access complete)>
		XV	AKL,3,<Kill/reset/abort current file>
		XV	AES,4,<End of data stream>
		XV	ASK,5,<Skip (this wildcarded file)>
		XV	ACB,6,<CHANGE-BEGIN start up RENAME operation>
		XV	ACE,7,<CHANGE-END>
		XV	ATR,8,<Terminate ACCESS operation>
	XD	AFO,6FX,,<File access options>
$TRACE <           XF	RDO,0,<Rewind on OPEN>
		XF	RDC,1,<Rewind on CLOSE>
		XF	XX6,2,<Reserved>
		XF	SKE,3,<Skip to EOT>
		XF	NPC,4,<Don't lock file if not properly CLOSEd>
		XF	DFL,5,<Directory file>
		XF	LOK,6,<File locked>
		XF	CTA,7,<Contiguous allocation required>
		XF	SEX,8,<Supersede extant file on CREATE>
		XF	NSK,9,<Do not skip to EOF on OPEN for PUT>
		XF	TPF,10,<Temporary file>
		XF	TPD,11,<Temporary file, mark for DELETE on CLOSE>
		XF	XX7,12,<Reserved>
		XF	RDM,13,<Rewind and dismount on CLOSE>
		XF	EWC,14,<Enable write checking>
		XF	ERC,15,<Enable read checking>
		XF	CRN,16,<CREATE new file if one doesn't exist>
		XF	OLK,17,<Override lock on file on OPEN>
		XF	SQA,18,<Sequential access only>
		XF	MVN,19,<Maximize version number>
		XF	SFL,20,<Spool file to line printer on CLOSE>
		XF	SBF,21,<Submit as command file on CLOSE>
		XF	DEC,22,<Delete file on CLOSE>
		XF	CTO,23,<Try for contiguous file, ok if fails>
		XF	WTL,24,<Wait for locked file>
		XF	DWR,25,<Deferred write>
		XF	TEN,26,<Truncate to EOF on CLOSE>
		XF	POF,27,<Output file parse>	> ;;END $TRACE
	XD	CKS,2B,,<File data checksum>


;(008) DATA

XM	DAT,8,<Data>
	XD	RCN,8BV,,<Record number>


;(009) STATUS

XM	STS,9,<Status>
	XDS	M09,4MX,,<Internal STATUS message menu>
	XD	STC,2B,,<Status code>
	XD	SRA,8BV,,<Record address for status>
	XD	SRN,8BV,,<Record number for status>
	XD	STV,8BV,,<Secondary status value>
	XD	STX,255AV,,<Status textual description>


;(010) KEY DEFINITION ATTRIBUTES EXTENSION

XM	KYX,10,<Key definition attributes extension>
	XD	M10,6MX,,<Key definition message menu>
	XDE	KOP,3FX,,<Key options>
		XF	DUP,0,<Duplicates allowed>
		XF	CHG,1,<Key changes allowed>
		XF	NKC,2,<Null key character defined>
	XDE	DFL,2B,,<Data bucket fill>
	XDE	IFL,2B,,<Index bucket fill>
	XDE	NSG,1B,,<Number of segment pairs following>
	XDE	POS,2B,,<Byte position of key within record>
	XDE	SIZ,1B,,<Byte count of key within record>
	XDE	REF,1B,,<Key of reference indicator>
	XDE	KNM,40AV,,<Key name a la REF>
	XDE	NUL,1B,,<Value of null key character>
	XDE	IAN,1B,,<Index area number>
	XDE	LAN,1B,,<Lowest level index area number>
	XDE	DAN,1B,,<Data level area number>
	XDE	DTP,1B,,<Data type>
	XDE	RVB,8BV,,<Root VBN for key>
	XDE	HAL,5BV,,<Hash algorithm value>
	XDE	DVB,8BV,,<VBN of start of first data bucket>
	XDE	DBS,1B,,<Data bucket size field>
	XDE	IBS,1B,,<Index bucket size field>
	XDE	LVL,1B,,<Level of root bucket>
	XDE	TKS,1B,,<Total key size>
	XDE	MRL,2B,,<Minimum record length>


;(011) ALLOCATION ATTRIBUTES EXTENSION

XM	ALC,11,<Allocation attributes extension>
	XD	M11,6MX,,<Allocation extension message menu>
	XD	VOL,2B,,<Relative volume number>
	XD	ALN,4FX,,<Alignment options>
		XF	ANY,0,<No specified allocation placement>
		XF	CYL,1,<Align on cylinder boundary>
		XF	ALB,2,<Align to specified logical block>
		XF	AVB,3,<Allocate near to virtual block>
		XF	ARF,4,<Allocate near specified related file>
	XD	ALP,4FX,,<Allocation options>
		XF	HRD,0,<Error if can't align as requested>
		XF	ACT,1,<Contiguous allocation required>
		XF	ACB,2,<Contiguous best try>
		XF	ONC,3,<Align on any cylinder boundry>
	XD	LOC,8BV,,<Location for allocation>
	XDE	RFI,16BV,,<Related file ID>
	XD	AAL,5CV,,<File allocation (blocks)>
	XD	AID,1B,,<Area ID>
	XDE	BKZ,1B,,<Bucket size for this area>
	XD	AEQ,2B,,<Default extension quantity>


;(012) SUMMARY ATTRIBUTES EXTENSION

XM	SUM,12,<Summary attributes extension>
	XD	M12,6MX,,<Summary attributes extension message menu>
	XDE	NOK,1B,,<Number of keys defined in file>
	XDE	NOA,1B,,<Number of areas defined in file>
	XDE	NOR,1B,,<Number of record descriptors in file>
	XDE	PVN,2B,,<Prologue version number>


;(013) DATE AND TIME ATTRIBUTES EXTENSION

XM	TIM,13,<Date and time attributes extension>
	XD	M13,6MX,,<Date and time extension message menu>
	XD	CDT,18T,,<Creation date and time>
	XD	UDT,18T,,<Update date and time>
	XD	EDT,18T,,<Delete date and time>
	XD	RVN,2B,,<Revision number>
	XD	BDT,18T,,<BACKUP date and time>
	XD	PDT,18T,,<Physical (media) creation date and time>
	XD	ADT,18T,,<Access date and time>


;(014) PROTECTION ATTRIBUTES EXTENSION

XM	PRT,14,<Protection attributes extension>
	XD	M14,6MX,,<Protection extension message menu>
	XD	PNM,40AV,,<Owner name>
	XD	PSY,3FX,,<System access protection field>
		XF	PRD,0,<Deny read access>
		XF	PWR,1,<Deny write access>
		XF	PEX,2,<Deny execute access>
		XF	PDE,3,<Deny delete access>
		XF	PAP,4,<Deny append access>
		XF	PDI,5,<Deny directory list access>
		XF	PUP,6,<Deny update access>
		XF	PCP,7,<Deny change protection access>
		XF	PXT,8,<Deny extend access>
	XD	POW,3FX,,<Owner access protection field>
$TRACE <       	XF	RD1,0,<Deny read access>
		XF	WR1,1,<Deny write access>
		XF	EX1,2,<Deny execute access>
		XF	DE1,3,<Deny delete access>
		XF	AP1,4,<Deny append access>
		XF	DI1,5,<Deny directory list access>
		XF	UP1,6,<Deny update access>
		XF	CP1,7,<Deny change protection access>
		XF	XT1,8,<Deny extend access>	> ;;END $TRACE
	XD	PGR,3FX,,<Group access protection field>
$TRACE <       	XF	RD2,0,<Deny read access>
		XF	WR2,1,<Deny write access>
		XF	EX2,2,<Deny execute access>
		XF	DE2,3,<Deny delete access>
		XF	AP2,4,<Deny append access>
		XF	DI2,5,<Deny directory list access>
		XF	UP2,6,<Deny update access>
		XF	CP2,7,<Deny change protection access>
		XF	XT2,8,<Deny extend access>	> ;;END $TRACE
	XD	PWL,3FX,,<World access protection field>
$TRACE <       	XF	RD3,0,<Deny read access>
		XF	WR3,1,<Deny write access>
		XF	EX3,2,<Deny execute access>
		XF	DE3,3,<Deny delete access>
		XF	AP3,4,<Deny append access>
		XF	DI3,5,<Deny directory list access>
		XF	UP3,6,<Deny update access>
		XF	CP3,7,<Deny change protection access>
		XF	XT3,8,<Deny extend access>	> ;;END $TRACE


;(015) NAME

XM	NAM,15,<Name>
	XD	NTY,3FX,,<Name string type>
		XF	NFS,0,<Full file specification>
		XF	NFN,1,<File name>
		XF	NDN,2,<Directory name>
		XF	NVN,3,<Volume (/device/structure) name>
		XF	NDF,4,<Default file specification>
		XF	FRF,5,<Related file specification>
	XD	NMS,255AV,,<Name specification>


;(016) ACCESS CONTROL LIST ATTRIBUTES EXTENSION

XM	ACL,16,<Access control list attributes extension>
	XDE	ACT,1B,,<Repeatition count of ACL fields (following)>
	XDE	ACE,80AV,,<Access control list entry>


;(128) USER IDENTIFICATION

XM	USR,128,<User identification>
	XD	M77,6MX,,<User ID message menu>
	XD	UID,40AV,,<User identification>
	XD	UAC,40AV,,<Accounting information>
	XD	UOP,132AV,,<Other accounting information/options>
;The DAP I/O status codes

XS	ABO,1,<Operation Aborted>
XS	ACC,2,<Could not access file>
XS	ACT,3,<"FILE" activity precludes operation>
XS	AID,4,<Bad area ID>
XS	ALN,5,<Alignment options error>
XS	ALQ,6,<Allocation quantity too large>
XS	ANI,7,<Not ANSI "D" format>
XS	AOP,10,<Allocation options error>
XS	AST,11,<Invalid operation at AST level>
XS	ATR,12,<Attribute read error>
XS	ATW,13,<Attribute write error>
XS	BKS,14,<Bucket size too small>
XS	BKZ,15,<Bucket size too large>
XS	BLN,16,<"BLN" length error>
XS	BOF,17,<Beginning of file detected>
XS	BPA,20,<Private pool address not multiple of 4>
XS	BPS,21,<Private pool size not multiple of 4>
XS	BUG,22,<Internal RMS error condition detected>
XS	CCR,23,<Cannot connect RAM>
XS	CHG,24,<$UPDATE changed key without XB$CHG>
XS	CHK,25,<Bucket format check byte error>
XS	CLS,26,<RSTS/E Close function failed>
XS	COD,27,<Invalid or unsupported "COD" field>
XS	CRE,30,<Could not create file>
XS	CUR,31,<No current record>
XS	DAC,32,<Deaccess error during close>
XS	DAN,33,<Data AREA number invalid>
XS	DEL,34,<RFA-accessed record was deleted>
XS	DEV,35,<Bad Device, or inappropriate device type>
XS	DIR,36,<Error in Directory name>
XS	DME,37,<Dynamic memory exhausted>
XS	DNF,40,<Directory not found>
XS	DNR,41,<Device not ready>
XS	DPE,42,<Device positioning error>
XS	DTP,43,<"DTP" field invalid>
XS	DUP,44,<Duplicate key detected without XB$DUP>
XS	ENT,45,<Enter function failed>
XS	ENV,46,<Operation not selected in "ORG">
XS	EOF,47,<End-of-file detected>
XS	ESS,50,<Expanded string area too short>
XS	EXP,51,<Expiration date not reached>
XS	EXT,52,<File extend failure>
XS	FAB,53,<Not a valid FAB>
XS	FAC,54,<Illegal FAC>
XS	FEX,55,<File already exists>
XS	FID,56,<Invalid File ID>
XS	FLG,57,<Invalid flag bit combination>
XS	FLK,60,<File locked by another user>
XS	FND,61,<"FIND" Function failed>
XS	FNF,62,<File not found>
XS	FNM,63,<Error in file name>
XS	FOP,64,<Invalid file options>
XS	FUL,65,<Device/file is full>
XS	IAN,66,<Index AREA number invalid>
XS	IFI,67,<Invalid IFI value or unopened file>
XS	IMX,70,<Max areas/key exceeded>
XS	INI,71,<INIT never issued>
XS	IOP,72,<Operation illegal or invalid for file organization>
XS	IRC,73,<Illegal record encountered>
XS	ISI,74,<Invalid ISI value>
XS	KBF,75,<Bad KEY buffer address>
XS	KEY,76,<Invalid KEY field>
XS	KRF,77,<Invalid key-of-reference>
XS	KSZ,100,<KEY size too large>
XS	LAN,101,<Lowest-level-index AREA number invalid>
XS	LBL,102,<Not ANSI labelled tape>
XS	LBY,103,<Logical channel busy>
XS	LCH,104,<Logical channel number too large>
XS	LEX,105,<Logical extend error>
XS	LOC,106,<"LOC" Field invalid>
XS	MAP,107,<Buffer mapping error>
XS	MKD,110,<Could not mark file for deletion>
XS	MRN,111,<MRN neg or less than KEY>
XS	MRS,112,<MRS==0 for fixed records>
XS	NAM,113,<"NAM" block address invalid>
XS	NEF,114,<Not positioned to EOF>
XS	NID,115,<Cannot allocate index descriptor>
XS	NPK,116,<No primary key defined>
XS	OPN,117,<RSTS/E open function failed>
XS	ORD,120,<XAB'S not in correct order>
XS	ORG,121,<Invalid file organization value>
XS	PLG,122,<File prolog error>
XS	POS,123,<"POS" field invalid>
XS	PRM,124,<Bad file date field>
XS	PRV,125,<File protection violation>
XS	RAB,126,<Not a valid RAB>
XS	RAC,127,<Illegal RAC value>
XS	RAT,130,<Illegal record attributes>
XS	RBF,131,<Invalid record buffer address>
XS	RER,132,<File read error>
XS	REX,133,<Record already exists>
XS	RFA,134,<Bad RFA value>
XS	RFM,135,<Invalid record format>
XS	RLK,136,<Target bucket locked>
XS	RMV,137,<RSX-F11ACP remove function failed>
XS	RNF,140,<Record not found>
XS	RNL,141,<Record not locked>
XS	ROP,142,<Invalid record options>
XS	RPL,143,<Error reading prolog>
XS	RRV,144,<Invalid RRV record encountered>
XS	RSA,145,<RAB stream currently active>
XS	RSZ,146,<Bad record size>
XS	RTB,147,<Record too big for user's buffer>
XS	SEQ,150,<Primary key out of sequence>
XS	SHR,151,<SHR field invalid>
XS	SIZ,152,<SIZ field invalid>
XS	STK,153,<Stack too big for save area>
XS	SYS,154,<System directive error>
XS	TRE,155,<Index tree error>
XS	TPE,156,<Error in file extension>
XS	UBF,157,<Invalid user buffer address>
XS	USZ,160,<Invalid user buffer size>
XS	VER,161,<Error in version number>
XS	VOL,162,<Invalid volume number>
XS	WER,163,<File write error>
XS	WLK,164,<Device is write-locked>
XS	WPL,165,<Error writing prolog>
XS	XAB,166,<Not valid XAB>
XS	DDI,167,<Default directory invalid>
XS	CAA,170,<Cannot access argument list>
XS	CCF,171,<Cannot close file>
XS	CDA,172,<Cannot deliver AST>
XS	CHN,173,<Channel assignment failure>
XS	TTO,174,<Terminal output ignored due to ^O>
XS	TTY,175,<Terminal input ignored due to ^Y>
XS	DNA,176,<Default filename string address error>
XS	DVI,177,<Device ID field invalid>
XS	ESA,200,<Expanded string address error>
XS	FNA,201,<Filename string address error>
XS	FSZ,202,<FSZ field invalid>
XS	IAL,203,<Invalid argument list>
XS	KFF,204,<Known file found>
XS	LNE,205,<Logical name error>
XS	NOD,206,<Node name error>
XS	AOK,207,<Operation successful>
XS	DUP,210,<Record inserted had duplicate key>
XS	IDX,211,<Index update error but record inserted>
XS	RLK,212,<Record locked but read anyway>
XS	RRV,213,<Record inserted in primary but . . .>
XS	CNO,214,<File was created but not OPENed>
XS	PBF,215,<Bad prompt buffer address>
XS	PND,216,<Asynchronous operation pending>
XS	QUO,217,<Quoted string error>
XS	RHB,220,<Record header buffer invalid>
XS	RLF,221,<Related file invalid>
XS	RSS,222,<Resultant string size invalid>
XS	RST,223,<Resultant string address invalid>
XS	SQO,224,<Operation not sequential>
XS	SUC,225,<Operation successful>
XS	CFS,226,<Created file superseded extant version>
XS	SYN,227,<File specification syntax error>
XS	TMO,230,<Time-out period expired>
XS	BLK,231,<FB$BLK record attribute not supported>
XS	BSZ,232,<Byte size illegal>
XS	CDR,233,<Cannot disconnect RAB>
XS	CGJ,234,<Cannot get JFN for file>
XS	COF,235,<Cannot OPEN file>
XS	JFN,236,<Bad JFN>
XS	PEF,237,<Cannot position to EOF>
XS	TRU,240,<Cannot truncate file>
XS	UDF,241,<File is in undefined state and cannot be accessed>
XS	XCL,242,<File must be OPENed for exclusive access>
XS	DIF,243,<Directory full>
XS	HNS,244,<Handler not in system>
XS	HDE,245,<Fatal hardware error>
XS	WBE,246,<Attempt to write beyond EOF>
XS	ONP,247,<Option not present>
XS	DNA,250,<Device is not attached>
XS	DAA,251,<Device is already attached>
XS	DVA,252,<Device is not attachable>
XS	SRU,253,<Sharable resource in use>
XS	IOR,254,<Illegal overlay request>
XS	CRC,255,<Block check or CRC error>
XS	CNE,256,<Caller's nodes exhausted>
XS	IFF,257,<Index file full>
XS	FHF,260,<File header full>
XS	AFW,261,<Accessed for write>
XS	FHC,262,<File header checksum failure>
XS	ATE,263,<Attribute control list error>
XS	FLU,264,<File already accessed on LUN>
XS	BTF,265,<Bad tape format>
XS	IOD,266,<Illegal operation on file descriptor block>
XS	RDD,267,<Rename to different device illegal>
XS	RFE,270,<Rename to already extant file illegal>
XS	ROF,271,<Cannot rename old file system>
XS	FAO,272,<File already OPEN>
XS	PAR,273,<Device parity error>
XS	EOV,274,<End of volume detected>
XS	DOV,275,<Data overrun>
XS	BDB,276,<Bad block on device>
XS	EOT,277,<End of tape detected>
XS	NBS,300,<No buffer space for file>
XS	FEA,301,<File exceeds allocated space>
XS	TNI,302,<Task not installed>
XS	ULE,303,<Unlock error>
XS	NFL,304,<No file accessed on LUN>
XS	SRF,305,<Send or Receive error>
XS	SPL,306,<Spool or submit command file failure>
XS	NMF,307,<No more files>
XS	CKE,310,<DAP file transfer checksum error>
XS	QTA,311,<Quota exceeded>
XS	BUG,312,<Internal network error detected>
XS	TTC,313,<Terminal input aborted due to ^C>
XS	DFL,314,<Data bucket fill size too big>
XS	ESL,315,<Expanded string length invalid>
XS	IBF,316,<Illegal bucket format>
XS	IBK,317,<Bucket size of LAN different from IAN in XAB>
XS	IDX,320,<Index not initialized>
XS	IFA,321,<Illegal file attributes or corrupt file header>
XS	IFL,322,<Index bucket fill size too big>
XS	KNM,323,<Keyname buffer not readable or writable in XAB>
XS	KSI,324,<Index bucket will not hold two keys>
XS	MBC,325,<Multi-buffer count illegal>
XS	NET,326,<Network operation failed at remote node>
XS	ALK,327,<Record is already locked>
XS	DEL,330,<Deleted record successfully accessed>
XS	LIM,331,<Retrieved record exceeds key value>
XS	NOP,332,<Key XAB not filled in>
XS	RNF,333,<Nonexistent record successfully accessed>
XS	PLV,334,<Unsupported prologue version>
XS	REF,335,<Illegal key-of-reference in XAB>
XS	RSL,336,<Resultant string length invalid>
XS	RVU,337,<Error updating rrv's, paths to data may be lost>
XS	SEG,340,<Too many segments>
XS	SUP,342,<Operation not supported over network>
XS	WBE,343,<Error on write-behind>
XS	WLD,344,<Invalid wildcard operation>
XS	WSF,345,<Working set full>
XS	DLN,346,<Directory listing - error reading name>
XS	DLA,347,<Directory listing - error reading file attributes>
XS	DPN,350,<Directory listing - name protection failure>
XS	DPA,351,<Directory listing - attributes protection failure>
XS	DLE,352,<Directory listing - file attributes do not exist>
XS	DLR,353,<Directory listing - cannot recover>
XS	SNE,354,<Sharing not enabled>
XS	SPE,355,<Sharing page count exceeded>
XS	UPI,356,<UPI not set when sharing with BRO set>
XS	ACS,357,<Error in access control string>
XS	TNS,360,<Terminator not seen>
XS	BES,361,<Bad escape sequence>
XS	PES,362,<Partial escape sequence>
XS	WCC,363,<Invalid wildcard context value>
XS	IDR,364,<Invalid directory rename operation>
XS	STR,365,<User structure went invalid during operation>
XS	FTM,366,<Network file transfer mode precludes operation>
XS	CRS,367,<File was created in stream format>
XS	GBC,370,<Invalid global buffer count>
XS	ENQ,371,<ENQ system service request failed>
XS	NTF,372,<Network operation failed at remote node>
XS	NTS,373,<Network operation not supported>
XS	CRM,374,<CRMPSC failed to map global buffers>
XS	DLK,375,<Deadlock detected>
XS	XEQ,376,<Exceeded ENQ quota>
XS	JNF,377,<Journal name not found>
XS	JOP,400,<Journal options illegal for device>
XS	RUM,401,<Recovery unit mis-call>
XS	NOJ,402,<Journal needed for inaccessible file>
XS	RLK,403,<Record relocked in recovery unit>
XS	ODQ,404,<Disk usage exceeds disk quota>
XS	ICS,405,<Incompatible file sharing>
XS	LWC,406,<Lock wait cancelled>
XS	XNF,407,<XAB not found>
XS	RUP,410,<Recovery unit in progress, CLOSE disallowed>
XS	JNS,411,<Operation not supported under RMS journaling>
XS	NRU,412,<Operation prohibited outside of recovery unit>
XS	REE,413,<RENAME failed, recovery failed, file is lost>
XS	CJF,414,<CJF system service request failed>
XS	TMR,415,<SETIMR system service request failed>
XS	FBM,416,<File being modified (another writer)>
XS	DNA,417,<Device not available>
XS	NSD,420,<No such device>
XS	POA,421,<Partial allocation only>
XS	BNF,422,<Specified block not free>
XS	CSD,423,<Can't supersede directory file>
XS	DNE,424,<Can't delete non-empty directory file>
XS	SNF,425,<Sub-file-directory not found>
XS	SLE,426,<Search list empty (no devices found)>
XS	LVL,427,<Sub-file-directories nested too deeply>
XS	NCE,430,<NOCREATE on entire search list>
XS	FCU,431,<Can't update file>
XS	ENC,432,<Exceeded network capacity>
XS	TNA,433,<TSK network device not available>
XS	NSN,434,<No such network node>
XS	SIU,435,<Sub-file-directory in use on RENAME>
XS	NDR,436,<Can't delete file with NO-DELETE lock>
XS	JCH,437,<Too many simultaneous file accesses>
XS	SSL,440,<Can't RENAME sub-file-directory to lower level>
XS	DDU,441,<Device is "down" and unuseable>
XS	DRS,442,<Device is restricted>
XS	DCM,443,<Device controlled by MDA, not ASSIGNable>
XS	DAJ,444,<Device already ASSIGNed to another job>
XS	IDM,445,<Illegal I/O data mode>
XS	LLE,446,<Lineprinter page limit exceeded>
XS	VFE,447,<Lineprinter VFU format error>
XS	LUC,450,<Lineprinter "undefined character" error>
XS	VRP,451,<Lineprinter VFU RAM parity error>
XS	FSE,452,<File specification "parse" error>
XS	NNO,453,<No such nodes>
XS	ANO,454,<All nodes inaccessible>
XS	SNO,455,<Some nodes inaccessible>
XS	NDV,456,<No such devices>
XS	ADV,457,<All devices inaccessible>
XS	SDV,460,<Some devices inaccessible>
XS	NDI,461,<No such directories>
XS	ADI,462,<All directories inaccessible>
XS	SDI,463,<Some directories inaccessible>
XS	NFI,464,<No such files>
XS	AFI,465,<All files inaccessible>
XS	SFI,466,<Some files inaccessible>
XS	ARJ,467,<All files rejected by file constraints>
XS	SRJ,470,<Some files rejected by file constraints>

> ;END DAP MACRO DEFINITION
DEFINE	DODAP(GEN),<

	IFIDN	<GEN><DEF>,<

;;Generate DAP symbols, offsets, etc.


;;XM  --  DEFINE DAP MESSAGE TYPE
;;Call is:
;;
;;	XM	<nam>,<cod>,<txt>
;;
;;Where <nam> is the four letter name of the DAP message type;;  <cod>
;;is the binary value of the message type;; and <txt> is the textual
;;description of the message type (for error printout).

DEFINE	XM(NAM,COD,TXT),<

	IFE	^D<COD>,<
		..XDI==-1	;;INITIALIZE GLOBAL INDEX
		..XDC==0	;;INITIALIZE OFFSET INTO .IODAP IN I/O CDB
		> ;;END IFE COD

	..XDI==..XDI+1		;;BUMP GLOBAL INDEX
	..XDO==0		;;RESET LOCAL INDEX

	..XDM==-1000		;;RESET MENU FIELD COUNTER

	..XDB==0		;;DUMMY SYMBOL
	..XDT==0		;;DUMMY SYMBOL
	..XDE==0		;;DUMMY SYMBOL
	..XDS==0		;;DUMMY SYMBOL
	..XDV==0		;;DUMMY SYMBOL
	..XDX==0		;;DUMMY SYMBOL

	IFDEF	$DA'NAM,<IFN <$DA'NAM-..XDI>,<
		XMERR NAM,Multiply defined DAP message type>>

	$DH'NAM==^D<COD>	;;DEFINE THE MESSAGE TYPE

	$DA'NAM==..XDI		;;DEFINE EXECUTION TABLE INDEX
	$DB'NAM==..XDB		;;BYTE LENGTH (MEANINGLESS)
	$DL'NAM==..XDL		;;WORD LENGTH (MEANINGLESS)
	$DT'NAM==..XDT		;;FIELD TYPE (MESSAGE TYPE)

	..XCT(NAM,\..XDE,\..XDS,\..XDV,\..XDX,\..XDT,\..XDC,\..XDB,\..XDO)

> ;;END OF XM MACRO DEFINITION
;;STILL IN DODAP DEFINITION
;;STILL IN IFIDN <GEN><DEF>

;;XD  --  DEFINE DAP FIELD
;;Call is:
;;
;;	XD	<nam>,<nnt>,<dfl>,<txt>
;;
;;Where <nam> is the unique three-letter name for the DAP field;; <nnt>
;;is a character description of the field - "nn" is the field length in
;;DAP bytes and "t" is the field type;; <dfl> is the default field value;;
;;and <txt> is the field description text suitable for error typeout.

DEFINE	XD(NAM,NNT,DFL,TXT),<..XD(NAM,NNT,0,0,DFL,TXT)>

DEFINE	XDE(NAM,NNT,DFL,TXT),<..XD(NAM,NNT,1,0,DFL,TXT)>

DEFINE	XDS(NAM,NNT,DFL,TXT),<..XD(NAM,NNT,0,1,DFL,TXT)>
;;STILL IN DODAP DEFINITION
;;STILL IN IFIDN <GEN><DEF>

;;..XD  --  MAIN "GUTS" OF XD? MACROS

DEFINE	..XD(NAM,NNT,ILM,SKP,DFL,TXT),<

	IFIDN	<NAM><DAP>,<XDERR NAM,"DAP" is a reserved field name>

	..XDI==..XDI+1		;;BUMP GLOBAL INDEX
	..XDO==..XDO+1		;;BUMP LOCAL INDEX

	..XDM==..XDM+1		;;ADVANCE MENU FIELD COUNTER

	..XDB==-1		;;INITIALIZE FIELD SIZE
	..XDT==-1		;;INITIALIZE FIELD TYPE (NONE)
	..XDE==ILM		;;FLAG FIELD LEGALITY
	..XDS==SKP		;;NOTE FIELD WORTH (SKIP OR NOT)
	..XDV==0		;;INITIALIZE VARIABLE-LENGTH FLAG
	..XDX==0		;;INITIALIZE EXTENSIBLE-FIELD FLAG

;;LOOP OVER THE FIELD TYPE TO DECODE AND BUILD LENGTH AND TYPE SYMBOLS

	IRPC	NNT,<

		..XDA==0	;;INITIALIZE ACTIVITY COUNTER

		IFGE	<"NNT"-"0">,<IFLE <"NNT"-"9">,<
			IFL ..XDB,<..XDB==0>
			..XDB==<..XDB*^D10>+^D<NNT>
			..XDA==1>>

		IFE	<"NNT"-"A">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "A" specified>
			..XDA==<..XDT==^O1>>	;;FIELD TYPE ASCII

		IFE	<"NNT"-"B">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "B" specified>
			..XDA==<..XDT==^O2>>	;;FIELD TYPE IS BINARY

		IFE	<"NNT"-"C">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "C" specified>
			..XDA==<..XDT==^O3>>	;;FIELD TYPE IS COMPRESSED "B"

		IFE	<"NNT"-"F">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "F" specified>
			..XDA==<..XDT==^O4>>	;;FIELD TYPE IS FLAGS

		IFE	<"NNT"-"I">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "I" specified>
			..XDA==<..XDT==^O5>>	;;FIELD TYPE IS IMAGE BYTES

		IFE	<"NNT"-"M">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "M" specified>
			..XDM==-1		;;ALL FURTHER FIELDS ARE MENUED
			..XDA==<..XDT==^O6>>

		IFE	<"NNT"-"T">,<
			IFG ..XDT,<XDERR NAM,Multiple field type "T" specified>
			..XDA==<..XDT==^O7>>	;;FIELD TYPE IS DATE/TIME


		IFE	<"NNT"-"V">,<
			IFN ..XDV,<XDERR NAM,"V" flag multiply specified>
			IFN ..XDX,<XDERR NAM,Both "V" and "X" flags specified>
			..XDA==<..XDV==1>>	;;FIELD LENGTH IS VARIABLE

		IFE	<"NNT"-"X">,<
			IFN ..XDV,<XDERR NAM,Both "V" and "X" flags specified>
			IFN ..XDX,<XDERR NAM,"X" flag multiply specified>
			..XDA==<..XDX==1>>	;;FIELD IS EXTENSIBLE DATA

		IFE	..XDA,<XDERR NAM,Illegal field descriptor "NNT">
	> ;;END OF IRPC

	IFL	..XDB,<XDERR NAM,No field length specified>
	IFL	..XDT,<XDERR NAM,No field type specified>

	IFE	..XDT-$DXTAS,<..XDL==<<..XDB+^D4>/^D5>>
	IFE	..XDT-$DXTBN,<..XDL==<<<..XDB*^D8>+^D35>/^D36>>
	IFE	..XDT-$DXTCN,<..XDL==1>
	IFE	..XDT-$DXTFL,<..XDL==<<<..XDB*^D7>+^D35>/^D36>>
	IFE	..XDT-$DXT8I,<..XDL==<<..XDB+^D3>/^D4>>
	IFE	..XDT-$DXTMN,<..XDL==<<<..XDB*^D7>+^D35>/^D36>>
	IFE	..XDT-$DXTDT,<..XDL==1>

	IFDEF	$DA'NAM,<IFN <$DA'NAM-..XDI>,<
		XDERR NAM,Multiply defined field name>>

	$DA'NAM==..XDI		;;DAP GLOBAL INDEX
	$DT'NAM==..XDT		;;FIELD DATA TYPE
	$DB'NAM==..XDB		;;DAP FIELD LENGTH IN BYTES
	$DL'NAM==..XDL		;;DAP FIELD LENGTH IN -10 WORDS

;;IF A MENU FIELD, DEFINE FIELD BIT NAME FOR TM?? MACROS

	IFGE	..XDM,<DM$'NAM==<<<..XDM/^D7>*^D7> + <^D6-<..XDM-<<..XDM/^D7>*^D7>>>>>

;;DEFINE THE FIELD EXECUTION TABLE ENTRY FOR LATER "XCT"ION

	..XCT(NAM,\..XDE,\..XDS,\..XDV,\..XDX,\..XDT,\..XDC,\..XDB,\..XDO)

	IFE	..XDE,<
		IF1,<.ID'NAM==000000+..XDC>  ;;DAP ENTRY NAME IN THE I/O CDB
		IF2,<.ID'NAM==.IODAP+..XDC>  ;;DAP ENTRY NAME IN THE I/O CDB
		$DLDAP==<..XDC==..XDC+..XDL>>;;ACCUMLATE TOTAL ALLOCATION

	IFG	$DLDAP-^O777,<XDERR NAM,DAP area within I/O CDB too large>

> ;;END OF ..XD MACRO DEFINITION



;;..XCT  --  HELPER FOR XM AND XD?

DEFINE	..XCT(NAM,XDE,XDS,XDV,XDX,XDT,XDC,XDB,XDO),<DEFINE $DX'NAM,<
	BYTE	(8)<<<<<<<<XDE_1>!XDS>_1>!XDV>_1>!XDX>_1>_3> 
		(4)XDT (9)XDC (9)XDB (6)XDO >  ;;END $DX'NAM MACRO
> ;;END ..XCT MACRO DEFINITION
;;STILL IN DODAP DEFINITION
;;STILL IN IFIDN <GEN><DEF>

;;XF  --  DEFINE DAP FLAG
;;Call is:
;;
;;	XF	<flg>,<dit>,<txt>
;;
;;Where <flg> is the three letter name of the DAP flag;; <dit> is the DAP
;;bit number of the flag within the DAP field;; and <txt> is the textual
;;description of the flag, suitable for error printout.

DEFINE	XF(FLG,DIT,TXT),<

	IFL	^D<DIT>,<XFERR FLG,Negative flag bit illegal>
	IFGE	<^D<DIT>-^D70>,<XFERR FLG,Flag bit greater than second word!!!>

	DB$'FLG==^D<DIT>	;;DAP FLAG BIT VALUE

;;NOW TRANSLATE THE DAP BIT INTO THE CORRESPONDING -10 BIT

	..XDF==<<<^D<DIT>/^D7>*^D7> + <^D6-<^D<DIT>-<<^D<DIT>/^D7>*^D7>>>>

	D1$'FLG==0		;;INITIALIZE FIRST WORD MASK
	D2$'FLG==0		;;INITIALIZE SECOND WORD MASK

	IFLE	<..XDF-^D34>,<D1$'FLG==1B<..XDF>>
	IFGE	<..XDF-^D35>,<IFL <..XDF-^D70>,<D2$'FLG==1B<..XDF-^D35>>>

	IFDEF	DF$'FLG,<IFN <DF$'FLG-..XDF>,<
		XFERR FLG,Multiply defined DAP flag bit>>

	DF$'FLG==..XDF		;;DEFINE INTERNAL DAP BIT

> ;;END OF XF MACRO DEFINITION
;;STILL IN DODAP DEFINITION
;;STILL IN IFIDN <GEN><DEF>

;;XV  --  DEFINE DAP FIELD VALUE
;;Call is:
;;
;;	XV	<nam>,<val>,<txt>
;;
;;Where <nam> is the name of the particular <val> which the field may
;;take;; and <txt> is a textual description of the field value, suitable
;;for error printout.

DEFINE	XV(NAM,VAL,TXT),<

	IFDEF	$DV'NAM,<IFN <$DV'NAM-^D<VAL>>,<
		XVERR NAM,Multiply defined DAP field value>>

	$DV'NAM==^D<VAL>	;;DEFINE FIELD VALUE

> ;;END OF XV MACRO DEFINITION



DEFINE	XS(NAM,STS,TXT),<

	$DS'NAM==^O<STS>	;;DEFINE STATUS CODE

> ;;END XS MACRO DEFINITION
;;STILL IN DODAP DEFINITION
;;STILL IN IFIDN <GEN><DEF>

;;HELPER MACROS TO X?

;;XMERR  --  ERROR IN XM MACRO

DEFINE	XMERR(NAM,STR),<PRINTX ? Error in XM macro for NAM: STR>


;;XDERR  --  ERROR IN XD MACRO

DEFINE	XDERR(NAM,STR),<PRINTX ? Error in XD macro for NAM: STR>


;;XFERR  --  ERROR IN XF MACRO

DEFINE	XFERR(NAM,STR),<PRINTX ? Error in XF macro for NAM: STR>


;;XVERR  --  ERROR IN XV MACRO

DEFINE	XVERR(NAM,STR),<PRINTX ? Error in XV macro for NAM: STR>



> ;;END IFIDN <GEN><DEF>
;;STILL IN DODAP DEFINITION

	IFIDN	<GEN><XCT>,<

;;Generate DAP execution table

DEFINE	XM(NAM,COD,TXT),<$DX'NAM>

DEFINE	XD(NAM,NNT,DFL,TXT),<$DX'NAM>
DEFINE	XDE(NAM,NNT,DFL,TXT),<$DX'NAM>
DEFINE	XDS(NAM,NNT,DFL,TXT),<$DX'NAM>

DEFINE	XF(NAM,DIT,TXT),<>
DEFINE	XV(NAM,VAL,TXT),<>

DEFINE	XS(NAM,STS,TXT),<>

> ;;END IFIDN <GEN><XCT>
;;STILL IN DODAP DEFINITION

	IFIDN	<GEN><IDX>,<

;;Generate DAP execution table index based on message type


DEFINE	XM(NAM,COD,TXT),<

	IFE	^D<COD>,<..XDI==-1>	;;INITIALIZE GLOBAL INDEX

	..XDI==..XDI+1		;;BUMP GLOBAL INDEX

	XWD	..XDI,^D<COD>	;;BUILD INDEX TABLE ENTRY

> ;;END XM MACRO DEFINITION

DEFINE	XD(NAM,NNT,DFL,TXT),<..XDI==..XDI+1>
DEFINE	XDE(NAM,NNT,DFL,TXT),<..XDI==..XDI+1>
DEFINE	XDS(NAM,NNT,DFL,TXT),<..XDI==..XDI+1>

DEFINE	XF(NAM,DIT,TXT),<>
DEFINE	XV(NAM,VAL,TXT),<>

DEFINE	XS(NAM,STS,TXT),<>

> ;;END IFIDN <GEN><IDX>
;;STILL IN DODAP DEFINITION

	IFIDN	<GEN><XTX>,<

;;Generate text table (for error printout) based on DAP execution table


DEFINE	XM(NAM,COD,TXT),<[ASCIZ \TXT\]>

DEFINE	XD(NAM,NNT,DFL,TXT),<[ASCIZ \TXT\]>
DEFINE	XDE(NAM,NNT,DFL,TXT),<[ASCIZ \TXT\]>
DEFINE	XDS(NAM,NNT,DFL,TXT),<[ASCIZ \TXT\]>

DEFINE	XF(NAM,DIT,TXT),<>
DEFINE	XV(NAM,VAL,TXT),<>

DEFINE	XS(NAM,STS,TXT),<>

> ;;END IFIDN <GEN><XTX>
;;STILL IN DODAP DEFINITION

	IFIDN	<GEN><STS>,<

;;Generate textual messages corresponding to DAP status codes


DEFINE	XM(NAM,COD,TXT),<>

DEFINE	XD(NAM,NNT,DFL,TXT),<>
DEFINE	XDE(NAM,NNT,DFL,TXT),<>
DEFINE	XDS(NAM,NNT,DFL,TXT),<>

DEFINE	XF(NAM,DIT,TXT),<>
DEFINE	XV(NAM,VAL,TXT),<>

DEFINE	XS(NAM,STS,TXT),<

	XWD	[ASCIZ \TXT\],^O<STS>

> ;;END XS MACRO DEFINITION

> ;;END IFIDN <GEN><STS>
;;STILL IN DODAP DEFINITION

	IFIDN	<GEN><CLN>,<

;;Cleanup the CREF listing

IF1,<
	.XCREF	..FF,	..FM,	..FN,	..F0,	..F1
	.XCREF	..XDA,	..XDB,	..XDC,	..XDE,	..XDF,	..XDI,	..XDL,
	.XCREF	..XDM,	..XDO,	..XDS,	..XDT,	..XDV,	..XDX
	.XCREF	..XM,	..XD,	..XD0
> ;;END IF1

IF2,<
	PURGE	..XDA,	..XDB,	..XDC,	..XDE,	..XDF,	..XDI,	..XDL,
	PURGE	..XDM,	..XDO,	..XDS,	..XDT,	..XDV,	..XDX
	PURGE	..XM,	..XD,	..XD0
> ;;END IF2

> ;;END IFIDN <GEN><CLN>
;;STILL IN DODAP DEFINITION

	IFDIF	<GEN><CLN>,<DAP>	;;EXECUTE ALL THE GRUNDGE

	IFIDN	<GEN><XCT>,<EXP 0>	;;TERMINATE THE EXECUTION TABLE
	IFIDN	<GEN><IDX>,<EXP 0>	;;TERMINATE THE INDEX TABLE
	IFIDN	<GEN><XTX>,<EXP 0>	;;TERMINATE THE TEXT TABLE
	IFIDN	<GEN><STS>,<EXP 0>	;;TERMINATE THE STATUS TABLE

> ;;END DODAP MACRO DEFINITION
;DEFINE DAP EXECUTION TABLE FORMAT AND SYMBOLS

DX$ILM==1B0		;ILLEGAL (UNSUPPORTED) FIELD
DX$SKP==1B1		;IGNORE (NEVER TRANSMIT) FIELD
DX$VAR==1B2		;FIELD IS VARIABLE LENGTH (FIRST BYTE IS COUNT)
DX$XTN==1B3		;FIELD DATA IS EXTENSIBLE
;	1B4		;FREE BIT
;	1B5		;FREE BIT
;	1B6		;FREE BIT
;	1B7		;FREE BIT
DX$TYP==17B11		;FIELD DATA TYPE
	$DXTMS==0	;DAP MESSAGE TYPE
	$DXTAS==1	;ASCII CHARACTERS
	$DXTBN==2	;BINARY (INTEGER) DATA
	$DXTCN==3	;KROCK 1 WORD (5 BYTE) BINARY DATA
	$DXTFL==4	;FLAGS (BITS)
	$DXT8I==5	;IMAGE 8-BIT BYTES
	$DXTMN==6	;MENU FIELD
	$DXTDT==7	;DATE/TIME (-10 ONE WORD, DAP ASCII STREAM)
	$DXTMX==7	;MAXIMUM FIELD DATA TYPE
DX$IOX==777B20		;INDEX INTO .IODAP AREA WITHIN I/O CDB
DX$LNB==777B29		;FIELD LENGTH (DAP BYTES)
DX$COD==77B35		;FIELD NUMBER WITHIN MESSAGE
	SUBTTL	DAP field manipulation macros

;MOVD  --  MOVE FROM DAP FIELD
;MOVDM  --  MOVE TO DAP FIELD
;MOVD1  --  MOVE ONE-WORD-VALUE FROM DAP FIELD
;MOVD1M  --  MOVE ONE-WORD-VALUE TO DAP FIELD
;MOVDII  --  MOVE IMMEDIATE A LA DAP FIELD
;Call is:
;
;	MOVD	<ac>,<fld>[,<adr>]
;	MOVDM	<ac>,<fld>[,<adr>]
;	MOVD1	<ac>,<fld>[,<adr>]
;	MOVD1M	<ac>,<fld>[,<adr>]
;	MOVDII	<ac>,<fld>,<val>
;
;where <ac> is the register to load/store; <fld> is the generic name
;of the DAP field to be referenced; <adr> is the actual address
;in main memory (if not specified, then the .IDfld location in the
;I/O CDB addressed by the IO register will be used); and <val> is the
;DAP data value (e.g., a flag mask) to be loaded.

DEFINE	MOVD(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<MDERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<MDERR FLD,ASCII type field illegal>

	IFLE	$DL'FLD,<MDERR FLD,Field length too small>
	IFG	$DL'FLD-2,<MDERR FLD,Field too large>

	IFB	<ADR>,<
		IFE	$DL'FLD-1,<MOVE  AC,.ID'FLD(IO)>
		IFE	$DL'FLD-2,<DMOVE AC,.ID'FLD(IO)> >

	IFNB	<ADR>,<
		IFE	$DL'FLD-1,<MOVE  AC,ADR>
		IFE	$DL'FLD-2,<DMOVE AC,ADR> >

> ;END MOVD MACRO DEFINITION
DEFINE	MOVDM(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<MDERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<MDERR FLD,ASCII type field illegal>

	IFLE	$DL'FLD,<MDERR FLD,Field length too small>
	IFG	$DL'FLD-2,<MDERR FLD,Field too large>

	IFB	<ADR>,<
		IFE	$DL'FLD-1,<MOVEM  AC,.ID'FLD(IO)>
		IFE	$DL'FLD-2,<DMOVEM AC,.ID'FLD(IO)> >

	IFNB	<ADR>,<
		IFE	$DL'FLD-1,<MOVEM  AC,ADR>
		IFE	$DL'FLD-2,<DMOVEM AC,ADR> >

> ;END MOVDM MACRO DEFINITION
DEFINE	MOVD1(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<MDERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<MDERR FLD,ASCII type field illegal>
	IFE	$DT'FLD-$DXTFL,<MDERR FLD,Flags type field illegal>
	IFE	$DT'FLD-$DXT8I,<MDERR FLD,Image type field illegal>
	IFE	$DT'FLD-$DXTMN,<MDERR FLD,Menu type field illegal>

	IFLE	$DL'FLD,<MDERR FLD,Field length too small>
	IFG	$DL'FLD-2,<MDERR FLD,Field too large>

	IFB	<ADR>,<
		IFE	$DL'FLD-1,<MOVE AC,.ID'FLD(IO)>
		IFE	$DL'FLD-2,<MOVE AC,.ID'FLD+1(IO)> >

	IFNB	<ADR>,<
		IFE	$DL'FLD-1,<MOVE AC,ADR>
		IFE	$DL'FLD-2,<MOVE AC,1+ADR> >

> ;END MOVD1 MACRO DEFINITION



DEFINE	MOVD1M(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<MDERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<MDERR FLD,ASCII type field illegal>
	IFE	$DT'FLD-$DXTFL,<MDERR FLD,Flags type field illegal>
	IFE	$DT'FLD-$DXT8I,<MDERR FLD,Image type field illegal>
	IFE	$DT'FLD-$DXTMN,<MDERR FLD,Menu type field illegal>

	IFLE	$DL'FLD,<MDERR FLD,Field length too small>
	IFG	$DL'FLD-2,<MDERR FLD,Field too large>

	IFB	<ADR>,<
		IFE	$DL'FLD-1,<MOVEM AC,.ID'FLD(IO)>
		IFE	$DL'FLD-2,<CAIA
				JRST	.+3
				SETZM	.ID'FLD(IO)
				MOVEM	AC,.ID'FLD+1(IO)> >

	IFNB	<ADR>,<
		IFE	$DL'FLD-1,<MOVEM AC,ADR>
		IFE	$DL'FLD-2,<CAIA
				JRST	.+3
				SETZM	ADR
				MOVEM	AC,1+ADR> >

> ;END MOVD1M MACRO DEFINITION
DEFINE	MOVDII(AC,FLD,VAL),<

	IFE	$DT'FLD-$DXTMS,<MDERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<MDERR FLD,ASCII type field illegal>

	IFLE	$DL'FLD,<MDERR FLD,Field length too small>
	IFG	$DL'FLD-2,<MDERR FLD,Field too large>

	IFE	$DT'FLD-$DXTBN,<
		IFE	$DL'FLD-1,<MOVX  AC,<VAL>>
		IFE	$DL'FLD-2,<DMOVE AC,[EXP 0,<VAL>]> >

	IFE	$DT'FLD-$DXTCN,<MOVX AC,<VAL>>

	IFE	$DT'FLD-$DXTFL,<
		..FF(<VAL>)
		IFE	$DL'FLD-1,<MOVX  AC,<..F0>>
		IFE	$DL'FLD-2,<DMOVE AC,[EXP <..F0>,<..F1>]> >

	IFE	$DT'FLD-$DXT8I,<MDERR FLD,Image type field illegal>

	IFE	$DT'FLD-$DXTMN,<
		..FM(<VAL>)
		IFE	$DL'FLD-1,<MOVX  AC,<..F0>>
		IFE	$DL'FLD-2,<DMOVE AC,[EXP <..F0>,<..F1>]> >

	IFE	$DT'FLD-$DXTDT,<MOVX AC,<VAL>>

> ;END MOVDII MACRO DEFINITION



DEFINE	MDERR(NAM,STR),<PRINTX ? Error in MOVDxx macro for NAM: STR>
;FJUMPE  --  JUMP IF ALL FLAGS ZERO
;FJUMPN  --  JUNP IF NOT ALL FLAGS ZERO
;Call is:
;
;	jump	<ac>,<fld>,<adr>
;
;Where <ac> is the register which contains the named field (either
;flags or menu); <fld> is the generic field name contained in <ac>;
;and <adr> is the resultant jump address.
;
;NOTE:	The jump macros can not be skipped!

DEFINE	FJUMPE(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<JMERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<JMERR FLD,ASCII type field illegal>
	IFE	$DT'FLD-$DXTBN,<JMERR FLD,Binary type field illegal>
	IFE	$DT'FLD-$DXTCN,<JMERR FLD,Compressed binary type field illegal>
	IFE	$DT'FLD-$DXT8I,<JMERR FLD,Image type field illegal>
	IFE	$DT'FLD-$DXTDT,<JMERR FLD,Date/time type field illegal>

	IFG	$DL'FLD-2,<JMERR FLD,Field too large>

	IFE	$DL'FLD-1,<	JUMPE AC,ADR>
	IFE	$DL'FLD-2,<	CAIN AC,0
				JUMPE AC+1,ADR>

> ;END FJUMPE MACRO DEFINITION



DEFINE	FJUMPN(AC,FLD,ADR),<

	IFE	$DT'FLD-$DXTMS,<JMERR FLD,Message type field illegal>
	IFE	$DT'FLD-$DXTAS,<JMERR FLD,ASCII type field illegal>
	IFE	$DT'FLD-$DXTBN,<JMERR FLD,Binary type field illegal>
	IFE	$DT'FLD-$DXTCN,<JMERR FLD,Compressed binary type field illegal>
	IFE	$DT'FLD-$DXT8I,<JMERR FLD,Image type field illegal>
	IFE	$DT'FLD-$DXTDT,<JMERR FLD,Date/time type field illegal>

	IFG	$DL'FLD-2,<JMERR FLD,Field too large>

	IFE	$DL'FLD-1,<	JUMPN AC,ADR>
	IFE	$DL'FLD-2,<	JUMPN AC,ADR
				JUMPN AC+1,ADR>

> ;END FJUMPN MACRO DEFINITION



DEFINE	JMERR(NAM,STR),<PRINTX ? Error in FJUMPx macro for NAM: STR>
;TFO  --  TEST DAP FLAG, SET TO ONE
;TFZ  --  TEST DAP FLAG, SET TO ZERO
;TFNE  --  TEST DAP FLAG, NO MODIFICATION, SKIP IF EQUAL
;TFNN  --  TEST DAP FLAG, NO MODIFICATION, SKIP IF NOT EQUAL
;TFOE  --  TEST DAP FLAG, SET TO ONE, SKIP IF EQUAL
;TFON  --  TEST DAP FLAG, SET TO ONE, SKIP IF NOT EQUAL
;TFZE  --  TEST DAP FLAG, SET TO ZERO, SKIP IF EQUAL
;TFZN  --  TEST DAP FLAG, SET TO ZERO, SKIP IF NOT EQUAL
;Call is:
;
;	TFxx	<ac>,<flg>
;
;Where <ac> is the register which holds the flag (note that some
;flag fields are actually two words long!); and <flg> is the DAP
;field flag to be tested (multiple flags can be specified by
;enclosing the <flg> field in brackets and separating the several
;individual flags with commas). All flags are referenced by their
;defined three-letter mnemonic a la the XF macros in the DAP def-
;inition.

DEFINE	TFO(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXO  AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXO  AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXO  AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXOA AC,<..F0>	;;FIRST- AND SECOND-WORD BITS
			    CAIA
			    TXO  AC,<..F1>>>

> ;END TFO MACRO DEFINITION



DEFINE	TFZ(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZ  AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZ  AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZ  AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXZA AC,<..F0>	;;FIRST- AND SECOND-WORD BITS
			    CAIA
			    TXZ  AC,<..F1>>>

> ;END TFZ MACRO DEFINITION
DEFINE	TFNE(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXNE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXNE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXNE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXNE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXNE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TFNE MACRO DEFINITION



DEFINE	TFNN(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXNN AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXNN AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXNN AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXNN AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXNE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TFNN MACRO DEFINITION
DEFINE	TFOE(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXOE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXOE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXOE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXOE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXOE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TFOE MACRO DEFINITION



DEFINE	TFON(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXON AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXON AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXON AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXON AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXOE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TFON MACRO DEFINITION
DEFINE	TFZE(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXZE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXZE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TFZE MACRO DEFINITION



DEFINE	TFZN(AC,FLG),<

	..FF(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZN AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZN AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZN AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXZN AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXZE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TFZN MACRO DEFINITION
;TMO  --  TEST MENU FLAG, SET TO ONE
;TMZ  --  TEST MENU FLAG, SET TO ZERO
;TMNE  --  TEST MENU FLAG, NO MODIFICATION, SKIP IF EQUAL
;TMNN  --  TEST MENU FLAG, NO MODIFICATION, SKIP IF NOT EQUAL
;TMOE  --  TEST MENU FLAG, SET TO ONE, SKIP IF EQUAL
;TMON  --  TEST MENU FLAG, SET TO ONE, SKIP IF NOT EQUAL
;TMZE  --  TEST MENU FLAG, SET TO ZERO, SKIP IF EQUAL
;TMZN  --  TEST MENU FLAG, SET TO ZERO, SKIP IF NOT EQUAL
;Call is:
;
;	TMxx	<ac>,<flg>
;
;Where <ac> is the register which holds the flag (note that some
;flag fields are actually two words long!); and <flg> is the DAP
;menu flag to be tested (multiple flags can be specified by
;enclosing the <flg> field in brackets and separating the several
;individual flags with commas). All menu flags are referenced by
;their defined three-letter field mnemonic a la the XD macros in
;the DAP definition.

DEFINE	TMO(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXO  AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXO  AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXO  AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXOA AC,<..F0>	;;FIRST- AND SECOND-WORD BITS
			    CAIA
			    TXO  AC,<..F1>>>

> ;END TMO MACRO DEFINITION



DEFINE	TMZ(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZ  AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZ  AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZ  AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXZA AC,<..F0>	;;FIRST- AND SECOND-WORD BITS
			    CAIA
			    TXZ  AC,<..F1>>>

> ;END TMZ MACRO DEFINITION
DEFINE	TMNE(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXNE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXNE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXNE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXNE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXNE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TMNE MACRO DEFINITION



DEFINE	TMNN(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXNN AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXNN AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXNN AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXNN AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXNE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TMNN MACRO DEFINITION
DEFINE	TMOE(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXOE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXOE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXOE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXOE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXOE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TMOE MACRO DEFINITION



DEFINE	TMON(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXON AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXON AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXON AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXON AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXOE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TMON MACRO DEFINITION
DEFINE	TMZE(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZE AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZE AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZE AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<TXZE AC,<..F0>	;;FIRST-WORD BITS
			    CAIA		;;NON-SKIP
			    TXZE AC+1,<..F1>>>	;;SECOND-WORD BITS

> ;END TMZE MACRO DEFINITION



DEFINE	TMZN(AC,FLG),<

	..FM(<FLG>)		;;BUILD BIT MASKS

	IFE ..F0,<IFE ..F1,<TXZN AC,0>>		;;NO FLAG BITS!
	IFN ..F0,<IFE ..F1,<TXZN AC,<..F0>>>	;;FIRST-WORD BITS ONLY
	IFE ..F0,<IFN ..F1,<TXZN AC+1,<..F1>>>	;;SECOND-WORD BITS ONLY
	IFN ..F0,<IFN ..F1,<CAIA		;;FIRST- AND SECOND-WORD BITS
			    JRST .+4		;;NON-SKIP
			    TXZN AC,<..F0>	;;CHECK FIRST-WORD BITS
			    TXZE AC,<..F1>	;; AND SECOND-WORD BITS
			    CAIA>>		;;SOME BIT SET - SKIP

> ;END TMZN MACRO DEFINITION
;HELPER MACRO TO RETURN FLAGS AS IMMEDIATE VALUE

;RETURNS FIRST WORD ONLY (THIS IS A KROCK IN THAT IT DEPENDS ON THE
;"OBSERVATION" THAT MOST DAP FLAGS FIT IN THE FIRST WORD, BUT IT SIMPLIFIES
;A LOT OF CODE, SO . . .)

DEFINE	DPFLG1(FLG),<

	..FF(<FLG>)		;;BUILD THE BIT MASKS

	IFN	..F1,<PRINTX ? Second-word flags in DPFLG1 (FLG)>
	<..F0>>



;SLAVE MACROS TO T?XX ABOVE

DEFINE	..FF(FLG),<

	..F0==0			;;INITIALIZE FIRST-WORD BIT MASK
	..F1==0			;;INITIALIZE SECOND-WORD BIT MASK

	IRP	FLG,<..FN(\<DF$'FLG/^D35>,<DF$'FLG-<<DF$'FLG/^D35>*^D35>>)>>


DEFINE	..FM(FLG),<

	..F0==0			;;INITIALIZE FIRST-WORD BIT MASK
	..F1==0			;;INITIALIZE SECOND-WORD BIT MASK

	IRP	FLG,<..FN(\<DM$'FLG/^D35>,<DM$'FLG-<<DM$'FLG/^D35>*^D35>>)>>



DEFINE	..FN(WRD,BIT),<..F'WRD==..F'WRD!1B<BIT>>
;NOW, TRY OUR LUCK AT BUILDING ALL THIS STUFF

;FIRST, DEFINE ALL RELEVANT DAP SYMBOLOGY

	DODAP(DEF)
	SUBTTL	Macros to build ASCIZ tables descr. DAP Flag and Value fields

$TRACE <

DEFINE	..ADR(XDI),< $FV'XDI==. >	     ;;SYMBOL TO REMEMBER CURRENT LOC

DEFINE	..FLG(XDI,DIT),< $FL'XDI==^D<DIT> >  ;;SYMBOL TO REMEMBER FLAG BIT

DEFINE	..LEN(XDI),< $VL'XDI==..XVC >	     ;;SYMBOL TO REMEMBER NO. VALUES

DEFINE	FVMSG,<

;;Generate DAP messages corresponding to flag and value fields


DEFINE	XM(NAM,COD,TXT),<

	IFE	^D<COD>,<..XDI==-1>	;;INITIALIZE GLOBAL INDEX

	..XDI==..XDI+1          	;;BUMP GLOBAL INDEX

> ;;END XM MACRO DEFINITION

DEFINE	XD(NAM,NNT,DFL,TXT),< ..XDI==..XDI+1    ;;BUMP GLOBAL INDEX
                              ..FST==0>         ;;FLAG NEXT XF OR XV 1ST AFTER THIS XD

DEFINE	XDE(NAM,NNT,DFL,TXT),<..XDI==..XDI+1	;;BUMP GLOBAL INDEX
			      ..FST==0>		;;FLAG NEXT XF OR XV 1ST AFTER THIS XDE

DEFINE	XDS(NAM,NNT,DFL,TXT),<..XDI==..XDI+1>   ;;BUMP GLOBAL INDEX

DEFINE	XF(NAM,DIT,TXT),< IFE ..FST,< ..FST==-1	      ;;IF 1ST FLAG IN DAP FIELD
                                      ..ADR(\..XDI) > ;; REMEMBER LOC COUNTER
			  EXP [ASCIZ \TXT\]	      ;;DESCRIBE FLAG
			  ..FLG(\..XDI,DIT)>	      ;;REMEMBER FLAG BIT

DEFINE	XV(NAM,VAL,TXT),< IFE ..FST,< ..FST==-1	      ;;IF 1ST VALUE IN DAP FIELD
				      ..XVC==0	      ;; ZERO COUNT OF VALUES
                                      ..ADR(\..XDI) > ;; REMEMBER LOC COUNTER
			  XWD ^D<VAL>,[ASCIZ \TXT\]   ;;DESCRIBE VALUE
			  ..XVC==..XVC+1	      ;;COUNT VALUES FOR FIELD
			  ..LEN(\..XDI)>	      ;;REMEMBER NO. OF VALUES

DEFINE	XS(NAM,STS,TXT),<>

	DAP					;;BUILD MESSAGE TABLE

> ;;END FVMSG MACRO DEFINITION
> ;END $TRACE
$TRACE <

DEFINE	..PTR(XDI),<

 IFDEF  $FV'XDI,< IFDEF  $VL'XDI,< XWD -$VL'XDI,$FV'XDI >   ;;AOBJN FOR VALUES & TEXT PTR
		  IFDEF  $FL'XDI,< XWD  $FL'XDI,$FV'XDI > > ;;MAX FLAG BIT & TEXT PTR
 IFNDEF $FV'XDI,< EXP 0> >	    ;;OTHERWISE ZERO


DEFINE	FVIDX,<

;;Generate table pointing to messages corresponding to flag and value fields
;;This table is parallel to the DAPXCT table

DEFINE	XM(NAM,COD,TXT),<

	IFE	^D<COD>,<..XDI==-1>	;;INITIALIZE GLOBAL INDEX

	..XDI==..XDI+1          	;;BUMP GLOBAL INDEX
	EXP 0

> ;;END XM MACRO DEFINITION

DEFINE	XD(NAM,NNT,DFL,TXT),<..XDI==..XDI+1	;;BUMP GLOBAL INDEX
			     ..PTR(\..XDI) >	;;ADDR. 1ST MSG OR ZERO

DEFINE	XDE(NAM,NNT,DFL,TXT),<..XDI==..XDI+1	;;BUMP GLOBAL INDEX
			      ..PTR(\..XDI) >	;;ADDR. 1ST MSG OR ZERO

DEFINE	XDS(NAM,NNT,DFL,TXT),<..XDI==..XDI+1	;;BUMP GLOBAL INDEX
			EXP 0 >		        ;;FILL WITH ZEROES TO
			      		        ;;BE PARALLEL WITH DAPXCT

DEFINE	XF(NAM,DIT,TXT),<>
DEFINE	XV(NAM,VAL,TXT),<>
DEFINE	XS(NAM,STS,TXT),<>

	DAP					;;BUILD POINTERS TO MESSAGES

> ;;END FVIDX MACRO DEFINITION
> ;END $TRACE
	SUBTTL	Block storage macro definitions

DEFINE	X0(SYM,SIZ<1>),<

	IF1,<IFDEF SYM,<PRINTX ? Multiply-defined block offset SYM>>

	..XXO==0		;;RESET BLOCK OFFSET
	..XXB==<..XXBM==0>	;;RESET BIT INDEX/MASK

	SYM==<<..XXO==..XXO+<SIZ>>-<SIZ>> > ;;END OF X0 MACRO

DEFINE	X(SYM,SIZ<1>),<

	IF1,<IFDEF SYM,<PRINTX ? Multiply-defined block offset SYM>>

	..XXB==<..XXBM==0>	;;RESET BIT INDEX/MASK

	SYM==<<..XXO==..XXO+<SIZ>>-<SIZ>> > ;;END OF X MACRO

DEFINE	XB(SYM,WID<1>,RBT),<

	IF1,<IFDEF SYM,<PRINTX ? Multiply-defined bit field SYM>>

	IFB	<RBT>,<
		..XXRB==<..XXB==..XXB+WID>
		IFG ..XXRB-^D36,<PRINTX ? Bit field SYM exceeds 36 bits>>
	IFNB	<RBT>,<..XXRB==RBT+1>

	..XXBS==<<-1_-<^D36-WID>>B<..XXRB-1>>

	IFN	..XXBM&..XXBS,<PRINTX ? Bit fields overlap for SYM>

	..XXBM==..XXBM!..XXBS
	SYM==..XXBS	> ;;END OF XB MACRO

DEFINE	XC(SYM,VAL),<

	IF1,<IFDEF SYM,<PRINTX ? Multiply-defined value SYM>>

	SYM==VAL	> ;;END OF XC MACRO
	SUBTTL	I/O Channel Data Block definitions

;The I/O Channel Data Block contains all the information pertinent
;to an I/O stream, whether local or network based.
;
;All of the I/O routines in NIP are "channel independent" and use the
;I/O CDB

X0	.IOCCF		;I/O CHANNEL CONTROL FLAGS
  XB	IO.INI		;CDB CHANNEL INITIALIZED AND ACTIVE
			; IF NOT SET THE CDB CONTAINS NO VALID
			; INFORMATION (.IOSIZ & .IOXSZ EXCEPTED)
  XB	IO.NET		;CHANNEL IS NETWORK I/O (DATA PROTOCOLS)
  XB	IO.ANF		;NETWORK IS ANF-PROTOCOL
  XB	IO.DCN		;NETWORK IS DECNET-PROTOCOL
  XB	IO.NEP		;CHANNEL IS NETWORK "PASSIVE"
  XB	IO.SLV		;CHANNEL IS FAL SLAVE CHANNEL
  XB	IO.OND		;CHANNEL IS OPEN FOR DAP LINK ONLY (NO FILE STUFF)
  XB	IO.DAP		;NETWORK PROTOCOL IS DECNET DAP
  XB	IO.DCC		;DAP CONTROL(CONNECT) SENT/RECEIVED
			; (I.E., DAP I/O STREAM "ACTIVE")
  XB	IO.NBA		;NETWORK BUFFER(S) IS(ARE) ALLOCATED
  XB	IO.DEV		;DEVICE IS ALLOCATED/INITIALIZED FOR I/O
  XB	IO.IBA		;INPUT BUFFER(S) IS(ARE) ALLOCATED
  XB	IO.OBA		;OUTPUT BUFFER(S) IS(ARE) ALLOCATED
  XB	IO.OPN		;FILE IS "OPEN" FOR DATA I/O
  XB	IO.INP		;FILE IS OPEN FOR INPUT
  XB	IO.OUT		;FILE IS OPEN FOR OUTPUT
  XB	IO.RND		;FILE IS OPEN FOR RANDOM ACCESS
  XB	IO.IOA		;FILE IS I/O ACTIVE (I/O INITIALIZED)
  XB	IO.NBT		;NON-BLOCKING NETWORK INPUT (TEMP)
  XB	IO.ENM		;END NETWORK MESSAGE
  XB	IO.LKN		;.LKWLD PASSED TO .LKWLN (USED BY .IOPIN)
  XB	IO.YAF		;YET ANOTHER FILE COMING FROM DAP STREAM
  XB	IO.YAE		;YET ANOTHER FILE (ERROR) COMING (SEE OPIR)
  XB	IO.YAS		;YET ANOTHER SILLY BIT (FILE ERROR SYNC IN OPIR)
  XB	IO.NCK		;NO (BYPASS) FILE CLOSE CHECKSUM (FOR DAP)
  XB	IO.SID		;[1045] SEND CONTINUE MESSAGE AS INTERRUPT DATA
  XB	IO.APP		;[1057] 'INPUT' FILE OPEN IN APPEND MODE

	IO.CNC==IO.DCC					;CLEAR ON NET CLOSE
	IO.CNR==IO.CNC!IO.NET!IO.NEP!IO.DAP		;CLEAR ON NET RELEASE
	       IO.CNR==IO.CNR!IO.ANF!IO.DCN!IO.ENM	;...
	       IO.CNR==IO.CNR!IO.LKN!IO.YAF!IO.YAE	;...
	       IO.CNR==IO.CNR!IO.YAS			;...
	IO.CFC==IO.OPN!IO.INP!IO.OUT!IO.RND!IO.IOA	;CLEAR ON FILE CLOSE
	       IO.CFC==IO.CFC!IO.NCK!IO.APP		;...
	IO.CFR==IO.CFC!IO.DEV				;CLEAR ON FILE RELEASE
	SUBTTL	I/O CDB - Global data

X	.IOCVR		;CDB VERSION (PROTOCOL FORMAT)
X	.IOSIZ		;SIZE OF CDB
X	.IOXSZ		;"EXTRA" SIZE (FOR BUFFERS, ETC.) AT END OF CDB
X	.IOXFF		;"FIRST FREE" IN "EXTRA" SPACE

X	.IOBZI,0	;BEGINING OF INITIALLY ZEROED I/O CDB AREA
			; (ZEROED BY IOINI)

X	.IOCHN		;I/O CHANNEL NUMBER FOR THIS CDB
X	.IOSCH		;SCHEDULER ADDRESS (FOR NON-BLOCKING I/O)

X	.IODBF		;DEFAULT <MAX BUFFERS,,MAX TOTAL SPACE>
X	.IOMBF		;.GT. 0 THEN ABSOLUTE MAXIMUM BUFFER SPACE
X	.IOPBF		;PREFERRED BUFFERING <COUNT,,BUFFER SIZE>
X	.IOUBF		;USER-SPECIFIED <COUNT,,BUFFER SIZE>

X	.IODBS		;DEFAULT <DATA,,FRAME> BYTE SIZE
X	.IOUBS		;USER-SPECIFIED <DATA,,FRAME> BYTE SIZE
	SUBTTL	I/O CDB - File control

X	.IOIOC		;FILE I/O CONTROL (RECORD STRUCTURE, ETC.)
  XB	IC.BYT		;OPEN FOR BYTE-MODE I/O
  XB	IC.BLK		;OPEN FOR BLOCK-MODE
  XB	IC.DMP		;OPEN FOR DUMP-MODE I/O
  XB	IC.RSI		;OPEN FOR RECORD-STRUCTURED I/O (RESERVED)
  XB	IC.RND		;OPEN FOR RANDOM ACCESS I/O
  XB	IC.LSN		;RETURN LSN (INPUT)/GENERATE LSN (OUTPUT)
  XB	IC.NLC		;RETURN NULLS AS VALID ASCII CHARACTER
  XB	IC.CCC		;COBOL CARRIAGE CONTROL
  XB	IC.FCC		;FORTRAN CARRIAGE CONTROL
  XB	IC.MCY		;MACY11-STYLE BYTES PACKED INTO 36-BIT FRAMES
  XB	IC.MEY		;MACY11-STYLE, "EVENED" OUT TO WORD ALIGNMENT
  XB	IC.RFM,6,^D29	;RECORD FORMAT
    XC	.ICRFU,$DVFNR	;UNDEFINED (READ "NONE")
    XC	.ICRFX,$DVFFX	;FIXED LENGTH RECORDS
    XC	.ICRFV,$DVFVR	;VARIABLE LENGTH RECORDS
    XC	.ICRFF,$DVFVF	;VARIABLE LENGTH RECORDS WITH FIXED LENGTH HEADER
    XC	.ICRF3,17	;SPECIAL /36PACK "FORMATTING" (NOT DAP-LEGAL)
  XB	IC.MOD,6,^D35	;FILE DATA ACCESS MODE
    XC	.ICDEF,0	;NONE SPECIFIED, DEFAULT, ASCII
    XC	.ICASC,1	;ASCII, 7-BIT BYTES
    XC	.ICAS8,2	;ASCII, 8-BIT BYTES
    XC	.ICEBC,3	;EBCDIC, 8-BIT BYTES
    XC	.ICPIM,4	;PACKED IMAGE (TOPS-10 ONLY), 8-BIT BYTES
    XC	.ICIMG,5	;IMAGE, 36-BIT BYTES
    XC	.ICBYT,6	;BINARY, 8-BIT BYTES
    XC	.ICBIN,7	;BINARY, 36-BIT BYTES
    XC	.ICMAX,7	;MAXIMUM FILE MODE
X	.IOIOE		;I/O ERROR CONTROL FLAGS
  XB	IE.EAB		;ABORT I/O STREAM ON I/O ERROR
  XB	IE.MAB		;ISSUE ERROR MESSAGE ON I/O ERROR
  XB	IE.EIG		;IGNORE (SKIP) I/O ERROR
  XB	IE.MIG		;ISSUE WARNING MESSAGE ON I/O ERROR
X	.IOIOM		;FILE I/O MODE
  XB	IM.PHS		;PHYSICAL ONLY DEVICE SPECIFICATION
  XB	IM.DEL		;DISABLE ERROR LOGGING
  XB	IM.DER		;DISABLE ERROR RETRY
  XB	IM.AIO		;ASYNCHRONOUS (NON-BLOCKING) I/O
  XB	IM.DSO		;DISK-DEVICES ONLY
  XB	IM.SIO		;SUPER I/O (BYPASS NORMAL FILE SYSTEM)
  XB	IM.LBF		;USE GENEROUS BUFFER SIZE
  XB	IM.SBO		;SUPPRESS BUFFER ALLOCATION AT OPEN TIME
  XB	IM.CTG		;CONTIGUOUS ALLOCATION REQUIRED
  XB	IM.CBT		;CONTIGUOUS BEST TRY
  XB	IM.CIF		;CONCATENATE INPUT FILES (AUTO WILD INPUT)
  XB	IM.CMD		;.IOIOC MODE OVERIDES ALL OTHERS
  XB	IM.SMD		;SELECT MODE BASED ON FILE FROM OPEN
  XB	IM.MFA		;MAINTAIN FILE ALLOCATION (ON CLOSE)
  XB	IM.SAD		;SUPPRESS ACCESS DATE UPDATE (ON CLOSE)
  XB	IM.ZOD		;ZERO DATA ON DELETE (SENSITIVE DATA)
  XB	IM.CSU		;SUBMIT ON CLOSE
  XB	IM.CPR		;PRINT ON CLOSE
  XB	IM.CDL		;DELETE ON CLOSE
  XB	IM.DQA		;DISABLE CALLS TO .IOQAT ALWAYS
  XB	IM.DQI		;DISABLE CALLS TO .IOQAT ON .IOPI? ONLY
  XB	IM.IQC		;.IOQAT "CONCATENATION" CALL FOR INPUT
  XB	IM.UNQ		;CREATE UNIQUE FILE NAME (TRAILING NUMERIC CHARS)
	IM.CXX==IM.CSU!IM.CPR!IM.CDL  ;ALL CLOSE OPTIONS
	SUBTTL	I/O CDB - File specification blocks, WILD blocks

;FILE-SPECIFICATION STUFF (SCAN BLOCK POINTERS, ETC.)

X	.IOSDB		;POINTER TO SCAN DATA BASE
X	.IOWDB		;POINTER TO WILD DATA BASE (.IOPIN, ETC.)

X	.IOFSB		;ADDRESS OF FIRST FILE SPEC BLOCK
X	.IOFSC		;ADDRESS OF CURRENT FILE SPEC BLOCK
X	.IOFSL		;ADDRESS OF LAST FILE SPEC BLOCK
X	.IOFSY		;ADDRESS OF LKWLN'S NETWORK'ED FILE SPEC BLOCK
X	.IOWSR		;"WILD" STATE ROUTINE

X	.IOFS3		;TERTIARY POINTER TO START OF FSB CHAIN
X	.IOCS3		;TERTIARY CURRENT START FILE SPEC BLOCK
X	.IOCU3		;TERTIARY CURRENT FILE SPEC BLOCK
X	.IOCN3		;TERTIARY CURRENT END FILE SPEC BLOCK
X	.IOLA3		;TERTIARY FINAL END FILE SPEC BLOCK (TEMP)
X	.IOWS3		;TERTIARY "WILD" STATE ROUTINE

X	.IOXTI		;BYTE POINTER USED VIA .XTYPI FOR "COMMAND" INPUT
X	.IOXTO		;BYTE POINTER USED VIA .XTYPO FOR "COMMAND" OUTPUT
;START OF WILD INTERNAL STUFF (NOT AVAILABLE TO CALLER)

;.LKWLD STUFF

X	.IOLKW,10	;ARGUMENT BLOCK FOR CALL TO .LKWLD VERSION 7
			;(00) SCAN/WILD PROTOCOL VERSION WORD
			;(01) <FIRST,,LAST> SCAN BLOCK POINTER ADR
			;(02) <OPEN,,LOOKUP> BLOCK ADDRESS
			;(03) SCAN BLOCK LENGTH,,LOOKUP LENGTH
			;(04) FLAGS!CHANNEL,,CUR SCNBLK PTR ADR
			;(05) END OF DIRECTORY RTN
			;(06) XXX
			;(07) XXX

;.SCWLD STUFF

X	.IOSCD		;ADDRESS OF "INPUT" CDB A LA IOPOU
X	.IOSCF		;SCWILD PROCESSING FLAGS (DEFAULT .FXCTL)
X	.IOSCW,10	;ARGUMENT BLOCK FOR CALL TO .SCWLD VERSION 7
			;(00) SCAN/WILD PROTOCOL VERSION WORD
			;(01) <CUR INPUT,,OUTPUT> SCNBLK PTR ADR
			;(02) <INPUT,,OUTPUT> OPEN BLK ADR
			;(03) <INPUT,,OUTPUT> FILE BLK ADR
			;(04) DEFAULT EXT ADR,,FILE BLK LEN
			;(05) ADDRESS OF SECONDARY PATH BLOCK
			;(06) ADDRESS OF DEFAULT SCWILD (.FXCTL) FLAGS
			;(07) XXX

;"ON-BEHALF-OF" INFORMATION

X	.IOPPN		;ON-BEHALF-OF PPN
X	.IOACT,10	;ON-BEHALF-OF ACCOUNT STRING

;"QUEUE" INFO (ALSO USED SORTA LIKE "ON-BEHALF-OF" BY FAL)

X	.IOQUN		;QUEUE UNIT INFO (ATTR,,UNIT NUMBER (IF ANY))
X	.IOQND		;QUEUE DESTINATION NODE (NUMBER)
X	.IOQ6N,2	;QUEUE USER NAME (SIXBIT, DOUBLE-WORD)
X	.IOQ6J		;QUEUE JOB NAME (SIXBIT, FOR QUEUE ENTRY)
	SUBTTL	I/O CDB - File Information -- Name strings

;FILE-SPECIFIC GENERIC FILE AND I/O INFORMATION

X	.IOBZR,0	;START OF TO-BE-ZEROED ON RELEASE

;FILE NAME COMPONET STRINGS
;
;	Note that these strings must not be zeroed on file CLOSE since
;	DAP will only transmit the componets that change (e.g., the device
;	is usually not sent for each file, only when it changes) . . .

X	.IOFND		;ADDRESS OF FILE NODE NAME STRING
X	.IOFDV		;ADDRESS OF FILE DEVICE NAME STRING
X	.IOFDR		;ADDRESS OF FILE DIRECTORY STRING
X	.IOFNM		;ADDRESS OF FILE NAME STRING
X	.IOFEX		;ADDRESS OF FILE TYPE (OR EXTENSION) STRING
X	.IOFGN		;ADDRESS OF FILE GENERATION STRING
;X	.IOFOW		;ADDRESS OF FILE OWNER STRING
;X	.IOFAU		;ADDRESS OF FILE AUTHOR STRING

X	.IOF3D		;ADDRESS OF TERTIARY NODE NAME STRING
X	.IOF3V		;ADDRESS OF TERTIARY DEVICE NAME STRING
X	.IOF3R		;ADDRESS OF TERTIARY DIRECTORY STRING
X	.IOF3M		;ADDRESS OF TERTIARY NAME STRING
X	.IOF3X		;ADDRESS OF TERTIARY TYPE (OR EXTENSION) STRING
X	.IOF3N		;ADDRESS OF TERTIARY GENERATION STRING
;X	.IOF3W		;ADDRESS OF TERTIARY OWNER STRING
;X	.IOF3U		;ADDRESS OF TERTIARY AUTHOR STRING

X	.IOFGI		;FILE GENERATION INTEGER
	SUBTTL	I/O CDB - File Information -- File attributes and parameters

X	.IOBZC,0	;START OF TO-BE-ZEROED ON CLOSE

X	.IOCCI		;I/O CONTROL FLAGS (INTERNAL USE ONLY)

X	.IOFOP		;FILE OPERATION BEING PERFORMED
  XC	.IFFND,0	;FIND A FILE (NO I/O)
  XC	.IFRED,1	;READ FILE
  XC	.IFWRT,2	;WRITE FILE
  XC	.IFAPP,3	;APPEND FILE
  XC	.IFSAU,4	;UPDATE FILE (SINGLE-ACCESS)
  XC	.IFMAU,5	;UPDATE FILE (MULTI-ACCESS)
  XC	.IFDLT,6	;DELETE OPEN FILE
  XC	.IFRNM,7	;RENAME OPEN FILE
  XC	.IFMAX,7	;MAXIMUM FILE OPERATION
X	.IOCKS		;FILE DATA CHECKSUM
X	.IODTY		;FILE/DEVICE TYPE
X	.IODCH		;FILE/DEVICE CHARACTERISTICS
  XB	IC.NUL		;DEVICE IS NUL:
  XB	IC.SQD		;DEVICE IS SEQUENTIAL BLOCK (E.G., MTA:)
  XB	IC.SDI		;DEVICE IS SINGLE DIRECTORY(E.G., DTA:)
  XB	IC.MDI		;DEVICE IS MULTIPLE DIRECTORY (E.G., DSK:)
  XB	IC.TRM		;DEVICE IS COMMAND TERMINAL (TTY:)
  XB	IC.CCL		;DEVICE USES CARRIAGE CONTROL
  XB	IC.REC		;DEVICE IS RECORD ORIENTED
  XB	IC.IDV		;DEVICE CAN PERFORM INPUT
  XB	IC.ODV		;DEVICE CAN PERFORM OUTPUT
  XB	IC.RAD		;DEVICE CAN DO RANDOM ACCESS
  XB	IC.ALL		;DEVICE IS ALLOCATED
  XB	IC.MNT		;DEVICE IS MOUNTED
  XB	IC.DMT		;DEVICE IS MARKED FOR DISMOUNT
  XB	IC.SPL		;DEVICE IS SPOOLED
  XB	IC.DSH		;DEVICE IS BEING SHARED
  XB	IC.FOD		;DEVICE IS FILE ORIENTED
  XB	IC.RTM		;DEVICE IS REAL-TIME IN NATURE
  XB	IC.MBX		;DEVICE IS A MAILBOX
  XB	IC.ELG		;DEVICE ERROR LOGGING IS ENABLED
  XB	IC.AVL		;DEVICE IS AVAILABLE
  XB	IC.SWL		;DEVICE IS SOFTWARE WRITE-LOCKED
  XB	IC.GDV		;DEVICE SPECIFICATION IS GENERIC
  XB	IC.NDV		;DEVICE IS NETWORK-BASED
  XB	IC.FRN		;DEVICE IS FOREIGN
  XB	IC.DWC		;DEVICE IS WRITE-CHECK ENABLED
  XB	IC.DRC		;DEVICE IS READ-CHECK ENABLED
  XB	IC.CTG		;FILE IS CONTIGUOUSLY ALLOCATED

X	.IOBSZ		;LOGICAL DATA BYTE SIZE (BITS)
X	.IOFSZ		;PHYSICAL FRAME SIZE CONTAINING DATA BYTE
X	.IORSZ		;FILE/DEVICE RECORD SIZE (DATA BYTES)
X	.IOBLS		;FILE/DEVICE BLOCKSIZE (DATA BYTES)
X	.IOBLW		;FILE/DEVICE BLOCKSIZE (36-BIT WORDS)
X	.IOBLC		;COUNT OF BUFFERS (OF SIZE .IOBLS)
X	.IOBPA,0	;BEGINNING OF FILE PARAMETERS AREA (FOR DIRECT COPY)

X	.IOLNW		;FILE LENGTH (-10 WORDS)
X	.IOLNB		;FILE LENGTH (LOGICAL DATA BYTES)
X	.IOALW		;FILE ALLOCATION (-10 WORDS)
X	.IOALB		;FILE ALLOCATION (LOGICAL DATA BYTES)
X	.IOLSW		;LAST WORD IN FILE
X	.IOLSB		;LAST LOGICAL DATA BYTE IN FILE
X	.IOCDT		;LOGICAL DATA CREATION DATE/TIME
X	.IOADT		;LAST ACCESS DATE/TIME
X	.IOEDT		;EXPIRATION DATE/TIME
X	.IOPDT		;PHYSICAL MEDIA CREATION DATE/TIME
X	.IOBDT		;BACKUP DATE/TIME
X	.IOUDT		;LAST UPDATE DATE/TIME
X	.IOPRT		;FILE PROTECTION (INTEGER)
			; (RH ONLY, LH CAN BE USED AS FLAG TO FORCE A
			;  ZERO PROTECTION TO BE PASSED THROUGH)
X	.IOVER		;FILE VERSION (E.G., FOR .EXE FILE)

X	.IOEPA,0	;END (+1) OF FILE PARAMETERS AREA

X	.IOECT		;I/O ERROR COUNTER
X	.IOQCT		;COUNT OF .IOQAT CALLS (FOR ERR MSG PRINTOUT)

X	.IOEZC,0	;END (+1) OF TO-BE-CLEARED ON CLOSE

X	.IOERR,2	;ERROR CODE FOR LAST ERROR
			; (+1 ADDRESS OF ERROR CALLER, SEE .ERPIN, ETC)
X	.IOER2		;SECONDARY ERROR INFORMATION (ERROR-DEPENDENT)
			; E.G., USED AS "SUBSTATE" FOR $EINLA ERRORS
X	.IOER3		;TERTIARY ERROR INFORMATION (ERROR-DEPENDENT)
			; E.G., CONTAINS TSK. I/O STATUS FOR $EINLA ERRORS
	SUBTTL	I/O CDB - I/O control

;THE INPUT SIDE OF THE I/O CDB

X	.IOISR,2	;INPUT SERVICE ROUTINE
			; (+1 IS EOF RECOVERY)
X	.IOISS		;INPUT SERVICE SHUTDOWN DISPATCH
X	.IOISF		;INPUT SERVICE FLAGS WORD
  XB	IS.ICL		;IMPLIED <CR><LF> AT END OF RECORD
  XB	IS.ICR		;NEED A <CR> CHARACTER
  XB	IS.ILF		;NEED A <LF> CHARACTER
  XB	IS.INL		;NEED N <LF> CHARACTERS (COUNT IN IS.IXX BYTE)
  XB	IS.IVC		;LAST CARRIAGE-CONTROL WAS CARRIAGE RETURN
  XB	IS.IVI		;VAX PRINT-FILE FORMATTING INITIALIZED
			; (SUPPRESS LEADING <LF>, GENERATE TRAILING <LF>)
  XB	IS.IXX,8	;NEED A SPECIAL CHARACTER (THE IS.IXX BYTE)
  XB	IS.MCF		;NEED MACY11 INTER-RECORD FILLER
  XB	IS.MCK		;NEED TO OUTPUT MACY11 CHECKSUM BYTE
  XB	IS.ICE		;IS.ICR WAS SET AT BEGINING OF CURRENT RECORD.
X	.IOISH		;INPUT SERVICE FIXED HEADER (ISR DEPENDENT)
X	.IOIS0		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)
X	.IOIS1		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)
X	.IOIS2		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)
X	.IOIS3		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)
X	.IOIS4		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)
X	.IOIS5		;INPUT SERVICE ROUTINE SCRATCH (ISR DEPENDENT)

X	.IOIUC		;INPUT BUFFERS COUNT (NUMBER OF IN UUOS)

X	.IOIAC		;INPUT BUFFER ALLOCATION (CNT,,SIZ)
X	.IOIAD		;INPUT BUFFER BASE ADDRESS
X	.IOIBH,0	;INPUT BUFFER RING HEADER CONTROL BLOCK
X	.IOIBA		; INPUT BUFFER ADDRESS
X	.IOIBP		; INPUT BUFFER BYTE POINTER
X	.IOIBC		; INPUT BUFFER BYTE COUNTER
;THE OUTPUT SIDE OF THE I/O CDB

X	.IOOSR,2	;OUTPUT SERVICE ROUTINE
X	.IOOSS		;OUTPUT SERVICE SHUTDOWN DISPATCH
X	.IOOSF		;OUTPUT SERVICE FLAGS
X	.IOOSH		;OUTPUT SERVICE RECORD HEADER (OSR DEPENDENT)
X	.IOOS0		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)
X	.IOOS1		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)
X	.IOOS2		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)
X	.IOOS3		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)
X	.IOOS4		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)
X	.IOOS5		;OUTPUT SERVICE ROUTINE SCRATCH (OSR DEPENDENT)

X	.IOOUC		;OUTPUT BUFFERS WRITTEN (NUMBER OF OUT UUOS)

X	.IOOAC		;OUTPUT BUFFER ALLOCATION (CNT,,SIZ)
X	.IOOAD		;OUTPUT BUFFER BASE ADDRESS
X	.IOOBH,0	;OUTPUT BUFFER RING HEADER CONTROL BLOCK
X	.IOOBA		; OUTPUT BUFFER ADDRESS
X	.IOOBP		; OUTPUT BUFFER BYTE POINTER
X	.IOOBC		; OUTPUT BUFFER BYTE COUNTER

X	.IOEZR,0	;END (+1) OF TO-BE-CLEARED ON RELEASE
	SUBTTL	I/O CDB - TOPS-10 interface

;TOPS-10 OPERATING-SYSTEM-SPECIFIC AREAS

X	.IOB10,0	;START OF TOPS-10 BLOCK(S)

 X	.I1BFD,0	;START OF TOPS-10 FILE DATA
 X	.I1NOD		;NODE NAME (PRETTY MUCH A TEMP)
 X	.I1FLP,.FOMAX	;FILOP. BLOCK
	.I1OPN==.I1FLP+.FOIOS	;OPEN BLOCK
 X	.I1PTH,.PTMAX	;PATH BLOCK
 X	.I1PT2,.PTMAX	;SECOND (RETURNED) PATH BLOCK
 X	.I1LKP,.RBMAX	;LOOKUP BLOCK
 X	.I1FIO,2	;COPY OF .FOIOS/.FODEV ON LAST CALL TO OPEN FILE
 X	.I1DEV		;REAL DEVICE NAME
 X	.I1GEN		;FILE GENERATION NUMBER
 X	.I1DCH		;DEVCHR WORD
 X	.I1DTY		;DEVTYP WORD
 X	.I1DSZ		;DEVSIZ WORD
 X	.I1IOS		;DEVIOS (I.E., GETSTS) WORD
 X	.I1FL3,.FOMAX	;TERTIARY (SECONDARY WILDCARDED) FILOP. BLOCK
	.I1OP3==.I1FL3+.FOIOS  ;  (SECONDARY WILDCARDED) OPEN BLOCK
 X	.I1PT3,.PTMAX	;TERTIARY (SECONDARY WILDCARDED) PATH BLOCK
 X	.I1LK3,.RBMAX	;TERTIARY (SECONDARY WILDCARDED) FILE BLOCK
 X	.I1GE3		;TERTIARY GENERATION
			; NOTE:	TERTIARY STUFF TIMESHARED BY QUEOP ROUTINE
 X	.I1EFD,0	;END (+1) OF TOPS-10 FILE DATA

 X	.I1NSP,.NSAA3+1	;NSP. ARG BLOCK
 X	.I1NSC,.NSCUD+1	;NSP. CONNECT BLOCK
 X	.I1NSS,.NSDPN+1	;NSP. SOURCE PROCESS DESCRIPTOR BLOCK
 X	.I1NSD,.NSDPN+1	;NSP. DESTINATION PROCESS DESCRIPTOR BLOCK
	.I1NSL==.NSAA3+1+.NSCUD+1+.NSDPN+1+.NSDPN+1  ;AGGRAGATE LENGTH
			; NOTE: NETWORK STUFF TIMESHARED BY QUEOP, FILOP, ETC.

 X	.IOE10,0	;END (+1) OF TOPS-10 STUFF
	SUBTTL	I/O CDB - TOPS-20 interface

REPEAT	0,<		;SIGH

;TOPS-20 OPERATING-SYSTEM-SPECIFIC AREAS

X	.IOB20,0	;START OF TOPS-20 BLOCK

 X	.I2BFD,0	;START OF TOPS-20 FILE DATA
 X	.I2FDB,.FBLEN+1	;GTFDB BLOCK
 X	.I2JFB,.GJATR+1	;GTJFN LONG BLOCK
 X	.I2MTB,20	;MTOPR SCRATCH BLOCK
 X	.I2EFD,0	;END (+1) OF TOPS-20 FILE DATA

 X	.IOE20,0	;END (+1) OF TOPS-20 STUFF

> ;END REPEAT 0 ;SIGH
	SUBTTL	I/O CDB - Network control

;THE NETWORK DATA
;
;"6-BIT FORMAT" REFERS TO NORMAL SIXBIT ASCII (ONE WORD MAX);
;"7-BIT FORMAT" REFERS TO NORMAL USASCII, TERMINATED BY A NULL BYTE;
;"8-BIT FORMAT" REFERS TO AN ACTUAL BYTE COUNT,,MAXIMUM WORD COUNT,
;		FOLLOWED BY "BYTE COUNT" 8-BIT BYTES.

X	.ION6M		;NODE NAME (6-BIT FORMAT)
X	.IONNM,$NTNBL	;NODE NAME (8-BIT FORMAT)
X	.IONCH		;NETWORK "CHANNEL" NUMBER
X	.IONLB		;NETWORK BUFFER SIZE IN 8-BIT BYTES
X	.IONLW		;NETWORK BUFFER SIZE IN 36-BIT WORDS
X	.IONLM		;NETWORK MESSAGE SIZE MAXIMUM IN 8-BIT BYTES
X	.IONOT		;OPERATING SYSTEM TYPE ($DVO??)

X	.IONUS,$NTSBL	;USER ID (8-BIT FORMAT)
X	.IONPW,$NTSBL	;USER PASSWORD (8-BIT FORMAT)
X	.IONAC,$NTSBL	;USER ACCOUNTING DATA (8-BIT FORMAT)
X	.IONUD,$NTSBL	;USER DATA (8-BIT FORMAT)
X	.IONCD,$NTODL	;CONNECT/DISCONNECT DATA (8-BIT FORMAT)

X	.IONSF		;SOURCE FORMAT,,OBJECT TYPE
X	.IONSP		;SOURCE "PPN"
X	.IONSN,$NTNBL	;SOURCE TASK NAME (8-BIT FORMAT)

X	.IONDF		;DESTINATION FORMAT,,OBJECT TYPE
X	.IONDP		;DESTINATION "PPN"
X	.IONDN,$NTNBL	;DESTINATION TASK NAME (8-BIT FORMAT)

X	.IONP3		;AOBJN COUNTER FOR NP3P4/NTYPO
X	.IONP4		;BYTE POINTER FOR NP3P4/NTYPO
	SUBTTL	I/O CDB - Network I/O

;NETWORK INPUT DATA

X	.IONIA		;INPUT DATA AVAILABLE (IF .NE. 0)
X	.IONIH		;INPUT BUFFER RING HEADER
X	.IONIP		;INPUT BUFFER BYTE POINTER
X	.IONIC		;INPUT BUFFER BYTE COUNTER
X	.IONIS		;INPUT BUFFER STATUS WORD (NF.EOM BIT)
X	.IONIB,2	;INPUT BUFFER ADDRESS

;NETWORK OUTPUT DATA

X	.IONOH		;OUTPUT BUFFER RING HEADER
X	.IONOP		;OUTPUT BUFFER BYTE POINTER
X	.IONOC		;OUTPUT BUFFER BYTE COUNTER
X	.IONOS		;OUTPUT BUFFER STATUS WORD
X	.IONOB,2	;OUTPUT BUFFER ADDRESS
X	.IONOX		;OUTPUT ROUTINE SCRATCH/STATE
X	.IONOY		;OUTPUT ROUTINE SCRATCH/STATE
	SUBTTL	I/O CDB - DAP control

;DAP CONTROL AND DATA

X	.IODPF		;MISCELLANEOUS DAP LOGIC FLAGS
  XB	ID.SNM		;OK TO SEGMENT NETWORK MESSAGES
X	.IODPV		;DAP PROTOCOL VERSION (BYTE (18)0(9)MAJOR(9)MINOR)

X	.IODP3		;AOBJN COUNTER FOR DP3P4/DTYPO
X	.IODP4		;BYTE POINTER FOR DP3P4/DTYPO
X	.IODTM,4	;SCRATCH AREA FOR DATE/TIME ASCIZ STRING

X	.IODFC		;DAP FILE COUNT

;DAP INPUT MESSAGE HANDLING DATA

X	.IODIM		;INPUT MESSAGE ($DH---) CURRENTLY IN EFFECT
			; 0 IF NO MESSAGE, -1,,CODE INDICATES THAT CODE
			; WAS THE LAST INPUT MESSAGE SEEN (AND HAS BEEN
			; PROCESSED)
X	.IODIC		;INPUT MESSAGE BYTE COUNT (RDBYT)
X	.IODIF		;INPUT MESSAGE HEADER FLAGS
X	.IODIS		;INPUT STREAM ID
X	.IODIB		;INPUT DATA UNUSED BIT COUNT
X	.IODIR		;INPUT DAP BYTE TO BE RE-EATEN
			; EITHER -1,,DATA OR 400000,,ERRORCODE
	.IODRL==.IODIB-.IODIM+1	;LENGTH OF SAVED BLOCK IN .IODRP
X	.IODIX		;INPUT CONTINUATION FLAG (RDBYT)
X	.IODIK		;INPUT DAP FILE DATA CRC

X	.IODRS,.IODRL	;SAVED .IODI? FROM .RDREA
X	.IODRC		;ORIGINAL .IODIC FOR VERIFICATION IN .RDREA
X	.IODRF		;INPUT MESSAGE FIELD NUMBER
X	.IODRM,2	;INPUT DAP MESSAGE MENU COUNTER/POINTER
X	.IODRX		;INPUT DAP DAPXCT INDEX

X	.IODIW		;PARTIAL INPUT DATA WORD (IRBW)
;DAP OUTPUT MESSAGE HANDLING DATA

X	.IODOM		;OUTPUT MESSAGE IN EFFECT ($DH---)
X	.IODOC		;OUTPUT MESSAGE BYTE COUNTER (XDBYT)
X	.IODOF		;OUTPUT MESSAGE HEADER FLAGS
X	.IODOS		;OUTPUT MESSAGE STREAM ID
X	.IODOB		;OUTPUT DATA UNUSED BIT COUNT
X	.IODOX		;OUTPUT CONTINUATION FLAG (XDBYT)
X	.IODOK,2	;OUTPUT DAP FILE DATA CRC
			;  (+1 USED TO HOLD COPY OF CRC IN ORBW)

X	.IODO0		;OUTPUT SAVED BYTE COUNT (FOR XDEOM)
X	.IODO1		;OUTPUT HEADER FLAGS BYTE POINTER
;X	.IODO2		;OUTPUT HEADER "STREAM" BYTE POINTER
X	.IODO3		;OUTPUT HEADER "LENGTH" BYTE POINTER
X	.IODO4		;OUTPUT HEADER "LEN256" BYTE POINTER
X	.IODO5		;OUTPUT HEADER "BITCNT" BYTE POINTER
X	.IODO9		;OUTPUT HEADER "ENDING" BYTE POINTER
			;  I.E., START OF MESSAGE DATA

X	.IODXF		;OUTPUT MESSAGE FIELD NUMBER
X	.IODXM,2	;OUTPUT DAP MESSAGE MENU COUNTER/POINTER
X	.IODXX		;OUTPUT DAP DAPXCT INDEX
X	.IODXA,2	;OUTPUT DAP MESSAGE ABORTION RESET POINTERS

;THE DAP HOLDING AREA

X	.IOBZD,0	;START OF DAP TO-BE-ZEROED REGION
X	.IODAP,$DLDAP	;DAP MESSAGE BUILDING AREA
X	.IOEZD,0	;END (+1) OF DAP TO-BE-ZEROED REGION
	SUBTTL	I/O CDB - Errata

X	.IOEZI,0	;END (+1) OF I/O CDB INITIALLY ZEROED AREA

X	.IOSND,12	;STRING FILE NODE NAME
X	.IOSDV,^D52	;STRING FILE DEVICE NAME
X	.IOSDR,^D52	;STRING FILE DIRECTORY NAME
X	.IOSNM,^D52	;STRING FILE NAME
X	.IOSEX,^D52	;STRING FILE EXTENSION/TYPE
X	.IOSGN,12	;STRING FILE GENERATION
;X	.IOSOW,12	;STRING FILE OWNER
;X	.IOSAU,12	;STRING FILE AUTHOR

X	.IOS3D,12	;TERTIARY STRING FILE NODE NAME
X	.IOS3V,^D52	;TERTIARY STRING FILE DEVICE NAME
X	.IOS3R,^D52	;TERTIARY STRING FILE DIRECTORY NAME
X	.IOS3M,^D52	;TERTIARY STRING FILE NAME
X	.IOS3X,^D52	;TERTIARY STRING FILE EXTENSION/TYPE
X	.IOS3N,12	;TERTIARY STRING FILE GENERATION
;X	.IOS3W,12	;TERTIARY STRING FILE OWNER
;X	.IOS3U,12	;TERTIARY STRING FILE AUTHOR

X	.IOMAX,0	;END (+1) OF I/O CDB
X	.IOXBZ,0	;START OF "EXTRA" SPACE FOR BUFFERS ETC.
	SUBTTL	I/O function-call definitions

.FUBVR==1		;SET BEGINING OF VARIABLE-LENGTH RECORD
.FULSN==2		;SET ASCII LINE-SEQUENCE-NUMBER
.FUIEC==3		;ATTEMPT TO I/O-ERROR CONTINUE
REPEAT	0,<

	SUBTTL	WILD input control block

;The Wild Input Control Block controls the selection of input files
;based on the File Spec Blocks returned from the command scanning
;process. Each Wild Input Control Block has only one primary-wildcarded
;spec, any others are secondary-wildcarded from the primary spec.

X0	.WDCCF		;WILD INPUT CONTROL FLAGS
  XB	WD.PR1		;PRIMARY WILD-CARD ON INPUT SPEC # 1
			; (MUST START AT BIT 0)
  XB	WD.PR2		;PRIMARY WILD-CARD ON INPUT SPEC # 2
  XB	WD.PR3		;PRIMARY WILD-CARD ON INPUT SPEC # 3
  XB	WD.PR4		;PRIMARY WILD-CARD ON INPUT SPEC # 4
  XB	WD.PR5		;PRIMARY WILD-CARD ON INPUT SPEC # 5
  XB	WD.PR6		;PRIMARY WILD-CARD ON INPUT SPEC # 6
  XB	WD.PR7		;PRIMARY WILD-CARD ON INPUT SPEC # 7
  XB	WD.PR8		;PRIMARY WILD-CARD ON INPUT SPEC # 8
	WD.PRN==WD.PR1!WD.PR2!WD.PR3!WD.PR4!WD.PR5!WD.PR6!WD.PR7!WD.PR8
  XB	WD.DAF		;RETURN DIRECTORY AS FILE AFTER FILES WITHIN DIRECTORY
  XB	WD.DBF		;RETURN DIRECTORY AS FILE BEFORE FILES WITHIN DIRECTORY
X	.WDWVR		;WCB VERSION (PROTOCOL FORMAT)
X	.WDSIZ		;SIZE OF WCB

X	.WDBZR,0	;START OF TO-BE-ZEROED AREA

X	.WDNFI		;NUMBER OF PARALLEL INPUT FILES
X	.WDNFO		;NUMBER OF PARALLEL OUTPUT FILES
X	.WDPRI		;ADDRESS OF PRIMARY INPUT WDB
X	.WDOBU		;"ON-BEHALF-OF" USER WORD
X	.WDWSR		;STATE WORD - "WILD SERVICE ROUTINE"

;THE FIRST INPUT SPEC (BY DEFAULT THE PRIMARY INPUT SPEC)

X	.W1IWF,0	;START INDEX OF FIRST INPUT WILD FILE BLOCK
X	.WDIFS		;ADDRESS OF INPUT FILE SPEC BLOCK (CHAIN)
X	.WDCST		;ADDRESS OF CURRENT FIRST FILE SPEC BLOCK
X	.WDCUR		;ADDRESS OF CURRENT FILE SPEC BLOCK
X	.WDCND		;ADDRESS OF CURRENT END FILE SPEC BLOCK
X	.WDICB		;ADDRESS OF INPUT I/O CDB
X	.WDLAS		;(TEMP) ADDRESS OF LAST FILE SPEC BLOCK

;DEFINE THE "WILD FILE BLOCK" OFFSETS BASED ON THE ABOVE

	.WFFSB==.WDIFS-.W1IWF	;ADDRESS OF FILE SPEC BLOCK
	.WFCST==.WDCST-.W1IWF	;ADDRESS OF CURRENT FIRST FILE SPEC BLOCK
	.WFCUR==.WDCUR-.W1IWF	;ADDRESS OF CURRENT CURRENT FILE SPEC BLOCK
	.WFCND==.WDCND-.W1IWF	;ADDRESS OF CURRENT LAST FILE SPEC BLOCK
	.WFCDB==.WDICB-.W1IWF	;ADDRESS OF I/O CDB
	.WFLAS==.WDLAS-.W1IWF	;(TEMP) ADDRESS OF LAST FILE SPEC BLOCK
	.WFMAX==.WFLAS+1	;LENGTH OF WILD FILE BLOCK

;FIRST OUTPUT WILD FILE BLOCK

X	.W1OWF,0	;START INDEX OF FIRST OUTPUT WILD FILE BLOCK
X	.WDOFS		;ADDRESS OF OUTPUT FILE SPEC BLOCK (CHAIN)
X	.WDOX1		;NOT USED FOR OUTPUT
X	.WDOX2		;NOT USED FOR OUTPUT
X	.WDOX3		;NOT USED FOR OUTPUT
X	.WDOCB		;ADDRESS OF OUTPUT I/O CDB
X	.WDOX4		;NOT USED FOR OUTPUT

;START OF WILD INTERNAL STUFF (NOT AVAILABLE TO CALLER)

;.LKWLD STUFF

X	.WDLKW,5	;ARGUMENT BLOCK FOR CALL TO .LKWLD VERSION 7
			;(00) <FIRST,,LAST> SCAN BLOCK POINTER ADR
			;(01) <OPEN,,LOOKUP> BLOCK ADDRESS
			;(02) SCAN BLOCK LENGTH,,LOOKUP LENGTH
			;(03) FLAGS!CHANNEL,,CUR SCNBLK PTR ADR
			;(04) END OF DIRECTORY RTN

;.SCWLD STUFF

X	.WDSCF		;SCWILD PROCESSING FLAGS
X	.WDSCW,5	;ARGUMENT BLOCK FOR CALL TO .SCWLD VERSION 7
			;(00) <CUR INPUT,,OUTPUT> SCNBLK PTR ADR
			;(01) <INPUT,,OUTPUT> OPEN BLK ADR
			;(02) <INPUT,,OUTPUT> FILE BLK ADR
			;(03) DEFAULT EXT ADR,,FILE BLK LEN
			;(04) <FUTURE>,,SCWILD PROCESSING FLAGS ADR

;END OF WILD CONTROL BLOCK

X	.WDEZR,0	;END OF TO-BE-ZEROED AREA
X	.WDMAX,0	;LENGTH OF WILD CONTROL BLOCK

> ;END REPEAT 0
;CLEAN UP THE SYMBOL TABLE

	IF1,<	.XCREF	..XXB,	..XXBM,	..XXBS,	..XXO,	..XXRB>
	IF2,<	PURGE	..XXB,	..XXBM,	..XXBS,	..XXO,	..XXRB>
	SUBTTL	Status and error/exception codes

;Status codes are 18-bit quantities decoded as follows:
;
;	BYTE	(6) group   (3) level   (9) reason
;
;where "group" is the generic functional grouping such as file access
;or I/O transfer; "level" is the relative severity level, and can be
;treated as either a 3-bit value (0 - 7) or as a bit mask (4/2/1) with
;"higher" values being more severe; and "reason" is the individual and
;specific reason or identity of the status/exception/error code.

;FUNCTION GROUPING

$E$ERR==770000		;FUNCTION GROUP FIELD

$E$STS==630000		;GENERAL STATUS (OPERATION PENDING, ETC.)
$E$FIL==640000		;FILE ACCESS (PROTECTION FAILURE, ETC.)
$E$IOX==650000		;I/O TRANSMISSION (DEVICE PARITY ERROR, ETC.)
$E$DAT==660000		;DATA FORMAT (ILLEGAL LSN, ETC.)
$E$ENV==670000		;ENVIRONMENTAL OR "ACTS OF GOD" (NETWORK DIED, ETC.)
$E$MEM==700000		;MEMORY MANAGEMENT (MEMORY FULL, ETC.)
$E$QUE==710000		;QUEUE/GALAXY ERRORS
$E$MSC==720000		;MISCELLANEOUS

$E$CTL==760000		;INTERNAL FLOW CONTROL
$E$DIE==770000		;PROGRAM STOPCD


;SEVERITY LEVEL MASKING

$E$LVL==007000		;SEVERITY LEVEL FIELD

EL$FTX==006000		;FATAL (MORE SO THAN EL$FTL)
EL$FTL==004000		;FATAL
EL$WRN==002000		;WARNING
EL$INF==001000		;INFORMATIONAL


;REASON CODES

$E$COD==000777		;SPECIFIC REASON CODE FIELD
	SUBTTL	Status codes - General purpose

$EGOIP==$E$STS!EL$INF + 001	;OPERATION IN PROGRESS
$EGAOK==$E$STS!EL$INF + 002	;OPERATION SUCCESSFUL "A-OK"
	SUBTTL	Status codes - File access -- general (FILOP.)

$EFFNF==$E$FIL!EL$FTL + 001	;FILE NOT FOUND
$EFDNF==$E$FIL!EL$FTL + 002	;UFD/DIRECTORY NOT FOUND
$EFPRT==$E$FIL!EL$FTL + 003	;PROTECTION FAILURE
$EFFBM==$E$FIL!EL$FTL + 004	;FILE BEING MODIFIED (ANOTHER USER)
$EFAEF==$E$FIL!EL$FTL + 005	;ALREADY EXISTING FILE
$EFISU==$E$FIL!EL$FTX + 006	;ILLEGAL SEQUENCE OF UUOS
$EFRIB==$E$FIL!EL$FTL + 007	;RIB OR DIRECTORY READ ERROR
$EFNSF==$E$FIL!EL$FTX + 010	;NOT A SAVE FILE
$EFNEC==$E$FIL!EL$FTX + 011	;NOT ENOUGH CORE/MEMORY
$EFDNA==$E$FIL!EL$FTX + 012	;DEVICE NOT AVAILABLE
$EFNSD==$E$FIL!EL$FTX + 013	;NO SUCH DEVICE
$EFILU==$E$FIL!EL$FTX + 014	;ILLEGAL (FILOP.) MONITOR CALL
$EFNRM==$E$FIL!EL$FTL + 015	;NO ROOM FOR FILE (QUOTA OR STORAGE EXHAUSTED)
$EFWLK==$E$FIL!EL$FTX + 016	;WRITE-LOCKED DEVICE
$EFTBL==$E$FIL!EL$FTX + 017	;NOT ENOUGH TABLE SPACE
$EFPOA==$E$FIL!EL$WRN + 020	;PARTIAL ALLOCATION
$EFBNF==$E$FIL!EL$FTL + 021	;BLOCK NOT FREE
$EFCSD==$E$FIL!EL$FTL + 022	;CAN'T SUPERSEDE DIRECTORY FILE
$EFDNE==$E$FIL!EL$FTL + 023	;CAN'T DELETE NON-EMPTY DIRECTORY FILE
$EFSNF==$E$FIL!EL$FTL + 024	;SFD (DIRECTORY) NOT FOUND
$EFSLE==$E$FIL!EL$FTX + 025	;SEARCH LIST EMPTY
$EFLVL==$E$FIL!EL$FTL + 026	;SFD'S NESTED TOO DEEPLY
$EFNCE==$E$FIL!EL$FTX + 027	;"NO CREATE" ON FOR ENTIRE SEARCH LIST
$EFSNS==$E$FIL!EL$FTX + 030	;SEGMENT NOT ON SWAP SPACE OR JOB LOCKED
$EFFCU==$E$FIL!EL$FTL + 031	;CAN'T UPDATE FILE
$EFLOH==$E$FIL!EL$FTX + 032	;LOSEG OVERLAPS HISEG
$EFNLI==$E$FIL!EL$FTX + 033	;ILLEGAL IF NOT LOGGED IN
$EFFLK==$E$FIL!EL$FTL + 034	;FILE IS LOCKED BY ANOTHER USER
$EFBED==$E$FIL!EL$FTL + 035	;BAD EXE DIRECTORY
$EFBEE==$E$FIL!EL$FTL + 036	;BAD EXE EXTENSION
$EFDTB==$E$FIL!EL$FTL + 037	;EXE DIRECTORY TOO BIG
$EFENC==$E$FIL!EL$FTX + 040	;EXCEEDED NETWORK (TSK:) CAPACITY
$EFTNA==$E$FIL!EL$FTX + 041	;TSK DEVICE NOT AVAILABLE
;EFNSN==$E$FIL!EL$FTX + 042	;NO SUCH NODE NAME (TSK. OR NSP.)
$EFSIU==$E$FIL!EL$FTL + 043	;SFD IN USE (RENAME)
$EFNDR==$E$FIL!EL$FTL + 044	;FILE CAN'T BE DELETED - NDR LOCK SET
$EFJCH==$E$FIL!EL$FTL + 045	;TOO MANY USERS OF FILE
$EFSSL==$E$FIL!EL$FTL + 046	;CAN'T RENAME SFD TO LOWER LEVEL
$EFCNO==$E$FIL!EL$FTX + 047	;CHANNEL NOT OPENED

;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE

$EFDDU==$E$FIL!EL$FTX + 050	;DEVICE "DOWN" AND UNUSEABLE
$EFDRS==$E$FIL!EL$FTX + 051	;DEVICE IS RESTRICTED
$EFDCM==$E$FIL!EL$FTX + 052	;DEVICE IS CONTROLLED BY THE MDA PROCESS
$EFDAJ==$E$FIL!EL$FTX + 053	;DEVICE ASSIGNED TO ANOTHER JOB
$EFIDM==$E$FIL!EL$FTX + 054	;ILLEGAL I/O DATA MODE
$EFUOB==$E$FIL!EL$FTX + 055	;UNDEFINED OPEN FLAGS SET
$EFDUM==$E$FIL!EL$FTX + 056	;DEVICE IN USE ON AN MPX CHANNEL
$EFNPC==$E$FIL!EL$FTX + 057	;NO PER-PROCESS SPACE AVAILABLE FOR CHAN TABLE
$EFNFC==$E$FIL!EL$FTX + 060	;NO FREE CHANNELS LEFT FOR JOB
$EFUFF==$E$FIL!EL$FTX + 061	;UNKNOWN/ILLEGAL FILOP. FUNCTION
$EFCTB==$E$FIL!EL$FTX + 062	;CHANNEL TOO BIG
$EFCIF==$E$FIL!EL$FTX + 063	;CHANNEL ILLEGAL FOR REQUESTED FUNCTION
$EFACR==$E$FIL!EL$FTX + 064	;ADDRESS CHECK READING ARGUMENT LIST
$EFACS==$E$FIL!EL$FTX + 065	;ADDRESS CHECK WRITING ARGUMENT LIST
$EFNZA==$E$FIL!EL$FTX + 066	;NEGATIVE/ZERO ARGUMENT LIST COUNT
$EFATS==$E$FIL!EL$FTX + 067	;ARGUMENT BLOCK TOO SHORT
	SUBTTL	Status codes - File access -- DAP level

$EFDAP==$E$FIL!EL$FTX + 200	;BIZARRE (NOT-READILY-TRANSLATABLE) DAP STATUS
$EFRAE==$E$FIL!EL$FTL + 201	;GENERIC (CATCH-ALL) REMOTE FILE ACCESS ERROR
$EFRNS==$E$FIL!EL$FTL + 202	;REMOTE NO SUPPORT (GENERIC CATCH-ALL)
$EFRNR==$E$FIL!EL$FTL + 203	;REMOTE NO RENAME SUPPORT
$EFRND==$E$FIL!EL$FTL + 204	;REMOTE NO DELETE SUPPORT
$EFRNX==$E$FIL!EL$FTL + 205	;REMOTE NO EXECUTE SUPPORT
$EFRNL==$E$FIL!EL$FTL + 206	;REMOTE NO DIRECTORY LIST SUPPORT
$EFRNW==$E$FIL!EL$FTL + 207	;REMOTE NO WILDCARD SUPPORT
$EFRNC==$E$FIL!EL$FTL + 210	;REMOTE NO FILE CONSTRAINT SWITCH SUPPORT
$EFRNG==$E$FIL!EL$FTL + 211	;REMOTE NO GO/NOGO SUPPORT
$EFRNA==$E$FIL!EL$FTL + 212	;REMOTE NO ACCOMP(RENAME) SUPPORT
$EFRFB==$E$FIL!EL$FTX + 213	;FILE SPECIFICATION STRING TOO BIG
$EFRSB==$E$FIL!EL$FTX + 214	;RANDOM STRING TOO BIG (PASSWORD, ETC)
	SUBTTL	Status codes - File access -- network level (TSK./NSP.)

$EFNNS==$E$FIL!EL$FTX + 400	;NO [MONITOR] NETWORK SOFTWARE
$EFNLA==$E$FIL!EL$FTX + 401	;NETWORK LINK ABORTED

$EFABE==$E$FIL!EL$FTX + 501	;ARGUMENT BLOCK FORMAT ERROR
$EFALF==$E$FIL!EL$FTX + 502	;ALLOCATION FAILURE
$EFBCN==$E$FIL!EL$FTX + 503	;BAD CHANNEL NUMBER
$EFBFT==$E$FIL!EL$FTX + 504	;BAD FORMAT TYPE IN PROCESS BLOCK
$EFCFE==$E$FIL!EL$FTX + 505	;CONNECT BLOCK FORMAT ERROR
$EFIDL==$E$FIL!EL$FTL + 506	;INTERRUPT DATA TOO LONG
$EFIFM==$E$FIL!EL$FTX + 507	;ILLEGAL FLOW CONTROL MODE
$EFILF==$E$FIL!EL$FTX + 510	;ILLEGAL NSP. FUNCTION CODE
$EFJQX==$E$FIL!EL$FTX + 511	;JOB QUOTA EXHAUSTED
$EFLQX==$E$FIL!EL$FTX + 512	;LINK QUOTA EXHAUSTED
$EFNCD==$E$FIL!EL$FTL + 513	;NO CONNECT DATA TO READ
$EFPIO==$E$FIL!EL$FTL + 514	;PERCENTAGE INPUT OUT OF BOUNDS
$EFPRV==$E$FIL!EL$FTL + 515	;NO PRIVILEGES TO PERFORM FUNCTION
$EFSTB==$E$FIL!EL$FTX + 516	;SEGMENT SIZE TOO BIG
$EFNSN==$E$FIL!EL$FTX + 517	;NO SUCH NODE NAME
$EFUXS==$E$FIL!EL$FTX + 520	;UNEXPECTED STATE: UNSPECIFIED
$EFWNA==$E$FIL!EL$FTX + 521	;WRONG NUMBER OF ARGUMENTS
$EFWRS==$E$FIL!EL$FTX + 522	;FUNCTION CALLED IN WRONG STATE
$EFCBL==$E$FIL!EL$FTX + 523	;CONNECT BLOCK LENGTH ERROR
$EFPBL==$E$FIL!EL$FTX + 524	;PROCESS BLOCK LENGTH ERROR
$EFSBL==$E$FIL!EL$FTX + 525	;STRING BLOCK LENGTH ERROR
$EFUDS==$E$FIL!EL$FTX + 526	;UNEXPECTED STATE: DISCONNECT SENT
$EFUDC==$E$FIL!EL$FTX + 527	;UNEXPECTED STATE: DISCONNECT CONFIRMED
$EFUCF==$E$FIL!EL$FTX + 530	;UNEXPECTED STATE: NO CONFIDENCE
$EFULK==$E$FIL!EL$FTX + 531	;UNEXPECTED STATE: NO LINK
$EFUCM==$E$FIL!EL$FTX + 532	;UNEXPECTED STATE: NO COMMUNICATION
$EFUNR==$E$FIL!EL$FTX + 533	;UNEXPECTED STATE: NO RESOURCES
$EFRBO==$E$FIL!EL$FTX + 534	;CONNECT REJECTED BY OBJECT
$EFDBO==$E$FIL!EL$FTX + 535	;DISCONNECTED BY OBJECT
$EFRES==$E$FIL!EL$FTX + 536	;CONNECT REJECTED: NO RESOURCES
$EFUXN==$E$FIL!EL$FTX + 537	;CONNECT REJECTED: UNKNOWN NAME
$EFRNS==$E$FIL!EL$FTX + 540	;CONNECT REJECTED: NODE IS SHUT DOWN
$EFURO==$E$FIL!EL$FTX + 541	;CONNECT REJECTED: UNRECOGNIZED OBJECT
$EFIOF==$E$FIL!EL$FTX + 542	;CONNECT REJECTED: BAD OBJECT NAME FORMAT
$EFOTB==$E$FIL!EL$FTX + 543	;CONNECT REJECTED: OBJECT TOO BUSY/FULL
$EFABM==$E$FIL!EL$FTX + 544	;CONNECT REJECTED: ABORT BY MANAGEMENT
$EFABO==$E$FIL!EL$FTX + 545	;CONNECT REJECTED: ABORT BY OBJECT
$EFINF==$E$FIL!EL$FTX + 546	;CONNECT REJECTED: INVALID NODE NAME FORMAT
$EFLNS==$E$FIL!EL$FTX + 547	;CONNECT REJECTED: LOCAL NODE SHUT DOWN

;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE

$EFUID==$E$FIL!EL$FTX + 550	;CONNECT REJECTED: USER ID REJECTED
$EFNRO==$E$FIL!EL$FTX + 551	;CONNECT REJECTED: NO RESPONSE FROM OBJECT
$EFNUR==$E$FIL!EL$FTX + 552	;NODE UNREACHABLE
$EFNLK==$E$FIL!EL$FTX + 553	;NO LINK
$EFDSC==$E$FIL!EL$FTX + 554	;DISCONNECT COMPLETE
$EFIMG==$E$FIL!EL$FTX + 555	;IMAGE FIELD TOO LONG
$EFUAC==$E$FIL!EL$FTX + 556	;CONNECT REJECTED: INVALID ACCOUNT DATA
$EFBCF==$E$FIL!EL$FTL + 557	;BAD COMBINATION OF NS.EOM AND NS.WAI
$EFADE==$E$FIL!EL$FTX + 560	;ADDRESS CHECK
	SUBTTL	Status codes - File access -- miscellaneous

$EFRJU==$E$FIL!EL$FTL + 700	;REJECTED BY USER (/QUERY, ETC)
$EFIXN==$E$FIL!EL$FTX + 701	;INPUT FILE STREAM EXHAUSTED (NO MORE FILES)
$EFIXE==$E$FIL!EL$FTX + 702	;INPUT EXHAUSTED (REDUNDANT, ERROR)
$EFNAD==$E$FIL!EL$FTX + 703	;DEVICE NOT A DISK
$EFIFO==$E$FIL!EL$FTX + 704	;ILLEGAL FILE OPERATION
$EFIFM==$E$FIL!EL$FTL + 705	;ILLEGAL FILE MODE
$EFILI==$E$FIL!EL$FTX + 706	;ILLEGAL INPUT (OUTPUT DEVICE ONLY)
$EFILO==$E$FIL!EL$FTX + 707	;ILLEGAL OUTPUT (INPUT DEVICE ONLY)
$EFISW==$E$FIL!EL$FTX + 710	;ILLEGAL SECONDARY WILDCARDING
$EFVBI==$E$FIL!EL$FTX + 711	;VARIABLE BLOCKSIZE ILLEGAL
$EFBTB==$E$FIL!EL$FTX + 712	;BLOCKSIZE TOO BIG
$EFBTS==$E$FIL!EL$FTX + 713	;BLOCKSIZE TOO SMALL
$EFFUL==$E$FIL!EL$FTX + 714	;DEVICE/FILE FULL (STORAGE EXAUSTED)
$EFQTA==$E$FIL!EL$FTX + 715	;DEVICE QUOTA EXCEEDED
$EFDIF==$E$FIL!EL$FTX + 716	;DIRECTORY IS FULL (OR CAN'T MAKE NAME UNIQUE)

$EFXXX==$E$FIL!EL$FTL + 777	;UNKNOWN OR UNSPECIFIED ERROR
	SUBTTL	Status codes - I/O transmission -- file level

$EIEOF==$E$IOX!EL$FTL + 001	;END OF FILE
$EIDEV==$E$IOX!EL$FTX + 002	;HARD (UNRECOVERABLE) DEVICE ERROR
$EIDAT==$E$IOX!EL$FTL + 003	;DATA PARITY/CHECKSUM ERROR
$EIBKT==$E$IOX!EL$FTL + 004	;BLOCK TOO LARGE FOR DATA BUFFER
$EIIMP==$E$IOX!EL$FTL + 005	;"IMPROPER MODE"
$EIFUL==$E$IOX!EL$FTL + 006	;DEVICE FULL / STORAGE EXHAUSTED
$EIQTA==$E$IOX!EL$FTL + 007	;USER QUOTA EXCEEDED
$EIHWL==$E$IOX!EL$FTL + 010	;DEVICE HARDWARE WRITE-LOCKED
$EISWL==$E$IOX!EL$FTL + 011	;DEVICE SOFTWARE WRITE-LOCKED
$EIEOV==$E$IOX!EL$FTL + 012	;END-OF-VOLUME
$EIOFL==$E$IOX!EL$FTL + 013	;DEVICE "OFFLINE"
$EILLE==$E$IOX!EL$FTL + 014	;PAGE LIMIT EXCEEDED
$EIVFE==$E$IOX!EL$FTL + 015	;VFU ERROR
$EILUC==$E$IOX!EL$FTL + 016	;LP20 UNDEFINED CHARACTER INTERRUPT
$EIVRP==$E$IOX!EL$FTL + 017	;LP20 RAM PARITY ERROR
$EILBL==$E$IOX!EL$FTL + 020	;TAPE LABEL ERROR (GENERIC)
$EICNO==$E$IOX!EL$FTL + 021	;CHANNEL NOT OPEN FOR FILE/I/O ACTIVITY
$EIECF==$E$IOX!EL$FTL + 022	;ERROR CLOSING FILE
$EINBI==$E$IOX!EL$INF + 023	;NON-BLOCKING FILE INPUT
$EINBO==$E$IOX!EL$INF + 024	;NON-BLOCKING FILE OUTPUT
$EILSN==$E$IOX!EL$INF + 025	;LINE SEQUENCE NUMBER DETECTED
$EILLN==$E$IOX!EL$FTL + 026	;LUDICROUS LINE SEQUENCE NUMBER
$EIEFL==$E$IOX!EL$FTL + 027	;EOF READING LSN
$EIMLN==$E$IOX!EL$FTL + 030	;MULTIPLE LSN'S
$EINOL==$E$IOX!EL$FTL + 031	;NOT OPENED FOR LSN SUPPORT
$EILTB==$E$IOX!EL$FTL + 032	;LSN TOO BIG
$EIINO==$E$IOX!EL$FTL + 033	;NOT OPENED FOR INPUT
$EIONO==$E$IOX!EL$FTL + 034	;NOT OPENED FOR OUTPUT
$EIILF==$E$IOX!EL$FTL + 035	;ILLEGAL I/O FUNCTION (.IOFUN CALL)
$EIBOR==$E$IOX!EL$INF + 036	;BEGINING OF RECORD ENCOUNTERED
$EIRSU==$E$IOX!EL$INF + 036	;BOR, BUT SIZE OF RECORD IS UNKNOWN
$EIEOR==$E$IOX!EL$FTL + 037	;PREMATURE END OF RECORD (RECORD SIZE WRONG)
$EIDPR==$E$IOX!EL$FTL + 040	;DATA PAST END OF RECORD (RECORD SIZE WRONG)
$EIRFE==$E$IOX!EL$FTL + 041	;RECORD FORMAT ERROR
$EICCC==$E$IOX!EL$FTL + 042	;ERROR IN COBOL CARRIAGE CONTROL FORMAT
$EIFCC==$E$IOX!EL$FTL + 043	;ERROR IN FORTRAN CARRIAGE CONTROL FORMAT
$EIPRN==$E$IOX!EL$FTL + 044	;ERROR IN VAX "PRINT FILE" CONTROL FORMAT
$EINRS==$E$IOX!EL$FTL + 045	;NOT A RECORD-STRUCTURED FILE
$EINIR==$E$IOX!EL$FTL + 046	;NOT IN A RECORD
$EIRSO==$E$IOX!EL$FTL + 047	;RECORD STILL OUTSTANDING (ALREADY IN A RECORD)
$EIRTB==$E$IOX!EL$FTL + 050	;RECORD [SIZE] TOO BIG
$EIRAI==$E$IOX!EL$FTL + 051	;RECORD ADDRESS ILLEGAL
	SUBTTL	Status codes - I/O transmission -- DAP/data level

$EIDAP==$E$IOX!EL$FTX + 200	;BIZARRE (NOT-READILY-TRANSLATABLE) DAP STATUS
$EIRIE==$E$IOX!EL$FTL + 201	;GENERIC (CATCH-ALL) REMOTE I/O ERROR
$EICKE==$E$IOX!EL$FTL + 202	;NETWORK FILE DATA CRC ("CHECKSUM") ERROR
$EINTI==$E$IOX!EL$INF + 203	;NON-BLOCKING NETWORK INPUT
$EINTO==$E$IOX!EL$INF + 204	;NON-BLOCKING NETWORK OUTPUT
$EIBAI==$E$IOX!EL$FTL + 205	;BINARY FILE WITH ASCII ATTRIBUTES ILLEGAL
	SUBTTL	Status codes - I/O transmission -- network level (TSK./NSP.)

$EINLA==$E$IOX!EL$FTX + 401	;NETWORK LINK ABORTED
$EINMP==$E$IOX!EL$INF + 402	;NETWORK [INPUT] MESSAGE PENDING

$EIABE==$E$IOX!EL$FTX + 501	;ARGUMENT BLOCK FORMAT ERROR
$EIALF==$E$IOX!EL$FTX + 502	;ALLOCATION FAILURE
$EIBCN==$E$IOX!EL$FTX + 503	;BAD CHANNEL NUMBER
$EIBFT==$E$IOX!EL$FTX + 504	;BAD FORMAT TYPE IN PROCESS BLOCK
$EICFE==$E$IOX!EL$FTX + 505	;CONNECT BLOCK FORMAT ERROR
$EIIDL==$E$IOX!EL$FTL + 506	;INTERRUPT DATA TOO LONG
$EIIFM==$E$IOX!EL$FTX + 507	;ILLEGAL FLOW CONTROL MODE
$EIILF==$E$IOX!EL$FTX + 510	;ILLEGAL NSP. FUNCTION CODE
$EIJQX==$E$IOX!EL$FTX + 511	;JOB QUOTA EXHAUSTED
$EILQX==$E$IOX!EL$FTX + 512	;LINK QUOTA EXHAUSTED
$EINCD==$E$IOX!EL$FTL + 513	;NO CONNECT DATA TO READ
$EIPIO==$E$IOX!EL$FTL + 514	;PERCENTAGE INPUT OUT OF BOUNDS
$EIPRV==$E$IOX!EL$FTL + 515	;NO PRIVILEGES TO PERFORM FUNCTION
$EISTB==$E$IOX!EL$FTX + 516	;SEGMENT SIZE TOO BIG
$EINSN==$E$IOX!EL$FTX + 517	;UNKNOWN NODE NAME
$EIUXS==$E$IOX!EL$FTX + 520	;UNEXPECTED STATE: UNSPECIFIED
$EIWNA==$E$IOX!EL$FTX + 521	;WRONG NUMBER OF ARGUMENTS
$EIWRS==$E$IOX!EL$FTX + 522	;FUNCTION CALLED IN WRONG STATE
$EICBL==$E$IOX!EL$FTX + 523	;CONNECT BLOCK LENGTH ERROR
$EIPBL==$E$IOX!EL$FTX + 524	;PROCESS BLOCK LENGTH ERROR
$EISBL==$E$IOX!EL$FTX + 525	;STRING BLOCK LENGTH ERROR
$EIUDS==$E$IOX!EL$FTX + 526	;UNEXPECTED STATE: DISCONNECT SENT
$EIUDC==$E$IOX!EL$FTX + 527	;UNEXPECTED STATE: DISCONNECT CONFIRMED
$EIUCF==$E$IOX!EL$FTX + 530	;UNEXPECTED STATE: NO CONFIDENCE
$EIULK==$E$IOX!EL$FTX + 531	;UNEXPECTED STATE: NO LINK
$EIUCM==$E$IOX!EL$FTX + 532	;UNEXPECTED STATE: NO COMMUNICATION
$EIUNR==$E$IOX!EL$FTX + 533	;UNEXPECTED STATE: NO RESOURCES
$EIRBO==$E$IOX!EL$FTX + 534	;CONNECT REJECTED BY OBJECT
$EIDBO==$E$IOX!EL$FTX + 535	;DISCONNECTED BY OBJECT
$EIRES==$E$IOX!EL$FTX + 536	;CONNECT REJECTED: NO RESOURCES
$EIUXN==$E$IOX!EL$FTX + 537	;CONNECT REJECTED: UNKNOWN NAME
$EIRNS==$E$IOX!EL$FTX + 540	;CONNECT REJECTED: NODE IS SHUT DOWN
$EIURO==$E$IOX!EL$FTX + 541	;CONNECT REJECTED: UNRECOGNIZED OBJECT
$EIIOF==$E$IOX!EL$FTX + 542	;CONNECT REJECTED: BAD OBJECT NAME FORMAT
$EIOTB==$E$IOX!EL$FTX + 543	;CONNECT REJECTED: OBJECT TOO BUSY/FULL
$EIABM==$E$IOX!EL$FTX + 544	;CONNECT REJECTED: ABORT BY MANAGEMENT
$EIABO==$E$IOX!EL$FTX + 545	;CONNECT REJECTED: ABORT BY OBJECT
$EIINF==$E$IOX!EL$FTX + 546	;CONNECT REJECTED: INVALID NODE NAME FORMAT
$EILNS==$E$IOX!EL$FTX + 547	;CONNECT REJECTED: LOCAL NODE SHUT DOWN

;CONTINUED ON NEXT PAGE
;CONTINUED FROM PREVIOUS PAGE

$EIUID==$E$IOX!EL$FTX + 550	;CONNECT REJECTED: USER ID REJECTED
$EINRO==$E$IOX!EL$FTX + 551	;CONNECT REJECTED: NO RESPONSE FROM OBJECT
$EINUR==$E$IOX!EL$FTX + 552	;NODE UNREACHABLE
$EINLK==$E$IOX!EL$FTX + 553	;NO LINK
$EIDSC==$E$IOX!EL$FTX + 554	;DISCONNECT COMPLETE
$EIIMG==$E$IOX!EL$FTX + 555	;IMAGE FIELD TOO LONG
$EIUAC==$E$IOX!EL$FTX + 556	;CONNECT REJECTED: INVALID ACCOUNT DATA
$EIBCF==$E$IOX!EL$FTL + 557	;BAD COMBINATION OF NS.EOM AND NS.WAI
$EIADE==$E$IOX!EL$FTX + 560	;ADDRESS CHECK


;"OTHER" NON-SPECIFIC ERRORS

$EIXXX==$E$IOX!EL$FTL + 777	;UNKNOWN OR UNSPECIFIED ERROR
	SUBTTL	Status codes - Data format and syntax

;"OTHER" NON-SPECIFIC ERRORS

$EDXXX==$E$DAT!EL$FTL + 777	;UNKNOWN OR UNSPECIFIED ERROR
	SUBTTL	Status codes - Environmental ("Acts of God") Errors

;400 - 577 NETWORK BASED

;600 - 776 DAP BASED

$EERDE==$E$ENV!EL$FTL + 600	;REMOTE-DETECTED DAP-LEVEL ERROR
$EELDE==$E$ENV!EL$FTL + 610	;LOCAL-DETECTED DAP-LEVEL ERROR
				; (IMPLICITLY NEED TO SEND STATUS TO REMOTE)
$EEUDS==$E$ENV!EL$FTL + 620	;RESERVED/UNKNOWN DAP STATUS RECEIVED
$EERSP==$E$ENV!EL$FTX + 621	;REMOTE SCREWY PROTOCOL, LINK ABORTED

;"OTHER" NON-SPECIFIC ERRORS

$EEXXX==$E$ENV!EL$FTL + 777	;UNKNOWN OR UNSPECIFIED ERROR
	SUBTTL	Status codes - Memory management

;<TBS>
	SUBTTL	Status codes - QUEUE and GALAXY related

;QUEUE. ERRORS

$EQIAL==$E$QUE!EL$FTL + 001	;ILLEGAL ARGUMENT LIST
$EQILF==$E$QUE!EL$FTL + 002	;ILLEGAL FUNCTION (QUEUE.)
$EQNFS==$E$QUE!EL$FTL + 003	;NO MONITOR FREE CORE
$EQADC==$E$QUE!EL$FTL + 004	;ADDRESS CHECK
$EQCNR==$E$QUE!EL$FTL + 005	;COMPONENT NOT RUNNING (NO PID)
$EQFER==$E$QUE!EL$FTL + 006	;ERROR RETURNED FROM ORION
$EQSOC==$E$QUE!EL$FTL + 007	;INVALID MESSAGE FROM ORION
$EQNPV==$E$QUE!EL$FTL + 010	;NOT PRIVILEGED


;SPPRM. ERRORS

$EQPAC==$E$QUE!EL$FTL + 100	;ADDRESS CHECK
$EQPIA==$E$QUE!EL$FTL + 101	;ILLEGAL ARGUMENT LIST LENGTH
$EQPID==$E$QUE!EL$FTL + 102	;ILLEGAL DEVICE
$EQPNA==$E$QUE!EL$FTL + 103	;DEVICE NOT OPENED
$EQPNS==$E$QUE!EL$FTL + 104	;DEVICE NOT SPOOLED
$EQPNC==$E$QUE!EL$FTL + 105	;NO MONITOR FREE CORE
$EQPIF==$E$QUE!EL$FTL + 106	;ILLEGAL FUNCTION


;ACCOUNTING SYSTEM ERRORS

$EQPRA==$E$QUE!EL$FTL + 400	;NOT PRIVILEGED TO DO ACCOUNTING STUFF
$EQILP==$E$QUE!EL$FTL + 401	;ILLEGAL PPN
$EQIPW==$E$QUE!EL$FTL + 402	;INVALID PASSWORD
$EQIVA==$E$QUE!EL$FTL + 403	;INVALID ACCOUNT STRING


;MISCELLANEOUS

$EQFUF==$E$QUE!EL$FTL + 700	;QUEUE. FUNCTION FAILED

$EQXXX==$E$QUE!EL$FTL + 777	;UNKNOWN OR UNSPECIFIED ERROR
	SUBTTL	Status codes - Miscellaneous

;<TBS>
	SUBTTL	Status codes - Internal flow control

$ECTRA==$E$CTL!EL$INF + 001	;ABORTED, "TRY AGAIN"
$ECAUR==$E$CTL!EL$INF + 002	;ABORTED AT USER'S REQUEST
	SUBTTL	Status codes - STOPCDs

$EDSTP==$E$DIE!EL$FTX + 001	;PROGRAM STOPCODE
	SUBTTL	Scheduler codes

$SCNBI==0		;NON-BLOCKING LOCAL INPUT
$SCNBO==1		;NON-BLOCKING LOCAL OUTPUT
$SCNTI==2		;NON-BLOCKING NETWORK INPUT
$SCNTO==3		;NON-BLOCKING NETWORK OUTPUT
;CLEAN UP THE SYMBOL TABLE

	DODAP(CLN)

	END