Google
 

Trailing-Edge - PDP-10 Archives - BB-H240B-BM - dngen/cetlib.mac
There are no other files named cetlib.mac in the archive.
	.MACRO DEF$DF
	SLN=-1			; INTERNAL COUNTER
	STATBL=0		; TOTAL NUMBER OF STATIONS
;
;	DEFINE SYMBOLS NEEDED DURING PART 1
;
	SLTDF$
	PDVDF$
;
;	PROCESSOR PRIORITIES
;
	PR0=0
	PR1=40
	PR2=100
	PR3=140
	PR4=200
	PR5=240
	PR6=300
	PR7=340	
 
	.ENDM	DEF$DF
	.MACRO	PDVDF$	L,B,LST
 
	.RADIX 8
	.ASECT
.=0
 
.IIF NB,LST,	.LIST
;
;	PROCESS DESCRIPTOR VECTOR OFFSETS AND BIT DEFINITIONS
;
 
Z.DSP:'B'	.BLKW	1	; RELOCATION BIAS OF DISPATCH TABLE
	.BLKW	1	; VIRTUAL ADDRESS OF DISPATCH TABLE
 
	.IF DF	X$$MCB
Z.QUE:'B'	.BLKW	1	; ADDRESS OF SCHEDULER LEVEL QUEUE
	.ENDC
Z.SCH:'B'	.BLKW	1	; ADDRESS OF SCHEDULER DATA BASE
Z.NAM:'B'	.BLKW	1	; PROCESS NAME (RAD50)
Z.LLN:'B'	.BLKB	1	; # OF LOGICAL LINES (LLC'S ONLY)
Z.FLG:'B'	.BLKB	1	; FLAGS BYTE
	.IF DF 	X$$MCB!R$$11M!R$$11S
Z.PCB:'B'	.BLKW	1	; PCB OF LOADED PROCESS PARTITION
	.ENDC
	.IF DF	R$$11D!I$$AS
Z.GCD:'B'	.BLKW	1	; ADDRESS OF GCD NODE( 0 = PROCESS NOT RESIDENT )
	.ENDC
Z.LEN='L'	.-Z.DSP		; LENGTH OF PDV
Z.DAT:'B'	.BLKW	1	; BIAS OF LLC DATA BASE
Z.MAP:'B'			; DISPLACEMENT OF LLC MAPPING TABLE
	.NLIST
	.PSECT
	.LIST
;
; FLAGS BYTE BIT DEFINTIONS
;
ZF.DDM='L'   1		; PROCESS IS A DDM
ZF.DLC='L'   2		; PROCESS IS A DLC
ZF.LLC='L'   4		; PROCESS IS A LLC
ZF.MFL='L'  10		; PROCESS IS MARKED FOR LOAD ( WITH NS )
ZF.KMX='L'  20		; PROCESS IS A DDM FOR A KMC DEVICE
ZF.MUX='L'  40		; PROCESS IS A DDM FOR A MULTIPLEXER DEVICE
ZF.LMC='L' 100		; PROCESS REQUIRES MICRO-CODE TO BE LOADED
ZF.TIM='L' 200		; PROCESS REQUESTS TIMER SUPPORT
 
.IIF NB,LST,	.NLIST
 
	.PSECT		; BACK TO BLANK PSECT
 
	.ENDM	PDVDF$
	.MACRO BUF$DF	CCB,SCCB,NRDB,SRDB,NSDB,SSDB,THR,PSH,W,X,Y,Z
	DEF$DF				; DEFINE ALL DEFAULT VALUES
	CCB.NB=CCB	; USER DEFINED NUMBER OF CCBS'S
	CCB.SZ=SCCB	; USER DEFINED SIZE OF CCB'S
	RDB.NB=NRDB	; USER DEFINED NUMBER OF RDB'S
	RDB.SZ=SRDB	; USER DEFINED SIZE OF RDB'S
	SDB.NB=NSDB	; USER DEFINED NUMBER OF SDB'S
	SDB.SZ=SSDB	; USER DEFINED SIZE OF SDB'S
	TR=THR		; FAIL TO ALLOCATE LDB'S HERE
	XM=PSH		; STACK THIS MANY TRANSMIT BUFFERS
	.ENDM	BUF$DF
	.MACRO LLC$DF	NAM,FLG,PRI,NLL,AA,BB
	NAM'PR=PRI	; PRIORITY
	NAM'FL=FLG	; FLAG
	NAM'CHN=NLL	; NUMBER OF CHANNELS TO ALLOCATE
	NAM'CNT=0	; DYNAMIC REFERENCE COUNT ( CROSS-CHECK )
	.ENDM	LLC$DF
	.MACRO DLC$DF	NAM,FLG,PRI
	NAM'PR=PRI
	NAM'FL=FLG
	.ENDM	DLC$DF
	.MACRO DDM$DF	NAM,FLG,PRI
	NAM'PR=PRI
	NAM'FL=FLG
	.ENDM	DDM$DF
	.MACRO CNT$DF A,B,C,D,E,F,G,H,I,J,K,L,M
	.ENDM	CNT$DF
	.MACRO SLT$DF	NAM,DLC,LLC,FLG,CNT,UNT,ENB
 
;
;	SYSTEM LINE TABLE DEFINITIONS
;
	SLN=SLN+1
	SLTSYM NAM,DLC,LLC,FLG,\CNT,\UNT,\SLN
 
	.ENDM	SLT$DF
	.MACRO SLTDF$	L,B,LST
	.ASECT
	.=0
 
.IIF NB,LST,	.LIST
;
;	SYSTEM LINE TABLE OFFSETS AND FLAG WORD BIT DEFINITIONS
;
L.FLG:'B'	.BLKW	1	; FLAGS WORD
L.DDM:'B'	.BLKB	1	; DDM PROCESS INDEX
L.DLC:'B'	.BLKB	1	; DLC PROCESS INDEX
L.DDS:'B'	.BLKW	1	; DDM LINE TABLE ADDRESS
L.DLM:'B'	.BLKW	1	; DLC LINE TABLE RELOCATION BIAS
L.DLS:'B'	.BLKW	1	; DLC LINE TABLE ( VIRTUAL ) ADDRESS
L.CTL:'B'	.BLKB	1	; CONTROLLER NUMBER
L.UNT:'B'	.BLKB	1	; MULTIPLEXER UNIT NUMBER
L.LEN='L'.			; LENGTH OF EACH SLT ENTRY
;
;	FLAG WORD DEFINITIONS
;
LF.BWT='L'000007	; BUFFER WAIT QUEUE COUNT
LF.TIM='L'000010	; LINE NEEDS TIMER SERVICE
LF.MTP='L'000020	; LINE IS MULTI-POINT
LF.DLO='L'000040	; LINE IS DIAL-OUT
LF.MDC='L'000100	; LINE NEEDS MODEM CONTROL
;	000200	UNUSED
;	000400	UNUSED
;	001000	UNUSED
LF.ENA='L'002000	; LINE IS TO BE ENABLED AT INITIALIZATION TIME
LF.MFL='L'004000	; LINE IS MARKED FOR LOAD AT INITIALIZATION TIME
LF.REA='L'010000	; LINE IS REASSIGNABLE
LF.UNL='L'020000	; LINE IS MARKED FOR UNLOAD
LF.RDY='L'040000	; LINE IS READY (DDM,DLC PROCESSES AND LINE TABLES ASSIGNED)
LF.ACT='L'100000	; LINE IS ACTIVE ( LINE IS ASSIGNED TO AN LLC )
 
.IIF NB,LST,	.NLIST
 
	.PSECT	; RETURN TO BLANK PSECT
	.ENDM	SLTDF$
	.MACRO SLTSYM	NAM,DLC,LLC,FLG,CNT,UNT,SLN
 
	S'SLN'DD=NAM		; SLN DDM
	S'SLN'DL=DLC		; SLN DLC
	S'SLN'LL=LLC		; SLN LLC
	S'SLN'CN=CNT		; SLN CONTROLLER NUMBER
	S'SLN'UN=UNT		; SLN UNIT NUMBER
	.IF NB FLG
	S'SLN'SF=FLG		; SLN FLAG VALUE
	.IFF
	S'SLN'SF=0		; SLN FLAG VALUE DEFAULT
	.ENDC
	NAM'CNT'UNT=1		; CONTROLLER-UNIT NUMBER EXISTS
	SSL'SLN=0		; COUNT NUMBER OF STATIONS ON THIS LINE
	STATN=0			; START WITH STATION 0 ON THIS LINE ( USED BY STA$DF )
 
	.ENDM	SLTSYM
	.MACRO UNT$DF A,B,C,D,E,F,G,H,I,J,K,L,M
	.ENDM	UNT$DF
	.MACRO STA$DF ID,LLC
	STASYM \SLN,\PD$'LLC,\STATN	; DEFINE STATION'S SYMBOLS
	STATN=STATN+1			; ONE MORE MULTIDROP STATION
	STATBL=STATBL+1			; TOTAL NUMBER OF STATIONS
	.ENDM STA$DF
	.MACRO NOD$DF A,B,C
	.ENDM
	.MACRO PAR$DF A,B,C,D,E
	.ENDM
	.MACRO	PSW$DF	A,B
	.ENDM
	.MACRO	TSK$DF	A,B
	.ENDM
	.MACRO PDV$DF	LLCLST,DLCLST,DDMLST
 
	PDN=-1
 
	.IRP	NAM,<LLCLST>	; NUMBER LLC'S
	PDN=PDN+1
	NAM=PDN
	PD$'NAM==PDN*2
	.ENDM
 
	.IRP	NAM,<DLCLST>	; NUMBER DLC'S
	PDN=PDN+1
	NAM=PDN
	PD$'NAM==PDN*2
	.ENDM
 
	.IRP	NAM,<DDMLST>	; NUMBER DDM'S
	PDN=PDN+1
	NAM=PDN
	PD$'NAM==PDN*2
	.ENDM
 
	.ENDM	PDV$DF
	.MACRO STASYM SL,PDI,STA
	SSL'SL=SSL'SL+1			; ONE MORE STATION ON THIS SYSTEM LINE
	S'SL'C'STA=PDI			; REMEMBER PROCESS DESCR. INDEX
	.ENDM STASYM
	.MACRO END$DF
	SLTTOT=SLN+1
	PDVTOT=PDN+1
	.ENDM	END$DF
	.MACRO EXPALL NAM,CNT,UNT,SLN,DLCLST
	EXPFLG	\S'SLN'SF,NAM,\S'SLN'CN,\SLN ; EXPAND FLAG LINE
	.RADIX 10
	EXPDDM \PD$'NAM,NAM
	.RADIX 8
;
;	SPECIAL CASE OF DDM=DLC ( SUCH AS DMC )
;
	.IF EQ S'SLN'DD-S'SLN'DL
	.RADIX 10
	EXPDLC \PD$'NAM,NAM
	.RADIX 8
	EXPWRD NAM,NAM,\S'SLN'CN,\S'SLN'UN
	.IFF
;
;	NORMAL DLC PROCESSES
;
	.IRP NAMDL,<DLCLST>
	.IF EQ NAMDL-S'SLN'DL
	.RADIX 10
	EXPDLC \PD$'NAMDL,NAMDL
	.RADIX 8
	EXPWRD NAM,NAMDL,\S'SLN'CN,\S'SLN'UN
	.MEXIT
	.ENDC
	.ENDM
	.ENDC
	.ENDM	EXPALL
	.MACRO EXPATS	AT,PD,ST,SL
	ATLL'AT=PD	; CHANNEL AT LLC PDI
	ATSL'AT=SL	; CHANNEL AT SLN
	ATST'AT=ST	; CHANNEL AT STATION NUMBER
	.ENDM EXPATS
	.MACRO EXPATT AT,NAM
	EXPATU	\ATLL'AT,\ATSL'AT,\ATST'AT,NAM,\AT
	.ENDM EXPATT
	.MACRO EXPATU LL,SL,ST,NAM,AT
	.IF LE AT-ATS		; IF NOT INTO EXENDED TABLE SPACE
	.IF EQ LL-PD$'NAM	; AND THIS CHANNEL BELONGS TO THIS LLC
	.LIST
	.BYTE	SL,ST		; (A) ;	CHANNEL AT': SLN'SL,STATION ST
	.NLIST
	.IFF			; IF IT BELONGS TO SOME OTHER LLC
	.LIST
	.BYTE	0,200		; (A) ;	CHANNEL AT': NOT ASSIGNED TO THIS LLC
	.NLIST
	.ENDC
	.IFF			; IF INTO EXTENDED SPACE
	.LIST
	.BYTE	0,200		; (A) ;	CHANNEL AT': UNASSIGNED CHANNEL
	.NLIST
	.ENDC
	.ENDM EXPATU
	.MACRO EXPBFT
	.LIST
;
;		COMMUNICATION SYSTEM COMMON DATA BASE
;			( ORDERING IMPACTS VNP )
;
;
;
;
;
	.NLIST
 
	.RADIX 10
	EXPTAB	\SLTTOT,\PDVTOT
	EXPBUF	\CCB.NB,\CCB.SZ,\RDB.NB,\RDB.SZ,\SDB.NB,\SDB.SZ,\TR,\XM
	.RADIX 8
	.LIST
$CMPDV::.WORD	0		; (R) ; PDV INDEX OF CURRENT DISPATCHED PROCESS
	.IF DF R$$11D!I$$AS
$PRQUE::.WORD	0		; (R) ; QUEUE LISTHEAD
	.WORD	.-2		; (R) ; POINTER TO LAST CCB IN QUEUE
	.ENDC
	.IF DF R$$11M!X$$MCB
$CMFRK::.WORD	$SQSRV		; (R) ;	INITIAL LINK MARKS FORK BLOCK FREE
	.WORD	$SQSRV		; (R) ;	ADDRESS OF FORK PROCESS
	.WORD	0		; (R) ;	FORK PROCESS QUEUE
	.WORD	.-2		; (R) ;	 IS INITIALLY EMPTY
	.ENDC
$CCBLH::.WORD	0		; (D) ; POINTER TO FIRST FREE CCB
$SDBLH::.WORD	0		; (D) ; POINTER TO FIRST FREE SMALL DATA BUFFER
	.WORD	0		; (D) ; SECOND HALF OF ADDRESS DOUBLEWORD
$RDBLH::.WORD	0		; (D) ; POINTER TO FIRST FREE RECEIVE BUFFER
$RDQSL::.WORD	0		; (R) ; SYSTEM LINE NUMBER TO CHECK ON NEXT BUFFER RETURN
$RDQCT::.WORD	0		; (R) ; NUMBER OF BUFFER WAIT REQUESTS AND FLAG
$NTLPT::.WORD	0		; (D) ; NTL POINTER TO IMPURE AREA IN NTPOOL
	.IF DF R$$11D!I$$AS
$EVFLG::.WORD	0		; (D) ; POINTER TO FIRST 16 LOCAL EVENT FLAGS
	.ENDC
	.IF NDF M$$MGE
	.WORD	77		; (A) ;	GLITCH FOR ALLOCATION ROUTINES
$QBIAS::.WORD	0		; (R) ; START OF COMMUNICATION BUFFER POOL
	.WORD	0		; (R) ;	SECOND WORD OF $QBIAS LISTHEAD
$PUMA::	.WORD	0		; (R) ; FREE WORD ON UNMAPPED SYSTEMS
	.IFF
$NBIAS::.WORD	0		; (R) ; POINTER TO NON-UMR MAPPED PORTION OF POOL
$QBIAS::.WORD	0		; (R) ; POINTER TO UMR-MAPPED PORTION OF POOL
$QSTRT::.WORD	0		; (R) ; ORIGINAL BIAS OF UMR-MAPPED PORTION OF POOL
$PUMR::	.WORD	0		; (D) ; STARTING UMR BIAS
	.ENDC
	.IF	DF,R$$11D!I$$AS
$XUMR::	.WORD	0		; (D) ; STARTING UMR BIAS OF SCOM AREA
$POOLB::.WORD	0		; (D) ; BASE ADDRESS OF NETWORK POOL
$POOLS::.WORD	0		; (D) ; SIZE OF NETWORK POOL
	.ENDC
	.NLIST
	.ENDM	EXPBFT
	.MACRO EXPBUF NCCB,SCCB,NRDB,SRDB,NSDB,SSDB,THRESH,XMIT
	.LIST
$CCBNM::.WORD	NCCB'.		; (D) ; # OF CCB'S ALLOCATED
$CCBSZ::.WORD	SCCB'.		; (A) ; # BYTES / CCB
$RDBNM::.WORD	NRDB'.		; (D) ; # OF RDB'S ALLOCATED
$RDBSZ::.WORD	SRDB'.		; (D) ; # BYTES / RDB
$SDBNM::.WORD	NSDB'.		; (D) ; # OF SDB'S ALLOCATED
$SDBSZ::.WORD	SSDB'.		; (D) ; # BYTES / SDB
$CCBCT::.WORD	NCCB'.		; (D) ; COUNTER OF CURRENT # OF CCBS IN POOL
$RDBCT::.WORD	NRDB'.		; (D) ; COUNTER OF CURRENT # OF RDBS IN POOL
$SDBCT::.WORD	NSDB'.		; (D) ; COUNTER OF CURRENT # OF SDBS IN POOL
$CCBAF::.WORD	0		; (D) ; COUNTER OF # OF CCB ALLOCATION FAILURES
$RDBAF::.WORD	0		; (D) ; COUNTER OF # OF RDB ALLOCATION FAILURES
$LDBAF::.WORD	0		; (D) ; COUNTER OF # OF LDB ALLOCATION FAILURES
$SDBAF::.WORD	0		; (D) ; COUNTER OF # OF SDB ALLOCATION FAILURES
$RDBTH::.WORD	THRESH'.		; (D) ; POOL THRESHOLD FOR LARGE DATA BUFFER ALLOCATON FAILURE
$XMTBF::.WORD	XMIT'.		; (D) ; # OF XMITS/LINK TO STACK
	.NLIST
	.ENDM	EXPBUF
	.MACRO EXPCHN NCHAN,NAM
	.LIST
	.BYTE	NCHAN'.		; (A) ; NUMBER OF CHANNELS ALLOCATED FOR NAM
	.NLIST
	.ENDM	EXPCHN
	.MACRO EXPDDM	DDMIND,NAM
	.LIST
	.BYTE	DDMIND'.	; (D) ; NAM OFFSET IN PDVTB::
	.NLIST
	.ENDM	EXPDDM
	.MACRO EXPDLC	DLCIND,NAM
	.LIST
	.BYTE	DLCIND'.	; (D) ; NAM OFFSET IN PDVTB::
	.NLIST
	.ENDM	EXPDLC
	.MACRO EXPFLG	FLG,NAM,NUM,SLNN
	.LIST
	.IF EQ SSL'SLNN
;   SLN'SLNN NAM'NUM
	.IFF
;   SLN'SLNN NAM'NUM  ***  MULTIDROP ***
	.ENDC
	.WORD	FLG	; (D) ; FLAG FOR NAM'NUM
	.NLIST
	.ENDM	EXPFLG
	.MACRO EXPLLL CHAN,PDI,SL,NAM,AT
 
	.IF LE SSL'SL-1
	.IF NDF X$$ATS
	.LIST
	.BYTE	CHAN,PDI		; (A) ; SLN'SL': CHANNEL CHAN-NAM
	.NLIST
	NAM'CHAN=SL		; GENERATE SYMBOL FOR LLC CHANNEL TABLE
	.IFF
	.LIST
	.BYTE	AT,PDI			; (A) ; SLN'SL': CHANNEL AT-NAM
	.NLIST
	ATLL'AT=PDI		; CHANNEL AT LLC PDI
	ATSL'AT=SL		; CHANNEL AT SLN
	ATST'AT=0		; CHANNEL AT STATION NUMBER
	ATS=ATS+1		; ONE MORE ATS CHANNEL ( GLOBAL TOTAL )
	.ENDC
	.IFF
	.LIST
	.WORD	<ST'SL-.>/2!100000	; (A) ;	SLN'SL: MULTIDROP
	.NLIST
	M'NAM'CHAN=SL		; GENERATE SYMBOL FOR LLC  MULTIDROP ENTRY
	NAM'CNT=NAM'CNT+SSL'SL-1	; # CHANNELS/LLC
	SSN'SL=CHAN			; STARTING CHANNEL # BY SLN
	.IF DF X$$ATS
	STA=0				; START WITH STATION ZERO
	SSN'SL=ATS			; STARTING CHANEL NUMBER / SLN
	.REPT	SSL'SL			; GENERATE SYMBOLS FOR EACH CHANNEL
	EXPATS	\ATS,\PDI,\STA,\SL	; GERNERATE SYMBOLS
	STA=STA+1
	ATS=ATS+1			; NUMBER ATS CHANNELS CONSECUTIVELY
	.ENDR
	.ENDC
	.ENDC
	.ENDM	EXPLLL
	.MACRO EXPLLN SLN,LST
	.IRP	NAM,<LST>
 
	.IF EQ	NAM-S'SLN'LL
	NAM'CNT=NAM'CNT+1		; INCREMENT REFERENCE COUNTER
	EXPLLL	\NAM'CNT,\PD$'NAM,\SLN,NAM,\ATS
	.MEXIT
	.ENDC
	.ENDR
	.ENDM	EXPLLN
	.MACRO EXPLLR SL,CHAN,STA
	.IF B STA
	.LIST
	.BYTE	0,200		; (A) ;	CHANNEL CHAN': UNASSIGNED
	.NLIST
	.IFF
	.LIST
	.BYTE	SL',STA 		; (A) ; CHANNEL CHAN': SLN'SL,STATION STA
	.NLIST
	.ENDC
	.ENDM	EXPLLR
	.MACRO EXPLLS SL,NAM,CHA
	.IF GE NAM'CNT-CHA
	.IF DF NAM'CHA
	STA=0
	EXPLLR	\NAM'CHA,\CHA,\STA
	NAM'CRN=NAM'CRN+1
	.ENDC
	.IF DF M'NAM'CHA
	STA=-1
	.REPT SSL'SL
	STA=STA+1
	EXPLLR SL,\NAM'CRN,\STA
	NAM'CRN=NAM'CRN+1
	.ENDR
	.ENDC
	.IFF
	STA=0
	EXPLLR	0,CHA
	NAM'CRN=NAM'CRN+1
	.ENDC
	.ENDM	EXPLLS
	.MACRO EXPLLT	LST
	.PAGE
	.LIST
	.IF NE STATBL
;
;	SYSTEM LINE TABLE ( EXTENSION )
;
;	THIS TABLE IS INDEXED BY SYSTEM LINE NUMBER AND
;	   ASSOCIATES EACH SYSTEM LINE WITH AN:
;
;		1 - LLC PROCESS AND A CHANNEL NUMBER WITHIN THAT PROCESS
;	OR	2 - ADDRESS OF A STATION TABLE FOR A MULTIDROP LINE
 
	.IFF
;
;	SYSTEM LINE TABLE ( EXTENSION )
;
;	THIS TABLE IS INDEXED BY SYSTEM LINE NUMBER AND
;	   ASSOCIATES EACH SYSTEM LINE WITH AN LLC PROCESS
;	   AND A CHANNEL NUMBER WITHIN THAT PROCESS.
 
	.ENDC
$LLCTB::
	.NLIST
 
	SLN=-1
	ATS=0			; COUNT TOTAL NUMBER OF CHANNELS
	.REPT	SLTTOT
	SLN=SLN+1
	EXPLLN	\SLN,<LST>
	.ENDR
	ATS=ATS-1		; DECREMENT TO TRUE COUNT
	.ENDM	EXPLLT
	.MACRO	EXPNOD	ARG1,ARG2,ARG3,ARG4=1
	.NLIST	BEX
	.LIST
$NSPNM::.WORD	'ARG4'		; (X) ; LOCAL NODE NUMBER
$NTNAM::.ASCII	/'ARG1'/	; (D) ; LOCAL NODE NAME
$HOST::	.ASCII	/      /	; (D) ; HOST SYSTEM ID ( SET WITH VNP )
	.NLIST
	.NCHR	$$TMP,<ARG2>
	.LIST
$NODID::.WORD	$$TMP		; (D) ; LOCAL NODE IDENTIFICATION
	.ASCII	@'ARG2'@
	.NLIST
	.LIST	BEX
	.BLKB	32.-$$TMP
	.ENDM
	.MACRO EXPPDL	NAM,NUM,LDRFLG,XXX
	.IF EQ	LDRFLG&ZF.MFL	; DON'T LOAD PROCESS
	.LIST
.WORD	NAM'PDV	; NAM	  XXX	   NUM'.	   NO	; (A) ;
	.NLIST
	.IFF			; LOAD PROCESS
	.LIST
.WORD	NAM'PDV	; NAM	  XXX	   NUM'.	  YES	; (A) ;
	.NLIST
	.ENDC
 
	.ENDM	EXPPDL
	.MACRO EXPPDN	LST,XXX
 
	.IRP	NAM,<LST>
	PDN=PDN+1
	.RADIX 10
	EXPPDL	NAM,\PDN*2,NAM'FL,XXX
	.RADIX 8
	.ENDM
 
	.ENDM	EXPPDN
	.MACRO EXPPDT	LLCLST,DLCLST,DDMLST
	.LIST
 
;
;	PROCESS DESCRIPTOR ADDRESS TABLE
;
;	EACH ENTRY IS THE ADDRESS OF THE CORRESPONDING
;	PROCESS DESCRIPTOR VECTOR ( BELOW ).
;
;		PROCESS	PROCESS	PROCESS	PROCESS
;		 NAME	 LEVEL	 INDEX	  MFL
$PDVTB::
	.NLIST
 
	PDN=-1
	EXPPDN <LLCLST>,LLC
	EXPPDN <DLCLST>,DLC
	EXPPDN <DDMLST>,DDM
	.LIST
$PDVND::
	.NLIST
	.ENDM	EXPPDT
	.MACRO EXPPVL NAM,FLG,PRI,PDN,XXX
	.LIST
;
;	NAM - PROCESS DESCRIPTOR VECTOR # 'PDN'
	.IF DIF XXX,LLC
;		THIS IS A XXX PROCESS
	.IFF
;
;		THIS IS AN XXX PROCESS
	.ENDC
;
	.NLIST
	.LIST
NAM'PDV::
	.IF DF M$$MGE
	.WORD	0		; (I) ; RELOCATION BIAS
	.IFF
	.WORD	0		; (I) ; UNUSED WORD ON UNMAPPED SYSTEMS
	.ENDC
	.WORD	0		; (I) ; DISPATCH TABLE ADDRESS
	.IF DF X$$MCB
	.WORD	0		; (R) ; RESERVED WORD
	.ENDC
	.WORD	^C<PR'PRI'>&PR7 	; (D) ; PRIORITY PRI
	.RAD50	/'NAM'/		; (D) ; PROCESS NAME
	.IF DF NAM'CHN
	.IF NE NAM'CHN
	.IF NDF X$$ATS
	.NLIST
	.IIF GT,NAM'CNT-NAM'CHN, NAM'CHN=NAM'CNT
	.LIST
	.IFF
	.NLIST
	.IIF GT,ATS-NAM'CHN, NAM'CHN=ATS
	.LIST
	.ENDC
	.ENDC
	.IFT
	.IF NE NAM'CHN
	.NLIST
	.RADIX 10
	.IF NDF X$$ATS
	EXPCHN	\NAM'CHN+1,NAM	; NUMBER OF CHANNELS ( EXCLUDING CHANNEL 0 )
	.IFF
	EXPCHN	\NAM'CHN,NAM
	.ENDC
	.RADIX 8
	.LIST
	.IFF
	.BYTE	0		; (R) ; AVAILABLE BYTE
	.ENDC
	.IFF
	.BYTE	0		; (R) ; AVAILABLE BYTE
	.ENDC
	.BYTE	FLG		; (D) ; FLAG BYTE
	.IF DF R$$11M
	.WORD	0		; (I) ; LOADED PROCESS PCB POINTER
	.ENDC
	.IF DF R$$11D!I$$AS
	.WORD	0		; (I) ; GCD POINTER
	.ENDC
	.NLIST
	.IF DF NAM'CHN
	.LIST
	.WORD	0		; (I) ;	VIRTUAL ADDRESS OF LLC DATA BASE
	.NLIST
	.IF NE NAM'CHN
	.IF NDF X$$ATS
	.LIST
	.BYTE	0,300		; (A) ; CHANNEL 0: RESERVED FOR LOOPBACK
	.NLIST
	SLN=-1
	NAM'CRN=1
	.REPT SLTTOT
	SLN=SLN+1
	EXPLLS	\SLN,NAM,\NAM'CRN
	.IIF LT,NAM'CHN-NAM'CRN, .MEXIT
	.ENDR
	.IF GE,NAM'CHN-NAM'CRN
	.REPT NAM'CHN-NAM'CRN+1
	EXPLLS	\SLN,NAM,\NAM'CRN
	.ENDR
	.ENDC
	.IFF
	AT=-1		; START WITH CHANNEL 0
	.REPT NAM'CHN
	AT=AT+1
	EXPATT	\AT,NAM
	.ENDR
	.ENDC
	.ENDC
	.ENDC
	.ENDM	EXPPVL
	.MACRO EXPPVN	LST,XXX
	.IRP	NAM,<LST>
	PDN=PDN+1
	EXPPVL	NAM,\NAM'FL,\NAM'PR,\PDN,XXX
	.ENDR
	.ENDM	EXPPVN
	.MACRO EXPPVT	LLCLST,DLCLST,DDMLST
	PDVDF$	,,LST		; LIST PDV OFFSETS AND FLAG VALUES
	.RADIX	8
	PDN=-1
	EXPPVN <LLCLST>,LLC
	EXPPVN <DLCLST>,DLC
	EXPPVN <DDMLST>,DDM
	.ENDM	EXPPVT
	.MACRO EXPSLN NAM,CNT,UNT,DLCLST
 
	.IF DF NAM'CNT'UNT
	SLN=SLN+1
	EXPALL NAM,\CNT,\UNT,\SLN,<DLCLST>
	.IFF
	EXITUN=1
	.ENDC
 
	.ENDM	EXPSLN
	.MACRO EXPSLT	DLCLST,DDMLST
	SLTDF$	,,LST		; LIST SLT OFFSETS AND FLAG WORD BIT VALUES
	.LIST
 
;
;	SYSTEM LINE TABLE
;
$SLTTB::
	.NLIST
	SLN=-1
	.IRP NAM,<DDMLST>
	CNT=-1
	.REPT 8.
	CNT=CNT+1
	EXITUN=0
	UNT=-1
	.REPT	48.
	UNT=UNT+1
	EXPSLN NAM,\CNT,\UNT,<DLCLST>
	.IIF EQ,EXITUN-1,	.MEXIT
	.ENDR
	.ENDR
	.ENDM
	.LIST
$SLTND::
	.NLIST
	.ENDM	EXPSLT
	.MACRO EXPSTA SL,CHAN,CHANN
	EXPSTS	\SL,\CHAN,\S'SL'C'CHANN
	.ENDM EXPSTA
	.MACRO EXPSTN SLN
	.IF GT SSL'SLN-1
	.LIST
ST'SLN:
	.NLIST
	CHANN=-1
	.REPT	SSL'SLN
	CHANN=CHANN+1
	EXPSTA	\SLN,\SSN'SLN,\CHANN
	SSN'SLN=SSN'SLN+1
	.ENDR
	.LIST
	.WORD	-1		; (D) ; END OF TABLE
	.NLIST
	.ENDC
	.ENDM EXPSTN
	.MACRO EXPSTS SL,CHAN,PDI
	.LIST
	.BYTE	CHAN,PDI		; (D) ;	SLN'SL: CHANNEL,LLC
	.NLIST
	.ENDM EXPSTS
	.MACRO EXPSTT
	.LIST
	.IF NE STATBL
;
;	STATION TABLE ORDERED BY SYSTEM LINE NUMBER
;		( INDEXED THROUGH $LLCTB )
;
	.IFF
;
;	NO STATIONS IN THIS CONFIGURATION
;
	.ENDC
	.NLIST
	SLN=-1
	.REPT	SLTTOT
	SLN=SLN+1
	EXPSTN	\SLN
	.ENDR
	.ENDM	EXPSTT
	.MACRO EXPTAB	SLTN,PDVN
 
	.LIST
$PDVTA::.WORD	$PDVTB		; (A) ; ADDRESS OF PDV ADDRESS TABLE
$SLTTA::.WORD	$SLTTB		; (A) ; ADDRESS OF SYSTEM LINE TABLE
$LLCTA::.WORD	$LLCTB		; (A) ; ADDRESSS OF LLC REVERSE MAPPING TABLE
$PDVNM::.WORD	PDVN'.		; (A) ; NUMBER OF PDV ENTRIES
$SLTNM::.WORD	SLTN'.		; (A) ; NUMBER OF SYSTEM LINES
	.NLIST
	.ENDM	EXPTAB
	.MACRO EXPWRD NAMPL,NAMDL,CNTN,UNTN
	.LIST
	.WORD	0	; (I) ; NAMPL LINE TABLE ADDRESS
	.WORD	0	; (I) ;	NAMDL LINE TABLE BIAS
	.WORD	0	; (I) ; NAMDL LINE TABLE ( VIRTUAL ) ADDRESS
	.BYTE	CNTN	; (D) ; CONTROLLER NUMBER ( NAMPL'CNTN )
	.BYTE	UNTN	; (D) ; MULTIPLEXER UNIT NUMBER
	.NLIST
	.ENDM EXPWRD