Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/monitor/nspint.list
There are no other files named nspint.list in the archive.
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 1
NSPINT	MAC	18-Sep-81 07:02	

     1					; UPD ID= 197, SNARK:<5.MONITOR>NSPINT.MAC.10,  18-Sep-81 07:02:54 by GRANT
     2					;REMOVE MOVSEG FROM EXTN
     3					; UPD ID= 196, SNARK:<5.MONITOR>NSPINT.MAC.9,  17-Sep-81 16:26:21 by GRANT
     4					;Remove another MOVSEG
     5					; UPD ID= 195, SNARK:<5.MONITOR>NSPINT.MAC.8,  17-Sep-81 14:58:08 by GRANT
     6					;Remove call to MOVSEG
     7					; UPD ID= 1431, SNARK:<5.MONITOR>NSPINT.MAC.7,   9-Jan-81 17:47:30 by MURPHY
     8					;MOVE STMXDF TO NSPSRV FROM HERE
     9					; UPD ID= 1407, SNARK:<5.MONITOR>NSPINT.MAC.7,   6-Jan-81 14:51:40 by MURPHY
    10					;TURN OFF CODE BECAUSE IT ISN'T USED NOW
    11					; UPD ID= 1093, SNARK:<5.MONITOR>NSPINT.MAC.6,   1-Oct-80 13:40:39 by MURPHY
    12					;FIX ACVAR
    13					; UPD ID= 1006, SNARK:<5.MONITOR>NSPINT.MAC.5,  11-Sep-80 18:15:07 by GRANT
    14					;Change MONX01 to MONX06 in OPNINT routine
    15					; UPD ID= 910, SNARK:<5.MONITOR>NSPINT.MAC.4,  18-Aug-80 21:09:37 by MURPHY
    16					;Use BLKLLK instad of BLKLOK where LLLLCK not set
    17					; UPD ID= 758, SNARK:<5.MONITOR>NSPINT.MAC.3,  16-Jul-80 16:01:37 by MURPHY
    18					;Replace another CALL TSTLCL...
    19					; UPD ID= 755, SNARK:<5.MONITOR>NSPINT.MAC.2,  14-Jul-80 11:20:39 by GRANT
    20					;Replace CALL TSTLCL with TQNE - subroutine TSTLCL has been removed
    21					;<OSMAN.MON>NSPINT.MAC.1, 10-Sep-79 15:46:53, EDIT BY OSMAN
    22					;TCO 4.2412 - Move definition of BUGHLTs, BUGCHKs, and BUGINFs to BUGS.MAC
    23					;<4.MONITOR>NSPINT.MAC.58,  4-Mar-79 18:40:12, Edit by KONEN
    24					;UPDATE COPYRIGHT FOR RELEASE 4
    25					;<4.MONITOR>NSPINT.MAC.57, 21-Feb-79 21:47:04, EDIT BY KIRSCHEN
    26					;ADD BUGINF FOR FREE SPACE EXHAUSTED CONDITION
    27					;<4.MONITOR>NSPINT.MAC.56, 18-Feb-79 09:10:28, EDIT BY KIRSCHEN
    28					;NSPINT.MAC.55 WAS EDIT TO FIX BACKGROUND TASK WAKEUP BUG
    29					;<4.MONITOR>NSPINT.MAC.54, 15-Feb-79 16:43:47, EDIT BY ENGEL
    30					;ADD CODE TO ALLOW ATS TO SET FLOW CONTROL
    31					;<4.MONITOR>NSPINT.MAC.53,  8-Feb-79 17:53:41, EDIT BY MILLER
    32					;IF CLZSDI FAILS, RELEASE LINK BLOCK ANYWAY
    33					;<4.MONITOR>NSPINT.MAC.52, 30-Jan-79 09:38:01, EDIT BY KIRSCHEN
    34					;CONVERT NSP ERROR CODE TO TOPS20 ERROR CODE IN XNSRLS
    35					;<4.MONITOR>NSPINT.MAC.51, 30-Jan-79 09:04:20, EDIT BY KIRSCHEN
    36					;ADD PERFORMANCE BREAKPOINT
    37					;<4.MONITOR>NSPINT.MAC.50, 12-Jan-79 20:10:02, EDIT BY KIRSCHEN
    38					;really don't clobber it this time !
    39					;<4.MONITOR>NSPINT.MAC.49, 12-Jan-79 15:05:15, EDIT BY KIRSCHEN
    40					;DO NOT CLOBBER SEGMENT SIZE IN XNSRSS
    41					;<4.MONITOR>NSPINT.MAC.48,  3-Jan-79 15:35:56, EDIT BY KIRSCHEN
    42					;RETURN ERROR CODE IN CLOSE FAILURE DUE TO BAD LINK ID
    43					;<4.MONITOR>NSPINT.MAC.47, 28-Dec-78 14:38:50, EDIT BY KIRSCHEN
    44					;REMOVE DEFENSIVE BUGCHK AT IFLUSH, NOT NEEDED
    45					;<4.MONITOR>NSPINT.MAC.46,  9-Nov-78 08:58:08, EDIT BY KIRSCHEN
    46					;ON FAILURE FROM CRTLNK, DELETE LINK BLOCK AND UNLOCK TREE
    47					;<4.MONITOR>NSPINT.MAC.45,  8-Aug-78 16:16:28, Edit by KIRSCHEN
    48					;RETURN FROM STORING BYTES IN XNSRIN
    49					;<4.MONITOR>NSPINT.MAC.44,  8-Aug-78 16:14:17, Edit by KIRSCHEN
    50					;INITIALIZE LLEOM EACH TIME THRU XNSOUT
    51					;<4.MONITOR>NSPINT.MAC.43,  3-Aug-78 19:12:07, Edit by HALL
    52					;ADD IFIW'S TO THE CLIDSP TABLE
    53					;<4.MONITOR>NSPINT.MAC.42, 26-Jul-78 11:46:39, Edit by KIRSCHEN
    54					;DO  NOT LOCK LINK BLOCK AT START OF CLOSE CODE (DRIVER WILL LOCK IT)
    55					;<4.MONITOR>NSPINT.MAC.41, 28-Jun-78 13:37:53, Edit by KIRSCHEN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 1-1
NSPINT	MAC	18-Sep-81 07:02	

    56					;RETURN ERROR CODE ON SUPERFLUOUS BUFFER
    57					;<4.MONITOR>NSPINT.MAC.40, 26-Jun-78 16:42:59, Edit by KIRSCHEN
    58					;<4.MONITOR>NSPINT.MAC.39, 26-Jun-78 10:36:37, Edit by KIRSCHEN
    59					;MORE CLEAN UP
    60					;<4.MONITOR>NSPINT.MAC.38, 26-Jun-78 10:22:57, Edit by KIRSCHEN
    61					;CLEAN UP, ADD ERROR CODES
    62					;<4.MONITOR>NSPINT.MAC.37, 20-Jun-78 16:25:14, Edit by KIRSCHEN
    63					;UNLOCK BLOCK WHEN ERROR IN CLOSE
    64					;<4.MONITOR>NSPINT.MAC.36, 16-Jun-78 15:10:34, Edit by KIRSCHEN
    65					;FIX TEST FOR ABORT CLOSE AT CLIDIR
    66					;<4.MONITOR>NSPINT.MAC.35, 14-Jun-78 14:17:42, Edit by KIRSCHEN
    67					;<4.MONITOR>NSPINT.MAC.34, 14-Jun-78 08:21:11, Edit by KIRSCHEN
    68					;<4.MONITOR>NSPINT.MAC.33, 13-Jun-78 15:53:02, Edit by KIRSCHEN
    69					;<4.MONITOR>NSPINT.MAC.32, 13-Jun-78 09:01:41, Edit by KIRSCHEN
    70					;<4.MONITOR>NSPINT.MAC.31, 13-Jun-78 09:00:40, Edit by KIRSCHEN
    71					;ADD OTHER CLOSE STATES
    72					;<4.MONITOR>NSPINT.MAC.30, 12-Jun-78 14:50:47, Edit by KIRSCHEN
    73					;MORE BUG FIXES TO OPNINT
    74					;<4.MONITOR>NSPINT.MAC.29, 12-Jun-78 14:14:44, Edit by KIRSCHEN
    75					;SUPPLY DEFAULT REASON IF NEEDED ON CLOSE
    76					;<4.MONITOR>NSPINT.MAC.28, 12-Jun-78 11:39:11, Edit by KIRSCHEN
    77					;SEND OPTIONAL DATA ON CLOSE
    78					;<4.MONITOR>NSPINT.MAC.27,  8-Jun-78 15:29:55, Edit by KIRSCHEN
    79					;<4.MONITOR>NSPINT.MAC.26,  8-Jun-78 14:35:13, Edit by KIRSCHEN
    80					;ADD SOME ERROR CODES
    81					;<4.MONITOR>NSPINT.MAC.25,  8-Jun-78 12:18:08, Edit by KIRSCHEN
    82					;<4.MONITOR>NSPINT.MAC.24,  8-Jun-78 12:16:05, Edit by KIRSCHEN
    83					;MORE CLOSE CODE
    84					;<4.MONITOR>NSPINT.MAC.23,  8-Jun-78 09:16:02, Edit by KIRSCHEN
    85					;<4.MONITOR>NSPINT.MAC.22,  8-Jun-78 09:04:40, Edit by KIRSCHEN
    86					;DO NOT USE ARG BLOCK ENTRIES NOT PRESENT IN OPNINT
    87					;<4.MONITOR>NSPINT.MAC.21,  7-Jun-78 10:15:49, Edit by KIRSCHEN
    88					;<4.MONITOR>NSPINT.MAC.20,  7-Jun-78 10:14:32, Edit by KIRSCHEN
    89					;YET MORE CLOSE CODE
    90					;<4.MONITOR>NSPINT.MAC.19,  5-Jun-78 13:55:36, Edit by KIRSCHEN
    91					;<4.MONITOR>NSPINT.MAC.18,  5-Jun-78 13:53:43, Edit by KIRSCHEN
    92					;<4.MONITOR>NSPINT.MAC.17,  1-Jun-78 10:45:20, Edit by KIRSCHEN
    93					;<4.MONITOR>NSPINT.MAC.16,  1-Jun-78 10:41:43, Edit by KIRSCHEN
    94					;ADD MORE CLOSE CODE
    95					;<4.MONITOR>NSPINT.MAC.15, 30-May-78 13:19:16, Edit by KIRSCHEN
    96					;RETURN LINK ADDRESS IN T4 FROM CREATE LINK FUNCTION FOR DEBUGGING
    97					;<4.MONITOR>NSPINT.MAC.14, 30-May-78 09:08:12, Edit by KIRSCHEN
    98					;MAKE SOME ROUTINES INTERNAL
    99					;<4.MONITOR>NSPINT.MAC.13, 26-May-78 11:48:07, Edit by KIRSCHEN
   100					;BREAK INTERNAL INTERFACE CODE OUT OF NSPSRV
   101
   102					;THIS SOFTWARE IS FURNISHED UNDER A LICENSE AND MAY ONLY BE USED
   103					;  OR COPIED IN ACCORDANCE WITH THE TERMS OF SUCH LICENSE.
   104					;
   105					;COPYRIGHT (C) 1976,1977,1978,1979 BY DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
   106
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 2
NSPINT	MAC	18-Sep-81 07:02	

   107						SEARCH NSPPAR,PROLOG,PROKL
   108
   109
   110						EXTN <FLUSH,DELNOD,CHKDCR,NSPERR>^
   111						EXTN <SNDSEG,SNINT,RDSTS,MTRNCK,MOVSTR,CLZSDI>^
   112						EXTN <STRSAV,OBJSRC,TELOBE,SNDCHK,CHKEMP>^
   113						EXTN <MAKTST,TIMWAT,RDINT,LOKLL>^
   114						EXTN <LLLKUP,LOKLL,ULOKLL,BLKLOK,BLKULK,OPNIWK,MAKMSG>^
   115						EXTN <CRTLNK,DELNOD,MOVST1,MAKFLG,INTSET,GETRES>^
   116						EXTN <ASGWDW,BLKASG,CMPLEN,DCNNAM,DCNSET,EXTSET,ITSID>^
   117						EXTN <ITSNAM,ITSNUM,LASTSK,LLBIT,LLBITS,LLHEAD,LLLLCK>^
   118						EXTN <MAXBLK,MAXEXP,MAXLNK,MCBDTE,MSGQ,NAKCNT,NETDIR>^
   119						EXTN <NETSR1,NETSQ1,NETUIN,NETUOU,NODNUM,NSPLPB,NSPMAX>^
   120						EXTN <OBJMAX,OBJTBL,OPNDNC,OPNSRC,OURCNT,OURNAM,OURNUM>^
   121						EXTN <PRSNAM,RMSGQ,SMSGQ,SRCNAM,SRNSET,VERSET>^
   122
   123						TTITLE (NSPINT,,< - Network Services Protocol Internal Interface>)^
   124					^
   125
   126		   	   000000	NSINTF==0			;FLAG CONTROLS INCLUSION OF THIS MODULE
   127
   128					   IFE NSINTF,<
   129	000000'01			OUTSEG::
   130						BUG(NOINTL)		;DUMMY ENTRIES FOR ROUTINES NEVER CALLED
   131						  ;BUG type:    BUGHLT, SOFT
   132						  ;BUG message: CALL TO ROUTINE NOT PRESENT IN THIS CONFIGURATION
   133						       SALL
   134	000000'01  256 00 0 00 000001'
   135					   >
   136					   IFN NSINTF,<
   137					
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 3
NSPINT	MAC	18-Sep-81 07:02	

   138					;DEFINE LOCAL MACROS
   139					
   140						DEFINE LLLOCK
   141					   <	CALL LOKLL		;;GO LOCK UP THE TREE
   142					   >				;;END OF LLLOCK MACRO
   143					
   144						DEFINE LLLULK
   145					   <	CALL ULOKLL		;;GO UNLOCK THE TREE
   146					   >				;;DONE
   147					
   148					   DEFINE ATTENT (VALUE,BIN,COUNT,EXCLU)
   149					<	<BIN>B0+<COUNT>B17+EXCLU*1000+VALUE
   150					>
   151					
   152					DEFSTR (NTATR,,35,9)
   153					DEFSTR (NTATC,,17,6)
   154					DEFSTR (NTATE,,26,9)
   155					DEFSTR (NTATB,,0,1)
   156					
   157						DEFAC (STS,P1)
   158						DEFAC (JFN,P2)
   159						DEFAC (DEV,P4)
   160						DEFAC (F1,P5)
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 4
NSPINT	MAC	18-Sep-81 07:02	

   161					SUBTTL	NSP Internal Interface
   162					
   163					
   164					; NSP FUNCTION DISPATCH VECTOR
   165					
   166						SWAPCD
   167					
   168					NSPVEC::PHASE 0			;INSURE NO SKEW IN DEFINITIONS OF OFFSETS
   169					
   170					.NSCRT::!XNSCRT!IFIW		;CREATE AN INTERNAL LOGICAL LINK
   171					.NSCLZ::!XNSCLZ!IFIW		;CLOSE AN INTERNAL LOGICAL LINK
   172					.NSOUT::!XNSOUT!IFIW		;OUTPUT TO AN INTERNAL LOGICAL LINK
   173					.NSINB::!XNSINB!IFIW		;DRIVER IS PROVIDING NSP WITH A BUFFER FOR INPUT
   174					.NSRIN::!XNSRIN!IFIW		;READ INTERRUPT MESSAGE ON INTERNAL LOGICAL LINK
   175					.NSSIN::!XNSSIN!IFIW		;SEND INTERRUPT MESSAGE ON INTERNAL LOGICAL LINK
   176					.NSTRN::!XNSTRN!IFIW		;TRUNCATE THE CURRENT MESSAGE
   177					.NSRLS::!XNSRLS!IFIW		;READ LINK STATUS
   178					.NSRHN::!XNSRHN!IFIW		;READ HOST NAME
   179					.NSRTN::!XNSRTN!IFIW		;READ TASK NAME
   180					.NSRDA::!XNSRDA!IFIW		;READ OPTIONAL DATA
   181					.NSRSS::!XNSRSS!IFIW		;READ LINK SEGMENT SIZE
   182					
   183						DEPHASE			;END OF SKEW CHECK
   184					
   185					NSPVLN==.-NSPVEC		;LENGTH OF NSP DISPATCH VECTOR
   186					
   187					XNSRTN::RETBAD (ARGX02)		;FUNCTION NOT IMPLEMENTED
   188					XNSTRN::RETBAD (ARGX02)		;FUNCTION NOT IMPLEMENTED
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 5
NSPINT	MAC	18-Sep-81 07:02	

   189					SUBTTL	Internal Links - Temporary Test Routines
   190					
   191					; LINK CREATION
   192					
   193					MAKINT:	MOVX T1,NS%RD!NS%WRT	;LONG ARG FORMAT, READ AND WRITE
   194						MOVE T2,['DRIVER']	;DRIVER CORRELATION CODE IS SIXBIT "DRIVER"
   195						MOVEI T3,[ IFIW!R
   196							IFIW!R
   197					
   198							IFIW![	CALL ASGPAG
   199								 RET
   200								MOVEI T2,4000
   201								RETSKP ]
   202					
   203							IFIW![	MOVE T1,T2
   204								CALL RELPAG
   205								 JFCL
   206								RET ]
   207							IFIW!R
   208							IFIW!R
   209							IFIW!R
   210							IFIW!R
   211							IFIW!R
   212							IFIW!R
   213							IFIW!R ]
   214						MOVEI T4,[ EXP 13	;SIZE OF ARG BLOCK
   215							[ASCIZ/2136/]
   216							[ASCIZ/TASK/]	;OBJECT TYPE IS TASK
   217							[ASCIZ/DESCRIPTOR/]
   218							4		;OPTIONAL DATA BYTES
   219							[ BYTE (8) 1, 2, 3, 4 ]
   220							[ASCIZ /TSKNAM/]
   221							[ASCIZ /USERID/]
   222							5		;PASSWORD STRING COUNT
   223							[ BYTE (8) 10, 11, 12, 13, 14 ]
   224							[ASCIZ /CHARGE/]]
   225						CALL @NSPVEC+.NSCRT	;MAKE A LINK
   226						 RET			;PLACE FOR FAILURE BREAKPOINT
   227						RETSKP			;SUCCESS
   228					
   229					
   230					; SEND OUTPUT TEST ROUTINE.   PLACE NSP LINK ID IN T1 BEFORE INVOKING...
   231					
   232					SNDOUT:	MOVEI T2,NSPINI
   233						MOVE T3,[NS%EOM+<600*6>]
   234						CALL XNSOUT		;SEND THE DATA
   235						 RET			;FAIL
   236						RETSKP			;SUCCESS
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 6
NSPINT	MAC	18-Sep-81 07:02	

   237					SUBTTL	Internal Links - Create an Internal Link
   238					
   239					XNSCRT::ACVAR <A1,A2,A3,A4>
   240						TRVAR <NTCNT,NTPNT,NTOBJ,NTDSC,NTDSS,NTHST,NTHSC,NTCIB>
   241						STKVAR <CRIFLG,CRICOD,CRIVEC,CRIARG,CRILLB,CRIERR>
   242						MOVEM T1,CRIFLG		;SAVE FLAGS
   243						MOVEM T2,CRICOD		;SAVE DRIVER CORRELATION CODE
   244						MOVEM T3,CRIVEC		;SAVE ADDRESS OF DRIVER VECTOR
   245						MOVEM T4,CRIARG		;SAVE ARGUMENT BLOCK ADDRESS
   246					
   247					; CHECK FOR DUPLICATE DRIVER-CODE/VECTOR PAIRS
   248					
   249					
   250						MOVE T1,CRICOD		;GET DRIVER CORRELATION CODE
   251						MOVE T2,CRIVEC		;GET DRIVER FUNCTION VECTOR
   252						CALL DUPCHK		;GO CHECK FOR DUPLICATES IN OTHER LINKS
   253						 RETBAD ()		;FAILED, RETURN ERROR
   254					
   255					; PARSE NAME OF REMOTE OBJECT TO WHICH CONNECTION IS DESIRED
   256					
   257						MOVE T1,CRIFLG		;GET FLAGS
   258						MOVE T2,CRIARG		;GET ADDRESS OF ARGUMENT BLOCK
   259						CALL PRSINT		;GO PARSE NAME FOR INTERNAL LINK
   260						 RETBAD ()		;FAILED, RETURN ERROR TO DRIVER
   261						DMOVE A1,T1		;COPY COUNTS AND HOST POINTER
   262						DMOVE A3,T3		;COPY DESCRIPTOR POINTER AND OBJECT ID
   263					
   264					; CREATE LOGICAL LINK BLOCK AND INSERT INITIAL VALUES
   265					
   266						NOINT			;DO NOT PPEMIT INTERRUPTS WITH SPACE ASSIGNED
   267						MOVE T4,CRIARG		;GET ADDRESS OF DRIVER ARGUMENT BLOCK
   268						MOVE T1,.NSTSN(T4)	;GET ADDRESS OF TASK NAME STRING
   269						HRLI T1,(POINT 7,)	;FORM POINTER TO TASK NAME
   270						MOVX T2,10		;ALWAYS USE 8-BIT BYTES FOR INTERNAL LINKS
   271						CALL OPNIWK		;CALL WORK ROUTINE TO PERFORM OPEN FUNCTIONS
   272						 RETBAD (,<OKINT>)	;FAILED, RETURN ERROR TO DRIVER
   273						MOVEM T1,CRILLB		;SAVE LOIGICAL LINK BLOCK ADDRESS
   274					
   275					; SET UP I/O DIRECTIONS IN LOGICAL LINK BLOCK
   276					
   277						MOVE T4,CRIFLG		;GET FLAGS PROVIDED BY DRIVER
   278						MOVE T1,CRILLB		;GET ADDRESS OF LOGICAL LINK BLOCK
   279						TXNE T4,NS%RD		;READ WANTED ?
   280						JRST [	SETONE LLOPI,(T1) ;SET INPUT FLAG
   281							JRST .+1]	;CONTINUE
   282						TXNE T4,NS%WRT		;WRITE WANTED ?
   283						JRST [	SETONE LLOPW,(T1) ;SET OUTPUT FLAG
   284							JRST .+1]	;CONTINUE
   285						MOVE T4,CRIARG		;GET ADDRESS OF ARGUMENT BLOCK
   286						CALL STMAXQ		;SET MAXIMUM INPUT/OUTPUT QUEUED VALUES
   287						; ..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 7
NSPINT	MAC	18-Sep-81 07:02	

   288						; ..
   289					
   290					; MOVE STRINGS FOR THIS LOGICAL LINK BLOCK
   291					
   292						MOVE T1,CRILLB		;GET LOGICAL LINK BLOCK ADDRESS
   293						MOVE T2,A1		;GET COUNTS FOR HOST AND DESCRIPTOR STRINGS
   294						MOVE T3,A2		;COPY POINTER TO HOST NAME STRING
   295						MOVE T4,A3		;COPY POINTER TO DESCRIPTOR STRING
   296						CALL STRSAV		;GO SAVE THE STRINGS IN PERMANENT AREAS
   297						 JRST [	MOVEM T1,CRIERR	;FAILED, SAVE ERROR CODE
   298							MOVE T1,CRILLB	;GET LOGICAL LINK BLOCK ADDRESS
   299							CALL CRTCLN	;GO RELEASE LL BLOCK AND OTHERWISE CLEAN UP
   300							MOVE T1,CRIERR	;RESTORE ERROR CODE
   301							RETBAD () ]	;RETURN ERROR TO DRIVER
   302					
   303					; OPEN THE NETWORK CONNECTION FOR THE NEWLY CREATED LINK
   304					
   305						MOVE T1,CRIARG		;GET ADDRESS OF DRIVER ARGUMENT BLOCK
   306						MOVE T2,CRILLB		;GET ADDRESS OF LOGICAL LINK BLOCK
   307						HRL T3,A4		;GET OBJECT ID
   308						HRR T3,A1		;GET COUNT OF BYTES IN DESCRIPTOR STRING
   309						MOVE T4,A3		;COPY POINTER TO DESCRIPTOR STRING
   310						CALL OPNINT		;GO OPEN INTERNAL LINK
   311						 JRST [	MOVEM T1,CRIERR	;FAILED, SAVE ERROR CODE
   312							MOVE T1,CRILLB	;GET LOGICAL LINK BLOCK ADDRESS
   313							CALL CRTCLN	;GO RELEASE LL BLOCK AND OTHERWISE CLEAN UP
   314							MOVE T1,CRIERR	;RESTORE ERROR CODE
   315							RETBAD () ]	;RETURN ERROR TO DRIVER
   316					
   317					; SAVE THE DRIVER CORRELATION CODE AND FUNCTION VECTOR ADDRESS
   318					
   319						MOVE T4,CRIARG		;GET ADDRESS OF ARGUMENT BLOCK
   320						MOVE T3,CRILLB		;RESTORE LOGICAL LINK BLOCK ADDRESS
   321						MOVE T2,CRICOD		;GET DRIVER CORRELATION CODE
   322						STOR T2,LLDRV,(T3)	;SAVE IN LOGICAL LINK BLOCK
   323						MOVE T2,CRIVEC		;GET DRIVER FUNCTION VECTOR ADDRESS
   324						STOR T2,LLVEC,(T3)	;SAVE IN LOGICAL LINK BLOCK
   325						SETONE LLINT,(T3)	;NOTE THAT THIS IS AN INTERNAL LINK
   326						;..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 8
NSPINT	MAC	18-Sep-81 07:02	

   327						;..
   328					
   329					; LOCK THE NEWLY CREATED LINK FOR THE DRIVER
   330					
   331					CRT050:	MOVE T4,CRIFLG		;GET FLAGS FROM DRIVER
   332						TXNN T4,NS%LOK		;DRIVER WANT LINK LOCKED ?
   333						JRST CRT060		;NO, GO ON
   334						MOVE T1,CRILLB		;GET LOGICAL LINK BLOCK ADDRESS
   335						CALL BLKLLK		;LOCK THE BLOCK FOR THE DRIVER
   336						 JRST [	BUG(NSPBAL)
   337							MDISMS		;WAIT FOR LINK TO FREE
   338							JRST CRT050 ]	;GO TRY LOCKING LINK AGAIN, SHOULD BE FREE NOW
   339						OKINT			;BLOCK LOCKED, PERMIT INTERRUPTS AGAIN
   340					
   341					; RETURN LOGICAL LINK ADDRESS AS NSP IDENTIFIER FOR LINK
   342					
   343					CRT060:	MOVE T4,CRILLB		;GET LOGICAL LINK BLOCK ADDRESS
   344						LOAD T1,LLLNK,(T4)	;GET LINK ID
   345						RETSKP			;DONE, RETURN TO DRIVER
   346					
   347					
   348					;CRTCLN - ROUTINE TO CLEAN UP FROM FAILURE
   349					;
   350					;ACCEPTS IN T1/	LOGICAL LINK BLOCK ADDRESS
   351					;		CALL CRTCLN
   352					;RETURNS: +1 ALWAYS
   353					
   354					CRTCLN:	DECR DCCUR		;ONE LESS LINK ON FAILURE
   355						CALL DELNOD		;FREE THE NODE
   356						LLLULK			;UNLOCK THE TREE
   357						OKINT			;PERMIT INTERRUPTS AGAIN
   358						RET			;AND FAIL
   359					
   360					
   361						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 9
NSPINT	MAC	18-Sep-81 07:02	

   362					;STMAXQ - ROUTINE TO PUT MAXIMUM INPUT/OUTPUT QUEUED VALUES INTO LL BLOCK
   363					;
   364					;ACCEPTS IN T1/ LOGICAL LINK BLOCK ADDRESS
   365					;	    T4/ ADDRESS OF ARGUMENT BLOCK 
   366					;
   367					;RETURNS: +1 ALWAYS
   368					
   369					STMAXQ:	MOVE T2,.NSHDR(T4)	;GET NUMBER OF ITEMS IN ARGUMENT BLOCK
   370						CAILE T2,.NSMQI		;USER INCLUDE MAX INPUT IN BLOCK?
   371						SKIPN T2,.NSMQI(T4)	;YES - WAS A ZERO SPECIFIED?
   372						JRST [	CALL STMXDF	;YES - SET MAX DEFAULTS
   373							RET]
   374						STOR T2,LLMQI,(T1)	;SAVE VALUE
   375						MOVE T2,.NSHDR(T4)	;GET NUMBER OF ITEMS IN ARGUMENT BLOCK
   376						MOVEI T3,MAXSGQ		;DEFAULT OUTPUT QUEUE LENGTH
   377						CAIG T2,.NSMQO		;USER INCLUDE MAX OUTPUT IN BLOCK?
   378						JRST STMXQ1		;NO - TAKE DEFAULT
   379						SKIPN T3,.NSMQO(T4)	;YES - WAS A ZERO SPECIFIED?
   380						MOVEI T3,.NSMQO(T4)	;GET SPECIFIED VALUE
   381					STMXQ1:	STOR T3,LLMQO,(T1)	;SAVE VALUE
   382						RET
   383					
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 10
NSPINT	MAC	18-Sep-81 07:02	

   384					;DUPCHK - ROUTINE TO CHECK FOR DUPLICATE DRIVER-CODE/VECTOR PAIRS
   385					;
   386					;ACCEPTS IN T1/	DRIVER CORRELATION CODE
   387					;	    T2/	DRIVER FUNCTION VECTOR ADDRESS
   388					;		CALL DUPCHK
   389					;RETURNS: +1	 FAILED, DUPLICATE CODE/VECTOR PAIR ALREADY IN USE
   390					;	  +2	SUCCESS, THIS IS ONLY SUCH PAIR
   391					
   392					DUPCHK:	TRVAR <DCKCOD,DCKVEC>	;NOTE:	TRVAR'S ARE REQUIRED HERE BECAUSE THE
   393									;	COROUTINE OF OBJSRC, INTSRC, NEEDS TO
   394									;	ACCESS THIS INFORMATION.
   395						MOVEM T1,DCKCOD		;SAVE DRIVER CORRELATION CODE
   396						MOVEM T2,DCKVEC		;SAVE DRIVER FUNCTION VECTOR ADDRESS
   397						XMOVEI T1,INTSRC	;GET ADDRESS OF COROUTINE FOR OBJSRC
   398						SETOM T2		;INDICATE ALL LINKS SHOULD BE CHECKED
   399						CALL OBJSRC		;CHECK FOR DUPLICATES
   400						 RETSKP			;NONE FOUND, THIS CODE/VECTOR OK
   401						RETBAD (NSPX1)		;FAIL, THIS CODE/VECTOR ALREADY IN USE
   402					
   403					
   404					;INTSRC - COROUTINE OF OBJSRC TO CHECK FOR DUPLICATE DRIVER-CODE/VECTOR PAIRS
   405					;
   406					;ACCEPTS IN TRVARS DCKCOD/ DRIVER CORRELATION CODE
   407					;		   DCKVEC/ DRIVER FUNCTION VECTOR ADDRESS
   408					
   409					INTSRC:	JE LLINT,(T1),R		;IS THIS AN INTERNAL LINK ?
   410						SAVET			;YES, SAVE ALL TEMPORARY AC'S
   411						LOAD T3,LLDRV,(T1)	;GET DRIVER CORRELATION CODE
   412						LOAD T4,LLVEC,(T1)	;GET DRIVER FUNCTION VECTOR ADDRESS
   413						CAMN T3,DCKCOD		;SAME CORRELATION CODE ?
   414						CAME T4,DCKVEC		; AND SAME DRIVER FUNCTION VECTOR ?
   415						RET			;NO, RETURN NOT FOUND
   416						RETSKP			;YES, RETURN FOUND
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 11
NSPINT	MAC	18-Sep-81 07:02	

   417					;OPNINT - ROUTINE TO OPEN AN INTERNAL LOGICAL LINK
   418					;
   419					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   420					;	    T2/	ADDRESS OF LOGICAL LINK BLOCK
   421					;	    T3/	OBJECT ID,,COUNT OF BYTES IN DESCRIPTOR STRING
   422					;	    T4/	POINTER TO DESCRIPTOR STRING
   423					;		CALL OPNINT
   424					;RETURNS: +1	 FAILED, ERROR CODE IN T1
   425					;	  +2	SUCCESS, CONNECT-INITIATE MESSAGE (CI) SENT OVER LINK
   426					
   427					OPNINT:	STKVAR <OPIARG,OPIATR,OPILLB,OPIOBJ,OPIDSS,OPIDSC,OPIERR>
   428						MOVEM T1,OPIARG		;SAVE DRIVER ARGUMENT BLOCK ADDRESS
   429						MOVEM T2,OPILLB		;SAVE LOGICAL LINK BLOCK ADDRESS
   430						HLRZM T3,OPIOBJ		;SAVE OBJECT ID
   431						HRRZM T3,OPIDSC		;SAVE COUNT OF DESCRIPTOR BYTES
   432						MOVEM T4,OPIDSS		;SAVE DESCRIPTOR STRING POINTER
   433					
   434					; ASSIGN FREE SPACE FOR THE ATTRIBUTE LIST FOR THIS LINK
   435					
   436						MOVEI T1,0		;INITIALIZE SPACE NEEDED
   437						MOVE T4,OPIARG		;GET ADDRESS OF DRIVER ARGUMENT BLOCK
   438						MOVE T3,.NSHDR(T4)	;GET ARGUMENT BLOCK LENGTH
   439						CAILE T3,.NSODC		;OPTIONAL DATA COUNT PRESENT ?
   440						ADD T1,.NSODC(T4)	;YES, GET NUMBER OF BYTES IN OPTIONAL DATA
   441						CAILE T3,.NSPWC		;PASSWORD COUNT PROVIDED IN ARG BLOCK ?
   442						ADD T1,.NSPWC(T4)	;YES, ADD NUMBER OF BYTES IN PASSWORD STRING
   443						IDIVI T1,4		;COMPUTE NUMBER OF WORDS REQUIRED
   444						SKIPN T2		;ROUND UP IF
   445						ADDI T1,1		; NEEDED
   446						ADDI T1,MAXLC		;AND ACCOUNT FOR USER ID AND ACCOUNT STRINGS
   447						CALL ASGSWP		;ASSIGN SWAPPABLE FREE SPACE
   448						 RETBAD (MONX06)	;FAILED, RETURN ERROR TO CALLER
   449						ADDI T1,1		;POINT TO START OF ATTRIBUTE LIST (SKIP HEADER)
   450						MOVEM T1,OPIATR		;SAVE ADDRESS OF START OF ATTRIBUTE LIST
   451					
   452					; CREATE THE ATTRIBUTE LIST FOR THIS INTERNAL LINK
   453					
   454						MOVE T1,OPIARG		;GET ADDRESS OF DRIVER ARGUMENT BLOCK
   455						MOVE T2,OPIATR		;GET ADDRESS OF START OF ATTRIBUTE LIST
   456						CALL CREATR		;GO CREATE ATTRIBUTE LIST
   457						 JRST [	MOVEM T1,OPIERR	;FAILED, SAVE ERROR CODE
   458							MOVE T1,OPIATR	;GET ADDRESS OF ATTRIBUTE LIST
   459							CALL FREATR	;CLEAN UP AND RETURN ERROR TO CALLER
   460							MOVE T1,OPIERR	;RESTORE ERROR CODE
   461							RETBAD () ]	;RETURN ERROR CODE
   462						; ..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 12
NSPINT	MAC	18-Sep-81 07:02	

   463						; ..
   464					
   465					; OPEN THE NETWORK CONNECTION
   466					
   467						MOVE T1,OPILLB		;GET LOGICAL LINK BLOCK ADDRESS
   468						MOVE T2,OPIATR		;GET ADDRESS OF START OF ATTRIBUTE LIST
   469						HRL T3,OPIOBJ		;GET OBJECT ID
   470						HRR T3,OPIDSC		;GET DESCRIPTOR STRING LENGTH
   471						MOVE T4,OPIDSS		;GET POINTER TO DESCRIPTOR STRING
   472						CALL CRTLNK		;CREATE NETWORK LINK
   473						 JRST [	MOVEM T1,OPIERR	;FAILED, SAVE ERROR CODE
   474							MOVE T1,OPIATR	;GET ADDRESS OF ATTRIBUTE LIST
   475							CALL FREATR	;CLEAN UP AND RETURN ERROR TO CALLER
   476							MOVE T1,OPILLB	;GET LOGICAL LINK BLOCK ADDRESS
   477							CALL DELNOD	;DELETE THE LINK BLOCK
   478							DECR DCCUR	;DECREMENT NUMBER OF EXTANT LINKS
   479							LLLULK		;UNLOCK THE LOGICAL LINK TREE
   480							MOVE T1,OPIERR	;RESTORE ERROR CODE
   481							RETBAD () ]	;RETURN ERROR CODE
   482					
   483					; CLEAN UP FREE SPACE AND RETURN SUCCESS
   484					
   485						MOVE T1,OPIATR		;GET ADDRESS OF ATTRIBUTE LIST
   486						CALL FREATR		;CALL CLEANUP ROUTINE
   487						RETSKP			;DONE, RETURN SUCCESS.
   488					;FREATR - ROUTINE TO RELEASE FREE SPACE USED TO HOLD THE ATTRIBUTE LIST
   489					;
   490					;ACCEPTS IN T1/	ADDRESS OF BLOCK USED FOR ATTRIBUTE LIST
   491					;		CALL FREATR
   492					;RETURNS: +1 ALWAYS
   493					
   494					FREATR:	SUBI T1,1		;POINT TO START OF FREE BLOCK
   495						HRRZ T2,(T1)		;GET BLOCK SIZE
   496						CALLRET RELSWP		;RELEASE FREE SPACE AND RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 13
NSPINT	MAC	18-Sep-81 07:02	

   497					;INTNAM - ROUTINE TO SET UP POINTERS AND COUNTS FOR SEPARATE SPECIFICATION
   498					;	  OF THE PORTIONS OF A DESTINATION TASK NAME.
   499					;
   500					;ACCEPTS IN T1/	ADDRESS OF ARGUMENT BLOCK FOR .NSCRT
   501					;	    TRVARS:	NTHSC, NTHST, NTOBJ, NTDSS, NTDSC
   502					;		CALL INTNAM
   503					;RETURNS: +1	 FAILED, ERROR CODE IN T1
   504					;	  +2	SUCCESS, WITH TRVARS FILLED IN
   505					
   506					INTNAM:	ACVAR <AB>		;WORK AC TO HOLD ARGUMENT BLOCK ADDRESS
   507						MOVEM T1,AB		;SAVE ADDRESS OF ARGUMENT BLOCK
   508					
   509					; CHECK MINIMUM LENGTH OF ARGUMENT BLOCK
   510					
   511						MOVE T4,.NSHDR(AB)	;GET ARGUMENT BLOCK SIZE
   512						CAIGE T4,.NSOBJ		;AT LEAST HOST AND OBJECT SPECIFIED ?
   513						RETBAD (ARGX04)		;NO, ARGUMENT BLOCK TOO SMALL
   514					
   515					; SAVE HOST NAME POINTER AND BYTE COUNT
   516					
   517						MOVE T1,.NSHST(AB)	;GET ADDRESS OF HOST NAME STRING
   518						HRLI T1,(POINT 7,)	;FORM BYTE POINTER TO HOST NAME STRING
   519						MOVEM T1,NTHST		;SAVE POINTER TO HOST NAME STRING
   520						MOVX T3,MAXLC		;GET MAX CHARS IN HOST NAME
   521						CALL CMPLEN		;COMPUTE SIZE OF HOST NAME STRING
   522						SUBI T3,1		;ADJUST FOR NULL ON END OF STRING
   523						MOVEM T3,NTHSC		;SAVE HOST NAME STRING SIZE
   524					
   525					; SAVE OBJECT NUMBER
   526					
   527						MOVE T1,.NSOBJ(AB)	;GET ADDRESS OF OBJECT STRING
   528						HRLI T1,(POINT 7,)	;FORM POINTER TO STRING
   529						CALL OBJLOK		;LOOK UP THE OBJECT IN TABLE
   530						 RETBAD (DCNX3)		;NO SUCH OBJECT
   531						MOVEM T1,NTOBJ		;SAVE OBJECT NUMBER
   532					
   533					; SAVE DESCRIPTOR SIZE AND POINTER
   534					
   535						SETZM NTDSS		;INITIALIZE POINTER AND COUNT FOR
   536						SETZM NTDSC		; DESCRIPTOR IN CASE NOT SPECIFIED IN CALL
   537						SKIPN T1,.NSDSC(AB)	;ANY DESCRIPTOR GIVEN IN CALL ?
   538						RETSKP			;NO, DONE. RETURN SUCCESS
   539						HRLI T1,(POINT 7,)	;YES, FORM POINTER TO DESCRIPTOR STRING
   540						MOVEM T1,NTDSS		;SAVE BYTE POINTER TO DESCRIPTOR
   541						MOVX T3,MAXLC		;GET MAX NUMBER OF BYTES IN STRING
   542						CALL CMPLEN		;COMPUTE NUMBER OF BYTES IN DESCRIPTOR
   543						MOVEM T3,NTDSC		;SAVE COUNT
   544						RETSKP			;DONE. RETURN SUCCESS.
   545					
   546						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 14
NSPINT	MAC	18-Sep-81 07:02	

   547					;PRSINT - ROUTINE TO PARSE A NAME FIELD FOR AN INTERNAL LINK
   548					;
   549					;ACCEPTS IN T1/	FLAGS AS IN CALL TO .NSCRT
   550					;	    T2/	POINTER TO ARGUMENT BLOCK
   551					;		CALL PRSINT
   552					;RETURNS: +1	 FAILED, SYNTAX ERROR
   553					;	  +2	SUCCESS, WITH FOLLOWING TRVARS SET UP:
   554					;
   555					;			NTHST,NTHSC,NTOBJ,NTDSC,NTDSS
   556					
   557					PRSINT:	TXNN T1,NS%SHT		;SHORT FORM CALL ?
   558						JRST [	MOVE T1,T2	;NO, GET ADDRESS OF ARGUMENT BLOCK
   559							CALL INTNAM	;GO PARSE INDIVIDUAL ITEMS IN NAME
   560							 RETBAD ()	;FAILED, RETURN ERROR
   561							JRST PRS020 ]	;GO RETURN PARSED ITEMS
   562						MOVE T1,.NSSTR(T2)	;YES, GET ADDRESS OF NAME STRING
   563						HRLI T1,(POINT 7,)	;FORM POINTER TO STRING
   564						CALL CMPLEN		;GO GET LENGTH OF STRING
   565						CALL PRSNAM		;GO PARSE THE NAME FIELD
   566					
   567					; HERE TO RETURN PARSED ITEMS
   568					
   569					PRS020:	HRL T1,NTHSC		;GET COUNT OF BYTES IN HOST NAME STRING
   570						HRR T1,NTDSC		;GET COUNT OF BYTES IN DESCRIPTOR STRING
   571						MOVE T2,NTHST		;GET POINTER TO HOST NAME STRING
   572						MOVE T3,NTDSS		;GET POINTER TO DESCRIPTOR
   573						MOVE T4,NTOBJ		;GET OBJECT ID
   574						RETSKP			;DONE, RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 15
NSPINT	MAC	18-Sep-81 07:02	

   575					;CREATR - ROUTINE TO CREATE AN ATTRIBUTE LIST
   576					;
   577					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   578					;	    T2/	ADDRESS OF START OF ATTRIBUTE LIST
   579					;		CALL CREATR
   580					;RETURNS: +1	 FAILED, ERROR CODE IN T1
   581					;	  +2	SUCCESS, WITH ATTRIBUTE LIST CREATED
   582					
   583					CREATR:	ACVAR <BK,AL,LP>
   584					
   585						MOVEM T1,BK		;SAVE ADDRESS OF DRIVER ARGUMENT BLOCK
   586						MOVEM T2,AL		;SAVE ADDRESS OF START OF LIST
   587						MOVEI LP,0		;NO POINTER TO PREVIOUS ITEM YET
   588					
   589					; ADD OPTIONAL DATA TO ATTRIBUTE LIST
   590					
   591						MOVE T1,.NSHDR(BK)	;GET NUMBER OF WORDS IN ARG BLOCK
   592						CAILE T1,.NSODC		;OPTIONAL DATA INCLUDED IN ARG BLOCK ?
   593						SKIPG .NSODC(BK)	;YES, ANY OPTIONAL DATA TO ADD ?
   594						JRST CRA010		;NO, GO DO PASSWORD
   595						MOVE T3,LP		;GET POINTER TO LAST ITEM ON LIST
   596						MOVE T2,AL		;ADDRESS OF CURRENT ITEM ON ATTRIBUTE LIST
   597						MOVE T1,BK		;ADDRESS OF DRIVER ARGUMENT BLOCK
   598						CALL ADDOPT		;ADD OPTIONAL DATA TO LIST
   599						MOVEM AL,LP		;SAVE NEW LAST ITEM IN LIST
   600						MOVEM T1,AL		;SAVE NEW CURRENT ITEM IN LIST
   601					
   602					; ADD PASSWORD STRING TO ATTRIBUTE LIST
   603					
   604					CRA010:	MOVE T1,.NSHDR(BK)	;GET NUMBER OF WORDS IN ARG BLOCK
   605						CAILE T1,.NSPWC		;PASSWORD INCLUDED ?
   606						SKIPG .NSPWC(BK)	;YES, ANY PASSWORD TO ADD ?
   607						JRST CRA020		;NO, GO DO USER ID
   608						MOVE T3,LP		;GET POINTER TO LAST ITEM ON LIST
   609						MOVE T2,AL		;ADDRESS OF CURRENT ITEM ON ATTRIBUTE LIST
   610						MOVE T1,BK		;ADDRESS OF DRIVER ARGUMENT BLOCK
   611						CALL ADDPSW		;ADD PASSWORD TO LIST
   612						MOVEM AL,LP		;SAVE NEW LAST ITEM IN LIST
   613						MOVEM T1,AL		;SAVE NEW CURRENT ITEM IN LIST
   614						; ..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 16
NSPINT	MAC	18-Sep-81 07:02	

   615						; ..
   616					
   617					; ADD USER ID TO THE LIST
   618					
   619					CRA020:	MOVE T1,.NSHDR(BK)	;GET NUMBER OF ITEMS IN ARG BLOCK
   620						CAILE T1,.NSUSR		;USER ID INCLUDED IN ARG BLOCK ?
   621						SKIPN .NSUSR(BK)	;YES, ANY USER ID TO ADD ?
   622						JRST CRA030		;NO, GO DO ACCOUNT
   623						MOVE T3,LP		;GET POINTER TO LAST ITEM ON LIST
   624						MOVE T2,AL		;ADDRESS OF CURRENT ITEM ON ATTRIBUTE LIST
   625						MOVE T1,BK		;ADDRESS OF DRIVER ARGUMENT BLOCK
   626						CALL ADDUSR		;ADD USER ID TO THE LIST
   627						MOVEM AL,LP		;SAVE NEW LAST ITEM IN LIST
   628						MOVEM T1,AL		;SAVE NEW CURRENT ITEM IN LIST
   629					
   630					; ADD ACCOUNT TO ATTRIBUTE LIST
   631					
   632					CRA030:	MOVE T1,.NSHDR(BK)	;GET NUMBER OF ITEMS IN ARG BLOCK
   633						CAILE T1,.NSCHG		;ACCOUNT INCLUDED IN ARG BLOCK ?
   634						SKIPN .NSCHG(BK)	;YES, ANY ACCOUNT TO ADD ?
   635						JRST CRA040		;NO, GO RETURN TO CALLER
   636						MOVE T3,LP		;GET POINTER TO LAST ITEM ON LIST
   637						MOVE T2,AL		;ADDRESS OF CURRENT ITEM ON ATTRIBUTE LIST
   638						MOVE T1,BK		;ADDRESS OF DRIVER ARGUMENT BLOCK
   639						CALL ADDACT		;ADD OPTIONAL DATA TO LIST
   640					
   641					; HERE WHEN ALL ATTRIBUTES ARE IN LIST
   642					
   643					CRA040:	RETSKP			;DONE, RETURN
   644					
   645						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 17
NSPINT	MAC	18-Sep-81 07:02	

   646					;ADDOPT - ROUTINE TO ADD THE OPTIONAL DATA STRING TO THE ATTRIBUTE LIST
   647					;
   648					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   649					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   650					;	    T3/	ADDRESS OF PREVIOUS ITEM IN ATTRIBUTE LIST
   651					;		CALL ADDOPT
   652					;RETURNS: +1 ALWAYS, WITH T1/ UPDATED POINTER INTO ATTRIBUTE LIST
   653					
   654					ADDOPT:	ACVAR <BK,AL>
   655						MOVEM T1,BK		;SAVE ARGUMENT BLOCK ADDRESS
   656						MOVEM T2,AL		;SAVE ATTRIBUTE POINTER
   657					
   658					; ADD ATTRIBUTE TYPE AND PREVIOUS ITEM POINTER TO ATTRIBUTE LIST
   659					
   660						STOR T3,PRFXL,(AL)	;STORE POINTER TO LAST ITEM IN LIST
   661						MOVX T4,.PFOPT		;GET OPTIONAL DATA ATTRIBUTE TYPE CODE
   662						STOR T4,PRFXV,(AL)	;SAVE ATTRIBUTE TYPE IN ATTRIBUTE LIST
   663					
   664					; ADD SIZE OF THIS ATTRIBUTE TO LIST
   665					
   666						MOVE T3,.NSODC(BK)	;GET COUNT OF BYTES IN OPTIONAL DATA
   667						IDIVI T3,4		;COMPUTE NUMBER OF WORDS
   668						SKIPN T4		;ROUND UP
   669						ADDI T3,1		;..
   670						STOR T3,PRFXS,(AL)	;SAVE SIZE IN ATTRIBUTE LIST
   671					
   672					; ADD THE STRING TO THE ATTRIBUTE LIST
   673					
   674						MOVE T3,.NSODC(BK)	;GET BYTE COUNT AGAIN
   675						MOVE T2,.NSOPD(BK)	;GET ADDRESS OF OPTIONAL DATA STRING
   676						HRLI T2,(POINT 8,)	;FORM BYTE POINTER TO OPTIONAL DATA
   677						MOVEI T1,1(AL)		;GET DESTINATION ADDRESS
   678						CALL MOVST1		;ADD STRING TO LIST
   679						LOAD T4,PRFXS,(AL)	;GET SIZE OF THIS BLOCK
   680						ADDI AL,1(T4)		;POINT TO NEXT FREE ELEMENT ON LIST
   681						RET			;DONE, RETURN
   682					
   683						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 18
NSPINT	MAC	18-Sep-81 07:02	

   684					;ADDPSW - ROUTINE TO ADD THE PASSWORD STRING TO THE ATTRIBUTE LIST
   685					;
   686					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   687					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   688					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   689					;		CALL ADDPSW
   690					;RETURNS: +1 ALWAYS, WITH T1/ UPDATED POINTER INTO ATTRIBUTE LIST
   691					
   692					ADDPSW:	ACVAR <BK,AL>
   693						MOVEM T1,BK		;SAVE ARGUMENT BLOCK ADDRESS
   694						MOVEM T2,AL		;SAVE ATTRIBUTE POINTER
   695					
   696					; ADD ATTRIBUTE TYPE AND PREVIOUS ITEM POINTER TO ATTRIBUTE LIST
   697					
   698						STOR T3,PRFXL,(AL)	;STORE POINTER TO LAST ITEM IN LIST
   699						MOVX T4,.PFPWD		;GET PASSWORD ATTRIBUTE TYPE CODE
   700						STOR T4,PRFXV,(AL)	;SAVE ATTRIBUTE TYPE IN ATTRIBUTE LIST
   701					
   702					; ADD SIZE OF THIS ATTRIBUTE TO LIST
   703					
   704						MOVE T3,.NSPWC(BK)	;GET COUNT OF BYTES IN PASSWORD
   705						IDIVI T3,4		;COMPUTE NUMBER OF WORDS
   706						SKIPN T4		;ROUND UP
   707						ADDI T3,1		;..
   708						STOR T3,PRFXS,(AL)	;SAVE SIZE IN ATTRIBUTE LIST
   709					
   710					; ADD THE STRING TO THE ATTRIBUTE LIST
   711					
   712						MOVE T3,.NSPWC(BK)	;GET BYTE COUNT AGAIN
   713						MOVE T2,.NSPSW(BK)	;GET ADDRESS OF PASSWORD STRING
   714						HRLI T2,(POINT 8,)	;FORM BYTE POINTER TO PASSWORD
   715						MOVEI T1,1(AL)		;GET DESTINATION ADDRESS
   716						CALL MOVST1		;ADD STRING TO LIST
   717						LOAD T4,PRFXS,(AL)	;GET SIZE OF THIS BLOCK
   718						ADDI AL,1(T4)		;POINT TO NEXT FREE ELEMENT ON LIST
   719						RET			;DONE, RETURN
   720					
   721						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 19
NSPINT	MAC	18-Sep-81 07:02	

   722					;ADDUSR - ROUTINE TO ADD THE USER STRING TO THE ATTRIBUTE LIST
   723					;
   724					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   725					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   726					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   727					;		CALL ADDUSR
   728					;RETURNS: +1 ALWAYS, WITH T1/ UPDATED POINTER INTO ATTRIBUTE LIST
   729					
   730					ADDUSR:	ACVAR <BK,AL>
   731						MOVEM T1,BK		;SAVE ARGUMENT BLOCK ADDRESS
   732						MOVEM T2,AL		;SAVE ATTRIBUTE POINTER
   733					
   734					; ADD ATTRIBUTE TYPE AND PREVIOUS ITEM POINTER TO ATTRIBUTE LIST
   735					
   736						STOR T3,PRFXL,(AL)	;STORE POINTER TO LAST ITEM IN LIST
   737						MOVX T4,.PFUDT		;GET USER ID ATTRIBUTE TYPE CODE
   738						STOR T4,PRFXV,(AL)	;SAVE ATTRIBUTE TYPE IN ATTRIBUTE LIST
   739					
   740					; ADD SIZE OF THIS ATTRIBUTE TO LIST
   741					
   742						MOVE T1,.NSUSR(BK)	;GET ADDRESS OF USER ID STRING
   743						HRLI T1,(POINT 7,)	;FORM BYTE POINTER TO USER ID STRING
   744						MOVX T3,MAXLC		;GET MAX SIZE OF USER ID STRING
   745						CALL CMPLEN		;GO GET LENGTH OF USER ID STRING
   746						STOR T3,PRFXS,(AL)	;SAVE SIZE IN ATTRIBUTE LIST
   747					
   748					; ADD THE STRING TO THE ATTRIBUTE LIST
   749					
   750						MOVE T2,.NSUSR(BK)	;GET ADDRESS OF STRING AGAIN
   751						HRLI T2,(POINT 7,)	;AND POINT TO THE STRING
   752						MOVEI T1,1(AL)		;GET DESTINATION ADDRESS
   753						CALL MOVST1		;ADD STRING TO LIST
   754						LOAD T4,PRFXS,(AL)	;GET SIZE OF THIS BLOCK
   755						ADDI AL,1(T4)		;POINT TO NEXT FREE ELEMENT ON LIST
   756						RET			;DONE, RETURN
   757					
   758						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 20
NSPINT	MAC	18-Sep-81 07:02	

   759					;ADDACT - ROUTINE TO ADD THE ACCOUNT STRING TO THE ATTRIBUTE LIST
   760					;
   761					;ACCEPTS IN T1/	ADDRESS OF DRIVER ARGUMENT BLOCK
   762					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   763					;	    T2/	CURRENT POINTER INTO ATTRIBUTE LIST
   764					;		CALL ADDACT
   765					;RETURNS: +1 ALWAYS, WITH T1/ UPDATED POINTER INTO ATTRIBUTE LIST
   766					
   767					ADDACT:	ACVAR <BK,AL>
   768						MOVEM T1,BK		;SAVE ARGUMENT BLOCK ADDRESS
   769						MOVEM T2,AL		;SAVE ATTRIBUTE POINTER
   770					
   771					; ADD ATTRIBUTE TYPE AND PREVIOUS ITEM POINTER TO ATTRIBUTE LIST
   772					
   773						STOR T3,PRFXL,(AL)	;STORE POINTER TO LAST ITEM IN LIST
   774						MOVX T4,.PFACN		;GET ACCOUNT ATTRIBUTE TYPE CODE
   775						STOR T4,PRFXV,(AL)	;SAVE ATTRIBUTE TYPE IN ATTRIBUTE LIST
   776					
   777					; ADD SIZE OF THIS ATTRIBUTE TO LIST
   778					
   779						MOVE T1,.NSCHG(BK)	;GET ADDRESS OF ACCOUNT STRING
   780						HRLI T1,(POINT 7,)	;FORM BYTE POINTER TO ACCOUNT STRING
   781						MOVX T3,MAXLC		;GET MAX SIZE OF ACCOUNT STRING
   782						CALL CMPLEN		;GO GET LENGTH OF ACCOUNT STRING
   783						STOR T3,PRFXS,(AL)	;SAVE SIZE IN ATTRIBUTE LIST
   784					
   785					; ADD THE STRING TO THE ATTRIBUTE LIST
   786					
   787						MOVE T2,.NSCHG(BK)	;GET ADDRESS OF STRING AGAIN
   788						HRLI T2,(POINT 7,)	;AND POINT TO THE STRING
   789						MOVEI T1,1(AL)		;GET DESTINATION ADDRESS
   790						CALL MOVST1		;ADD STRING TO LIST
   791						LOAD T4,PRFXS,(AL)	;GET SIZE OF THIS BLOCK
   792						ADDI AL,1(T4)		;POINT TO NEXT FREE ELEMENT ON LIST
   793						RET			;DONE, RETURN
   794					
   795						ENDAV.			;END ACVAR
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 21
NSPINT	MAC	18-Sep-81 07:02	

   796					SUBTTL	Internal Links - Send Output on an Internal Link
   797					
   798					XNSOUT::ASUBR <SNOLID,SNOBUF,SNOCNT,SNOLLB>
   799						STKVAR <SNOFLG>
   800						MOVEM T3,SNOFLG		;SAVE FLAGS
   801					
   802					; LOCK LOGICAL LINK BLOCK
   803					
   804					SNO001:	MOVE T1,SNOLID		;GET LINK ID
   805						CALL INTLOK		;GO CHECK LINK STATE
   806						 RET			;FAILED, RETURN ERROR
   807						MOVEM T1,SNOLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
   808					
   809					; CHECK THAT ANOTHER BUFFER IS NOT STILL BEING PROCESSED
   810					
   811					SNO003:	MOVE T1,SNOLLB		;GET LOGICAL LINK BLOCK ADDRESS
   812						JE LLBFO,(T1),SNO005	;IS ANOTHER BUFFER NOW BEING PROCESSED ?
   813						MOVE T4,SNOFLG		;YES, GET FLAGS PROVIDED BY DRIVER
   814						JE NS%BLK,T4,[	SETONE LLNDO,(T1) ;DON'T BLOCK, NOTIFY DRIVER WHEN READY
   815								CALL BLKULK	  ;NOTIFY DRIVER THAT WE ARE STILL BUSY
   816								RETBAD (NSPX4)]	  ;ADVISE DRIVER OF PREVIOUS BUFFER
   817						LOAD T1,LLLNK,(T1)	;GET LINK ID
   818						HRLS T1			;FORM STANDARD SCHEDULER WAIT
   819						HRRI T1,SNOTST		; TEST WORD
   820						MOVE T2,SNOLLB		;GET LOGICAL LINK BLOCK ADDRESS
   821						CALL INTWAT		;GO WAIT UNTIL DONE WITH THIS BUFFER
   822						 RETBAD ()		;FAIL, LINK NOT OK ANY MORE
   823					
   824					; SAVE INPUT ARGUMENTS IN THE LOGICAL LINK
   825					
   826					SNO005:	MOVE T2,SNOBUF		;GET BUFFER ADDRESS PROVIDED BY DRIVER
   827						STOR T2,LLBFO,(T1)	;STORE OUTPUT BUFFER ADDRESS
   828						HRLI T2,(POINT 8,)	;FORM POINTER TO START OF BUFFER
   829						STOR T2,LLBPO,(T1)	;SAVE IN LOGICAL LINK BLOCK
   830						HRRZ T4,SNOCNT		;GET JUST THE COUNT
   831					NSIB01:	STOR T4,LLOCT,(T1)	;STORE INITIAL COUNT FOR OUTPUT
   832						MOVE T4,SNOFLG		;GET FLAGS
   833						TXNE T4,NS%BLK		;DRIVER WANT TO BLOCK ?
   834						JRST [SETONE LLWAT,(T1)	;YES, NOTE DRIVER ASKED TO WAIT
   835						      JRST .+1]		;CONTINUE
   836						SETZRO LLEOM,(T1)	;ASSUME NOT EOM
   837						TXNE T4,NS%EOM		;IS THIS A COMPLETE MESSAGE ?
   838						JRST [SETONE LLEOM,(T1)	;YES, NOTE THAT EOM SHOULD BE SET
   839						      JRST .+1]		;CONTINUE
   840					
   841					; NOTE THAT END-OF-MESSAGE IS DESIRED IF REQUESTED BY THE DRIVER
   842					
   843						MOVE T4,SNOFLG		;GET FLAGS FROM DRIVER
   844						JN NS%EOM,T4,[	MOVE T1,SNOLLB	;GET LOGICAL LINK BLOCK ADDRESS
   845								SETONE LLFEM,(T1) ;SAY SHOULD GET EOM ON OUTPUT
   846								JRST .+1 ]	;CONTINUE IN MAINLINE CODE
   847						;..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 22
NSPINT	MAC	18-Sep-81 07:02	

   848						;..
   849					
   850					; PROCESS ANY OUTSTANDING ACK'S FOR THIS LINK
   851					
   852					SNO010:	MOVE T1,SNOLLB		;GET ADDRESS OF LOGICAL LINK BLOCK
   853					
   854					REPEAT 0, <
   855					
   856						CALL MOVSEG		;PROCESS OUTSTANDING ACK'S
   857						 JRST [	MOVE T4,SNOFLG	;GET FLAGS PROVIDED BY DRIVER
   858							JE NS%BLK,T4,[	MOVE T1,SNOLLB ;GET LOGICAL LINK BLOCK ADDRESS
   859									CALL BLKULK    ;CLEAN UP LOCKED LL BLOCK
   860									RETSKP]        ;RETURN IF BLOCKING NOT REQUESTED
   861							MOVE T2,SNOLLB	;GET LOGICAL LINK BLOCK ADDRESS
   862							CALL INTWAT	;GO WAIT FOR CONDITION TO BE SATISFIED
   863							 RETBAD ()	;FAIL, LINK NOT OK ANY MORE
   864							JRST SNO010 ]	;TRY AGAIN TO PROCESS ACK'S
   865					>
   866					
   867					; SEND AS MUCH DATA AS POSSIBLE NOW
   868					
   869						MOVE T1,SNOLLB		;GET ADDRESS OF LOGICAL LINK BLOCK
   870						CALL SNDINT		;GO SEND AS MUCH OUTPUT AS POSSIBLE
   871						 RETBAD ()		;FAIL, LINK WENT AWAY OR NOT IN RUN STATE
   872						MOVE T1,SNOLLB		;GET LOGICAL LINK BLOCK ADDRESS
   873						CALL BLKULK		;CLEAN UP LOCKED LOGICAL LINK BLOCK
   874						RETSKP			;DONE, RETURN SUCCESS
   875					
   876					; SCHEDULER TEST TO WAIT UNTIL PREVIOUS BUFFER IS COMPLETELY PROCESSED
   877					
   878						RESCD
   879					SNOTST:	CALL CHKLNK		;GO CHECK STATE OF LINK
   880						 JRST 1(4)		;LINK NOT IN RUN STATE, WAKE UP
   881						JE LLBFO,(T1),1(4)	;WAKE UP IF DONE WITH BUFFER
   882						JRST 0(4)		;CONTINUE WAITING, STILL ON LAST BUFFER
   883						SWAPCD
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 23
NSPINT	MAC	18-Sep-81 07:02	

   884					;CHKLNK - ROUTINE TO CHECK THE STATE OF AN INTERNAL LINK
   885					;
   886					;ACCEPTS IN T1/	LINK ID
   887					;		CALL CHKLNK
   888					;RETURNS: +1	 FAILED, LINK DOES NOT EXIST OR IS NOT IN RUN STATE
   889					;	  +2	SUCCESS, WITH T1/ ADDRESS OF LOGICAL LINK BLOCK
   890					
   891					CHKLNK:	SETOM T2		;ANY LINK
   892						CALL LLLKUP		;GO FIND BLOCK
   893						 RETBAD (NSPX2)		;NOT THERE. SOMETHING TERRIBLE HAPPENED
   894						LOAD T2,LLSTA,(T1)	;GET STATE
   895						CAIE T2,LLSRUN		;IS IT RUNNING?
   896						RETBAD (NSPX3)		;NO, FAIL
   897						RETSKP			;YES. ALL FINE
   898					
   899					
   900					
   901					;INTWAT - ROUTINE TO PERFORM A BLOCK FOR AN INTERNAL LINK
   902					;
   903					;ACCEPTS IN T1/	STANDARD SCHEDULER TEST WORD
   904					;	    T2/	ADDRESS OF LOGICAL LINK BLOCK
   905					;		CALL INTWAT
   906					;RETURNS: +1	 FAILED - LINK DOES NOT EXIST OR IS NOT IN RUN STATE ANY MORE
   907					;	  +2	SUCCESS, WAIT OVER AND LINK IN RUN STATE
   908					
   909					INTWAT:	ASUBR <IWTTST,IWTLLB,IWTLID>
   910					
   911						MOVE T1,IWTLLB		;GET LOGICAL LINK BLOCK ADDRESS
   912						LOAD T4,LLLNK,(T1)	;GET LINK ID
   913						MOVEM T4,IWTLID		;SAVE LINK ID
   914						CALL BLKULK		;UNLOCK THE LOGICAL LINK BLOCK
   915						MOVE T1,IWTTST		;GET SCHEDULER WAIT TEST
   916					INTW10:	MDISMS			;WAIT FOR CONDITION TO BE SATISFIED
   917						MOVE T1,IWTLID		;GET LINK ID AGAIN
   918						CALL CHKLNK		;GO CHECK STATE OF LINK
   919						 RET			;FAIL, LINK NOT EXISTENT OR NOT IN RUN STATE
   920						MOVE T1,IWTLLB		;GET LOGICAL LINK BLOCK
   921						CALL BLKLLK		;LOCK THE LOGICAL LINK
   922						 JRST INTW10		;FAILED, WAIT THEN TRY AGAIN
   923						RETSKP			;DONE, WAIT SATISFIED AND LINK LOCKED AND OK
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 24
NSPINT	MAC	18-Sep-81 07:02	

   924					;SNDINT - ROUTINE TO SEND AS MUCH DATA AS POSSIBLE FOR AN INTERNAL LINK
   925					;
   926					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK
   927					;		CALL SNDINT
   928					;RETURNS: +1 	 FAILED, LINK WENT AWAY OR NOT IN RUN STATE
   929					;	  +2	SUCCESS, WITH LOGICAL LINK BLOCK ON THE BACKGROUND TASK'S
   930					;			 "OUTPUT REMAINING" QUEUE (OUTQUE) IF NOT ALL
   931					;			 DATA COULD BE SENT.
   932					
   933					SNDINT:	STKVAR <SNDLLB>
   934						MOVEM T1,SNDLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
   935					
   936					; CHECK TO SEE IF THERE IS ANY MORE DATA TO SEND, DISPOSE OF BUFFER IF NOT
   937					
   938					SND020:	MOVE T1,SNDLLB		;GET ADDRESS OF LOGICAL LINK BLOCK
   939						JN LLOCT,(T1),SND025	;IF DATA LEFT, GO TRY TO SEND IT
   940						MOVE T1,SNDLLB		;GET LOGICAL LINK BLOCK ADDRESS
   941						CALL TELOBE		;GO TELL DRIVER THAT OUTPUT BUFFER IS EMPTY
   942						RETSKP			;DONE, RETURN
   943					
   944					;CHECK TO SEE IF ANY SEGMENTS CAN BE SENT NOW
   945					
   946					SND025:	MOVE T1,SNDLLB		;GET LOGICAL LINK BLOCK ADDRESS
   947						CALL SNDCHK		;CAN ANY SEGMENTS BE SENT ?
   948						 JRST [	MOVE T1,SNDLLB	;NO, GET LOGICAL LINK BLOCK ADDRESS
   949							CALL QUECHK	;GO SEE IF LINK MUST BE QUEUED, OR WAIT FOR OK
   950							 RETBAD ()	;LINK WENT AWAY
   951							SKIPN T1	;HAVE WE WAITED UNTIL IT'S OK TO SEND DATA ?
   952							RETSKP		;NO, LINK WAS PUT ON Q, SO ALL DONE FOR NOW
   953							JRST SND025 ]	;YES, TRY AGAIN TO SEE IF A SEGMENT CAN BE SENT
   954					
   955					; HERE TO SEND A SEGMENT
   956					
   957					SND030:	MOVE T1,SNDLLB		;GET LOGICAL LINK BLOCK ADDRESS
   958						CALL OUTSEG		;SEND THE SEGMENT
   959						 JRST [	MOVE T4,SNDLLB	;NO, GET LOGICAL LINK BLOCK ADDRESS
   960							JE LLWAT,(T4),SND050 ;IF BLOCKING NOT WANTED, GO QUEUE LL BLOCK
   961							MOVE T2,SNDLLB	;GET LOGICAL LINK BLOCK ADDRESS
   962							CALL INTWAT	;WAIT FOR CONDITION TO BE SATISFIED
   963							 RETBAD ()	;FAIL, LINK WENT AWAY OR NOT IN RUN STATE
   964							JRST SND030 ]	;TRY AGAIN TO SEE IF A SEGMENT CAN BE SENT
   965						JRST SND020		;CHECK TO SEE IF ANOTHER SEGMENT CAN BE SENT
   966					
   967					
   968					; HERE WHEN MORE DATA REMAINS TO BE SENT - ADD THIS LOGICAL LINK BLOCK
   969					; TO THE BACKGROUND TASK'S "OUTPUT REMAINING" QUEUE (OUTQUE).
   970					
   971					SND050:	MOVE T1,SNDLLB		;GET LOGICAL LINK BLOCK ADDRESS
   972						CALL ADDOUT		;GO ADD THIS BLOCK TO OUTQUE
   973						CALL SKDOUT		;NOTE BACKGROUND TASK ACTION NEEDED
   974						MOVE T1,SNDLLB		;GET LOGICAL LINK BLOCK ADDRESS
   975						SETONE LLNDO,(T1)	;NOTE DRIVER NOTIFICATION NEEDED
   976						CALLRET BLKULK		;UNLOCK THE BLOCK AND RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 25
NSPINT	MAC	18-Sep-81 07:02	

   977					;QUECHK - ROUTINE TO DETERMINE IF THIS LOGICAL LINK BLOCK SHOULD BE
   978					;	  PLACED ON THE BACKGROUND TASKS'S "OUTPUT REMAINING" QUEUE
   979					;
   980					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK
   981					;	    T2/	ADDRESS OF SCHEDULER TEST ROUTINE
   982					;		CALL QUECHK
   983					;RETURNS: +1	 FAILED, LINK WENT AWAY OR NOT IN RUN STATE
   984					;	  +2	SUCCESS, LINK QUEUED IF NEEDED OR NOW OK TO SEND DATA
   985					
   986					QUECHK:	ASUBR <QCKLLB>
   987					
   988						MOVE T4,QCKLLB		;NO, GET LOGICAL LINK BLOCK ADDRESS
   989						JE LLWAT,(T4),QCK050	;IF BLOCKING NOT WANTED, SEE IF LOCAL LINK
   990						CALL MAKTST		;GO MAKE A STANDARD SCHEDULER TEST
   991						MOVE T2,QCKLLB		;GET LOGICAL LINK BLOCK ADDRESS
   992						CALL INTWAT		;WAIT FOR CONDITION TO BE SATISFIED
   993						 RETBAD ()		;LINK WENT AWAY OR NOT IN RUN STATE
   994						SETOM T1		;NOTE THAT CONDITION HAS BEEN SATISFIED
   995						RETSKP			;DONE, RETURN SUCCESS - OK TO SEND DATA NOW
   996					
   997					; HERE IF BLOCKING NOT REQUESTED - SEE IF THIS IS A LOCAL LINK
   998					
   999					QCK050:	MOVE T1,QCKLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1000						TQNE LLLOC,(T1)		;IS THIS A LOCAL LINK ?
  1001						 CALL ADDOUT		;YES, PUT LINK ON BACKGROUND TASK'S QUEUE
  1002						SETZM T1		;NOTE THAT DATA WILL BE SENT LATER
  1003						RETSKP			;DONE, RETURN SUCCESS
  1004					
  1005					
  1006					;ADDOUT - ROUTINE TO ADD A LOGICAL LINK BLOCK TO THE BACKGROUND TASK'S
  1007					;	  "OUTPUT REMAINING" QUEUE (OUTQUE).
  1008					;
  1009					;ACCEPTS IN T1/	LOGICAL LINK BLOCK ADDRESS
  1010					;		CALL ADDOUT
  1011					;RETURNS: +1 ALWAYS
  1012					
  1013					ADDOUT::JN LLQUE,(T1),R		;DONE IF ALREADY QUEUED
  1014						LOCK OUTLOK		;PREVENT OTHER PROCESSES FROM HANDLING THE Q
  1015						SKIPN T4,OUTQUE		;ANYTHING ON THE QUEUE YET ?
  1016						JRST [	HRRM T1,OUTQUE	;NO, SAVE NEW HEAD OF QUEUE
  1017							HRLM T1,OUTQUE	;SAVE INITIAL TAIL OF QUEUE
  1018							JRST ADOUT2 ]	;GO CLEAR POINTER TO NEXT BLOCK ON CHAIN
  1019						HLRZS T4		;KEEP JUST THE TAIL OF THE QUEUE
  1020						STOR T1,LLOUT,(T4)	;MAKE TAIL POINT TO NEW BLOCK
  1021						HRLM T1,OUTQUE		;SAVE NEW TAIL
  1022					ADOUT2:	SETZRO LLOUT,(T1)	;CLEAR POINTER TO NEXT BLOCK IN NEW TAIL
  1023						SETONE LLQUE,(T1)	;NOTE THAT THIS BLOCK IS ON THE QUEUE
  1024						UNLOCK OUTLOK		;PERMIT ACCESS TO QUEUE AGAIN
  1025						RET			;RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 26
NSPINT	MAC	18-Sep-81 07:02	

  1026					;OUTSEG - ROUTINE TO OUTPUT A SEGMENT FOR AN INTERNAL LINK
  1027					;
  1028					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK
  1029					;		CALL OUTSEG
  1030					;RETURNS: +1	 FAILED, SCHEDULER TEST IN T1
  1031					;	  +2	SUCCESS, WITH SEGMENT AWAY
  1032					
  1033					OUTSEG::STKVAR <OSGLLB,OSGSIZ,OSGBLK>
  1034						MOVEM T1,OSGLLB		;SAVE LOGICAL LINK ADDRESS
  1035					
  1036					; CHECK TO SEE IF A CLOSE IS IN PROGRESS
  1037					
  1038						MOVE T1,OSGLLB		;GET ADDRESS OF LOGICAL LINK BLOCK
  1039						CALL CHKCIP		;SEE IF CLOSE IS IN PROGRESS
  1040					
  1041					; COMPUTE SIZE OF SEGMENT AND ASSIGN SPACE
  1042					
  1043						MOVE T4,OSGLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1044						LOAD T3,LLOCT,(T4)	;GET NUMBER OF BYTES REMAINING TO BE SENT
  1045						LOAD T4,LLSWG,(T4)	;GET MAXIMUM SEGMENT SIZE FOR THIS LINK
  1046						CAILE T3,(T4)		;CAN ALL REMAINING DATA BE SENT ?
  1047						MOVEI T3,(T4)		;NO, JUST SEND MAXIMUM AMOUNT FOR ONE SEGMENT
  1048						MOVEM T3,OSGSIZ		;SAVE MESSAGE SIZE
  1049						MOVEI T1,<<MSHDR+DTMLEN>*4+3>(T3) ;COMPUTE BYTES REQUIRED
  1050						LSH T1,-2		;CONVERT TO WORDS
  1051						CALL GETRES		;GET ONE
  1052						 JRST [	BUG(NSPFRE)
  1053							CALL TIMWAT	;FORM STANDARD SCHEDULER TEST WORD
  1054							RET ]		;AND RETURN WITH WAIT TEST IN T1
  1055						MOVEM T1,OSGBLK		;SAVE ADDRESS OF MESSAGE BLOCK
  1056					
  1057					; SET UP COUNTS AND POINTERS IN MESSAGE HEADER
  1058					
  1059						MOVEI T2,MSHDR(T1)	;GET BEGINNING OF DATA STORAGE
  1060						HRLI T2,(<POINT 8,>)	;FORM BYTE POINTER
  1061						MOVE T1,OSGLLB		;GET BACK LL BLOCK
  1062						MOVEM T2,LLBPTR(T1)	;SAVE WORK POINTER
  1063						SETZM LLBPCT(T1)	;INIT COUNT
  1064						MOVE T3,OSGSIZ		;GET # OF BYTES TO GO
  1065						LOAD T2,LLOCT,(T1)	;GET # OF BYTES REMAINING IN BUFFER
  1066						SUBI T2,0(T3)		;COMPUTE # LEFT
  1067						STOR T2,LLOCT,(T1)	;SAVE FOR NEXT OUTPUT
  1068						CALL MAKFLG		;GO MAKE FLAGS FOR THIS MESSAGE
  1069						MOVE T3,OSGBLK		;GET MESSAGE BLOCK ADDRESS
  1070						MOVE T4,OSGSIZ		;GET MESSAGE COUNT
  1071						CALL MAKMSG		;GO ASSEMBLE NON-DATA PARTS OF MESSAGE
  1072					
  1073					; ADD THE DATA TO THE MESSAGE
  1074					
  1075						MOVE T4,OSGLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1076						LOAD T1,LLBPO,(T4)	;GET CURRENT OUTPUT POINTER
  1077						MOVE T2,LLBPTR(T4)	;GET DESTINATION POINTER
  1078						MOVE T3,OSGSIZ		;GET COUNT
  1079						CALL NETMOV		;ADD DATA BYTES TO THE MESSAGE
  1080						MOVE T4,OSGLLB		;GET ADDRESS OF LOGICAL LINK BLOCK AGAIN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 26-1
NSPINT	MAC	18-Sep-81 07:02	

  1081						STOR T1,LLBPO,(T4)	;STORE NEW OUTPUT POINTER TO REMAINDER OF BUFFER
  1082						; ..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 27
NSPINT	MAC	18-Sep-81 07:02	

  1083						; ..
  1084					
  1085					; COMPUTE REMAINING QUANTITIES FOR MESSAGE HEADER AND SEND THE SEGMENT
  1086					
  1087						MOVE T2,OSGBLK		;GET ADDRESS OF SEGMENT AGAIN
  1088						MOVX T3,MSDAT		;GET MESSAGE TYPE (DATA MESSAGE)
  1089						STOR T3,MSTOM,(T2)	;STORE MESSAGE TYPE IN MESSAGE HEADER
  1090						MOVE T1,OSGLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1091						MOVE T3,LLBPCT(T1)	;GET COUNT OF BYTES IN THE MESSAGE
  1092						SUBI T3,5		;ACCOUNT FOR NSP OVERHEAD
  1093						STOR T3,MSDTC,(T2)	;STORE COUNT INTO MESSAGE HEADER
  1094						CALL SNDSEG		;SEND THE MESSAGE
  1095					
  1096					; SEGMENT SENT. RETURN SUCCESS.
  1097					
  1098						RETSKP			;DONE.
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 28
NSPINT	MAC	18-Sep-81 07:02	

  1099					;CHKCIP - ROUTINE TO CHECK TO SEE IF A CLOSE IS IN PROGRESS
  1100					;
  1101					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK
  1102					;		CALL CHKCIP
  1103					;RETURNS: +1 ALWAYS, WITH LLFEM SET IF NEEDED
  1104					
  1105					CHKCIP:	ASUBR <CIPLLB>
  1106					
  1107						MOVE T1,CIPLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1108						JE LLCIP,(T1),R		;IF CLOSE NOT IN PROGRESS, DONE.
  1109						LOAD T3,LLOCT,(T1)	;GET NUMBER OF BYTES REMAINING TO BE SENT
  1110						LOAD T4,LLSWG,(T1)	;GET MAXIMUM SEGMENT SIZE FOR THIS LINK
  1111						CAMLE T3,T4		;SENDING LAST SEGMENT FOR THIS BUFFER ?
  1112						RET			;NO, WAIT FOR LAST SEGMENT TO SET EOM
  1113						SETONE LLFEM,(T1)	;YES, SET END OF MESSAGE NEEDED
  1114						RET			;AND DONE.
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 29
NSPINT	MAC	18-Sep-81 07:02	

  1115					SUBTTL	Internal Links - Provide a Buffer for Input
  1116					
  1117					XNSINB:	ASUBR <IBPLID,IBPBUF,IBPCNT,IBPLLB>
  1118					
  1119					; LOCK LOGICAL LINK BLOCK
  1120					
  1121					IBP001:	MOVE T1,IBPLID		;GET LINK ID
  1122						CALL INTLOK		;GO CHECK LINK STATE
  1123						 RET			;FAILED, RETURN ERROR
  1124						MOVEM T1,IBPLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1125					
  1126					; CHECK THAT WE PREVIOUSLY REQUESTED A BUFFER AND DID NOT GET IT
  1127					
  1128						MOVE T1,IBPLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1129						JN LLDRB,(T1),IBP010	;DRIVER REFUSED BUFFER PREVIOUSLY ?
  1130						BUG (NSPEXB)
  1131						RETBAD (NSPX5)		;RETURN FAILURE TO DRIVER
  1132					IBP010:	SETZRO LLDRB,(T1)	;CLEAR "DRIVER REFUSED TO PROVIDE BUFFER" FLAG
  1133					
  1134					; STORE NEW BUFFER ADDRESS, COUNT, AND FLAGS
  1135					
  1136						MOVE T1,IBPLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1137						MOVE T4,IBPBUF		;GET NEW BUFFER ADDRESS
  1138						STOR T4,LLBFI,(T1)	;SAVE IN LINK BLOCK
  1139						HRLI T4,(POINT 8,)	;FORM POINTER TO FIRST BYTE IN THIS BUFFER
  1140						STOR T4,LLBPI,(T1)	;SAVE AS POINTER TO NEXT BYTE TO BE INPUT
  1141						MOVE T4,IBPCNT		;GET COUNT AND FLAGS
  1142						STOR T4,LLICT,(T1)	;STORE COUNT OF BYTES CURRENTLY LEFT IN BUFFER
  1143						STOR T4,LLIIC,(T1)	;ALSO STORE AS INITIAL COUNT OF BYTES IN BUFFER
  1144						TXNE T4,NS%TRN		;DRIVER WANT MESSAGES TRUNCATED IF TOO LONG ?
  1145						JRST [	SETONE LLTRC,(T4) ;YES, NOTE TRUNCATION DESIRED
  1146							JRST .+1 ]	;AND CONTINUE
  1147					
  1148					; TRY TO DO INPUT NOW THAT A BUFFER IS AVAILABLE
  1149					
  1150						MOVE T1,IBPLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1151						CALL INTSET		;DO AS MUCH INPUT AS POSSIBLE
  1152						 JRST [	MOVE T1,IBPLLB	;FAILED, LINK WENT AWAY. GET BLOCK ADDRESS
  1153							CALLRET BLKULK]	;UNLOCK THE BLOCK AND RETURN FAILURE
  1154					
  1155					; DONE, UNLOCK LOGICAL LINK BLOCK AND RETURN
  1156					
  1157						MOVE T1,IBPLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1158						CALL BLKULK		;UNLOCK THE BLOCK
  1159						RETSKP			;DONE
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 30
NSPINT	MAC	18-Sep-81 07:02	

  1160					SUBTTL	Internal Links - Send and Receive Interrupt Messages
  1161					
  1162					
  1163					XNSRIN:	ASUBR <RIMLID,RIMBUF,RIMCNT,RIMLLB>
  1164					
  1165					; LOCK LOGICAL LINK BLOCK
  1166					
  1167						MOVE T1,RIMLID		;GET LINK ID
  1168						CALL INTLOK		;GO LOCK THE LINK
  1169						 RET			;FAILED, RETURN ERROR
  1170						MOVEM T1,RIMLLB		;SAVE LOGICAL LINK BLOCK
  1171					
  1172					; READ THE INTERRUPT MESSAGE
  1173					
  1174						MOVE T1,RIMLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1175						MOVE T2,[IFIW+[IDPB T2,T3] ;GET ROUTINE TO STORE BYTES
  1176							 RET]		;  AND RETURN
  1177						MOVE T3,RIMBUF		;GET ADDRESS OF DRIVER'S BUFFER
  1178						HRLI T3,(POINT 8,)	;FORM POINTER TO BUFFER
  1179						CALL RDINT		;GO READ INTERRUPT MESSAGE
  1180						 RET			;FAILED, RETURN ERROR
  1181						MOVEM T3,RIMCNT		;SAVE NUMBER OF BYTES READ
  1182						MOVE T1,RIMLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1183						CALL BLKULK		;UNLOCK THE BLOCK
  1184						MOVE T1,RIMCNT		;RESTORE COUNT
  1185						RETSKP			;DONE, RETURN
  1186					
  1187					
  1188					
  1189					XNSSIN:	ASUBR <SINLID,SINBUF,SINCNT,SINLLB>
  1190					
  1191					; LOCK THE LOGICAL LINK BLOCK
  1192					
  1193						MOVE T1,SINLID		;GET LINK ID
  1194						CALL INTLOK		;GO LOCK THE LINK
  1195						 RET			;FAILED, RETURN ERROR
  1196						MOVEM T1,SINLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1197					
  1198					; SEND THE INTERRUPT MESSAGE
  1199					
  1200						MOVE T1,SINLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1201						MOVE T2,[IFIW![ILDB T2,T3]
  1202							RET ]		;ROUTINE TO GET BYTES
  1203						MOVE T3,SINBUF		;GET BUFFER ADDRESS
  1204						HRLI T3,(POINT 8,)	;FORM POINTER TO INTERRUPT MESSAGE
  1205						MOVE T4,SINCNT		;GET COUNT
  1206						CALL SNINT		;SEND THE MESSAGE
  1207						 RET			;FAILED, RETURN ERROR
  1208						MOVE T1,SINLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1209						CALL BLKULK		;UNLOCK THE BLOCK
  1210						RETSKP			;DONE, RETURN SUCCESS
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 31
NSPINT	MAC	18-Sep-81 07:02	

  1211					SUBTTL	Internal Links - Read Link Status
  1212					
  1213					XNSRLS:	ASUBR <RLSLID,RLSLLB,RLSSTS>
  1214					
  1215					; LOCK THE LOGICAL LINK BLOCK
  1216					
  1217						MOVE T1,RLSLID		;GET LINK ID
  1218						CALL INTLOK		;LOCK THE LOGICAL LINK
  1219						 RET			;FAILED, RETURN ERROR TO CALLER
  1220						MOVEM T1,RLSLLB		;SAVE LINK ADDRESS
  1221					
  1222					; GET THE LINK STATUS
  1223					
  1224						MOVE T1,RLSLLB		;GET LOGICAL LINK ADDRESS
  1225						CALL RDSTS		;GET THE STATUS
  1226						MOVEM T3,RLSSTS		;SAVE STATUS
  1227					
  1228					; UNLOCK THE LINK BLOCK AND CONVERT ERROR CODE
  1229					
  1230						CALL BLKULK		;UNLOCK THE LOGICAL LINK BLOCK
  1231						HRRZ T1,RLSSTS		;GET NSP ERROR CODE
  1232						CALL NSPERR		;CONVERT TO TOPS20 ERROR CODE
  1233						 RETBAD ()		;FAILED
  1234						HRR T3,T1		;COPY ERROR CODE
  1235						HLL T3,RLSSTS		;COPY STATUS BITS
  1236						RETSKP			;DONE, RETURN SUCCESS
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 32
NSPINT	MAC	18-Sep-81 07:02	

  1237					SUBTTL	Internal Links - Read Maximum Link Segment Size
  1238					
  1239					XNSRSS:	ASUBR <RSSLID,RSSLLB,RSSERR,RSSSIZ>
  1240					
  1241					; LOCK THE LOGICAL LINK BLOCK
  1242					
  1243						MOVE T1,RSSLID		;GET LINK ID
  1244						CALL INTLOK		;LOCK THE LINK BLOCK
  1245						 RET			;FAILED, RETURN TO DRIVER
  1246						MOVEM T1,RSSLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1247					
  1248					; CHECK LINK STATE AND GET SEGMENT SIZE
  1249					
  1250						MOVE T1,RSSLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1251						CALL MTRNCK		;GO CHECK LINK STATE
  1252						 JRST [	MOVEM T1,RSSERR	;BAD STATE, SAVE ERROR CODE
  1253							MOVE T1,RSSLLB	;GET BLOCK ADDRESS
  1254							CALL BLKULK	;UNLOCK THE LINK BLOCK
  1255							MOVE T1,RSSERR	;RESTORE ERROR CODE
  1256							RET ]		;RETURN ERROR TO DRIVER
  1257						LOAD t4,LLSWG,(T1)	;GET MAX SEGMENT SIZE
  1258						MOVEM t4,RSSSIZ		;SAVE SEGMENT SIZE
  1259						CALL BLKULK		;UNLOCK THE LINK BLOCK
  1260						MOVE T1,RSSSIZ		;RESTORE SEGMENT SIZE
  1261						RETSKP			;AND DONE
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 33
NSPINT	MAC	18-Sep-81 07:02	

  1262					SUBTTL	Internal Links - Read Optional Data
  1263					
  1264					XNSRDA::ASUBR <RDALID,RDABUF,RDALLB,RDACNT>
  1265						STKVAR <RDASRC,RDADST>
  1266					
  1267					; LOOK UP THE LOGICAL LINK BLOCK
  1268					
  1269					RDA001:	LLLOCK			;LOCK THE LOGICAL LINK TREE
  1270						MOVE T1,RDALID		;GET LINK ID
  1271						SETOM T2		;ANY LINK
  1272						CALL LLLKUP		;GO FIND BLOCK
  1273						 JRST [	LLLULK		;NOT IN RUN STATE, CANNOT DO ANY OUTPUT
  1274							RET ]		;UNLOCK THE TREE AND RETURN FAILURE
  1275						MOVEM T1,RDALLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1276					
  1277					; LOCK THE BLOCK
  1278					
  1279						MOVE T1,RDALLB		;GET LOGICAL LINK BLOCK ADDRESS
  1280						CALL BLKLOK		;GO LOCK THE LOGICAL LINK BLOCK
  1281						 JRST [	LLLULK		;CANNOT LOCK IT NOW, UNLOCK THE TREE
  1282							MDISMS		;WAIT UNTIL CONDITION SATISFIED
  1283							JRST RDA001 ]	;TRY AGAIN TO PROCESS ACK'S
  1284						LLLULK			;BLOCK IS NOW LOCKED. UNLOCK THE TREE
  1285					
  1286					; SET UP TO COPY OPTIONAL DATA
  1287					
  1288						MOVE T1,RDALLB		;GET LOGICAL LINK BLOCK ADDRESS
  1289						LOAD T4,LLUCT,(T1)	;GET COUNT OF BYTES IN OPTIONAL DATA
  1290						MOVEM T4,RDACNT		;SAVE COUNT OF BYTES TO BE MOVED
  1291						LOAD T3,LLOPT,(T1)	;GET ADDRESS OF OPTIONAL DATA
  1292						MOVE T2,RDABUF		;GET ADDRESS OF DESTINATION BUFFER
  1293						MOVE T1,[POINT 8,(T2)]	;FORM POINTER TO DESTINATION STRING
  1294						MOVEM T1,RDADST		;SAVE DESTINATION POINTER
  1295						MOVE T1,[POINT 8,(T3)]	;FORM POINTER TO SOURCE STRING
  1296						MOVEM T1,RDASRC		;SAVE SOURCE POINTER
  1297					
  1298					; COPY THE OPTIONAL DATA TO THE DRIVER BUFFER
  1299					
  1300					RDA010:	SOJL T4,RDA020		;IF NO MORE BYTES TO MOVE ALL DONE
  1301						ILDB T1,RDASRC		;GET A BYTE
  1302						IDPB T1,RDADST		;SAVE THE BYTE IN DRIVER'S BUFFER
  1303						JRST RDA010		;GO DO THE NEXT BYTE
  1304					
  1305					; HERE WHEN DONE MOVING THE STRING
  1306					
  1307					RDA020:	MOVE T1,RDALLB		;GET LOGICAL LINK BLOCK ADDRESS
  1308						CALL BLKULK		;UNLOCK THE BLOCK
  1309						MOVE T1,RDACNT		;RETURN COUNT TO DRIVER
  1310						RETSKP			;DONE, RETURN SUCCESS
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 34
NSPINT	MAC	18-Sep-81 07:02	

  1311					SUBTTL	Internal Links - Read Host Name
  1312					
  1313					XNSRHN:	ASUBR <RHNLID,RHNBUF,RHNLLB,RHNERR>
  1314					
  1315					; LOOK UP THE LOGICAL LINK BLOCK
  1316					
  1317					RHN001:	LLLOCK			;LOCK THE LOGICAL LINK TREE
  1318						MOVE T1,RHNLID		;GET LINK ID
  1319						SETOM T2		;ANY LINK
  1320						CALL LLLKUP		;GO FIND BLOCK
  1321						 JRST [	LLLULK		;NOT IN RUN STATE, CANNOT DO ANY OUTPUT
  1322							RET ]		;UNLOCK THE TREE AND RETURN FAILURE
  1323						MOVEM T1,RHNLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1324					
  1325					; LOCK THE BLOCK
  1326					
  1327						MOVE T1,RHNLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1328						CALL BLKLOK		;GO LOCK THE LOGICAL LINK BLOCK
  1329						 JRST [	LLLULK		;CANNOT LOCK IT NOW, UNLOCK THE TREE
  1330							MDISMS		;WAIT UNTIL CONDITION SATISFIED
  1331							JRST RHN001 ]	;TRY AGAIN TO PROCESS ACK'S
  1332						LLLULK			;BLOCK IS NOW LOCKED. UNLOCK THE TREE
  1333					
  1334					; GET HOST NAME AND PLACE INTO DRIVER BUFFER
  1335					
  1336						MOVE T1,RHNLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1337						LOAD T2,LLHST,(T1)	;GET FOREIGN HOST NAME
  1338						TQNE LLLOC,(T1)		;IS THIS A LOCAL CONNECTION ?
  1339						 MOVEI T2,OURNAM	;YES, GET ADDRESS OF OUR NAME STRING
  1340						MOVE T1,RHNBUF		;GET DRIVER BUFFER ADDRESS
  1341						SETOM T3		;ASCIZ STRING, NO COUNT
  1342						CALL MOVSTR		;COPY THE STRING
  1343					
  1344					; UNLOCK THE LINK BLOCK AND RETURN
  1345					
  1346						MOVE T1,RHNLLB		;GET LOGICAL LINK BLOCK
  1347						CALL BLKULK		;UNLOCK THE BLOCK
  1348						RETSKP			;DONE, RETURN SUCCESS
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 35
NSPINT	MAC	18-Sep-81 07:02	

  1349					SUBTTL	Internal Links - Close a link
  1350					
  1351					XNSCLZ:	ASUBR <CLILID,CLIRSN,CLIBUF,CLICNT>
  1352						STKVAR <CLILLB,CLIERR>
  1353					
  1354					; LOOK UP THE LOGICAL LINK BLOCK
  1355					
  1356					CLI001:	LLLOCK			;LOCK THE LOGICAL LINK TREE
  1357						MOVE T1,CLILID		;GET LINK ID
  1358						SETOM T2		;ANY LINK
  1359						CALL LLLKUP		;GO FIND BLOCK
  1360						 JRST [	LLLULK		;NOT IN RUN STATE, CANNOT DO ANY OUTPUT
  1361							RETBAD (NSPX02) ] ;UNLOCK THE TREE AND RETURN FAILURE
  1362						MOVEM T1,CLILLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1363						LLLULK			;BLOCK IS NOW LOCKED. UNLOCK THE TREE
  1364					
  1365					; HANDLE ANY OUTSTANDING ACKS
  1366					
  1367						MOVE T1,CLILLB		;GET LOGICAL LINK BLOCK ADDRESS
  1368					;	CALL MOVSEG		;HANDLE ACK'S
  1369					;	 JFCL			;IGNORE FAILURE
  1370					
  1371					; DISPATCH TO SPECIFIC ROUTINE BASED ON LINK STATE
  1372					
  1373						MOVE T1,CLILLB		;GET LOGICAL LINK BLOCK ADDRESS
  1374						LOAD T2,LLSTA,(T1)	;GET LOGICAL LINK STATE
  1375						JRST @CLIDSP-1(T2)	;DISPATCH TO PROCESSING ROUTINE
  1376					
  1377					; TABLE OF ROUTINES TO DO A CLOSE FOR LINKS IN VARIOUS STATES
  1378					
  1379					CLIDSP:	IFIW!CLIDON
  1380						IFIW!CLIDON
  1381						IFIW!CLIDI
  1382						IFIW!CLIRUN
  1383						IFIW!CLIWDC
  1384						IFIW!CLIDIQ
  1385						IFIW!CLIDIR
  1386						IFIW!CLIABT
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 36
NSPINT	MAC	18-Sep-81 07:02	

  1387					; HERE TO CLOSE AN INTERNAL LINK IN RUN STATE
  1388					
  1389					CLIRUN:	MOVE T1,CLILLB		;GET LOGICAL LINK BLOCK ADDRESS
  1390						SKIPN CLIRSN		;ABORT CLOSE ?
  1391						CALL FRCOUT		;NO, GO FORCE OUT ANY REMAINING DATA
  1392					
  1393					; STORE REASON CODE IN LOGICAL LINK BLOCK
  1394					
  1395						MOVE T4,CLIRSN		;GET REASON FROM DRIVER
  1396						CAMN T4,[-1]		;WANT DEFAULT REASON ?
  1397					CLIDI:	MOVX T4,.DCX9		;YES, SUPPLY DEFAULT
  1398						MOVE T1,CLILLB		;GET ADDRESS OF LOGICAL LINK BLOCK
  1399						STOR T4,LLRSN,(T1)	;STORE REASON CODE IN LOGICAL LINK
  1400					
  1401					; SEND A DISCONNECT-INITIATE MESSAGE TO THE REMOTE NSP
  1402					
  1403					CLIDIQ:
  1404					CLRN10:	MOVE T1,CLILLB		;GET LOGICAL LINK BLOCK ADDRESS
  1405						SETZM T2		;ASSUME SYNCHRONOUS CLOSE
  1406						SKIPE CLIRSN		;ABORT CLOSE ?
  1407						SETOM T2		;YES, NOTE SO
  1408						MOVE T3,CLICNT		;GET COUNT OF BYTES IN OPTIONAL DATA
  1409						MOVE T4,CLIBUF		;GET ADDRESS OF BUFFER WITH DATA
  1410						CALL CLZSDI		;GO SEND A DI
  1411						 JRST [	SKIPE CLIRSN	;ABORT?
  1412							JRST CLIABT	;YES. PROCEED AS IF CONFIRMED
  1413							MDISMS		;CANNOT SEND IT, WAIT A WHILE
  1414							JRST CLRN10 ]	;TRY TO SEND DI AGAIN
  1415						; ..
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 37
NSPINT	MAC	18-Sep-81 07:02	

  1416						; ..
  1417					
  1418					; IF ABORT CLOSE, KILL LINK QUEUES.  ELSE WAIT FOR DC FROM REMOTE NSP
  1419					
  1420					CLIWDC:	MOVE T1,CLILLB		;GET ADDRESS OF LOGICAL LINK BLOCK
  1421						SKIPE CLIRSN		;ABORT CLOSE ?
  1422						JRST [	SETONE LLSDE,(T1) ;YES, DISSOCIATE PROCESS FROM LINK
  1423							CALL IFLUSH	;KILL ALL LINK QUEUES AND DISPOSE OF BUFFERS
  1424							CALL BLKULK	;UNLOCK THE BLOCK
  1425							JRST CLRN20 ]	;AND CONTINUE WITH CLEANUP
  1426						MOVEI T2,CHKDCR		;GET TEST ADDRESS
  1427						CALL MAKTST		;MAKE STANDARD SCHEDULER TEST WORD
  1428						MOVE T2,CLILLB		;GET BACK LOGICAL LINK BLOCK ADDRESS
  1429						CALL INTWAT		;WAIT FOR DC TO ARRIVE
  1430						 JRST [	MOVEM T1,CLIERR	;SAVE ERROR CODE
  1431							MOVE T1,CLILLB	;GET LINK BLOCK ADDRESS
  1432							CALL BLKULK	;UNLOCK THE BLOCK
  1433							MOVE T1,CLIERR	;RESTORE ERROR CODE
  1434							RETBAD () ]	;FAILED, OTHER END MUST HAVE ABORTED LINK
  1435					
  1436					; DC HAS ARRIVED - CHECK REASON CODE
  1437					
  1438					CLIABT:
  1439					CLIDIR:	MOVE T4,CLILLB		;GET LOGICAL LINK BLOCK ADDRESS
  1440						LOAD T1,LLRSN,(T4)	;GET REASON CODE
  1441						CAIE T1,0		;NORMAL DISCONNECT, OR
  1442						CAIN T1,.DCX42		; REPLY TO DI MESSAGE ?
  1443						JRST CLRN15		;YES, GO ON
  1444						SKIPN CLIRSN		;NO, WAS THIS AN ABORT CLOSE ?
  1445						JRST [	CALL BLKULK	;NO, SYNCHRONOUS CLOSE FAILED.
  1446							RETBAD (DCNX11) ] ;RETURN ERROR TO DRIVER
  1447					
  1448					; KILL LINK QUEUES AND DELETE LINK BLOCK
  1449					
  1450					CLIDON:
  1451					CLRN15:	MOVE T1,CLILLB		;GET ADDRESS OF LOGICAL LINK BLOCK
  1452						CALL IFLUSH		;KILL LINK QUEUES AND DISPOSE OF BUFFERS
  1453						LLLOCK			;LOCK THE LOGICAL LINK TREE
  1454						CALL DELNOD		;RELEASE THE LINK BLOCK
  1455						LLLULK			;UNLOCK THE TREE
  1456						OKINT			;IN LIEU OF OKINT IN BLKULK THAT'S NOT DONE
  1457					
  1458					; ACCOUNT FOR REMOVAL OF A LINK
  1459					
  1460					CLRN20:	DECR DCCUR		;DECREMENT LINK COUNT
  1461						RETSKP			;DONE, RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 38
NSPINT	MAC	18-Sep-81 07:02	

  1462					;FRCOUT - ROUTINE TO FORCE OUT ANY REMAINING DATA FOR AN INTERNAL LINK
  1463					;
  1464					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK (LOCKED)
  1465					;		CALL FRCOUT
  1466					;RETURN: +1 ALWAYS, WITH ALL DATA SENT
  1467					
  1468					FRCOUT:	ASUBR <FRCLLB>
  1469					
  1470					; SEE IF ALL DATA HAS ALREADY BEEN SENT
  1471					
  1472						MOVE T1,FRCLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1473						JE LLBFO,(T1),FRC010	;IF ALL DATA SENT, WAIT TILL ALL ACK'ED
  1474					
  1475					; DATA REMAINS TO BE SENT, SO THIS LINK MUST BE ON OUTQUE.  JUST
  1476					; WAIT UNTIL THE BACKGROUND PROCESS SENDS THE DATA.
  1477					
  1478						SETONE LLCIP,(T1)	;NOTE SYNCHRONOUS CLOSE IN PROGRESS
  1479						LOAD T1,LLLNK,(T1)	;GET LINK ID
  1480						HRLS T1			;FORM STANDARD SCHEDULER TEST
  1481						HRRI T1,SNOTST		; WORD
  1482						MOVE T2,FRCLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1483						CALL INTWAT		;WAIT FOR ALL DATA TO BE SENT
  1484						 RET			;LINK WENT AWAY, DONE.
  1485					
  1486					; ALL DATA SENT - WAIT UNTIL ALL SEGMENTS HAVE BEEN ACK'ED
  1487					
  1488					FRC010:	MOVE T2,FRCLLB		;GET ADDRESS OF LOGICAL LINK BLOCK
  1489						JE LLQOU,(T2),R		;ALL ACK'D, SO DONE.
  1490						LOAD T1,LLLNK,(T2)	;GET LINK ID
  1491						HRLS T1			;FORM STANDARD SCHEDULER TEST
  1492						HRRI T1,CHKEMP		; WORD
  1493						CALL INTWAT		;WAIT FOR ALL DATA TO BE SENT
  1494						 RET			;LINK WENT AWAY, DONE
  1495						RET			;DONE, RETURN
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 39
NSPINT	MAC	18-Sep-81 07:02	

  1496					;IFLUSH - ROUTINE TO FLUSH ALL BUFFERS AND QUEUES FOR INTERNAL LINKS
  1497					;
  1498					;ACCEPTS IN T1/	ADDRESS OF LOGICAL LINK BLOCK
  1499					;		CALL IFLUSH
  1500					;RETURNS: +1 ALWAYS
  1501					
  1502					IFLUSH:	ASUBR <IFLLLB>
  1503					
  1504					; DISPOSE OF ANY INPUT BUFFER STILL CONTROLLED BY NSP
  1505					
  1506						MOVE T4,IFLLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1507						JE LLBFI,(T4),IFL010	;IF NO INPUT BUFFER THEN GO CHECK OUTPUT BUFFER
  1508						LOAD T1,LLDRV,(T4)	;GET DRIVER CORRELATION CODE
  1509						LOAD T2,LLBFI,(T4)	;GET BUFFER ADDRESS
  1510						LOAD T3,LLIIC,(T4)	;GET INITIAL COUNT OF BYTES
  1511						OPSTR <SUB T3,>,LLICT,(T4) ;COMPUTE NUMBER OF BYTES IN BUFFER
  1512						TXO T3,NS%ABT		;NOTE THAT LINK NOT USABLE
  1513						LOAD T4,LLVEC,(T4)	;GET DRIVER VECTOR ADDRESS
  1514						CALL @.NSDAT(T4)	;NOTIFY DRIVER OF LINK ABORT
  1515					
  1516					; HERE TO DISPOSE OF OUTPUT BUFFER - NOTE THAT THERE SHOULD NOT BE
  1517					; AN OUTPUT BUFFER IF THIS IS A SYNCHRONOUS CLOSE.
  1518					
  1519					IFL010:	MOVE T4,IFLLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1520						JE LLBFO,(T4),IFL020	;ALL SET IF NO OUTPUT BUFFER
  1521						LOAD T1,LLDRV,(T4)	;GET DRIVER CORRELATION CODE
  1522						LOAD T2,LLBFO,(T4)	;GET BUFFER ADDRESS
  1523						LOAD T3,LLVEC,(T4)	;GET DRIVER VECTOR ADDRESS
  1524						CALL @.NSOBE(T3)	;TELL DRIVER TO DISPOSE OF BUFFER
  1525					
  1526					; HERE TO DISPOSE OF OTHER LINK QUEUES
  1527					
  1528					IFL020:	MOVE T1,IFLLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1529						CALLRET FLUSH		;FLUSH THE QUEUES AND RETURN TO CALLER
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page 40
NSPINT	MAC	18-Sep-81 07:02	

  1530					;INTLOK - ROUTINE TO LOCK AN INTERNAL LOGICAL LINK
  1531					;
  1532					;ACCEPTS IN T1/	LINK IDENTIFIER
  1533					;		CALL INTLOK
  1534					;RETURNS: +1	 FAILED, COULD NOT LOCK THE LINK
  1535					;	  +2	SUCCESS, WITH T1/ ADDRESS OF LOGICAL LINK BLOCK
  1536					
  1537					INTLOK:	ASUBR <ILKLID,ILKLLB>
  1538					
  1539					; GET THE ADDRESS OF THE LOGICAL LINK BLOCK
  1540					
  1541					ILK001:	LLLOCK			;LOCK THE LOGICAL LINK TREE
  1542						MOVE T1,ILKLID		;GET LINK ID
  1543						CALL CHKLNK		;GO CHECK LINK STATE
  1544						 JRST [	LLLULK		;NOT IN RUN STATE, CANNOT DO ANY OUTPUT
  1545							RET ]		;UNLOCK THE TREE AND RETURN FAILURE
  1546						MOVEM T1,ILKLLB		;SAVE LOGICAL LINK BLOCK ADDRESS
  1547					
  1548					; LOCK THE BLOCK
  1549					
  1550						MOVE T1,ILKLLB		;GET LOGICAL LINK BLOCK ADDRESS
  1551						CALL BLKLOK		;GO LOCK THE LOGICAL LINK BLOCK
  1552						 JRST [	LLLULK		;CANNOT LOCK IT NOW, UNLOCK THE TREE
  1553							MDISMS		;WAIT UNTIL CONDITION SATISFIED
  1554							JRST ILK001 ]	;TRY AGAIN TO PROCESS ACK'S
  1555						LLLULK			;BLOCK IS NOW LOCKED. UNLOCK THE TREE
  1556					
  1557					; RETURN THE ADDRESS OF THE LINK BLOCK
  1558					
  1559						MOVE T1,ILKLLB		;GET BLOCK ADDRESS
  1560						RETSKP			;DONE, RETURN SUCCESS
  1561					
  1562					   >				;END IFN NSINTF AT BEGINNING
  1563
  1564						TNXEND
  1565						END

NO ERRORS DETECTED

PROGRAM BREAK IS 000000
PSECT 1 BREAK IS 000003 FOR  RSCOD 
PSECT 2 BREAK IS 000012 FOR  BGSTR 
PSECT 3 BREAK IS 000001 FOR  BGPTR 
CPU TIME USED 00:15.416

169P CORE USED
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page S-1
NSPINT	MAC	18-Sep-81 07:02		SYMBOL TABLE

APRCHN		000003	sin	NETUIN		000000	ext	
ASGWDW		000000	ext	NETUOU		000000	ext	
BLKASG		000000	ext	NODNUM		000000	ext	
BLKLOK		000000	ext	NOSTR		777777	spd	
BLKULK		000000	ext	NSPERR		000000	ext	
CHKDCR		000000	ext	NSPLPB		000000	ext	
CHKEMP		000000	ext	NSPMAX		000000	ext	
CKPSIZ		000100	sin	NUMVAL		000005	sin	
CLZSDI		000000	ext	OBJMAX		000000	ext	
CMPLEN		000000	ext	OBJSRC		000000	ext	
CRTLNK		000000	ext	OBJTBL		000000	ext	
DCNNAM		000000	ext	OPNDNC		000000	ext	
DCNSET		000000	ext	OPNIWK		000000	ext	
DELNOD		000000	ext	OPNSRC		000000	ext	
DTBYTM		400000	sin	OURCNT		000000	ext	
EXTSET		000000	ext	OURNAM		000000	ext	
FLUSH		000000	ext	OURNUM		000000	ext	
GETRES		000000	ext	OURTTL	566360	515664	spd	
HB%1OK	200000	000000	sin	PRSNAM		000000	ext	
HB%2OK	100000	000000	sin	PSASN		000010	sin	
HB%HBM	040000	000000	sin	PSDEL		000001	sin	
HB%MUN	020000	000000	sin	PSRDN		000002	sin	
HB%PUB	400000	000000	sin	PSRIP		000006	sin	
HB%WLK	010000	000000	sin	PSRPQ		000000	sin	
INTSET		000000	ext	PSWIP		000004	sin	
ISEGSZ		000403	sin	R		000000	ext	
ITSID		000000	ext	RDINT		000000	ext	
ITSNAM		000000	ext	RDSTS		000000	ext	
ITSNUM		000000	ext	RMSGQ		000000	ext	
JSFRST		777777	sin	RSCOD		000000	ext	
LASTSK		000000	ext	RSKP		000000	ext	
LLBIT		000000	ext	SEGSIZ		000400	sin	
LLBITS		000000	ext	SMSGQ		000000	ext	
LLHEAD		000000	ext	SNDCHK		000000	ext	
LLLKUP		000000	ext	SNDSEG		000000	ext	
LLLLCK		000000	ext	SNINT		000000	ext	
LOKLL		000000	ext	SPTDSW		000000	sin	
MAKFLG		000000	ext	SRCNAM		000000	ext	
MAKMSG		000000	ext	SRNSET		000000	ext	
MAKTST		000000	ext	STRSAV		000000	ext	
MAXBLK		000000	ext	SWPERR	200000	000000	sin	
MAXEXP		000000	ext	TELOBE		000000	ext	
MAXLC		000047	sin	TIMWAT		000000	ext	
MAXLNK		000000	ext	ULOKLL		000000	ext	
MAXLW		000010	sin	VERSET		000000	ext	
MAXNOD		000024	spd	$NSPIN		000000	sen	
MCBDTE		000000	ext	.ENTER		000000	ext	
MOVST1		000000	ext	.FP		000015	spd	
MOVSTR		000000	ext	.FPAC		000005	spd	
MSGQ		000000	ext	.JBHSO		000075	sin	
MTRNCK		000000	ext	.SAC		000016	sin	
NAKCNT		000000	ext	.SAV1		000000	ext	
NETDIR		000000	ext	.SAV2		000000	ext	
NETSQ1		000000	ext	.SAV3		000000	ext	
NETSR1		000000	ext	
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page S-2
NSPINT	MAC	18-Sep-81 07:02		SYMBOL TABLE FOR PSECT   RSCOD 

ASGWDW		000000	ext	VERSET		000000	ext	
BGPTR		000000	ext	..NRGS		000000	spd	
BGSTR		000000	ext	
BLKASG		000000	ext	
BLKLOK		000000	ext	
BLKULK		000000	ext	
BUGHLT		000001'	ext	
CMPLEN		000000	ext	
DCNNAM		000000	ext	
DCNSET		000000	ext	
EXTSET		000000	ext	
GETRES		000000	ext	
ITSID		000000	ext	
ITSNAM		000000	ext	
ITSNUM		000000	ext	
LASTSK		000000	ext	
LLBIT		000000	ext	
LLBITS		000000	ext	
LLHEAD		000000	ext	
LLLLCK		000000	ext	
LNSPIN		000001'		
MAKFLG		000000	ext	
MAKMSG		000000	ext	
MAXBLK		000000	ext	
MAXEXP		000000	ext	
MAXLNK		000000	ext	
MCBDTE		000000	ext	
MSGQ		000000	ext	
NAKCNT		000000	ext	
NETDIR		000000	ext	
NETSQ1		000000	ext	
NETSR1		000000	ext	
NETUIN		000000	ext	
NETUOU		000000	ext	
NODNUM		000000	ext	
NOINTL		000001'	int	
NSINTF		000000	spd	
NSPLPB		000000	ext	
NSPMAX		000000	ext	
OBJMAX		000000	ext	
OBJTBL		000000	ext	
OPNDNC		000000	ext	
OPNSRC		000000	ext	
OURCNT		000000	ext	
OURNAM		000000	ext	
OURNUM		000000	ext	
OUTSEG		000000'	int	
PRSNAM		000000	ext	
RMSGQ		000000	ext	
RSCOD		000000	ext	
SMSGQ		000000	ext	
SNDCHK		000000	ext	
SNDSEG		000000	ext	
SRCNAM		000000	ext	
SRNSET		000000	ext	
NSPINT - Network Services Protocol Internal Interface	MACRO %53B(1215) 17:18 15-Jun-82 Page S-3
NSPINT	MAC	18-Sep-81 07:02		SYMBOL TABLE FOR PSECT   BGSTR 

..0001		000000'	spd	
ASGWDW	   117#
BLKASG	   117#
BLKLOK	   115#
BLKULK	   115#
BUGHLT	   134
CHKDCR	   111#
CHKEMP	   113#
CLZSDI	   112#
CMPLEN	   117#
CRTLNK	   116#
DCNNAM	   117#
DCNSET	   117#
DELNOD	   111#	   116#
EXTSET	   117#
FLUSH	   111#
GETRES	   116#
INTSET	   116#
ITSID	   117#
ITSNAM	   118#
ITSNUM	   118#
LASTSK	   118#
LLBIT	   118#
LLBITS	   118#
LLHEAD	   118#
LLLKUP	   115#
LLLLCK	   118#
LNSPIN	  1565#
LOKLL	   114#	   115#
MAKFLG	   116#
MAKMSG	   115#
MAKTST	   114#
MAXBLK	   119#
MAXEXP	   119#
MAXLNK	   119#
MCBDTE	   119#
MOVST1	   116#
MOVSTR	   112#
MSGQ	   119#
MTRNCK	   112#
NAKCNT	   119#
NETDIR	   119#
NETSQ1	   120#
NETSR1	   120#
NETUIN	   120#
NETUOU	   120#
NODNUM	   120#
NOINTL	   134#	   134	   135
NSINTF	   126#	   128	   136
NSPERR	   111#
NSPLPB	   120#
NSPMAX	   120#
OBJMAX	   121#
OBJSRC	   113#
OBJTBL	   121#
OPNDNC	   121#
OPNIWK	   115#
OPNSRC	   121#
OURCNT	   121#
OURNAM	   121#
OURNUM	   121#
OURTTL	   124#
OUTSEG	   129#
PRSNAM	   122#
RDINT	   114#
RDSTS	   112#
RMSGQ	   122#
SMSGQ	   122#
SNDCHK	   113#
SNDSEG	   112#
SNINT	   112#
SRCNAM	   122#
SRNSET	   122#
STRSAV	   113#
TELOBE	   113#
TIMWAT	   114#
ULOKLL	   115#
VERSET	   122#
$NSPIN	   124	   124#
..0001	   135#	   135
BUG	   130
CONCHK	   130
DOLOCS	   134
EXTN	   110	   111	   112	   113	   114	   115	   116	   117	   118	   119	   120	   121
GGLOBS	   124
NOINTL	   130	   135
TNXEND	   124#	  1564
TTITLE	   123
XGLOBS	   124
.XCMSY	   124