Google
 

Trailing-Edge - PDP-10 Archives - BB-H240B-BM - dngen/exemc.mac
There are no other files named exemc.mac in the archive.
	.MACRO	ABODF$,L,B
;+
; TASK ABORT CODES
;
; NOTE: S.COAD-S.CFLT ARE ALSO SST VECTOR OFFSETS
;-
S.COAD='B'0.			;ODD ADDRESS AND TRAPS TO 4
S.CSGF='B'2.			;SEGMENT FAULT
S.CBPT='B'4.			;BREAK POINT OR TRACE TRAP
S.CIOT='B'6.			;IOT INSTRUCTION
S.CILI='B'8.			;ILLEGAL OR RESERVED INSTRUCTION
S.CEMT='B'10.			;NON RSX EMT INSTRUCTION
S.CTRP='B'12.			;TRAP INSTRUCTION
S.CFLT='B'14.			;11/40 FLOATING POINT EXCEPTION
S.CSST='B'16.			;SST ABORT-BAD STACK
S.CAST='B'18.			;AST ABORT-BAD STACK
S.CABO='B'20.			;ABORT VIA DIRECTIVE
S.CLRF='B'22.			;TASK LOAD REQUEST FAILURE
S.CCRF='B'24.			;TASK CHECKPOINT READ FAILURE
S.IOMG='B'26.			;TASK EXIT WITH OUTSTANDING I/O
S.PRTY='B'28.			;TASK MEMORY PARITY ERROR
;
; TASK TERMINATION NOTIFICATION MESSAGE CODES
;
T.NDNR='B'0			;DEVICE NOT READY
T.NDSE='B'2			;DEVICE SELECT ERROR
T.NCWF='B'4			;CHECKPOINT WRITE FAILURE
T.NCRE='B'6			;CARD READER HARDWARE ERROR
T.NDMO='B'8.			;DISMOUNT COMPLETE
T.NLDN='B'12.			;LINK DOWN (NETWORKS)
T.NLUP='B'14.			;LINK UP (NETWORKS)
	.MACRO	ABODF$	X,Y
	.ENDM	ABODF$
	.ENDM	ABODF$
	.MACRO 	CLKDF$,L,B
;+
; CLOCK QUEUE CONTROL BLOCK OFFSET DEFINITIONS
;
; CLOCK QUEUE CONTROL BLOCK
;
; THERE ARE FIVE TYPES OF CLOCK QUEUE CONTROL BLOCKS. EACH CONTROL BLOCK HAS
; THE SAME FORMAT IN THE FIRST FIVE WORDS AND DIFFERS IN THE REMAINING THREE.
;
; THE FOLLOWING CONTROL BLOCK TYPES ARE DEFINED:
;-
C.MRKT='B'0			;MARK TIME REQUEST
C.SCHD='B'2			;TASK REQUEST WITH PERIODIC RESCHEDULING
C.SSHT='B'4			;SINGLE SHOT TASK REQUEST
C.SYST='B'6			;SINGLE SHOT INTERNAL SYSTEM SUBROUTINE (IDENT)
C.SYTK='B'8.			;SINGLE SHOT INTERNAL SYSTEM SUBROUTINE (TASK)
C.CSTP='B'10.			;CLEAR STOP BIT (CONDITIONALIZED ON SHUFFLING)
;
; CLOCK QUEUE CONTROL BLOCK TYPE INDEPENDENT OFFSET DEFINTIONS
;
	.ASECT
.=0
C.LNK:'L' .BLKW	1		;CLOCK QUEUE THREAD WORD
C.RQT:'L' .BLKB	1		;REQUEST TYPE
C.EFN:'L' .BLKB	1		;EVENT FLAG NUMBER (MARK TIME ONLY)
C.TCB:'L' .BLKW	1		;TCB ADDRESS OR SYSTEM SUBROUTINE IDENTIFICATION
C.TIM:'L' .BLKW	2		;ABSOLUTE TIME WHEN REQUEST COMES DUE
;
; CLOCK QUEUE CONTROL BLOCK-MARK TIME DEPENDENT OFFSET DEFINITIONS
;
.=C.TIM+4			;START OF DEPENDENT AREA
C.AST:'L' .BLKW	1		;AST ADDRESS
C.SRC:'L' .BLKW	1		;FLAG MASK WORD FOR 'BIS' SOURCE
C.DST:'L' .BLKW	1		;ADDRESS OF 'BIS' DESTINATION
;
; CLOCK QUEUE CONTROL BLOCK-PERIODIC RESCHEDULING DEPENDENT OFFSET DEFINITIONS
;
.=C.TIM+4			;START OF DEPENDENT AREA
C.RSI:'L' .BLKW	2		;RESCHEDULE INTERVAL IN CLOCK TICKS
C.UIC:'L' .BLKW	1		;SCHEDULING UIC
;
; CLOCK QUEUE CONTROL BLOCK-SINGLE SHOT DEPENDENT OFFSET DEFINITIONS
;
.=C.TIM+4			;START OF DEPENDENT AREA
	.BLKW	2		;TWO UNUSED WORDS
	.BLKW	1		;SCHEDULING UIC
;
; CLOCK QUEUE CONTROL BLOCK-SINGLE SHOT INTERNAL SUBROUTINE OFFSET DEFINITIONS
;
; THERE ARE TWO TYPE CODES FOR THIS TYPE OF REQUEST:'L'
;
;	TYPE 6=SINGLE SHOT INTERNAL SUBROUTINE WITH A 16 BIT VALUE AS AN IDENTIFIER.
;	TYPE 8=SINGLE SHOT INTERNAL SUBROUTINE WITH A TCB ADDRESS AS AN IDENTIFIER.
;
.=C.TIM+4			;START OF DEPENDENT AREA
C.SUB:'L' .BLKW	1		;SUBROUTINE ADDRESS
C.AR5:'L' .BLKW	1		;RELOCATION BASE (FOR LOADABLE DRIVERS)
	.BLKW	1		;ONE UNUSED WORD
C.LGTH='B'.			;LENGTH OF CLOCK QUEUE CONTROL BLOCK
	.PSECT
	.MACRO	CLKDF$	X,Y
	.ENDM	CLKDF$
	.ENDM	CLKDF$
	.MACRO	DCBDF$,L,B
;+
;
; DEVICE CONTROL BLOCK
;
; THE DEVICE CONTROL BLOCK (DCB) DEFINES GENERIC INFORMATION ABOUT A DEVICE
; TYPE AND THE LOWEST AND HIGHEST UNIT NUMBERS. THERE IS AT LEAST ONE DCB
; FOR EACH DEVICE TYPE IN A SYSTEM. FOR EXAMPLE, IF THERE ARE TELETYPES IN A
; SYSTEM, THEN THERE IS AT LEAST ONE DCB WITH THE DEVICE NAME 'TT'. IF PART
; OF THE TELETYPES WERE INTERFACED VIA DL11-A'S AND THE REST VIA A DH11, THEN
; THERE WOULD BE TWO DCB'S. ONE FOR ALL DL11-A INTERFACED TELETYPES, AND ONE
; FOR ALL DH11 INTERFACED TELETYPES.
;-
	.ASECT	
.=0
D.LNK:'L' .BLKW	1		;LINK TO NEXT DCB
D.UCB:'L' .BLKW	1		;POINTER TO FIRST UNIT CONTROL BLOCK
D.NAM:'L' .BLKW	1		;GENERIC DEVICE NAME
D.UNIT:'L' .BLKB 1		;LOWEST UNIT NUMBER COVERED BY THIS DCB
	.BLKB	1		;HIGHEST UNIT NUMBER COVERED BY THIS DCB
D.UCBL:'L' .BLKW 1		;LENGTH OF EACH UNIT CONTROL BLOCK IN BYTES
D.DSP:'L' .BLKW	1		;POINTER TO DRIVER DISPATCH TABLE
D.MSK:'L' .BLKW	1		;LEGAL FUNCTION MASK  CODES 0-15.
	.BLKW	1		;CONTROL FUNCTION MASK CODES 0-15.
	.BLKW	1		;NOP'ED FUNCTION MASK CODES 0-15.
	.BLKW	1		;ACP FUNCTION MASK CODES 0-15.
	.BLKW	1		;LEGAL FUNCTION MASK CODES 16.-31.
	.BLKW	1		;CONTROL FUNCTION MASK CODES 16.-31.
	.BLKW	1		;NOP'ED FUNCTION MASK CODES 16.-31.
	.BLKW	1		;ACP FUNCTION MASK CODES 16.-31.
D.PCB:'L' .BLKW	1		;LOADABLE DRIVER PCB ADDRESS
	.PSECT
 
;+
; DRIVER DISPATCH TABLE OFFSET DEFINITIONS
;-
D.VINI='B'0			;DEVICE INITIATOR
D.VCAN='B'2			;CANCEL CURRENT I/O FUNCTION
D.VOUT='B'4			;DEVICE TIMEOUT
D.VPWF='B'6			;POWERFAIL RECOVERY
	.MACRO	DCBDF$,X,Y
	.ENDM	DCBDF$
	.ENDM	DCBDF$
	.MACRO	DEVDF$,L,B
 
	.MCALL	DCBDF$
	DCBDF$	<L>,<B>
 
	.MCALL	UCBDF$
	UCBDF$	<L>,<B>
 
	.MCALL	SCBDF$
	SCBDF$	<L>,<B>
 
	.MCALL	LCBDF$
	LCBDF$	<L>,<B>
 
	
	.MACRO	DEVDF$,X,Y
	.ENDM	DEVDF$
	.ENDM	DEVDF$
	.MACRO	EMBDF$,L,B
;+
; ERROR MESSAGE BLOCK DEFINITIONS 
; 
; THE FOLLOWING ERROR CODES ARE DEFINED:
;-
EC.INI='B'40
EC.DVC='B'1		;DEVICE ERROR BIT SET 
EC.DTO='B'140		;DEVICE INTERRUPT TIMEOUT
EC.NSI='B'141		;UNDEFINED INTERRUPTS
EC.LOA='B'4		;DRIVER LOAD
EC.UNL='B'10		;DRIVER UNLOAD
EC.MPE='B'2		;MEMORY PARITY ERROR 
EC.PWR='B'42		;POWER FAIL
; 
; ERROR MESSAGE BLOCK INDEPENDENT OFFSET DEFINITIONS
; 
	.ASECT
.=0 
E.SIZE:'L' .BLKW 1	;SIZE OF THE EMB IN BYTES 
E.CODE:'L' .BLKB 1	;ERROR CODE
	 .BLKB 1	;RESERVED
E.TIME:'L' .BLKB 6	;TIME OF ERROR-S,M,H,D,M,Y
E.SEQ:'L'.BLKW 1	;SEQUENCE NUMBER
E.ABM:'L'.BLKW 1	;SAVED I/O ACTIVE BITMAP
; 
; ERROR MESSAGE BLOCK - UNDEFINED INTERRUPT OFFSET DEFINITIONS
; 
.=E.ABM+2 
E.VCTR:'L' .BLKB 1	;ID OF VECTOR TRAPPED THROUGH 
E.LOST:'L' .BLKB 1	;NUMBER OF LOST UNDEFINED INTERRUPTS
E.OPS:'L'.BLKW 1	;OLD PSPREINTERRUPT
E.OPC:'L'  .BLKW 1	;OLD PC PREINTERRUPT
; 
; ERROR MESSAGE BLOCK - DEVICE ERRORS AND DEVICE INTERRUPT
;			TIMEOUT OFFSET DEFINITIONS
; 
.=E.ABM+2 
E.RTRY:'L' .BLKB 2	;LOW BYTE=LEFT, HI BYTE =START
	 .BLKB 1	;TASK PRIORITY
E.IOC:'L'.BLKB 1	;I/O IN PROGRESS COUNT
E.TASK:'L' .BLKW 2	;TASK NAME
E.PAR:'L'.BLKW 1	;PARTITION ADDRESS
E.UIC:'L'.BLKW 1	;TASK UIC
E.UCB:'L'.BLKW 1	;DEVICE UCB ADDRESS 
E.FCN:'L'.BLKB 2	;QIO FUNCTION CODE
E.PRM:'L'.BLKW 1	;BUFFER MAPPING 
	 .BLKW 6	;PARAMETERS 1-6 
E.RCNT:'L' .BLKB 1	;NUMBER OF DEVICE REGISTERS
	 .BLKB 1	;RESERVED 
E.REGS='B'. 
E.LGTH='B'. 
 
;
; ERROR MESSAGE BLOCK - DRIVER LOAD AND UNLOAD
;
 
.=E.TIME+<9.*2>
E.WHY:'L'.BLKW	1	;ACTION CODE (LOAD/UNLOAD)
.=.+2
E.NAME:'L'.BLKW	1	;DEVICE NAME (ASCII)
 
	.PSECT
	.MACRO	EMBDF$	X,Y
	.ENDM 	EMBDF$
	.ENDM 	EMBDF$
	.MACRO	HDRDF$,L,B
;+
; TASK HEADER OFFSET DEFINITIONS
;-
	.ASECT
.=0
H.CSP:'L'.BLKW	1		;CURRENT STACK POINTER
H.HDLN:'L'.BLKW	1		;HEADER LENGTH IN BYTES
H.EFLM:'L'.BLKW	2		;EVENT FLAG MASK WORD AND ADDRESS
H.CUIC:'L'.BLKW	1		;CURRENT TASK UIC
H.DUIC:'L'.BLKW	1		;DEFAULT TASK UIC
H.IPS:'L'.BLKW	1		;INITIAL PROCESSOR STATUS WORD (PS)
H.IPC:'L'.BLKW	1		;INITIAL PROGRAM COUNTER (PC)
H.ISP:'L'.BLKW	1		;INITIAL STACK POINTER (SP)
H.ODVA:'L'.BLKW	1		;ODT SST VECTOR ADDRESS
H.ODVL:'L'.BLKW	1		;ODT SST VECTOR LENGTH
H.TKVA:'L'.BLKW	1		;TASK SST VECTOR ADDRESS
H.TKVL:'L'.BLKW	1		;TASK SST VECTOR LENGTH
H.PFVA:'L'.BLKW	1		;POWER FAIL AST CONTROL BLOCK ADDRESS
H.FPVA:'L'.BLKW	1		;FLOATING POINT AST CONTROL BLOCK ADDRESS
H.RCVA:'L'.BLKW	1		;RECIEVE AST CONTROL BLOCK ADDRESS
H.EFSV:'L'.BLKW	1		;EVENT FLAG ADDRESS SAVE ADDRESS
H.FPSA:'L'.BLKW	1		;POINTER TO FLOATING POINT/EAE SAVE AREA
H.WND:'L'.BLKW	1		;POINTER TO NUMBER OF WINDOW BLOCKS
H.DSW:'L'.BLKW	1		;TASK DIRECTIVE STATUS WORD
H.FCS:'L'.BLKW	1		;FCS IMPURE POINTER
H.FORT:'L'.BLKW	1		;FORTRAN IMPURE POINTER
H.OVLY:'L'.BLKW	1		;OVERLAY IMPURE POINTER
H.VEXT:'L'.BLKW	1		;WORK AREA EXTENSION VECTOR POINTER
H.SPRI:'L'.BLKB	1		;PRIORITY DIFFERENCE FOR SWAPPING
H.NML:'L'.BLKB	1		;NETWORK MAILBOX LUN
H.RRVA:'L'.BLKW	1		;RECEIVE BY REFERENCE AST CONTROL BLOCK ADDRESS
	.BLKW	3		;RESERVED WORDS
H.GARD:'L'.BLKW	1		;POINTER TO HEADER GUARD WORD
H.NLUN:'L'.BLKW	1		;NUMBER OF LUN'S
H.LUN:'L'.BLKW	2		;START OF LOGICAL UNIT TABLE
 
;+
; WINDOW BLOCK OFFSETS
;-
 
.=0
W.BPCB:'L'.BLKW	1		;PARTITION CONTROL BLOCK ADDRESS
W.BLVR:'L'.BLKW	1		;LOW VIRTUAL ADDRESS LIMIT
W.BHVR:'L'.BLKW	1		;HIGH VIRTUAL ADDRESS LIMIT
W.BATT:'L'.BLKW	1		;ADDRESS OF ATTACHMENT DESCRIPTOR
W.BSIZ:'L'.BLKW	1		;SIZE OF WINDOW IN 32W BLOCKS
W.BOFF:'L'.BLKW	1		;PHYSICAL MEMORY OFFSET IN 32W BLOCKS
W.BFPD:'L'.BLKB	1		;FIRST PDR ADDRESS
W.BNPD:'L'.BLKB	1		;NUMBER OF PDR'S TO MAP
W.BLPD:'L'.BLKW	1		;CONTENTS OF LAST PDR
W.BLGH:'L'			;LENGTH OF WINDOW DESCRIPTOR
	.PSECT
	.MACRO	HDRDF$	X,Y
	.ENDM	HDRDF$
	.ENDM	HDRDF$
	.MACRO HWDDF$,L,B
;+
; HARDWARE REGISTER ADDRESSES AND STATUS CODES
;-
MPCSR='B'177746			;ADDRESS OF PDP-11/70 MEMORY PARITY REGISTER
MPAR='B'172100			;ADDRESS OF FIRST MEMORY PARITY REGISTER
PIRQ='B'177772			;PROGRAMMED INTERRUPT REQUEST REGISTER
PR0='B'0			;PROCESSOR PRIORITY 0
PR1='B'40			;PROCESSOR PRIORITY 1
PR4='B'200			;PROCESSOR PRIORITY 4
PR5='B'240			;PROCESSOR PRIORITY 5
PR6='B'300			;PROCESSOR PRIORITY 6
PR7='B'340			;PROCESSOR PRIORITY 7
PS='B'177776			;PROCESSOR STATUS WORD
SWR='B'177570			;CONSOLE SWITCH AND DISPLAY REGISTER
TPS='B'177564			;CONSOLE TERMINAL PRINTER STATUS REGISTER
;+
; EXTENDED ARITHMETIC ELEMENT REGISTERS
;-
	.IF DF	E$$EAE
AC='B'177302			;ACCUMULATOR
MQ='B'177304			;MULTIPLIER-QUOTIENT
SC='B'177310			;SHIFT COUNT
	.ENDC
;+
; MEMORY MANAGEMENT HARDWARE REGISTERS AND STATUS CODES
;-
	.IF DF	M$$MGE
KDSAR0='B'172360		;KERNEL D PAR 0
KDSDR0='B'172320		;KERNEL D PDR 0
KISAR0='B'172340		;KERNEL I PAR 0
KISAR5='B'172352		;KERNEL I PAR 5
KISAR6='B'172354		;KERNEL I PAR 6
KISAR7='B'172356		;KERNEL I PAR 7
KISDR0='B'172300		;KERNEL I PDR 0
KISDR6='B'172314		;KERNEL I PDR 6
KISDR7='B'172316		;KERNEL I PAR 7
SISDR0='B'172200		;SUPERVISOR I PDR 0
UDSAR0='B'177660		;USER D PAR 0
UDSDR0='B'177620		;USER D PDR 0
UISAR0='B'177640		;USER I PAR 0
UISAR4='B'177650		;USER I PAR 4
UISAR5='B'177652		;USER I PAR 5
UISAR6='B'177654		;USER I PAR 6
UISAR7='B'177656		;USER I PAR 7
UISDR0='B'177600		;USER I PDR 0
UISDR4='B'177610		;USER I PDR 4
UISDR5='B'177612		;USER I PDR 5
UISDR6='B'177614		;USER I PDR 6
UISDR7='B'177616		;USER I PDR 7
UBMPR='B'170200			;UNIBUS MAPPING REGISTER 0
CMODE='B'140000			;CURRENT MODE FIELD OF PS WORD
PMODE='B'30000			;PREVIOUS MODE FIELD OF PS WORD
SR0='B'177572			;SEGMENT STATUS REGISTER 0
SR3='B'172516			;SEGMENT STATUS REGISTER 3
	.ENDC
;+
; FEATURE SYMBOL DEFINITIONS
;-
 
FE.EXT='B'1			;11/70 EXTENDED MEMORY SUPPORT
FE.MUP='B'2			;MULTI-USER PROTECTION SUPPORT
FE.EXV='B'4			;EXECUTIVE IS SUPPORTED TO 20K
FE.DRV='B'10			;LOADABLE DRIVER SUPPORT
FE.PLA='B'20			;PLAS SUPPORT
FE.CAL='B'40			;DYNAMIC CHECKPOINT SPACE ALLOCATION
FE.PKT='B'100			;PREALLOCATION OF I/O PACKETS
FE.EXP='B'200			;EXTEND TASK DIRECTIVE SUPPORTED
FE.LSI='B'400			;PROCESSOR IS AN LSI-11
FE.CEX='B'20000			;COM EXEC IS LOADED
FE.MXT='B'40000			;MCR EXIT AFTER EACH COMMAND MODE
FE.NLG='B'100000		;LOGINS DISABLED - MULTI-USER SUPPORT
 
	.MACRO	HWDDF$	X,Y
	.ENDM	HWDDF$
	.ENDM	HWDDF$
	.MACRO	ITBDF$	L,B,SYSDEF
;
;+
; INTERRUPT TRANSFER BLOCK (ITB) OFFSET DEFINITIONS
;-
 
	.IF DF	A$$TRP
 
	.MCALL	PKTDF$
	PKTDF$			; DEFINE AST BLOCK OFFSETS
 
	.ENDC
 
	.ASECT
	.=0
X.LNK:'L' .BLKW	1		; LINK WORD FOR ITB LIST STARTING IN TCB
X.JSR:'L' JSR	R5,@#0		; CALL $INTSC
X.PSW:'L' .BLKB	1		; LOW BYTE OF PSW FOR ISR
	.BLKB	1		; UNUSED
X.ISR:'L' .BLKW	1		; ISR ENTRY POINT (APR5 MAPPING)
X.FORK:'L' 			; FORK BLOCK
	.BLKW	1		; THREAD WORD
	.BLKW	1		; FORK PC
	.BLKW	1		; SAVED R5
	.BLKW	1		; SAVED R4
 
	.IF DF	M$$MGE
 
X.REL:'L' .BLKW	1		; RELOCATION BASE FOR APR5
 
	.ENDC
 
X.DSI:'L' .BLKW	1		; ADDRESS OF DIS.INT. ROUTINE
X.TCB:'L' .BLKW	1		; TCB ADDRESS OF OWNING TASK
 
	.IF NB	SYSDEF
 
	.IF DF	A$$TRP
 
	.BLKW	1		; A.DQSR FOR AST BLOCK
X.AST:'L' .BLKB	A.PRM		; AST BLOCK
 
	.ENDC
 
X.VEC:'L' .BLKW	1		; VECTOR ADDRESS (IF AST SUPPORT,
				; THIS IS FIRST AND ONLY AST PARAMETER)
X.VPC:'L' .BLKW	1		; SAVED VECTOR PC
X.LEN:'L' 			; LENGTH IN BYTES OF ITB
 
	.ENDC
 
	.PSECT
	.MACRO	ITBDF$	X,Y,Z
	.ENDM	ITBDF$
	.ENDM	ITBDF$
	.MACRO	LBLDF$	L,B
 
;+
;
; TASK IMAGE FILE LABEL BLOCK DEFINITIONS
;
; RESIDENT LIBRARY DESCRIPTOR OFFSETS
;
;-
 
	.ASECT
 
.=0
R$LNAM:'L'.BLKW	2		; RADIX-50 LIBRARY NAME
R$LSA:'L' .BLKW	1		; LIBRARY STARTING VIRTUAL ADDRESS 
R$LHGV:'L'.BLKW	1		; LIBRARY ADDRESS WINDOW 0 BOUND
R$LMXV:'L'.BLKW	1		; LIBRARY HIGH VIRTUAL ADDRESS LIMIT
R$LLDZ:'L'.BLKW	1		; LIBRARY LOAD SIZE (32W BLOCKS)
R$LMXZ:'L'.BLKW	1		; LIBRARY MAX. SIZE (32W BLOCKS)
R$LOFF:'L'.BLKW	1		; LIBRARY OFFSET INTO PARTITION (32W BLOCKS)
R$LWND:'L'.BLKW	1		; NUMBER OF LIBRARY ADDRESS WINDOWS
R$LSEG:'L'.BLKW	1		; SIZE OF LIBRARY SEGMENT DESCRIPTORS
R$LFLG:'L'.BLKW	1		; LIBRARY FLAGS WORD
R$LDAT:'L'.BLKW	3		; LIBRARY CREATION DATE (YR., MO., DAY)
R$LSIZ:'L'.BLKW	0		; LENGTH OF LIBRARY DESCRIPTOR
 
;
; LIBRARY LIST ENTRY FLAGS
;
 
LD$ACC='B'100000		; ACCESS INTENT (1=RW, 0=RO)
LD$RSV='B'040000		; APR RESERVATION FLAG (1=APR RESERVED)
LD$REL='B'000004		; PIC FLAG (1=POSITION INDEPENDANT)
 
;
; LABEL BLOCK OFFSETS
;
 
.=0
L$BTSK:'L'.BLKW	2		; RADIX 50 TASK NAME
 
;
;		*** NOTE ***
;
; LABEL BLOCK PARAMETERS BETWEEN THIS OFFSET AND THE START OF THE
; TASK LIBRARY DESCRIPTORS MUST BE IDENTICAL IN FORMAT AND CONTENT
; TO A RESIDENT LIBRARY DESCRIPTOR ENTRY.
;
 
L$BPAR:'L'.BLKW	2		; RADIX 50 PARTITION NAME
L$BSA:'L' .BLKW	1		; TASK STARTING VIRTUAL ADDRESS
L$BHGV:'L'.BLKW	1		; WINDOW 0 VIRTUAL ADDRESS LIMIT
L$BMXV:'L'.BLKW	1		; TASK HIGH VIRTUAL ADDRESS LIMIT
L$BLDZ:'L'.BLKW	1		; TASK LOAD SIZE (32W BLOCKS)
L$BMXZ:'L'.BLKW	1		; TASK MAX. SIZE (32W BLOCKS)
L$BOFF:'L'.BLKW	1		; TASK OFFSET INTO PARTITION (32W BLOCKS)
L$BWND:'L'.BLKW	1		; NUMBER OF TASK WINDOWS (LESS LIBRARIES)
L$BSEG:'L'.BLKW	1		; SIZE OF TASK SEGMENT DESCRIPTORS (BYTES)
L$BFLG:'L'.BLKW	1		; TASK FLAGS WORD
L$BDAT:'L'.BLKW	3		; TASK CREATION DATE (YR., MO., DAY)
L$BLIB:'L'.BLKW	<7.*<R$LSIZ/2>>+1 ; RESIDENT LIBRARY ENTRIES
L$BPRI:'L'.BLKW	1		; TASK PRIORITY
L$BXFR:'L'.BLKW	1		; TASK TRANSFER ADDRESS
L$BEXT:'L'.BLKW	1		; TASK EXTEND SIZE (32W BLOCKS)
L$BSGL:'L'.BLKW	1		; RELATIVE BLOCK NUMBER OF SEGMENT LENGTH LIST
L$BHRB:'L'.BLKW	1		; RELATIVE BLOCK NUMBER OF TASK IMAGE HEADER
L$BBLK:'L'.BLKW	1		; NUMBER OF BLOCKS IN LABEL
L$BLUN:'L'.BLKW	1		; NUMBER OF LOGICAL UNITS
	.BLKW	<512.-.>/2
L$BASG:'L'.BLKW	0		; START OF DEVICE ASSIGNMENT TABLES
 
;
; LABEL BLOCK TASK FLAG WORD DEFINITIONS
;
 
TS$PIC='B'100000		; TASK IS PIC (1=YES)
TS$NHD='B'040000		; NO HEADER IN TASK IMAGE (1=YES)
TS$ACP='B'020000		; TASK IS ANCILLARY CONTROL PROCESSOR (1=YES)
TS$PMD='B'010000		; GENERATE POST-MORTEM DUMP (1=YES)
TS$SLV='B'004000		; TASK IS SLAVEABLE (1=YES)
TS$NSD='B'002000		; NO SEND TO TASK IS PERMITTED (1=YES)
TS$NET='B'001000		; TASK USES NEW NETWORK PROTOCOL (1=YES)
TS$PRV='B'000400		; TASK IS PRIVELEGED (1=YES)
TS$CMP='B'000200		; TASK BUILT IN COMPATIBILITY MODE (1=YES)
TS$CHK='B'000100		; TASK IS CHECKPOINTABLE (0=YES)
TS$RES='B'000040		; TASK HAS RESIDENT OVERLAYS (1=YES)
 
	.PSECT
	.MACRO	LBLDF$	X,Y
	.ENDM	LBLDF$
	.ENDM	LBLDF$
	.MACRO	LCBDF$,L,B
;+
; LOGICAL ASSIGNMENT CONTROL BLOCK
;
; THE LOGICAL ASSIGNMENT CONTROL BLOCK (LCB) IS USED TO ASSOCIATE A
; LOGICAL NAME WITH A PHYSICAL DEVICE UNIT.  LCB'S ARE LINKED TOGETHER
; TO FORM THE LOGICAL ASSIGNMENTS OF A SYSTEM.  ASSIGNMENTS MAY BE ON
; A SYSTEM WIDE OR LOCAL (TERMINAL) BASIS.
;-
 
	.ASECT
.=0
L.LNK:'L' .BLKW 1		;LINK TO NEXT LCB
L.NAM:'L' .BLKW 1		;LOGICAL NAME OF DEVICE
L.UNIT:'L' .BLKB 1		;LOGICAL UNIT NUMBER
L.TYPE:'L' .BLKB 1		;TYPE OF ENTRY (0=SYSTEM WIDE)
L.UCB:'L' .BLKW	1		;TI UCB ADDRESS
L.ASG:'L' .BLKW 1		;ASSIGNMENT UCB ADDRESS
L.LGTH='B'.-L.LNK		;LENGTH OF LCB
	.PSECT
 
	.MACRO	LCBDF$,X,Y
	.ENDM	LCBDF$
	.ENDM	LCBDF$
	.MACRO	MTADF$,L,B
	.ASECT
;
; ANSI MAGTAPE SPECIFIC DATA STRUCTURES
;
; VOLUME SET CONTROL BLOCK OFFSET DEFININTIONS (VSCB)
;
; VOLUME SET AND PROCESS CONTROL SECTION
;
.=0
V.TCNT:'L' .BLKW 1		;TRANSACTION COUNT
V.NXT:'L' .BLKW 1		;PTR TO NEXT VSCB NODE
V.MVL:'L' .BLKW 1		;PTR TO MOUNTED VOL LIST
V.UVL:'L' .BLKW 1		;PTR TO UNMOUNTED VOL LIST
V.ATL:'L' .BLKW 1		;ATL ADDR OF ACCESSING TASK
				; TCB IN RSX11M
V.UCB:'L' .BLKW 1		;ADDR OF CURRENT UCB OR PUD
V.RVOL:'L' .BLKB 1		;CURRENT RELATIVE VOL #
V.MOU:'L' .BLKB 1		;MOUNT MODE BYTE
V.TCHR:'L' .BLKW 1		;UINT CHAR. FOR ALL UNITS USED FOR VOL SET
V.SEQN:'L' .BLKW 1		;CURRENT FILE SEQUENCE #
V.SECN:'L' .BLKW 1		;CURRENT FILE SECTION #
V.TPOS:'L' .BLKB 1		;POSITION OF TAPE IN TM'S TO NXT HDR1
V.PSTA:'L' .BLKB 1		;PROCESS STATUS BYTE
V.TIMO:'L' .BLKW 1		;BLOCKED PROCESS TIMEOUT COUNTER
V.STS:'L' .BLKW 3		;STATUS WORDS USED BY COMMAND
				;EXECUTION MODULES
V.SPAR:'L' .BLKW 1		;SPARE WORD
;
; LABEL DATA SECTION
;
V.BLKL:'L' .BLKW 1		;BLOCK LENGTH
V.RECL:'L' .BLKW 1		;RECORD LENGTH
V.FNAM:'L' .BLKW 3		;FILE NAME
V.FTYP:'L' .BLKW 1		;FILE TYPE
V.FVER:'L' .BLKW 1		;FILE VERSION #
V.CDAT:'L' .BLKW 2		;CREATION DATE
V.EDAT:'L' .BLKW 2		;EXPRIATION DATE
V.BLKC:'L' .BLKW 2		;BLOCK COUNT FOR FILE SECTION
V.RTYP:'L' .BLKB 1		;RECORD TYPE
V.FATT:'L' .BLKB 1		;FILE ATTRIBUTES FOR CARRIAGE CONTROL
;
; NULL WINDOW SECTION
;
V.WIND:'L' .BLKW 6			;NULL WINDOW
S.VSCB=.			;SIZE OF VSCB
	.PSECT
;
; DEFINE OFFSETS INTO NULL WINDOW SECTION
;
	.ASECT
.=0
	W.CTL:	.BLKW 1		;CONTROL WORD IN WINDOW
	V.WINC=V.WIND+W.CTL	; CNTRL WORD IN NULL WINDOW
	.PSECT
				; RELATIVE TO THE VSCB
;
; MOUNTED VOLUME LIST OFFSET DEFININTIONS (MVL)
;
	.ASECT
.=0
	.IF	DF	R$$11M
M.NXT:'L' .BLKW 1		;PTR TO NXT MVL NODE (11M)
	.ENDC
M.UIC:'L' .BLKW 1		;OWNER UIC FROM RVOL #1
M.CH:'L' .BLKW 1		; U.CH/U.VP (11D)
M.PROT:'L' .BLKW 1		;PROTECTION U.AR IN 11D
	.IF	NDF	R$$11M
		.BLKW 2		; ACP WORDS 11D
M.NXT:'L' .BLKW 1		;PTR TO NEXT MVL NODE (11D)
	.ENDC
M.RVOL:'L' .BLKB 1		;RELATIVE VOL # OF MOUNTED VOLUME
M.STAT:'L' .BLKB 1		;VOLUME STATUS
M.VIDP:'L' .BLKW 1		;VOLUME ID POINTER
M.UCB:'L' .BLKW 1		;ADDR OF ASSOC UCB OR PUD
S.MVL=.				;SIZE OF MVL NODE
	.PSECT
;
; UNMOUNTED VOLUME AND VOLUME  LIST OFFSET DEFINITIONS (UVL)
;
	.ASECT
.=0
L.NXT:'L' .BLKW 1		;PTR TO NXT UVL NODE
L.VOL1:'L' .BLKB 1		;REL VOL # OF 1'ST VOL IN NODE
L.VOL2:'L' .BLKB 1		;REL VOL # OF 2'ND VOL IN NODE
L.VID1:'L' .BLKB 6		;VOL ID OF 1'ST VOL IN NODE
L.VID2:'L' .BLKB 6		;VOL ID OF 2'ND VOL IN NODE
S.UVL=.				;SIZE OF UVL NODE
	.PSECT
;
;
; SYSTEM DATA STRUCTURE CONTENT VALUES
;
; VSCB VALUES
; V.MOU VALUES
VM.OLD	='B'	200		;OLD .FL300 VOLUME -- VM.BYP WILL ALSO BE SET
VM.BYP	='B'	100		;BYPASS LABEL PROCESSING
VM.ULB	='B'	40		;UNLABELED TAPE
VM.FSC	='B'	20		;OVERRIDE FILE SET ID CHECK
VM.EXC	='B'	10		;OVERRIDE EXPRIATION DATE CHECK
; V.PSTA VALUES - UNBLOCKED TRANSITION STATE
VP.RM	='B'	2		;READ DATA MODE
VP.WM	='B'	4		;WRITE DATA MODE
VP.SM	='B'	10		;SEARCH MODE
VP.MOU	='B'	20		;MOUNT MODE
VP.RWD	='B'	40		;REWIND OR VOL VERIFICATION WAIT
VP.VFY	='B'	VP.RWD
VP.POS	='B'	100		;PROCESS IN POSITIONING MODE (MULTI-SECTION FILE)
;
; BLOCKED STATE = -(UNBLOCKED TRANSITION STATE VALUES)
;
;PROCESS TIMED OUT BIT 0 = 1
	VP.TO=1
;
;
; NULL WINDOW CONTROL BIT DEFINITIONS
;
WI.RDV	='B'	400		;ACCESSED FOR READ
WI.WRV	='B'	1000		;ACCESSED FOR WRITE
WI.EXT	='B'	2000		;ACCESSED FOR EXTEND
WI.LCK	='B'	4000		;LOCKED
;
;
; MVL VALUES IN THE M.STAT FIELD
;
MS.VER	='B'	200		;VOL ID NOT VERIFIED
MS.RID	='B'	1		;VOL ID TO BE READ NOT CHECKED
MS.NMO	='B'	2		;MOUNT MESSAGE NOT GIVEN YET
MS.TMO	='B'	4		;ONE TIMEOUT ALREADY EXPRIED
MS.EXP	='B'	10		;EXPIRATION DATE MESSAGE GIVEN
;
;
; MISC BITS USED IN MOUNT (STORED IN V.STS)
;
MO.OVR	='B'	1		; OVER RIDE VOL NAME SWITCH
MO.UIC	='B'	2		; EXPLICIT UIC GIVEN
MO.PRO	='B'	4		; EXPLICIT PROTECTION GIVEN
MO.160	='B'	10		; 1600 BPI SPECIFIED
;
	.MACRO	MTADF$,X,Y
	.ENDM	MTADF$
	.ENDM	MTADF$
	.MACRO	PCBDF$	L,B,SYSDEF
;+
; PARTITION CONTROL BLOCK OFFSET DEFINITIONS
;-
	.ASECT
.=0
P.LNK:'L'.BLKW	1		;LINK TO NEXT PARTITION PCB
P.PRI:'L'.BLKB	1		;PRIORITY OF PARTITION
P.IOC:'L'.BLKB	1		;I/O + I/O STATUS BLOCK COUNT
P.NAM:'L'.BLKW	2		;PARTITION NAME IN RAD50
P.SUB:'L'.BLKW	1		;POINTER TO NEXT SUBPARTITION
P.MAIN:'L'.BLKW	1		;POINTER TO MAIN PARTITION
 
 
	.IF NB	SYSDEF
 
 
	.IF NDF	M$$MGE
 
P.HDR:'L'			;POINTER TO HEADER CONTROL BLOCK
 
	.ENDC
 
 
	.IFTF
 
P.REL:'L'.BLKW	1		;STARTING PHYSICAL ADDRESS OF PARTITION
P.BLKS:'L'
P.SIZE:'L'.BLKW	1		;SIZE OF PARTITION IN BYTES
P.WAIT:'L'.BLKW	1		;PARTITION WAIT QUEUE LISTHEAD (2 WORDS)
P.SWSZ:'L'.BLKW	1		;PARTITION SWAP SIZE (SYSTEM ONLY)
P.BUSY:'L'.BLKB	2		;PARTITION BUSY FLAGS
P.OWN:'L'
P.TCB:'L'.BLKW	1		;TCB ADDRESS OF OWNER TASK
P.STAT:'L'.BLKW	1		;PARTITION STATUS FLAGS
 
	.IFT
 
 
	.IF DF	M$$MGE
 
P.HDR:'L' .BLKW 1		;POINTER TO HEADER CONTROL BLOCK
 
	.ENDC
 
 
P.PRO:'L' .BLKW 1		;PROTECTION WORD [DEWR,DEWR,DEWR,DEWR]
P.ATT:'L' .BLKW 2		;ATTACHMENT DESCRIPTOR LISTHEAD
 
 
	.IF NDF	P$$LAS
 
P.LGTH='B'P.PRO			;LENGTH OF PARTITION CONTROL BLOCK
 
	.IFF
 
P.LGTH='B'.			;LENGTH OF PARTITION CONTROL BLOCK
 
	.ENDC
 
 
	.ENDC
 
	.PSECT
;+
; PARTITION STATUS WORD BIT DEFINITIONS
;-
 
PS.OUT='B'100000		;PARTITION IS OUT OF MEMORY(1=YES)
PS.CKP='B'40000			;PARTITION CHECKPOINT IN PROGRESS (1=YES)
PS.CKR='B'20000			;PARTITION CHECKPOINT IS REQUESTED (1=YES)
PS.CHK='B'10000			;PARTITION IS NOT CHECKPOINTABLE (1=YES)
PS.FXD='B'4000			;PARTITION IS FIXED (1=YES)
PS.PER='B'2000			;PARITY ERROR IN PARTITION (1=YES)
PS.LIO='B'1000			;MARKED BY SHUFFLER FOR LONG I/O (1=YES)
PS.NSF='B'400			;PARTITION IS NOT SHUFFLEABLE (1=YES)
PS.COM='B'200			;LIBRARY OR COMMON BLOCK (1=YES)
PS.PIC='B'100			;POSITION INDEPENDENT LIBRARY OR COMMON (1=YES)
PS.SYS='B'40			;SYSTEM CONTROLLED PARTITION (1=YES)
PS.DRV='B'20			;DRIVER IS LOADED IN PARTITION (1=YES)
PS.DEL='B'10			;PARTITION SHOULD BE DELETED WHEN NOT ATTACHED (1=YES)
PS.APR='B'7			;STARTING APR NUMBER MASK
 
;+
; ATTACHMENT DESCRIPTOR OFFSETS
;-
 
	.ASECT
.=0
A.PCBL:'L'.BLKW	1		;PCB ATTACHMENT QUEUE THREAD WORD
A.PRI:'L'.BLKB	1		;PRIORITY OF ATTACHED TASK
A.IOC:'L'.BLKB	1		;I/O COUNT THROUGH THIS DESCRIPTOR
A.TCB:'L'.BLKW	1		;TCB ADDRESS OF ATTACHED TASK
A.TCBL:'L'.BLKW	1		;TCB ATTACHMENT QUEUE THREAD WORD
A.STAT:'L'.BLKB	1		;STATUS BYTE
A.MPCT:'L'.BLKB	1		;MAPPING COUNT OF TASK THRU THIS DESCRIPTOR
A.PCB:'L'.BLKW	1		;PCB ADDRESS OF ATTACHED TASK
A.LGTH='B'.			;LENGTH OF ATTACHMENT DESCRIPTOR
 
;+
; ATTACHMENT DESCRIPTOR STATUS BYTE BIT DEFINITIONS
;-
 
	.PSECT
AS.DEL='B'10			;TASK HAS DELETE ACCESS (1=YES)
AS.EXT='B'4			;TASK HAS EXTEND ACCESS (1=YES)
AS.WRT='B'2			;TASK HAS WRITE ACCESS (1=YES)
AS.RED='B'1			;TASK HAS READ ACCESS (1=YES)
 
	.MACRO	PCBDF$	X,Y,Z
	.ENDM	PCBDF$
	.ENDM	PCBDF$
	.MACRO	PKTDF$,L,B,SYSDEF
;+
; ASYNCHRONOUS SYSTEM TRAP CONTROL BLOCK OFFSET DEFINITIONS
;
; SOME POSITIONAL DEPENDENCIES BETWEEN THE OCB AND THE AST CONTROL BLOCK
; ARE RELIED UPON IN THE ROUTINE $FINXT IN THE MODULE SYSXT.
;-
	.ASECT
.=177774
A.KSR5:'L' .BLKW 1		;SUBROUTINE KISAR5 BIAS (A.CBL=0)
A.DQSR:'L' .BLKW 1		;DEQUEUE SUBROUTINE ADDRESS (A.CBL=0)
	.BLKW	1		;AST QUEUE THREAD WORD
A.CBL:'L' .BLKW	1		;LENGTH OF CONTROL BLOCK IN BYTES
A.BYT:'L' .BLKW	1		;NUMBER OF BYTES TO ALLOCATE ON TASK STACK
A.AST:'L' .BLKW	1		;AST TRAP ADDRESS
A.NPR:'L' .BLKW	1		;NUMBER OF AST PARAMETERS
A.PRM:'L' .BLKW	1		;FIRST AST PARAMETER
;+
; I/O PACKET OFFSET DEFINITIONS
;-
	.ASECT
.=0
I.LNK:'L' .BLKW	1		;I/O QUEUE THREAD WORD
I.PRI:'L' .BLKB	1		;REQUEST PRIORITY
I.EFN:'L' .BLKB	1		;EVENT FLAG NUMBER
I.TCB:'L' .BLKW	1		;TCB ADDRESS OF REQUESTOR
I.LN2:'L' .BLKW	1		;POINTER TO SECOND LUN WORD
I.UCB:'L' .BLKW	1		;POINTER TO UNIT CONTROL BLOCK
I.FCN:'L' .BLKW	1		;I/O FUNCTION CODE
I.IOSB:'L' .BLKW	1		;VIRTUAL ADDRESS OF I/O STATUS BLOCK
	.BLKW	1		;I/O STATUS BLOCK RELOCATON BIAS
	.BLKW	1		;I/O STATUS BLOCK ADDRESS
I.AST:'L' .BLKW	1		;AST SERVICE ROUTINE ADDRESS
I.PRM:'L' .BLKW	1		;RESERVED FOR MAPPING PARAMETER #1
	.BLKW	6		;PARAMETERS 1 TO 6
	.BLKW	1		;USER MODE DIAGNOSTIC PARAMETER WORD
I.ATTL='B'.			;MINIMUM LENGTH OF I/O PACKET (USED BY
				;FILE SYSTEM TO CALCULATE MAXIMUM
				;NUMBER OF ATTRIBUTES)
I.LGTH='B'.			;LENGTH OF I/O REQUEST CONTROL BLOCK
 
	.PSECT
	.MACRO	PKTDF$	X,Y,Z
	.ENDM	PKTDF$
	.ENDM	PKTDF$
	.MACRO	SCBDF$,L,B,SYSDEF
;+
; STATUS CONTROL BLOCK
;
; THE STATUS CONTROL BLOCK (SCB) DEFINES THE STATUS OF A DEVICE CONTROLLER.
; THERE IS ONE SCB FOR EACH CONTROLLER IN A SYSTEM. THE SCB IS POINTED TO
; BY UNIT CONTROL BLOCKS. TO EXPAND ON THE TELETYPE EXAMPLE ABOVE, EACH TELE-
; TYPE INTERFACED VIA A DL11-A WOULD HAVE A SCB SINCE EACH DL11-A IS AN IN-
; DEPENDENT INTERFACE UNIT. THE TELETYPES INTERFACED VIA THE DH11 WOULD ALSO
; EACH HAVE AN SCB SINCE THE DH11 IS A SINGLE CONTROLLER BUT MULTIPLEXES MANY
; UNITS IN PARALLEL.
;-
 
	.ASECT	
.=177772
S.RCNT:'L' .BLKB 1		;NUMBER OF REGISTERS TO COPY ON ERROR
S.ROFF:'L' .BLKB 1		;OFFSET TO FIRST DEVICE REGISTER
S.BMSV:'L' .BLKW 1		;SAVED I/O ACTIVE BITMAP AND POINTER TO EMB
S.BMSK:'L' .BLKW 1		;DEVICE I/O ACTIVE BIT MASK
S.LHD:'L' .BLKW	2		;CONTROLLER I/O QUEUE LISTHEAD
S.PRI:'L' .BLKB	1		;DEVICE PRIORITY
S.VCT:'L' .BLKB	1		;INTERRUPT VECTOR ADDRESS /4
S.CTM:'L' .BLKB	1		;CURRENT TIMEOUT COUNT
S.ITM:'L' .BLKB	1		;INITIAL TIMEOUT COUNT
S.CON:'L' .BLKB	1		;CONTROLLER INDEX
S.STS:'L' .BLKB	1		;CONTROLLER STATUS (0=IDLE,1=BUSY)
S.CSR:'L' .BLKW	1		;ADDRESS OF CONTROL STATUS REGISTER
S.PKT:'L' .BLKW	1		;ADDRESS OF CURRENT I/O PACKET
S.FRK:'L' .BLKW	1		;FORK BLOCK LINK WORD
	.BLKW	1		;FORK-PC
	.BLKW	1		;FORK-R5
	.BLKW	1		;FORK-R4
 
 
	.IF NB	SYSDEF
 
 
	.IF DF	L$$DRV & M$$MGE
 
	.BLKW	1		;FORK-DRIVER RELOCATION BASE
 
	.ENDC
 
 
S.CCB:'L' 			;MIXED MASSBUS CHANNEL CONTROL BLOCK
S.MPR:'L' .BLKW	6		;11/70 EXTENDED MEMORY UNIBUS DEVICE C-BLOCK
 
	.IFF
 
	.PSECT
;+
; STATUS CONTROL BLOCK PRIORITY BYTE CONDITION CODE STATUS BIT DEFINITIONS
;-
 
SP.EIP='B'1			;ERROR IN PROGRESS (1=YES)
SP.ENB='B'2			;ERROR LOGGING ENABLED (0=YES)
SP.LOG='B'4			;ERROR LOGGING AVAILABLE (1=YES)
SPARE=10			;SPARE BIT
 
;+
; MAPPING ASSIGNMENT BLOCK (FOR UNIBUS MAPPING REGISTER ASSIGNMENT)
;-
 
	.ASECT
.=0
M.LNK:'L'  .BLKW 1		;LINK WORD
M.UMRA:'L' .BLKW 1		;ADDRESS OF FIRST ASSIGNED UMR
M.UMRN:'L' .BLKW 1		;NUMBER OF UMR'S ASSIGNED * 4
M.UMVL:'L' .BLKW 1		;LOW 16 BITS MAPPED BY 1ST ASSIGNED UMR
M.UMVH:'L' .BLKB 1		;HIGH 2 BITS MAPPED IN BITS 4 AND 5
M.BFVH:'L' .BLKB 1		;HIGH 6 BITS OF PHYSICAL BUFFER ADDRESS
M.BFVL:'L' .BLKW 1		;LOW 16 BITS OF PHYSICAL BUFFER ADDRESS
M.LGTH='B'.			;LENGTH OF MAPPING ASSIGNMENT BLOCK
 
	.ENDC
	.PSECT
	.MACRO	SCBDF$,X,Y,Z
	.ENDM	SCBDF$
	.ENDM	SCBDF$
	.MACRO	TCBDF$,L,B,SYSDEF
;+
; TASK CONTROL BLOCK OFFSET AND STATUS DEFINITIONS
;
; TASK CONTROL BLOCK
;-
	.ASECT
.=0
T.LNK:'L' .BLKW	1		;UTILITY LINK WORD
T.PRI:'L' .BLKB	1		;TASK PRIORITY
T.IOC:'L' .BLKB	1		;I/O PENDING COUNT
T.CPCB:'L' .BLKW 1		;POINTER TO CHECKPOINT PCB
T.NAM:'L' .BLKW	2		;TASK NAME IN RAD50
T.RCVL:'L' .BLKW 2		;RECEIVE QUEUE LISTHEAD
T.ASTL:'L' .BLKW 2		;AST QUEUE LISTHEAD
T.EFLG:'L' .BLKW 2		;TASK LOCAL EVENT FLAGS 1-32
T.UCB:'L' .BLKW	1		;UCB ADDRESS FOR PSEUDO DEVICE 'TI'
T.TCBL:'L' .BLKW 1		;TASK LIST THREAD WORD
T.STAT:'L' .BLKW 1		;FIRST STATUS WORD (BLOCKING BITS)
T.ST2:'L' .BLKW 1		;SECOND STATUS WORD (STATE BITS)
T.ST3:'L' .BLKW 1		;THIRD STATUS WORD (ATTRIBUTE BITS)
T.DPRI:'L' .BLKB 1		;TASK'S DEFAULT PRIORITY
T.LBN:'L' .BLKB	3		;LBN OF TASK LOAD IMAGE
T.LDV:'L' .BLKW	1		;UCB ADDRESS OF LOAD DEVICE
T.PCB:'L' .BLKW	1		;PCB ADDRESS OF TASK PARTITION
T.MXSZ:'L' .BLKW 1		;MAXIMUM SIZE OF TASK IMAGE (MAPPED ONLY)
T.ACTL:'L' .BLKW 1		;ADDRESS OF NEXT TASK IN ACTIVE LIST
T.ATT:'L' .BLKW 2		;ATTACHMENT DESCRIPTOR LISTHEAD
T.OFF:'L' .BLKW 1		;OFFSET TO TASK IMAGE IN PARTITION
	.BLKB 1			;RESERVED
T.SRCT:'L' .BLKB 1		;SREF WITH EFN COUNT IN ALL RECEIVE QUEUES
T.RRFL:'L' .BLKW 2		;RECEIVE BY REFERENCE LISTHEAD
	.IF NB	SYSDEF
	.IF NDF	P$$LAS
T.LGTH='B'T.ATT
	.IFF
 
T.LGTH='B'.			;LENGTH OF TASK CONTROL BLOCK
	.ENDC
T.EXT='B'0			;LENGTH OF TCB EXTENSION
 
	.IFTF
 
;+
; TASK STATUS DEFINITIONS
;
; FIRST STATUS WORD (BLOCKING BITS)
;-
TS.EXE='B'100000		;TASK NOT IN EXECUTION (1=YES)
TS.RDN='B'40000			;I/O RUN DOWN IN PROGRESS (1=YES)
TS.MSG='B'20000			;ABORT MESSAGE BEING OUTPUT (1=YES)
TS.NRP='B'10000			;TASK MAPPED TO NONRESIDENT PARTITION (1=YES)
TS.RUN='B'4000			;TASK IS RUNNING ON ANOTHER PROCESSOR (1=YES)
TS.OUT='B'400			;TASK IS OUT OF MEMORY (1=YES)
TS.CKP='B'200			;TASK IS BEING CHECKPOINTED (1=YES)
TS.CKR='B'100			;TASK CHECKPOINT REQUESTED (1=YES)
;+
; TASK BLOCKING STATUS MASK
;-
 
TS.BLK='B'TS.CKP!TS.CKR!TS.EXE!TS.MSG!TS.NRP!TS.OUT!TS.RDN ;
 
;+
; SECOND STATUS WORD (STATE BITS)
;-
T2.AST='B'100000		;AST IN PROGRESS (1=YES)
T2.DST='B'40000			;AST RECOGNITION DISABLED (1=YES)
T2.CHK='B'20000			;TASK NOT CHECKPOINTABLE (1=YES)
T2.CKD='B'10000			;CHECKPOINTING DISABLED (1=YES)
T2.BFX='B'4000			;TASK BEING FIXED IN MEMORY (1=YES)
T2.FXD='B'2000			;TASK FIXED IN MEMORY (1=YES)
T2.TIO='B'1000			;TASK IS ENGAGED IN TERMINAL I/O
T2.CAF='B'400			;DYN CHECKPOINT SPACE ALLOCATION FAILURE
T2.HLT='B'200			;TASK IS BEING HALTED (1=YES)
T2.ABO='B'100			;TASK MARKED FOR ABORT (1=YES)
T2.STP='B'40			;TASK STOPPED (1=YES)
T2.STP='B'20			;TASK STOPPED (1=YES)
T2.SPN='B'10			;SAVED TS.SPN ON AST IN PROGRESS
T2.SPN='B'4			;TASK SUSPENDED (1=YES)
T2.WFR='B'2			;SAVED TS.WFR ON AST IN PROGRESS
T2.WFR='B'1			;TASK IN WAITFOR STATE (1=YES)
;+
; THIRD STATUS WORD (ATTRIBUTE BITS)
;-
 
T3.ACP='B'100000		;ANCILLARY CONTROL PROCESSOR (1=YES)
T3.PMD='B'40000			;DUMP TASK ON SYNCHRONOUS ABORT (0=YES)
T3.REM='B'20000			;REMOVE TASK ON EXIT (1=YES)
T3.PRV='B'10000			;TASK IS PRIVILEGED (1=YES)
T3.MCR='B'4000			;TASK REQUESTED AS EXTERNAL MCR FUNCTION (1=YES)
T3.SLV='B'2000			;TASK IS A SLAVE TASK (1=YES)
T3.CLI='B'1000			;TASK IS A COMMAND LINE INTERPRETER (1=YES)
T3.RST='B'400			;TASK IS RESTRICTED (1=YES)
T3.NSD='B'200			;TASK DOES NOT ALLOW SEND DATA
T3.CAL='B'100			;TASK HAS CHECKPOINT SPACE IN TASK IMAGE
T3.ROV='B'40			;TASK HAS RESIDENT OVERLAYS
T3.NET='B'20			;NETWORK PROTOCOL LEVEL
 
	.ENDC
 
 
	.PSECT
	.MACRO	TCBDF$	X,Y,Z
	.ENDM	TCBDF$
	.ENDM	TCBDF$
	.MACRO	UCBDF$,L,B
;+
; UNIT CONTROL BLOCK
;
; THE UNIT CONTROL BLOCK (UCB) DEFINES THE STATUS OF AN INDIVIDUAL DEVICE
; UNIT AND IS THE CONTROL BLOCK THAT IS POINTED TO BY THE FIRST WORD OF
; AN ASSIGNED LUN. THERE IS ONE UCB FOR EACH DEVICE UNIT OF EACH DCB. THE
; UCB'S ASSOCIATED WITH A PARTICULAR DCB ARE CONTIGUOUS IN MEMORY AND ARE
; POINTED TO BY THE DCB. UCB'S ARE VARIABLE LENGTH BETWEEN DCB'S BUT ARE
; OF THE SAME LENGTH FOR A SPECIFIC DCB. TO FINISH THE TELETYPE EXAMPLE ABOVE,
; EACH UNIT ON BOTH INTERFACES WOULD HAVE A UCB.
;-
	.ASECT
.=177774
U.LUIC:'L' .BLKW 1		;LOGIN UIC - MULTI USER SYSTEMS ONLY
U.OWN:'L' .BLKW 1		;OWNING TERMINAL - MULTI USER SYSTEMS ONLY
U.DCB:'L' .BLKW	1		;BACK POINTER TO DCB
U.RED:'L' .BLKW	1		;POINTER TO REDIRECT UNIT UCB
U.CTL:'L' .BLKB	1		;CONTROL PROCESSING FLAGS
U.STS:'L' .BLKB	1		;UNIT STATUS
U.UNIT:'L' .BLKB 1		;PHYSICAL UNIT NUMBER
U.ST2:'L' .BLKB	1		;UNIT STATUS EXTENSION
U.CW1:'L' .BLKW	1		;FIRST DEVICE CHARACTERISTICS WORD
U.CW2:'L' .BLKW	1		;SECOND DEVICE CHARACTERISTICS WORD
U.CW3:'L' .BLKW	1		;THIRD DEVICE CHARACTERISTICS WORD
U.CW4:'L' .BLKW	1		;FOURTH DEVICE CHARACTERISTICS WORD
U.SCB:'L' .BLKW	1		;POINTER TO SCB
U.ATT:'L' .BLKW	1		;TCB ADDRESS OF ATTACHED TASK
U.BUF:'L' .BLKW	1		;RELOCATION BIAS OF CURRENT I/O REQUEST
	.BLKW	1		;BUFFER ADDRESS OF CURRENT I/O REQUEST
U.CNT:'L' .BLKW	1		;BYTE COUNT OF CURRENT I/O REQUEST
U.ACP='B'U.CNT+2		;ADDRESS OF TCB OF MOUNTED ACP
U.VCB='B'U.CNT+4		;ADDRESS OF VOLUME CONTROL BLOCK
U.CBF='B'U.CNT+2		;CONTROL BUFFER RELOCATION AND ADDRESS
U.UIC='B'U.CNT+<9.*2>		;TERMINAL UIC (TERMINALS ONLY)
 
	.PSECT
;+
; DEVICE TABLE STATUS DEFINITIONS
;
; DEVICE CHARACTERISTICS WORD 1 (U.CW1) DEVICE TYPE DEFINITION BITS.
;-
DV.REC='B'1			;RECORD ORIENTED DEVICE (1=YES)
DV.CCL='B'2			;CARRIAGE CONTROL DEVICE (1=YES)
DV.TTY='B'4			;TERMINAL DEVICE (1=YES)
DV.DIR='B'10			;FILE STRUCTURED DEVICE (1=YES)
DV.SDI='B'20			;SINGLE DIRECTORY DEVICE (1=YES)
DV.SQD='B'40			;SEQUENTIAL DEVICE (1=YES)
DV.MXD='B'100			;MASS BUS DEVICE (1=YES)
DV.UMD='B'200			;USER MODE DIAGNOSTICS SUPPORTED (1=YES)
DV.SWL='B'1000			;UNIT SOFTWARE WRITE LOCKED (1=YES)
DV.ISP='B'2000			;INPUT SPOOLED DEVICE (1=YES)
DV.OSP='B'4000			;OUTPUT SPOOLED DEVICE (1=YES)
DV.PSE='B'10000			;PSEUDO DEVICE (1=YES)
DV.COM='B'20000			;DEVICE IS MOUNTABLE AS COM CHANNEL (1=YES)
DV.F11='B'40000			;DEVICE IS MOUNTABLE AS F11 DEVICE (1=YES)
DV.MNT='B'100000		;DEVICE IS MOUNTABLE (1=YES)
;+
; TERMINAL DEPENDENT CHARACTERISTICS WORD 2 (U.CW2) BIT DEFINITIONS
;-
U2.DH1='B'100000		;UNIT IS A MULTIPLEXER (1=YES)
U2.DJ1='B'40000			;UNIT IS A DJ11 (1=YES)
U2.RMT='B'20000			;UNIT IS REMOTE (1=YES)
U2.L8S='B'10000			;UNIT IS LA180S (1=YES)
U2.NEC='B'4000			;DON'T ECHO SOLICITED INPUT (1=YES)
U2.CRT='B'2000			;UNIT IS A CRT (1=YES)
U2.ESC='B'1000			;UNIT GENERATES ESCAPE SEQUENCES (1=YES)
U2.LOG='B'400			;USER LOGGED ON TERMINAL (0=YES)
U2.SLV='B'200			;UNIT IS A SLAVE TERMINAL (1=YES)
U2.DZ1='B'100			;UNIT IS A DZ11 (1=YES)
U2.HLD='B'40			;TERMINAL IS IN HOLD SCREEN MODE (1=YES)
U2.AT.='B'20			;MCR COMMAND AT. BEING PROCESSED (1=YES)
U2.PRV='B'10			;UNIT IS A PRIVILEGED TERMINAL (1=YES)
U2.L3S='B'4			;UNIT IS A LA30S TERMINAL (1=YES)
U2.VT5='B'2			;UNIT IS A VT05B TERMINAL (1=YES)
U2.LWC='B'1			;LOWER CASE TO UPPER CASE CONVERSION (1=YES)
;+
; RH11-RS03/RS04 CHARACTERISTICS WORD 2 (U.CW2) BIT DEFINITIONS
;-
U2.R04='B'100000		;UNIT IS A RS04 (1=YES)
;+
; RH11-TU16 CHARACTERISTICS WORD 2 (U.CW2) BIT DEFINITIONS
;-
U2.7CH='B'10000			;UNIT IS A 7 CHANNEL DRIVE (1=YES)
;+
; UNIT CONTROL PROCESSING FLAG DEFINITIONS
;-
UC.ALG='B'200			;BYTE ALIGNMENT ALLOWED (1=NO)
UC.NPR='B'100			;DEVICE IS AN NPR DEVICE (1=YES)
UC.QUE='B'40			;CALL DRIVER BEFORE QUEUING (1=YES)
UC.PWF='B'20			;CALL DRIVER AT POWERFAIL ALWAYS (1=YES)
UC.ATT='B'10			;CALL DRIVER ON ATTACH/DETACH (1=YES)
UC.KIL='B'4			;CALL DRIVER AT I/O KILL ALWAYS (1=YES)
UC.LGH='B'3			;TRANSFER LENGTH MASK BITS
;+
; UNIT STATUS BIT DEFINTIONS
;-
US.BSY='B'200			;UNIT IS BUSY (1=YES)
US.MNT='B'100			;UNIT IS MOUNTED (0=YES)
US.FOR='B'40			;UNIT IS MOUNTED AS FOREIGN VOLUME (1=YES)
US.MDM='B'20			;UNIT IS MARKED FOR DISMOUNT (1=YES)
US.PWF='B'10			;POWERFAIL OCCURRED (1=YES)
 
;+
; CARD READER DEPENDENT UNIT STATUS BIT DEFINITIONS
;-
US.ABO='B'1			;UNIT IS MARKED FOR ABORT IF NOT READY (1=YES)
US.MDE='B'2			;UNIT IS IN 029 TRANSLATION NODE (1=YES)
;+
; FILES-11 DEPENDENT UNIT STATUS BITS
;-
 
US.WCK='B'10			;WRITE CHECK ENABLED (1=YES)
US.SPU='B'2			;UNIT IS SPINNING UP (1=YES)
 
;+
; TERMINAL DEPENDENT UNIT STATUS BIT DEFINITIONS
;-
US.DSB='B'10			;UNIT IS DISABLED (1=YES)
US.CRW='B'4			;UNIT IS WAITING FOR CARRIER (1=YES)
US.ECH='B'2			;UNIT HAS ECHO IN PROGRESS (1=YES)
US.OUT='B'1			;UNIT IS EXPECTING OUTPUT INTERRUPT (1=YES)
;+
; LPS11 DEPENDENT UNIT STATUS BIT DEFINITIONS
;-
US.FRK='B'2			;FORK IN PROGRESS (1=YES)
US.SHR='B'1			;SHAREABLE FUNCTION IN PROGRESS (0='B'YES)
 
;+
; MAGTAPE DEPENDANT UNIT STATUS BITS
;-
US.LAB='B'4			; UNIT HAS LABELED TAPE ON IT (1=YES)
US.BSP='B'2			; INTERNAL BACKSPACE IN PROGRESS (1=YES)
;+
; UNIT STATUS EXTENSION (U.ST2) BIT DEFINITIONS
;-
 
US.OFL='B'1			;UNIT OFFLINE (1=YES)
US.RED='B'2			;UNIT REDIRECTABLE (0=YES)
US.PUB='B'4			;UNIT IS PUBLIC DEVICE (1=YES)
US.UMD='B'10			;UNIT ATTACHED FOR DIAGNOSTICS (1=YES)
	.MACRO	UCBDF$,X,Y
	.ENDM	UCBDF$
	.ENDM	UCBDF$