Google
 

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

     5-  136	NSCHK - I/O REQUEST ENTRY FROM $DRQIO
     8-  307	NETQIO - NETWORK CONTROL PROCESSING (FUNCTION=35)
    10-  380	SNDQIO - SEND DATA MESSAGE PROCESSING (FUNCTION=32)
    11-  450	PROSND - PROCESS SEND QUEUE
    12-  502	PROINT - PROCESS INTERRUPT
    13-  539	XMSEG - TRANSMIT A DATA SEGMENT
    14-  600	XMINT - TRANSMIT AN INTERRUPT
    15-  640	$QXCP - TRANSMIT DATA COMPLETE ENTRY
    16-  707	$QACK - ACK RECEIVED ENTRY
    17-  775	$QNAK - NAK RECEIVED FROM NSP
    18-  817	RECQIO - RECEIVE DATA PROCESSING (FUNCTION=32)
    19-  854	$QDATR - DATA SEGMENT RECEIVED ENTRY
    20-  934	CONQIO - CONNECT/ACCEPT PROCESSING (FUNCTION=33)
    21-  982	DISQIO - DISCONNECT/ABORT/REJECT PROCESSING (FUNCTION=34)
    22- 1032	$QTIMR - TIMER SUPPORT FROM NSP
    23- 1071	GETULA - ALLOCATE USER LINK ADDRESS AND WINDOW BLOCK
    24- 1123	GETLUN - GET I/O REQUEST LOGICAL UNIT NUMBER
    25- 1146	GETWB - GET WINDOW BLOCK ADDRESS
    26- 1169	BUFCHK,BLKLOC - BUFFER CHECKING AND RELOCATION
    27- 1252	BLXIO - MOVE BLOCK OF DATA
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 3


      1						.IF NDF	V$$ER1
      2						.IF NDF	P$$RFL
      3						.TITLE	NSDRV
      4						.IFF
      5						.TITLE	NSDRV2
      6						.ENDC
      7						.IFF
      8						.IF NDF	P$$RFL
      9						.TITLE	NSDRV1
     10						.IFF
     11						.TITLE	NSDRV3
     12						.ENDC
     13						.ENDC
     14						.IDENT	/V01.00/
     15
     16					;
     17					; COPYRIGHT (C) 1978 BY
     18					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
     19					;
     20					;
     21					; THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY BE USED AND  COPIED
     22					; ONLY  IN  ACCORDANCE  WITH  THE  TERMS  OF  SUCH  LICENSE AND WITH THE
     23					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE OR  ANY  OTHER
     24					; COPIES  THEREOF MAY NOT BE PROVIDED OR OTHERWISE MADE AVAILABLE TO ANY
     25					; OTHER PERSON.  NO TITLE TO AND OWNERSHIP OF  THE  SOFTWARE  IS  HEREBY
     26					; TRANSFERRED.
     27					;
     28					; THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE  WITHOUT  NOTICE
     29					; AND  SHOULD  NOT  BE  CONSTRUED  AS  A COMMITMENT BY DIGITAL EQUIPMENT
     30					; CORPORATION.
     31					;
     32					; DIGITAL ASSUMES NO RESPONSIBILITY FOR THE USE OR  RELIABILITY  OF  ITS
     33					; SOFTWARE ON EQUIPMENT WHICH IS NOT SUPPLIED BY DIGITAL.
     34					;
     35					;
     36					; MODULE DESCRIPTION:
     37					;
     38					;	NETWORK DEVICE DRIVER
     39					;
     40					;
     41					; DISTRIBUTED SYSTEMS SOFTWARE ENGINEERING
     42					;
     43					; IDENT HISTORY:
     44					;
     45					; 1.00	10-FEB-78
     46					;	VERSION 2.0 RELEASE
     47					;
     48
     49					; MACRO LIBRARY CALLS
     50					;
     51
     52						.MCALL	MAP
     53
     54						.MCALL	MBXDF$,LLWDF$,DVBDF$
     55	000000					MBXDF$			;DEFINE TASK MAILBOX BLOCK OFFSETS
     56	000000					LLWDF$			;   "   LOGICAL LINK WINDOW BLOCK OFFSETS
     57	000000					DVBDF$			;   "   VOLUME CONTROL BLOCK OFFSETS
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 3-1


     58
     59						.MCALL	CRBDF$,CNBDF$,NSSYM$
     60	000000					CRBDF$			;DEFINE REQUEST DESCRIPTOR BLOCK OFFSETS
     61	000000					CNBDF$			;   "   CONNECT PENDING BLOCK OFFSETS
     62	000000					NSSYM$			;   "   DEVICE RETURN VALUES
     63
     64						.MCALL	CCBDF$,NSPSY$
     65	000000					CCBDF$			;DEFINE COMMUNICATION CONTROL BLOCK OFFSETS
     66	000000					NSPSY$			;   "   NSP PARAMETER VALUES
     67
     68						.IF DF	V$$ER1
     69
     70						.MCALL	COMDF$		;DEFINE V1 LLB OFFSETS AND CONSTANTS
     71						COMDF$			;
     72
     73						.ENDC
     74
     75					;
     76					; LOCAL MACRO DEFINITIONS
     77					;
     78					;
     79					; PUSH AND POP STACK INTRUCTIONS
     80					;
     81
     82						.MACRO	PUSH	S
     83						.IRP	SS,<S>
     84						MOV	SS,-(SP)
     85						.ENDR
     86						.ENDM	PUSH
     87
     88						.MACRO	POP	D
     89						.IRP	DD,<D>
     90						MOV	(SP)+,DD
     91						.ENDR
     92						.ENDM	POP
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 4


     94					;
     95					; LOCAL DATA
     96					;
     97					;
     98					; DRIVER DISPATCH TABLE
     99					;
    100
    101	000000	000024'			$NSTBL::.WORD	NSCHK		;INITIALIZATION
    102	000002	000160'				.WORD	NSCAN		;I/O CANCELLATION
    103	000004	000160'				.WORD	NSTMO		;TIMEOUT
    104	000006	000160'				.WORD	NSPWR		;POWER FAIL RECOVERY
    105
    106					;
    107					; INTERFACE DATA BASE POINTER FILLED IN FROM THE ACP ON MOUNT
    108					;
    109
    110	000010				$NSDBP::			;GLOBAL REFERENCE LABEL
    111	000010	000000 			NSULT:	.WORD	0		;USER LINK TABLE ADDRESS
    112
    113					;
    114					; QIO FUNCTION DISPATCH TABLE  (VERSION 2 INTERFACE)
    115					;
    116
    117	000012	000360'			DISP:	.WORD	SNDQIO		;SND/XMI	(FC=31)
    118	000014	001662'				.WORD	RECQIO		;REC		(FC=32)
    119	000016	002174'				.WORD	CONQIO		;CON/ACC	(FC=33)
    120	000020	002342'				.WORD	DISQIO		;DIS/ABT/REJ	(FC=34)
    121	000022	000162'				.WORD	NETQIO		;OPN/CLS/SPA/GND(FC=35)
    122
    123						.IF DF	V$$ER1
    124					;
    125					; QIO FUNCTION DISPATCH TABLE  (VERSION 1 COMPATIBLE INTERFACE)
    126					;
    127
    128					V1DISP:	.WORD	SNDQIO		;TRANSMIT		(FC=31)
    129						.WORD	RECQIO		;RECEIVE		(FC=32)
    130						.WORD	V1CONQ		;CONNECT/ACCEPT/REJECT	(FC=33)
    131						.WORD	V1DISQ		;DISCONNECT		(FC=34)
    132						.WORD	V1CTLQ		;CONTROL		(FC=35)
    133
    134						.ENDC
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 5
NSCHK - I/O REQUEST ENTRY FROM $DRQIO

    136					.SBTTL NSCHK - I/O REQUEST ENTRY FROM $DRQIO
    137
    138					;+
    139					; ** - NSCHK - DECNET INTERFACE PARAMETER CHECKING
    140					;
    141					; THIS ROUTINE IS ENTERED FROM THE QUEUE I/O DIRECTIVE WHEN AN
    142					; I/O REQUEST IS RECEIVED FOR THE NETWORK INTERTASK INTERFACE.
    143					; NETWORK REQUESTS MUST BE VALIDATED AND PARAMETERS CHECKED IN THE
    144					; CONTEXT OF THE ISSUEING TASK.  THEREFORE THE I/O REQUEST IS NOT
    145					; QUEUED BEFORE CALLING THE DRIVER.
    146					;
    147					; INPUTS:
    148					;
    149					;	R1 -> I/O PACKET
    150					;	R4 -> STATUS CONTROL BLOCK
    151					;	R5 -> UNIT CONTROL BLOCK
    152					;
    153					; OUTPUTS:
    154					;
    155					;	R0 = PRIVILEGE ERROR STATUS (IE.PRI)
    156					;	R1 -> I/O PACKET
    157					;	R4 -> REQUESTING TASK HEADER
    158					;	R5 -> UNIT CONTROL BLOCK
    159					;
    160					;	THE REQUEST IS DISPATCHED TO FUNCTION DEPENDENT PROCESSING
    161					;	FOR NETWORK ACCESS AND ADDRESS CHECKING.  SOME OF THE
    162					;	FUNCTIONS WILL COMPLETE IN THE DRIVER; OTHERS WILL GET
    163					;	DISPATCHED TO THE NETWORK ACP FOR FURTHER PROCESSING.
    164					;-
    165
    166	000024				NSCHK:	PUSH	R1		;SAVE I/O PACKET ADDRESS
    167
    168	000026	012767 	000000G	000000G		MOV	#PD$NSP,$CMPDV	;SET NSP AS THE CURRENT PROCESS
    169
    170	000034	116103 	000001G			MOVB	I.FCN+1(R1),R3	;GET FUNCTION CODE
    171	000040	162703 	000007 			SUB	#7,R3		;CODES <=7 ?
    172	000044	003436 				BLE	NSQUE		;IF LE, YES - JUST QUEUE TO ACP
    173	000046	162703 	000022 			SUB	#22,R3		;BIAS CODE 31 TO 0
    174	000052	006303 				ASL	R3		;MAKE WORD OFFSET AND SAVE
    175
    176	000054	012700 	000000C			MOV	#IE.PRI&377,R0	;ASSUME PRIVILEGE ERROR
    177	000060	016704 	000000G			MOV	$HEADR,R4	;GET REQUESTING TASK HEADER ADDRESS
    178
    179						.IF DF	V$$ER1
    180
    181						MOV	$TKTCB,R2	;GET TASK'S TCB ADDRESS
    182						BIT 	#T3.NET,T.ST3(R2) ;VERSION 1 OR VERSION 2 INTERFACE?
    183						BEQ	5$		;IF EQ, VERSION 2
    184						JMP	@V1DISP(R3)	;DISPATCH TO PROPER PROCESSING ROUTINE
    185					5$:				;FOR VERSION 1 COMPATIBLE INTERFACE
    186						.ENDC
    187
    188	000064	105764 	000000G			TSTB	H.NML(R4)	;NETWORK ACCESSED YET ?
    189	000070	001405 				BEQ	10$		;IF EQ, NO
    190
    191	000072	022761 	016400 	000000G		CMP	#<35*400>,I.FCN(R1) ;IS THIS AN OPN ?
    192	000100	001411 				BEQ	IECMN		;IF EQ, CAN'T ACCESS NETWORK AGAIN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 5-1
NSCHK - I/O REQUEST ENTRY FROM $DRQIO

    193	000102	000406 				BR	20$		;ELSE, CONTINUE PROCESSING
    194
    195	000104	012700 	000260 		10$:	MOV	#IE.NNT&377,R0	;ASSUME NOT A NETWORK TASK
    196	000110	022761 	016400 	000000G		CMP	#<35*400>,I.FCN(R1) ;IS THIS AN OPN ?
    197	000116	001002 				BNE	IECMN		;IF NE, MUST DO OPN FIRST
    198
    199	000120	000173 	000012'		20$:	JMP	@DISP(R3)	;DISPATCH TO INDIVIDUAL PROCESSING
    200
    201					;
    202					; COMMON I/O REQUEST PROCESSING
    203					;
    204					; INPUTS:
    205					;
    206					;	R0 = ERROR/COMPLETION STATUS WORD
    207					;	R1 = SECOND STATUS WORD (ISSUC ONLY)
    208					;	R5 -> UNIT CONTROL BLOCK
    209					;	(SP) -> I/O PACKET
    210					;
    211					; OUTPUT:
    212					;
    213					;	I/O REQUEST IS COMPLETED AND CONTROL RETURNED BACK
    214					;	TO QUEUE I/O DIRECTIVE.  ANY LUN INTERLOCK IS CLEARED.
    215					;
    216
    217	000124	005001 			IECMN::	CLR	R1		;CLEAR SECOND STATUS WORD
    218	000126				ISSUC:	POP	R3		;RESTORE I/O PACKET ADDRESS
    219	000130	042773 	000001 	000000G		BIC	#1,@I.LN2(R3)	;REMOVE ANY ACCESS INTERLOCK
    220
    221						.IF DF	V$$ER1
    222
    223						CALL	STLNS		;STORE THE LUN IN THE COMPLETION STATUS
    224
    225						.ENDC
    226
    227	000136					CALLR	$IOFIN		;FINISH I/O REQUEST AND RETURN
    228
    229					;
    230					; THIS CODE IS ENTERED TO QUEUE THE I/O REQUEST TO THE NETWORK
    231					; DEVICE AND TO FORCE ITS DISPATCHING TO THE NETWORK ACP.
    232					;
    233					; INPUT:
    234					;
    235					;	R1 -> I/O PACKET
    236					;	R5 -> UNIT CONTROL BLOCK
    237					;
    238					; OUTPUT:
    239					;
    240					;	NO PACKETS SHOULD BE RETURNED FROM $GTPKT SINCE ALL
    241					;	FUNCTIONS ARE QUEUED TO THE ACP.
    242					;
    243
    244	000142				NSQUE::	POP	R1		;GET ADDRESS OF I/O PACKET
    245	000144	016500 	000000G			MOV	U.SCB(R5),R0	;SET ADDRESS OF I/O QUEUE LISTHEAD
    246	000150					CALL	$QINSP		;INSERT I/O PACKET IN REQUEST QUEUE
    247	000154					CALLR	$GTPKT		;FORCE I/O PACKET QUEUEING TO ACP AND RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 6
NSCHK - I/O REQUEST ENTRY FROM $DRQIO

    249					;
    250					; POWER FAIL RECOVERY
    251					;
    252					; THIS ENTRY IS CALLED BY THE EXEC WHEN POWER IS RESTORED TO THE SYSTEM.
    253					; THE COMM EXEC POWER RECOVERY FLAG IS SET TO MINUS ONE IF THE NETWORK ACP
    254					; HAS BEEN INITIALIZED.  OTHERWISE THE FLAG IS LEFT ALONE.
    255					;
    256
    257	000160				NSPWR:				;REFERENCE LABEL
    258						.IF DF	P$$RFL
    259
    260						MOV	$NSDDB,R0	;GET THE ADDRESS OF THE DATA DESCRIPTOR BLOCK
    261						TST	N$TCB(R0)	;HAS THE ACP INITIALIZED YET ?
    262						BEQ	10$		;IF EQ, NO - DON'T MODIFIY THE FLAG
    263						MOV	#-1,$PWRF1	;ELSE, SET COMM EXEC FLAG TO START RECOVERY
    264					10$:				;REFERENCE LABEL
    265						.ENDC
    266
    267					;
    268					; DUMMY DRIVER ENTRIES
    269					;
    270	000160				NSTMO:				;NONE OF THESE ENTRIES ARE USED
    271	000160				NSCAN:	RETURN			;JUST EXIT
    272
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 7
NSCHK - I/O REQUEST ENTRY FROM $DRQIO

    274					;+
    275					; **-STLNS-STORE LUN IN COMPLETION STATUS
    276					;
    277					; INPUTS:
    278					;
    279					;	R0 = FIRST WORD OF I/O COMPLETION STATUS (HIGH BYTE ZERO)
    280					;	R3 = ADDRESS OF THE I/O PACKET
    281					;
    282					; OUTPUTS:
    283					;
    284					;	FOR VERSION 1 COMPATIBLE LINKS, THE USER LUN IS STORED IN THE
    285					;	HIGH BYTE OF THE FIRST WORD OF THE I/O COMPLETION STATUS.
    286					;
    287					; 	R2 & R4 ARE MODIFIED
    288					;-
    289						.IF DF	V$$ER1
    290
    291					STLNS:	MOV	I.TCB(R3),R2	;GET TCB ADDRESS
    292						BIT	#T3.NET,T.ST3(R2) ;IS THIS A VERSION 1 LINK ?
    293						BEQ	10$		;IF EQ, NO - EXIT
    294						MOV	T.PCB(R2),R2	;LINK THROUGH TO GET THE TASK HEADER
    295						MOV	P.HDR(R2),R2	;...
    296						MOV	I.LN2(R3),R4	;GET THE ADDRESS OF THE SECOND LUN WORD
    297						SUB	R2,R4		;COMPUTE THE LUN NUMBER BY SUBTRACTING THE
    298						SUB	#H.LUN-2,R4	;...BASE OF THE LUN TABLE AND DIVIDING BY
    299						ASR	R4		;...FOUR
    300						ASR	R4		;...
    301						SWAB	R4		;PUT THE LUN IN THE HIGH BYTE
    302						BIS	R4,R0		;...AND MERGE IT WITH THE STATUS
    303					10$:	RETURN			;RETURN TO CALLER
    304
    305						.ENDC
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 8
NETQIO - NETWORK CONTROL PROCESSING (FUNCTION=35)

    307					.SBTTL NETQIO - NETWORK CONTROL PROCESSING (FUNCTION=35)
    308
    309					;
    310					; NETWORK ACCESS QIO FUNCTIONS PROCESSING
    311					;
    312					; INPUT:
    313					;
    314					;	R0 = PRIVILEGE ERROR STATUS (IE.PRI)
    315					;	R1 -> I/O PACKET
    316					;	R4 -> REQUESTING TASK HEADER
    317					;	R5 -> UNIT CONTROL BLOCK
    318					;
    319
    320						.ENABL	LSB
    321	000162				NETQIO::CALL	GETLUN		;GET I/O REQUEST LUN
    322
    323	000166	105761 	000000G			TSTB	I.FCN(R1)	;IS THIS OPN ?
    324	000172	001022 				BNE	CLS		;IF NE, MUST BE CLS, SPA ,GND OR GLN
    325
    326	000174	132765 	000000G	000000G		BITB	#US.MDM,U.STS(R5) ;VOLUME MARKED FOR DISMOUNT ?
    327	000202	001062 				BNE	60$		;IF NE, YES - PRIVILEGE ERROR
    328
    329	000204	012701 	000016 			MOV	#M.MBL,R1	;SET MAILBOX LENGTH
    330	000210					CALL	$ALOCB		;ALLOCATE MAILBOX BLOCK
    331	000214	103003 				BCC	10$		;IF CC, ALLOCATION SUCCESSFUL
    332	000216	012700 	000000C			MOV	#IE.RSU&377,R0	;ELSE,  RESOURCE ERROR
    333	000222	000452 				BR	60$
    334
    335	000224	011601 			10$:	MOV	(SP),R1		;RECOVER I/O PACKET ADDRESS
    336	000226	010071 	000000G			MOV	R0,@I.LN2(R1)	;OPEN LUN WITH MAILBOX
    337	000232	110364 	000000G			MOVB	R3,H.NML(R4)	;SET AS NETWORK LUN IN TASK HEADER
    338	000236	000407 				BR	20$		;FINISH PROCESSING
    339
    340	000240	120364 	000000G		CLS:	CMPB	R3,H.NML(R4)	;THIS LUN SAME AS NETWORK LUN ?
    341	000244	001041 				BNE	60$		;IF NE, NO - PRIVILEGE ERROR
    342
    343	000246	126127 	000000G	000010 		CMPB	I.FCN(R1),#010	;IS THIS CLOSE ?
    344	000254	001003 				BNE	GND		;IF NE, NO - MUST BE SPA, GND OR GLN
    345
    346	000256	005271 	000000G		20$:	INC	@I.LN2(R1)	;INTERLOCK LUN
    347	000262	000434 				BR	70$		;GO QUEUE REQUEST
    348
    349					;
    350					; NODE AND NETWORK DATA FUNCTIONS PROCESSING
    351					;
    352
    353	000264	126127 	000000G	000020 	GND:	CMPB	I.FCN(R1),#020	;IS THIS SPECIFY NETWORK AST ?
    354	000272	001430 				BEQ	70$		;IF EQ, YES - JUST QUEUE REQUEST
    355
    356	000274	016161 	000004G	000006G		MOV	I.PRM+4(R1),I.PRM+6(R1) ;COPY MASK PARAMETER
    357	000302	126127 	000000G	000040 		CMPB	I.FCN(R1),#040	;IS THIS LENGTH AND TYPE ONLY ?
    358	000310	001421 				BEQ	70$		;IF EQ, YES - JUST QUEUE REQUEST
    359									;ELSE, VALIDATE AND MAP BUFFER ADDRESS
    360	000312	062701 	000000G			ADD	#I.PRM,R1	;POINT TO BUFFER MAPPING PARAMETER
    361	000316	010103 				MOV	R1,R3		;COPY ADDRESS OF PARAMETER
    362	000320	012100 				MOV	(R1)+,R0	;GET BUFFER ADDRESS
    363	000322	001402 				BEQ	40$		;IF EQ, BAD ADDRESS
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 8-1
NETQIO - NETWORK CONTROL PROCESSING (FUNCTION=35)

    364	000324	011101 				MOV	(R1),R1		;GET BUFFER LENGTH
    365	000326	001003 				BNE	50$		;IF NE, VALID SIZE
    366
    367	000330	012700 	000000C		40$:	MOV	#IE.BAD&377,R0	;ELSE, BAD PARAMETER STATUS
    368	000334	000405 				BR	60$		;GO FINISH I/O ERROR
    369
    370	000336	010163 	000004 		50$:	MOV	R1,4(R3)	;COPY BLOCK SIZE IN I/O PACKET
    371	000342					CALL	BLKLOC		;RELOCATE (AND VALIDATE) BLOCK ADDRESS
    372	000346	103002 				BCC	70$		;IF CC, QUEUE REQUEST TO ACP
    373
    374	000350	000167 	177550 		60$:	JMP	IECMN		;FINISH ERROR PROCESSING
    375
    376	000354	000167 	177562 		70$:	JMP	NSQUE		;QUEUE REQUEST TO ACP
    377						.DSABL	LSB
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 10
SNDQIO - SEND DATA MESSAGE PROCESSING (FUNCTION=32)

    380					.SBTTL SNDQIO - SEND DATA MESSAGE PROCESSING (FUNCTION=32)
    381
    382					;
    383					; SEND DATA QIO PROCESSING
    384					;
    385					; INPUTS:
    386					;
    387					;	R0 = PRIVILEGE ERROR STATUS (IE.PRI)
    388					;	R1 -> I/O PACKET
    389					;	R4 -> REQUESTING TASK HEADER
    390					;	R5 -> UNIT CONTROL BLOCK
    391					;
    392
    393	000360	017103 	000000G		SNDQIO::MOV	@I.LN2(R1),R3	;GET WINDOW BLOCK ADDRESS
    394	000364	132763 	000100 	000004 		BITB	#WS.DIP,W.STAT(R3) ;REMOTE DISCONNECT IN PROGRESS ?
    395	000372	001072 				BNE	70$		;IF NE, YES - COMPLETE I/O REQUEST
    396
    397	000374	005011 				CLR	(R1)		;CLEAR LINK WORD IN I/O PACKET
    398
    399						.IF DF	V$$ER1
    400						BITB	#WS.VE1,W.STAT(R3) ;VERSION 1 OR VERSION 2 INTERFACE?
    401						BEQ	10$		;IF EQ, VERSION 2
    402						CMP	I.PRM+6(R1),#NT.IN ;IS THIS AN INTERRUPT MESSAGE?
    403						BNE	20$		;IF NE, NO NORMAL DATA TRANSMISSION
    404						BR	50$		;OTHERWISE IT'S AN INTERRUPT MESSAGE
    405						.ENDC
    406
    407	000376	105761 	000000G		10$:	TSTB	I.FCN(R1)	;IS THIS A DATA MESSAGE ?
    408	000402	001040 				BNE	40$		;IF NE, MUST BE AN INTERRUPT MESSAGE
    409									;SETUP TRANSMIT CONTEXT IN I/O PACKET
    410	000404	005061 	000006G		20$:	CLR	I.PRM+6(R1)	; CLEAR BUFFER OFFSET FOR NEXT TRANSMISSION
    411	000410	016161 	000004G	000010G		MOV	I.PRM+4(R1),I.PRM+10(R1) ; COPY COUNT AS REMAINING BYTE COUNT
    412	000416	005061 	000012G			CLR	I.PRM+12(R1)	; CLEAR BUFFER OFFSET FOR NEXT ACK
    413	000422	016100 	000004G			MOV	I.PRM+4(R1),R0	;GET MESSAGE SIZE
    414	000426	022700 	017700 			CMP	#8128.,R0	;IS THE MESSAGE SIZE WITHIN RANGE ?
    415	000432	103447 				BLO	60$		;IF LO, NO - RETURN ERROR
    416	000434	016301 	000012 			MOV	W.SEGZ(R3),R1	;GET SEGMENT SIZE
    417	000440					CALL	$DIV		;DIVIDE MESSAGE BY SEGMENT SIZE
    418	000444	005701 				TST	R1		;ANY PARTIAL SEGMENT ?
    419	000446	001401 				BEQ	30$		;IF EQ, NO - EVEN MULTIPLE OF SEGMENT SIZE
    420	000450	005200 				INC	R0		;ELSE, ONE PARTIAL SEGMENT
    421	000452				30$:	POP	R1		;RECOVER I/O PACKET ADDRESS
    422	000454	010061 	000016G			MOV	R0,I.PRM+16(R1)	; SET NUMBER OF SEGMENTS FOR THIS MESSAGE
    423	000460	010173 	000024 			MOV	R1,@W.SNDQ+2(R3) ;ADD I/O PACKET TO END OF
    424	000464	010163 	000024 			MOV	R1,W.SNDQ+2(R3)	; SEND I/O PACKET QUEUE
    425	000470	005763 	000020 			TST	W.CSND(R3)	;ANY CURRENT I/O PACKET ?
    426	000474	001041 				BNE	PROSND		;IF NE, YES - TRY TO SEND DATA
    427	000476	010163 	000020 			MOV	R1,W.CSND(R3)	;ELSE, SET THIS PACKET AS CURRENT AND
    428	000502	000436 				BR	PROSND		; TRY TO SEND DATA
    429
    430	000504	022761 	000020 	000004G	40$:	CMP	#16.,I.PRM+4(R1) ;IS THE INTERRUPT LENGTH WITHIN RANGE ?
    431	000512	103417 				BLO	60$		 ;IF LO, NO - RETURN ERROR
    432	000514	012700 	000000C			MOV	#IE.WLK&377,R0	;ASSUME AN INTERRUPT OUTSTANDING
    433	000520	005763 	000034 			TST	W.INTQ(R3)	;IS THERE AN INTERRUPT ALREADY ?
    434	000524	001017 				BNE	80$		;IF NE, YES - RETURN ASSUMED ERROR
    435
    436	000526	011673 	000036 		50$:	MOV	(SP),@W.INTQ+2(R3) ;PUT I/O PACKET ON INTERRUPT QUEUE
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 10-1
SNDQIO - SEND DATA MESSAGE PROCESSING (FUNCTION=32)

    437	000532	012663 	000036 			MOV	(SP)+,W.INTQ+2(R3) ;...AND CLEAN THE STACK
    438	000536	005763 	000032 			TST	W.CINT(R3)	;IS THERE A CURRENT INTERRUPT ?
    439	000542	001060 				BNE	PROINT		;IF NE, YES - TRY TO SEND IT
    440	000544	010163 	000032 			MOV	R1,W.CINT(R3)	;OTHERWISE MAKE THIS PACKET CURRENT
    441	000550	000455 				BR	PROINT		;GO TRY TO SEND INTERRUPT MESSAGE
    442
    443	000552	012700 	000000C		60$:	MOV	#IE.SPC&377,R0	;SET INVALID BUFFER PARAMETERS ERROR
    444	000556	000402 				BR	80$		;
    445
    446	000560	012700 	000000C		70$:	MOV	#IE.ABO&377,R0	;SET LINK DISCONNECTING ERROR
    447
    448	000564				80$:	CALLR	IECMN		;FINISH I/O ERROR PROCESSING
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 11
PROSND - PROCESS SEND QUEUE

    450					.SBTTL PROSND - PROCESS SEND QUEUE
    451
    452					;
    453					; ** - $QBPC - BACK-PRESSURE INDICATION RECEIVED ENTRY FROM NSP
    454					;
    455					; ONE OF THE CONDITIONS WHICH CAN BLOCK TRANSMISSION OF DATA A LOGICAL
    456					; LINK HAS CHANGED TO A STATE WHICH WOULD NOT BLOCK TRANSMISSION.
    457					; IF THERE ARE SEGMENTS WAITING TO BE TRANSMITTED, BUFFERS AVAILABLE
    458					; AND NOT TOO MANY SEGMENTS ALREADY OUTSTANDING, 'SNDCK' SHOULD BE CALLED
    459					; TO CHECK IF TRANSMISSION CAN BE INITIATED.
    460					;
    461					;
    462					; INPUT:
    463					;
    464					;	R3 = USER LINK ADDRESS (INDEX)
    465					;
    466
    467	000570	004567 	000000G		$QBPC::	JSR	R5,$REGSV	;SAVE ALL THE REGISTERS  (CO-ROUTINE)
    468	000574					CALL	GETWB1		;GET WINDOW BLOCK ADDRESS
    469
    470					;
    471					; PROSND - PROCESS WINDOW BLOCK SEND QUEUE
    472					;
    473					; INPUT:
    474					;
    475					;	R3 -> WINDOW BLOCK
    476					;
    477					; OUTPUT:
    478					;
    479					;	R3 IS PRESERVED.
    480					;
    481
    482	000600				PROSND:				;REFERENCE LABEL
    483	000600	005763 	000020 		10$:	TST	W.CSND(R3)	;ANY DATA TO SEND ?
    484	000604	001432 				BEQ	30$		;IF EQ, NO - EXIT
    485	000606	005000 				CLR	R0		;OTHERWISE, GET THE LLA
    486	000610	156300 	000010 			BISB	W.LLA(R3),R0	;...
    487	000614					CALL	SNDCK		;AND SEE IF IT'S OK TO TRANSMIT ?
    488	000620	103424 				BCS	30$		;IF CS, NO - IT WILL GO LATER
    489	000622	142763 	000020 	000004 		BICB	#WS.STA,W.STAT(R3) ;ASSUME NO TRANSMIT CCB'S REQUIRED
    490	000630	126367 	000006 	000000G		CMPB	W.CCBU(R3),$XMTBF ;BUFFERING AT MAX LEVEL ?
    491	000636	001415 				BEQ	30$		;IF EQ, YES - NOTHING TO DO NOW
    492	000640					CALL	$LDBGT		;GET LARGE DATA BUFFER
    493	000644	103405 				BCS	20$		;IF CS, ALLOCATION FAILURE
    494	000646	105263 	000006 			INCB	W.CCBU(R3)	;INCREMENT TRANSMIT CCB'S IN USE COUNT
    495	000652					CALL	XMSEG		;TRANSMIT SEGMENT
    496	000656	000750 				BR	10$		;SEE IF THERE ARE MORE SEGMENTS
    497
    498	000660				20$:	CALL	CTRES		;COUNT THE ALLOCATION FAILURE
    499	000664	152763 	000020 	000004 		BISB	#WS.STA,W.STAT(R3) ;SET TRANSMIT CCB REQUIRED
    500	000672				30$:	RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 12
PROINT - PROCESS INTERRUPT

    502					.SBTTL PROINT - PROCESS INTERRUPT
    503
    504					;
    505					; $QIFC - PROCESS INTERRUPT FLOW CONTROL CHANGE
    506					;
    507					; INPUTS:
    508					;
    509					;	R3 = USER LINK ADDRESS  (INDEX)
    510					;
    511
    512	000674	004567 	000000G		$QIFC::	JSR	R5,$REGSV	;SAVE ALL THE REGISTERS  (CO-ROUTINE)
    513	000700					CALL	GETWB1		;GET THE ADDRESS OF THE WINDOW BLOCK
    514
    515					;
    516					; PROINT - PROCESS WINDOW BLOCK INTERRUPT
    517					;
    518					; INPUT:
    519					;
    520					;	R3 -> WINDOW BLOCK
    521					;
    522					; OUTPUT:
    523					;
    524					;	R3 IS PRESERVED.
    525					;
    526
    527	000704	005763 	000032 		PROINT:	TST	W.CINT(R3)	;IS THERE ANY INTERRUPT TO SEND ?
    528	000710	001416 				BEQ	20$		;IF EQ, NO - JUST EXIT
    529	000712	142763 	000040 	000004 		BICB	#WS.INT,W.STAT(R3) ;ASSUME NO INTERRUPT CCB REQUIRED
    530	000720					CALL	GETSMS		;ALLOCATE A MESSAGE BUFFER FOR INTERRUPT
    531	000724	103405 				BCS	10$		;IF CS, ALLOCATION FAILURE - MARK ERROR
    532	000726					CALL	XMINT		;TRANSMIT INTERRUPT
    533	000732	103005 				BCC	20$		;IF CC, INTERRUPT WAS TRANSMITTED - EXIT
    534	000734					CALLR	RLSBUF		;ELSE, DEALLOCATE THE MESSAGE BUFFER AND RETURN
    535
    536	000740	152763 	000040 	000004 	10$:	BISB	#WS.INT,W.STAT(R3) ;SET INTERRUPT CCB NEEDED
    537	000746				20$:	RETURN			;RETURN TO CALLER
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 13
XMSEG - TRANSMIT A DATA SEGMENT

    539					.SBTTL XMSEG - TRANSMIT A DATA SEGMENT
    540
    541					;
    542					; XMSEG - SEGMENT DATA MESSAGE AND TRANSMIT
    543					;
    544					; INPUT:
    545					;
    546					;	R3 -> LOGICAL LINK WINDOW BLOCK
    547					;	R4 -> CCB
    548					;
    549					; OUTPUT:
    550					;
    551					;	R3 IS PRESERVED.
    552					;
    553
    554	000750				XMSEG:	PUSH	R3		;SAVE WINDOW BLOCK ADDRESS
    555	000752	116364 	000010 	000006 		MOVB	W.LLA(R3),C.LIN(R4) ;SET LLA FOR THIS LINK IN CCB
    556	000760	016301 	000020 			MOV	W.CSND(R3),R1	;GET CURRENT SEND I/O PACKET
    557	000764	005000 				CLR	R0		;ASSUME 'MIDDLE OF MESSAGE' SEGEMENT STATUS
    558	000766	005761 	000006G			TST	I.PRM+6(R1)	;IS CURRENT OFFSET BEGINNING OF BUFFER ?
    559	000772	001002 				BNE	10$		;IF NE, NO - ASSUMTION IS CORRECT SO FAR
    560	000774	012700 	000040 			MOV	#NT.BOM,R0	;SET 'BEGINNING OF MESSAGE' SEGMENT STATUS
    561	001000	016302 	000012 		10$:	MOV	W.SEGZ(R3),R2	;GET SEGMENT SIZE FOR THIS LINK
    562	001004	026102 	000010G			CMP	I.PRM+10(R1),R2	;IS THERE AT LEAST A WHOLE SEGMENT LEFT
    563	001010	103002 				BHIS	20$		;IF HIS, YES
    564	001012	016102 	000010G			MOV	I.PRM+10(R1),R2	;ELSE, USE REMAINING COUNT AS PARTIAL SEGMENT
    565	001016	010264 	000020 		20$:	MOV	R2,C.CNT(R4)	;SET SEGMENT SIZE IN CCB
    566	001022	160261 	000010G			SUB	R2,I.PRM+10(R1)	;ADJUST COUNT REMAINING
    567	001026	001004 				BNE	30$		;IF NE, STILL MORE DATA LEFT IN MESSAGE
    568	001030	011163 	000020 			MOV	(R1),W.CSND(R3)	;ELSE, SET NEXT PACKET AS CURRENT
    569	001034	052700 	000100 			BIS	#NT.EOM,R0	;THEN THIS MUST BE END OF MESSAGE OR SINGLE
    570									; SEGMENT MESSAGE
    571	001040				30$:	PUSH	<R1,R0>		;SAVE I/O PACKET ADDRESS AND SEGMENT STATUS
    572	001044	010405 				MOV	R4,R5		;CHANGE REGISTER CONVENTIONS
    573	001046	016500 	000020 			MOV	C.CNT(R5),R0	;GET NUMBER OF BYTES TO TRANSFER
    574	001052	016102 	000002G			MOV	I.PRM+2(R1),R2	;GET SOURCE ADDRESS (DISPLACEMENT) AND
    575	001056	066102 	000006G			ADD	I.PRM+6(R1),R2	; ADD OFFSET
    576	001062	060061 	000006G			ADD	R0,I.PRM+6(R1)	;ADJUST CURRENT BUFFER OFFSET
    577	001066	062765 	000030 	000016 		ADD	#N$$DAT,C.BUF+2(R5) ;ALLOW FOR NSP HEADER IN DESTINATION BUFFER
    578	001074	016504 	000016 			MOV	C.BUF+2(R5),R4	;GET DESTINATION ADDRESS (DISPLACEMENT)
    579
    580						.IF DF	M$$MGE
    581
    582	001100	016503 	000014 			MOV	C.BUF(R5),R3	;GET DESTINATION APR6 BIAS
    583	001104	016101 	000000G			MOV	I.PRM(R1),R1	;GET SOURCE APR6 BIAS
    584
    585						.ENDC
    586
    587	001110					CALL	BLXIO		;COPY DATA TO LARGE DATA BUFFER
    588									;FORM TRANSMIT DATA SEGMENT CCB
    589	001114	011665 	000012 			MOV	(SP),C.STS(R5)	; SET SEGMENT STATUS
    590	001120	012765 	001000 	000010 		MOV	#<NT$DAT*400>+FC.XME,C.FNC(R5) ; TRANSMIT DATA SEGMENT FUNCTION
    591	001126					CALL	USRDAT		;TRANSMIT THE DATA
    592	001132					POP	<R0,R2,R3>	;RECOVER SEGMENT STATUS, I/O PACKET ADDRESS
    593									; AND WINDOW BLOCK ADDRESS
    594	001140	032700 	000040 			BIT	#NT.BOM,R0	;IS THIS A SINGLE SEGMENT MESSAGE OR THE
    595									; FIRST SEGMENT OF A MULTI SEGMENT MESSAGE ?
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 13-1
XMSEG - TRANSMIT A DATA SEGMENT

    596	001144	001402 				BEQ	40$		;IF EQ, NO - JUST EXIT
    597	001146	010162 	000014G			MOV	R1,I.PRM+14(R2)	;ELSE, SAVE STARTING SEGMENT NUMBER FOR ACK
    598	001152				40$:	RETURN			;RETURN TO CALLER
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 14
XMINT - TRANSMIT AN INTERRUPT

    600					.SBTTL XMINT - TRANSMIT AN INTERRUPT
    601
    602					;
    603					; XMINT - TRANSMIT AN INTERRUPT
    604					;
    605					; INPUT:
    606					;
    607					;	R3 -> LOGICAL LINK WINDOW BLOCK
    608					;	R4 -> VIRTUAL ADDRESS OF THE MESSAGE BUFFER
    609					;	R5 -> CCB
    610					;
    611					; OUTPUT:
    612					;
    613					;	R3 IS PRESERVED.
    614					;
    615
    616	001154				XMINT:	PUSH	R3		;SAVE WINDOW BLOCK ADDRESS
    617	001156	116365 	000010 	000006 		MOVB	W.LLA(R3),C.LIN(R5) ;SET LLA FOR THIS LINK IN CCB
    618	001164	016301 	000032 			MOV	W.CINT(R3),R1	;GET CURRENT INTERRUPT MESSAGE TO SEND
    619	001170					PUSH	R1		;SAVE ADDRESS OF CURRENT I/O PACKET
    620	001172	016100 	000004G			MOV	I.PRM+4(R1),R0	;GET NUMBER OF BYTES TO TRANSFER
    621	001176	010065 	000020 			MOV	R0,C.CNT(R5)	;SET BYTE COUNT FOR MESSAGE
    622	001202	016102 	000002G			MOV	I.PRM+2(R1),R2	;GET SOURCE ADDRESS (DISPLACEMENT)
    623
    624						.IF DF	M$$MGE
    625
    626	001206	016503 	000014 			MOV	C.BUF(R5),R3	;GET DESTINATION APR6 BIAS
    627	001212	016101 	000000G			MOV	I.PRM(R1),R1	;GET SOURCE APR6 BIAS
    628
    629						.ENDC
    630
    631	001216					CALL	BLXIO		;COPY DATA TO SMALL DATA BUFFER
    632									;FORM TRANSMIT INTERRUPT CCB
    633	001222	012765 	002000 	000010 		MOV	#<NT$INT*400>+FC.XME,C.FNC(R5) ; TRANSMIT INTERRUPT FUNCTION
    634	001230					CALL	USRINT		;TRANSMIT THE INTERRUPT
    635	001234					POP	<R1,R3>		;RECOVER I/O PACKET AND WINDOW BLOCK ADDRESS
    636	001240	103402 				BCS	10$		;IF CS, INTERRUPT NOT SENT, DON'T UPDATE CURRENT PACKET
    637	001242	011163 	000032 			MOV	(R1),W.CINT(R3)	;ELSE, MAKE NEXT PACKET QUEUED THE CURRENT PACKET
    638	001246				10$:	RETURN			;RETURN TO CALLER
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 15
$QXCP - TRANSMIT DATA COMPLETE ENTRY

    640					.SBTTL $QXCP - TRANSMIT DATA COMPLETE ENTRY
    641
    642					;+
    643					;
    644					; ** - $QXCP - TRANSMIT COMPLETE ENTRY FROM NSP
    645					;
    646					; AN INTERRUPT OR DATA MESSAGE SEGMENT HAS BEEN SUCCESSFULLY
    647					; TRANSMITTED FROM THE LOCAL NODE.
    648					;
    649					; INPUT:
    650					;
    651					;	R5 -> CCB WITH DATA BUFFER
    652					;
    653					; OUTPUTS:
    654					;
    655					;	IF THIS IS A DATA MESSAGE SEGMENT AND THERE IS MORE TO GO,
    656					;	USE THIS LARGE DATA BUFFER TO CONTINUE THE TRANSMISSION.
    657					;	IF THIS IS AN INTERRUPT MESSAGE, THE I/O PACKET IS COMPLETED
    658					;	AND INTERRUPT MESSAGES UNBLOCKED.
    659					;-
    660
    661	001250	004567 	000000G		$QXCP::	JSR	R5,$REGSV	;SAVE ALL THE REGISTERS  (CO-ROUTINE)
    662	001254					CALL	GETWB		;GET WINDOW BLOCK ADDRESS
    663	001260	122765 	000004 	000011 		CMPB	#NT$INT,C.MOD(R5) ;IS THIS AN INTERRUPT MESSAGE
    664	001266	001025 				BNE	20$		;IF NE, NO - MUST BE DATA MESSAGE
    665
    666	001270					PUSH	<R3>		;SAVE ADDRESS OF THE WINDOW BLOCK
    667	001272	062703 	000034 			ADD	#W.INTQ,R3	;POINT TO THE INTERRUPT QUEUE LISTHEAD
    668	001276	011301 				MOV	(R3),R1		;GET THE FIRST INTERRUPT I/O PACKET
    669	001300	001413 				BEQ	10$		;IF EQ, MUST BE DISCONNECTING
    670	001302	011113 				MOV	(R1),(R3)	;SET NEXT PACKET AS THE FIRST PACKET
    671	001304	001002 				BNE	5$		;IF NE, NOT THE END OF THE QUEUE
    672	001306	010363 	000002 			MOV	R3,2(R3)	;OTHERWISE RESET TAIL POINTER TO LISTHEAD
    673	001312	012700 	000000C		5$:	MOV	#IS.SUC&377,R0	;SET SUCCESS STATUS
    674
    675						.IF DF	V$$ER1
    676
    677						MOV	(SP),R3		;RECOVER ADDRESS OF WINDOW BLOCK
    678						BITB	#WS.VE1,W.STAT(R3) ;IS THIS A VERSION 1 LINK ?
    679						BEQ	7$		;IF EQ, NO - SKIP THE LUN SETTING
    680						MOVB	W.LUN(R3),R2	;GET THE LUN FROM THE WINDOW BLOCK
    681						SWAB	R2		;MOVE IT TO THE HIGH BYTE
    682						CLRB	R2		;CLEAN UP THE LOW BYTE
    683						BIS	R2,R0		;MERGE IT WITH THE COMPLETION STATUS
    684					7$:				;
    685						.ENDC
    686
    687	001316	010103 				MOV	R1,R3		;COPY I/O PACKET ADDRESS
    688	001320	016301 	000004G			MOV	I.PRM+4(R3),R1	;SET MESSAGE BYTE COUNT
    689	001324					CALL	$IOFIN		;COMPLETE I/O REQUEST
    690	001330				10$:	POP	<R3>		;RESTORE POINTER TO WINDOW BLOCK
    691	001332					CALL	RLSBUF		;DEALLOCATE THE INTERRUPT MESSAGE BUFFER
    692	001336					CALLR	PROINT		;TRY TO SEND ANOTHER INTERRUPT MESSAGE
    693
    694	001342	005000 			20$:	CLR	R0		;GET THE LLA
    695	001344	156300 	000010 			BISB	W.LLA(R3),R0	;...
    696	001350	010504 				MOV	R5,R4		;COPY ADDRESS OF THE DATA BUFFER CCB
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 15-1
$QXCP - TRANSMIT DATA COMPLETE ENTRY

    697	001352					CALL	SNDCK		;IS IT OK TO TRANSMIT ?
    698	001356	103410 				BCS	30$		;IF CS, NO - IT WILL GO LATER
    699	001360	005763 	000020 			TST	W.CSND(R3)	;CURRENT TRANSMIT PACKET ?
    700	001364	001405 				BEQ	30$		;IF EQ, NO - JUST RELEASE RESOURCES
    701	001366	016464 	000026 	000016 		MOV	C.BUF2+2(R4),C.BUF+2(R4) ;RESET LARGE DATA BUFFER ADDRESS
    702	001374					CALLR	XMSEG		;TRANSMIT THE NEXT SEGMENT
    703
    704	001400	105363 	000006 		30$:	DECB	W.CCBU(R3)	;DECREMENT TRANSMIT CCB'S IN USE COUNT
    705	001404					CALLR	$LDBRT		;JUST RETURN THE LARGE DATA BUFFER AND EXIT
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 16
$QACK - ACK RECEIVED ENTRY

    707					.SBTTL $QACK - ACK RECEIVED ENTRY
    708
    709					;+
    710					; ** - $QACK - ACK RECEIVED FROM NSP
    711					;
    712					; INPUTS:
    713					;
    714					;	R2 = USER LINK ADDRESS (INDEX)
    715					;	R3 = SEGMENT NUMBER OF LAST ACK
    716					;
    717					; OUTPUT:
    718					;
    719					;-
    720
    721	001410	004567 	000000G		$QACK::	JSR	R5,$REGSV	;SAVE ALL THE REGISTERS  (CO-ROUTINE)
    722	001414					PUSH	R3		;CHANGE REGISTER CONVENTIONS
    723	001416	010203 				MOV	R2,R3
    724	001420					POP	R2
    725	001422					CALL	GETWB1		;GET WINDOW BLOCK ADDRESS
    726	001426	005202 				INC	R2		;MAKE SEGMENT NUMBER NEXT ONE TO BE ACK'D
    727	001430	042702 	170000 			BIC	#170000,R2	;NUMBER IS MODULO 12 BITS
    728
    729	001434	016301 	000022 		10$:	MOV	W.SNDQ(R3),R1	;GET NEXT TRANSMIT I/O PACKET ADDRESS
    730	001440	001453 				BEQ	40$		;IF EQ, NOTHING IN QUEUE (IGNORE)
    731	001442	005761 	000006G			TST	I.PRM+6(R1)	;ANYTHING TRANSMITTED YET ?
    732	001446	001450 				BEQ	40$		;IF EQ, NO - IGNORE
    733	001450	010205 				MOV	R2,R5		;COPY NEXT SEGMENT NUMBER
    734	001452	166105 	000014G			SUB	I.PRM+14(R1),R5	;COMPUTE NUMBER OF SEGMENTS ACK'D
    735	001456	042705 	170000 			BIC	#170000,R5	;NUMBER IS MODULO 12 BITS
    736	001462	160561 	000016G			SUB	R5,I.PRM+16(R1)	;COMPUTE NUMBER OF SEGMENTS LEFT TO ACK
    737	001466	003026 				BGT	30$		;IF GT, GO MOVE ACK POINTERS
    738
    739	001470	011163 	000022 			MOV	(R1),W.SNDQ(R3)	;UNLINK I/O PACKET FROM SEND QUEUE
    740	001474	001005 				BNE	20$		;IF NE, NOT END OF QUEUE
    741	001476	010363 	000024 			MOV	R3,W.SNDQ+2(R3)	;RESET END OF SEND QUEUE
    742	001502	062763 	000022 	000024 		ADD	#W.SNDQ,W.SNDQ+2(R3) ; POINTER
    743
    744	001510				20$:	PUSH	<R2,R3>		;SAVE NEXT SEGMENT NUMBER TO ACK, WINDOW
    745	001514	012700 	000000C			MOV	#IS.SUC&377,R0	;SET SUCCESS STATUS
    746
    747						.IF DF	V$$ER1
    748
    749						BITB	#WS.VE1,W.STAT(R3) ;IS THIS A VERSION 1 LINK ?
    750						BEQ	25$		;IF EQ, NO - SKIP THE LUN SETTING
    751						MOVB	W.LUN(R3),R2	;GET THE LUN FROM THE WINDOW BLOCK
    752						SWAB	R2		;MOVE IT TO THE HIGH BYTE
    753						CLRB	R2		;CLEAN UP THE LOW BYTE
    754						BIS	R2,R0		;MERGE IT WITH THE COMPLETION STATUS
    755					25$:				;
    756						.ENDC
    757
    758	001520	010103 				MOV	R1,R3		;COPY I/O PACKET ADDRESS
    759	001522	016101 	000004G			MOV	I.PRM+4(R1),R1	;SET NUMBER OF BYTES TRASMITTED
    760	001526	005063 	000016G			CLR	I.PRM+16(R3)	;FOR CO-EXISTANCE WITH RMS RECORD LOCKING IN $IOFIN
    761	001532					CALL	$IOFIN		;COMPLETE I/O REQUEST
    762	001536					POP	<R3,R2>		;RESTORE WINDOW BLOCK ADDRESS AND NEXT SEGMENT
    763									; NUMBER TO ACK
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 16-1
$QACK - ACK RECEIVED ENTRY

    764	001542	000734 				BR	10$
    765
    766	001544	010104 			30$:	MOV	R1,R4		;COPY I/O PACKET ADDRESS
    767	001546	010500 				MOV	R5,R0		;COPY NUMBER OF SEGMENTS ACK'D
    768	001550	016301 	000012 			MOV	W.SEGZ(R3),R1	;GET SEGMENT SIZE
    769	001554					CALL	$MUL		;MULTIPLY SEGMENT SIZE BY NUMBER OF SEGMENTS
    770									;UPDATE TRANSMIT CONTEXT IN I/O PACKET
    771	001560	060164 	000012G			ADD	R1,I.PRM+12(R4)	; OFFSET FOR NEXT SEGMENT TO ACK
    772	001564	010264 	000014G			MOV	R2,I.PRM+14(R4)	; NEXT SEGMENT NUMBER TO ACK
    773	001570				40$:	RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 17
$QNAK - NAK RECEIVED FROM NSP

    775					.SBTTL $QNAK - NAK RECEIVED FROM NSP
    776
    777					;+
    778					; ** - $QNAK - NAK RECEIVED FROM NSP
    779					;
    780					; THIS ROUTINE ADJUSTS THE TRANSMIT POINTERS TO ALLOW RETRANSMISSION
    781					; FROM THE LAST ACKNOWLEDGED SEGMENT.  THE NUMBER OF MESSAGES (I/O PACKETS)
    782					; TO BE RETRANSMITTED ARE RETURNED AS AN OUTPUT FOR THE FLOW CONTROL
    783					; ADJUSTMENT.  ACTUAL RETRANSMISSION IS STARTED BY A CALL TO '$QBPC'.
    784					;
    785					; INPUTS:
    786					;
    787					;	R2 = USER LINK ADDRESS (INDEX)
    788					;	(ALL OTHER REGISTERS AVAILABLE)
    789					;
    790					; OUTPUTS:
    791					;
    792					;	R3 = NUMBER OF MESSAGES TO BE RETRANSMITTED
    793					;
    794					;	R1 IS DESTROYED.
    795					;-
    796
    797	001572	010203 			$QNAK::	MOV	R2,R3		;COPY THE ULA
    798	001574					CALL	GETWB1		;GET THE ADDRESS OF THE WINDOW BLOCK
    799	001600	005046 				CLR	-(SP)		;INITIALIZE THE NUMBER OF EOM'S COUNTER
    800	001602	010301 				MOV	R3,R1		;COMPUTE THE ADDRESS OF THE TRANSMIT QUEUE
    801	001604	062701 	000022 			ADD	#W.SNDQ,R1	;...
    802	001610	011101 			10$:	MOV	(R1),R1		;GET THE NEXT TRANSMIT I/O PACKET
    803	001612	001416 				BEQ	20$		;IF EQ, END OF THE TRANSMIT QUEUE
    804									;RESET THE NEXT TRANSMIT PARAMETERS
    805	001614	016161 	000012G	000006G		MOV	I.PRM+12(R1),I.PRM+6(R1) ; OFFSET OF NEXT SEGMENT TO TRANSMIT
    806	001622	016161 	000004G	000010G		MOV	I.PRM+4(R1),I.PRM+10(R1) ; COMPUTE NUMBER OF BYTES LEFT
    807	001630	166161 	000006G	000010G		SUB	I.PRM+6(R1),I.PRM+10(R1) ;  TO TRANSMIT
    808	001636	005216 				INC	(SP)		;INCREMENT EOM COUNT
    809	001640	026301 	000020 			CMP	W.CSND(R3),R1	;IS THIS THE CURRENT SEND PACKET ?
    810	001644	001361 				BNE	10$		;IF NE, NO - KEEP ADJUSTING THE I/O PACKETS
    811	001646	005316 				DEC	(SP)		;CURRENT SEND CANNOT BE INCLUDED IN THE COUNT ADJUSTMENT
    812	001650	016363 	000022 	000020 	20$:	MOV	W.SNDQ(R3),W.CSND(R3) ;MAKE NEXT PACKET TO BE ACK'D THE
    813									; CURRENT SEND PACKET (MAY BE NULL)
    814	001656	012603 				MOV	(SP)+,R3	;GET THE NUMBER OF EOMS
    815	001660					RETURN			;RETURN TO CALLER
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 18
RECQIO - RECEIVE DATA PROCESSING (FUNCTION=32)

    817					.SBTTL RECQIO - RECEIVE DATA PROCESSING (FUNCTION=32)
    818
    819					;
    820					; RECEIVE DATA QIO PROCESSING
    821					;
    822					; INPUT:
    823					;
    824					;	R0 = PRIVILEGE ERROR STATUS (IE.PRI)
    825					;	R1 -> I/O PACKET
    826					;	R4 -> REQUESTING TASK HEADER
    827					;	R5 -> UNIT CONTROL BLOCK
    828					;
    829
    830	001662	017103 	000000G		RECQIO::MOV	@I.LN2(R1),R3	;GET WINDOW BLOCK ADDRESS
    831	001666	132763 	000100 	000004 		BITB	#WS.DIP,W.STAT(R3) ;REMOTE DISCONNECT IN PROGRESS ?
    832	001674	001025 				BNE	20$		;IF NE, YES - COMPLETE I/O WITH ERROR
    833	001676	022761 	017700 	000004G		CMP	#8128.,I.PRM+4(R1) ;IS MESSAGE LENGTH WITHIN RANGE ?
    834	001704	103416 				BLO	10$		   ;IF LO, NO - RETURN ERROR
    835	001706	005011 				CLR	(R1)		;CLEAR LINK WORD IN I/O PACKET
    836	001710	011673 	000030 			MOV	(SP),@W.RCVQ+2(R3) ;ADD I/O PACKET TO END OF
    837	001714	012663 	000030 			MOV	(SP)+,W.RCVQ+2(R3) ; RECEIVE I/O PACKET QUEUE AND CLEAN THE STACK
    838	001720	062701 	000014G			ADD	#I.PRM+14,R1	;POINT TO EMPTY PARAMETER AREA
    839									;SETUP RECEIVE CONTEXT IN I/O PACKET
    840	001724	005021 				CLR	(R1)+		; OVERRUN FLAG
    841	001726	005011 				CLR	(R1)		; COUNT TRANSFERRED
    842
    843	001730	005000 				CLR	R0		;GET NSP'S LOGICAL LINK ADDRESS
    844	001732	156300 	000010 			BISB	W.LLA(R3),R0	;...
    845	001736					CALLR	USRMOD		;MODIFY FLOW CONTROL COUNTS AND RETURN
    846
    847	001742	012700 	000000C		10$:	MOV	#IE.SPC&377,R0	;SET INVALID BUFFER PARAMETER ERROR
    848	001746	000402 				BR	30$		;
    849
    850	001750	012700 	000000C		20$:	MOV	#IE.ABO&377,R0	;SET LINK DISCONNECTING ERROR
    851
    852	001754				30$:	CALLR	IECMN		;COMPLETE I/O REQUEST
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 19
$QDATR - DATA SEGMENT RECEIVED ENTRY

    854					.SBTTL $QDATR - DATA SEGMENT RECEIVED ENTRY
    855
    856					;+
    857					; ** - $QDATR - DATA SEGMENT RECEIVED ENTRY FROM NSP
    858					;
    859					; INPUT:
    860					;
    861					;	R5 -> CCB WITH DATA BUFFER
    862					;
    863					; OUTPUTS:
    864					;
    865					;-
    866
    867	001760	004567 	000000G		$QDATR::JSR	R5,$REGSV	;SAVE ALL THE REGISTERS  (CO-ROUTINE)
    868	001764					CALL	GETWB		;GET WINDOW BLOCK ADDRESS
    869	001770	016301 	000026 			MOV	W.RCVQ(R3),R1	;GET CURRENT RECEIVE I/O PACKET
    870	001774	001472 				BEQ	50$		;IF EQ, I/O MUST HAVE BEEN KILLED
    871	001776	016500 	000020 			MOV	C.CNT(R5),R0	;GET NUMBER OF BYTES RECEIVED
    872	002002	026100 	000004G			CMP	I.PRM+4(R1),R0	;ENOUGH SPACE LEFT IN THE USER BUFFER ?
    873	002006	103005 				BHIS	10$		;IF HIS, YES - MOVE ALL DATA
    874	002010	005261 	000014G			INC	I.PRM+14(R1)	;ELSE, SET DATA OVERRUN ERROR AND
    875	002014	016100 	000004G			MOV	I.PRM+4(R1),R0	; USE THE REMAINING COUNT
    876	002020	001422 				BEQ	20$		;IF EQ, MOVE NOTHING
    877	002022	016502 	000016 		10$:	MOV	C.BUF+2(R5),R2	;GET SOURCE BUFFER ADDRESS
    878	002026	016104 	000002G			MOV	I.PRM+2(R1),R4	;GET DESTINATION BUFFER ADDRESS
    879	002032	060061 	000002G			ADD	R0,I.PRM+2(R1)	;ADJUST BUFFER ADDRESS,
    880	002036	160061 	000004G			SUB	R0,I.PRM+4(R1)	; REMAINING BYTE COUNT AND
    881	002042	060061 	000016G			ADD	R0,I.PRM+16(R1)	; BYTE COUNT TRANSFERRED
    882
    883						.IF DF	M$$MGE
    884
    885	002046					PUSH	R3		;SAVE WINDOW BLOCK ADDRESS
    886	002050	016103 	000000G			MOV	I.PRM(R1),R3	;GET DESTINATION APR6 BIAS
    887	002054	016501 	000014 			MOV	C.BUF(R5),R1	;GET SOURCE APR6 BIAS
    888
    889						.IFTF
    890
    891	002060					CALL	BLXIO		;MOVE DATA FROM RECEIVE TO USER BUFFER
    892
    893						.IFT
    894
    895	002064					POP	R3		;RECOVER WINDOW BLOCK ADDRESS
    896
    897						.ENDC
    898
    899	002066	032765 	000100 	000012 	20$:	BIT	#NT.EOM,C.STS(R5) ;IS THIS SEGMENT THE END OF THE MESSAGE ?
    900	002074	001432 				BEQ	50$		  ;IF EQ, NO - RECEIVE IS NOT COMPLETE
    901	002076	016301 	000026 			MOV	W.RCVQ(R3),R1	;GET CURRENT RECEIVE I/O PACKET
    902	002102	011163 	000026 			MOV	(R1),W.RCVQ(R3)	;DEQUEUE FROM RECEIVE QUEUE
    903	002106	001005 				BNE	30$		;IF NE, NOT END OF QUEUE
    904	002110	010363 	000030 			MOV	R3,W.RCVQ+2(R3)	;ELSE, RESET POINTER TO
    905	002114	062763 	000026 	000030 		ADD	#W.RCVQ,W.RCVQ+2(R3) ; END OF QUEUE
    906	002122				30$:	PUSH	R3		;SAVE WINDOW BLOCK ADDRESS
    907	002124	010103 				MOV	R1,R3		;COPY I/O PACKET ADDRESS
    908	002126	016301 	000016G			MOV	I.PRM+16(R3),R1	;GET NUMBER OF BYTES TRANSFERRED
    909	002132	012700 	000000G			MOV	#IS.SUC,R0	;ASSUME SUCCESS STATUS
    910	002136	005763 	000014G			TST	I.PRM+14(R3)	;DATA OVERRUN ?
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 19-1
$QDATR - DATA SEGMENT RECEIVED ENTRY

    911	002142	001402 				BEQ	40$		;IF EQ, NO
    912	002144	012700 	000000C			MOV	#IE.DAO&377,R0	;SET DATA OVERRUN STATUS
    913	002150				40$:				;
    914						.IF DF	V$$ER1
    915
    916						MOV	(SP),R2		;GET THE ADDRESS OF THE WINDOW BLOCK
    917						BITB	#WS.VE1,W.STAT(R2) ;IS THIS A VERSION 1 LINK ?
    918						BEQ	45$		;IF EQ, NO - SKIP THE LUN SETTING
    919						MOVB	W.LUN(R2),R2	;GET THE LUN FROM THE WINDOW BLOCK
    920						SWAB	R2		;MOVE IT TO THE HIGH BYTE
    921						CLRB	R2		;CLEAN UP THE LOW BYTE
    922						BIS	R2,R0		;MERGE IT WITH THE COMPLETION STATUS
    923					45$:				;
    924						.ENDC
    925
    926	002150	005063 	000016G			CLR	I.PRM+16(R3)	;FOR CO-EXISTANCE WITH RMS RECORD LOCKING IN $IOFIN
    927	002154					CALL	$IOFIN		;FINISH I/O REQUEST
    928	002160					POP	R3		;RECOVER WINDOW BLOCK ADDRESS
    929
    930	002162				50$:				;FORM CCB TO RETURN DATA SEGMENT
    931	002162	116365 	000010 	000006 		MOVB	W.LLA(R3),C.LIN(R5) ; LOGICAL LINK ADDRESS
    932	002170					CALLR	USRRCV		;RETURN THE BUFFER TO NSP
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 20
CONQIO - CONNECT/ACCEPT PROCESSING (FUNCTION=33)

    934					.SBTTL CONQIO - CONNECT/ACCEPT PROCESSING (FUNCTION=33)
    935
    936					;
    937					; CONQIO - CONNECT/ACCEPT FUNCTIONS PROCESSING
    938					;
    939
    940						.ENABL	LSB
    941	002174	012700 	000000C		CONQIO::MOV	#IE.BAD&377,R0	;ASSUME BAD CONNECT BLOCK SIZE
    942	002200	062701 	000004G			ADD	#I.PRM+4,R1	;POINT TO CONNECT BLOCK SIZE
    943	002204	010103 				MOV	R1,R3		;COPY ADDRESS OF PARAMETERS
    944
    945	002206	105761 	000000C			TSTB	I.FCN-<I.PRM+4>(R1) ;IS THIS A CON ?
    946	002212	001036 				BNE	ACC		;IF NE, MUST BE ACC
    947
    948	002214	022127 	000110 			CMP	(R1)+,#N.RQL	;PROPER SIZE BLOCK ?
    949	002220	001075 				BNE	30$		;IF NE, BAD SIZE
    950
    951	002222					CALL	BUFCHK		;OPTIONAL OUTPUT BUFFER CHECK ?
    952	002226	103472 				BCS	30$		;IF CS, ILLEGAL BUFFER OR BAD SIZE
    953
    954	002230	005723 				TST	(R3)+		;POINT TO INPUT BUFFER ADDRESS
    955	002232	010301 				MOV	R3,R1		;COPY POINTER
    956	002234					CALL	BUFCHK		;OPTIONAL INPUT BUFFER CHECK ?
    957	002240	103465 				BCS	30$		;IF CS, ILLEGAL BUFFER OR BAD SIZE
    958
    959	002242				10$:	CALL	GETULA		;ALLOCATE ULA AND WINDOW BLOCK
    960	002246	103462 				BCS	30$		;IF CS, ALLOCATION FAILURE
    961	002250	010002 				MOV	R0,R2		;COPY WINDOW BLOCK ADDRESS
    962	002252	012703 	000020 			MOV	#W.WBL/2,R3	;SET BLOCK LENGTH (IN WORDS)
    963	002256	005022 			20$:	CLR	(R2)+		;CLEAR OUT BLOCK
    964	002260					SOB	R3,20$
    965	002264	110160 	000011 			MOVB	R1,W.ULA(R0)	;SET ULA (INDEX) IN WINDOW BLOCK
    966	002270	011601 				MOV	(SP),R1		;RESTORE I/O PACKET ADDRESS
    967	002272					CALL	GETLUN		;GET I/O REQUEST LUN
    968	002276	110360 	000007 			MOVB	R3,W.LUN(R0)	;SET LUN IN WINDOW BLOCK
    969	002302	050071 	000000G			BIS	R0,@I.LN2(R1)	;OPEN LUN WITH WINDOW BLOCK
    970	002306	000500 				BR	60$		;QUEUE REQUEST TO ACP
    971
    972	002310	022127 	000002 		ACC:	CMP	(R1)+,#N.CTL+2	;PROPER SIZE BLOCK ?
    973	002314	002437 				BLT	30$		;IF LT, BAD SIZE
    974
    975	002316					CALL	BUFCHK		;OPTIONAL OUTPUT BUFFER CHECK ?
    976	002322	103434 				BCS	30$		;IF CS, ILLEGAL BUFFER
    977
    978	002324					MAP	-10(R3)		;MAP TO USER CONNECT PENDING BLOCK
    979	002332	017363 	177772 	000006 		MOV	@-6(R3),6(R3)	;COPY TLA RETURNED BY USER TO I/O PACKET
    980	002340	000740 				BR	10$		;GO ALLOCATE ULA AND WINDOW BLOCK
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 21
DISQIO - DISCONNECT/ABORT/REJECT PROCESSING (FUNCTION=34)

    982					.SBTTL DISQIO - DISCONNECT/ABORT/REJECT PROCESSING (FUNCTION=34)
    983
    984					;
    985					; DISQIO - DISCONNECT/ABORT/REJECT FUNCTIONS PROCESSING
    986					;
    987
    988	002342	012700 	000000C		DISQIO::MOV	#IE.PRI&377,R0	;ASSUME PRIVILEGE VILOATION
    989	002346	005371 	000000G			DEC	@I.LN2(R1)	; AND CLEAR LUN INTERLOCK
    990	002352					CALL	GETLUN		;GET I/O REQUEST LUN NUMBER
    991
    992	002356	126127 	000000G	000020 		CMPB	I.FCN(R1),#020	;IS THIS A REJ ?
    993	002364	001415 				BEQ	REJ		;IF EQ, YES
    994									;ELSE, MUST BE DIS OR ABT
    995	002366	120364 	000000G			CMPB	R3,H.NML(R4)	;SAME AS NETWORK LUN ?
    996	002372	001410 				BEQ	30$		;IF EQ, YES - CAN'T DISCONNECT NETWORK LUN
    997	002374	005271 	000000G			INC	@I.LN2(R1)	;RE-INTERLOCK LUN
    998
    999	002400	062701 	000000G			ADD	#I.PRM,R1	;POINT TO USER DATA BUFFER ADDRESS
   1000	002404	010103 				MOV	R1,R3		;COPY ADDRESS OF PARAMETERS
   1001	002406					CALL	BUFCHK		;OPTIONAL USER DATA BUFFER CHECK ?
   1002	002412	103036 				BCC	60$		;IF CC, QUEUE REQUEST TO ACP
   1003									;ELSE, ILLEGAL BUFFER OR BAD SIZE
   1004	002414	000167 	175504 		30$:	JMP	IECMN		;FINISH ERROR PROCESSING (CLEARS ACCESS INTERLOCK)
   1005
   1006	002420	120364 	000000G		REJ:	CMPB	R3,H.NML(R4)	;SAME AS NETWORK LUN ?
   1007	002424	001373 				BNE	30$		;IF NE, NO - CAN'T REJECT ON THIS LUN
   1008
   1009	002426	062701 	000000G			ADD	#I.PRM,R1	;POINT TO CONNECT BLOCK ADDRESS
   1010	002432	010103 				MOV	R1,R3		;COPY ADDRESS OF PARAMETERS
   1011	002434	012100 				MOV	(R1)+,R0	;GET CONNECT BLOCK ADDRESS
   1012	002436	001404 				BEQ	40$		;IF EQ, BAD ADDRESS
   1013	002440	011101 				MOV	(R1),R1		;GET BLOCK SIZE
   1014	002442	020127 	000002 			CMP	R1,#N.CTL+2	;PROPER SIZE BLOCK ?
   1015	002446	002003 				BGE	50$		;IF GE, SIZE IS OK
   1016	002450	012700 	000000C		40$:	MOV	#IE.BAD&377,R0	;ELSE, BAD PARAMETER STATUS
   1017	002454	000757 				BR	30$
   1018
   1019	002456				50$:	CALL	BLKLOC		;RELOCATE (AND VALIDATE) BLOCK ADDRESS
   1020	002462	103754 				BCS	30$		;IF CS, ILLEGAL BUFFER
   1021
   1022	002464	010301 				MOV	R3,R1		;COPY POINTER
   1023	002466					CALL	BUFCHK		;OPTIONAL OUTPUT BUFFER CHECK ?
   1024	002472	103750 				BCS	30$		;IF CS, ILLEGAL BUFFER
   1025
   1026	002474					MAP	-10(R3)		;MAP TO USER CONNECT PENDING BLOCK
   1027	002502	017363 	177772 	000006 		MOV	@-6(R3),6(R3)	;COPY TLA RETURNED BY USER TO I/O PACKET
   1028
   1029	002510	000167 	175426 		60$:	JMP	NSQUE		;QUEUE REQUEST TO ACP
   1030						.DSABL	LSB
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 22
$QTIMR - TIMER SUPPORT FROM NSP

   1032					.SBTTL	$QTIMR - TIMER SUPPORT FROM NSP
   1033
   1034					;+
   1035					; ** - $QTIMR - TIMER SUPPORT FROM NSP
   1036					;
   1037					; THIS CODE IS ENTERED ONCE A SECOND FROM THE NSP TIMEOUT PROCESSING.
   1038					;
   1039					; INPUTS:
   1040					;
   1041					;	NONE (ALL REGISTERS AVAILABLE)
   1042					;
   1043					; OUTPUTS:
   1044					;
   1045					;	ALL ACTIVE LINKS ARE SCANNED TO SEE IF ANY NEED TRANSMIT/RECEIVE
   1046					;	PROCESSING BECAUSE OF PREVIOUS RESOURCE ERROR CONDITIONS.
   1047					;-
   1048
   1049	002514	016700 	000000G		$QTIMR::MOV	$NSDDB,R0	;GET THE MAXIMUM NUMBER OF LOGICAL LINKS
   1050	002520	016000 	000022 			MOV	N$LVC(R0),R0	;...AND
   1051	002524	016701 	175260 			MOV	NSULT,R1	; ADDRESS OF ULA TABLE
   1052
   1053	002530	012103 			10$:	MOV	(R1)+,R3	;GET NEXT WINDOW BLOCK ADDRESS
   1054	002532	001424 				BEQ	50$		;IF EQ, NO LOGICAL LINK
   1055
   1056	002534	132763 	000060 	000004 		BITB	#WS.INT!WS.STA,W.STAT(R3) ;ANY SERVICE REQUIRED ?
   1057	002542	001420 				BEQ	50$		;IF EQ, NO - GO CHECK NEXT ENTRY
   1058
   1059	002544					PUSH	<R0,R1>		;SAVE REGISTERS
   1060	002550	132763 	000020 	000004 		BITB	#WS.STA,W.STAT(R3) ;WAITING ON TRANSMIT CCB ?
   1061	002556	001402 				BEQ	30$		;IF EQ, NO
   1062	002560					CALL	PROSND		;ELSE, TRY TO TRANSMIT
   1063	002564	132763 	000040 	000004 	30$:	BITB	#WS.INT,W.STAT(R3) ;WAITING ON INTERRUPT CCB ?
   1064	002572	001402 				BEQ	40$		;IF EQ, NO
   1065	002574					CALL	PROINT		;ELSE, TRY TO SEND INTERRUPT
   1066	002600				40$:	POP	<R1,R0>		;RESTORE REGISTERS
   1067
   1068	002604				50$:	SOB	R0,10$		;END OF ULA TABLE ?
   1069	002610					RETURN			;RETURN TO CALLER
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 23
GETULA - ALLOCATE USER LINK ADDRESS AND WINDOW BLOCK

   1071					.SBTTL GETULA - ALLOCATE USER LINK ADDRESS AND WINDOW BLOCK
   1072
   1073					;+
   1074					; GETULA - ALLOCATE USER LINK ADDRESS FROM USER LINK TABLE AND
   1075					; ASSOCIATED WINDOW BLOCK FROM SYSTEM POOL
   1076					;
   1077					; INPUT:
   1078					;
   1079					;	R5 -> UNIT CONTROL BLOCK
   1080					;
   1081					; OUTPUTS:
   1082					;
   1083					;	C=0 IF ALLOCATION SUCCEEDED
   1084					;		R0 -> LOGICAL LINK WINDOW BLOCK
   1085					;		R1 = USER LINK ADDRESS (INDEX)
   1086					;		ULA ENTRY IN ULT POINTS TO WINDOW BLOCK
   1087					;	C=1 IF ALLOCATION FAILED
   1088					;		R0 = ERROR STATUS
   1089					;	R3 IS DESTROYED.
   1090					;-
   1091
   1092	002612	016503 	000000G		GETULA::MOV	U.VCB(R5),R3	;GET VCB ADDRESS
   1093	002616	062703 	000004 			ADD	#V.CULT,R3	;POINT TO CURRENT ULT ADDRESS
   1094	002622	011301 				MOV	(R3),R1		;GET CURRENT ULT ADDRESS
   1095
   1096	002624	062701 	000002 		10$:	ADD	#2,R1		;POINT TO NEXT ULT ADDRESS
   1097	002630	020163 	000004 			CMP	R1,V.ULTE-V.CULT(R3) ;END OF ULT ?
   1098	002634	103402 				BLO	20$		;IF LO, VALID ADDRESS
   1099	002636	016301 	000002 			MOV	V.ULT-V.CULT(R3),R1 ;ELSE, POINT TO START OF ULT
   1100
   1101	002642	020113 			20$:	CMP	R1,(R3)		;POINT TO CURRENT ULT ADDRESS AGAIN ?
   1102	002644	001420 				BEQ	30$		;IF EQ, ALL ULA'S IN USE
   1103	002646	005711 				TST	(R1)		;ELSE, CHECK IF THIS ONE IS IN USE ?
   1104	002650	001365 				BNE	10$		;IF NE, GO CHECK NEXT ONE
   1105
   1106	002652					PUSH	R1		;SAVE ULT ADDRESS
   1107	002654	012701 	000040 			MOV	#W.WBL,R1	;SET BLOCK LENGTH
   1108	002660					CALL	$ALOCB		;ALLOCATE LOGICAL LINK WINDOW BLOCK
   1109	002664					POP	R1		;RESTORE ULT ADDRESS
   1110	002666	103412 				BCS	40$		;IF CS, ALLOCATION FAILURE
   1111
   1112	002670	010113 				MOV	R1,(R3)		;RESET CURRENT ULT ADDRESS IN VCB
   1113	002672	010011 				MOV	R0,(R1)		;STORE WINDOW BLOCK ADDRESS IN ULT ENTRY
   1114	002674	166301 	000002 			SUB	V.ULT-V.CULT(R3),R1 ;CREATE ULA BY MAKING ULT ADDRESS
   1115	002700	006201 				ASR	R1		; INTO INDEX (CLEARS C-BIT)
   1116	002702	005201 				INC	R1
   1117	002704	000403 				BR	40$
   1118
   1119	002706	012700 	000000C		30$:	MOV	#IE.RSU&377,R0	;SHARABLE RESOURCE IN USE STATUS
   1120	002712	000261 				SEC
   1121	002714				40$:	RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 24
GETLUN - GET I/O REQUEST LOGICAL UNIT NUMBER

   1123					.SBTTL GETLUN - GET I/O REQUEST LOGICAL UNIT NUMBER
   1124
   1125					;+
   1126					; GETLUN - GET TASK LUN NUMBER FOR I/O REQUEST
   1127					;
   1128					; INPUTS:
   1129					;
   1130					;	R1 -> I/O PACKET
   1131					;	R4 -> TASK HEADER
   1132					;
   1133					; OUTPUTS:
   1134					;
   1135					;	R3 = LUN NUMBER FROM TASK ISSUEING REQUEST
   1136					;	R0, R1 AND R2 ARE PRESERVED.
   1137					;-
   1138
   1139	002716	016103 	000000G		GETLUN::MOV	I.LN2(R1),R3	;GET LUN ADDRESS
   1140	002722	160403 				SUB	R4,R3		;SUBTRACT TASK HEADER ADDRESS
   1141	002724	162703 	177776G			SUB	#H.LUN-2,R3	;   "     LUN START ADDRESS
   1142	002730	006203 				ASR	R3		;MAKE A COUNT
   1143	002732	006203 				ASR	R3
   1144	002734					RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 25
GETWB - GET WINDOW BLOCK ADDRESS

   1146					.SBTTL GETWB - GET WINDOW BLOCK ADDRESS
   1147
   1148					;+
   1149					; GETWB - GET WINDOW BLOCK ADDRESS ASSOCIATED WITH THE USER LINK
   1150					; ADDRESS IN THE SPECIFIED COMMUNICATION CONTROL BLOCK
   1151					;
   1152					; INPUT:
   1153					;
   1154					;	R5 -> CCB
   1155					;
   1156					; OUTPUTS:
   1157					;
   1158					;	R3 -> LOGICAL LINK WINDOW BLOCK
   1159					;	R0,R1,R2,R4,R5 ARE PRESERVED
   1160					;-
   1161
   1162	002736	005003 			GETWB:	CLR	R3		;GET ULA (INDEX)
   1163	002740	156503 	000006 			BISB	C.LIN(R5),R3	; FROM CCB
   1164	002744	006303 			GETWB1:	ASL	R3		;MAKE WORD INDEX
   1165	002746	066703 	175036 			ADD	NSULT,R3	;ADD BASE OF ULT TABLE
   1166	002752	014303 				MOV	-(R3),R3	;GET WINDOW BLOCK ADDRESS
   1167	002754					RETURN
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 26
BUFCHK,BLKLOC - BUFFER CHECKING AND RELOCATION

   1169					.SBTTL BUFCHK,BLKLOC - BUFFER CHECKING AND RELOCATION
   1170
   1171					;+
   1172					; BUFCHK - CHECK OPTIONAL USER DATA BUFFER
   1173					;
   1174					; INPUTS:
   1175					;
   1176					;	R1 -> ADDRESS AND SIZE PARAMETERS IN I/O PACKET
   1177					;	R3 -> MAPPING, OFFSET AND SIZE PARAMETERS IN I/O PACKET
   1178					;
   1179					; OUTPUTS:
   1180					;
   1181					;	C=0 IF VALID BUFFER
   1182					;		R3 -> SIZE PARAMETER IN I/O PACKET
   1183					;		R0 AND R1 ARE DESTROYED.
   1184					;	C=1 IF INVALID BUFFER
   1185					;		R0 = ERROR STATUS WORD
   1186					;		R1 AND R3 ARE DESTROYED.
   1187					;-
   1188
   1189						.ENABL	LSB
   1190	002756	012100 			BUFCHK:	MOV	(R1)+,R0	;OPTIONAL  BUFFER ?
   1191	002760	001004 				BNE	10$		;IF NE, CONTINUE CHECKING
   1192	002762	005023 				CLR	(R3)+		;ELSE, CLEAR OUT PARAMETER
   1193	002764	005023 				CLR	(R3)+		; AREA
   1194	002766	005013 				CLR	(R3)
   1195	002770	000433 				BR	60$		;FINISHED
   1196
   1197	002772	011101 			10$:	MOV	(R1),R1		;GET SIZE
   1198	002774	001406 				BEQ	20$		;IF EQ, ZERO IS BAD SIZE
   1199	002776	020127 	000020 			CMP	R1,#16.		;SIZE <= 16. BYTES
   1200	003002	003003 				BGT	20$		;IF GT, NO - BAD SIZE
   1201	003004	010163 	000004 			MOV	R1,4(R3)	;ELSE, COPY BUFFER SIZE
   1202	003010	000410 				BR	30$		;GO RELOCATE BUFFER ADDRESS
   1203
   1204	003012	012700 	000000C		20$:	MOV	#IE.BAD&377,R0	;ELSE, BAD PARAMETER STATUS
   1205	003016	000261 				SEC
   1206	003020	000417 				BR	60$		;FINISHED
   1207
   1208					;+
   1209					; BLKLOC - RELOCATE BUFFER ADDRESS (AND VALIDATE WORD-ALIGNED)
   1210					;
   1211					; INPUTS:
   1212					;	R0 -> BUFFER
   1213					;	R1 = BUFFER SIZE (IN BYTES)
   1214					;	R3 -> MAPPING, OFFSET AND SIZE PARAMETERS IN I/O PACKET
   1215					;
   1216					; OUTPUTS:
   1217					;	C=0 IF VALID BUFFER
   1218					;		R3 -> SIZE PARAMETER IN I/O PACKET
   1219					;		R0 AND R1 ARE DESTROYED.
   1220					;	C=1 IF INVALID BUFFER
   1221					;		R0 = ERROR STATUS
   1222					;		R1 AND R3 ARE DESTROYED.
   1223					;-
   1224
   1225	003022				BLKLOC:				;REFERENCE LABEL
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 26-1
BUFCHK,BLKLOC - BUFFER CHECKING AND RELOCATION

   1226
   1227						.IF DF	A$$CHK!M$$MGE
   1228
   1229	003022	000261 				SEC			;ASSUME BAD ALIGNMENT
   1230	003024	032700 	000001 			BIT	#1,R0		;WORD ALIGNED ?
   1231	003030	001003 				BNE	40$		;IF NE, ILLEGAL BUFFER
   1232
   1233						.IFTF
   1234	003032				30$:				;REFERENCE LABEL
   1235						.IFT
   1236
   1237	003032					CALL	$ACHKB
   1238	003036	103003 				BCC	50$
   1239	003040	012700 	000000C		40$:	MOV	#IE.SPC&377,R0	;ILLEGAL BUFFER STATUS
   1240	003044	000405 				BR	60$
   1241	003046				50$:
   1242						.ENDC
   1243
   1244	003046					CALL	$RELOC		;RELOCATE BUFFER ADDRESS (FOR APR6)
   1245	003052	010123 				MOV	R1,(R3)+	;COPY MAPPING AND OFFSET
   1246	003054	010223 				MOV	R2,(R3)+
   1247	003056	000241 				CLC			;(CLEAR C-BIT)
   1248
   1249	003060				60$:	RETURN
   1250						.DSABL	LSB
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 27
BLXIO - MOVE BLOCK OF DATA

   1252					.SBTTL BLXIO - MOVE BLOCK OF DATA
   1253
   1254					;+
   1255					; BLXIO - MOVE DATA BLOCK BETWEEN (UNMAPPED) DATA BUFFERS
   1256					;
   1257					; INPUTS:
   1258					;
   1259					;	R0 = NUMBER OF BYTES
   1260					;	R1 = SOURCE APR6 BIAS (MAPPED SYSTEMS ONLY)
   1261					;	R2 -> SOURCE BUFFER
   1262					;	R3 = DESTINATION APR6 BIAS (MAPPED SYSTEMS ONLY)
   1263					;	R4 -> DESTINATION BUFFER
   1264					;
   1265					; OUTPUT:
   1266					;
   1267					;	THE BLOCK OF DATA IS TRANSFERRED FROM THE SOURCE BUFFER TO
   1268					;	THE DESTINATION BUFFER.  ON MAPPED SYSTEMS, THE EXECUTIVE
   1269					;	DATA MOVE ROUTINE IS CALLED TO TAKE ADVANTAGE OF OPTIMIZED
   1270					;	DATA MOVEMENT.
   1271					;
   1272					;	R5 IS PRESERVED .
   1273					;-
   1274
   1275	003062				BLXIO:				;REFERENCE LABEL
   1276						.IF DF	M$$MGE
   1277
   1278	003062					PUSH	<R5>		;SAVE CALLERS R5
   1279	003064	162702 	020000 			SUB	#20000,R2	;CONVERT SOURCE VIRTUAL ADDRESS TO REFERENCE APR5
   1280	003070					CALL	$BLXIO		;MOVE THE DATA
   1281	003074					POP	<R5>		;RESTORE R5
   1282
   1283						.IFF
   1284
   1285						MOVB	(R2)+,(R4)+	;MOVE DATA BLOCK
   1286						SOB	R0,BLXIO
   1287
   1288						.ENDC
   1289
   1290	003076					RETURN
   1291
   1292		000001 				.END
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 27-1
SYMBOL TABLE

ACC     002310R  	CX.GDQ= 000001   	ER$MLB= 000006   	GETULA  002612RG 	LF.INT= 000400
ACKMAS= 170000   	CX.REQ= 000002   	ER$NOD= 000002   	GETWB   002736R  	LF.LCL= 040000
ACKPRE= 100000   	CX.UNL= 000004   	ER$NSD= 000003   	GETWB1  002744R  	LF.MMF= 100000
ACKRES= 060000   	C$$CKP= 000000   	ER$RES= 000001   	GND     000264R  	LF.MSF= 040000
ACKWRA= 010000   	C$$ORE= 000400   	ER$SSR= 000000   	G$$TPP= 000000   	LF.NKR= 000200
A$$CHK= 000000   	C$$RSH= 177564   	ER$SSS= 000045   	G$$TSS= 000000   	LF.NKS= 000400
A$$CPS= 000000   	C.BID   000003   	ER$STA= 000051   	G$$TTK= 000000   	LF.NPN= 000001
A$$PRI= 000000   	C.BUF   000014   	ER$TCN= 000040   	G$$WRD= 000000   	LF.NTS= 002000
A$$TRP= 000000   	C.BUF1  000014   	ER$TCO= 000041   	H.LUN = ****** GX	LF.RSU= 100000
A.NAK = 010000   	C.BUF2  000024   	ER$TPA= 000010   	H.NML = ****** GX	LS.DLS= 000200
BLKLOC  003022R  	C.CNT   000020   	ER$UOB= 000004   	IECMN   000124RG 	LS.FCC= 000004
BLXIO   003062R  	C.CNT1  000020   	E$$XPR= 000000   	IE.ABO= ****** GX	LS.FC0= 000001
BUFCHK  002756R  	C.CNT2  000030   	FC.CCP= 000020   	IE.BAD= ****** GX	LS.FC1= 000002
CB.CCB= 000002   	C.FLG   000022   	FC.CTL= 000006   	IE.DAO= ****** GX	LS.ILS= 000200
CB.RDB= 000004   	C.FLG1  000022   	FC.KCP= 000016   	IE.NDA= 177662   	LS.MAK= 000020
CE.ABO= 100362   	C.FLG2  000032   	FC.KIL= 000004   	IE.NNT= 177660   	LS.MNK= 000040
CE.DIS= 100366   	C.FNC   000010   	FC.RCE= 000002   	IE.NRJ= 177666   	LS.RES= 000360
CE.ERR= 100370   	C.LIN   000006   	FC.RCP= 000014   	IE.PRI= ****** GX	LS.RSV= 000300
CE.MOP= 100372   	C.LNK   000000   	FC.TIM= 000010   	IE.RSU= ****** GX	L$$ASG= 000000
CE.NTE= 100361   	C.MOD   000011   	FC.XCP= 000012   	IE.SPC= ****** GX	L$$DRV= 000000
CE.RTE= 100376   	C.NSP   000004   	FC.XME= 000000   	IE.URJ= 177667   	L$$P11= 000001
CE.SRC= 100364   	C.RSV   000002   	FE.CAL= 000040   	IE.WLK= ****** GX	L$$11R= 000000
CE.TMO= 100374   	C.STA   000007   	FE.DRV= 000010   	ISSUC   000126R  	L.CIQ   000026
CF.EOM= 000004   	C.STS   000012   	FE.EXP= 000200   	IS.DAO= 000002   	L.DCR   000036
CF.HDR= 000020   	DF$ADJ= 020000   	FE.EXT= 000001   	IS.SUC= ****** GX	L.FLG   000012
CF.LB = 100000   	DF$DWN= 001000   	FE.EXV= 000004   	I$$RAR= 000000   	L.LDA   000024
CF.SOM= 000010   	DF$FRE= 070000   	FE.LSI= 000400   	I$$RDN= 000000   	L.LIA   000026
CF.SYN= 000040   	DF$LCL= 040000   	FE.MUP= 000002   	I.FCN = ****** GX	L.LLA   000002
CF.TRN= 000100   	DF$LNK= 004000   	FE.MXT= 040000   	I.LN2 = ****** GX	L.LNG1  000054
CLS     000240R  	DF$REM= 010000   	FE.NLG= 100000   	I.PRM = ****** GX	L.LNO   000022
CL$ACK= 000040   	DF$RES= 002000   	FE.PKT= 000100   	KDSAR0= 172360   	L.LSA   000032
CL$MFL= 000010   	DF$TMP= 100000   	FE.PLA= 000020   	KDSDR0= 172320   	L.LSF   000044
CL$NRM= 000020   	DISP    000012R  	FS.AST= 000000   	KISAR0= 172340   	L.LVL   000001
CL$SFL= 000004   	DISQIO  002342RG 	FS.CIB= 002000   	KISAR5= 172352   	L.NDA   000034
CL$TYP= 000001   	D$CHN   000002   	FS.CRA= 001000   	KISAR6= 172354   	L.NIN   000016
CL.MU1= 000001   	D$FLG   000000   	FS.DIS= 013000   	KISAR7= 172356   	L.NLA   000036
CL.MU2= 000002   	D$LEN   000014   	FS.DVC= 001000   	KISDR0= 172300   	L.NSTA  000025
CL.RES= 177774   	D$LNG   000005   	FS.ENB= 012000   	KISDR6= 172314   	L.NXN   000014
CMODE = 140000   	D$NAM   000006   	FS.GET= 006000   	KISDR7= 172316   	L.PDV   000041
CONQIO  002174RG 	D$USE   000004   	FS.INI= 000000   	K$$CNT= 177546   	L.REM   000006
CS.ABO= 000100   	D$$BUG= 177514   	FS.KIL= 000000   	K$$CSR= 177546   	L.RLA   000010
CS.BUF= 000200   	D$$ISK= 000000   	FS.LTM= 001000   	K$$LDC= 000000   	L.RNO   000020
CS.DCR= 000400   	D$$L11= 000001   	FS.MNT= 004000   	K$$TPS= 000074   	L.STA   000000
CS.DEV= 000002   	D$$YNC= 000000   	FS.MSN= 014000   	LA.ACK= 100000   	L.TC    000042
CS.DIS= 000040   	D$$YNM= 000000   	FS.RNG= 011000   	LA.MSK= 170000   	L.TIC   000043
CS.ENB= 000020   	ER$ABO= 000046   	FS.RTN= 001000   	LA.NAK= 110000   	L.TIPD  000005
CS.EOF= 000001   	ER$ABT= 000011   	FS.SET= 005000   	LA.NMS= 010000   	L.TIPI  000004
CS.ERR= 100000   	ER$ACC= 000042   	FS.STM= 000000   	LA.RES= 060000   	L.UDQ   000034
CS.HFE= 002000   	ER$ACT= 000044   	FS.STP= 002000   	LD$LP = 000000   	L.ULA   000040
CS.LST= 040000   	ER$CDI= 000052   	FS.STR= 001000   	LF.DFL= 000060   	L.USA   000030
CS.MTL= 004000   	ER$COM= 000047   	FS.TRM= 003000   	LF.DSP= 000040   	L.USTA  000024
CS.RNG= 000010   	ER$FCF= 000050   	FS.XKL= 002000   	LF.DST= 000020   	L.XQ1   000046
CS.ROV= 000004   	ER$FMT= 000005   	FS.XOF= 010000   	LF.FPN= 000010   	L.XQ2   000050
CS.RSN= 010000   	ER$GEN= 000007   	FS.XON= 007000   	LF.HF0= 001000   	L.XQ3   000052
CS.SUC= 000001   	ER$IFC= 000030   	F$$LVL= 000001   	LF.HMF= 020000   	MA.DA = 000000
CS.TMO= 020000   	ER$ILS= 000043   	GETLUN  002716RG 	LF.HSF= 010000   	MA.IL = 000020
CTRES = ****** GX	ER$IMG= 000053   	GETSMS= ****** GX	LF.INR= 000100   	MC.CC = 000040
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 27-2
SYMBOL TABLE

MC.CI = 000020   	NE$UOB= 000004   	NT$ILN= 000032   	N$$USR= 000001   	N.SDL2  000042
MC.DC = 000100   	NE.ABO= 177776   	NT$IND= 000024   	N.ACNT  000116   	N.SDS1  000040
MC.DI = 000060   	NE.ACT= 177771   	NT$INL= 000026   	N.ACTL  000114   	N.SDS2  000056
MC.NO = 000000   	NE.CLS= 177767   	NT$INT= 000004   	N.CAC   000120   	N.SEG   000006
MC.ST = 000120   	NE.DIS= 177777   	NT$LS = 000014   	N.CACC  000116   	N.SEGZ  000002
MD.BM = 000040   	NE.FMT= 177770   	NT$MOD= 000012   	N.CBL = 000142   	N.SFM   000036
MD.EM = 000100   	NE.NDT= 177766   	NT$NAK= 000022   	N.CDA   000142   	N.SFMT  000034
MD.ILS= 000040   	NE.NOD= 177774   	NT$OFF= 000026   	N.CDAC  000140   	N.SGP   000040
MD.IM = 000020   	NE.REJ= 177775   	NT$ON = 000002   	N.CID   000064   	N.SGRP  000036
MF.ACK= 000004   	NE.RES= 177773   	NT$QRY= 000014   	N.CIDC  000062   	N.SND   000030
MF.CTL= 000010   	NE.TIM= 177772   	NT$REJ= 000004   	N.CPS   000106   	N.SNM   000046
MF.DAT= 000000   	NI.FLI= 000002   	NT$ROU= 000022   	N.CPSC  000104   	N.SNMC  000044
MPAR  = 172100   	NI.FRI= 000004   	NT$RTI= 000010   	N.CTL   000000   	N.SOBJ  000035
MPCSR = 177746   	NI.FRT= 000001   	NT$RTN= 000000   	N.DDE   000010   	N.SOT   000037
MSGHDR= 000007   	NI.FUB= 000010   	NT$SNG= 000006   	N.DDEC  000006   	N.SUS   000042
MS.AST= 000010   	NI.INI= 000001   	NT$STP= 000004   	N.DDL1  000012   	N.SUSR  000040
MS.CIP= 000200   	NI.RLI= 000002   	NT$XOF= 000020   	N.DDL2  000016   	PD$NSP= ****** GX
M$$CRB= 000124   	NI.RRI= 000004   	NT$XON= 000016   	N.DDS1  000014   	PF$EIP= 000100
M$$CRX= 000000   	NI.RVE= 000001   	NT.ABO= 000005   	N.DDS2  000020   	PF$ENB= 000200
M$$FCS= 000000   	NI.VER= 000002   	NT.ABT= 000004   	N.DFM   000004   	PF$OFF= 000000
M$$MGE= 000000   	NO.DTR= 000077   	NT.ACK= 000001   	N.DFMT  000010   	PF$RLI= 000002
M$$OVR= 000000   	NO.FAL= 000021   	NT.BOM= 000040   	N.DGP   000006   	PF$RRI= 000004
M.MAIL  000012   	NO.FA1= 000001   	NT.CON= 000001   	N.DGRP  000012   	PF$RVE= 000001
M.MAX   000007   	NO.NCU= 000023   	NT.DSC= 000003   	N.DNM   000014   	PF$RVR= 000040
M.MBL = 000016   	NO.RTL= 000022   	NT.EOM= 000100   	N.DNMC  000012   	PF$SLI= 000002
M.NAST  000005   	NO.TAS= 000000   	NT.FCN= 037400   	N.DOBJ  000011   	PF$SRI= 000004
M.NEXT  000000   	NO.TCL= 000017   	NT.INT= 000002   	N.DOT   000005   	PF$SRT= 000001
M.SPA   000010   	NO.TC1= 000005   	NT.LOG= 000011   	N.DUS   000010   	PF$STA= 000003
M.STAT  000004   	NO.TLK= 000020   	NT.MD1= 000420   	N.DUSR  000014   	PF$SUB= 000010
M.TASK  000002   	NP$RTR= 000003   	NT.MFL= 000002   	N.LGTH= 000160   	PF$UP = 000001
M.USE   000006   	NR$IFC= 000030   	NT.MOD= 000020   	N.NODE  000000   	PIRQ  = 177772
NC.FM0= 000000   	NSCAN   000160R  	NT.MOM= 000000   	N.OPDL  000136   	PMODE = 030000
NC.FM1= 000001   	NSCHK   000024R  	NT.MOP= 000010   	N.OPTD  000140   	PROINT  000704R
NC.FM2= 000002   	NSPWR   000160R  	NT.NAK= 000002   	N.PASL  000102   	PROSND  000600R
NETQIO  000162RG 	NSQUE   000142RG 	NT.NFL= 000000   	N.PASS  000104   	PR0   = 000000
NETTIM= 000005   	NSTMO   000160R  	NT.SFL= 000001   	N.RAC   000070   	PR1   = 000040
NE$ABO= 000046   	NSULT   000010R  	NT.SOL= 000140   	N.RACC  000066   	PR4   = 000200
NE$ABT= 000011   	NS.BOM= 000040   	NT.XOF= 000004   	N.RDE   000012   	PR5   = 000240
NE$ACC= 000042   	NS.EOM= 000100   	NT.XON= 000010   	N.RDEC  000010   	PR6   = 000300
NE$ACT= 000044   	NS.MFL= 000003   	N$ACQ   000000   	N.RFM   000006   	PR7   = 000340
NE$CDI= 000052   	NS.MOM= 000000   	N$ICF   000006   	N.RGP   000010   	PS    = 177776
NE$COM= 000047   	NS.NFL= 000001   	N$LNI   000010   	N.RID   000034   	PS$NTI= 000003
NE$FCF= 000050   	NS.SET= 000002   	N$LVC   000022   	N.RIDC  000032   	PS$OFF= 000000
NE$FMT= 000005   	NS.SFL= 000002   	N$NOD   000032   	N.RND   000000   	PS$STR= 000001
NE$GEN= 000007   	NS.SOL= 000140   	N$PLD   000026   	N.RNM   000016   	PS$UP = 000005
NE$ILS= 000043   	NS.SUC= 000001   	N$STS   000042   	N.RNMC  000014   	PS$VER= 000004
NE$IMG= 000053   	NT$ABO= 000022   	N$TCB   000004   	N.ROT   000007   	PS$WT = 000002
NE$MLB= 000006   	NT$ACC= 000002   	N$TMP   000012   	N.RPS   000056   	P$CHN   000004
NE$NOD= 000002   	NT$ADS= 000000   	N$VER   000036   	N.RPSC  000054   	P$CNT   000005
NE$NSD= 000003   	NT$AKD= 000016   	N$$DAT= 000030   	N.RQDL  000060   	P$FRQ   000012
NE$RES= 000001   	NT$AKI= 000020   	N$$DIS= 000020   	N.RQID  000062   	P$FSP   000013
NE$SSR= 000000   	NT$CC = 000012   	N$$INT= 000020   	N.RQL = 000110   	P$LCD   000002
NE$SSS= 000045   	NT$CON= 000000   	N$$LDV= 000001   	N.RSRV= 000030   	P$LEN   000014
NE$STA= 000051   	NT$DAT= 000002   	N$$MOV= 000010   	N.RUS   000012   	P$LST   000000
NE$TCN= 000040   	NT$DIS= 000010   	N$$OPT= 000020   	N.SDE   000042   	P$NOD   000010
NE$TCO= 000041   	NT$IDC= 000034   	N$$OVR= 000042   	N.SDEC  000040   	P$PFQ   000006
NE$TPA= 000010   	NT$IDN= 000030   	N$$SYS= 000001   	N.SDL1  000036   	P$TIM   000003
NSDRV	MACRO M1110  13-OCT-79 10:01  PAGE 27-3
SYMBOL TABLE

P$$P45= 000000   	ST$CIS= 000001   	UISAR4= 177650   	V.ULT   000006   	W.WBL = 000040
P$$WRD= 000000   	ST$DAT= 000005   	UISAR5= 177652   	V.ULTE  000010   	XMINT   001154R
Q$$OPT= 000010   	ST$DID= 000015   	UISAR6= 177654   	V.VBL = 000026   	XMSEG   000750R
RECQIO  001662RG 	ST$DIP= 000006   	UISAR7= 177656   	V.1CPQ  000022   	X$$DBT= 000000
REJ     002420R  	ST$DIR= 000012   	UISDR0= 177600   	WINDOW= 004000   	$ACHKB= ****** GX
RF.CLN= 000000   	ST$DIS= 000014   	UISDR4= 177610   	WS.DIC= 000004   	$ALOCB= ****** GX
RF.CTL= 000003   	ST$UDI= 000013   	UISDR5= 177612   	WS.DIP= 000100   	$BLXIO= ****** GX
RF.TIM= 177400   	ST$UNR= 000011   	UISDR6= 177614   	WS.EST= 000002   	$CMPDV= ****** GX
RF.TM0= 000400   	SWR   = 177570   	UISDR7= 177616   	WS.INT= 000040   	$DIV  = ****** GX
RF.WTD= 000020   	S$EMR   000006   	USRDAT= ****** GX	WS.KIP= 000200   	$GTPKT= ****** GX
RF.WTM= 000030   	S$FMT   000012   	USRINT= ****** GX	WS.MOD= 000010   	$HEADR= ****** GX
RF.WTS= 000010   	S$LEN   000040   	USRMOD= ****** GX	WS.STA= 000020   	$IOFIN= ****** GX
RH.CNT= 000001   	S$LNK   000022   	USRRCV= ****** GX	WS.VE1= 000001   	$LDBGT= ****** GX
RH.EFM= 000020   	S$MLK   000024   	US.MDM= ****** GX	W.CCBU  000006   	$LDBRT= ****** GX
RH.HDR= 000002   	S$NKS   000010   	U.SCB = ****** GX	W.CINT  000032   	$MUL  = ****** GX
RH.PRI= 000014   	S$RES   000014   	U.STS = ****** GX	W.CSND  000020   	$NSDBP  000010RG
RH.PR1= 000004   	S$SEC   000000   	U.VCB = ****** GX	W.CTL   000000   	$NSDDB= ****** GX
RH.RFM= 000100   	S$SNI   000016   	VF$RCV= 100000   	W.INTQ  000034   	$NSTBL  000000RG
RLSBUF= ****** GX	S$UMR   000004   	VF$XMT= 040000   	W.LLA   000010   	$QACK   001410RG
R$$DER= 000000   	S$UMS   000002   	V$FLG   000000   	W.LUN   000007   	$QBPC   000570RG
R$$K11= 000001   	S$UNI   000020   	V$LEN   000022   	W.MBOX  000016   	$QDATR  001760RG
R$$SND= 000000   	S$$WRG= 000000   	V$RCV   000002   	W.MODC  000005   	$QIFC   000674RG
R$$11M= 000000   	S$$YSZ= 007600   	V$XMT   000012   	W.PIO   000014   	$QINSP= ****** GX
SISDR0= 172200   	TPS   = 177564   	V$$CTR= 001000   	W.RCVQ  000026   	$QNAK   001572RG
SNDCK = ****** GX	T$$KMG= 000000   	V.CULT  000004   	W.SEGZ  000012   	$QTIMR  002514RG
SNDQIO  000360RG 	T$$MIN= 000000   	V.GENQ  000016   	W.SNDQ  000022   	$QXCP   001250RG
SR0   = 177572   	UBMPR = 170200   	V.MBXQ  000012   	W.STAT  000004   	$REGSV= ****** GX
SR3   = 172516   	UDSAR0= 177660   	V.TIME  000003   	W.TASK  000002   	$RELOC= ****** GX
ST$CC = 000002   	UDSDR0= 177620   	V.TIMR  000002   	W.ULA   000011   	$XMTBF= ****** GX
ST$CIR= 000003   	UISAR0= 177640   	V.TRCT  000000

. ABS.	000160	   000
      	003100	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  19727 WORDS  ( 78 PAGES)
DYNAMIC MEMORY:  20620 WORDS  ( 79 PAGES)
ELAPSED TIME:  00:01:15
NSDRV,[131,34]NSDRV/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,[131,10]NSDRV
NSDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:02	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ACC   	  002310 R	 20-946    #20-972    
A$$CHK	= 000000	 26-1227   
BLKLOC	  003022 R	 8-371      21-1019   #26-1225   
BLXIO 	  003062 R	 13-587     14-631     19-891    #27-1275   
BUFCHK	  002756 R	 20-951     20-956     20-975     21-1001    21-1023   #26-1190   
CLS   	  000240 R	 8-324     #8-340     
CONQIO	  002174 RG	 4-119     #20-941    
CTRES 	= ******  GX	 11-498    
C.BUF 	  000014	*13-577     13-578     13-582     14-626    *15-701     19-877     19-887    
C.BUF2	  000024	 15-701    
C.CNT 	  000020	*13-565     13-573    *14-621     19-871    
C.FNC 	  000010	*13-590    *14-633    
C.LIN 	  000006	*13-555    *14-617    *19-931     25-1163   
C.MOD 	  000011	 15-663    
C.STS 	  000012	*13-589     19-899    
DISP  	  000012 R	#4-117      5-199     
DISQIO	  002342 RG	 4-120     #21-988    
FC.XME	= 000000	 13-590     14-633    
GETLUN	  002716 RG	 8-321      20-967     21-990    #24-1139   
GETSMS	= ******  GX	 12-530    
GETULA	  002612 RG	 20-959    #23-1092   
GETWB 	  002736 R	 15-662     19-868    #25-1162   
GETWB1	  002744 R	 11-468     12-513     16-725     17-798    #25-1164   
GND   	  000264 R	 8-344     #8-353     
H.LUN 	= ******  GX	 24-1141   
H.NML 	= ******  GX	 5-188     *8-337      8-340      21-995     21-1006   
IECMN 	  000124 RG	 5-192      5-197     #5-217      8-374      10-448     18-852     21-1004   
IE.ABO	= ******  GX	 10-446     18-850    
IE.BAD	= ******  GX	 8-367      20-941     21-1016    26-1204   
IE.DAO	= ******  GX	 19-912    
IE.NNT	= 177660	 5-195     
IE.PRI	= ******  GX	 5-176      21-988    
IE.RSU	= ******  GX	 8-332      23-1119   
IE.SPC	= ******  GX	 10-443     18-847     26-1239   
IE.WLK	= ******  GX	 10-432    
ISSUC 	  000126 R	#5-218     
IS.SUC	= ******  GX	 15-673     16-745     19-909    
I.FCN 	= ******  GX	 5-170      5-191      5-196      8-323      8-343      8-353      8-357      10-407     20-945    
                         21-992    
I.LN2 	= ******  GX	 5-219      8-336      8-346      10-393     18-830     20-969     21-989     21-997     24-1139   
I.PRM 	= ******  GX	 8-356     *8-356      8-360     *10-410     10-411    *10-411    *10-412     10-413    *10-422    
                         10-430     13-558     13-562     13-564    *13-566     13-574     13-575    *13-576     13-583    
                        *13-597     14-620     14-622     14-627     15-688     16-731     16-734    *16-736     16-759    
                        *16-760    *16-771    *16-772     17-805    *17-805     17-806    *17-806     17-807    *17-807    
                         18-833     18-838     19-872    *19-874     19-875     19-878    *19-879    *19-880    *19-881    
                         19-886     19-908     19-910    *19-926     20-942     20-945     21-999     21-1009   
KISAR6	= 172354	*20-978    *21-1026   
M$$MGE	= 000000	 13-580     14-624     19-883     20-978     21-1026    26-1227    27-1276   
M.MBL 	= 000016	 8-329     
NETQIO	  000162 RG	 4-121     #8-321     
NSCAN 	  000160 R	 4-102     #6-271     
NSCHK 	  000024 R	 4-101     #5-166     
NSDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:02	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

NSPWR 	  000160 R	 4-104     #6-257     
NSQUE 	  000142 RG	 5-172     #5-244      8-376      21-1029   
NSTMO 	  000160 R	 4-103     #6-270     
NSULT 	  000010 R	#4-111      22-1051    25-1165   
NT$DAT	= 000002	 13-590    
NT$INT	= 000004	 14-633     15-663    
NT.BOM	= 000040	 13-560     13-594    
NT.EOM	= 000100	 13-569     19-899    
N$LVC 	  000022	 22-1050   
N$$DAT	= 000030	 13-577    
N.CTL 	  000000	 20-972     21-1014   
N.RQL 	= 000110	 20-948    
PD$NSP	= ******  GX	 5-168     
PROINT	  000704 R	 10-439     10-441    #12-527     15-692     22-1065   
PROSND	  000600 R	 10-426     10-428    #11-482     22-1062   
P$$RFL	= ******	 3-2        6-258     
RECQIO	  001662 RG	 4-118     #18-830    
REJ   	  002420 R	 21-993    #21-1006   
RLSBUF	= ******  GX	 12-534     15-691    
SNDCK 	= ******  GX	 11-487     15-697    
SNDQIO	  000360 RG	 4-117     #10-393    
USRDAT	= ******  GX	 13-591    
USRINT	= ******  GX	 14-634    
USRMOD	= ******  GX	 18-845    
USRRCV	= ******  GX	 19-932    
US.MDM	= ******  GX	 8-326     
U.SCB 	= ******  GX	 5-245     
U.STS 	= ******  GX	 8-326     
U.VCB 	= ******  GX	 23-1092   
V$$ER1	= ******	 3-1        3-68       4-123      5-179      5-221      7-289      10-399     15-675     16-747    
                         19-914    
V.CULT	  000004	 23-1093    23-1097    23-1099    23-1114   
V.ULT 	  000006	 23-1099    23-1114   
V.ULTE	  000010	 23-1097   
WS.DIP	= 000100	 10-394     18-831    
WS.INT	= 000040	 12-529     12-536     22-1056    22-1063   
WS.STA	= 000020	 11-489     11-499     22-1056    22-1060   
W.CCBU	  000006	 11-490    *11-494    *15-704    
W.CINT	  000032	 10-438    *10-440     12-527     14-618    *14-637    
W.CSND	  000020	 10-425    *10-427     11-483     13-556    *13-568     15-699     17-809    *17-812    
W.INTQ	  000034	 10-433     10-436    *10-437     15-667    
W.LLA 	  000010	 11-486     13-555     14-617     15-695     18-844     19-931    
W.LUN 	  000007	*20-968    
W.RCVQ	  000026	 18-836    *18-837     19-869     19-901    *19-902    *19-904     19-905    *19-905    
W.SEGZ	  000012	 10-416     13-561     16-768    
W.SNDQ	  000022	 10-423    *10-424     16-729    *16-739    *16-741     16-742    *16-742     17-801     17-812    
W.STAT	  000004	 10-394    *11-489    *11-499    *12-529    *12-536     18-831     22-1056    22-1060    22-1063   
W.ULA 	  000011	*20-965    
W.WBL 	= 000040	 20-962     23-1107   
XMINT 	  001154 R	 12-532    #14-616    
XMSEG 	  000750 R	 11-495    #13-554     15-702    
$ACHKB	= ******  GX	 26-1237   
NSDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:02	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$ALOCB	= ******  GX	 8-330      23-1108   
$BLXIO	= ******  GX	 27-1280   
$CMPDV	= ******  GX	*5-168     
$DIV  	= ******  GX	 10-417    
$GTPKT	= ******  GX	 5-247     
$HEADR	= ******  GX	 5-177     
$IOFIN	= ******  GX	 5-227      15-689     16-761     19-927    
$LDBGT	= ******  GX	 11-492    
$LDBRT	= ******  GX	 15-705    
$MUL  	= ******  GX	 16-769    
$NSDBP	  000010 RG	#4-110     
$NSDDB	= ******  GX	 22-1049   
$NSTBL	  000000 RG	#4-101     
$QACK 	  001410 RG	#16-721    
$QBPC 	  000570 RG	#11-467    
$QDATR	  001760 RG	#19-867    
$QIFC 	  000674 RG	#12-512    
$QINSP	= ******  GX	 5-246     
$QNAK 	  001572 RG	#17-797    
$QTIMR	  002514 RG	#22-1049   
$QXCP 	  001250 RG	#15-661    
$REGSV	= ******  GX	 11-467     12-512     15-661     16-721     19-867    
$RELOC	= ******  GX	 26-1244   
$XMTBF	= ******  GX	 11-490    
NSDRV      CREATED BY  MACRO  ON 13-OCT-79 AT 10:02	PAGE 4

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		 5-246      8-321      8-330      8-371      10-417     11-468     11-487     11-492     11-495     11-498    
                 12-513     12-530     12-532     13-587     13-591     14-631     14-634     15-662     15-689     15-691    
                 15-697     16-725     16-761     16-769     17-798     19-868     19-891     19-927     20-951     20-956    
                 20-959     20-967     20-975     21-990     21-1001    21-1019    21-1023    22-1062    22-1065    23-1108   
                 26-1237    26-1244    27-1280   
CALLR 		#5-227     #5-247     #10-448    #12-534    #15-692    #15-702    #15-705    #18-845    #18-852    #19-932    
CCBDF$		#3-64      #3-65      
CNBDF$		#3-59       3-61      
CRBDF$		#3-59      #3-60      
DVBDF$		#3-54       3-57      
HWDDF$		#20-978     20-978    #21-1026    21-1026   
LLWDF$		#3-54       3-56      
MAP   		#3-52      #20-978    #21-1026   
MBXDF$		#3-54       3-55      
NSPSY$		#3-64       3-66      
NSSYM$		#3-59      #3-62      
POP   		#3-88      #5-218     #5-244     #10-421    #13-592    #14-635    #15-690    #16-724    #16-762    #19-895    
                #19-928    #22-1066   #23-1109   #27-1281   
PUSH  		#3-82       5-166      13-554     13-571     14-616     14-619     15-666     16-722     16-744     19-885    
                 19-906     22-1059    23-1106    27-1278   
RETURN		 6-271      11-500     12-537     13-598     14-638     16-773     17-815     22-1069    23-1121    24-1144   
                 25-1167    26-1249    27-1290   
SOB   		#20-964    #22-1068