Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/nxdrv.list
There are no other files named nxdrv.list in the archive.
NXDRV	MACRO M1110  13-OCT-79 10:31
TABLE OF CONTENTS

     5-  148	DEVICE DRIVER DISAPTCH ROUTINES
     6-  237	DIRECT ACCESS CONTROLLER ROUTINES
    16- 1089	SUBROUTINES FOR THE DIRECT LINE CONTROLLER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 3


      1						.IIF NDF M$$EXT	.TITLE	NXDRV
      2						.IIF DF	M$$EXT,	.TITLE	NXDRV7
      3						.IDENT	/V01.02/
      4
      5					;
      6					; COPYRIGHT (C) 1978 BY
      7					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
      8					;
      9					;
     10					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
     11					; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
     12					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
     13					; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
     14					; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
     15					; TRANSFERRED.
     16					;
     17					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
     18					; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
     19					; CORPORATION.
     20					;
     21					; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
     22					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
     23					;
     24					;
     25					; MODULE DESCRIPTION
     26					;
     27					;	DLX DIRECT LINE ACCESS PROCESSING
     28					;
     29					;
     30					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
     31					;
     32					; IDENT HISTORY:
     33					;
     34					; 1.00	10-FEB-78
     35					;	VERSION 2.0 RELEASE
     36					; 1.01	4-JAN-79  ALAN D. PECKHAM
     37					;	RENAME PSECT "$$$DLX" TO MAKE IT CONTIGUOUS WITH "$$DLX"
     38					; 1.02	9-FEB-79  ALAN D. PECKHAM
     39					;	MESSAGES SENT TO DDCMP MUST HAVE SOM+EOM ON (RSXMT)
     40					;
     41					;
     42					; MACRO LIBRARY CALLS
     43					;
     44						.MCALL $MVFBF,$MVTBF,$QDLC
     45						.MCALL	SAVRG,RESRG
     46						.MCALL	CCBDF$
     47						.MCALL	PDVDF$
     48	000000					CCBDF$			; DEFINE THE CCB OFFSETS
     49	000000					PDVDF$			; DEFINE THE PDV OFFSETS
     50
     51					;
     52					; LOCAL SYMBOL DEFINITIONS
     53					;
     54					;
     55					; PHYSICAL LINK BLOCK OFFSET DEFINITIONS
     56					;
     57	000016					.ASECT
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 3-1


     58		000000 			.=0
     59	000000				L.STA:	.BLKB	1		; PHYSICAL LINK STATE
     60	000001				L.FLG:	.BLKB	1		; PHYSICAL LINK FLAGS
     61	000002				L.RSR:	.BLKB	1		; RECOVERY CONDITIONS
     62	000003				L.TIP:	.BLKB	1		; NUMBER OF TRANSMITS IN PROGRESS
     63	000004				L.TIM:	.BLKB	1		; CURRENT TIMER VALUE
     64	000005				L.TIMI:	.BLKB	1		; INITIAL TIMER VALUE
     65	000006				L.LIN:	.BLKW	1		; PROCESS CHANNEL NUMBER
     66	000010				L.ERR:	.BLKW	1		; UNREPORTED ERROR STATUS OR STOP CCB
     67	000012				L.FNC:	.BLKW	1		; PENDING FUNCTION QUEUE
     68	000014				L.XMT:	.BLKW	1		; PENDING TRANSMIT QUEUE
     69	000016				L.RCV:	.BLKW	1		; PENDING RECEIVE QUEUE
     70	000020				L.LEN:	.BLKW	0		; LENGTH OF CONTROL BLOCK
     71	000000					.PSECT
     72
     73					;
     74					; PHYSICAL LINK STATE DEFINTIONS
     75					;
     76		000001 			LS$IDL	= 1			; IDLE
     77		000002 			LS$STR	= 2			; START ISSUED
     78		000004 			LS$DAT	= 4			; DATA
     79		000010 			LS$ERR	= 10			; FATAL ERROR
     80		000020 			LS$STP	= 20			; STOP AND/OR DISABLE
     81		000040 			LS$RST	= 40			; RESTART FOLLOWING A FATAL ERROR
     82
     83					;
     84					; PHYSICAL LINK FLAGS DEFINITIONS
     85					;
     86		000400 			LF$ENB	= 400			; LINK IS ENABLED
     87		001000 			LF$MOP	= 1000			; LINK IS RUNNING IN MAINTENANCE MODE
     88		040000 			LF$ACT	= 40000			; LINK IS ACTIVE
     89		020000 			LF$USR	= 20000			; USER ABORT NOTIFICATION REQUIRED
     90		010000 			LF$ABO	= 10000			; ABORT SEQUENCE IN PROGRESS
     91		070000 			LF$BSY	= 70000			; MASK TO CHECK IF LINK BLOCK IS ASSIGNABLE
     92		100000 			LF$RSR	= 100000		; RESOURCE RECOVERY REQUIRED
     93
     94					;
     95					; RECOVERY CONDITION DEFINITIONS
     96					;
     97		000003 			LR$CTL	= 3			; NUMBER OF PENDING CONTROL FUNCTIONS
     98		000010 			LR$STP	= 10			; STOP FUNCTION REQUIRED
     99		000020 			LR$DIS	= 20			; DISABLE FUNCTION REQUIRED
    100		000200 			LR$DEA	= 200			; DEASSIGN REQUESTED
    101
    102					;
    103					; PARAMETER BLOCK OFFSET DEFINITIONS
    104					;
    105	000020					.ASECT
    106		000000 			.=0
    107	000000				TNAM:	.BLKW	1		; RAD50 PROCESS NAME
    108	000002				TCTL:	.BLKB	1		; CONTROLLER NUMBER
    109	000003				TLIN:	.BLKB	1		; LINE NUMBER ON CONTROLLER
    110	000004				TSTA:	.BLKB	1		; MULTIPOINT STATION ADDRESS
    111	000005					.BLKB	1		; RESERVED
    112	000006				TFLG:	.BLKB	1		; PROCESS FLAGS
    113	000007				TPDV:	.BLKB	1		; PROCESS INDEX
    114	000010				TSLN:	.BLKW	1		; SYSTEM LINE NUMBER AND LOGICAL STATION
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 3-2


    115	000012				TSLF:	.BLKW	1		; SYSTEM LINE TABLE FLAGS
    116	000014				TDDM:	.BLKB	1		; DDM PROCESS INDEX
    117	000015				TDLC:	.BLKB	1		; DLC PROCESS INDEX
    118	000016				TASN:	.BLKW	1		; CURRENT ASSIGNMENT (PDV & CHAN)
    119	000000					.PSECT
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 4


    121					;
    122					; DATA DESCRIPTOR BLOCK OFFSET DEFINITIONS
    123					;
    124	000020					.ASECT
    125		000000 			.=0
    126	000000				D.BIA:	.BLKW	2		; BIAS AN VIRTUAL ADDRESS OF LARGE BUFFER
    127	000000					.PSECT
    128
    129					;
    130					; LOCAL DATA
    131					;
    132	000000	000000 			PRPDV::	.WORD	0		; PROCESS PDV INDEX
    133	000002	000000 			PRPDB:	.WORD	0		; ADDRESS OF THE DATA DESCRIPTOR BLOCK
    134	000004	000000 			BFFLG:	.WORD	0		; POOL BUFFER IN USE FLAG (NON ZERO)
    135
    136					;
    137					; THE STORAGE FOR THE DATA BASE IS CREATED AT TASK BUILD TIME WITH
    138					; THE EXTEND PSECT OPTION.  THE SIZE REQUIRED IS EQUAL TO THE TOTAL
    139					; NUMBER OF CHANNELS ALLOCATIED FOR THE DLX PROCESS MULTIPLIED BY
    140					; THE LENGTH OF THE SIZE OF THE LINK CONTROL BLOCK (L.LEN).
    141					;
    142	000000					.PSECT	$$DLX
    143	000000				TBLST::				; REFERENCE LABEL
    144	000000					.PSECT	$$DLXA                                                          ;AP0001
    145	000000				TBLEN::				; REFERENCE LABEL FOR END OF THE DATA BASE      ;**-1
    146	000006					.PSECT
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 5
DEVICE DRIVER DISAPTCH ROUTINES

    148						.SBTTL	DEVICE DRIVER DISAPTCH ROUTINES
    149
    150					;+
    151					; **-$NXTBL-DEVICE DRIVER DISPATCH TABLE
    152					;
    153					;
    154					;-
    155
    156	000006	000016'			$NXTBL::.WORD	NXINI		; DEVICE INITIATOR ENTRY POINT
    157	000010	001236'				.WORD	NXCAN		; CANCEL I/O OPERATION
    158	000012	001236'				.WORD	NXTMO		; TIMEOUT
    159	000014	001214'				.WORD	NXPWF		; POWERFAIL
    160
    161					;+
    162					; **-NXINI-DIRECT ACCESS CONTROLLER INITIATION
    163					;
    164					; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN I/O
    165					; REQUEST IS ISSUED TO THE DEVICE 'NX'.  THE DIRECT ACCESS CONTROLLER
    166					; IS A MULTIPORT DEVICE, THEREFORE THE I/O REQUEST IS NOT QUEUED BEFORE
    167					; CALLING THE DRIVER.
    168					;
    169					; INPUTS:
    170					;
    171					;	R1 = ADDRESS OF THE I/O PACKET
    172					;	R4 = ADDRESS OF THE STATUS CONTROL BLOCK
    173					;	R5 = ADDRESS OF THE UNIT CONTROL BLOCK
    174					;
    175					; OUTPUTS TO PROCESSING ROUTINES:
    176					;
    177					;	THE APPROPRIATE PROCESSING ROUTINE IS ENTERED BASED ON THE
    178					;	FUNCTION CODE IN THE I/O PACKET, WITH:
    179					;
    180					;	R3 = ADDRESS OF THE I/O PACKET
    181					;	R5 = ADDRESS OF THE PHYSICAL LINK BLOCK
    182					;
    183					; NOTE THAT THE DISPATCH LOGIC EXPECTS THAT THE DCB FUNCTION MASK
    184					; CORRECTLY FILTERS OUT ILLEGAL FUNCTIONS.
    185					;
    186					;-
    187						.ENABL	LSB
    188
    189	000016	010103 			NXINI:	MOV	R1,R3		; COPY ADDRESS OF I/O PACKET
    190	000020	116300 	000001G		NXINA:	MOVB	I.FCN+1(R3),R0	; GET FUNCTION CODE
    191	000024	162700 	000007 			SUB	#7,R0		; IS THIS CLOSE OUT LUN ?
    192	000030	001402 				BEQ	5$		; IF EQ, YES
    193	000032	162700 	000021 			SUB	#21,R0		; NORMALIZE TO DISPATCH TABLE
    194	000036	006300 			5$:	ASL	R0		; MAKE IT A TABLE INDEX
    195	000040	006300 				ASL	R0		; ...
    196	000042	062700 	000156'			ADD	#60$,R0		; COMPUTE ADDRESS IN DISPATCH TABLE
    197	000046	136320 	000000G			BITB	I.FCN(R3),(R0)+	; ARE ANY INVALID MODIFIER BITS SET ?
    198	000052	001030 				BNE	30$		; IF NE, YES - RETURN ILLEGAL FUNCTION
    199	000054	105720 				TSTB	(R0)+		; SHOULD THE LUN ALREADY BE IN USE ?
    200	000056	100404 				BMI	10$		; IF MI, YES
    201	000060	017305 	000000G			MOV	@I.LN2(R3),R5	; OTHERWISE NO, BUT IS IT IN USE ?
    202	000064	001025 				BNE	35$		; IF NE, YES - RETURN IN USE ERROR
    203	000066	000410 				BR	20$		; OTHERWISE DISPATCH THE REQUEST
    204
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 5-1
DEVICE DRIVER DISAPTCH ROUTINES

    205	000070	017305 	000000G		10$:	MOV	@I.LN2(R3),R5	; IS THE LUN ESTABLISHED ?
    206	000074	042705 	000001 			BIC	#1,R5		; CLEAR INTERLOCK IN CASE OF A CLOSE LUN
    207	000100	001422 				BEQ	40$		; IF EQ, NO - RETURN NOT IN USE ERROR
    208	000102	032715 	020000 			BIT	#LF$USR,(R5)	; USER ABORT NOTIFICATION REQUIRED ?
    209	000106	001004 				BNE	25$		; IF NE, YES
    210	000110	016767 	177664 	000000G	20$:	MOV	PRPDV,$CMPDV	; SET PROCESS INDEX
    211	000116					CALLR	@(R0)+		; DISPATCH THE REQUEST
    212
    213	000120	042715 	020000 		25$:	BIC	#LF$USR,(R5)	; CLEAR ABORT NOTIFICATION REQUIRED
    214	000124	005073 	000000G			CLR	@I.LN2(R3)	; CLEAR OUT LINK BLOCK POINTER
    215	000130					CALLR	IEABO		; ABORT THIS REQUEST
    216
    217	000134				30$:	CALLR	IEONP		; RETURN ILLEGAL SUBFUNCTION CODE ERROR
    218
    219	000140	012700 	000000C		35$:	MOV	#IE.ALN&377,R0	; RETURN ALREADY IN USE STATUS
    220	000144	000402 				BR	50$		;
    221
    222	000146	012700 	000000C		40$:	MOV	#IE.NLN&377,R0	; RETURN NOT IN USE ERROR
    223
    224	000152				50$:				;
    225	000152				IEROR:	CALLR	RQALT		; COMPLETE CONTROL REQUEST
    226
    227	000156	100370 	000434'		60$:	.WORD	100370,NXCLN	; CLOSE LUN 	(FC = 7)
    228	000162	100370 	001012'			.WORD	100370,NXXMT	; WRITE		(FC = 31)
    229	000166	100370 	000710'			.WORD	100370,NXRCV	; READ		(FC = 32)
    230	000172	000370 	000212'			.WORD	000370,NXOPN	; OPEN		(FC = 33)
    231	000176	100160 	000414'			.WORD	100160,NXTRM	; CLOSE		(FC = 34)
    232	000202	100370 	000246'			.WORD	100370,NXINL	; INITIALIZE	(FC = 35)
    233	000206	000300 	000000G			.WORD	000300,NXCTL	; PROCESS CONTROL(FC = 36)
    234
    235						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 6
DIRECT ACCESS CONTROLLER ROUTINES

    237						.SBTTL	DIRECT ACCESS CONTROLLER ROUTINES
    238					;+
    239					; **-NXOPN-ESTABLISH ACCESS TO A PHYSICAL LINK
    240					;
    241					; THIS ROUTINE SEARCHES FOR THE SPECIFIED PHYSICAL LINK, ASSIGNS
    242					; IT TO THIS PROCESS, ASSIGNS IT A PROCESS CHANNEL NUMBER AND
    243					; ALLOCATES A PHYSICAL LINK CONTROL BLOCK.
    244					;
    245					; INPUTS:
    246					;
    247					;	R3 = ADDRESS OF AN I/O PACKET
    248					;
    249					;	FUNCTION DEPENDENT I/O PARAMETERS:
    250					;	WD 0 - RELOCATION BIAS OF THE LINE-ID
    251					;	WD 1 - VIRTUAL ADDRESS OF THE LINE-ID
    252					;	WD 2 - LENGTH OF THE LINE-ID STRING
    253					;	WD 3 - INITIAL TIMEOUT(LOW BYTE) AND MODE VALUES(HIGH BYTE)
    254					;		TIMEOUT IN SECONDS
    255					;		MODE	0 - NORMAL OPERATION
    256					;			1 - MAINTANENCE OPERATION
    257					;
    258					;-
    259
    260	000212				NXOPN:	CALL	GTLIN		; FIND AND ALLOCATE THE LINE-ID
    261	000216	103755 				BCS	IEROR		; IF CS, ERROR - R0 HAS THE REASON CODE
    262
    263					;
    264					; MARK THE USER'S ACCESS ON THIS LOGICAL UNIT
    265					;
    266	000220	010573 	000000G			MOV	R5,@I.LN2(R3)	; SET ADDRESS OF LINK CONTROL BLOCK IN THE LUN TABLE
    267	000224	105715 				TSTB	(R5)		; HAS THIS LINK CONTROL BLOCK BEEN INITIALIZED ?
    268	000226	001002 				BNE	10$		; IF NE, YES - DON'T FORCE AN INITIAL STATE
    269	000230	112715 	000001 			MOVB	#LS$IDL,(R5)	; OTHERWISE, SET LINK STATE TO IDLE
    270	000234	052715 	040000 		10$:	BIS	#LF$ACT,(R5)	; INDICATE THE THE LINK IS IN USE
    271	000240	016363 	000006G	000000G		MOV	I.PRM+6(R3),I.PRM(R3) ; MOVE INITIAL PARAMETERS UP
    272
    273					;+
    274					; **-NXINL-INITIALIZE CHANNEL
    275					;
    276					; THIS ROUTINE IS CALLED TO START THE OPERATION OF THE PHYSICAL LINK
    277					; OR TO RESTART THE OPERATION FOLLOWING A FATAL ERROR.
    278					;
    279					; INPUTS:
    280					;
    281					;	R3 = ADDRESS OF THE I/O PACKET
    282					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    283					;
    284					;	FUNCTION DEPENDENT I/O PARAMETERS:
    285					;	WD 0 - TIMEOUT VALUE (LOW BYTE) AND MODE SETTING (HIGH BYTE)
    286					;
    287					;-
    288						.ENABL	LSB
    289
    290	000246	132715 	000001 		NXINL:	BITB	#LS$IDL,(R5)	; IS THE STATE IDLE ?
    291	000252	001010 				BNE	10$		; IF NE, YES
    292	000254	132715 	000010 			BITB	#LS$ERR,(R5)	; IS AN ERROR IN PROGRESS ? (FAULTS ONLY ON INIT)
    293	000260	001453 				BEQ	60$		; IF EQ, NO - RETURN A STATE ERROR
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 6-1
DIRECT ACCESS CONTROLLER ROUTINES

    294	000262					CALL	QFNC		; QUEUE THE FUNCTION REQUEST
    295	000266	112715 	000040 			MOVB	#LS$RST,(R5)	; SET NEW STATE TO RESTARTING
    296	000272	000445 				BR	50$		; RETURN TO CALLER
    297
    298					;
    299					; IDLE STATE
    300					;
    301	000274				10$:	CALL	QFNC		; QUEUE THE FUNCTION REQUEST
    302	000300	005065 	000010 			CLR	L.ERR(R5)	; INITIALIZE ERROR STATUS
    303
    304					;
    305					; ENTRY FROM TIMEOUT TO RECOVER FROM AN ALLOCATION FAILURE
    306					;
    307	000304	016503 	000012 		RSIDL:	MOV	L.FNC(R5),R3	; GET I/O PACKET ADDRESS
    308	000310	016303 	000000G			MOV	I.PRM(R3),R3	; GET INITIAL TIMEOUT AND MODE
    309	000314	110365 	000005 			MOVB	R3,L.TIMI(R5)	; SET INITIAL TIMEOUT VALUE
    310	000320	000303 				SWAB	R3		; MOVE MODE TO LOW BYTE
    311					;
    312					; IF LINK IS ALREADY ENABLED, START IF SPECIFIED MODE; OTHERWISE
    313					; ENABLE THE LINK.
    314					;
    315	000322	032715 	000400 			BIT	#LF$ENB,(R5)	; IS THE LINE ENABLED ?
    316	000326	001010 				BNE	20$		; IF NE, YES - START IT
    317	000330	012700 	012006 			MOV	#FC.CTL!FS.ENB,R0 ; SET FUNCTION CODE
    318	000334					CALL	DOFNC		; ISSUE CONTROL REQUEST
    319	000340	103422 				BCS	50$		; IF CS, ALLOCATION FAILURE - EXIT
    320	000342	052715 	000400 			BIS	#LF$ENB,(R5)	; MARK THE LINE ENABLED
    321	000346	000417 				BR	50$		; WAIT FOR THE ENABLE TO COMPLETE
    322
    323	000350	012700 	001006 		20$:	MOV	#FC.CTL!FS.STR,R0 ; ASSUME A NORMAL START
    324	000354	042715 	001000 			BIC	#LF$MOP,(R5)	  ; ...
    325	000360	105703 				TSTB	R3		; START REQUESTED ?
    326	000362	001404 				BEQ	30$		; IF EQ, YES
    327	000364	012700 	004006 			MOV	#FC.CTL!FS.MNT,R0 ; SET FUNCTION FOR A MAINTANANCE START
    328	000370	052715 	001000 			BIS	#LF$MOP,(R5)	  ; ...AND FLAG AS RUNNING IN MAINTENANCE MODE
    329	000374				30$:	CALL	DOFNC		; ISSUE CONTROL REQUEST
    330	000400	103402 				BCS	50$		; IF CS, ALLOCATION FAILURE - EXIT
    331	000402	112715 	000002 			MOVB	#LS$STR,(R5)	; SET NEW STATE TO STARTING
    332	000406				50$:	RETURN			; RETURN TO CALLER
    333
    334					;
    335					; FUNCTION ISSUED IN AN INVALID STATE
    336					;
    337	000410				60$:	CALLR	IEABO		; ABORT THE FUNCTION
    338
    339						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 7
DIRECT ACCESS CONTROLLER ROUTINES

    341					;+
    342					; **-NXCLN-CLOSE OUT LUN
    343					;
    344					; THIS ROUTINE IS CALLED WHEN A TASK EXITS WITH AN 'ACCESS' OUTSTANDING
    345					; ON THE 'NX' DEVICE.  STOP AND DISABLE FUNCTIONS ARE ISSUED TO THE
    346					; PHYSICAL LINK, THE LINK CONTROL BLOCK IS MARKED INACTIVE, AND THE
    347					; LINE-ID IS DEASSIGNED.
    348					;
    349					; INPUTS:
    350					;
    351					;	R3 = ADDRESS OF THE I/O PACKET
    352					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    353					;
    354					;-
    355						.ENABL	LSB
    356
    357					;+
    358					; **-NXTRM-TERMINATE CHANNEL
    359					;
    360					; THIS ROUTINE IS CALLED TO STOP, DISABLE AND/OR DEASSIGN THE
    361					; PHYSICAL LINK.  THE SUBFUNCTION CODE SPECIFIES THE OPERATION
    362					; TO BE PERFORMED.
    363					;
    364					; INPUTS:
    365					;
    366					;	R3 = ADDRESS OF THE I/O PACKET
    367					;	R5 = ADDRESS IF THE LINK CONTROL BLOCK
    368					;
    369					;	THE LEGAL SUBFUNCTION VALUES ARE:
    370					;
    371					;	0   - STOP & DISABLE, NO DEASSIGN
    372					;	10  - STOP ONLY, NO DEASSIGN
    373					;	200 - STOP & DISABLE, CLOSE LUN & DEASSIGN
    374					;	210 - STOP ONLY, CLOSE LUN & BUT DON'T DEASSIGN
    375					;	      THIS FUNCTION IS AVAILABLE SO THAT A LINE MAY BE
    376					;	      TRANSFERRED TO ANOTHER LLC BY THE REASSIGN FUNCTION.
    377					;
    378					;-
    379
    380	000414	116300 	000000G		NXTRM:	MOVB	I.FCN(R3),R0	; GET THE FUNCTION CODE MODIFIER
    381	000420	100004 				BPL	10$		; IF PL, NO DEASSIGN FOLLOWING STOP OR DISABLE
    382	000422	005073 	000000G			CLR	@I.LN2(R3)	; ENSURE NO MORE I/O ON THIS LINK
    383	000426	042700 	000200 			BIC	#LR$DEA,R0	; REMOVE DEASSIGN REQUEST BIT
    384	000432	001002 			10$:	BNE	15$		; IF NE, LEAVE REQUEST ALONE - STOP ONLY
    385
    386	000434	012700 	000030 		NXCLN:	MOV	#LR$STP!LR$DIS,R0 ; SET STOP & DISABLE FUNCTIONS REQUIRED
    387	000440				15$:	CALL	FNCAB		; ABORT THE PENDING CONTROL FUNCTION
    388	000444					CALL	QFNC		; QUEUE CONTROL PACKET
    389	000450	132715 	000020 			BITB	#LS$STP,(R5)	; IS STATE STOPPING ?
    390	000454	001071 				BNE	80$		; IF NE, YES - JUST LEAVE FUNCTION QUEUED
    391
    392					;
    393					; THIS ENTRY IS CALLED AS A RESULT OF RECEIVING A CONTROL STOP REQUEST
    394					; FROM ANOTHER LLC.
    395					;
    396	000456	112701 	000020 		ABORQ:	MOVB	#LS$STP,R1	; SET NEW STATE TO STOP
    397	000462	000407 				BR	30$		; CONTINUE
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 7-1
DIRECT ACCESS CONTROLLER ROUTINES

    398
    399					;
    400					; THIS ENTRY IS CALLED WHEN AN ASYNCHRONOUS ERROR IS REPORTED WHICH
    401					; REQUIRES THAT A DISABLE FUNCTION BE ISSUED.
    402					;
    403	000464	012700 	000030 		DISRQ:	MOV	#LR$STP!LR$DIS,R0 ; SET STOP & DISABLE FUNCTION REQUIRED
    404	000470	000402 				BR	20$		  ;
    405
    406					;
    407					; THIS ENTRY IS CALLED WHEN AN ASYNCHRONOUS ERROR IS REPORTED FOR
    408					; WHICH ONLY A STOP FUNCTION NEED BE ISSUED.
    409					;
    410	000472	012700 	000010 		STPRQ:	MOV	#LR$STP,R0	; INDICATE A STOP IS REQUIRED
    411	000476	112701 	000010 		20$:	MOVB	#LS$ERR,R1	; SET NEW STATE TO ERROR IN PROGRESS
    412
    413	000502	032715 	000400 		30$:	BIT	#LF$ENB,(R5)	; IS THE LINK ENABLED ?
    414	000506	001002 				BNE	40$		; IF NE, YES - LEAVE REQUESTS ALONE
    415	000510	042700 	000020 			BIC	#LR$DIS,R0	; OTHERWISE NO NEED TO ISSUE THE DISABLE
    416	000514	132715 	000006 		40$:	BITB	#LS$STR!LS$DAT,(R5) ; IS STATE STARTING OR DATA ?
    417	000520	001002 				BNE	50$		; IF NE, YES - LEAVE REQUESTS ALONE
    418	000522	042700 	000010 			BIC	#LR$STP,R0	; OTHERWISE NO NEED TO ISSUE THE STOP
    419	000526	110115 			50$:	MOVB	R1,(R5)		; SET NEW STATE AS REQUIRED
    420	000530	150065 	000002 			BISB	R0,L.RSR(R5)	; SAVE FUNCTIONS REQUIRED
    421	000534	001442 				BEQ	90$		; IF EQ, ALL DONE RIGHT NOW - CONTINUE
    422					;
    423					; START CLEAN UP OF PENDING I/O REQUESTS
    424					;
    425	000536					CALL	RCVAB		; ABORT ANY PENDING RECEIVES
    426	000542	105765 	000003 			TSTB	L.TIP(R5)	; ANY TRANSMITS IN PROGRESS ?
    427	000546	001002 				BNE	60$		; IF NE, YES - WAIT TO START CLEAN UP
    428	000550					CALL	XMTAB		; OTHERWISE ABORT ANY PENDING TRANSMITS
    429	000554				60$:				;
    430					;
    431					; ENTRY POINT FROM TIMEOUT TO RECOVER FROM AN ALLOCATION FAILURE
    432					;
    433	000554	132765 	000010 	000002 	RSSTP:	BITB	#LR$STP,L.RSR(R5) ; STOP REQUIRED ?
    434	000562	001410 				BEQ	70$		; IF EQ, NO
    435	000564	012700 	002006 			MOV	#FC.CTL!FS.STP,R0 ; SET STOP FUNCTION
    436	000570					CALL	DOFNC		; ISSUE CONTROL REQUEST
    437	000574	103421 				BCS	80$		; IF CS, ALLOCATION ERROR - EXIT
    438	000576	142765 	000010 	000002 		BICB	#LR$STP,L.RSR(R5) ; CLEAR STOP REQUIRED
    439	000604	132765 	000020 	000002 	70$:	BITB	#LR$DIS,L.RSR(R5) ; DISABLE REQUIRED ?
    440	000612	001412 				BEQ	80$		; IF EQ, NO
    441	000614	012700 	013006 			MOV	#FC.CTL!FS.DIS,R0 ; SET DISBALE FUNCTION
    442	000620					CALL	DOFNC		; ISSUE CONTROL REQUEST
    443	000624	103405 				BCS	80$		; IF CS, ALLOCATION ERROR - EXIT
    444	000626	042715 	000400 			BIC	#LF$ENB,(R5)	; MARK THE LINK DISABLED
    445	000632	142765 	000020 	000002 		BICB	#LR$DIS,L.RSR(R5) ; CLEAR DISABLE REQUIRED
    446	000640				80$:	RETURN			; RETURN TO CALLER
    447
    448	000642				90$:	CALLR	STOPC		; COMPLETE FUNCTION PROCESSING
    449
    450						.DSABL	LSB
    451
    452					;+
    453					; **-DOFNC-ISSUE CONTROL REQUEST
    454					;
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 7-2
DIRECT ACCESS CONTROLLER ROUTINES

    455					; THIS ROUTINE IS CALLED TO ISSUE A CONTROL REQUEST TO A DLC PROCESS
    456					; AND PERFORM THE NECESSARY HOUSEKEEPING AND RESOURCE RECOVERY
    457					; FUNCTIONS.
    458					;
    459					; INPUTS:
    460					;
    461					;	R0 = FUNCTION TO BE ISSUED
    462					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    463					;
    464					;-
    465
    466	000646	052715 	100000 		DOFNC:	BIS	#LF$RSR,(R5)	; ASSUME ALLOCATION FAILURE
    467	000652					CALL	$CCBGT		; ALLOCATE A CONTROL CCB
    468	000656	103413 				BCS	10$		; IF CS, ALLOCATION FAILURE - EXIT
    469	000660	042715 	100000 			BIC	#LF$RSR,(R5)	; CLEAR ALLOCATION ERROR
    470	000664	105265 	000002 			INCB	L.RSR(R5)	; COUNT ANOTHER CONTROL REQUEST PENDING
    471	000670	016564 	000006 	000006 		MOV	L.LIN(R5),C.LIN(R4) ; SET CHANNEL NUMBER
    472	000676	010064 	000010 			MOV	R0,C.FNC(R4)	; SET FUNCTION CODE
    473	000702					$QDLC			; ISSUE FUNCTION
    474	000706				10$:	RETURN			; RETURN TO CALLER
    475
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 8
DIRECT ACCESS CONTROLLER ROUTINES

    477					;+
    478					; **-NXRCV-DIRECT ACCESS CONTROLLER RECEIVE DATA
    479					;
    480					; THIS ROUTINE IS CALLED TO QUEUE AN I/O PACKET TO THE LINK CONTROL
    481					; BLOCK RECEIVE QUEUE.  WHEN DATA IS RECEIVED, OR A TIMEOUT OCCURS,
    482					; THE I/O PACKET IS COMPLETED WITH THE APPROPRIATE STATUS.  DATA
    483					; RECEIVED FROM THE PHYSICAL LINK WITHOUT A PENDING RECEIVE IS TOSSED
    484					; AND THE NEXT RECEIVE REQUEST WILL BE TERMINATED WITH AN ERROR.
    485					; NOTE THAT ERRORS DETECTED FROM THE PHYSICAL LINK ARE REPORTED
    486					; VIA A COMPLETION STATUS OF 'IE.VER' AND THE SECOND WORD OF THE
    487					; I/O STATUS BLOCK CONTAINS THE SPECIFIC LINK ERROR CODE.
    488					;
    489					; INPUTS:
    490					;
    491					;	R3 = ADDRESS OF THE I/O PACKET
    492					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    493					;
    494					;	FUNCTION DEPENDENT I/O PARAMETERS:
    495					;
    496					;	WD 0 - RELOCATION BIAS OF DATA BUFFER
    497					;	WD 1 - VIRTUAL ADDRESS OF DATA BUFFER
    498					;	WD 2 - LENGTH OF DATA BUFFER
    499					;
    500					;-
    501
    502	000710				NXRCV:	CALL	QRCV		; QUEUE THE I/O PACKET TO THE LINK CONTROL BLOCK
    503	000714	105765 	000004 			TSTB	L.TIM(R5)	; IS A TIMER ALREADY RUNNING ?
    504	000720	001003 				BNE	5$		; IF NE, YES - DONT RESTART IT
    505	000722	116565 	000005 	000004 		MOVB	L.TIMI(R5),L.TIM(R5) ; OTHERWISE START IT
    506	000730	132715 	000004 		5$:	BITB	#LS$DAT,(R5)	; IS THE STATE DATA ?
    507	000734	001410 				BEQ	10$		; IF EQ, NO
    508	000736	012700 	000000C			MOV	#IE.VER&377,R0	; ASSUME THAT THERE ARE ERRORS
    509	000742	016501 	000010 			MOV	L.ERR(R5),R1	; ANY NON FATAL ERRORS TO REPORT ?
    510	000746	001420 				BEQ	40$		; IF EQ, NO - WAIT FOR DATA TO ARRIVE
    511	000750	005065 	000010 			CLR	L.ERR(R5)	; INDICATE NO MORE ERRORS
    512	000754	000413 				BR	30$		; REPORT THIS ERROR
    513
    514	000756	012700 	000000C		10$:	MOV	#IE.ABO&377,R0	; ASSUME ABORT
    515	000762	132715 	000010 			BITB	#LS$ERR,(R5)	; ERROR IN PROGRESS ?
    516	000766	001006 				BNE	30$		; IF NE, YES - RETURN ABORT STATUS
    517	000770	132715 	000021 			BITB	#LS$STP!LS$IDL,(R5) ; STOPPING OR ALREADY STOPPED ?
    518	000774	001405 				BEQ	40$		; IF EQ, NO - LEAVE THE REQUEST AS QUEUED
    519	000776	012700 	000000C			MOV	#IE.DNR&377,R0	; RETURN DEVICE NOT READY STATUS
    520	001002	005001 			20$:	CLR	R1		; RETURN NO ADDITIONAL STATUS
    521	001004				30$:	CALL	RCVDN		; COMPLETE THE I/O REQUEST WITH AN ERROR
    522	001010				40$:	RETURN			; RETURN TO CALLER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 9
DIRECT ACCESS CONTROLLER ROUTINES

    524					;+
    525					; **-NXXMT-DIRECT ACCESS CONTROLLER TRANSMIT DATA
    526					;
    527					; THIS ROUTINE IS CALLED TO QUEUE AN I/O PACKET TO THE LINK CONTROL
    528					; BLOCK TRANSMIT QUEUE.  IF RESOURCES ARE AVAILABLE, DATA IS COPIED
    529					; FROM THE USERS BUFFER INTO A SYSTEM BUFFER AND THEN FORWRDED TO
    530					; THE PHYSICAL LINK PROCESS.
    531					;
    532					; INPUTS:
    533					;
    534					;	R3 = ADDRESS OF THE I/O PACKET
    535					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    536					;
    537					;	FUNCTION DEPENDENT I/O PARAMETERS:
    538					;
    539					;	WD 0 - RELOCATION BIAS OF DATA BUFFER
    540					;	WD 1 - VIRTUAL ADDRESS OF DATA BUFFER
    541					;	WD 2 - LENGTH OF DATA BUFFER
    542					;
    543					;-
    544
    545	001012	132715 	000040 		NXXMT:	BITB	#LS$RST,(R5)	; RESTARTING FOLLOWING A FATAL ERROR ?
    546	001016	001026 				BNE	30$		; IF NE, YES - QUEUE REQUEST AS A PENDING FUNCTION
    547	001020					CALL	QXMT		; QUEUE I/O PACKET TO TRANSMIT QUEUE
    548	001024	132715 	000004 			BITB	#LS$DAT,(R5)	; IS STATE IN DATA ?
    549	001030	001023 				BNE	RSXMT		; IF NE, YES - TRY TO TRANSMIT
    550	001032	012700 	000000C			MOV	#IE.DNR&377,R0	; ASSUME DEVICE NOT READY STATUS
    551	001036	132715 	000021 			BITB	#LS$IDL!LS$STP,(R5) ; STOPPING OR ALREADY STOPPED ?
    552	001042	001010 				BNE	10$		; IF NE, YES - RETURN DEVICE NOT READY STATUS
    553	001044	132715 	000010 			BITB	#LS$ERR,(R5)	; IS AN ERROR IN PROGESS ?
    554	001050	001410 				BEQ	20$		; IF EQ, NO - JUST LEAVE I/O PACKET QUEUED
    555	001052	105765 	000003 			TSTB	L.TIP(R5)	; ANY TRANSMITS IN PROGRESS ?
    556	001056	001005 				BNE	20$		; IF NE, YES - JUST LEAVE I/O PACKET QUEUED
    557	001060	012700 	000000C			MOV	#IE.ABO&377,R0	; OTHERWISE RETURN ABORT STATUS
    558	001064	005001 			10$:	CLR	R1		; RETURN NO ADDITIONAL STATUS
    559	001066					CALL	XMTDN		; COMPLETE THE I/O REQUEST IN ERROR
    560	001072				20$:	RETURN			; RETURN TO CALLER
    561
    562					;
    563					; RESTART IN PROGRESS
    564					;
    565	001074				30$:	CALLR	QFNC		; QUEUE TRANSMIT REQUEST AS A PENDING FUNCTION
    566
    567					;
    568					; ENTRY FROM TIMEOUT TO RECOVER FROM AN ALLOCATION FAILURE
    569					;
    570	001100	016503 	000014 		RSXMT:	MOV	L.XMT(R5),R3	; ANY TRANSMIT PACKETS WAITING ?
    571	001104	001442 				BEQ	30$		; IF EQ, NO - EXIT
    572	001106	052715 	100000 			BIS	#LF$RSR,(R5)	; ASSUME AN ALLOCATION FAILURE
    573
    574						.IF DF	M$$EXT
    575
    576						MOV	I.PRM+4(R3),R0	; GET THE LENGTH OF THE MESSAGE
    577						CMP	$RDBSZ,R0	; WILL IT FIT IN A SYSTEM BUFFER ?
    578						BHIS	10$		; IF HIS, YES - USE A LARGE DATA BUFFER
    579						CALL	$CCBGT		; ALLOCATE A CCB TO DESCRIBE THE POOL BUFFER
    580						BCS	30$		; IF CS, ALLOCATION FAILURE
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 9-1
DIRECT ACCESS CONTROLLER ROUTINES

    581						TST	BFFLG		; IS THE LARGE BUFFER AVALILABLE ?
    582						BNE	20$		; IF NE, NO - HANDLE AS AN ALLOCATION FAILURE
    583						INC	BFFLG		; MARK THE LARGE BUFFER IN USE
    584						MOV	PRPDB,R1	; GET THE ADDRESS OF THE DATA DESCRIPTOR BLOCK
    585						MOV	(R1)+,C.BUF(R4)	; STORE THE BUFFER BIAS AND VIRTUAL ADDRESS IN THE CCB
    586						MOV	(R1),C.BUF+2(R4) ; ...
    587						BR	15$		; MOVE THE DATA
    588
    589					10$:	CALL	$LDBGT		; ALLOCATE A LARGE DATA BUFFER
    590						BCS	30$		; IF CS, ALLOCATION FAILURE
    591					15$:				; REFERENCE LABEL
    592						.IFF
    593
    594	001112					CALL	$CCBGT		; ALLOCATE A CCB TO POINT TO THE USER BUFFER
    595	001116	103435 				BCS	30$		; IF CS, ALLOCATION FAILURE
    596
    597						.IFTF
    598
    599	001120	042715 	100000 			BIC	#LF$RSR,(R5)	; CLEAR ALLOCATION FAILURE
    600	001124					CALL	DQXMT		; DEQUEUE A TRANSMIT PACKET
    601	001130	010364 	000004 			MOV	R3,C.NSP(R4)	; SAVE ADDRESS OF I/O PACKET
    602
    603						.IFT
    604
    605						MOV	R0,C.CNT(R4)	; STORE THE LENGTH OF THE MESSAGE IN THE CCB
    606						MOV	I.PRM(R3),R1	; GET THE SOURCE RELOCATION BIAS
    607						MOV	I.PRM+2(R3),R2	; GET THE SOURCE VIRTUAL ADDRESS
    608						SUB	#20000,R2	; ...AND CONVERT TO AN APR5 REFERENCE
    609						SAVRG	<R4,R5>		; SAVE A FEW REGISTERS
    610						MOV	C.BUF(R4),R3	; GET THE DESTINATION RELOCATION BIAS
    611						MOV	C.BUF+2(R4),R4	; GET THE DESTINATION VIRTUAL ADDRESS
    612						CALL	$BLXIO		; MOVE THE DATA
    613						RESRG	<R5,R4>		; RESTORE REGISTERS
    614
    615						.IFF
    616
    617	001134	016364 	000000G	000014 		MOV	I.PRM(R3),C.BUF(R4) 	; SET UP THE RELOCATION BIAS
    618	001142	016364 	000002G	000016 		MOV	I.PRM+2(R3),C.BUF+2(R4) ; ...AND THE VIRTUAL ADDRESS
    619	001150	016364 	000004G	000020 		MOV	I.PRM+4(R3),C.CNT(R4)	; ...AND THE BYTE COUNT
    620
    621						.IFTF
    622
    623	001156	012764 	100014 	000022 		MOV	#CF.SOM!CF.EOM!CF.LB,C.FLG(R4) ; SET LAST BUFFER + SOLE SEGMENT ;AP0002
    624	001164	105265 	000003 			INCB	L.TIP(R5)	; ACCOUNT FOR ANOTHER TRANSMIT OUTSTANDING      ;**-1
    625	001170	016564 	000006 	000006 		MOV	L.LIN(R5),C.LIN(R4) ; SET CHANNEL NUMBER
    626	001176					$QDLC	#FC.XME		; ISSUE THE TRANSMIT REQUEST
    627	001210	000733 				BR	RSXMT		; TRY TO ISSUE ANOTHER
    628
    629						.IFT
    630
    631					20$:	CALL	$CCBRT		; RELEASE THE CCB
    632
    633						.ENDC
    634
    635	001212				30$:	RETURN			; RETURN TO CALLER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 10
DIRECT ACCESS CONTROLLER ROUTINES

    637					;+
    638					; **-NXPWF-DEVICE DRIVER POWERFAIL
    639					;
    640					; THIS ROUTINE IS CALLED AT POWER RECOVERY, SYSTEM LOAD AND DEVICE
    641					; DRIVER LOAD TIME.  IT FIND THE PROCESSES PDV INDEX THEN EXITS.
    642					;
    643					; INPUTS:
    644					;
    645					;	R5 = ADDRESS OF UCB
    646					;
    647					;-
    648						.ENABL	LSB
    649
    650	001214	012702 			NXPWF:	MOV	(PC)+,R2	; GET PROCESS NAME
    651	001216	015370 				.RAD50	/DLX/		; ...
    652	001220					CALL	$PDVAD		; FIND THE PDV ADDRESS AND PDV INDEX
    653	001224	010267 	176550 			MOV	R2,PRPDV	; STORE AS CURRENT PROCESS INDEX
    654	001230	016167 	000014 	176544 		MOV	Z.DAT(R1),PRPDB	; STORE THE ADDRESS OF THE DATAT DESCRIPTOR BLOCK
    655
    656					;+
    657					; **-NXTMO-DEVICE DRIVER TIMEOUT
    658					; **-NXCAN-DEVICE DRIVER CANCEL
    659					;
    660					; THESE ROUTINES PERFORM NO OPERATION
    661					;
    662					;-
    663
    664	001236				NXTMO:				; REFERENCE LABEL
    665	001236				NXCAN:				; REFERENCE LABEL
    666	001236				30$:	RETURN			; RETURN TO CALLER
    667
    668						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 11
DIRECT ACCESS CONTROLLER ROUTINES

    670					;+
    671					; **-NXDSP-PROCESS DISPATCH TABLE
    672					;
    673					; ROUTINES DEFINED IN THIS TABLE ARE ENTERED AS A RESULT OF ANOTHER
    674					; PROCESS QUEUEING A CCB TO THE DIRECT ACCESS CONTROLLER.
    675					;
    676					; INPUTS:
    677					;
    678					;	R4 = ADDRESS OF CCB TO PROCESS
    679					;
    680					; OUTPUTS TO PROCESSING ROUTINES
    681					;
    682					;	R3 = SUBFUNCTION CODE
    683					;	R4 = ADDRESS OF CCB TO PROCESS
    684					;
    685					;-
    686
    687	001240	001262'			$DLXTB::.WORD	CRASH		; TRANSMIT ENABLE (NOT SUPPORTED
    688	001242	001262'				.WORD	CRASH		; RECEIVE ENABLE  (NOT SUPPORTED)
    689	001244	001262'				.WORD	CRASH		; KILL ENABLE	  (NOT SUPPORTED)
    690	001246	001544'				.WORD	CTLEN		; CONTROL ENABLE
    691	001250	001264'				.WORD	TMOUT		; TIMEOUT
    692	001252	001372'				.WORD	XMTCP		; TRANSMIT COMPLETE
    693	001254	001426'				.WORD	RCVCP		; RECIEVE COMPLETE
    694	001256	001262'				.WORD	CRASH		; KILL COMPLETE   (NOT SUPPORTED)
    695	001260	001756'				.WORD	CTLCP		; CONTROL COMPLETE
    696
    697	001262				CRASH:	CRASH			; ILLEGAL PROCESS OPERATION
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 12
DIRECT ACCESS CONTROLLER ROUTINES

    699					;+
    700					; **-TMOUT-TIMEOUT PROCESSING ROUTINES
    701					;
    702					; INPUTS:
    703					;
    704					;	NONE
    705					;
    706					; OUTPUTS:
    707					;
    708					;	IF A TIMEOUT OR RESOURCE RECOVERY CONDITION IS DETECTED
    709					;	FOR A PARTICULAR LINK CONTROL BLOCK, A UNIQUE ENTRY
    710					;	POINT IS DISPATCHED TO BASED ON THE CURRENT PHYSICAL LINK
    711					;	STATE.  WITH:
    712					;
    713					;	R5 = ADDRESS OF LINK CONTROL BLOCK
    714					;
    715					;-
    716
    717	001264	012705 	000000'		TMOUT:	MOV	#TBLST,R5	; SET ADDRESS OF FIRST LINK BLOCK
    718	001270	011501 			10$:	MOV	(R5),R1		; GET FLAGS & STATE
    719	001272	100016 				BPL	40$		; IF PL, NO RECOVERY REQUIRED
    720	001274	132715 	000003 			BITB	#LS$IDL!LS$STR,(R5) ; IS STATE IDLE OR STARTING ?
    721	001300	001403 				BEQ	20$		; IF EQ, NO
    722	001302					CALL	RSIDL		; TRY RECOVERY
    723	001306	000410 				BR	40$		; CONTINUE
    724
    725	001310	132715 	000004 		20$:	BITB	#LS$DAT,(R5)	; IS STATE DATA ?
    726	001314	001403 				BEQ	30$		; IF EQ, NO
    727	001316					CALL	RSXMT		; TRY RECOVERY
    728	001322	000402 				BR	40$		; CONTINUE
    729
    730	001324				30$:	CALL	RSSTP		; STATE MUST BE ERROR, RESTART, OR STOP
    731
    732	001330	105765 	000004 		40$:	TSTB	L.TIM(R5)	; ANY RECEIVE TIMER RUNNING ?
    733	001334	001410 				BEQ	50$		; IF EQ, NO
    734	001336	105365 	000004 			DECB	L.TIM(R5)	; REDUCE BY ONE AND CHECK FOR RUN OUT
    735	001342	001005 				BNE	50$		; IF NE, NOT DONE YET
    736	001344	012700 	000000C			MOV	#IE.TMO&377,R0	; COMPLETE A RECEIVE WITH A TIME OUT
    737	001350	005001 				CLR	R1		; ...ERROR
    738	001352					CALL	RCVDN		; ...
    739
    740	001356	062705 	000020 		50$:	ADD	#L.LEN,R5	; COMPUTE THE ADDRESS OF THE NEXT LINK BLOCK
    741	001362	022705 	000000'		60$:	CMP	#TBLEN,R5	; BEYOND THE END ?
    742	001366	101340 				BHI	10$		; IF HI, NO - CONTINUE
    743	001370					RETURN			; RETURN TO CALLER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 13
DIRECT ACCESS CONTROLLER ROUTINES

    745					;+
    746					; **-XMTCP-TRANSMIT COMPLETE PROCESSING
    747					;
    748					; THIS ROUTINE IS ENTERED WHEN A TRANSMIT REQUEST COMPLETES.  THE
    749					; I/O PACKET ASSOCIATED WITH THE TRANSMISSION IS COMPLTED TO THE
    750					; USER.
    751					;
    752					; INPUTS:
    753					;
    754					;	R4 = ADDRESS OF TRANSMIT CCB
    755					;
    756					;-
    757
    758	001372				XMTCP:	CALL	STLNK		; GET ADDRESS OF LINK CONTROL BLOCK
    759	001376	105365 	000003 			DECB	L.TIP(R5)	; DECREMENT THE NUMBER OF TRANSMITS IN PROGRESS
    760	001402	016400 	000012 			MOV	C.STS(R4),R0	; GET COMPLETION STATUS
    761	001406	016401 	000020 			MOV	C.CNT(R4),R1	; GET NUMBER OF BYTES SENT
    762	001412	016403 	000004 			MOV	C.NSP(R4),R3	; GET ADDRESS OF I/O PACKET
    763
    764						.IF DF	M$$EXT
    765
    766						CMPB	#CB.RDB,C.BID(R4) ; IS THIS A LARGE DATA BUFFER ?
    767						BNE	10$		; IF NE, NO - FREE THE POOL BUFFER
    768						CALL	$LDBRT		; OTHERWISE, DEALLOCATE THE LARGE DATA BUFFER
    769						BR	20$		; CONTINUE
    770
    771					10$:	CLR	BFFLG		; MARK THE POOL BUFFER FREE
    772
    773						.ENDC
    774
    775	001416					CALL	$CCBRT		; RETURN THE CCB
    776	001422				20$:	CALLR	RQDON		; COMPLETE THE I/O REQUEST
    777
    778					;+
    779					; **-RCVCP-RECEIVE COMPLETE PROCESSING
    780					;
    781					; THIS ROUTINE IS ENTERED WHEN A BLOCK IS RECEIVED BY THE PHYSICAL LINK.
    782					;
    783					; INPUTS:
    784					;
    785					;	R4 = ADDRESS OF THE RECEIVE DATA BUFFER
    786					;
    787					;-
    788
    789	001426				RCVCP:	CALL	STLNK		; GET THE ADDRESS OF THE LINK CONTROL NLOCK
    790	001432	012700 	000000C			MOV	#IE.DAO&377,R0	; ASSUME OVERRUN OR NO RECEIVE REQUEST
    791	001436	016503 	000016 			MOV	L.RCV(R5),R3	; GET THE ADDRESS OF THE FIRST RECEIVE I/O PACKET
    792	001442	001431 				BEQ	20$		; IF EQ, NONE EXISTS - TOSS RECEIVED BLOCK
    793
    794						.IF DF	M$$MGE
    795
    796	001444	016367 	000000G	000000G		MOV	I.PRM(R3),KISAR6 ; MAP TO USER BUFFER
    797
    798						.ENDC
    799
    800	001452	016302 	000002G			MOV	I.PRM+2(R3),R2	; GET VIRTUAL ADDRESS OF THE USER BUFFER
    801	001456	016303 	000004G			MOV	I.PRM+4(R3),R3	; GET LENGTH OF THE USER BUFFER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 13-1
DIRECT ACCESS CONTROLLER ROUTINES

    802	001462	026403 	000020 			CMP	C.CNT(R4),R3	; IS BLOCK LARGER THAN USER BUFFER ?
    803	001466	101004 				BHI	10$		; IF HIS, YES, USE USER'S COUNT
    804	001470	016403 	000020 			MOV	C.CNT(R4),R3	; OTHERWISE USE SIZE OF BLOCK
    805	001474	012700 	000000C			MOV	#IS.SUC&377,R0	; SET SUCCESS STATUS
    806	001500	010301 			10$:	MOV	R3,R1		; SAVE COUNT FOR COMPLETION STATUS
    807	001502					$MVFBF	R4,C.BUF	; MOVE THE DATA RECEIVE DATA BUFFER
    808	001516					CALL	$RDBRT		; RETURN THE RECEIVE DATA BUFFER
    809	001522					CALLR	RCVDN		; POST COMPLETION ON I/O
    810
    811	001526	032715 	001000 		20$:	BIT	#LF$MOP,(R5)	; IS THE LINK RUNNING IN MAINTENANCE MODE ?
    812	001532	001002 				BNE	30$		; IF NE, YES - IGNORE ALL OVERRUN ERRORS
    813	001534	010065 	000010 			MOV	R0,L.ERR(R5)	; MARK A LOST DATA ERROR
    814	001540				30$:	CALLR	$RDBRT		; JUST RETURN THE RECEIVE DATA BUFFER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 14
DIRECT ACCESS CONTROLLER ROUTINES

    816					;+
    817					; **-CTLEN-CONTROL ENABLE PROCESSING
    818					;
    819					; THIS ROUTINE IS ENTERED WHEN A CONTROL ENABLE REQUEST IS
    820					; QUEUED FOR THIS PROCESS.
    821					;
    822					; INPUTS:
    823					;
    824					;	R3 = SUBFUNCTION CODE
    825					;	R4 = ADDRESS OF A CONTROL CCB
    826					;
    827					;-
    828
    829	001544				CTLEN:	CALL	STLNK		; COMPUTE THE ADDRESS OF THE LINK BLOCK
    830	001550					CALLR	@10$(R3)	; DISPATCH ON SUBFUNCTION CODE
    831
    832	001554	177777 			10$:	.WORD	-1		; RESERVED
    833	001556	001562'				.WORD	START		; STARTUP OR ASSIGN
    834	001560	001642'				.WORD	STOP		; SHUTDOWN
    835
    836					;+
    837					; **-START-PROCESS START REQUEST FROM AN LLC
    838					;
    839					; THE ONLY FUNCTION OF THE START ROUTINE FOR THIS PROCESS IS
    840					; TO SET THE CURRENT STATE OF ENABLE FOR AN ASSIGNED LINK.
    841					;
    842					; INPUTS:
    843					;
    844					;	R4 = ADDRESS OF CONTROL CCB
    845					;	R5 = ADDRESS OF LINK CONTROL BLOCK
    846					;-
    847
    848					;
    849					; LOCAL SYMBOL DEFINITIONS
    850					;
    851		000004 			STRT	= 4			; PERFORM LLC STARTUP
    852		000002 			ENBX	= 2			; CHANGE THE PRESENT ENABLE STATE
    853		000001 			LENB	= 1			; ENABLE STATE (0 = DISABLE, 1 = ENABLE)
    854
    855	001562	032764 	000002 	000012 	START:	BIT	#ENBX,C.STS(R4)	; CHANGE THE STATE OF ENABLE ?
    856	001570	001410 				BEQ	10$		; IF EQ, NO - EXIT WITH SUCCESS
    857	001572	042715 	000400 			BIC	#LF$ENB,(R5)	; ASSUME STATE IS DISABLED
    858	001576	032764 	000001 	000012 		BIT	#LENB,C.STS(R4)	; IS THE STATE DISABLED ?
    859	001604	001402 				BEQ	10$		; IF EQ, YES - ASSUMPTION WAS VALID
    860	001606	052715 	000400 			BIS	#LF$ENB,(R5)	; MARK THE LINK ENABLED
    861	001612	012700 	000000G		10$:	MOV	#IS.SUC,R0	; SET SUCCESSFUL COMPLETION STATUS
    862
    863					;+
    864					; **-CCBDN-POST COMPLETION ON A CONTROL CCB
    865					;
    866					; INPUTS:
    867					;
    868					;	R0 = COMPLETION STATUS
    869					;	R4 = ADDRESS OF THE CCB
    870					;
    871					; OUTPUTS:
    872					;
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 14-1
DIRECT ACCESS CONTROLLER ROUTINES

    873					;	THE CCB IS POSTED TO THE PROCESS AND CHANNEL SPECIFIED IN
    874					;	THE 'C.NSP' CELL OF THE CCB WITH A CONTROL COMPLETE
    875					;	FUNCTION CODE.  THE SUBFUNCTION CODE IS UNMODIFIED.
    876					;
    877					;-
    878
    879	001616	016464 	000004 	000006 	CCBDN:	MOV	C.NSP(R4),C.LIN(R4) ; SET TARGET PROCESS
    880	001624	112764 	000020 	000010 		MOVB	#FC.CCP,C.FNC(R4) ; SET COMPLETION FUNCTION CODE
    881	001632	010064 	000012 			MOV	R0,C.STS(R4)	; SET COMPLETION STATUS
    882	001636					CALLR	$LLCRS		; POST COMPLETION ON THE CONTROL CCB
    883
    884					;+
    885					; **-STOP-PROCESS STOP REQUEST FROM AN LLC
    886					;
    887					; THIS ROUTINE IS CALLED TO STOP THE OPERATION OF THE LLC ON A
    888					; LOGICAL LINE.  THE ISSUIENG PROCESS HAS THE OPTION OF PERFORMING
    889					; A STOP & DISABLE OR JUST A STOP FUNCTION.  IN EITHER CASE THE
    890					; CONTROL REQUEST IS NOT COMPLETED UNTIL ALL ACTIVITY ON THE LINE
    891					; AND ALL ACTIVITY PERTINENT TO THE USER HAS QUIESSED.
    892					;
    893					; INPUTS:
    894					;
    895					;	R4 = ADDRESS OF THE CONTROL CCB
    896					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
    897					;
    898					;	'C.STS' CONTAINS THE STOP MODIFIER.
    899					;	BIT0 = 0	STOP & DISABLE
    900					;	BIT0 = 1	STOP ONLY
    901					;
    902					;-
    903
    904	001642	012700 	000000G		STOP:	MOV	#IE.ABO,R0	; ASSUME A STATE ERROR
    905	001646	032715 	010000 			BIT	#LF$ABO,(R5)	; IS THIS LINK BLOCK ALREADY STOPPING ?
    906	001652	001361 				BNE	CCBDN		; IF NE, YES - RETURN STATE ERROR
    907	001654	052715 	010000 			BIS	#LF$ABO,(R5)	; MARK STOP IN PROGRESS
    908	001660	012700 	000010 			MOV	#LR$STP,R0	; ASSUME ONLY A STOP IS REQUIRED
    909	001664	032764 	000001 	000012 		BIT	#LENB,C.STS(R4)	; IS ONLY THE STOP FUNCTION REQUESTED ?
    910	001672	001002 				BNE	10$		; IF NE, YES
    911	001674	052700 	000020 			BIS	#LR$DIS,R0	; OTHERWISE INCLUDE A DISABLE
    912	001700				10$:				;
    913
    914					;
    915					; IF THE LINK CONTROL BLOCK IS NOT ACTIVE, THERE CAN NOT BE ANY ACTIVE
    916					; USER TASK, SO SHUTDOWN COMMENCES WITHOUT CONCERN FOR ACTIVE I/O REQUESTS.
    917					; OTHERWISE, THE POINTER TO THE SECOND LUN WORD FROM AN ACTIVE I/O PACKET
    918					; IS VALID AND THE INTERLOCK SET TO BLOCK ALL FURTHER USER ACTIVITY ON THE
    919					; LUN AND LINK CONTROL BLOCK.  IF NO USER I/O IS PENDING, WE MUST WAIT
    920					; UNTIL I/O IS ISSUED TO GET THE ADDRESS OF THE SECOND LUN WORD IN ORDER
    921					; TO COMPLETE SHUTDOWN. THE ADDRESS IS NOTE SAVED IN THE LINK CONTROL BLOCK
    922					; BECAUSE THAT ADDRESS IS NOT VALID IF THE USER TASK IS CHECKPOINTED.
    923					;
    924	001700	032715 	040000 			BIT	#LF$ACT,(R5)	; IS THERE AN ACTIVE USER TASK ?
    925	001704	001416 				BEQ	30$		; IF EQ, NO - NO NEED TO INTERLOCK ANYTHING
    926	001706	016503 	000012 			MOV	L.FNC(R5),R3	; ARE THERE ANY CONTROL REQUESTS ?
    927	001712	001011 				BNE	20$		; IF NE, YES
    928	001714	016503 	000014 			MOV	L.XMT(R5),R3	; ARE THERE ANY TRANSMIT REQUESTS ?
    929	001720	001006 				BNE	20$		; IF NE, YES
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 14-2
DIRECT ACCESS CONTROLLER ROUTINES

    930	001722	016503 	000016 			MOV	L.RCV(R5),R3	; ARE THER ANY RECEIVE REQUESTS ?
    931	001726	001003 				BNE	20$		; IF NE, YES
    932	001730	052715 	020000 			BIS	#LF$USR,(R5)	; OTHERWISE, MARK THAT USER MUST GO
    933	001734	000402 				BR	30$		; ... AND PROCEED WITH THE SHUTDOWN
    934
    935	001736	005073 	000000G		20$:	CLR	@I.LN2(R3)	; BLOCK ALL FURTHER ACTIVITY ON THIS LINK
    936
    937	001742				30$:	CALL	FNCAB		; ABORT ANY PENDING CONTROL FUNCTIONS
    938	001746	010465 	000010 			MOV	R4,L.ERR(R5)	; SAVE CONTROL CCB FOR LATER COMPLETION
    939	001752					CALLR	ABORQ		; JOIN COMMON TERMINATION ROUTINES
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 15
DIRECT ACCESS CONTROLLER ROUTINES

    941					;+
    942					; **-CTLCP-CONTROL COMPLETE PROCESSING
    943					;
    944					; THIS ROUTINE IS ENTERED WHEN A CONTROL COMPLETE REQUEST IS QUEUED
    945					; TO THIS PROCESS.  CONTROL REQUESTS FROM A DLC PROCESS ARE DISPATCHED
    946					; THROUGH A TABLE BASED ON THE SUBFUNCTION CODE.  CONTROL REQUESTS
    947					; FROM ANOTHER LLC ARE DISPATCHED THROUGH A TABLE BASED ON THE CHANNEL
    948					; NUMBER IN 'C.LIN' BY THE ROUTINE 'NXCCP'.
    949					;
    950					; INPUTS:
    951					;
    952					;	R3 = SUBFUNCTION CODE
    953					;	R4 = ADDRESS OF CONTROL CCB
    954					;
    955					;
    956					;-
    957
    958	001756	005764 	000006 		CTLCP:	TST	C.LIN(R4)	; IS THIS COMPLETION FROM AN LLC ?
    959	001762	100415 				BMI	20$		; IF MI, YES - PROCESS IT IN 'NXCCP'
    960	001764					CALL	STLNK		; GET ADDRESS OF LINK CONTROL BLOCK
    961	001770	116400 	000011 			MOVB	C.MOD(R4),R0	; GET SUBFUNCTION CODE
    962	001774	001402 				BEQ	10$		; IF EQ, DON'T REDUCE NUMBER OF CONTROL REQUESTS PENDING
    963	001776	105365 	000002 			DECB	L.RSR(R5)	; OTHERWISE DO
    964	002002	016401 	000012 		10$:	MOV	C.STS(R4),R1	; GET COMPLETION STATUS
    965	002006					CALL	$CCBRT		; DEALLOCATE THE CONTROL CCB
    966	002012					CALLR	@30$(R0)	; DISPATCH ON SUBFUNCTION
    967
    968	002016				20$:	CALLR	NXCCP		; PROCESS LLC CONTROL COMPLETIONS
    969
    970	002022	002052'			30$:	.WORD	ASYER		; ASYNCHRONOUS ERROR
    971	002024	002110'				.WORD	STRTC		; START COMPLETE
    972	002026	002132'				.WORD	STOPC		; STOP COMPLETE
    973	002030	177777 				.WORD	-1		; RESERVED
    974	002032	002110'				.WORD	STRTC		; MAINTANANCE START COMPLETE
    975	002034	177777 	177777 	177777 		.WORD	-1,-1,-1,-1,-1
	002042	177777 	177777
    976	002046	002076'				.WORD	ENBLC		; ENABLE COMPLETE
    977	002050	002132'				.WORD	STOPC		; DISABLE COMPLETE
    978
    979					;+
    980					; **-ASYER-ASYNCHRONOUS ERROR
    981					;
    982					; THIS ROUTINE IS CALLED WHEN AN ASYNCHRONOUS ERROR IS REPORTED BY
    983					; THE PHYSICAL LINK.  BECAUSE OF THE REASSIGN FUNCTION, IT IS
    984					; POSSIBLE TO HAVE A LINK BLOCK WHICH IS INACTIVE (I.E. NO USER)
    985					; AND STILL RECEIVE ERROR REPORTS FROM THE PHYSICAL LINK.
    986					;
    987					;-
    988						.ENABL	LSB
    989
    990	002052	122701 	100366 		ASYER:	CMPB	#CE.DIS,R1	; IS THIS A DISCONNECT ERROR ?
    991	002056	001405 				BEQ	2$		; IF EQ, YES - ISSUE A DISABLE
    992	002060	032715 	040000 			BIT	#LF$ACT,(R5)	; IS THIS LINK ACTIVE ?
    993	002064	001523 				BEQ	60$		; IF EQ, NO - IGNORE THE ERROR
    994	002066					CALLR	STPRQ		; ALL ERRORS FORCE AN ERROR
    995
    996	002072				2$:	CALLR	DISRQ		; FORCE A DISABLE TO BE ISSUED
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 15-1
DIRECT ACCESS CONTROLLER ROUTINES

    997
    998					;+
    999					; **-ENBLC-ENABLE COMPLETE
   1000					;
   1001					; ON ENABLE COMPLETE, THE LINK IS STARTED IF THE CURRENT STATE IS IDLE.
   1002					; IF THE STATE IS NOT IDLE, A SHUT DOWN SEQUENCE IS IN PROGRESS AND THE
   1003					; COMPLETEION IS IGNORED.
   1004					;
   1005					;-
   1006
   1007	002076	032715 	000001 		ENBLC:	BIT	#LS$IDL,(R5)	; IS THE CURRENT STATE IDLE ?
   1008	002102	001514 				BEQ	60$		; IF EQ, NO - JUST EXIT
   1009	002104					CALLR	RSIDL		; RESTART THE STARTUP SEQUENCE
   1010
   1011					;+
   1012					; **-STRTC-START COMPLETE
   1013					;
   1014					; ON SUCESSFUL STARTUP, DATA STATE IS ENTERED AND ANY PENDING
   1015					; TRANSMITS ARE INITIATED.
   1016					;
   1017					;-
   1018
   1019	002110				STRTC:	CALL	CTLDN		; POST COMPLETION ON CONTROL I/O PACKET
   1020	002114	132715 	000002 			BITB	#LS$STR,(R5)	; IS THE STATE STARTING ?
   1021	002120	001505 				BEQ	60$		; IF EQ, NO - JUST EXIT
   1022	002122	112715 	000004 			MOVB	#LS$DAT,(R5)	; OTHERWISE, SET NEW STATE TO DATA
   1023	002126					CALLR	RSXMT		; ...AND INITIATE TRANSMISSION
   1024
   1025					;+
   1026					; **-STOPC-STOP COMPLETE
   1027					;
   1028					; THIS ROUTINE IS CALLED WHEN STOP OR DISABLE CONTROL REQUESTS
   1029					; COMPLETE.  IT IS ALSO CALLED BY THE TERMINATE FUNCTION WHEN NO
   1030					; CONTROL FUNCTIONS ARE ISSUED.
   1031					;
   1032					;-
   1033
   1034	002132				STOPC:	CALL	XMTAB		; ABORT ANY PENDING TRANSMIT REQUESTS
   1035	002136	005765 	000002 			TST	L.RSR(R5)	; ARE ALL FUNCTIONS AND TRANSMITS DONE ?
   1036	002142	001074 				BNE	60$		; IF NE, NO - JUST EXIT
   1037					;
   1038					; AT THIS POINT ALL PREVIOUS OPERATIONS HAVE COMPLETED AND
   1039					; WE CAN START OVER AGAIN.
   1040					;
   1041	002144	111500 				MOVB	(R5),R0		; GET CURRENT STATE
   1042	002146	112715 	000001 			MOVB	#LS$IDL,(R5)	; SET NEW STATE TO IDLE
   1043	002152	132700 	000010 			BITB	#LS$ERR,R0	; WAS THE STATE ERROR ?
   1044	002156	001066 				BNE	60$		; IF NE, YES
   1045	002160	132700 	000040 			BITB	#LS$RST,R0	; WAS THE START RESTARTING ?
   1046	002164	001051 				BNE	40$		; IF NE, YES
   1047	002166	016503 	000012 			MOV	L.FNC(R5),R3	; GET ADDRESS OF CONTROL I/O PACKET
   1048	002172	001413 				BEQ	5$		; IF EQ, NO CONTROL I/O PACKET
   1049	002174	122763 	000007 	000001G		CMPB	#7,I.FCN+1(R3)	; IS THIS A CLOSE OUT LUN REQUEST ?
   1050	002202	001012 				BNE	10$		; IF NE, NO - JUST CONTINUE
   1051	002204	016302 	000000G			MOV	I.UCB(R3),R2	; OTHERWISE DECREMENT THE VOLUME USE
   1052	002210	005372 	000000G			DEC	@U.VCB(R2)	; ... COUNT
   1053	002214	005073 	000000G			CLR	@I.LN2(R3)	; AND CLEAR THE ACCESS INTERLOCK
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 15-2
DIRECT ACCESS CONTROLLER ROUTINES

   1054	002220	000410 				BR	20$		; DO DEASSIGN AN COMPLETE THE REQUEST
   1055
   1056	002222	042715 	040000 		5$:	BIC	#LF$ACT,(R5)	; MARK THE LINK INACTIVE
   1057	002226	000413 				BR	35$		; ...AND FINISH CLEANING UP
   1058
   1059	002230	132763 	000200 	000000G	10$:	BITB	#LR$DEA,I.FCN(R3) ; DEASSIGN REQUESTED ?
   1060	002236	100005 				BPL	30$		; IF PL, NO - NO DEASSIGN, LEAVE LINK ACTIVE
   1061	002240	001002 				BNE	25$		; IF NE, NO - NO DEASSIGN, SET LINK INACTIVE
   1062	002242				20$:	CALL	DSLIN		; DEASSIGN THE PHYSICAL LINK
   1063	002246	042715 	040000 		25$:	BIC	#LF$ACT,(R5)	; MARK LINK CONTROL BLOCK INACTIVE
   1064	002252				30$:	CALL	CTLDN		; COMPLETE THE I/O REQUEST
   1065	002256	032715 	010000 		35$:	BIT	#LF$ABO,(R5)	; IS AN ABORT SEQUENCE IN PROGRESS ?
   1066	002262	001412 				BEQ	40$		; IF EQ, NO - PROCESS PENDING FUNCTIONS
   1067	002264	042715 	010000 			BIC	#LF$ABO,(R5)	; CLEAR ABORT PENDING FLAG
   1068	002270	016504 	000010 			MOV	L.ERR(R5),R4	; GET CCB WHICH FORCED THE ABORT
   1069	002274	116500 	000001 			MOVB	L.FLG(R5),R0	; GET THE CURRENT STATE OF LINK ENABLE
   1070	002300	042700 	177776 			BIC	#^C<LF$ENB/400>,R0 ; ...
   1071	002304					CALLR	CCBDN		; POST COMPLETION ON STOP REQUEST
   1072
   1073					;
   1074					; FOR EACH ENTRY NOW ON THE PENDING FUNCTION QUEUE, TRY TO RE-INITIATE
   1075					; THE OPERATION BY CALLING THE INITIAL DRIVER ENTRY POINT.
   1076					;
   1077	002310	016546 	000012 		40$:	MOV	L.FNC(R5),-(SP)	; GET THE CHAIN OF PENDING FUNCTIONS
   1078	002314	005065 	000012 			CLR	L.FNC(R5)	; CLEAN UP THE PENDING FUNCTION QUEUE
   1079	002320	012603 			50$:	MOV	(SP)+,R3	; GET THE NEXT FUNCTION
   1080	002322	001404 				BEQ	60$		; IF EQ, ALL DONE
   1081	002324	011346 				MOV	(R3),-(SP)	; SAVE POINTER TO THE NEXT FUNCTION
   1082	002326					CALL	NXINA		; PROCESS THE REQUEST
   1083	002332	000772 				BR	50$		; CONTINUE UNTIL DONE
   1084
   1085	002334				60$:	RETURN			; RETURN TO CALLER
   1086
   1087						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 16
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1089						.SBTTL	SUBROUTINES FOR THE DIRECT LINE CONTROLLER
   1090					;+
   1091					; **-STLNK-COMPUTE ADDRESS OF LINK CONTROL BLOCK
   1092					; **-STLNA-ALTERNATE ENTRY
   1093					;
   1094					; INPUTS:
   1095					;
   1096					;	FOR STLNK:
   1097					;	R4 = ADDRESS OF A CCB WHICH CONTAINS A VAILD 'C.LIN'.
   1098					;
   1099					;	FOR STLNA:
   1100					;	R0 = CHANNEL NUMBER (LOW BYTE)
   1101					;
   1102					; OUTPUTS:
   1103					;
   1104					;	R4 = ADDRESS OF THE CCB (STLNK ONLY)
   1105					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
   1106					;
   1107					;-
   1108						.ENABL	LSB
   1109
   1110	002336	042700 	177400 		STLNA::	BIC	#^C<377>,R0	; LEAVE JUST THE CHANNEL NUMBER
   1111	002342	000403 				BR	10$		;
   1112
   1113	002344	005000 			STLNK::	CLR	R0		; EXTRACT THE LINE NUMBER
   1114	002346	156400 	000006 			BISB	C.LIN(R4),R0	; ...
   1115	002352	010046 			10$:	MOV	R0,-(SP)	; SAVE THE CHANNEL NUMBER
   1116	002354	012701 	000020 			MOV	#L.LEN,R1	; SET LENGTH OF THE LINK BLOCK
   1117	002360					CALL	$MUL		; COMPUTE OFFSET
   1118	002364	010105 				MOV	R1,R5		; COMPUTE ADDRESS IN TABLE
   1119	002366	062705 	000000'			ADD	#TBLST,R5	; ...
   1120	002372	012665 	000006 			MOV	(SP)+,L.LIN(R5) ; INITIALIZE THE PHYSICAL LINK NUMBER
   1121	002376					RETURN			; RETURN TO CALLER
   1122
   1123						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 17
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1125					;+
   1126					; **-GTLIN-ASSIGN A LINE-ID TO THE DIRECT LINE CONTROLLER
   1127					;
   1128					; INPUTS:
   1129					;
   1130					;	R3 = ADDRESS OF AN I/O PACKET WHICH CONTAINS:
   1131					;	WD 0 - RELOCATION BIAS OF THE LINE-ID STRING
   1132					;	WD 1 - VIRTUAL ADDRESS
   1133					;	WD 2 - LENGTH
   1134					;
   1135					; OUTPUTS:
   1136					;
   1137					;	C-BIT CLEAR:
   1138					;	R5 = ADDRESS OF THE PHYSICAL LINK BLOCK
   1139					;
   1140					;	C-BIT SET:
   1141					;	R0 = ERROR CODE (IE.NSF,IE.RSU)
   1142					;
   1143					;-
   1144
   1145	002400				GTLIN:	CALL	FINDL		; SEARCH FOR THE LINE-ID
   1146	002404	103430 				BCS	30$		; IF CS, ERROR - R0 HAS THE ERROR CODE
   1147	002406	001412 				BEQ	10$		; IF EQ, THE LINE IS NOT ASSIGNED TO ANY LLC
   1148	002410	126765 	175364 	000017 		CMPB	PRPDV,TASN+1(R5) ; IS THE LINE ALREADY ASSIGNED TO THIS PROCESS ?
   1149	002416	001021 				BNE	20$		; IF NE, NO - ASSIGNMENT ERROR
   1150	002420					CALL	STLNA		; COMPUTE ADDRESS OF THE LINK CONTROL BLOCK
   1151	002424	032715 	070000 			BIT	#LF$BSY,(R5)	; IS THIS CHANNEL IN USE ?
   1152	002430	001014 				BNE	20$		; IF NE, YES - ASSIGNMENT ERROR
   1153	002432	000416 				BR	40$		; OTHERWISE IT'S OK TO USE IT
   1154
   1155	002434	016702 	175340 		10$:	MOV	PRPDV,R2	; SET OUR PDV INDEX AS THE TARGET PROCESS
   1156	002440					CALL	FNDFR		; FIND A FREE CHANNEL
   1157	002444	103406 				BCS	20$		; IF CS, RESOURCE ERROR
   1158	002446	016502 	000010 			MOV	TSLN(R5),R2	; GET SLN & STATION NUMBER PAIR
   1159	002452					CALL	ASSGN		; MODIFY THE SYSTEM DATA BASE
   1160	002456					CALLR	STLNA		; COMPUTE THE ADDRESS OF THE LINK BLOCK
   1161
   1162	002462	012700 	000000C		20$:	MOV	#IE.RSU&377,R0	; SET SHARED RESOURCE IN USE ERROR CODE
   1163	002466	000261 			30$:	SEC			; INDICATE THAT AN ERROR HAS OCCURRED
   1164	002470				40$:	RETURN			; RETURN TO CALLER
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 18
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1166					;+
   1167					; **-DSLIN-DEASSIGN PHYSICAL LINK
   1168					;
   1169					;
   1170					; INPUTS:
   1171					;
   1172					;	R5 = ADDRESS OF LINK CONTROL BLOCK
   1173					;
   1174					; OUTPUTS:
   1175					;
   1176					;	THE LINK ASSIGNED TO THIS LINK CONTROL BLOCK IS
   1177					;	DEASSIGNED.
   1178					;
   1179					; REGISTERS MODIFIED:
   1180					;
   1181					;	R1, R2, AND R3
   1182					;-
   1183
   1184	002472	016701 	175302 		DSLIN:	MOV	PRPDV,R1	; FIRST COMPUTE THE ADDRESS OF THE MAPPING
   1185	002476	066701 	000000G			ADD	$PDVTA,R1	; ...TABLE ENTRY FOR THIS PROCESS AND CHANNEL
   1186	002502	011101 				MOV	(R1),R1		; ...
   1187	002504	062701 	000016 			ADD	#Z.MAP,R1	; ...
   1188	002510	016500 	000006 			MOV	L.LIN(R5),R0	; GET PROCESS CHANNEL NUMBER
   1189	002514	006300 				ASL	R0		; MAKE IT A WORD INDEX
   1190	002516	060001 				ADD	R0,R1		; OFFSET INTO MAPPING TABLE
   1191	002520	011102 				MOV	(R1),R2		; GET SLN & STATION ASSIGNED TO THIS CHANNEL
   1192	002522					CALLR	DEASN		; MODIFY THE SYSTEM DATA BASE FOR A DEASSIGN
   1193
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 20
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1196					;+
   1197					; **-QFNC-QUEUE I/O PACKET TO PENDING FUNCTION QUEUE
   1198					; **-QXMT-QUEUE I/O PACKET TO TRANSMIT QUEUE
   1199					; **-QRCV-QUEUE I/O PACKET TO RECEIVE QUEUE
   1200					;
   1201					; INPUTS:
   1202					;
   1203					;	R3 = ADDRESS OF I/O PACKET
   1204					;	R5 = ADDRESS OF LINK CONTROL BLOCK
   1205					;
   1206					; OUTPUTS:
   1207					;
   1208					;	THE I/O PACKET IS QUEUED TO THE APPROPRIATE QUEUE.
   1209					;
   1210					; REGISTERS MODIFIED:
   1211					;
   1212					;	RX
   1213					;-
   1214						.ENABL	LSB
   1215
   1216	002526	012702 	000012 		QFNC:	MOV	#L.FNC,R2	; SET OFFSET TO FUNCTION QUEUE
   1217	002532	000405 				BR	10$		;
   1218
   1219	002534	012702 	000014 		QXMT:	MOV	#L.XMT,R2	; SET OFFSET TO TRANSMIT QUEUE
   1220	002540	000402 				BR	10$		;
   1221
   1222	002542	012702 	000016 		QRCV:	MOV	#L.RCV,R2	; SET OFFSET TO RECEIVE QUEUE
   1223
   1224	002546	060502 			10$:	ADD	R5,R2		; COMPUTE ADDRESS OF THE LISTHEAD
   1225	002550	010346 				MOV	R3,-(SP)	; SAVE ADDRESS OF I/O PACKET
   1226	002552	010203 			20$:	MOV	R2,R3		; SAVE ADDRESS OF CURRENT
   1227	002554	011202 				MOV	(R2),R2		; GET ADDRESS OF NEXT
   1228	002556	001375 				BNE	20$		; IF NE, NOT THE LAST
   1229	002560	011613 				MOV	(SP),(R3)	; LINK NEW TO LAST
   1230	002562	005036 				CLR	@(SP)+		; CLEAR POINTER TO NEXT
   1231	002564					RETURN			; RETURN TO CALLER
   1232
   1233						.DSABL	LSB
   1234
   1235					;+
   1236					; **-DQFNC-DEQUE I/O PACKET FROM PENDING FUNCTION QUEUE
   1237					; **-DQXMT-DEQUE I/O PACKET FROM TRANSMIT QUEUE
   1238					; **-DQRCV-DEQUE I/O PACKET FROM RECEIVE QUEUE
   1239					;
   1240					; INPUTS:
   1241					;
   1242					;	R5 = ADDRESS OF LINK CONTROL BLOCK
   1243					;
   1244					; OUTPUTS:
   1245					;
   1246					;	C-BIT CLEAR:
   1247					;	R3 = ADDRESS OF I/O PACKET DEQUEUED
   1248					;	C-BIT SET:
   1249					;	NO I/O PACKET DEQUEUED
   1250					;
   1251					;	R5 = ADDRESS OF LINK CONTROL BLOCK
   1252					;
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 20-1
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1253					; REGISTERS MODIFIED:
   1254					;
   1255					;	R2
   1256					;-
   1257						.ENABL	LSB
   1258
   1259	002566	012702 	000012 		DQFNC:	MOV	#L.FNC,R2	; SET OFFSET OF PENDING FUNCTION QUEUE
   1260	002572	000405 				BR	10$		;
   1261
   1262	002574	012702 	000014 		DQXMT:	MOV	#L.XMT,R2	; SET OFFSET OF TRANSMIT QUEUE
   1263	002600	000402 				BR	10$		;
   1264
   1265	002602	012702 	000016 		DQRCV:	MOV	#L.RCV,R2	; SET OFFSET OF RECEIVE QUEUE
   1266
   1267	002606	060502 			10$:	ADD	R5,R2		; COMPUTE ADDRESS OF LISTHEAD
   1268	002610	011203 				MOV	(R2),R3		; GET ADDRESS OF FIRST ENTRY
   1269	002612	001403 				BEQ	20$		; IF EQ, NO ENTRIES
   1270	002614	011312 				MOV	(R3),(R2)	; SET POINTER TO NEW FIRST
   1271	002616	005013 				CLR	(R3)		; CLEAR NEXT POINTER (CLEAR C-BIT)
   1272	002620					RETURN			; RETURN TO CALLER
   1273
   1274	002622	000261 			20$:	SEC			; INDICATE FAILURE
   1275	002624					RETURN			; RETURN TO CALLER
   1276
   1277						.DSABL	LSB
   1278
   1279					;+
   1280					; **-RCVAB-ABORT PENDING RECEIVE REQUESTS
   1281					;
   1282					; THIS ROUTINE IS CALLED TO COMPLETE PENDING RECEIVE I/O PACKETS
   1283					; WITH ABORT STATUS.
   1284					;
   1285					; INPUTS:
   1286					;
   1287					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
   1288					;
   1289					;-
   1290						.ENABL	LSB
   1291
   1292	002626				RCVAB:				; REFERRENCE LABEL
   1293	002626				10$:	CALL	DQRCV		; GET THE NEXT RECEIVE PACKET
   1294	002632	103435 				BCS	30$		; IF CS, NO MORE
   1295	002634					CALL	IEABO		; RETURN ABORT STATUS
   1296	002640	105065 	000004 			CLRB	L.TIM(R5)	; STOP ANY PENDING RECEIVE TIMER
   1297	002644	000770 				BR	10$		; CONTINUE
   1298
   1299					;+
   1300					; **-XMTAB-ABORT PENDING TRANSMIT REQUESTS
   1301					;
   1302					; THIS ROUTINE IS CALLED TO RETURN ANY PENDING TRANSMIT REQUESTS
   1303					; WITH AN ABORT STATUS.
   1304					;
   1305					; INPUTS:
   1306					;
   1307					;	R5 = ADDRESS OF LINK CONTROL BLOCK
   1308					;
   1309					;-
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 20-2
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1310
   1311	002646				XMTAB:				; REFERRENCE LABEL
   1312	002646				20$:	CALL	DQXMT		; DEQUE THE NEXT TRANSMIT PACKET
   1313	002652	103425 				BCS	30$		; IF CS, NO MORE
   1314	002654					CALL	IEABO		; RETURN ABORT STATUS
   1315	002660	000772 				BR	20$		; CONTINUE
   1316
   1317					;+
   1318					; **-FNCAB-ABORT A PENDING FUNCTION REQUEST
   1319					;
   1320					; THIS ROUTINE IS CALLED TO COMPLETE A PENDING CONTROL I/O
   1321					; PACKET WITH ABORT STATUS.
   1322					;
   1323					; INPUTS:
   1324					;
   1325					;	R5 = ADDRESS OF THE LINK CONTROL BLOCK
   1326					;
   1327					;-
   1328
   1329	002662	132715 	000040 		FNCAB:	BITB	#LS$RST,(R5)	; RESTARTING FOLLOWING AN ERROR ?
   1330	002666	001417 				BEQ	30$		; IF EQ, NO - CONTINUE
   1331	002670	010346 				MOV	R3,-(SP)	; SAVE R3, R1 AND R0
   1332	002672	010146 				MOV	R1,-(SP)	; ...
   1333	002674	010046 				MOV	R0,-(SP)	; ...
   1334	002676					CALL	DQFNC		; DEQUE THE PENDING CONTROL FUNCTION
   1335	002702					CALL	IEABO		; ABORT THE REQUEST
   1336	002706	016565 	000012 	000014 		MOV	L.FNC(R5),L.XMT(R5) ; MOVE TRANSMITS TO TRANSMIT QUEUE
   1337	002714	005065 	000012 			CLR	L.FNC(R5)	; CLEAN UP THE FUNCTION QUEUE
   1338	002720	012600 				MOV	(SP)+,R0	; RESTORE REGISTERS
   1339	002722	012601 				MOV	(SP)+,R1	; ...
   1340	002724	012603 				MOV	(SP)+,R3	; ...
   1341	002726				30$:	RETURN			; RETURN TO CALLER
   1342
   1343						.DSABL	LSB
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 21
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1345					;+
   1346					; **-IEABO-RETURN ABORT STATUS
   1347					;
   1348					;-
   1349
   1350	002730	012700 	000000C		IEABO:	MOV	#IE.ABO&377,R0	; SET ABORT STATUS
   1351	002734	000426 				BR	RQALT		; ...
   1352
   1353					;+
   1354					; **-IEONP-RETURN ILLEGAL SUBFUNCTION CODE ERROR
   1355					;
   1356					;-
   1357
   1358	002736	012700 	000000C		IEONP::	MOV	#IE.ONP&377,R0	; SET ERROR STATUS
   1359	002742	000423 				BR	RQALT		; ...
   1360
   1361					;+
   1362					; **-CTLDN-COMPLETE A CONTROL REQUEST I/O PACKET
   1363					;
   1364					; THIS ROUTINE IS CALLED TO POST A COMPLETION FOR THE FIRST
   1365					; REQUEST ON THE LINK CONTROL BLOCK PENDING FUNCTION QUEUE.
   1366					;
   1367					; INPUTS:
   1368					;
   1369					;	R3 = ADDRESS OF I/O PACKET
   1370					;
   1371					; OUTPUTS:
   1372					;
   1373					; XXX
   1374					;
   1375					;-
   1376
   1377	002744				CTLDN:	CALL	DQFNC		; GET PENDING CONTROL FUNCTION
   1378	002750	000416 				BR	ISSUC		; RETRUN SUCCESSFUL STATUS
   1379
   1380					;+
   1381					; **-XMTDN-TRANSMIT COMPLETION POSTING
   1382					;
   1383					; THIS ROUTINE IS CALLED TO POST A COMPLETION FOR THE FIRST TRANSMIT
   1384					; REQUEST ON THE LINK CONTROL BLOCK TRANSMIT QUEUE.
   1385					;
   1386					; INPUTS:
   1387					;
   1388					;	R0 = FIRST WORD OF I/O STATUS
   1389					;	R1 = SECOND WORD OF I/O STATUS
   1390					;
   1391					;-
   1392
   1393	002752				XMTDN:	CALL	DQXMT		; DEQUE THE FIRST REQUEST
   1394	002756	000416 				BR	RQDON		;
   1395
   1396					;+
   1397					; **-RCVDN-RECEIVE COMPLETION POSTING
   1398					;
   1399					; THIS ROUTINE IS CALLED TO POST A COMPLETION FOR THE FIRST RECEIVE
   1400					; REQUEST ON THE LINK CONTROL BLOCK RECEIVE QUEUE.
   1401					;
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 21-1
SUBROUTINES FOR THE DIRECT LINE CONTROLLER

   1402					; INPUTS:
   1403					;
   1404					;	R0 = FIRST WORD OF I/O STATUS
   1405					;	R1 = SECOND WORD OF I/O STATUS
   1406					;
   1407					;-
   1408
   1409	002760				RCVDN:	CALL	DQRCV		; DEQUEUE A RECEIVE I/O PACKET
   1410	002764	105065 	000004 			CLRB	L.TIM(R5)	; ASSUEM NO MORE REQUESTS
   1411	002770	005765 	000016 			TST	L.RCV(R5)	; ARE THERE ANY MORE ?
   1412	002774	001407 				BEQ	RQDON		; IF EQ, NO - POST COMPLETION
   1413	002776	116565 	000005 	000004 		MOVB	L.TIMI(R5),L.TIM(R5) ; OTHERWISE RESTART THE TIMER
   1414	003004	000403 				BR	RQDON		; POST COMPLETION
   1415
   1416					;+
   1417					; **-ISSUC-RETURN SUCCESSFUL STATUS
   1418					; **-RQALT-RETURN SECOND WORD ZERO
   1419					;
   1420					;
   1421					;-
   1422
   1423	003006	012700 	000000G		ISSUC:	MOV	#IS.SUC,R0	; SET COMPLETEION STATUS
   1424	003012	005001 			RQALT::	CLR	R1		; NO ADDITIONAL STATUS
   1425
   1426					;+
   1427					; **-RQDON-REQUEST AN I/O COMPLETION
   1428					;
   1429					; THIS ROUTINE WILL POST A COMPLETION FOR AN I/O PACKET.
   1430					;
   1431					; INPUTS:
   1432					;
   1433					;	R0 = FIRST WORD OF I/O STATUS
   1434					;	R1 = SECOND WORD OF I/O STATUS
   1435					;	R3 = ADDRESS OF I/O PACKET TO COMPLETE
   1436					;
   1437					;-
   1438
   1439	003014	010546 			RQDON::	MOV	R5,-(SP)	; SAVE R5
   1440	003016	016305 	000000G			MOV	I.UCB(R3),R5	; GET THE UCB ADDRESS
   1441	003022					CALL	$IOFIN		; POST COMPLETION
   1442	003026	012605 				MOV	(SP)+,R5	; RESTORE R5
   1443	003030					RETURN			; RETURN TO CALLER
   1444
   1445
   1446		000001 				.END
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 21-2
SYMBOL TABLE

ABORQ   000456R  	C.FLG2  000032   	FS.XOF= 010000   	L.FLG   000001   	STOPC   002132R
ASSGN = ****** GX	C.FNC   000010   	FS.XON= 007000   	L.FNC   000012   	STPRQ   000472R
ASYER   002052R  	C.LIN   000006   	F$$LVL= 000001   	L.LEN   000020   	STRT  = 000004
A$$CHK= 000000   	C.LNK   000000   	GTLIN   002400R  	L.LIN   000006   	STRTC   002110R
A$$CPS= 000000   	C.MOD   000011   	G$$TPP= 000000   	L.RCV   000016   	S$$WRG= 000000
A$$PRI= 000000   	C.NSP   000004   	G$$TSS= 000000   	L.RSR   000002   	S$$YSZ= 007600
A$$TRP= 000000   	C.RSV   000002   	G$$TTK= 000000   	L.STA   000000   	TASN    000016
BFFLG   000004R  	C.STA   000007   	G$$WRD= 000000   	L.TIM   000004   	TBLEN   000000RG    003
CB.CCB= 000002   	C.STS   000012   	IEABO   002730R  	L.TIMI  000005   	TBLST   000000RG    002
CB.RDB= 000004   	DEASN = ****** GX	IEONP   002736RG 	L.TIP   000003   	TCTL    000002
CCBDN   001616R  	DISRQ   000464R  	IEROR   000152R  	L.XMT   000014   	TDDM    000014
CE.ABO= 100362   	DOFNC   000646R  	IE.ABO= ****** GX	M$$CRB= 000124   	TDLC    000015
CE.DIS= 100366   	DQFNC   002566R  	IE.ALN= ****** GX	M$$CRX= 000000   	TFLG    000006
CE.ERR= 100370   	DQRCV   002602R  	IE.DAO= ****** GX	M$$FCS= 000000   	TLIN    000003
CE.MOP= 100372   	DQXMT   002574R  	IE.DNR= ****** GX	M$$MGE= 000000   	TMOUT   001264R
CE.NTE= 100361   	DSLIN   002472R  	IE.NLN= ****** GX	M$$OVR= 000000   	TNAM    000000
CE.RTE= 100376   	D$$BUG= 177514   	IE.ONP= ****** GX	NXCAN   001236R  	TPDV    000007
CE.SRC= 100364   	D$$ISK= 000000   	IE.RSU= ****** GX	NXCCP = ****** GX	TSLF    000012
CE.TMO= 100374   	D$$L11= 000001   	IE.TMO= ****** GX	NXCLN   000434R  	TSLN    000010
CF.EOM= 000004   	D$$YNC= 000000   	IE.VER= ****** GX	NXCTL = ****** GX	TSTA    000004
CF.HDR= 000020   	D$$YNM= 000000   	ISSUC   003006R  	NXINA   000020R  	T$$KMG= 000000
CF.LB = 100000   	D.BIA   000000   	IS.SUC= ****** GX	NXINI   000016R  	T$$MIN= 000000
CF.SOM= 000010   	ENBLC   002076R  	I$$RAR= 000000   	NXINL   000246R  	U.VCB = ****** GX
CF.SYN= 000040   	ENBX  = 000002   	I$$RDN= 000000   	NXOPN   000212R  	V$$CTR= 001000
CF.TRN= 000100   	E$$XPR= 000000   	I.FCN = ****** GX	NXPWF   001214R  	XMTAB   002646R
CRASH   001262R  	FC.CCP= 000020   	I.LN2 = ****** GX	NXRCV   000710R  	XMTCP   001372R
CS.ABO= 000100   	FC.CTL= 000006   	I.PRM = ****** GX	NXTMO   001236R  	XMTDN   002752R
CS.BUF= 000200   	FC.KCP= 000016   	I.UCB = ****** GX	NXTRM   000414R  	X$$DBT= 000000
CS.DCR= 000400   	FC.KIL= 000004   	KISAR6= ****** GX	NXXMT   001012R  	ZF.DDM= 000001
CS.DEV= 000002   	FC.RCE= 000002   	K$$CNT= 177546   	N$$LDV= 000001   	ZF.DLC= 000002
CS.DIS= 000040   	FC.RCP= 000014   	K$$CSR= 177546   	N$$MOV= 000010   	ZF.KMX= 000020
CS.ENB= 000020   	FC.TIM= 000010   	K$$LDC= 000000   	N$$SYS= 000001   	ZF.LLC= 000004
CS.EOF= 000001   	FC.XCP= 000012   	K$$TPS= 000074   	N$$USR= 000001   	ZF.LMC= 000100
CS.ERR= 100000   	FC.XME= 000000   	LD$LP = 000000   	PRPDB   000002R  	ZF.MFL= 000010
CS.HFE= 002000   	FINDL = ****** GX	LENB  = 000001   	PRPDV   000000RG 	ZF.MUX= 000040
CS.LST= 040000   	FNCAB   002662R  	LF$ABO= 010000   	P$$P45= 000000   	ZF.TIM= 000200
CS.MTL= 004000   	FNDFR = ****** GX	LF$ACT= 040000   	P$$WRD= 000000   	Z.DAT   000014
CS.RNG= 000010   	FS.AST= 000000   	LF$BSY= 070000   	QFNC    002526R  	Z.DSP   000000
CS.ROV= 000004   	FS.CIB= 002000   	LF$ENB= 000400   	QRCV    002542R  	Z.FLG   000011
CS.RSN= 010000   	FS.CRA= 001000   	LF$MOP= 001000   	QXMT    002534R  	Z.LEN = 000014
CS.SUC= 000001   	FS.DIS= 013000   	LF$RSR= 100000   	Q$$OPT= 000010   	Z.LLN   000010
CS.TMO= 020000   	FS.DVC= 001000   	LF$USR= 020000   	RCVAB   002626R  	Z.MAP   000016
CTLCP   001756R  	FS.ENB= 012000   	LR$CTL= 000003   	RCVCP   001426R  	Z.NAM   000006
CTLDN   002744R  	FS.GET= 006000   	LR$DEA= 000200   	RCVDN   002760R  	Z.PCB   000012
CTLEN   001544R  	FS.INI= 000000   	LR$DIS= 000020   	RQALT   003012RG 	Z.SCH   000004
C$$CKP= 000000   	FS.KIL= 000000   	LR$STP= 000010   	RQDON   003014RG 	$CCBGT= ****** GX
C$$ORE= 000400   	FS.LTM= 001000   	LS$DAT= 000004   	RSIDL   000304R  	$CCBRT= ****** GX
C$$RSH= 177564   	FS.MNT= 004000   	LS$ERR= 000010   	RSSTP   000554R  	$CMPDV= ****** GX
C.BID   000003   	FS.MSN= 014000   	LS$IDL= 000001   	RSXMT   001100R  	$DLXTB  001240RG
C.BUF   000014   	FS.RNG= 011000   	LS$RST= 000040   	R$$DER= 000000   	$IOFIN= ****** GX
C.BUF1  000014   	FS.RTN= 001000   	LS$STP= 000020   	R$$K11= 000001   	$LLCRQ= ****** GX
C.BUF2  000024   	FS.SET= 005000   	LS$STR= 000002   	R$$SND= 000000   	$LLCRS= ****** GX
C.CNT   000020   	FS.STM= 000000   	L$$ASG= 000000   	R$$11M= 000000   	$MUL  = ****** GX
C.CNT1  000020   	FS.STP= 002000   	L$$DRV= 000000   	START   001562R  	$MVFBF= ****** GX
C.CNT2  000030   	FS.STR= 001000   	L$$P11= 000001   	STLNA   002336RG 	$NXTBL  000006RG
C.FLG   000022   	FS.TRM= 003000   	L$$11R= 000000   	STLNK   002344RG 	$PDVAD= ****** GX
C.FLG1  000022   	FS.XKL= 002000   	L.ERR   000010   	STOP    001642R  	$PDVTA= ****** GX
NXDRV	MACRO M1110  13-OCT-79 10:31  PAGE 21-3
SYMBOL TABLE

$RDBRT= ****** GX

. ABS.	000034	   000
      	003032	   001
$$DLX 	000000	   002
$$DLXA	000000	   003
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  6555 WORDS  ( 26 PAGES)
DYNAMIC MEMORY:  7948 WORDS  ( 30 PAGES)
ELAPSED TIME:  00:00:53
NXDRV,[131,34]NXDRV/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,[131,10]NXDRV
NXDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:31	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ABORQ 	  000456 R	#7-396      14-939    
ASSGN 	= ******  GX	 17-1159   
ASYER 	  002052 R	 15-970    #15-990    
BFFLG 	  000004 R	#4-134     
CCBDN 	  001616 R	#14-879     14-906     15-1071   
CE.DIS	= 100366	 15-990    
CF.EOM	= 000004	 9-623     
CF.LB 	= 100000	 9-623     
CF.SOM	= 000010	 9-623     
CRASH 	  001262 R	 11-687     11-688     11-689     11-694    #11-697    
CTLCP 	  001756 R	 11-695    #15-958    
CTLDN 	  002744 R	 15-1019    15-1064   #21-1377   
CTLEN 	  001544 R	 11-690    #14-829    
C.BUF 	  000014	*9-617     *9-618      13-807     13-807    
C.CNT 	  000020	*9-619      13-761     13-802     13-804    
C.FLG 	  000022	*9-623     
C.FNC 	  000010	*7-472     *9-626     *14-880    
C.LIN 	  000006	*7-471     *9-625     *14-879     15-958     16-1114   
C.MOD 	  000011	 15-961    
C.NSP 	  000004	*9-601      13-762     14-879    
C.STS 	  000012	 13-760     14-855     14-858    *14-881     14-909     15-964    
DEASN 	= ******  GX	 18-1192   
DISRQ 	  000464 R	#7-403      15-996    
DOFNC 	  000646 R	 6-318      6-329      7-436      7-442     #7-466     
DQFNC 	  002566 R	#20-1259    20-1334    21-1377   
DQRCV 	  002602 R	#20-1265    20-1293    21-1409   
DQXMT 	  002574 R	 9-600     #20-1262    20-1312    21-1393   
DSLIN 	  002472 R	 15-1062   #18-1184   
D.BIA 	  000000	#4-126     
ENBLC 	  002076 R	 15-976    #15-1007   
ENBX  	= 000002	#14-852     14-855    
FC.CCP	= 000020	 14-880    
FC.CTL	= 000006	 6-317      6-323      6-327      7-435      7-441     
FC.XME	= 000000	 9-626     
FINDL 	= ******  GX	 17-1145   
FNCAB 	  002662 R	 7-387      14-937    #20-1329   
FNDFR 	= ******  GX	 17-1156   
FS.DIS	= 013000	 7-441     
FS.ENB	= 012000	 6-317     
FS.MNT	= 004000	 6-327     
FS.STP	= 002000	 7-435     
FS.STR	= 001000	 6-323     
GTLIN 	  002400 R	 6-260     #17-1145   
IEABO 	  002730 R	 5-215      6-337      20-1295    20-1314    20-1335   #21-1350   
IEONP 	  002736 RG	 5-217     #21-1358   
IEROR 	  000152 R	#5-225      6-261     
IE.ABO	= ******  GX	 8-514      9-557      14-904     21-1350   
IE.ALN	= ******  GX	 5-219     
IE.DAO	= ******  GX	 13-790    
IE.DNR	= ******  GX	 8-519      9-550     
IE.NLN	= ******  GX	 5-222     
IE.ONP	= ******  GX	 21-1358   
NXDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:31	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

IE.RSU	= ******  GX	 17-1162   
IE.TMO	= ******  GX	 12-736    
IE.VER	= ******  GX	 8-508     
ISSUC 	  003006 R	 21-1378   #21-1423   
IS.SUC	= ******  GX	 13-805     14-861     21-1423   
I$$AS 	= ******	 3-49      
I.FCN 	= ******  GX	 5-190      5-197      7-380      15-1049    15-1059   
I.LN2 	= ******  GX	 5-201      5-205      5-214      6-266      7-382      14-935     15-1053   
I.PRM 	= ******  GX	 6-271     *6-271      6-308      9-617      9-618      9-619      13-796     13-800     13-801    
I.UCB 	= ******  GX	 15-1051    21-1440   
KISAR6	= ******  GX	*13-796    
LENB  	= 000001	#14-853     14-858     14-909    
LF$ABO	= 010000	#3-90       14-905     14-907     15-1065    15-1067   
LF$ACT	= 040000	#3-88       6-270      14-924     15-992     15-1056    15-1063   
LF$BSY	= 070000	#3-91       17-1151   
LF$ENB	= 000400	#3-86       6-315      6-320      7-413      7-444      14-857     14-860     15-1070   
LF$MOP	= 001000	#3-87       6-324      6-328      13-811    
LF$RSR	= 100000	#3-92       7-466      7-469      9-572      9-599     
LF$USR	= 020000	#3-89       5-208      5-213      14-932    
LR$CTL	= 000003	#3-97      
LR$DEA	= 000200	#3-100      7-383      15-1059   
LR$DIS	= 000020	#3-99       7-386      7-403      7-415      7-439      7-445      14-911    
LR$STP	= 000010	#3-98       7-386      7-403      7-410      7-418      7-433      7-438      14-908    
LS$DAT	= 000004	#3-78       7-416      8-506      9-548      12-725     15-1022   
LS$ERR	= 000010	#3-79       6-292      7-411      8-515      9-553      15-1043   
LS$IDL	= 000001	#3-76       6-269      6-290      8-517      9-551      12-720     15-1007    15-1042   
LS$RST	= 000040	#3-81       6-295      9-545      15-1045    20-1329   
LS$STP	= 000020	#3-80       7-389      7-396      8-517      9-551     
LS$STR	= 000002	#3-77       6-331      7-416      12-720     15-1020   
L.ERR 	  000010	#3-66      *6-302      8-509     *8-511     *13-813    *14-938     15-1068   
L.FLG 	  000001	#3-60       15-1069   
L.FNC 	  000012	#3-67       6-307      14-926     15-1047    15-1077   *15-1078    20-1216    20-1259    20-1336   
                        *20-1337   
L.LEN 	  000020	#3-70       12-740     16-1116   
L.LIN 	  000006	#3-65       7-471      9-625     *16-1120    18-1188   
L.RCV 	  000016	#3-69       13-791     14-930     20-1222    20-1265    21-1411   
L.RSR 	  000002	#3-61      *7-420      7-433     *7-438      7-439     *7-445     *7-470     *15-963     15-1035   
L.STA 	  000000	#3-59      
L.TIM 	  000004	#3-63       8-503     *8-505      12-732    *12-734    *20-1296   *21-1410   *21-1413   
L.TIMI	  000005	#3-64      *6-309      8-505      21-1413   
L.TIP 	  000003	#3-62       7-426      9-555     *9-624     *13-759    
L.XMT 	  000014	#3-68       9-570      14-928     20-1219    20-1262   *20-1336   
M$$EXT	= ******	 3-1        3-2        9-574      13-764    
M$$MGE	= 000000	 13-794     13-807    
NXCAN 	  001236 R	 5-157     #10-665    
NXCCP 	= ******  GX	 15-968    
NXCLN 	  000434 R	 5-227     #7-386     
NXCTL 	= ******  GX	 5-233     
NXINA 	  000020 R	#5-190      15-1082   
NXINI 	  000016 R	 5-156     #5-189     
NXINL 	  000246 R	 5-232     #6-290     
NXOPN 	  000212 R	 5-230     #6-260     
NXDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:31	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

NXPWF 	  001214 R	 5-159     #10-650    
NXRCV 	  000710 R	 5-229     #8-502     
NXTMO 	  001236 R	 5-158     #10-664    
NXTRM 	  000414 R	 5-231     #7-380     
NXXMT 	  001012 R	 5-228     #9-545     
PRPDB 	  000002 R	#4-133     *10-654    
PRPDV 	  000000 RG	#4-132      5-210     *10-653     17-1148    17-1155    18-1184   
QFNC  	  002526 R	 6-294      6-301      7-388      9-565     #20-1216   
QRCV  	  002542 R	 8-502     #20-1222   
QXMT  	  002534 R	 9-547     #20-1219   
RCVAB 	  002626 R	 7-425     #20-1292   
RCVCP 	  001426 R	 11-693    #13-789    
RCVDN 	  002760 R	 8-521      12-738     13-809    #21-1409   
RQALT 	  003012 RG	 5-225      21-1351    21-1359   #21-1424   
RQDON 	  003014 RG	 13-776     21-1394    21-1412    21-1414   #21-1439   
RSIDL 	  000304 R	#6-307      12-722     15-1009   
RSSTP 	  000554 R	#7-433      12-730    
RSXMT 	  001100 R	 9-549     #9-570      9-627      12-727     15-1023   
R$$11D	= ******	 3-49      
R$$11M	= 000000	 3-49      
R$$11S	= ******	 3-49      
START 	  001562 R	 14-833    #14-855    
STLNA 	  002336 RG	#16-1110    17-1150    17-1160   
STLNK 	  002344 RG	 13-758     13-789     14-829     15-960    #16-1113   
STOP  	  001642 R	 14-834    #14-904    
STOPC 	  002132 R	 7-448      15-972     15-977    #15-1034   
STPRQ 	  000472 R	#7-410      15-994    
STRT  	= 000004	#14-851    
STRTC 	  002110 R	 15-971     15-974    #15-1019   
TASN  	  000016	#3-118      17-1148   
TBLEN 	  000000 RG	#4-145      12-741    
TBLST 	  000000 RG	#4-143      12-717     16-1119   
TCTL  	  000002	#3-108     
TDDM  	  000014	#3-116     
TDLC  	  000015	#3-117     
TFLG  	  000006	#3-112     
TLIN  	  000003	#3-109     
TMOUT 	  001264 R	 11-691    #12-717    
TNAM  	  000000	#3-107     
TPDV  	  000007	#3-113     
TSLF  	  000012	#3-115     
TSLN  	  000010	#3-114      17-1158   
TSTA  	  000004	#3-110     
U.VCB 	= ******  GX	 15-1052   
XMTAB 	  002646 R	 7-428      15-1034   #20-1311   
XMTCP 	  001372 R	 11-692    #13-758    
XMTDN 	  002752 R	 9-559     #21-1393   
X$$MCB	= ******	 3-49       3-49      
ZF.DDM	= 000001	#3-49      
ZF.DLC	= 000002	#3-49      
ZF.KMX	= 000020	#3-49      
ZF.LLC	= 000004	#3-49      
NXDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:31	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ZF.LMC	= 000100	#3-49      
ZF.MFL	= 000010	#3-49      
ZF.MUX	= 000040	#3-49      
ZF.TIM	= 000200	#3-49      
Z.DAT 	  000014	#3-49       10-654    
Z.DSP 	  000000	#3-49       3-49      
Z.FLG 	  000011	#3-49      
Z.LEN 	= 000014	#3-49      
Z.LLN 	  000010	#3-49      
Z.MAP 	  000016	#3-49       18-1187   
Z.NAM 	  000006	#3-49      
Z.PCB 	  000012	#3-49      
Z.SCH 	  000004	#3-49      
$CCBGT	= ******  GX	 7-467      9-594     
$CCBRT	= ******  GX	 13-775     15-965    
$CMPDV	= ******  GX	*5-210     
$DLXTB	  001240 RG	#11-687    
$IOFIN	= ******  GX	 21-1441   
$LLCRQ	= ******  GX	 7-473      9-626     
$LLCRS	= ******  GX	 14-882    
$MUL  	= ******  GX	 16-1117   
$MVFBF	= ******  GX	 13-807    
$NXTBL	  000006 RG	#5-156     
$PDVAD	= ******  GX	 10-652    
$PDVTA	= ******  GX	 18-1185   
$RDBRT	= ******  GX	 13-808     13-814    
NXDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:31	PAGE 5

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		 6-260      6-294      6-301      6-318      6-329      7-387      7-388      7-425      7-428      7-436     
                 7-442      7-467      8-502      8-521      9-547      9-559      9-594      9-600      10-652     12-722    
                 12-727     12-730     12-738     13-758     13-775     13-789     13-808     14-829     14-937     15-960    
                 15-965     15-1019    15-1034    15-1062    15-1064    15-1082    16-1117    17-1145    17-1150    17-1156   
                 17-1159    20-1293    20-1295    20-1312    20-1314    20-1334    20-1335    21-1377    21-1393    21-1409   
                 21-1441   
CALLR 		#5-211     #5-215     #5-217     #5-225     #6-337     #7-448     #9-565     #13-776    #13-809    #13-814    
                #14-830    #14-882    #14-939    #15-966    #15-968    #15-994    #15-996    #15-1009   #15-1023   #15-1071   
                #17-1160   #18-1192   
CCBDF$		#3-46      #3-48      
CRASH 		#11-697    
PDVDF$		#3-47       3-49      
RESRG 		#3-45      
RETURN		 6-332      7-446      7-474      8-522      9-560      9-635      10-666     12-743     15-1085    16-1121   
                 17-1164    20-1231    20-1272    20-1275    20-1341    21-1443   
SAVRG 		#3-45      
$MVFBF		#3-44      #13-807    
$MVTBF		#3-44      
$QDLC 		#3-44       7-473      9-626