Google
 

Trailing-Edge - PDP-10 Archives - decuslib10-06 - 43,50362/c.mac
There are 18 other files named c.mac in the archive. Click here to see a list.
	SUBTTL	GENERAL CUSP MACROS		%7(163)	29-APR-74

	.XCREF
	IFNDEF	%.C,<XLIST>

CUSTVR==0		;CUSTOMER VERSION
DECVER==7		;DEC VERSION
DECMVR==0		;DEC MINOR VERSION
DECEVR==163		;DEC EDIT VERSION

;***COPYRIGHT 1971, 1972, 1973, 1974  DIGITAL EQUIPMENT CORP., MAYNARD, MASS.***


;DEFINE %.C TO LIST FILE
;DEFINE %.C==-1 TO ASSEMBLE C IN BOTH PASSES
;DEFINE %.C==-2 TO ALSO INCLUDE END STATEMENT
;DEFINE %.C==-3 TO MAKE C A UNIVERSAL FILE
;DETERMINE IF SPECIAL ASSEMBLY NEEDED

IF1,<%..C==1	;ALWAYS ASSEMBLE PASS1
    IFDEF %.C,< IFE %.C+2,<TITLE C -- LISTING OF C.MAC (CUSP PARAMETER FILE)>
		IFE %.C+3,<UNIVERSAL C -- CUSP PARAMETER UNIVERSAL SYMBOL TABLE
				%..C==-77>>
>
IF2,<IFNDEF %.C,<%..C==0>	;SUPPLY VALUE IF USER DIDN'T
     IFDEF %.C,<%..C==%.C	;USE USER'S VALUE FOR PASS2>
>

;DEFINE JOBDAT LOCATIONS WHICH CAN BE LOC-ED TO

IFN %..C+3,<
	.CREF
IF2,<	GLOB	<.JB41,.JBCST,.JBOPS,.JBREN,.JBVER>
	.XCREF
>>


	LIST
	SALL		;CLEAN EXPANSION LISTINGS
	.CREF
IFE %..C,<TAPE>	;SKIP REST IF NO ASSEMBLY NEEDED    ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
IFN %..C+77,<	;DON'T ASSEMBLE UNIVERSAL PASS1
	.CREF

;DEFINE ALL JOBDAT SYMBOLS
	EXTERN	.JBAPR,.JBBLT,.JBCHN,.JBCNI,.JBCOR
	EXTERN	.JBDA,.JBDDT,.JBERR,.JBFF,.JBH41,.JBHCR,.JBHDA,.JBHGA
	EXTERN	.JBHGH,.JBHNM,.JBHRL,.JBHRN,.JBHSA,.JBHSM,.JBHVR,.JBINT,.JBOPC
	EXTERN	.JBOVL,.JBPFH,.JBPFI,.JBREL,.JBSA,.JBSYM,.JBTPC,.JBUSY,.JBUUO
	.XCREF
IFE %..C+3,<	;IF UNIVERSAL, ALSO INCLUDE OTHERS
	.CREF
	EXTERN	.JB41,.JBCST,.JBOPS,.JBREN ;;***MACRO 47 BUG***;; ,.JBVER
>
	.CREF
	SUBTTL	TABLE OF CONTENTS FOR C

;                          SECTION                            PAGE
;    1. GENERAL CUSP MACROS...................................   1
;    2. TABLE OF CONTENTS FOR C...............................   3
;    3. REVISION HISTORY......................................   5
;    4. MACRO DEFINITIONS -- ND, XP, EXT, GLOB................   7
;    5. MACRO DEFINITIONS -- BYTE MANIPULATION................   8
;    6. MACRO DEFINITIONS -- INFO/REDEF.......................   9
;    7. MACRO DEFINITIONS -- GENERATE OP CODES ABCX...........  10
;    8. MACRO DEFINITIONS -- JUMPPT, GTMSG....................  18
;    9. NAMING CONVENTIONS....................................  19
;   10. UPDATE AND CHECKOUT INSTRUCTIONS......................  20
;   11. SYMBOLS FOR THE CONTROL CHARACTERS....................  21
;		MISC. CONSTANTS
;   12. OPDEFS INCLUDING MONITOR CALLS........................  22
;		PJRST,ETC.
;		UUOS
;		MTAPES
;		TTCALLS
;		CALLIS
;   13. GETTAB CONSTITUENTS...................................  27
;   14. HARDWARE BITS OF INTEREST TO USERS....................  42
;		PC FLAGS
;		APRENB
;
;
;****CONTINUED ON NEXT PAGE****
;   15. MISC. UUOS............................................  43
;		TMPCOR
;		LOCK
;		RTTRP
;		JOBSTS
;		HIBER
;		SAVEGET
;		SETUUO
;		ATTACH
;		UNIVERSAL INDEX
;		.JBINT
;   16. PSI SOFTWARE INTERRUPT SYSTEM.........................  47
;   17. IPCF INTERPROCESS COMMUNICATION FACILITY..............  50
;   18. PAGE AND VM  VIRTUAL MEMORY FACILITY..................  53
;   19. DAEMON CALLS..........................................  54
;   20. METER UUO.............................................  56
;   21. MISC. I/O UUOS........................................  58
;		DEVCHR
;		DEVTYP
;		MTCHR.
;		WHERE
;		CAL11.
;		GETLCH
;		TRMOP.
;		GETSTS, SETSTS
;		I/O MODES
;		CLOSE
;		OPEN
;		BUFFER HEADERS AND MVHDR.
;		MPX: UUOS
;		DEVLNM, DEVSIZ
;		CHANNEL DATA BLOCK
;   22. DISK UUOS.............................................  69
;		DSKCHR
;		CHKACC
;		DISK.
;		JOBSTR, GOBSTR
;		SUSET.
;		PATH.
;		STRUUO
;		RIB LOCATIONS
;		LOOKUP/ENTER/RENAME
;		PROTECTION CODES
;
;
;***END***
	SUBTTL	REVISION HISTORY

;%3(67) MAY, 1972

;70	CORRECT MOVX TO INCLUDE <>
;71	ADD MACRO STORE TO GENERATE BLT
;72	MAKE USEABLE AS A UNIVERSAL FILE
;73	CORRECT MOVX, TXYY TO HANDLE RELOCATABLE MASKS
;74	HAVE MOVX GENERATE HRLOI, HRROI
;75	HAVE TXY GENERATE ORCMI, ANDI, EQVI
;76	ADD CAXYY, ADDX, ETC.
;77	ADD PJRSTF
;100	UPDATE TO 50434 (505) BY ADDING ADDITIONAL
;	SYMBOLS; CHANGE %LDSXS TO %LDNEW, F%ABLB TO F%APLB
;101	ENHANCE ADDX, ETC., TO NOTICE SMALL NEGATIVES
;102	ADD PATH AREA
;103	ADD METER. BITS AND PIECES
;104	ADD ALL OLD CALLI MNEMONICS FOR DDT.SAV
;105	ADD SUBTITLES AND INDEX
;106	UPDATE RESPONSE SUBTABLE
;107	CORRECT BUGS IN UNIVERSAL SETUP
;110	ADD OPDEF FOR PORTAL
;%4(110) JULY, 1972

;111	CHANGE GL.NEC TO GL.LCP (SPR 10-7553)
;112	CHANGE SY.ERR AND SY.CCO TO %SYERR AND %SYCCO.
;113	CORRECT BUG IN STORE MACRO TO ALLOW MORE GENERAL USE
;114	ADD 5.06 DEFINITIONS
;115	COMPLETE .RBSTS BITS.
;%5(115) NOV 72

;116	SUPPORT DATE75 BY CHANGING RB.ACD AND ADDING RB.CRX
;117	CLEAN UP PAGE 1 LISTING
;120	ADD .STDFL
;121	ADD LKNEM%
;122	(10-9627) ALLOW FLAG=0 IN TX?? MACROS
;123	(10-9725) CHANGE CAXNE TO CAXN
;124	ADD OPEN BLOCK
;125	ADD MACROS MASK. RGHBT. LFTBT. FILIN. ALIGN. TXND. TXNI. JUMPI. JUMPN.
;126	ADD MACRO BTSWP.
;127	ADD INFO-REDEF.
;130	ADD SN%LOK, CORRECT .BFSTS
;131	(10-11609) FIX STORE MACRO FOR RELOC. 0
;%6(131) DEC 73
;132	UPDATE TO 50644 (6.01/5.07) MCO 4072
;133	CORRECT BUG IN %FT??? DEFINITIONS
;134	IF UNIVERSAL, MAKE .JB41, ETC., BE EXTERNAL
;135	ADD ALL 6.01 JOBDAT SYMBOLS
;136	ADD .SGDDT
;137	ADD GTMSG.
;140	UPDATE TO 50645
;141	UPDATE TO 50646
;142	UPDATE TO 50650
;143	CORRECT MISSING .CREF IN TX? MACROS
;144	UPDATE TO 50657
;145	RESERVE Q SYMBOLS TO QPRM.UNV; %DIGITS AND U..??? TO E.UNV
;146	UPDATE TO 50660
;147	ADD LOCK UUO BITS, DEVLNM+DEVSIZ+DISK. ERRORS
;150	UPDATE TO 50662
;151	RESERVE SYMBOLS OF THE FORM ?.???? TO OTHER FILES
;152	RESERVE FS.M??, FX.???, TS.???, AND .FX??? TO SCNMAC.UNV
;153	ADD ST.W??, AND "ALL" BITS SETS: JW.WAL, ST.WAL, JS.PAL, RB.ERR
;154	ADD .SG41
;155	ADD BOXES FOR FUNNY FORMATS; RE-ORDER CL.??? FOR CONSISTENCY
;156	CORRECT DEFINITIONS OF .BFSTS, .BFHDR, AND .BFCNT
;157	OBSOLETE IO.FCS. ADD IO.LEM
;160	ADD .INFIN AND .MINFI
;161	UPDATE TO 50664
;162	UPDATE TO 50666
;163	DEFINE INSVL.
	SUBTTL	MACRO DEFINITIONS -- ND, XP, EXT, GLOB

;MACRO TO DEFINE A SYMBOL IF NOT ALREADY DEFINED
;	ND  SYMBOL,VALUE

DEFINE	ND(SYMBOL,VALUE),<
	IFNDEF	SYMBOL,<SYMBOL==VALUE>
>


;MACRO TO DEFINE A SYMBOL AND FORCE IT INTERN
;	XP  SYMBOL,VALUE,PRINT
;		WHERE PRINT IS NON-BLANK TO PRINT OUT FROM DDT

DEFINE	XP(SYMBOL,VALUE,PRINT),<
	INTERN	SYMBOL
	IFB  <PRINT>,<SYMBOL==VALUE>
	IFNB <PRINT>,<SYMBOL=VALUE>
>


;MACRO TO EXTERN A SYMBOL IF NOT DEFINED IN THIS ROUTINE
;	EXT	SYMBOL

DEFINE	EXT(SYMBOL),<
	IRP	SYMBOL,<
	IF2,<	IFNDEF	SYMBOL,<EXTERN SYMBOL> >>>



;MACRO TO EXTERN OR INTERN A SYMBOL
;	GLOB	SYMBOL

DEFINE	GLOB(SYMBOL),<
	IRP	SYMBOL,<
	IF2,<	IFDEF	SYMBOL,<INTERN SYMBOL>
		IFNDEF	SYMBOL,<EXTERN SYMBOL>
		SUPPRE	SYMBOL>>>
	SUBTTL	MACRO DEFINITIONS -- BYTE MANIPULATION

;MACRO TO COMPUTE THE WIDTH OF A MASK
;	"WID" RETURNS THE LENGTH OF THE LEFTMOST STRING OF CONSECUTIVE ONES IN
;	THE WORD. OTHER POTENTIALLY USEFUL MACROS MIGHT RETURN THE TOTAL
;	NUMBER OF ONES IN A WORD OR THE NUMBER OF POSITIONS BETWEEN THE
;	LEFTMOST ONE AND THE RIGHTMOST ONE (INCLUSIVE).
DEFINE	WID(MASK),<<^L<-<<MASK>_<^L<MASK>>>-1>>>

;MACRO TO COMPUTE THE POSITION OF A MASK
DEFINE	POS(MASK),<<^L<MASK>+^L<-<<MASK>_<^L<MASK>>>-1>-1>>

;MACRO TO BUILD A POINTER TO A MASKED QUANTITY
;	POINTR	LOCATION,MASK
DEFINE	POINTR(LOC,MASK),<<POINT	WID(MASK),LOC,POS(MASK)>>

;MACRO TO BUILD A MASK "WID" BITS WIDE, WITH ITS RIGHTMOST BIT
;	IN THE BIT POSITION "POS".   (I.E. A MASK FOR THE BYTE
;	POINTED TO BY THE BYTE POINTER "POINT  WID,LOC,POS")
DEFINE	MASK.(WID,POS),<<<<1_<WID>>-1>B<POS>>>

;MACRO TO DEFINE A SYMBOL WITH ONLY ONE BIT ON, IN THE SAME POSITION AS
;	THE RIGHTMOST BIT IN "MASK" (OR 0, IF "MASK" = 0)
DEFINE RGHBT.(MASK),<<<-<MASK>>&<MASK>>>

;MACRO TO DEFINE A SYMBOL WITH ONLY ONE BIT ON, IN THE SAME POSITION AS
;	THE LEFTMOST BIT IN "MASK" (OR 0, IF "MASK" = 0)
DEFINE LFTBT.(MASK),<<1B<^L<MASK>>>>

;	"FILIN." RETURNS A WORD WITH A CONSECUTIVE STRING OF ONES FROM THE
;	BIT POSITION OF THE LEFTMOST ONE IN "MASK" THROUGH THE BIT POSITION
;	OF THE RIGHTMOST ONE IN "MASK" INCLUSIVE.
DEFINE FILIN.(MASK),<<<LFTBT.(MASK)>!<<LFTBT.(MASK)>-<RGHBT.(MASK)>>>>

;	"ALIGN." RETURNS THE NUMBER OF TRAILING ZEROS IN "MASK"
;	(I.E. A VALUE WHICH IS THE RIGHT COUNTERPART OF THE VALUE
;	RETURNED BY THE MACRO-10 OPERATOR "^L")
DEFINE ALIGN.(MASK),<<^D35-<^L<RGHBT.(MASK)>>+<^D37*<<^L<RGHBT.(MASK)>>/^D36>>>>

;	BTSWP.(AC,BIT-1,BIT-2) SWAPS BITS 1 AND 2 IN AC.
;		BIT-1 AND BIT-2 ARE DECIMALS 0-35
DEFINE	BTSWP.(AC,BIT1,BIT2),<
	REPEAT	3,<
	TXCE	AC,1B<BIT1>!1B<BIT2>
>>

;	"INSVL." POSITIONS VALUE IN MASK
DEFINE INSVL.(VALUE,MASK),<<<VALUE>_<ALIGN.(<MASK>)>>>
	SUBTTL	MACRO DEFINITIONS -- INFO/REDEF

;THE FOLLOWING MACROS FACILITATE THE ACCUMULATION OF TEXT BY PERMITTING
;THE USER TO APPEND A LINE OF TEXT TO THE BODY OF TEXT ALREADY
;ACCUMULATED.  THE MACROS ARE USED IN THE FOLLOWING WAY:
;1.  TO CLEAR THE MECHANISM:
;	CINFO.
;2.  TO APPEND THE LINE "SAMPLE LINE" (FOLLOWED BY CR-LF) TO THE
;END OF THE TEXT ACCUMULATED SO FAR:
;	INFO.	REDEF.,"SAMPLE LINE"
;3.  TO DEFINE A MACRO "NAME" SO THAT ITS EXPANSION WILL BE THE TEXT
;ACCUMULATED SO FAR, (NOTE-IT ADDS A NULL LINE TO THE END):
;	INFO.	DEFINE	"NAME"

	DEFINE	CINFO.	<
	DEFINE	INFO.(OPCODE,NEWARG)<
	OPCODE	NEWARG>>

	DEFINE	REDEF.(OLDARG)<
	DEFINE	INFO.(OPCODE,NEWARG)<
	OPCODE	<OLDARG
	NEWARG>>>
	SUBTTL	MACRO DEFINITIONS -- GENERATE OP CODES ABCX

;MACRO TO GENERATE MOVEI, MOVSI, OR MOVE [] AS APPROPRIATE
;	ALSO HRLOI, HRROI

DEFINE	MOVX	(AC,FLAG),<
	.XCREF
	TEST%%=0
IFE	<<FLAG>_-^D18>,<
	TEST%%=1
	.CREF
	MOVEI	AC,<FLAG>
	.XCREF
>
IFN	<FLAG>,<
IFE	<<FLAG>_^D18>,<
	TEST%%=1
	.CREF
	MOVSI	AC,(FLAG)
	.XCREF
>
IFE	<<<FLAG>_-^D18>-^O777777>,<
	TEST%%=1
	.CREF
	HRROI	AC,<FLAG>
	.XCREF
>
IFE	TEST%%,<
IFE	<<<FLAG>_^D18>-^O777777B17>,<
	TEST%%=1
	.CREF
	HRLOI	AC,(<FLAG>-^O777777)
	.XCREF
>
IFE	TEST%%,<
	.CREF
	MOVE	AC,[FLAG]
>>>
	PURGE	TEST%%
	.CREF>

;STORE (AC,FIRST,LAST,CONSTANT) PUTS CONSTANT IN FIRST THRU LAST.
	DEFINE	STORE(AC,FIRST,LAST,CONS),<
IFE <CONS>,<	SETZM	FIRST>	;;IF CONS=0, CLEAR FIRST
IFE <CONS>+1,<	SETOM	FIRST>	;;IF CONS=-1, SET FIRST TO -1
IFN <CONS>*<<CONS>+1>,<MOVX	AC,<CONS>	;;ELSE DO IT
		   MOVEM AC,FIRST>	;; THE HARD WAY
IFNB <LAST>,<			;;IF MORE THAN ONE LOCATION
	MOVE	AC,[FIRST,,FIRST+1]
	BLT	AC,LAST		;;DISTRIBUTE THE CONSTANT
>>
;GENERATE CAI OR CAM AS APPROPRIATE

DEFINE	CAX	(AC,VAL),<OP%%CA (AC,VAL,)>
DEFINE	CAXL	(AC,VAL),<OP%%CA (AC,VAL,L)>
DEFINE	CAXLE	(AC,VAL),<OP%%CA (AC,VAL,LE)>
DEFINE	CAXE	(AC,VAL),<OP%%CA (AC,VAL,E)>
DEFINE	CAXG	(AC,VAL),<OP%%CA (AC,VAL,G)>
DEFINE	CAXGE	(AC,VAL),<OP%%CA (AC,VAL,GE)>
DEFINE	CAXN	(AC,VAL),<OP%%CA (AC,VAL,N)>
DEFINE	CAXA	(AC,VAL),<OP%%CA (AC,VAL,A)>

DEFINE	OP%%CA	(AC,VALUE,CODE),<
	.XCREF
IFE	<<VALUE>_-^D18>,<
	.CREF
	CAI'CODE	AC,<VALUE>
	.XCREF
>
IFN	<<VALUE>_-^D18>,<
	.CREF
	CAM'CODE	AC,[VALUE]
	.XCREF
>
	.CREF>
;GENERATE IMMEDIATE OR MEMORY CONSTANTS

DEFINE	ADDX	(AC,VAL),<OP%%IA	(AC,VAL,ADD,SUB)>
DEFINE	SUBX	(AC,VAL),<OP%%IA	(AC,VAL,SUB,ADD)>
DEFINE	MULX	(AC,VAL),<OP%%IN	(AC,VAL,MUL)>
DEFINE	IMULX	(AC,VAL),<OP%%IN	(AC,VAL,IMUL)>
DEFINE	DIVX	(AC,VAL),<OP%%IN	(AC,VAL,DIV)>
DEFINE	IDIVX	(AC,VAL),<OP%%IN	(AC,VAL,IDIV)>

DEFINE	OP%%IA	(AC,VALUE,CODE,ALT),<
	.XCREF
IFE	<<<VALUE>_-^D18>-^O777777>,<
	.CREF
	ALT'I	AC,-<VALUE>
	.XCREF
>
IFN	<<<VALUE>_-^D18>-^O777777>,<
	OP%%IN	AC,<VALUE>,CODE
>
	.CREF>

DEFINE	OP%%IN	(AC,VALUE,CODE),<
	.XCREF
IFE	<<VALUE>_-^D18>,<
	.CREF
	CODE'I	AC,<VALUE>
	.XCREF
>
IFN	<<VALUE>_-^D18>,<
	.CREF
	CODE	AC,[VALUE]
	.XCREF
>
	.CREF>
;GENERATE IMMEDIATE OR MEMORY FOR FLOATING POINT

DEFINE	FADRX	(AC,VAL),<OP%%FA	(AC,VAL,FADR,FSBR)>
DEFINE	FSBRX	(AC,VAL),<OP%%FA	(AC,VAL,FSBR,FADR)>
DEFINE	FMPRX	(AC,VAL),<OP%%FP	(AC,VAL,FMPR)>
DEFINE	FDVRX	(AC,VAL),<OP%%FP	(AC,VAL,FDVR)>

DEFINE	OP%%FA	(AC,VALUE,CODE,ALT),<
	.XCREF
IFE	<<<VALUE>_^D18>-^O777777B17>,<
	.CREF
	ALT'I	AC,(-<VALUE>)
	.XCREF
>
IFN	<<<VALUE>_^D18>-^O777777B17>,<
	OP%%FP	AC,<VALUE>,CODE
>
	.CREF
>

DEFINE	OP%%FP	(AC,VALUE,CODE),<
	.XCREF
IFE	<<VALUE>_^D18>,<
	.CREF
	CODE'I	AC,(VALUE)
	.XCREF
>
IFN	<<VALUE>_^D18>,<
	.CREF
	CODE	AC,[VALUE]
	.XCREF
>
	.CREF>
;MACRO TO GENERATE MACROS OF THE FORM TXYY.  THESE MACRO REPLACE
; A TLYY OR A TRYY DEPENDING UPON THEIR ARGUMENT. SEE EXAMPLES:
;
;		CALL				RESULT
;	TXNE	F,1B20			TRNE	F,1B20
;	TXON	F,1B0			TLON	F,(1B0)
;	TXZ	F,1B1!1B31		TDZ	F,[1B1!1B31]

	.XCREF
DEFINE	TX0%%	(M,S),<
	IRP	M,<
	IRP	S,<
DEFINE	TX'M'S	(AC,FLAG),<
	OP%%TX	AC,<FLAG>,TL'M'S,TR'M'S,TD'M'S
>>>>

	TX0%%	<N,Z,O,C>,<E,N,A>

	PURGE	TX0%%
	.CREF

DEFINE	TXN	(AC,FLAG),<
	TRN	AC,<,,<FLAG>>
>
DEFINE	TXZ	(AC,FLAG),<
	.XCREF
IFE	<<<FLAG>_-^D18>-^O777777>,<
	.CREF
	ANDI	AC,<,,-1-<FLAG>>
	.XCREF>
IFN	<<<FLAG>_-^D18>-^O777777>,<
	OP%%TX	AC,<FLAG>,TLZ,TRZ,TDZ
>	.CREF>
DEFINE	TXO	(AC,FLAG),<
	.XCREF
IFE	<<<FLAG>_-^D18>-^O777777>,<
	.CREF
	ORCMI	AC,<,,-1-<FLAG>>
	.XCREF>
IFN	<<<FLAG>_-^D18>-^O777777>,<
	OP%%TX	AC,<FLAG>,TLO,TRO,TDO
>	.CREF>
DEFINE	TXC	(AC,FLAG),<
	.XCREF
IFE	<<<FLAG>_-^D18>-^O777777>,<
	.CREF
	EQVI	AC,<,,-1-<FLAG>>
	.XCREF>
IFN	<<<FLAG>_-^D18>-^O777777>,<
	OP%%TX	AC,<FLAG>,TLC,TRC,TDC
>	.CREF>
DEFINE	OP%%TX	(AC,FLAG,L,R,D)<
	.XCREF

	TEMP%%=0
IFE	<<FLAG>_^D18>,<
IFN	<FLAG>,<
	TEMP%%=1
	.CREF
	L	AC,(FLAG)
	.XCREF
>>
IFE	<<FLAG>_-^D18>,<
	TEMP%%=1
	.CREF
	R	AC,<FLAG>
	.XCREF
>
IFE	TEMP%%,<
	.CREF
	D	AC,[FLAG]
>
	PURGE	TEMP%%
	.CREF>

;DEFINE MNEMONIC CODES FOR SOME OF ABOVE

DEFINE	IORX	(AC,FLAG),<TXO	AC,<FLAG>>
DEFINE	ANDX	(AC,FLAG),<TXZ	AC,-1-<FLAG>>
DEFINE	XORX	(AC,FLAG),<TXC	AC,<FLAG>>
;NOTE - "TXNI.", "TXND.", "JUMPI." & "JUMPD." MAY ASSEMBLE AS ONE OR MORE
;	INSTRUCTIONS, DEPENDING ON THE ACTUAL VALUES OF THEIR ARGUMENTS.
;	IN ALL CASES WHERE THE MACRO EXPANSION IS MORE THAN ONE INSTRUCTION
;	IT WILL BE TRUE THAT IF CONTROL ARRIVES AT THE SECOND INSTRUCTION
;	OF THE MACRO EXPANSION, CONTROL WILL UNCONDITIONALLY BE PASSED TO
;	THE INSTRUCTION IMMEDIATELY FOLLOWING THE LAST INSTRUCTION OF THE
;	MACRO EXPANSION (WITHOUT HAVING ALTERED ANY PART OF THE MACHINE
;	STATE OTHER THAN THE PC). THUS A SKIP TYPE INSTRUCTION IMMEDIATELY
;	PRECEEDING A "TXNI.", "TXND.", "JUMPI.", OR "JUMPD." MACRO WILL HAVE
;	THE EFFECT OF SKIPPING OVER THE ENTIRE MACRO EXPANSION.
;
;
;TEST (BUT DON'T MODIFY) THE FIELD
;	(IN "AC") SPECIFIED BY "MASK" AND SKIP IF IT IS IDENTICAL TO "PATERN"
DEFINE	TXNI.(AC,MASK,PATERN),<
IFE <<MASK>_<1+^L<MASK>>>,<
IFE <<MASK>&<PATERN>>,<
	TXNE	AC,<MASK>
>
IFN <<MASK>&<PATERN>>,<
	TXNN	AC,<MASK>
>>
IFN <<MASK>_<1+^L<MASK>>>,<
	TXCA	AC,<<PATERN>&<MASK>>
	JRST	.+4
	TXCE	AC,<<PATERN>&<MASK>>
	JRST	.+2
	TXNE	AC,<<-<PATERN>-1>&<MASK>>
>>

;TEST (BUT DON'T MODIFY) THE FIELD
;	(IN "AC") SPECIFIED BY "MASK" AND SKIP IF IT IS DIFFERENT THAN "PATERN"
DEFINE	TXND.(AC,MASK,PATERN),<
IFE <<MASK>_<1+^L<MASK>>>,<
IFE <<MASK>&<PATERN>>,<
	TXNN	AC,<MASK>
>
IFN <<MASK>&<PATERN>>,<
	TXNE	AC,<MASK>
>>
IFN <<MASK>_<1+^L<MASK>>>,<
	TXCA	AC,<<PATERN>&<MASK>>
	JRST	.+4
	TXCE	AC,<<PATERN>&<MASK>>
	JRST	.+3
	TXNN	AC,<<-<PATERN>-1>&<MASK>>
>>
;JUMP TO "LOCATN" IF THE FIELD
;	(IN "AC") SPECIFIED BY "MASK" IS IDENTICAL TO "PATERN"
DEFINE	JUMPI.(AC,MASK,PATERN,LOCATN),<
IFE <<MASK>_1>,<
IFE <MASK>,<
	JUMPA	AC,LOCATN
>
IFN <MASK>,<
IFE <<PATERN>&<MASK>>,<
	JUMPGE	AC,LOCATN
>
IFN <<PATERN>&<MASK>>,<
	JUMPL	AC,LOCATN
>>>
IFN <<MASK>_1>,<
	TXCA	AC,<<PATERN>&<MASK>>
	JRST	.+5
	TXCE	AC,<<PATERN>&<MASK>>
	JRST	.+3
	TXNN	AC,<<-<PATERN>-1>&<MASK>>
	JRST	LOCATN
>>

;JUMP TO "LOCATN" IF THE FIELD
;	(IN "AC") SPECIFIED BY "MASK" IS DIFFERENT THAN "PATERN"
DEFINE	JUMPD.(AC,MASK,PATERN,LOCATN)
<IFE <<MASK>_1>,<
IFE <MASK>,<
	JUMP	AC,LOCATN
>
IFN <MASK>,<
IFE <<PATERN>&<MASK>>,<
	JUMPL	AC,LOCATN
>
IFN <<PATERN>&<MASK>>,<
	JUMPGE	AC,LOCATN
>>>
IFN <<MASK>_1>,<
	TXCA	AC,<<PATERN>&<MASK>>
	JRST	.+5
	TXCE	AC,<<PATERN>&<MASK>>
	JRST	LOCATN
	TXNE	AC,<<-<PATERN>-1>&<MASK>>
	JRST	LOCATN
>>
	SUBTTL	MACRO DEFINITIONS -- JUMPPT, GTMSG.

;MACRO TO JUMP DEPENDING UPON PROCESSOR TYPE

;CALL:	JUMPPT	TEMPAC,PDP-6 ADDR,KA-10 ADDR,KI-10 ADDR
;	WHERE	TEMPAC IS AN AC TO USE AS A TEMP
;	BLANK PROCESSORS FALL THROUGH TO NEXT INSTRUCTION

DEFINE	JUMPPT	(AC,CP166,KA10,KI10,KX,KY,KZ,%1),<
	JFCL	1,.+1		;;CLEAR PC-CHANGE FLAG
	JRST	.+1		;;SET PC-CHANGE
IFNB	<CP166>,<JFCL	1,CP166>
IFB	<CP166>,<JFCL	1,%1>
IFNB	<KA10'KI10>,<
	HRLOI	AC,-2		;;SET FOR KA/KI TEST
IFB	<KI10>,<AOBJP	AC,KA10>
IFNB	<KI10>,<AOBJN	AC,KI10
	IFNB<KA10>,<JRST	KA10>>>
%1:>


;MACRO TO GET ERROR MESSAGE CODE AND CLEAN IT UP

;CALL:	GTMSG.	AC
;	WHERE AC WILL END UP WITH IT IN BYTE JW.WMS
;	DEFAULT IS /MESSAGE:(PREFIX,FIRST)
;	IF /MESSAGE:CONTINUATION, THEN /MESSAGE:FIRST
;	  IS ASSUMED

DEFINE	GTMSG.	(AC),<
	.XCREF			;;SUPPRESS REDUNDANT CREF
	HRROI	AC,.GTWCH	;;IT'S IN THE WATCH TABLE
	.CREF
	GETTAB	AC,		;;GET FROM MONITOR
	.XCREF
	  MOVEI	AC,0		;;DEFAULT TO 0
	TXNN	AC,JW.WMS	;;IF 0,
	TXO	AC,.JWWPO_<ALIGN. (JW.WMS)>  ;; DEFAULT TO PREFIX,FIRST
	TXNE	AC,JW.WCN	;;IF /MESSAGE:CONTINUATION
	TXO	AC,JW.WFL	;; DEFAULT TO /MESSAGE:FIRST
	.CREF
>
	SUBTTL	NAMING CONVENTIONS

;PATTERN	USAGE

; .GGSSS	NUMBER OF GENERAL CATEGORY GG, SPECIFIC USE SSS
; GG.SSS	BYTE OF GENERAL CATEGORY GG, SPECIFIC USE SSS
; UUUUU.	UUO OR FUNCTION OR MACRO

; %GGSSS	GETTAB INDEX (WORD,,TABLE)
; GG%SSS	BYTE IN A SPECIFIC GETTAB
; GGEEE%	ERROR CODE OF CATEGORY GG, SPECIFIC ERROR EEE


;SPECIAL CASES--

; F%AAAA	RH=BYTE OF FEATURE TEST NAMED FTAAAA
;			IN LH=FEATURE DEFINED
;			IN RH=FEATURE TURNED ON
;		LH=LH OF GETTAB IN .GTFET CONTAINING INFO


;RESERVED FOR OTHER THAN C.MAC, C.UNV--

;ALL SYMBOLS CONTAING $ ARE RESERVED TO THE USER
;	(CUSTOMER, HIS USER, OR SPECIFIC PROGRAMS)

; ?.????	RESERVED TO OTHER PARAMETER FILES

;ALL SYMBOLS OF THE FORMS:  QABCDE, .QABCD, %QABCD
;	(I.E, WITH FIRST ALPHABETIC "Q") ARE RESERVED TO
;	QPRM.MAC, QPRM.UNV FOR THE QMANGR PARAMETER AREA, ETC.

;ALL SYMBOLS OF THE FORMS: %NNNNN, U..NNN, E..AAA
;	ARE RESERVED TO E.MAC, E.UNV FOR THE ERROR HANDLER

;ALL SYMBOLS OF THE FORMS: FS.M??, FX.???, TS.???, AND .FX???
;	ARE RESERVED TO SCNMAC.MAC, SCNMAC.UNV FOR SCAN AND WILD
	SUBTTL	UPDATE AND CHECKOUT INSTRUCTIONS

;1.  COMPARE CREFS OF F% IN C VS. FT IN DATMAN
;2.  VERIFY NO $ IN CREF IN C AND THAT ONLY LEGAL PATTERNS EXIST
;3.  UPDATE CALLI TABLE FROM UUOCON
;4.  UPDATE GETTAB LIST OF TABLES (.GTABC) FROM UUOCON. DEFINE	
;	ENTRIES/BYTES IN NEW TABLES
;5.  FIND NEW ENTRIES IN OLD TABLES (ESP. .GTCNF, .GTLVD, .GTSYS,
;	.GTC0C, .GTC0V)
;6.  FIND NEW BYTES IN OLD WORDS (ESP. .GTPRV, %CNDBG, .GTWCH,
;	%CNST2)
;7.  FIND NEW ERRORS AND FUNCTIONS FOR UUOS (ESP. DEVTYP, OPEN/CLOSE,
;	PATH., LOOKUP)
;8.  FIND NEW DAEMON FUNCTIONS, ERRORS, FORMATS.
;9.  VERIFY NO DUPLICATES BY SCANNING CREF FOR ONLY SINGLE REFERENCES
;10. VERIFY THAT ALL USER JOBDAT SYMBOLS APPEAR
;11. VERIFY THAT SYMBOLS RESERVED TO OTHER FILES DO NOT APPEAR:
;	?.????
;	Q?????, %Q????, .Q????
;	%NNNNN, U..NNN, E..???
;	FS.M??, FX.???, TS.???, .FX???
	SUBTTL	SYMBOLS FOR THE CONTROL CHARACTERS

.CHNUL==000	;NULL
.CHCNA==001
.CHCNB==002
.CHCNC==003
.CHCND==004
.CHCNE==005
.CHCNF==006
.CHBEL==007	;BELL
.CHCNH==010
.CHTAB==011	;TAB
.CHLFD==012	;LINE-FEED
.CHVTB==013	;VERTICAL TAB
.CHFFD==014	;FORM FEED
.CHCRT==015	;CARRIAGE RETURN
.CHCNN==016
.CHCNO==017
.CHCNP==020
.CHCNQ==021
.CHCNR==022
.CHCNS==023
.CHCNT==024
.CHCNU==025
.CHCNV==026
.CHCNW==027
.CHCNX==030
.CHCNY==031
.CHCNZ==032
.CHESC==033	;ESCAPE
.CHCBS==034	;CONTROL BACK SLASH
.CHCRB==035	;CONTROL RIGHT BRACKET
.CHCCF==036	;CONTROL CIRCONFLEX
.CHCUN==037	;CONTROL UNDERLINE

.CHALT==175	;OLD ALTMODE
.CHAL2==176	;ALTERNATE OLD ALTMODE
.CHDEL==177	;DELETE

;MISC. CONSTANTS

.INFIN==377777,,777777	;PLUS INFINITY
.MINFI==1B0		;MINUS INFINITY
	SUBTTL	OPDEFS INCLUDING MONITOR CALLS

;VARIOUS USEFUL OPDEFS INCLUDING MONITOR CALLS

	OPDEF	PJRST	[JRST]		;PUSHJ/POPJ
	OPDEF	PJRSTF	[JRSTF]		;PUSHJ/POPJ
	OPDEF	PJSP	[JSP]		;MOVEI .+1/PUSHJ/POPJ
	OPDEF	PJUMPL	[JUMPL]
	OPDEF	PJMPLE	[JUMPLE]
	OPDEF	PJUMPE	[JUMPE]
	OPDEF	PJUMPN	[JUMPN]
	OPDEF	PJUMPG	[JUMPG]
	OPDEF	PJMPGE	[JUMPGE]

;OPDEF THE KI-10 CONCEALED PAGE GATE-KEEPER

	OPDEF	PORTAL	[JRST 1,]

;OPDEF THE UUOS SO THEY APPEAR IN THE OPCODE LISTING

	OPDEF	HALT	[HALT]
	OPDEF	INIT	[INIT]
	OPDEF	OPEN	[OPEN]
	OPDEF	RENAME	[RENAME]
	OPDEF	IN	[IN]
	OPDEF	OUT	[OUT]
	OPDEF	SETSTS	[SETSTS]
	OPDEF	STATO	[STATO]
	OPDEF	GETSTS	[GETSTS]
	OPDEF	STATZ	[STATZ]
	OPDEF	INBUF	[INBUF]
	OPDEF	OUTBUF	[OUTBUF]
	OPDEF	INPUT	[INPUT]
	OPDEF	OUTPUT	[OUTPUT]
	OPDEF	CLOSE	[CLOSE]
	OPDEF	RELEAS	[RELEAS]
	OPDEF	UGETF	[UGETF]
	OPDEF	USETI	[USETI]
	OPDEF	USETO	[USETO]
	OPDEF	LOOKUP	[LOOKUP]
	OPDEF	ENTER	[ENTER]
	OPDEF	UJEN	[UJEN]
	OPDEF	MTWAT.	[MTAPE 0]	;WAIT FOR POSITIONING
	OPDEF	MTREW.	[MTAPE 1]	;REWIND
	OPDEF	MTEOF.	[MTAPE 3]	;WRITE END OF FILE
	OPDEF	MTSKR.	[MTAPE 6]	;SKIP RECORD
	OPDEF	MTBSR.	[MTAPE 7]	;BACKSPACE RECORD
	OPDEF	MTEOT.	[MTAPE 10]	;SKIP TO END OF TAPE
	OPDEF	MTUNL.	[MTAPE 11]	;REWIND AND UNLOAD
	OPDEF	MTBLK.	[MTAPE 13]	;BLANK TAPE
	OPDEF	MTSKF.	[MTAPE 16]	;SKIP FILE
	OPDEF	MTBSF.	[MTAPE 17]	;BACKSPACE FILE
	OPDEF	MTDEC.	[MTAPE 100]	;DEC 9-CHANNEL
	OPDEF	MTIND.	[MTAPE 101]	;INDUSTRY STANDARD 9-CHANNEL
	OPDEF	MTLTH.	[MTAPE 200]	;LOW THRESHOULD

	OPDEF	INCHRW	[TTCALL 0,]	;INPUT CHAR AND WAIT
	OPDEF	OUTCHR	[TTCALL 1,]	;OUTPUT CHAR
	OPDEF	INCHRS	[TTCALL 2,]	;INPUT CHAR AND SKIP
	OPDEF	OUTSTR	[TTCALL 3,]	;OUTPUT STRING
	OPDEF	INCHWL	[TTCALL 4,]	;INPUT CHAR WAIT, LINE
	OPDEF	INCHSL	[TTCALL 5,]	;INPUT CHAR SKIP, LINE
	OPDEF	GETLCH	[TTCALL 6,]	;GET LINE CHARS
	OPDEF	SETLCH	[TTCALL 7,]	;SET LINE CHARS
	OPDEF	RESCAN	[TTCALL 10,]	;RESET INPUT LINE
	OPDEF	CLRBFI	[TTCALL 11,]	;CLEAR INPUT BUFFER
	OPDEF	CLRBFO	[TTCALL 12,]	;CLEAR OUTPUT BUFFER
	OPDEF	SKPINC	[TTCALL 13,]	;SKIP IF CHAR IN INPUT
	OPDEF	SKPINL	[TTCALL 14,]	;SKIP IF LINE IN INPUT
	OPDEF	IONEOU	[TTCALL 15,]	;OUTPUT IMAGE CHAR
;OPDEF ALL CALLI'S FOR USING PROGRAMS

	OPDEF	LIGHTS	[CALLI -1]	;DISPLAY IN LIGHTS
	OPDEF	RESET	[CALLI 0]	;RESET PROGRAM
	OPDEF	DDTIN	[CALLI 1]	;DDT MODE CONSOLE INPUT
	OPDEF	SETDDT	[CALLI 2]	;SET .JBDDT
	OPDEF	DDTOUT	[CALLI 3]	;DDT MODE CONSOLE OUTPUT
	OPDEF	DEVCHR	[CALLI 4]	;GET DEVICE CHARACTERISTICS
	OPDEF	DDTGT	[CALLI 5]	;(HISTORICAL)
	OPDEF	GETCHR	[CALLI 6]	;SAVE AS 4
	OPDEF	DDTRL	[CALLI 7]	;(HISTORICAL)
	OPDEF	WAIT	[CALLI 10]	;WAIT FOR DEVICE INACTIVE
	OPDEF	CORE	[CALLI 11]	;ALLOCATE CORE
	OPDEF	EXIT	[CALLI 12]	;STOP JOB
	OPDEF	MONRT.	[CALLI 1,12]	;MONITOR RETURN
	OPDEF	UTPCLR	[CALLI 13]	;CLEAR DECTAPE DIRECTORY
	OPDEF	DATE	[CALLI 14]	;GET DATE
	OPDEF	LOGIN	[CALLI 15]	;LOGIN
	OPDEF	APRENB	[CALLI 16]	;ENABLE TRAPS
	OPDEF	LOGOUT	[CALLI 17]	;LOGOUT OR EXIT
	OPDEF	SWITCH	[CALLI 20]	;READ CONSOLE SWITCHES
	OPDEF	REASSI	[CALLI 21]	;REASSIGN DEVICES
	OPDEF	TIMER	[CALLI 22]	;READ TIME OF DAY IN TICKS
	OPDEF	MSTIME	[CALLI 23]	;READ TIME OF DAY IN MSEC.
	OPDEF	GETPPN	[CALLI 24]	;RETURN PPN OF THIS JOB
	OPDEF	TRPSET	[CALLI 25]	;ENABLE I/O MODE
	OPDEF	TRPJEN	[CALLI 26]	;(ILLEGAL)
	OPDEF	RUNTIM	[CALLI 27]	;RETURN MSEC TIME THIS JOB
	OPDEF	PJOB	[CALLI 30]	;RETURN JOB NUMBER
	OPDEF	SLEEP	[CALLI 31]	;SLEEP
	OPDEF	SETPOV	[CALLI 32]	;(HISTORICAL)
	OPDEF	PEEK	[CALLI 33]	;READ ABSOL. CORE ADDRESS
	OPDEF	GETLIN	[CALLI 34]	;GET NAME OF TERMINAL
	OPDEF	RUN	[CALLI 35]	;RUN PROGRAM
	OPDEF	SETUWP	[CALLI 36]	;DIDDLE USER WRITE PROTECT
	OPDEF	REMAP	[CALLI 37]	;REMAP LOW TO HIGH SEG
	OPDEF	GETSEG	[CALLI 40]	;GET NEW HIGH SEG
	OPDEF	GETTAB	[CALLI 41]	;READ MONITOR TABLE
	OPDEF	SPY	[CALLI 42]	;SPY ON MONITOR
	OPDEF	SETNAM	[CALLI 43]	;CHANGE NAME OF PROGRAM
	OPDEF	TMPCOR	[CALLI 44]	;ACCESS TMPCOR
	OPDEF	DSKCHR	[CALLI 45]	;RETURN DISK CHARACTERISTICS
	OPDEF	SYSSTR	[CALLI 46]	;RETURN ALL S/L
	OPDEF	JOBSTR	[CALLI 47]	;RETURN JOB S/L
	OPDEF	STRUUO	[CALLI 50]	;DIDDLE STRS
	OPDEF	SYSPHY	[CALLI 51]	;RETURN ALL DISK UNITS
	OPDEF	FRECHN	[CALLI 52]	;(FUTURE)
	OPDEF	DEVTYP	[CALLI 53]	;RETURN DEVICE PROPERTIES
	OPDEF	DEVSTS	[CALLI 54]	;RETURN LAST CONI
	OPDEF	DEVPPN	[CALLI 55]	;RETURN PPN OF ERSATZ DEVICE
	OPDEF	SEEK	[CALLI 56]	;SEEK DISK
	OPDEF	RTTRP	[CALLI 57]	;CONNECT RT DEVICE
	OPDEF	LOCK	[CALLI 60]	;LOCK IN CORE
	OPDEF	JOBSTS	[CALLI 61]	;RETURN JOB STATUS
	OPDEF	LOCATE	[CALLI 62]	;CHANGE LOGICAL STATION
	OPDEF	WHERE	[CALLI 63]	;RETURN PHYSICAL STATION
	OPDEF	DEVNAM	[CALLI 64]	;RETURN PHYSICAL NAME
	OPDEF	CTLJOB	[CALLI 65]	;RETURN CONTROLLING JOB
	OPDEF	GOBSTR	[CALLI 66]	;RETURN NEXT JOB S/L
	OPDEF	ACTIVAT	[CALLI 67]	;(FUTURE)
	OPDEF	DEACTI	[CALLI 70]	;(FUTURE)
	OPDEF	HPQ	[CALLI 71]	;SET HPQ RUN
	OPDEF	HIBER	[CALLI 72]	;SLEEP ON EVENT
	OPDEF	WAKE	[CALLI 73]	;WAKE SOME JOB
	OPDEF	CHGPPN	[CALLI 74]	;CHANGE PPN
	OPDEF	SETUUO	[CALLI 75]	;GENERAL SET SYS PARAMS
	OPDEF	DEVGEN	[CALLI 76]	;(FUTURE)
	OPDEF	OTHUSR	[CALLI 77]	;CHECK FOR ANOTHER USER
	OPDEF	CHKACC	[CALLI 100]	;VALIDATE FILE ACCESS
	OPDEF	DEVSIZ	[CALLI 101]	;GET BUFFER SIZES
	OPDEF	DAEMON	[CALLI 102]	;REQUEST DAEMON FUNCTION
	OPDEF	JOBPEK	[CALLI 103]	;READ/WRITE ANOTHER JOB
	OPDEF	ATTACH	[CALLI 104]	;ATTACH TTY/JOB
	OPDEF	DAEFIN	[CALLI 105]	;DAEMON INDICATES DONE
	OPDEF	FRCUUO	[CALLI 106]	;FORCE COMMAND ON JOB
	OPDEF	DEVLNM	[CALLI 107]	;SET LOGICAL NAME
	OPDEF	PATH.	[CALLI 110]	;DEAL WITH DIRECTORY PATHS
	OPDEF	METER.	[CALLI 111]	;PERFORMANCE METERING
	OPDEF	MTCHR.	[CALLI 112]	;GET MAG TAPE CHARACTERISTICS
	OPDEF	JBSET.	[CALLI 113]	;SETUUO FOR ARBITRARY JOB
	OPDEF	POKE.	[CALLI 114]	;CHANGE MONITOR
	OPDEF	TRMNO.	[CALLI 115]	;JOB'S TERMINAL NUMBER
	OPDEF	TRMOP.	[CALLI 116]	;TERMINAL OPERATION
	OPDEF	RESDV.	[CALLI 117]	;RESET CHANNEL
	OPDEF	UNLOK.	[CALLI 120]	;UNLOCK A LOCKED JOB
	OPDEF	DISK.	[CALLI 121]	;MISC. DISK FUNCTIONS
	OPDEF	DVRST.	[CALLI 122]	;RESTRICT DEVICE TO OPER
	OPDEF	DVURS.	[CALLI 123]	;UNRESTRICT DEVICE
	OPDEF	XTTSK.	[CALLI 124]	;DA28C FUNCTIONS
	OPDEF	CAL11.	[CALLI 125]	;DL10 MULTI-FUNCTION
	OPDEF	MTAID.	[CALLI 126]	;SET MAG TAPE ID
	OPDEF	IONDX.	[CALLI 127]	;RETURN UNIVERSAL DEVICE INDEX
	OPDEF	CNECT.	[CALLI 130]	;CONNECT TO MPX
	OPDEF	MVHDR.	[CALLI 131]	;MOVE BUFFER HEADER
	OPDEF	ERLST.	[CALLI 132]	;ERROR LIST
	OPDEF	SENSE.	[CALLI 133]	;SENSE
	OPDEF	CLRST.	[CALLI 134]	;CLEAR STATUS
	OPDEF	PIINI.	[CALLI 135]	;INITIALIZE SOFT. PI SYS
	OPDEF	PISYS.	[CALLI 136]	;MANIPULATE SOFT. PI SYS
	OPDEF	DEBRK.	[CALLI 137]	;DISMISS SOFT. PI INTER.
	OPDEF	PISAV.	[CALLI 140]	;SAVE SOFT. PI SYS
	OPDEF	PIRST.	[CALLI 141]	;RESTORE SOFT. PI SYS
	OPDEF	IPCFR.	[CALLI 142]	;IPCF READ
	OPDEF	IPCFS.	[CALLI 143]	;IPCF SEND
	OPDEF	IPCFQ.	[CALLI 144]	;IPCF QUERY
	OPDEF	PAGE.	[CALLI 145]	;PAGING UUO
	OPDEF	SUSET.	[CALLI 146]	;SUPER USETI/O
	OPDEF	COMPT.	[CALLI 147]	;CALL COMPATABILITY PACKAGE
	SUBTTL	GETTAB CONSTITUENTS

.GTSTS==0	;JOB STATUS
.GTADR==1	;JOB RELOCATION AND PROTECTION
.GTPPN==2	;PROJ-PROG NUMBER
.GTPRG==3	;PROGRAM NAME
.GTTIM==4	;TOTAL RUN TIME IN TICKS
.GTKCT==5	;KILO-CORE TICKS
.GTPRV==6	;PRIV WORD
	JP.IPC==1B0	;IPCF PRIVILEGED FUNCTIONS
	JP.DPR==3B2	;HIGHEST DISK PRIORITY
	JP.MET==1B3	;METER UUO
	JP.POK==1B4	;POKE MONITOR
	JP.CCC==1B5	;CHANGE CPU SPECIFICATION
	JP.HPQ==17B9	;HI PRIORITY QUEUE
	JP.NSP==1B10	;UNSPOOL DEVICES
	JP.RTT==1B13	;RTTRP UUO
	JP.LCK==1B14	;LOCK UUO
	JP.TRP==1B15	;TRAPSET UUO
	JP.SPA==1B16	;SPY ON ALL CORE
	JP.SPM==1B17	;SPY ON MONITOR
.GTSWP==7	;SWAPPING POINTERS
.GTTTY==10	;TTY TABLE
.GTCNF==11	;CONFIGURATION
	%CNFG0==0,,11	;NAME OF SYSTEM
	%CNFG1==1,,11	; ..
	%CNFG2==2,,11	; ..
	%CNFG3==3,,11	; ..
	%CNFG4==4,,11	; ..
	%CNDT0==5,,11	;DATE OF SYSTEM
	%CNDT1==6,,11	; ..
	%CNTAP==7,,11	;NAME OF SYSTEM DEVICE
	%CNTIM==10,,11	;TIME OF DAY
	%CNDAT==11,,11	;DATE IN BINARY
	%CNSIZ==12,,11	;SYSTEM MEMORY SIZE
	%CNOPR==13,,11	;NAME OF OPR TTY
	%CNDEV==14,,11	;LH = DDB CHAIN
	%CNSJN==15,,11	;LH=-SEGN, RH=JOBN NUMBERS
	%CNTWR==16,,11	;NON-ZERO IS DUAL SEGMENTS
	%CNSTS==17,,11	;SYSTEM STATES
		ST%DSK==1B0	;DISK SYSTEM
		ST%SWP==1B1	;SWAPPING SYSTEM
		ST%LOG==1B2	;LOGIN
		ST%FTT==1B3	;FULL DUPLEX TTY SOFTWARE
		ST%PRV==1B4	;PRIVILEGES
		ST%TWR==1B5	;DUAL SEGMENT SOFTWARE
		ST%CYC==1B6	;50 HERTZ CLOCK
		ST%TDS==7B9	;TYPE OF DISK SYSTEM
		ST%IND==1B10	;IND. PPNS ON DISK
		ST%IMG==1B11	;IMAGE MODE TTYS
		ST%DUL==1B12	;DUAL PROCESSOR SYSTEM
		ST%MRB==1B13	;MULTIPLE RIBS SUPPORTED
		ST%HPT==1B14	;HIGH PRECISION TIME ACCOUNTING
		ST%EMO==1B15	;EXCLUDE OVERHEAD FROM TIME ACCOUNTING
		ST%RTC==1B16	;REAL TIME CLOCK
		ST%MBF==1B17	;MADE FOR FOROTS
		ST%NOP==1B27	;NO OPERATOR IN ATTENDANCE
		ST%NSP==1B28	;UNSPOOL DEVICES
		ST%ASS==1B29	;ASSIGN/INIT DEVICES
		ST%NRT==1B32	;NO REMOTE TTY'S
		ST%BON==1B33	;BATCH ONLY
		ST%NRL==1B34	;NO REMOTE LOGINS
		ST%NLG==1B35	;NO LOGINS EXCEPT CTY/OPR
	%CNSER==20,,11	;APR SERIAL NUMBER
	%CNNSM==21,,11	;NANO-SECS PER MEMORY CYCLE
	%CNPTY==22,,11	;LH=NUMBER FIRST INV. TTY, RH=NUMBER PTYS
	%CNFRE==23,,11	;POINTER FOR BIT MAP OF CORE BLOCKS
	%CNLOC==24,,11	;LOCATION OF LOW CORE CORE BLOCKS
	%CNSTB==25,,11	;POINTER TO STATION BLOCK CHAIN
	%CNOPL==26,,11	;OPR LDB ADDRESS
	%CNTTF==27,,11	;POINTER TO TTY FREE CHUNKS
	%CNTTC==30,,11	;LH=NUMBER OF TTY CHUNKS, RH=ADDR OF FIRST
	%CNTTN==31,,11	;NUMBER OF FREE CHUNKS
	%CNLNS==32,,11	;POINTER TO CURRENT COMMAND TTY
	%CNLNP==33,,11	;POINTER TO TTY LINE TABLE
	%CNVER==34,,11	;MONITOR VERSION
	%CNDSC==35,,11	;POINTER TO DATA SET CONTROL TABLE
	%CNDLS==36,,11	;LAST RECIEVE INT. FROM DC10 (PRE 5.07)
	%CNCCI==37,,11	;LAST RECIEVE INT. FROM 680I (PRE 5.07)
	%CNSGT==40,,11	;LAST DORM. SEG THROWN AWAY
	%CNPOK==41,,11	;ADDRESS OF LAST POKED LOCATION
	%CNPUC==42,,11	;LH=JOB, RH=COUNT OF POKES
	%CNWHY==43,,11	;REASON FOR LAST RELOAD
	%CNTIC==44,,11	;NUMBER OF TICKS PER SECOND
	%CNPDB==45,,11	;POINTER TO PDB POINTER TABLES
	%CNRTC==46,,11	;RESOLUTION OF RUNTIME CLOCK (UNITS/SEC)
	%CNCHN==47,,11	;LH=PTR TO CHANNEL D.B. LIST,RH=UNUSED
	%CNLMX==50,,11	;LOGMAX (MAX JOBS TO BE LOGGED IN)
	%CNBMX==51,,11	;BATMAX (MAX BATCH JOBS)
	%CNBMN==52,,11	;BATMIN (MIN JOBS RESERVED FOR BATCH)
	%CNDTM==53,,11	;INTERNAL FORMAT DATE,,TIME
	%CNLNM==54,,11	;NUMBER OF JOBS LOGGED IN
	%CNBNM==55,,11	;NUMBER OF BATCH JOBS LOGGED IN
	%CNYER==56,,11	;LOCAL YEAR
	%CNMON==57,,11	;LOCAL MONTH
	%CNDAY==60,,11	;LOCAL DAY OF MONTH
	%CNHOR==61,,11	;LOCAL HOUR
	%CNMIN==62,,11	;LOCAL MINUTES
	%CNSEC==63,,11	;LOCAL SECONDS
	%CNGMT==64,,11	;TIME FROM GMT IN INTERNAL FORMAT
	%CNDBG==65,,11	;DEBUGGING STATUS WORD
		ST%DBG==1B0	;SYSTEM DEBUGGING
		ST%RDC==1B1	;RELOAD ON DEBUF STOPCD
		ST%RJE==1B2	;RELOAD ON JOB STOPCD
		ST%NAR==1B3	;NO AUTO RELOADS
		ST%CP1==1B4	;IF SECOND CPU STOPS, STOP CPU0
	%CNFRU==66,,11	;MONITOR FREE CORE USED
	%CNTCM==67,,11	;MAX TTY CHUNKS
	%CNCVN==70,,11	;CUSTOMER VERSION (136)
	%CNDVN==71,,11	;DEC VERSION (137)
	%CNDFC==72,,11	;NUMBER OF DF10 DATA CHANS
	%CNRTD==73,,11	;NUMBER OF RT DEVICES
	%CNHPQ==74,,11	;NUMBER OF HPQ'S
	%CNLDB==75,,11	;TTY DDB WORD POINTING TO LDB
	%CNMVO==76,,11	;MAX VECTOR OFFSET FOR PISYS.
	%CNMIP==77,,11	;MAX PRIORITY FOR PISYS.
	%CNMER==100,,11	;ADDR OF MTA0,,OFFSET OF MTA ERR RPT WORD
	%CNET1==101,,11	;USER ADDRESS OF EXEC'S AC T1
	%CNLSD==102,,11	;LENGTH OF SHORT DDB
	%CNLLD==103,,11	;LENGTH OF LONG DDB
	%CNLDD==104,,11	;LENGTH OF DISK DDB
	%CNEXM==105,,11	;ADDRESS IN JOBDAT OF LAST E/D COMMAND
	%CNST2==106,,11	;MORE CONFIGURATION FEATURE INDICATORS
		ST%NSE==1B29	;NON-SUPERSEDING ENTER
		ST%MSG==1B30	;MSGSER INCLUDED
		ST%PSI==1B31	;PSISER INCLUDED
		ST%IPC==1B32	;IPCF INCLUDED
		ST%VMS==1B33	;VMSER INCLUDED
		ST%MER==1B34	;MTA ERROR REPORTING
		ST%SSP==1B35	;SWAP SPACE IN PAGES
	%CNPIM==107,,11	;MINIMUM CONDITION IN PISYS
	%CNPIL==110,,11	;LENGTH OF INTERNAL PIT'S
	%CNPIA==111,,11	;ADDRESS OF JBTPIA
	%CNMNT==112,,11	;MONITOR TYPE
		CN%MNX==1B0	;STRANGE MONITOR
		CN%MNT==77B23	;DEC-KNOWN TYPE
				;1=TOPS 2=ITS 3=TENEX
		CN%MNS==77B29	;DEC SUB TYPE
		CN%MNC==77	;CUSTOMER SUBSUB TYPE
	%CNOCR==113,,11	;FIRST CDR DDB,,OFFSET TO CARD COUNT
	%CNOCP==114,,11	;DITTO FOR CDP
	%CNPGS==115,,11	;UNIT OF CORE ALLOCATION

.GTNSW==12	;NON-SWAPPING DATA TABLE
	%NSCMX==10,,12	;SYSTEM CORMAX (LARGEST USER JOB+1)
	%NSCLS==11,,12	;BYTE POINTER TO LAST FREE CORE AREA
	%NSCTL==12,,12	;VIRTUAL CORE TALLY
	%NSSHW==13,,12	;JOB NUMBER STOPPED BY SHUFFLER
	%NSHLF==14,,12	;ADDRESS OF LOWEST HOLE IN SYSTEM
	%NSUPT==15,,12	;UPTIME (TICKS)
	%NSSHF==16,,12	;WORDS SHUFFLED BY SYSTEM
	%NSSTU==17,,12	;SYSTEM TAPE USER
	%NSHJB==20,,12	;HIGHEST JOB NUMBER IN USE
	%NSCLW==21,,12	;WORDS CLEARED BY SYSTEM
	%NSLST==22,,12	;LOST TIME
	%NSMMS==23,,12	;MEMORY SIZE
	%NSTPE==24,,12	;TOTAL MEMEORY PARITY ERRORS
	%NSSPE==25,,12	;SPURIOUS MEMORY PARITY ERRORS
	%NSMPC==26,,12	;MULTIPLE MEMORY PARITY ERRORS
	%NSMPA==27,,12	;LAST MEMORY PARITY ADDRESS
	%NSMPW==30,,12	;LAST MEMORY PARITY WORD
	%NSMPP==31,,12	;LAST MEMORY PARITY PC
	%NSEPO==32,,12	;NUMBER OF EXEC PDL OVERFLOWS NOT RECOVERED
	%NSEPR==33,,12	;NUMBER OF EXEC PDL OVERFLOWS RECOVERED
	%NSMXM==34,,12	;MAX VALUE OF CORMAX
	%NSKTM==35,,12	;KSYS TIMER
	%NSCMN==36,,12	;CORMIN
	%NSABC==37,,12	;COUNT OF ADDRESS BREAKS
	%NSABA==40,,12	;ADDRESS OF ADDRESS BREAKS
	%NSLJR==41,,12	;LAST JOB RUN
	%NSACR==42,,12	;ACCUMULATED CPU RESPONSE
	%NSNCR==43,,12	;NUMBER OF CPU RESPONSES
	%NSSCR==44,,12	;ACCUMULATED SQUARE OF CPU RESPONSE
		;*** NO MORE GROWTH--SEE .GTC0V
.GTSDT==13	;SWAPPING DATA TABLE
	%SWBGH==0,,13	;BIG HOLE
	%SWFIN==1,,13	;FINISH
	%SWFRC==2,,13	;FORCE
	%SWFIT==3,,13	;FIT
	%SWVRT==4,,13	;VIRTAL
	%SWERC==5,,13	;SWAP ERROR COUNT
	%SWPIN==6,,13	;-1 IF SWAP IN AND FTPDBS=1
.GTSGN==14	;SEGMENT NUMBERS
	SN%SHR==1B1	;SHARABLE SEGMENT
	SN%LOK==1B5	;HIGH SEGMENT IS LOCKED
.GTODP==15	;ONCE ONLY DISK PARAMETERS
	%ODSWP==0,,15	;HIGHEST SWAPPING IN 4-SERIES
	%ODK4S==1,,15	;K FOR SWAPPING
	%ODPRT==2,,15	;IN CORE PROTECT TIME MULTIPLIER
	%ODPRA==3,,15	;IN CORE PROTECT TIME OFFSET
.GTLVD==16	;LEVEL-D PARAMETERS
	%LDMFD==0,,16	;MFD PPN [1,1]
	%LDSYS==1,,16	;SYS PPN [1,4]
	%LDFFA==2,,16	;FULL FILE ACCESS PPN [1,2]
	%LDHLP==3,,16	;UNLOGGED IN PPN [2,5]
	%LDQUE==4,,16	;QUE AREA PPN [3,3]
	%LDSPB==5,,16	;FIRST PPB,,NEXT PPB TO SCAN
	%LDSTR==6,,16	;FIRST STR DATA BLOCK,,OFFSET TO NEXT
	%LDUNI==7,,16	;FIRST UNIT DATA BLOCK,,OFFSET TO NEXT
	%LDSWP==10,,16	;FIRST SWAP UNIT,,OFFSET TO NEXT
	%LDCRN==11,,16	;NUMBER OF CORE BLOCKS
	%LDSTP==12,,16	;STANDARD FILE PROTECTION
	%LDUFP==13,,16	;STANDARD UFD PROTECTION
	%LDMBN==14,,16	;NUMBER OF MONITOR BUFFERS
	%LDQUS==15,,16	;QUE STRUCTURE NAME
	%LDCRP==16,,16	;CRASH PPN [10,1]
	%LDSFD==17,,16	;MAX DEPTH OF SFDS TO WRITE
	%LDSPP==20,,16	;SPOOLED FILE PROTECTION
	%LDSYP==21,,16	;STANDARD SYS: PROTECTION
	%LDSSP==22,,16	;STANDARD SYS:.SYS PROTECTION
	%LDMNU==23,,16	;MAX. NEGATIVE USETI WHICH READS EXTENDED RIBS
	%LDMXT==24,,16	;MAX. BLOCKS TO TRANSFER
	%LDNEW==25,,16	;EXPERIMENTAL SYS PPN [1,5]
	%LDOLD==26,,16	;OLD SYS PPN [1,3]
	%LDUMD==27,,16	;USER MODE DIAGNOSTICS PPN [6,6]
	%LDNDB==30,,16	;DEFAULT DISK BUFFERS IN RING
	%LDMSL==31,,16	;MAX UNITS IN A.S.L.
	%LDALG==32,,16	;ALGOL LIBRARY PPN [5,4]
	%LDBLI==33,,16	;BLISS LIBRARY PPN [5,5]
	%LDFOR==34,,16	;FORTRAN LIBRARY PPN [5,6]
	%LDMAC==35,,16	;MACRO LIBRARY PPN (SOURCE NOT UNIVERSALS) [5,7]
	%LDUNV==36,,16	;UNIVERSAL LIBRARY PPN [5,17]
	%LDPUB==37,,16	;PUBLIC USER SOFTWARE LIBRARY PPN [1,6]
		;CONTINUE .GTLVD
	%LDTED==40,,16	;TEXT EDITOR LIBRARY PPN [5,10]
	%LDREL==41,,16	;REL FILE LIBRARY PPN [5,11]
	%LDRNO==42,,16	;RUNOFF LIBRARY PPN [5,12]
	%LDSNO==43,,16	;SNOBOL LIBRARY PPN [5,13]
	%LDDOC==44,,16	;DOC FILE LIBRARY PPN [5,14]
	%LDFAI==45,,16	;FAIL LIBRARY PPN [5,15]
	%LDMUS==46,,16	;MUSIC LIBRARY PPN [5,16]
	%LDDEC==47,,16	;STANDARD DEC SOFTWARE [10,7]
.GTRCT==17	;DISK BLOCKS READ
.GTWCT==20	;DISK BLOCKS WRITTEN
.GTDBS==21	;DISK BLOCK SECONDS
.GTTDB==22	;TIME OF LAST ALLOCATE AND SIZE
.GTSLF==23	;GETTAB IMMEDIATE (SELF)
.GTDEV==24	;DEVICE OR STRUCTURE (SEGMENTS ONLY)
.GTWSN==25	;NAMES OF WAIT STATES
.GTLOC==26	;REMOTE STATION NUMBER
.GTCOR==27	;CORE TABLE
.GTCOM==30	;MONITOR COMMAND NAMES
.GTNM1==31	;USER NAME
.GTNM2==32	; ..
.GTCNO==33	;CHARGE NUMBER
.GTTMP==34	;TMPCOR POINTERS
.GTWCH==35	;WATCH BITS
	JW.WDY==1B1	;DAYTIME AT START
	JW.WRN==1B2	;RUN TIME
	JW.WWT==1B3	;WAIT TIME
	JW.WDR==1B4	;DISK READS
	JW.WDW==1B5	;DISK WRITES
	JW.WVR==1B6	;VERSIONS
	JW.WMT==1B7	;MTA STATISTICS
	JW.WAL==376B8	;WATCH ALL
	JW.WMS==7B11	;/MESSAGE LEVEL
		.JWWPR==1	;PREFIX
		.JWWOL==2	;ONE LINE
		.JWWPO==3	;PRIFIX,FIRST
		.JWWLG==6	;LONG, NO PREFIX
		.JWWPL==7	;PREFIX AND LONG
	JW.WCN==1B9	;/MESSAGE:CONTINUATION
	JW.WFL==1B10	;/MESSAGE:FIRST
	JW.WPR==1B11	;/MESSAGE:PREFIX
.GTSPL==36	;SPOOLING CONTROL
	JS.PRI==7B26	;DISK PRIORITY
	JS.PCR==1B31	;SPOOL CDR
	JS.PCP==1B32	;SPOOL CDP
	JS.PPT==1B33	;SPOOL PTP
	JS.PPL==1B34	;SPOOL PLT
	JS.PLP==1B35	;SPOOL LPT
	JS.PAL==37	;SPOOL ALL
.GTRTD==37	;REAL TIME STATUS
.GTLIM==40	;TIME AND BATCH STATUS
	JB.LCR==777B9	;CORE LIMIT
	JB.LBT==1B10	;BATCH JOB
	JB.LSY==1B11	;GOTTEN FROM SYS:
	JB.LTM==77777777  ;TIME LIMIT TO GO IN JIFFIES
.GTQQQ==41	;SCHEDULING QUEUE HEADERS
.GTQJB==42	;JOB QUEUE LINK
.GTCM2==43	;MONITOR SET COMMAND NAMES
.GTCRS==44	;HARDWARE STATUS FROM CRASH
	CR.SAP==0,,44	;APR CONI
	CR.SPI==1,,44	;PI CONI
	CR.SSW==2,,44	;APR DATAI (SWITCHES)
.GTISC==45	;SWAP IN SCAN TABLES
.GTOSC==46	;SWAP OUT SCAN
.GTSSC==47	;SCHEDULER SCAN
.GTRSP==50	;RESPONSE COUNTER TABLE
.GTSYS==51	;SYSTEM WIDE DATA
	%SYERR==0,,51	;SYSTEM WIDE HARDWARE ERROR COUNT
	%SYCCO==1,,51	;NUMBER OF TIMES COMCNT WAS OFF
	%SYDEL==2,,51	;DISABLED HARDWARE ERROR COUNT
	%SYSPC==3,,51	;LH=3 LETTER CODE OF LAST STOPCD,RH=ADDRESS+1 OF LAST STOPCD
	%SYNDS==4,,51	;NUMBER OF DEBUG STOPCDS
	%SYNJS==5,,51	;NUMBER OF JOB STOPCDS
	%SYNCP==6,,51	;NUMBER OF COMMANDS PROCESSED
	%SYSJN==7,,51	;LAST STOPCD--JOB NUMBER
	%SYSTN==10,,51	;LAST STOPCD--TTY NAME
	%SYSPN==11,,51	;LAST STOPCD--PROGRAM NAME
	%SYSUU==12,,51	;LAST STOPCD--UUO
	%SYSUP==13,,51	;LAST STOPCD--USER PC
.GTWHY==52	;OPERATOR WHY COMMENTS IN ASCIZ
.GTTRQ==53	;TOTAL TIME IN RUN QUEUES WHETHER OR NOT RUNNING
.GTSPS==54	;SECOND PROCESSOR STATUS
	SP.SC0==1B29	;SET CPU COMMAND (OK TO USE)
	SP.CR0==1B35	;SET CPU UUO (OK TO USE)
		;OTHERS BY SHIFTING LEFT 1 BIT/PROCESSOR
.GTC0C==55	;CPU0 CDB CONSTANTS
.GTC0V==56	;CPU0 CDB VARIABLES
.GTC1C==57	;CPU1 CDB CONSTANTS
.GTC1V==60	;CPU1 CDB VARIABLES
.GTC2C==61	;CPU2 CDB CONSTANTS
.GTC2V==62	;CPU2 CDB VARIABLES
.GTC3C==63	;CPU3 CDB CONSTANTS
.GTC3V==64	;CPU3 CDB VARIABLES
.GTC4C==65	;CPU4 CDB CONSTANTS
.GTC4V==66	;CPU4 CDB VARIABLES
.GTC5C==67	;CPU5 CDB CONSTANTS
.GTC5V==70	;CPU5 CDB VARIABLES
	%CCPTR==0,,55	;LH=POINTER TO NEXT CDB
	%CCSER==1,,55	;APR SERIAL NUMBER
	%CCOKP==2,,55	;CPU OK IF LE 0, JIFFIES DEAD IF GT 0
	%CCTOS==3,,55	;TRAP OFFSET FOR KA10 INTERRUPT LOCATIONS
	%CCLOG==4,,55	;LOGICAL NAME (CPUN)
	%CCPHY==5,,55	;PHYSICAL NAME (CPXN)
	%CCTYP==6,,55	;TYPE OF PROCESSOR (LH-DEC, RH-CUST)
		.CC166==1	;PDP-6
		.CCKAX==2	;KA-10
		.CCKIX==3	;KI-10
	%CCMPT==7,,55	;REL. GETTAB POINTER TO BAD ADDRESS TABLE
	%CCRTC==10,,55	;REAL TIME CLOCK (DK10) DDB
	%CCRTD==11,,55	;REAL TIME CLOCK DDB IF HI PREC. TIME ACCT.
	%CCPAR==12,,55	;REL. GETTAB POINTER TO PARITY SUMMARY
	%CCRSP==13,,55	;REL. GETTAB POINTER TO RESPONSE SUMMARY
	%CCDKX==14,,55	;NUMBER OF DK10'S ON THIS CPU
	%CVUPT==5,,56	;UPTIME
	%CVLST==12,,56	;LOST TIME
	%CVTPE==14,,56	;TOTAL MEMORY PARITY ERRORS
	%CVSPE==15,,56	;SPURIOUS MEMORY PARITY ERRORS
	%CVMPC==16,,56	;MULTIPLE MEMORY PARITY ERRORS
	%CVMPA==17,,56	;MEMORY PARITY ADDRESS
	%CVMPW==20,,56	;MEMORY PARITY WORD
	%CVMPP==21,,56	;MEMORY PARITY PC
		;HOLES ABOVE HERE BECAUSE OF .GTNSW COMPATABILITY
	%CVABC==27,,56	;ADDRESS BREAK COUNT
	%CVABA==30,,56	;ADDRESS BREAK ADDRESS
	%CVLJR==31,,56	;LAST JOB RUN
			;(OBSOLETE)
	%CVSTS==35,,56	;STOP TIME-SHARING THIS CPU
	%CVRUN==36,,56	;OPERATOR CONTROLLED SCHEDULING
		CV%RUN==1B0	;DON'T RUN JOBS
	%CVNUL==37,,56	;NULL TIME
	%CVEDI==40,,56	;LH=PC,RH=COUNT OF EXEC DON'T CARE INTERRUPTS.
	%CVJOB==41,,56	;CURRENT JOB
	%CVOHT==42,,56	;OVERHEAD TIME IN JIFFIES (EXC. UUOS)
	%CVEVM==43,,56	;MAX EVM FOR LOCK UUO MAPPING
	%CVEVU==44,,56	;USED EVM FOR LOCK UUO MAPPING
	%CVLLC==45,,56	;LOCK LOOP COUNT
	%CVTUC==46,,56	;TOTAL UUO COUNT
	%CVTJC==47,,56	;TOTAL JOB CONTEXT SWITCH COUNT
	%CVRSO==0	;(REL.) SUM TTY OUT UUO RESPONSE
	%CVRNO==1	;(REL.) NUMBER TTY OUT UUO RESPONSE
	%CVRHO==2	;(REL.) HI-SUM SQ TTY OUT UUO RESPONSE
	%CVRLO==3	;(REL.) LO-SUM SQ TTY OUT UUO RESPONSE
	%CVRSI==4	;(REL.) SUM TTY INP UUO RESPONSE
	%CVRNI==5	;(REL.) NUMBER TTY INP UUO RESPONSE
	%CVRHI==6	;(REL.) HI-SUM SQ TTY INP UUO RESPONSE
	%CVRLI==7	;(REL.) LO-SUM SQ TTY INP UUO RESPONSE
	%CVRSR==10	;(REL.) SUM QUANTUM REQ RESPONSE
	%CVRNR==11	;(REL.) NUMBER QUANTUM REQ RESPONSE
	%CVRHR==12	;(REL.) HI-SUM SQ QUANTUM REQ RESPONSE
	%CVRLR==13	;(REL.) LO-SUM SQ QUANTUM REQ RESPONSE
	%CVRSX==14	;(REL.) SUM ONE OF ABOVE RESPONSE
	%CVRNX==15	;(REL.) NUMBER ONE OF ABOVE RESPONSE
	%CVRHX==16	;(REL.) HI-SUM SQ ONE OF ABOVE RESPONSE
	%CVRLX==17	;(REL.) LO-SUM SQ ONE OF ABOVE RESPONSE
	%CVRSC==20	;(REL.) SUM CPU RESPONSE
	%CVRNC==21	;(REL.) NUMBER CPU RESPONSE
	%CVRHC==22	;(REL.) HI-SUM SQ CPU RESPONSE
	%CVRLC==23	;(REL.) LO-SUM SQ CPU RESPONSE
	%CVPLA==0	;(REL.) HIGHEST ADDRESS OF PARITY ERROR
	%CVPMR==1	;(REL.) ADDRESS IN SEGMENT OF PARITY ERROR
	%CVPTS==2	;(REL.) NUMBER OF PARITIES THIS SWEEP
	%CVPSC==3	;(REL.) NUMBER OF PARITY SWEEPS
	%CVPUE==4	;(REL.) NUMBER OF USER ENABLED PARITY ERRORS
	%CVPAA==5	;(REL.) AND OF BAD ADDRESS THIS SWEEP
	%CVPAC==6	;(REL.) AND OF BAD CONTENTS THIS SWEEP
	%CVPOA==7	;(REL.) IOR OF BAD ADDRESS THIS SWEEP
	%CVPOC==10	;(REL.) IOR OF BAD CONTENTS THIS SWEEP
	%CVPCS==11	;(REL.) NUMBER OF SPURIOUS CHANNER ERRORS
.GTFET==71	;FEATURE TEST SETTINGS
	%FTUUO==0,,71	;UUOS
		F%PI==000,,1B24	;SOFT. PI SYS
		F%IPCF==0,,1B25	;IPCF
		F%CCIN==0,,1B26	;CONTROL-C INTERCEPT
		F%PTYU==0,,1B27	;JOBSTS AND CNTLJOB UUOS
		F%PEEK==0,,1B28	;PEEK UUO
		F%POKE==0,,1B29	;POKE. UUO
		F%JCON==0,,1B30	;JOB CONTINUE
		F%SPL==00,,1B31	;SPOOLING
		F%PRV==00,,1B32	;JOB PRIVS
		F%DAEM==0,,1B33	;DAEMON FUNCTIONS, ETC.
		F%GETT==0,,1B34	;GETTAB UUO
		F%2REL==0,,1B35	;2-REGISTER RELOCATION
	%FTRTS==1,,71	;REAL TIME AND SCHEDULER
		F%VM==001,,1B26	;VIRTUAL MEMORY
		F%SWAP==1,,1B27	;SWAPPER (DEFINED IN S)
		F%SHFL==1,,1B28	;SHUFFLER
		F%RTC==01,,1B29	;DK10 SERVICE
		F%LOCK==1,,1B30	;LOCK UUO
		F%TRPS==1,,1B31	;TRPSET UUO
		F%RTTR==1,,1B32	;RTTRAP UUO
		F%SLEE==1,,1B33	;SLEEP UUO
		F%HIBW==1,,1B34	;HIBER/WAKE UUOS
		F%HPQ==01,,1B35	;HIGH PRIORITY RUN QUEUES
	%FTCOM==2,,71	;COMMANDS
		F%CCL==02,,1B23	;COMPIL COMMANDS (DEFINED IN S)
		F%CCLX==2,,1B24	;COMPIL-CLASS
		F%QCOM==2,,1B25	;QUEUE AND FRIENDS
		F%SET==02,,1B26	;SET UUO/COMMAND
		F%VERS==2,,1B27	;VERSION
		F%BCOM==2,,1B28	;BATCH CONTROL FILE
		F%SEDA==2,,1B29	;SET DAYTIME AND SET DATE
		F%WATC==2,,1B30	;WATCH
		F%FINI==2,,1B31	;FINISH AND CLOSE
		F%REAS==2,,1B32	;REASSIGN UUO/COMMAND
		F%EXAM==2,,1B33	;E AND D
		F%TALK==2,,1B34	;SEND
		F%ATTA==2,,1B35	;ATTACH COMMAND/UUO
	%FTACC==3,,71	;ACCOUNTING INFO
		F%TLIM==3,,1B31	;TIME/CORE LIMITS, ETC.
		F%CNO==03,,1B32	;CHARGE NUMBER
		F%UNAM==3,,1B33	;USER NAME
		F%KCT==03,,1B34	;KILO-CORE-TICKS
		F%TIME==3,,1B35	;RUN TIME
	%FTERR==4,,71	;ERROR CONTROL AND OPTIONS
		F%22BI==4,,1B25	;22 BIT CHANNEL (DF10C)
		F%PDBS==4,,1B26	;SWAPPING PDB
		F%KI10==4,,1B27	;KI10 FEATURES AT STATRUP TIME
		F%METR==4,,1B28	;METER. UUO
		F%EXON==4,,1B29	;EXECUTE ONLY FILES (ALWAYS 1 SINCE 5.06)
		F%KII==04,,1B30	;KI-10 INSTR CHECK ON KA10
		F%BOOT==4,,1B31	;BOOTS BOOTSTRAP
		F%2SWP==4,,1B32	;MULT. SWAPPING DEVICES
		F%EL==004,,1B33	;DAEMON ERROR LOGGING
		F%MS==004,,1B34	;MULTI-PROCESSORS
		F%MEMP==4,,1B35	;MEMORY PARITY RECOVERY CODE
	%FTDEB==5,,71	;DEBUGGING FEATURES
		F%RSP==05,,1B28	;RESPONSE TIME
		F%WHY==05,,1B29	;WHY RELOAD
		F%PATT==5,,1B30	;PATCH SPACE IN TABLES
		F%TRAC==5,,1B31	;BACK TRACKING FEATURES
		F%HALT==5,,1B32	;HALTS IN MONITOR
		F%RCHK==5,,1B33	;INTERNAL REDUNDANCY CHECKS
		F%MONP==5,,1B34	;MONITOR WRITE PROTECTED
		F%CHEC==5,,1B35	;MONITOR CHECKSUMMED
	%FTSTR==6,,71	;FILE STRUCTURE PARAMS
		F%NUL==06,,1B21	;NUL
		F%LIB==06,,1B22	;LIB/SYS/SXS
		F%DPRI==6,,1B23	;DISK PRIORITY TRANSFERS
		F%APLB==6,,1B24	;APPEND TO LAST BLOCK
		F%AIR==06,,1B25	;APPEND IMPLIES READ
		F%GSRC==6,,1B26	;GENERIC DEVICE SEARCH
		F%DRDR==6,,1B27	;RENAME ACROSS DIRECTORIES
		F%DSEK==6,,1B28	;SEEK UUO
		F%DSUP==6,,1B29	;SUPER USETI/O
		F%DQTA==6,,1B30	;DISK QUOTAS
		F%STR==06,,1B31	;MULTIPLE STRUCTURES
		F%5UUO==6,,1B32	;MISC. 5-SERIES UUOS
		F%PHYO==6,,1B33	;PHYSICAL ONLY
		F%SFD==06,,1B34	;SUB FILE DIRECTORIES
		F%MOUN==6,,1B35	;STRUUO FUNCTIONS
	%FTDSK==7,,71	;INTERNAL DISK PARAMS
		F%CBDB==7,,1B21	;DEBUG CB INTERLOCK
		F%LOGI==7,,1B22	;LOGIN (DEFINED IN S)
		F%DISK==7,,1B23	;DISK SYSTEM (DEFINED IN S)
		F%FFRE==7,,1B24	;PREVENT RACES IN FILFND
		F%SWPE==7,,1B25	;SWAP READ ERROR RECOVERY
		F%DBBK==7,,1B26	;BAD BLOCK MARKING
		F%DUFC==7,,1B27	;UFD COMPRESSOR
		F%DETS==7,,1B28	;DISK ERROR SIMULATOR
		F%DMRB==7,,1B29	;MULTI RIBS
		F%DSMC==7,,1B30	;SMALLER ALLOC. OF DISK CORE BLOCKS
		F%DALC==7,,1B31	;ALLOCATION OPTIMISATIONS
		F%DSTT==7,,1B32	;DISK USAGE STATISTICS
		F%DHNG==7,,1B33	;HUNG DISK RECOVERY
		F%DBAD==7,,1B34	;DISK OFF-LINE RECOVERY
		F%DOPT==7,,1B35	;LATENCY OPTIMIZATION
	%FTSCN==10,,71	;SCANNER OPTIONS
		F%TYPE==10,,1B24;TYPESET-10 FEATURES IN DC76
		F%2741==10,,1B25;SUPPORT 2741-LIKE TERMINALS
		F%CAFE==10,,1B26;DC76
		F%TBLK==10,,1B27;TTY BLANK COMMAND
		F%TPAG==10,,1B28;PAGE AND DISPLAY KNOWLEDGE
		F%DIAL==10,,1B29;AUTO DIALER
		F%SCLC==10,,1B30;SPECIAL LINE CONTROL
		F%SCNR==10,,1B31;HARDWARE SCANER
		F%MODM==10,,1B32;MODEM CONTROL
		F%630H==10,,1B33;SINGLE SCANNER 630
		F%GPO2==10,,1B34;U.K. MODEM SUPPORT
		F%HDPX==10,,1B35;TRULY HALF DUPLEX TERMINALS
	%FTPER==11,,71	;I/O PARAMS
		F%MSGS==11,,1B25;MSGSER (MPX DEVICE)
		F%HSLN==11,,1B26;HIGH-SPEED LOGICAL DEVICE SEARCH
		F%CPTR==11,,1B27;CDP TROUBLE INTERCEPT
		F%CRTR==11,,1B28;CDR TROUBLE INTERCEPT
		F%CTY1==11,,1B29;SUPPORT CTY1
		F%REM==011,,1B30;REMOTE STATION SOFTWARE
		F%LPTR==11,,1B31;LPT DEVICE ERROR RECOVERY
		F%OPRE==11,,1B32;DEVICE ERRS TO OPER
		F%CDRS==11,,1B33;CDR SUPER IMAGE MODE
		F%MTSE==11,,1B34;MTA DENSITY/BLOCK COMMANDS
		F%TMP==011,,1B35;TMPCOR AREA
.GTEDN==72	;ERSATZ DEVICE NAMES
.GTSCN==73	;SCANNER DATA
	%SCNRI==0,,73	;NUMBER OF RCV INTERRUPTS
	%SCNXI==1,,73	;NUMBER OF XMT INTERRUPTS
	%SCNEI==2,,73	;NUMBER OF ECHO INTERRUPTS (IN XI)
	%SCNMB==3,,73	;MAX BUFFER SIZE
	%SCNAL==4,,73	;NUMBER OF ACTIVE LINES
.GTSNA==74	;LAST SEND ALL IN 9-BIT
	%SCNAE==0,,74	;BYTE POINTER TO END BYTE IN MESSAGE
	%SCNAS==1,,74	;BYTE POINTER TO FIRST-1 BYTE IN MESSAGE
	%SCNAM==2,,74	;FIRST WORD OF DATA IN MESSAGE
.GTCMT==75	;SET TTY COMMAND NAMES
.GTPID==76	;PROCESS COMMUNICATION ID (IPCF)
.GTIPC==77	;IPCF MISC. DATA
	%IPCML==0,,77	;MAX. PACKET LENGTH
	%IPCSI==1,,77	;PID OF SYSTEM-WIDE [SYSTEM]INFO
	%IPCDQ==2,,77	;DEFAULT QUOTA
	%IPCTS==3,,77	;TOTAL PACKETS SENT
	%IPCTO==4,,77	;TOTAL PACKETS OUTSTANDING
	%IPCCP==5,,77	;PID OF [SYSTEM]IPCC
	%IPCPM==6,,77	;PID MASK
	%IPCMP==7,,77	;LENGTH OF PID TABLE
	%IPCNP==10,,77	;NUMBER OF PID'S NOW DEFINED
	%IPCTP==11,,77	;TOTAL PID'S DEFINED SINCE RELOAD
.GTUPM==100	;USER PAGE MAP PAGE
.GTCMW==101	;SET WATCH COMMAND NAMES
.GTCVL==102	;CURRENT VIRT LIMIT,,CURRENT PHY LIMIT
.GTMVL==103	;MAXIMUM VIRT LIMIT,,MAXIMUM PHY LIMIT
.GTIPA==104	;IPCF STATISTICS PER JOB
	IP.CQD==-1,,0	;COUNT OF SENDS SINCE LOGIN
	IP.CQC==0,,-1	;COUNT OF RECEIVES SINCE LOGIN
.GTIPP==105	;IPCF POINTERS AND COUNTS
	IP.CQP==777B26	;OUTSTANDING SENDS
	IP.CQO==777	;OUTSTANDING RECEIVES
.GTIPI==106	;PID FOR THIS JOB'S [SYSTEM]INFO
.GTIPQ==107	;IPCF FLAGS AND QUOTAS PER JOB
	IP.CQX==1B0	;DISABLED
	IP.CQQ==1B1	;QUOTA SET
	IP.CQS==777B26	;SEND QUOTA
	IP.CQR==777	;RECEIVE QUOTA
.GTDVL==110	;POINTER TO THIS JOB'S LOGICAL NAME TABLE
.GTABS==111	;ADDRESS BREAK WORD (DATAO PTR,)
.GTCMP==112	;RESERVED FOR COMPATABILITY PACKAGES
	%CMPMT==0,,112	;SIMULATED MONITOR TYPE (%CNMNT)
	%CMPCV==1,,112	;CUSTOMER VERSION OF COMPAT. (136)
	%CMPDV==2,,112	;DEC VERSION OF COMPAT. (137)
.GTVM==113	;GENERAL VIRTUAL MEMORY DATA
	%VMSWP==0,,113	;SWAP COUNT
	%VMSCN==1,,113	;SCAN COUNT
	%VMSIP==2,,113	;SWAPS IN PROGRESS
	%VMSLE==3,,113	;SWAP LIST ENTRIES
	%VMTTL==4,,113	;TOTAL VM IN USE
	%VMCMX==5,,113	;MAX VALUE OF %VMTTL ALLOWED
	%VMRMX==6,,113	;PAGING RATE MAX FOR SYSTEM
	%VMCON==7,,113	;CONSTANT USED IN SWAP RATE COMPUTATION
	%VMQJB==10,,113	;JOB TO REQUE TO PQV (-1 IF ALL)
	%VMRMJ==11,,113	;PAGING RATE MAX PER JOB
	%VMTLF==12,,113	;TIME OF LAST FAULT
	%VMSPF==13,,113	;SYSTEM PAGE FAULT COUNTS: NOT IN WS,,IN WS
	%VMSW1==14,,113	;ADDRESS OF SWPLST
	%VMSW2==15,,113	;ADDRESS OF SW2LST
	%VMSW3==16,,113	;ADDRESS OF SW3LST
.GTVRT==114	;PER JOB PAGING RATE
	SUBTTL	HARDWARE BITS OF INTEREST TO USERS

;PC FLAGS

PC.OVF==1B0	;OVERFLOW
PC.CY0==1B1	;CARRY 0
PC.CY1==1B2	;CARRY 1
PC.FOV==1B3	;FLOATING OVERFLOW
PC.BIS==1B4	;BYTE INCREMENT SUPPRESSION
PC.USR==1B5	;USER MODE
PC.UIO==1B6	;USER IOT MODE
PC.LIP==1B7	;LAST INSTRUCTION PUBLIC
PC.AFI==1B8	;ADDRESS FAILURE INHIBIT
PC.ATN==3B10	;APR TRAP NUMBER
PC.FUF==1B11	;FLOATING UNDERFLOW
PC.NDV==1B12	;NO DIVIDE

;APRENB BITS

AP.REN==1B18	;REPETITIVE ENABLE
AP.POV==1B19	;PUSH DOWN OVERFLOW
AP.ABK==1B21	;(FUTURE)ADDRESS BREAK
AP.ILM==1B22	;ILLEGAL MEMORY
AP.NXM==1B23	;NON-EXISTENT MEMORY
AP.PAR==1B24	;PARITY ERROR FLAG
AP.CLK==1B26	;CLOCK
AP.FOV==1B29	;FLOATING OVERFLOW
AP.AOV==1B32	;ARITHMETIC OVERFLOW
	SUBTTL	MISC. UUOS

;TEMP CORE FUNCTIONS

.TCRFS==0	;COUNT OF FREE SPACE
.TCRRF==1	;READ FILE
.TCRDF==2	;DELETE FILE
.TCRWF==3	;WRITE FILE
.TCRRD==4	;READ DIRECTORY
.TCRDD==5	;DELETE DIRECTORY

;LOCK UUO FUNCTIONS

LK.HNP==1B15	;HI-SEG DON'T LOCK PHYSICALLY CONTIGUOUS
LK.HNE==1B16	;HI-SEG DON'T MAP IN EXEC VM
LK.HLS==1B17	;HI-SEG LOCK SEGMENT
LK.LNP==1B33	;LO-SEG DON'T LOCK PHYSICALLY CONTIGUOUS
LK.LNE==1B34	;LO-SEG DON'T MAP IN EXEC VM
LK.LLS==1B35	;LO-SEG LOCK SEGMENT

.LKPPN==0	;PHYSICAL PAGE NUMBER

;LOCK UUO ERRORS

LKNIS%==0	;NOT IMPLEMENTED IN THIS SYSTEM
LKNLP%==1	;NO LOCKING PRIVS
LKNCA%==2	;NOT ENOUGH CORE TO CONTINUE CURRENT JOBS
LKNCM%==3	;NOT ENOUGH CORE TO GUARANTEE CORMIN
LKNEM%==4	;NOT ENOUGH EXEC VIRT MEM
LKNIA%==5	;ILLEGAL SUB-FUNCTION ARGUMENT
LKNPU%==6	;PAGE UNAVAILABLE

;RTTRP UUO ERROR CODES

RTJNP%==1B24	;JOB DOESN'T HAVE PRIVS
RTNC0%==1B25	;NOT RUNNABLE ON CPU0
RTDIU%==1B26	;DEVICE IN USE BY ANOTHER JOB
RTIAU%==1B27	;ILLEGAL AC USED DURING RTTRP AT INTERRUPT
RTJNL%==1B28	;JOB NOT LOCKED (OR NOT PRIVILEGED)
RTSLE%==1B29	;SYSTEM LIMIT EXCEEDED FOR RT DEVICES
RTILF%==1B30	;ILLEGAL FORMAT OF I/O INSTRUCTION
RTPWI%==1B31	;POINTER WORD ILLEGAL
RTEAB%==1B32	;ERROR ADDRESS OUT OF BOUNDS
RTTAB%==1B33	;TRAP ADDRESS BAD
RTPNB%==1B34	;PI CHANNEL NOT CURRENTLY AVAILABLE FOR BLKI/O
RTPNA%==1B35	;PI CHANNEL NOT AVAILABLE
;JOBSTS ANSWERS

JB.UJA==1B0	;JOB NUMBER ASSIGNED
JB.ULI==1B1	;JOB IS LOGGED IN
JB.UML==1B2	;TTY IS AT MONITOR LEVEL
JB.UOA==1B3	;OUTPUT IS AVAILABLE
JB.UDI==1B4	;TTY IS DEMANDING INPUT
JB.UJC==1B5	;JACCT IS SET
JB.UJN==777777	;JOB NUMBER

;HIBER ENABLE BITS

HB.SWP==1B0	;FORCE IMMEDIATE SWAP OUT
HB.IPC==1B10	;IPCF
HB.RIO==1B11	;I/O
HB.RPT==1B12	;PTY ACTIVITY
HB.RTL==1B13	;TTY LINE ACTIVITY
HB.RTC==1B14	;TTY CHARACTER ACTIVITY
HB.RWJ==1B15	;THIS JOB
HB.RWP==1B16	;THIS PROGRAMMER
HB.RWT==1B17	;THIS PROJECT
;SAVEGET LOCATIONS

.SGNAM==0	;FILE NAME FROM RUN UUO
.SGPPN==7	;DIRECTORY FROM RUN UUO
.SGDEV==11	;DEVICE FROM RUN UUO
.SGLOW==17	;EXTENSION OF LOW SEG FROM RUN UUO
.SG41==122	;LOCATION IN SAVE FILE CONTAINING COPY OF .JB41
.SGDDT==114	;LOCATION IN SAVE FILE CONTAINING COPY OF .JBDDT

;SETUUO FUNCTIONS

.STCMX==0	;CORE MAX
.STCMN==1	;CORE MIN
.STDAY==2	;DAYTIME
.STSCH==3	;SCHED WORD (SAME AS %CNSTS)
.STCDR==4	;CDR SPOOL NAME
.STSPL==5	;SPOOLING BITS (SAME AS .GTSPL)
.STWTC==6	;WATCH BITS
	ST.WDY==1B19	;WATCH DAYTIME AT START
	ST.WRN==1B20	;WATCH RUN TIME
	ST.WWT==1B21	;WATCH WAIT TIME
	ST.WDR==1B22	;WATCH DISK READS
	ST.WDW==1B23	;WATCH DISK WRITES
	ST.WVR==1B24	;WATCH VERSIONS
	ST.WMT==1B25	;WATCH MTA STATISTICS
	ST.WAL==376B26	;WATCH ALL
.STDAT==7	;DATE
.STOPR==10	;OPR DEVICE
.STKSY==11	;KSYS TIMER
.STCLM==12	;CORE LIMIT
.STTLM==13	;TIME LIMIT
.STCPU==14	;CPU SPECIFICATION
.STCRN==15	;CPU RUNABILITY
	SP.CR5==1B30	;CPU5
	SP.CR4==1B31	;CPU4
	SP.CR3==1B32	;CPU3
	SP.CR2==1B33	;CPU2
	SP.CR1==1B34	;CPU1
	;SP.CR0==1B35	;CPU0  (SAME BIT DEFINED EARLIER)
.STLMX==16	;LOGMAX
.STBMX==17	;BATMAX
.STBMN==20	;BATMIN
.STDFL==21	;DSKFUL
	.DFPSE==0	;PAUSE
	.DFERR==1	;ERROR
.STMVM==22	;MAX VM
.STMVR==23	;MAX VM RATE
.STUVM==24	;USER VM MAXIMA (VIRT,,PHY)
.STCVM==25	;USER CURRENT VM MAXIMA (VIRT,,PHY)
	ST.VSG==1B18	;SET IF PHYS LIMIT IS GUIDELINE
.STTVM==26	;USER VIRT TIME INTERRUPTS
.STABK==27	;ADDRESS BREAK (HDWR FORMAT; 1B3 BREAKS UUO REFERENCES)
;ATTACH UUO CONTROL BITS

AT.UMM==1B0	;PLACE IN MONITOR MODE
AT.UUM==1B1	;PLACE IN USER MODE

;UNIVERSAL DEVICE INDEX

.UXCHN==0	;I/O CHANNEL NUMBER
		;001000-077777 ARE PHYSICAL DEVICES
	UX.TYP==77B26	;DEVICE TYPE (SAME AS DEVTYP)
	UX.UNT==777	;UNIT WITHIN TYPE
.UXTRM==200000	;TERMINALS
.UXPRC==300000	;PROCESS

;.JBINT INTERCEPT BLOCK
;;  !=======================================================!
;;  !       BLOCK LENGTH        !          NEW PC           !
;;  !-------------------------------------------------------!
;;  !M!                                       !E!T!Q!F!O!C!D!
;;  !-------------------------------------------------------!
;;  !                   OLD PC AND FLAGS                    !
;;  !-------------------------------------------------------!
;;  !      CHANNEL NUMBER       !    CLASS OF INTERRUPT     !
;;  !=======================================================!

.ERNPC==0	;LH=LENGTH, RH=NEW PC FOR INTERRUPT
.ERCLS==1	;CLASSES OF ERROR INTERCEPTING
	ER.MSG==1B0	;SUPPRESS ERROR MESSAGE
	ER.EIJ==1B29	;ERROR IN JOB
	ER.TLX==1B30	;TIME LIMIT EXCEEDED
	ER.QEX==1B31	;QUOTA EXHAUSTED
	ER.FUL==1B32	;FILE STRUCTURE FULL
	ER.OFL==1B33	;DISK UNIT OFF-LINE
	ER.ICC==1B34	;CONTROL-C INTERCEPT
	ER.IDV==1B35	;"PROBLEM ON DEVICE" ERRORS
.EROPC==2	;OLD PC
.ERCCL==3	;LH=CHANNEL, RH=CLASS OF INTERRUPT
	SUBTTL	PSI SOFTWARE INTERRUPT SYSTEM

;INTERRUPT VECTOR
; SETS OF 4-WORD BLOCKS
;;  !=======================================================!
;;  !                   NEW PC AND FLAGS                    !
;;  !-------------------------------------------------------!
;;  !                   OLD PC AND FLAGS                    !
;;  !-------------------------------------------------------!
;;  ! !O!R!A!D!M!I!             !         I/O REASON        !
;;  !-------------------------------------------------------!
;;  !                   INTERRUPT STATUS                    !
;;  !=======================================================!

.PSVNP==0	;NEW PC AND FLAGS
.PSVOP==1	;OLD PC AND FLAGS
.PSVFL==2	;FLAGS
	PS.VPO==1B1	;TURN PERMANENTLY OFF, NO RESTORE
	PS.VTO==1B2	;TURN OFF, RESTORE ON DEBRK.
	PS.VAI==1B3	;ALLOW ADDITIONAL INTERRUPT
	PS.VDS==1B4	;DISCARD SUCCESSIVE INTERRUPTS WHILE INTERRUPTED
	PS.VPM==1B5	;PRINT STANDARD MESSAGE
	PS.VIP==1B6	;INTERRUPTS IN PROGRESS FOR THIS BLOCK
			;  (USED BY PSISER)

	PS.RID==1B19	;REASON--INPUT DONE
	PS.ROD==1B20	;REASON--OUTPUT DONE
	PS.REF==1B21	;REASON--END FILE
	PS.RIE==1B22	;REASON--INPUT ERROR
	PS.ROE==1B23	;REASON--OUTPUT ERROR
	PS.RDO==1B24	;REASON--DEVICE OFF-LINE
	PS.RDF==1B25	;REASON--DEVICE FULL
	PS.RQE==1B26	;REASON--QUOTA EXCEEDED
	PS.RWT==1B27	;REASON--IO WAIT
.PSVIS==3	;INTERRUPT STATUS (AUX. WORD)
		;  I/O DEVICES RETURN   UDX,,GETSTS
;NON-DEVICE CONDITIONS

.PCTLE==-1	;TIME LIMIT EXCEEDED (NON-BATCH ONLY)
.PCABT==-2	;ABORT (^A); RETURNS 1B0=1 IF TI WAIT; (FUTURE)
.PCSTP==-3	;STOP (^C); RETURNS 1B0=1 IF TI WAIT
.PCUUO==-4	;ANY MUUO; RETURNS UUO
.PCIUU==-5	;ILLEGAL UUO; RETURNS UUO
.PCIMR==-6	;ILLEGAL MEMORY REFERENCE
.PCACK==-7	;ADDRESS CHECK; RETURNS DEVICE NAME
.PCARI==-10	;ARITHMETIC EXCEPTION
.PCPDL==-11	;PDL OVERFLOW
.PCTT3==-12	;TRAP TYPE 3 (FUTURE)
.PCNXM==-13	;NON-EXISTENT MEMORY
.PCAPC==-14	;APR CLOCK; RETURNS MSTIME
.PCUEJ==-15	;USER INDUCED ERROR IN JOB
.PCXEJ==-16	;EXTERNAL ERROR IN JOB
.PCKSY==-17	;KSYS WARNING; RETURNS MINS TO KSYS
.PCDSC==-20	;DATA-SET CHANGE; RETURNS NEW STATUS
.PCDAT==-21	;DETACH/ATTACH; RETURNS -1 OR TTY UDX
.PCWAK==-22	;WAKE UUO; RETURNS JOB NUMBER OF WAKER
.PCABK==-23	;ADDRESS BREAK
.PCIPC==-24	;IPCF RECEIVE; RETURNS LENGTH,,FLAGS
;INTERRUPT ENABLE REQUEST BLOCK
; SETS OF 3-WORD BLOCKS

.PSECN==0	;CONDITION OR DEVICE
.PSEOR==1	;OFFSET,,REASON BITS
.PSEPR==2	;PRIORITY,,RESERVED

;PISYS. FUNCTION BITS

PS.FOF==1B1	;TURN OFF
PS.FON==1B2	;TURN ON
PS.FCP==1B3	;CLEAR ALL PENDING INTERRUPTS
PS.FCS==1B4	;CLEAR SELECTED INTERRUPT
PS.FRC==1B5	;REMOVE CONDITION OR DEVICE
PS.FAC==1B6	;ADD CONDITION OR DEVICE

;PISAV./PIRST. FLAGS

.PSSFC==0	;FLAGS,,COUNT
	PS.SON==1B0	;SYSTEM IS ON
.PSSIV==1	;ADDRESS OF INTERRUPT VECTOR
.PSSBL==2	;START OF 3-WORD BLOCKS

;PISYS. ERRORS

PSTMA%==0	;TOO MANY ARGUMENTS
PSNFS%==1	;NO FUNCTION SUPPLIED
PSUKF%==2	;UNKNOWN FUNCTION REQUESTED
PSOOF%==3	;ON AND OFF IN SAME FUNCTION
PSUKC%==4	;UNKNOWN CONDITION REQUESTED
PSDNO%==5	;DEVICE NOT OPEN
PSPRV%==6	;PRIVILEGE FAILURE
PSIVO%==7	;INVALID VECTOR OFFSET
PSUKR%==10	;UNKNOWN REASON ENABLED
PSPTL%==11	;PRIORITY TOO LARGE
PSNRW%==12	;NON-ZERO RESERVED WORD
PSPND%==13	;PIINI. NOT DONE
PSARF%==14	;ADD AND REMOVE IN SAME FUNCTION

;PISAV. ERRORS

PSBTS%==0	;BLOCK TOO SMALL

;PIRST. ERRORS

PSNRS%==0	;NOT RESTORING WHAT WAS SAVED
	SUBTTL	IPCF INTERPROCESS COMMUNICATION FACILITY

;PACKET FORMAT
;;  !=========================================================================!
;;  !BB!IS!IR!O!                          !P!V!       !   ERROR   !SENDR!RETRN!
;;  !-------------------------------------------------------------------------!
;;  !                              SENDER'S PID                               !
;;  !-------------------------------------------------------------------------!
;;  !                             RECEIVER'S PID                              !
;;  !-------------------------------------------------------------------------!
;;  !        WORD LENGTH OF DATA         !     START OF DATA (WORD/PAGE)      !
;;  !=========================================================================!

.IPCFL==0	;FLAGS
	IP.CFB==1B0	;DON'T BLOCK READ
	IP.CFS==1B1	;INDIRECT SENDER'S PID
	IP.CFR==1B2	;INDIRECT RECEIVER'S PID
	IP.CFO==1B3	;OVERDRAW SEND
	IP.CFP==1B18	;SENDER IS PRIVILEGED AND IS INVOKING THEM
	IP.CFV==1B19	;VM PAGE TRANSFER MODE
	IP.CFE==77B29	;ERROR FIELD (NOT PRIV.)
	IP.CFC==7B32	;SYSTEM SENDER CODE (PRIV.)
		.IPCCC==1	;SENT BY [SYSTEM]IPCC
		.IPCCF==2	;SENT BY SYSTEM-WIDE [SYSTEM]INFO
		.IPCCP==3	;SENT BY RECEIVER'S [SYSTEM]INFO
	IP.CFM==7	;SPECIAL MESSAGE RETURN FIELD (PRIV.)
		.IPCFN==1	;MESSAGE WAS NOT DELIVERED
.IPCFS==1	;SENDER'S PID
.IPCFR==2	;RECEIVER'S PID
.IPCFP==3	;LENGTH,,START OF DATA IN PACKET
;IPCC AND INFO ERROR CODES

IPCAC%==1	;ADDRESS CHECK
IPCNL%==2	;NOT LONG ENOUGH
IPCNP%==3	;NO PACKET IN RECEIVE QUEUE
IPCIU%==4	;(UNUSED)
IPCTL%==5	;DATA TOO LONG FOR USER'S BUFFER
IPCDU%==6	;DESTINATION UNKNOWN (RECEIVER'S PID)
IPCDD%==7	;DESTINATION DISABLED
IPCRS%==10	;NO ROOM IN SENDER'S QUOTA
IPCRR%==11	;NO ROOM IN RECEIVER'S QUOTA
IPCRY%==12	;NO ROOM IN SYSTEM STORAGE
IPCUP%==13	;UNKNOWN PAGE ON SEND; DUPLICATE PAGE ON RECEIVE (VM)
IPCIS%==14	;INVALID SEND PID
IPCPI%==15	;PRIV INSUFFICIENT
IPCUF%==16	;UNKNOWN FUNCTION
IPCBJ%==17	;BAD JOB NUMBER
IPCPF%==20	;PID TABLE FULL
IPCPR%==21	;PAGE REQUESTED, NORMAL NEXT
IPCIE%==22	;PAGING I/O ERROR
IPCFU%==70	;[SYSTEM]INFO HAS AN UNKNOWN, INTERNAL ERROR
IPCCF%==71	;[SYSTEM]IPCC REQUEST FROM [SYSTEM]INFO FAILED
IPCFF%==72	;[SYSTEM]INFO FAILED TO COMPLETE AN ASSIGN
IPCQP%==73	;PID QUOTA EXCEEDED
IPCBP%==74	;BAD (UNKNOWN) PID
IPCDN%==75	;DUPLICATE NAME
IPCNN%==76	;NO SUCH NAME
IPCBN%==77	;NAME HAS ILLEGAL CHARACTERS
;MESSAGES TO AND FROM [SYSTEM]IPCC

.IPCS0==0	;LH=CALLER'S IDENTIFIER, RH=FUNCTION
	.IPCSE==1	;ENABLE (ME OR (1)=PID)
	.IPCSD==2	;DISABLE (ME OR (1)=PID)
	.IPCSI==3	;TELL PID OF [SYSTEM]INFO FOR (ME OR (1)=PID); (2) GETS PID
	.IPCSF==4	;MAKE [SYSTEM]INFO OF (1) (2)=FOR WHOM (0=SYSTEM)
	.IPCSZ==5	;ZAP PID IN (1)
	.IPCSC==6	;CREATE PID FOR JOB IN (1); (2) GETS PID
	.IPCSQ==7	;SET QUOTA (2) FOR (1)=PID
	.IPCSO==10	;CHANGE OWNER OF (1)=PID, (2)=NEW JOB NUMBER
	.IPCSJ==11	;GIVE JOB OF PID IN (1); (2) GETS JOB NO
	.IPCSP==12	;GIVE PID LIST FOR JOB (1) STARTING AT (2)
	.IPCSR==13	;READ QUOTA OF JOB (1); INTO (2)
	.IPCSW==14	;WAKE JOB (1) SLEEPING FROM .IPCSS
	.IPCSS==15	;(ANSWER ONLY) IF LH(1)=0, JOB RH(1) IS RESETTING
			;	      IF LH(1)=-1, JOB RH(1) IS LOGGING OUT
.IPCS1==1	;FIRST ARGUMENT
.IPCS2==2	;SECOND ARGUMENT
.IPCS3==3	;THIRD ARGUMENT

;MESSAGES TO AND FROM [SYSTEM]INFO

.IPCI0==0	;LH=CALLER'S IDENTIFIER, RH=FUNCTION
	.IPCIW==1	;WHAT IS PID, ASCIZ IN (2+)
	.IPCIG==2	;GET NAME OF (2)=PID
	.IPCII==3	;ASSIGN NAME UNTIL RESET (FORMAT=.IPCIW)
	.IPCIJ==4	;ASSIGN NAME UNTIL LOGOUT (FORMAT=.IPCIW)
	.IPCID==5	;DROP SPECIFIC PID (2)
	.IPCIR==6	;DROP NAMES SET BY .IPCII, (2)=JOB NUMBER
	.IPCIL==7	;DROP NAMES SET BY .IPCIJ, (2)=JOB NUMBER
	.IPCIS==15	;RESET JOB RH(1) IF LH(1)=0, OR LOGOUT IF LH=-1
.IPCI1==1	;FIRST ARGUMENT (ALWAYS 0 OR PID TO GET DUPLICATE OF ANSWER)
.IPCI2==2	;SECOND ARGUMENT
	SUBTTL	PAGE AND VM  VIRTUAL MEMORY FACILITY

;PAGE. UUO FUNCTIONS

.PAGIO==0	;PAGE IN/OUT (OUT IF 1B0=1 IN LIST)
	PA.GSL==1B1	;PAGE TO SLOW SWAPPING SPACE
.PAGCD==1	;PAGE CREATE/DESTROY
	PA.GCD==1B1	;CREATE PAGE ON DISK
.PAGEM==2	;PAGE EXCHANGE/MOVE
.PAGAA==3	;CLEAR/SET ACCESS ALLOWED
.PAGWS==4	;GET WORKING SET
.PAGGA==5	;GET ACCESS ALLOWED
.PAGCA==6	;CHECK ACCESS LEGAL
	PA.GNE==1B0	;DOES NOT EXIST
	PA.GWR==1B1	;WRITABLE
	PA.GRD==1B2	;READABLE
	PA.GAA==1B3	;ACCESS ALLOWED
	PA.GAZ==1B4	;ALLOCATED BUT ZERO
	PA.GCP==1B5	;CAN'T BE PAGED OUT
	PA.GPO==1B6	;IS PAGED OUT

;PAGE. UUO ERRORS

PAGIA%==1	;ILLEGAL ARGUMENT
PAGIP%==2	;ILLEGAL PAGE NUMBER
PAGCE%==3	;PAGE CAN'T EXIST BUT DOES
PAGME%==4	;PAGE MUST EXIST BUT DOESN'T
PAGMI%==5	;PAGE MUST BE IN CORE BUT ISN'T
PAGCI%==6	;PAGE CAN'T BE IN CORE BUT IS
PAGSH%==7	;PAGE IS IN A SHARABLE HI-SEG
PAGIO%==10	;PAGING I/O ERROR
PAGNS%==11	;NO SWAPPING SPACE AVAILABLE
PAGLE%==12	;CORE LIMIT EXCEEDED
PAGIL%==13	;ILLEGAL IF LOCKED

;.JBPFH REGION

.PFHNP==0	;NEW PC AND FLAGS
.PFHOP==1	;OLD PC AND FLAGS
.PFHFC==2	;FAULT WORD
	PF.HCB==1B0	;WORKING SET CHANGED BEHIND BACK
	PF.HPN==777B17	;PAGE NUMBER
	PF.HFC==0,,-1	;FAULT CODE
		.PFHNA==1	;PAGE NOT ACCESSABLE
		.PFHNI==2	;PAGE NOT IN CORE
		.PFHUU==3	;PAGE FAULT IN UUO ARGS
		.PFHTI==4	;VIRTUAL TIMER
		.PFHZI==5	;ALLOCATED BUT ZERO FROM USER
		.PFHZU==6	;ALLOCATED BUT ZERO DURING UUO
.PFHVT==3	;VIRTUAL TIME
.PFHPR==4	;PAGING RATE
	;5-10 RESERVED
	SUBTTL	DAEMON CALLS

;DAEMON UUO FUNCTIONS

.DCORE==1	;DUMP CORE
.CLOCK==2	;ENTER A CLOCK REQUEST
.FACT==3	;MAKE A FACT FILE ENTRY
.DMQUE==4	;(UNIMPLEMENTED)
.DMERR==5	;ERROR LOGGING
.DMCTL==6	;(UNIMPLEMENTED)

;DAEMON UUO ERRORS

DMILF%==1	;ILLEGAL FUNCTION
DMACK%==2	;ADDRESS CHECK
DMWNA%==3	;WRONG NUMBER OF ARGUMENTS
DMSNH%==4	;IMPOSSIBLE UUO FAILURE (SHOULD NEVER HAPPEN)
DMCWF%==5	;CAN'T WRITE FILE
DMNPV%==6	;NO PRIVILEGES
DMFFB%==7	;FACT FORMAT BAD
DMPTH%==10	;INVALID PATH SPECIFICATION

;DCORE DUMP CATEGORIES

.CAJOB==1	;JOB TABLES (SEE BELOW)
.CACNF==2	;CONFIGURATION TABLES (.GTCNV)
.CADDB==3	;JOB'S DDBS
.CACOR==4	;USER'S CORE IMAGE (COMPRESSED)
.CAFET==5	;FET GETTAB
.CAMAX==5	;HIGHEST LEGAL CATEGORY NUMBER
;DCORE JOB TABLE ENTRIES

.DJVER==0	;DAEMON VERSION (137)
.DJDAT==1	;DATE (FROM DATE UUO)
.DJMST==2	;TIME IN MILLISEC. (FROM MSTIME UUO)
.DJJSN==3	;JOB,,SEGMENT NUMBERS
.DJLIN==4	;???,,LINE NUMBER (TTY)
.DJSTS==5	;.GTSTS(JOB)
.DJHTS==6	;.GTSTS(HISEG)
.DJPPN==7	;.GTPPN(JOB)
.DJHPN==10	;.GTPPN(HISEG)
.DJPRG==11	;.GTPRG(JOB)
.DJHRG==12	;.GTPRG(HISEG)
.DJTIM==13	;.GTTIM(JOB)
.DJKCT==14	;.GTKCT(JOB)
.DJPRV==15	;.GTPRV(JOB)
.DJSWP==16	;.GTSWP(JOB)
.DJHWP==17	;.GTSWP(HISEG)
.DJRCT==20	;.GTRCT(JOB)
.DJWCT==21	;.GTWCT(JOB)
.DJTDB==22	;.GTTDB(JOB)
.DJDEV==23	;.GTDEV(HISEG)
.DJNM1==24	;.GTNM1(JOB)
.DJNM2==25	;.GTNM2(JOB)
.DJCNO==26	;.GTCNO(JOB)
.DJTMP==27	;.GTTMP(JOB)
.DJWCH==30	;.GTWCH(JOB)
.DJSPL==31	;.GTSPL(JOB)
.DJRTD==32	;.GTRTD(JOB)
.DJLIM==33	;.GTLIM(JOB)
.DJSPS==34	;.GTSPS(JOB)
.DJRSP==35	;.GTRSP(JOB)
.DJTRQ==36	;.GTTRQ(JOB)
.DJUPM==37	;.GTUPM(JOB)
.DJHPM==40	;.GTUPM(HISEG)
.DJCVL==41	;.GTCVL(JOB)
.DJMVL==42	;.GTMVL(JOB)
.DJIPA==43	;.GTIPA(JOB)
.DJIPC==44	;.GTIPC(JOB)
.DJIPI==45	;.GTIPI(JOB)
.DJIPQ==46	;.GTIPQ(JOB)
.DJDVL==47	;.GTDVL(JOB)
.DJABS==50	;.GTABS(JOB)
.DJVRT==51	;.GTVRT(JOB)
.DJHRT==52	;.GTVRT(HISEG)
.DJMAX==52	;HIGHEST LEGAL JOB TABLE
	SUBTTL	METER UUO

;METER. FUNCTIONS

.MEFCI==0	;INITIALIZE METER CHANNEL
.MEFCS==1	;READ METER CHANNEL STATUS
.MEFCR==2	;RELEASE METER CHANNEL
.MEFPI==3	;INITIALIZE METER POINT
.MEFPS==4	;READ METER POINT STATUS
.MEFPR==5	;RELEASE METER POINT

;METER. ERRORS

MEILF%==1	;ILLEGAL FUNCTION
MENPV%==2	;NOT PRIVILEGED USER
MEIMA%==3	;ILLEGAL MEMORY ADDRESS
MEPDL%==4	;PDL OVERFLOW
MEIAL%==5	;ILLEGAL ARG LIST
MEIAV%==6	;ILLEGAL ARG VALUE
MENFC%==7	;NOT ENOUGH FREE CORE
MEICT%==10	;ILLEGAL CHANNEL TYPE
MEIPT%==11	;ILLEGAL POINT ROUTINE TYPE
MENXP%==12	;NON-EXISTENT POINT NAME
MENXC%==13	;NON-EXISTENT CHANNEL
MEPNA%==14	;POINT NOT AVAILABLE

;STANDARD CHANNEL ARGUMENT BLOCK LOCATIONS

.MCFUN==0	;UUO FUNCTION CODE
.MCCID==1	;USER CHANNEL ID
.MCTYP==2	;CHANNEL TYPE
		.MCTYN==0	;NULL CHANNEL
		.MCTYD==1	;DISPLAY CHANNEL
		.MCTYT==2	;TRACE CHANNEL
.MCSTS==3	;CHANNEL STATUS
	MC.STS==17777B12 ;STATUS MASK
	MC.USA==1B1	;USER SEGMENT ADDRESSED
.MCJOB==4	;CHANNEL JOB NUMBER

;DISPLAY CHANNEL ARGS

.MCTCN==5	;AVERAGING TIME CONSTANT
.MCPTR==6	;DEPOSIT BYTE POINTER
;TRACE CHANNEL ARGS

.MCFLG==5	;USER ADDRESS OF FLAG AND STATUS WORD
	MC.WAK==1B0	;ENABLED FOR WAKEUP
.MCBUF==6	;USER ADDRESS OF TRACE BUFFER
.MCIOX==7	;USER ADDRESS OF BUFFER INDEX
.MCCNT==10	;USER ADDRESS OF WAKEUP COUNTER
.MCBFL==11	;BUFFER LENGTH

;ARGUMENT BLOCK FOR METER. POINT FUNCTIONS

.MPFUN==0	;UUO FUNCTION CODE
.MPAPP==1	;NUM ARGS PER POINT IN LIST
.MPNUM==2	;NUMBER OF POINTS IN LIST
.MPADR==3	;ADDRESS OF POINT LIST
.MPERR==4	;ADDRESS OF ERROR POINT

;ARG DISPLACEMENTS PER POINT IN POINT LIST

.MPNAM==0	;POINT NAME
.MPPID==1	;USER POINT ID
.MPPAR==2	;POINT PARAMETER
.MPJOB==3	;JOB NUMBER
.MPSTS==4	;POINT STATUS
	MP.STS==17777B12 ;POINT STATUS MASK
	MP.ENB==1B0	;POINT IS ENABLED
	MP.USA==1B1	;USER SEGMENT ADDRESSED
.MPPRT==5	;POINT ROUTINE TYPE
		.MPRN==00	;NULL ROUTINE
		.MPRV==01	;INTRINSIC VALUE
		.MPRT==02	;TIME INTERVAL
		.MPRVI==3	;INTRINSIC VALUE+POINT ID
		.MPRTI==4	;TIME+POINT ID
.MPPRP==6	;POINT ROUTINE PARAMETER
.MPCID==7	;USER CHANNEL ID
	SUBTTL	MISC. I/O UUOS

;DEVCHR BITS

DV.DRI==1B0	;DTA WITH DIRECTORY IN CORE
DV.DSK==1B1	;DEVICE IS A FILE STRUCTURE
DV.CDR==1B2	;IF DVOUT=1 DEVICE IS A CDP
		; IF DVIN=1 DEVICE IS A CDR
DV.LPT==1B3	;DEVICE IS A LINE PRINTER
DV.TTA==1B4	;DEVICE IS A TTY CONTROLING A JOB
DV.TTU==1B5	;TTY DDB IS IN USE
DV.TTB==1B6	;FREE BIT LEFT FROM SCNSRF
DV.DIS==1B7	;DEVICE IS A DISPLAY
DV.LNG==1B8	;DEVICE HAS A LONG DISPATCH TABLE
DV.PTP==1B9	;DEVICE IS A PAPER TAPE PUNCH
DV.PTR==1B10	;DEVICE IS A PAPER TAPE READER
DV.DTA==1B11	;DEVICE IS A DEC TAPE
DV.AVL==1B12	;DEVICE IS AVAILABLE TO THIS JOB
DV.MTA==1B13	;DEVICE IS A MAG TAPE
DV.TTY==1B14	;DEVICE IS A TTY
DV.DIR==1B15	;DEVICE HAS A DIRECTORY
DV.IN==1B16	;DEVICE CAN DO INPUT
DV.OUT==1B17	;DEVICE CAN DO OUTPUT
DV.ASC==1B18	;DEVICE ASSIGNED BY ASSIGN COMMAND
DV.ASP==1B19	;DEVICE ASSIGNED BY INIT OR OPEN UUO
DV.M17==1B20	;DEVICE CAN DO MODE 17
DV.M16==1B21	;DEVICE CAN DO MODE 16
DV.M15==1B22	;DEVICE CAN DO MODE 15
DV.M14==1B23	;DEVICE CAN DO MODE 14
DV.M13==1B24	;DEVICE CAN DO MODE 13
DV.M12==1B25	;DEVICE CAN DO MODE 12
DV.M11==1B26	;DEVICE CAN DO MODE 11
DV.M10==1B27	;DEVICE CAN DO MODE 10
DV.M7==1B28	;DEVICE CAN DO MODE 7
DV.M6==1B29	;DEVICE CAN DO MODE 6
DV.M5==1B30	;DEVICE CAN DO MODE 5
DV.M4==1B31	;DEVICE CAN DO MODE 4
DV.M3==1B32	;DEVICE CAN DO MODE 3
DV.M2==1B33	;DEVICE CAN DO MODE 2
DV.M1==1B34	;DEVICE CAN DO MODE 1
DV.M0==1B35	;DEVICE CAN DO MODE 0
;DEVTYP UUO CODES

;FIRST THE TYPE CODES
.TYDSK==0	;DEVICE IS A DISK
.TYDTA==1	;DEVICE IS A DEC TAPE
.TYMTA==2	;DEVICE IS A MAG TAPE
.TYTTY==3	;DEVICE IS A TTY
.TYPTR==4	;DEVICE IS A PTR
.TYPTP==5	;DEVICE IS A PTP
.TYDIS==6	;DEVICE IS A DISPLAY
.TYLPT==7	;DEVICE IS A LINE PRINTER
.TYCDR==10	;DEVICE IS A CARD READER
.TYCDP==11	;DEVICE IS A CARD PUNCH
.TYPTY==12	;DEVICE IS A PTY
.TYPLT==13	;DEVICE IS A PLOTTER
.TYEXT==14	;EXTERNAL TASK (DA28C)
.TYMPX==15	;MULTIPLEXOR
.TYPAR==16	;PA611R ON DC44
.TYPCR==17	;PC11(R) ON DC44
.TYPAP==20	;PA611P ON DC44
.TYLPC==21	;LPC-11 ON DC44
.TYPCP==22	;PC-11(P) ON DC44

;NOW THE CHARACTERISTICS
TY.MAN==1B0	;LOOKUP/ENTER IS REQUIRED
TY.AVL==1B12	;DEVICE IS FREE
TY.SPL==1B13	;DEVICE IS SPOOLED
TY.INT==1B14	;DEVICE IS INTERACTIVE
TY.VAR==1B15	;DEVICE HAS VARIABLE BUFFER SIZE
TY.IN==1B16	;DEVICE CAN DO INPUT
TY.OUT==1B17	;DEVICE CAN DO OUTPUT
TY.JOB==777B26	;JOB NUMBER OWNING DEVICE
TY.RAS==1B29	;RESTRICTED DEVICE
TY.DEV==77B35	;DEVICE TYPE
;MTCHR. RESULTS

MT.AWC==777777B17	;ACTUAL WORD COUNT
MT.CRC==777B26	;CRC LAST READ
MT.NCR==7B29	;NUMBER CHARACTERS READ IN LAST WORD
MT.7TR==1B31	;7 TRACK
MT.WLK==1B32	;WRITE LOCKED
MT.DEN==7B35	;DENSITY
	.MTDN2==1	;200
	.MTDN5==2	;556
	.MTDN8==3	;800
	.MTD16==4	;1600

.MTRID==1	;REEL ID
.MTWRD==2	;WORDS READ
.MTWWT==3	;WORDS WRITTEN
.MTSRE==4	;SOFT READ ERRORS
.MTHRE==5	;HARD READ ERRORS
.MTSWE==6	;SOFT WRITE ERRORS
.MTHWE==7	;HARD WRITE ERRORS
.MTTME==10	;TOTAL MEDIA ERRORS
.MTTDE==11	;TOTAL DEVICE ERRORS
.MTTUN==12	;TOTAL UNLOADS
.MTNFB==13	;NUMBER OF FILES FROM BOT
.MTNRF==14	;NUMBER OF RECORDS FROM EOF
.MTICC==15	;INITIAL ERROR CONI MTC
.MTICS==16	;INITIAL ERROR CONI MTS
.MTFCC==17	;FINAL ERROR CONI MTC
.MTFCS==20	;FINAL ERROR CONI MTS
.MTTRY==21	;RETRIES TO RESOLVE LAST ERROR
;WHERE UUO RESULTS

RM.SUP==17B17	;STATION UP STATUS
	.RMSUN==1	;NOT IN CONTACT
	.RMSUD==2	;DOWN
	.RMSUG==4	;LOADING
	.RMSUL==10	;LOADED
RM.SDU==1B13	;DIAL-UP

;CAL11. UUO

.C11FC==0	;FUNCTION WORD
	C1.1NO==777777B17  ;WHICH -11
	C1.1FC==777777	;WHICH FUNCTION
		.C11DP==0	;DEPOSIT FUNCTION
		.C11EX==1	;EXAMINE FUNCTION
		.C11QU==2	;QUEUE A REQUEST
		.C11NM==3	;RETURN NAME OF FRONT END PROG
		.C11UP==4	;RETURN 0 IF DOWN, 1 IF UP
.C11AD==1	;ADDRESS OF EXAMINE/DEPOSIT
.C11CN==2	;CONTENTS TO DEPOSIT
.C11EN==1	;START OF QUEUE ENTRY

C11NP%==1	;NOT PRIVILEGED
C11UF%==2	;UNKNOWN FUNCTION
C11ND%==3	;NOT DC76
C11IU%==4	;EXAM/DEP IN USE
C11NA%==5	;NO ANSWER TO EXAM/DEP
C11TS%==6	;QUEUE ENTRY TOO SHORT
C11NE%==7	;NOT ENOUGH ARGS
;GETLCH BITS

GL.ITY==1B0	;INVISIBLE TTY (PTY)
GL.CTY==1B1	;SYSTEM CTY
GL.DSP==1B2	;DISPLAY CONSOLE
GL.DSL==1B3	;DATASET DATA LINE
GL.HDP==1B5	;HALF-DUPLEX
GL.REM==1B6	;REMOTE TTY
GL.RBS==1B7	;REMOTE BATCH TTY
GL.LIN==1B11	;LINE HAS BEEN TYPED
GL.LCM==1B13	;LOWER CASE MODE
GL.TAB==1B14	;TABS
GL.LCP==1B15	;LOCAL COPY
GL.PTM==1B16	;PAPER TAPE MODE

;TRMOP. ERRORS

TOPRC%==1	;PROTECTION CHECK
TORGB%==2	;RANGE BAD
TOADB%==3	;ADDRESS BAD
TOIMP%==4	;IMPOSSIBLE
TODIL%==5	;ERROR IN DIALLER
;TRMOP. FUNCTIONS

.TOSIP==1	;SKIP IF INPUT PRESENT
.TOSOP==2	;SKIP IF OUTPUT PRESENT
.TOCIB==3	;CLEAR INPUT BUFFER
.TOCOB==4	;CLEAR OUTPUT BUFFER
.TOOUC==5	;OUTPUT CHARACTER
.TOOIC==6	;OUTPUT IMAGE CHARACTER
.TOOUS==7	;OUTPUT STRING
.TOINC==10	;INPUT CHARACTER
.TOIIC==11	;INPUT IMAGE CHARACTER
.TODSE==12	;DATA SET ENABLE
.TODSC==13	;DATA SET CALL
.TODSF==14	;DATA SET OFF
.TORSC==15	;RESCAN
.TOELE==16	;SET ELEMENT
.TOEAB==17	;ENABLE AUTO BAUD DETECT

.TOOIP==1000	;OUTPUT IN PROGRESS
.TOCOM==1001	;AT COMMAND LEVEL
.TOXON==1002	;PAPER TAPE MODE
.TOLCT==1003	;LOWER CASE TRANSLATE TO UPPER
.TOSLV==1004	;SLAVE
.TOTAB==1005	;ACCEPTS TABS
.TOFRM==1006	;ACCEPTS FF AND LF
.TOLCP==1007	;LOCAL COPY (NO ECHO)
.TONFC==1010	;NO FREE CARRIAGE RETURN
.TOHPS==1011	;HORIZONTAL POSITION
.TOWID==1012	;WIDTH
.TOSND==1013	;SEND ALLOWED (NO GAG)
.TOHLF==1014	;HALF DUPLEX
.TORMT==1015	;REMOTE NON-DATA SET
.TODIS==1016	;DISPLAY CONSOLE
.TOFLC==1017	;FILLER CLASS
.TOTAP==1020	;PAPER TAPE ENABLED
.TOPAG==1021	;PAGE COMMAND GIVEN
.TOSTP==1022	;OUTPUT STOPPED (XOFF OR PAGE LIMIT)
.TOPSZ==1023	;PAGE SIZE (HEIGHT IN LINES)
.TOPCT==1024	;LINE COUNT IN PAGE
.TOBLK==1025	;SUPPRESS BLANK LINES
.TOALT==1026	;CONVERT ALTMODE (175,176) TO ESCAPE
.TOAPL==1027	;APL MODE
.TORSP==1030	;RECIEVE SPEED
.TOTSP==1031	;TRANSMIT SPEED
.TODBK==1032	;HAS DEBREAK
.TO274==1033	;2741
.TOTDY==1034	;TIDY MODE
.TOACR==1035	;AUTO CRLF
.TORTC==1036	;^R ^T COMPATIBLE MODE (DISABLED)

.TOSET==1000	;OFFSET FROM GET TO SET
;BITS IN GETSTS AND SETSTS

IO.IMP==1B18	;IMPROPER MODE -- SOFTWARE DETECTECTED ERROR
IO.DER==1B19	;DEVICE ERROR
IO.DTE==1B20	;DATA ERROR
IO.BKT==1B21	;BLOCK TOO LARGE
IO.ERR==17B21	;I/O ERROR BITS
IO.EOF==1B22	;END OF FILE
IO.ACT==1B23	;DEVICE IS ACTIVE
IO.D29==1B29	;DEC029 MODE (CDP ONLY)
IO.SIM==1B29	;SUPER-IMAGE MODE (CDR ONLY)
IO.WHD==1B29	;WRITE DISK PACK HEADERS (DSK ONLY)
IO.SSD==1B28	;SEMI-STANDARD MODE (DTA ONLY)
IO.NSD==1B29	;NON-STANDARD MODE (DTA ONLY)
IO.SFF==1B29	;SUPPRESS FORM FEEDS (LPT ONLY)
IO.BOT==1B24	;BEGINNING OF TAPE (MAG TAPE ONLY)
IO.EOT==1B25	;END OF TAPE (MAG TAPE ONLY)
IO.PAR==1B26	;PARITY 1=EVEN 0=ODD (MAG TAPE ONLY)
IO.DEN==3B28	;DENSITY 0-STD 1-200 2-556 3-800 (MAG TAPE ONLY)
IO.NRC==1B29	;READ WITH NO REREAD CHECK (MAG TAPE ONLY)
IO.PTI==1B24	;SUBJOB IN TTY INPUT WAIT (PTY ONLY)
IO.PTO==1B25	;SUBJOB HAS TTY OUTPUT AVAILABLE (PTY ONLY)
IO.PTM==1B26	;SUBJOB IS IN MONITOR MODE (PTY ONLY)
IO.TEC==1B27	;TRUTH IN ECHOING MODE (TTY ONLY)
IO.SUP==1B28	;SUPPRESS ECHOING (TTY ONLY)
IO.FCS==1B29	;FULL CHARACTER SET (TTY ONLY) -- OBSOLETE SYMBOL
IO.LEM==1B29	;LINE EDITOR MODE (TTY ONLY)
IO.SYN==1B30	;SYNCRONOUS MODE I/O
IO.UWC==1B31	;USE USER'S WORD COUNT
IO.MOD==17B35	;DATA MODE

;I/O MODES

.IOASC==0	;ASCII
.IOASL==1	;ASCII LINE
.IOPIM==2	;PACKED IMAGE MODE
.IOIMG==10	;IMAGE
.IOIBN==13	;IMAGE BINARY
.IOBIN==14	;BINARY
.IOIDP==15	;IMAGE DUMP
.IODPR==16	;DUMP RECORDS
.IODMP==17	;DUMP
;CLOSE BITS

CL.DAT==1B29	;DELETE ACCESS TABLE FROM DISK DATA BASE
CL.RST==1B30	;INHIBIT CREATING A NEW FILE (OR SUPERSEDING
		; AN OLD ONE) ON OUTPUT CLOSE
CL.NMB==1B31	;INHIBIT DELETING NAME BLOCK ON A
		; CLOSE WITH ONLY A LOOKUP DONE
CL.ACS==1B32	;INHIBIT UPDATING ACCESS DATE
CL.DLL==1B33	;INHIBIT DEALLOCATION OF ALLOCATED
		; BUT UNWRITTEN BLOCKS
CL.IN==1B34	;INHIBIT CLOSING INPUT
CL.OUT==1B35	;INHIBIT CLOSING OUTPUT

;OPEN BLOCK

.OPMOD==0	;MODE, ETC.
.OPDEV==1	;DEVICE NAME
.OPBUF==2	;BUFFER HEADER ADDRESSES

;OPEN AND PHYSICAL BITS

UU.PHY==1B19	;BIT 19 .NE. BIT 18 OF CALLI IMPLIES
		; PHYSICAL DEVICE SEARCH

UU.PHS==1B0	;SIGN BIT IN OPEN BLOCK IMPLIES PHYSICAL
		; DEVICE SEARCH
UU.DEL==1B1	;DISABLE ERROR LOGGING
UU.DER==1B2	;DISABLE ERROR RETRY
UU.AIO==1B3	;ASYNCHRONOUS I/O
UU.IBC==1B4	;ENABLE INHIBITING OF BUFFER CLEAR
;BUFFER HEADER FORMATS
;BUFFER RING HEADER
;;  !=======================================================!
;;  !VR!I!                       !ADDRESS OF CURRENT BUFFER !
;;  !-------------------------------------------------------!
;;  !                 BYTE POINTER TO DATA                  !
;;  !-------------------------------------------------------!
;;  !                     BYTE COUNTER                      !
;;  !=======================================================!
;;  !      (MPX: ONLY) UNIVERSAL INDEX OF THIS DEVICE       !
;;  !=======================================================!

.BFADR==0	;ADDRESS OF BUFFER RING
	BF.VBR==1B0	;VIRGIN BUFFER RING
	BF.IBC==1B1	;INHIBIT BUFFER CLEAR
.BFPTR==1	;BYTE POINTER TO DATA
.BFCTR==2	;ITEM BYTE COUNT
.BFUDX==3	;UNIVERSAL DEVICE INDEX (MPX: ONLY)

;INDIVIDUAL BUFFER HEADER
;;  !=======================================================!
;;  !                           !        FILE STATUS        !
;;  !-------------------------------------------------------!
;;  !US!        DATA SIZE       !    NEXT BUFFER ADDRESS    !
;;  !-------------------------------------------------------!
;;  !  (MPX:) UNIV.DEV. INDEX   !        WORD COUNT         !
;;  !=======================================================!
;;  /                                                       /
;;  /                                                       /
;;  !                         DATA                          !
;;  /                                                       /
;;  /                                                       /
;;  !=======================================================!

.BFSTS==0	;FILE STATUS WORD
	BF.STS==0,,-1	;FILE STATUS THIS BUFFER
.BFHDR==1	;BUFFER CONTROL THIS BUFFER
	BF.IOU==1B0	;BUFFER IN USE
	BF.SIZ==377777B17  ;SIZE OF BUFFER
	BF.NBA==777777	;NEXT BUFFER ADDRESS
.BFCNT==2	;WORD COUNT OF DATA (SOMEWHAT DEVICE DEPENDENT)

;MVHDR. UUO

MVHDR%==1	;CHANNEL NOT OPEN
;CNECT. FUNCTIONS

.CNCCN==1	;CONNECT DEVICE
.CNCDC==2	;CLOSE AND DISCONNECT
.CNCDR==3	;RESET AND DISCONNECT

;CNECT. ERRORS

CNCNM%==1	;NOT MPX: CHANNEL
CNCUD%==2	;UNKNOWN DEVICE
CNCCM%==3	;CAN'T MULTIPLEX THIS DEVICE
CNCNF%==4	;NO FREE STORAGE
CNCNC%==5	;NOT CONNECTED
CNCNO%==6	;CHANNEL NOT OPEN
CNCII%==7	;INVALID UNIVERSAL DEVICE INDEX
CNCUF%==10	;UNKNOWN FUNCTION
CNCDU%==11	;DEVICE UNAVAILABLE
CNCSD%==12	;SPOOLED DEVICE

;SENSE. SUB-BLOCK

.SNSDV==0	;DEVICE NAME IN SIXBIT
.SNSST==1	;GETSTS
.SNSDS==2	;DEVSTS

;SENSE. ERRORS

SNSBD%==1	;BAD DEVICE

;ERLST. ERRORS

ERLBC%==1	;BAD CHANNEL
ERLNM%==2	;NOT MPX: CHANNEL

;CLRST. BLOCK

.CLRSX==0	;UDX
.CLRST==1	;SETSTS

;CLRST. ERRORS

CLRID%==1	;ILLEGAL DEVICE
CLRNO%==2	;NOT OWN DEVICE
;DEVLNM ERRORS

DVLNX%==-1	;NON-EXISTENT DEVICE
DVLIU%==-2	;LOGICAL NAME IN USE
DVLNA%==-3	;DEVICE NOT ASSIGNED OR OPEN

;DEVSIZ ERRORS

DVSDM%==0	;DUMP MODE
DVSNX%==-1	;NON-EXISTENT DEVICE
DVSIM%==-2	;ILLEGAL MODE
;HARDWARE CHANNEL DATA BLOCK WORDS

.CNBSY==0	;BUSY IF POSITIVE
.CNSYS==1	;LH=ADDRESS OF NEXT BLOCK
.CNLUE==1	;RH=ADDRESS OF UNIT WITH LAST ERROR
.CNICW==2	;INITIAL C.W. ON LAST ERROR
.CNFCW==3	;FINAL C.W. ON LAST ERROR
.CNCW2==4	;COMMAND WORD-2 OF ERROR
.CNCW1==5	;-1
.CNCW0==6	;-0
.CNDW2==7	;DATA WORD-2
.CNDW1==10	;DATA WORD-1
.CNDW0==11	;DATA WORD-0
.CNMPE==12	;NO. CHANNEL MEMORY PARITY ERRORS
.CNDPE==13	;NO. DATA PARITY ERRORS
.CNNXM==14	;NO. CHANNEL NXM
.CNCSR==15	;LH=BITS TO REQUEST CPU SWEEP OF CORE
.CNLDE==15	;RH=LAST DDB ADDR
.CNCBL==16	;LENGTH OF DATA BLOCK
	SUBTTL	DISK UUOS

;DSKCHR STATUS BITS
;;  !=======================================================================!
;;  !R!O!H!S!A!Z! !STS!M!N!L!     ! TYP ! DCN !  CNT-TYP  ! CNN ! UNT ! UNN !
;;  !=======================================================================!

DC.RHB==1B0	;READ HOME BLOCK
DC.OFL==1B1	;UNIT IS OFF-LINE
DC.HWP==1B2	;HARDWARE WRITE PROTECT
DC.SWP==1B3	;SOFTWARE WRITE PROTECT
DC.SAF==1B4	;SINGLE ACCESS FILE STRUCTURE
DC.ZMT==1B5	;ZERO MOUNT COUNT
DC.STS==3B8	;UNIT STATUS
	.DCSTP==0	;PACK IS MOUNTED
	.DCSTN==2	;NO PACK IS MOUNTED
	.DCSTD==3	;UNIT IS DOWN
DC.MSB==1B9	;MULTIPLE SAT BLOCKS
DC.NNA==1B10	;NO NEW ACCESSES
DC.AWL==1B11	;WRITE LOCKED FOR ALL JOBS
DC.TYP==7B17	;TYPE OF ARGUMENT
	.DCTDS==0	;GENERIC DSK
	.DCTAB==1	;SUBSET DUE TO ABBREVIATIONS
	.DCTFS==2	;FILE STRUCTURE NAME
	.DCTUF==3	;UNIT WITHIN F/S
	.DCTCN==4	;CONTROLLER CLASS NAME
	.DCTCC==5	;CONTROLLER CLASS
	.DCTPU==6	;PHYSICAL UNIT
DC.DCN==7B20	;DATA CHANNEL NUMBER
DC.CNT==77B26	;CONTROLLER TYPE
	.DCCFH==1	;RC-10
	.DCCDP==2	;RP-10
DC.CNN==7B29	;CONTROLLER NUMBER
DC.UNT==7B32	;UNIT TYPE
	.DCUFD==0	;RD-10
	.DCUFM==1	;RM-10B
	.DCUD2==1	;RP02
	.DCUD3==2	;RP03
DC.UNN==7B35	;PHYSICAL UNIT NUMBER
;DSKCHR LOCATIONS

.DCNAM==0	;ARGUMENT NAME
.DCUFT==1	;LOGGED IN BLOCKS REMAINING
.DCFCT==2	;PHYSICAL FCFS BLOCKS REMAINING
.DCUNT==3	;PHYSICAL UNIT BLOCKS REMAINING
.DCSNM==4	;STRUCTURE NAME
.DCUCH==5	;CHARACTERISTIC SIZES
	DC.UCC==777B8	;BLOCKS/CLUSTER
	DC.UCT==777B17	;BLOCKS/TRACK
	DC.UCY==777777	;BLOCKS/CYLINDER
.DCUSZ==6	;UNIT SIZE IN BLOCKS
.DCSMT==7	;STRUCTURE MOUNT COUNT
.DCWPS==10	;WORDS/SAT
.DCSPU==11	;SATS/UNIT
.DCK4S==12	;K FOR SWAPPING
.DCSAJ==13	;SINGLE ACCESS JOB
.DCULN==14	;UNIT LOGICAL NAME
.DCUPN==15	;UNIT PHYSICAL NAME
.DCUID==16	;UNIT ID
.DCUFS==17	;UNIT FIRST BLOCK FOR SWAPPING


;FUNCTIONS FOR CHKACC UUO

.ACCPR==0	;CHANGE PROTECTION
.ACREN==1	;RENAME
.ACWRI==2	;WRITE
.ACUPD==3	;UPDATE
.ACAPP==4	;APPEND
.ACRED==5	;READ
.ACEXO==6	;EXECUTE
.ACCRE==7	;CREATE
.ACSRC==10	;SEARCH DIRECTORY


;FUNCTIONS FOR DISK. UUO

.DUPRI==0	;SET PRIORITY

;DISK. ERRORS

DUILF%==-1	;ILLEGAL FUNCTION
DUILP%==-2	;ILLEGAL PRIORITY
;JOBSTR UUO

.DFJNM==0	;STR NAME
.DFJDR==1	;DIRECTORY
.DFJST==2	;STATUS
	DF.SWL==1B0	;WRITE LOCKED
	DF.SNC==1B1	;NO CREATE

;GOBSTR UUO

.DFGJN==0	;JOB NUMBER
.DFGPP==1	;JOB P,PN
.DFGNM==2	;STR NAME
.DFGDR==3	;DIRECTORY
.DFGST==4	;STATUS (SAME AS .DFJST)

;GOBSTR ERRORS

DFGIF%==3	;ILLEGAL STR
DFGPP%==6	;INCORRECT PPN
DFGNP%==10	;NOT PRIV.
DFGLN%==12	;INCORRECT LENGTH

;SUSET. UUO

SU.SOT==1B1	;OUTPUT
SU.SMN==1B2	;MAINTENANCE CYLINDER
SU.SCH==17B12	;CHANNEL
SU.SBL==37,,777777  ;BLOCK NUMBER

;SUSET. ERRORS

SUSNP%==-1	;NOT PRIVILEGED
;PATH UUO AND ARRAY IN LOOKUP/ENTER

.PTFCN==0	;JOB #,,FUNCTION OR ARGUMENT CHANNEL OR DEVICE
		.PTFRD==-1	;READ DEFAULT
		.PTFSD==-2	;SET DEFAULT PATH
		.PTFSL==-3	;SET LIB, NEW, SYS
		.PTFRL==-4	;READ LIB, NEW, SYS
.PTSTR==0	;ANSWER HAS STR NAME
.PTSWT==1	;SWITCHES AND FLAGS
	PT.SLT==7B29	;TYPE OF SEARCH LIST
		.PTSLJ==1	;JOB
		.PTSLA==2	;ALL
		.PTSLS==3	;SYS
	PT.IPP==1B30	;IMPLIED PPN (FORCED)
	PT.LIB==1B31	;/LIB
	PT.SYS==1B32	;/SYS
	PT.NEW==1B33	;/NEW
	PT.SCN==3B35	;SCAN SWITCH
		.PTSCN==1	;NO (OFF)
		.PTSCY==2	;YES (ON)
	PT.SNW==1B34	;/NEW ON .PTFSL/.PTFRL
	PT.SSY==1B35	;/SYS ON .PTFSL/.PTFRL
.PTPPN==2	;PPN (UFD) OF PATH
.PTMAX==11	;LAST POSSIBLE 0 AFTER LAST SFD +1
		;(IE, LENGTH OF PATH BLOCK)
;STRUUO FUNCTIONS

.FSSRC==0	;UPDATE THIS SEARCH LIST (SEE .DFJXX)
.FSDSL==1	;UPDATE SYSTEM/JOB SEARCH LIST
	.FSDJN==1	;JOB# (0=SYS)
	.FSDPP==2	;PPN
	.FSDFL==3	;FLAGS
		DF.SRM==1B35	;REMOVE FROM S/L COMPLETELY
.FSDEF==2	;DEFINE NEW F/S
.FSRDF==3	;CHANGE F/S STATUS
	.FSRJN==1	;JOB NUMBER
	.FSRPP==2	;JOB P,PN
	.FSRNM==3	;STR NAME
	.FSRST==4	;NEW STATUS
		FS.RWL==1B0	;WRITE LOCK ALL USERS
		FS.RSA==1B1	;SINGLE ACCESS
.FSLOK==4	;LOCK F/S
.FSREM==5	;REMOVE F/S
.FSULK==6	;TEST/SET UFD INTERLOCK
.FSUCL==7	;CLEAR UFD INTERLOCK
.FSETS==10	;SIMULATE ERROR
	.FSEUN==1	;UNIT
	.FSEGT==2	;NUMBER OF TRANSFERS BEFORE ERROR
	.FSEDB==3	;NUMBER OF DATAI'S TO RUIN
	.FSEDO==4	;OR TO DATAI
	.FSEDA==5	;ANDCAM TO DATAI
	.FSECB==6	;NUMBER OF CONI'S TO RUIN
	.FSECO==7	;OR TO CONI
	.FSECA==10	;ANDCAM TO CONI

;STRUUO ERRORS

FSILF%==0	;ILLEGAL FUNCTION CODE
FSSNF%==1	;STR NOT FOUND
FSSSA%==2	;STR IS SINGLE ACCESS
FSILE%==3	;ILLEGAL ENTRY IN LIST
FSTME%==4	;TOO MANY ENTRIES IN S/L
FSUNA%==5	;UNIT NOT AVAILABLE
FSPPN%==6	;PPN DOES NOT MATCH
FSMCN%==7	;MOUNT COUNT GREATER THAN ONE
FSNPV%==10	;NOT PRIVILEGED USER
FSFSA%==11	;STRUCTURE ALREADY EXISTS
FSILL%==12	;ILLEGAL ARGUMENT LIST LENGTH
FSUNC%==13	;UNABLE TO COMPLETE UUO
FSNFS%==14	;SYSTEM FULL OF STRS
FSNCS%==15	;INSUFFICIENT FREE CORE FOR DATA BLOCKS
FSUNF%==16	;ILLEGAL UNIT
FSRSL%==17	;STR REPEATED IN S/L
;DEFINE RIB LOCATIONS (IE, INDEX IN EXTENDED LOOKUP/ENTER BLOCK)

.RBCNT==0	;COUNT OF ARGS FOLLOWING
	RB.NSE==1B18	;(ENTER ONLY) NON-SUPERSEDING ENTER
.RBPPN==1	;DIRECTORY NAME OR POINTER
.RBNAM==2	;FILENAME
.RBEXT==3	;EXTENSION, ACCESS DATE, ERROR CODE
	RB.CRX==7B20	;EXTENSION OF RB.CRD
	RB.ACD==77777	;ACCESS DATE
.RBPRV==4	;PRIVILEGE, MODE, CREATION TIME AND DATE
	RB.PRV==777B8	;PRIVILEGE
	RB.MOD==17B12	;MODE
	RB.CRT==3777B23	;CREATION TIME
	RB.CRD==7777B35	;CREATION DATE
.RBSIZ==5	;LENGTH
.RBVER==6	;VERSION
.RBSPL==7	;SPOOLED FILE NAME
.RBEST==10	;ESTIMATED LENGTH
.RBALC==11	;ALLOCATION
.RBPOS==12	;POSITION TO ALLOCATE
.RBFT1==13	;DEC NON-PRIV. FUTURE ARG
.RBNCA==14	;NON-PRIV. CUSTOMER ARG
.RBMTA==15	;TAPE LABEL
.RBDEV==16	;LOGICAL UNIT NAME
.RBSTS==17	;FILE STATUS BITS
	RP.LOG==1B0	;LOGGED IN
	RP.UCE==1B9	;CHECKSUM ERROR
	RP.UWE==1B10	;WRITE ERROR
	RP.URE==1B11	;READ ERROR
	RP.UER==7B11	;ALL UFD ERRORS
	RP.DIR==1B18	;DIRECTORY
	RP.NDL==1B19	;NO DELETES
	RP.NFS==1B21	;DON'T FAILSAFE
	RP.ABC==1B22	;ALWAYS BAD CHECKSUM
	RP.NQC==1B25	;NON-QUOTA CHECKED FILE
	RP.CMP==1B26	;UFD COMPRESSING
	RP.FCE==1B27	;CHECKSUM ERROR
	RP.FWE==1B28	;WRITE ERROR
	RP.FRE==1B29	;READ ERROR
	RP.BFA==1B32	;BAD BY FAILSA RESTORE
	RP.CRH==1B33	;CLOSED AFTER CRASH
	RP.BDA==1B35	;BAD BY DAMAGE ASSESSMENT
	RP.ERR==715	;ALL FILE ERRORS
.RBELB==20	;ERROR LOGICAL BLOCK
.RBEUN==21	;ERROR UNIT AND LENGTH
.RBQTF==22	;FCFS LOGGED-IN QUOTA
.RBQTO==23	;LOGGED-OUT QUOTA
.RBQTR==24	;RESERVED QUOTA
.RBUSD==25	;BLOCK IN USE
.RBAUT==26	;AUTHOR
.RBNXT==27	;CONTINUED STR
.RBPRD==30	;PREDECESSOR STR
.RBPCA==31	;PRIV. CUSTOMER ARG
.RBUFD==32	;POINTER BACK TO UFD
.RBFLR==33	;RELATIVE BLOCK IN FILE COVERED BY THIS RIB
.RBXRA==34	;POINTER TO NEXT RIB IN CHAIN
.RBTIM==35	;CREATION DATE,,TIME IN INTERNAL SYSTEM FORMAT
;LOOKUP/ENTER/RENAME/GETSEG/RUN ERROR CODES

ERFNF%==0	;FILE NOT FOUND
ERIPP%==1	;INCORRECT PPN
ERPRT%==2	;PROTECTION FAILURE
ERFBM%==3	;FILE BEING MODIFIED
ERAEF%==4	;ALREADY EXISTING FILE NAME
ERISU%==5	;ILLEGAL SEQUENCE OF UUOS
ERTRN%==6	;TRANSMISSION ERROR
ERNSF%==7	;NOT A SAVE FILE
ERNEC%==10	;NOT ENOUGH CORE
ERDNA%==11	;DEVICE NOT AVAILABLE
ERNSD%==12	;NO SUCH DEVICE
ERILU%==13	;ILLEGAL UUO
ERNRM%==14	;NO ROOM
ERWLK%==15	;WRITE-LOCKED
ERNET%==16	;NOT ENOUGH TABLE SPACE
ERPOA%==17	;PATIAL ALLOCATION
ERBNF%==20	;BLOCK NOT FREE
ERCSD%==21	;CAN'T SUPERSEDE A DIRECTORY
ERDNE%==22	;CAN'T DELETE NON-EMPTY DIRECTORY
ERSNF%==23	;SFD NOT FOUND
ERSLE%==24	;SEARCH LIST EMPTY
ERLVL%==25	;SFD NEST LEVEL TOO DEEP
ERNCE%==26	;NO-CREATE FOR ALL S/L
ERSNS%==27	;SEGMENT NOT ON SWAP SPACE
ERFCU%==30	;CAN'T UPDATE FILE
ERLOH%==31	;LOW SEG OVERLAPS HI SEG (GETSEG)

;FILE PROTECTION CODES

.PTCPR==0	;CHANGE PROTECTION
.PTREN==1	;RENAME
.PTWRI==2	;WRITE
.PTUPD==3	;UPDATE
.PTAPP==4	;APPEND
.PTRED==5	;READ
.PTEXO==6	;EXECUTE
.PTNON==7	;NO-ACCESS

;DIRECTORY PROTECTION CODES

PT.LOK==4	;ALLOW LOOKUPS
PT.CRE==2	;ALLOW CREATES
PT.SRC==1	;SEARCH DIRECTORY
	SUBTTL	

	.XCREF
%%C==<BYTE (3)CUSTVR(9)DECVER(6)DECMVR(18)DECEVR>

	PURGE	CUSTVR,DECVER,DECMVR,DECEVR

>;END IFN %..C+77 ON PAGE 1

	IF1,<	ASUPPRESS>
	IFDEF %.C,<IFLE %.C+2,<
			IF2,<PURGE %.C,%..C>
			END>>	;BIND OFF TO GET CLEAN LISTING