Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/drivers/nrm.lst
There are no other files named nrm.lst in the archive.
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28
NRM.M11    30-DEC-82 04:00		TABLE OF CONTENTS

  1634		ATS RESOURCE MANAGER SYMBOL DEFINITIONS
  1854		RESOURCE MESSAGE DISPATCH TABLES
  1921		$PCBGT	- Allocate a PCB
  1957		Deallocate a PCB
  2034		$PCBPT	- Get the Address of a PCB
  2075		$TCBPT	- Get the Address of a TCB
  2124		GETCPB	- Get Connect Pending Block
  2195		CCB DISPATCHER/RESOURCE MANAGER SCHEDULER
  2300		NSPCON	- CONNECT PROCESSOR
  2378		NSPDIS	- DISCONNECT NSP CONTROL PIPE
  2379		SRVDIS	- DISCONNECT SERVER DATA PIPE
  2600		NRMDIS	- PIPE DISCONNECTED
  2633		NSPDAT	- RESOURCE MESSAGE DISPATCHER
  2729		SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR
  2827		RESERVE	-   <SPECIFY-RESERVE> PROCESSOR
  2872		ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR
  2931		OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR
  3000		SRVSTR	-	START COMPLETE PROCESSOR
  3044		CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR
  3099		SRVSTP	-	STOP COMPLETE PROCESSOR
  3188		ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR
  3228		ASYREP	- ASYNCHRONOUS STATUS REPORT
  3265		INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR
  3284		RSPNS	- RESPONSE MESSAGE GENERATOR
  3361		RSPNSM	- GENERATE A <RESPONSE> MESSAGE
  3414		STATSM	- GENERATE A <STATUS> MESSAGE
  3454		CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS
  3474		SDBGT	- GET A SDB AND INSERT IN CCB
  3498		NRMDAT	- RETURN A NRM DATA BUFFER
  3517		NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER
  3547		GET*	- GET DATA FROM NRM MESSAGE
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 1
NRM.M11    30-DEC-82 04:00

     1						.TITLE	NRM - NODE RESOURCE MANAGER
     2						.IDENT	/007000/
     3						.ENABL	LC
     4
     5					;
     6					;                    COPYRIGHT (c) 1980, 1981, 1982
     7					;                    DIGITAL EQUIPMENT CORPORATION
     8					;                        Maynard, Massachusetts
     9					;
    10					;     This software is furnished under a license and may  be  used
    11					;     and copied only in accordance with the terms of such license
    12					;     and with the inclusion of the above copyright notice.   This
    13					;     software  or any other copies thereof may not be provided or
    14					;     otherwise made available to any other person.  No  title  to
    15					;     and ownership of the software is hereby transferred.
    16					;
    17					;     The information  in  this  software  is  subject  to  change
    18					;     without  notice  and should not be construed as a commitment
    19					;     by DIGITAL EQUIPMENT CORPORATION.
    20					;
    21					;     DIGITAL assumes no responsibility for the use or reliability
    22					;     of  its  software  on  equipment  which  is  not supplied by
    23					;     DIGITAL.
    24					;
    25					; VERSION 01
    26					;
    27					; R.A. MODEEN	02-MAY-77
    28					;
    29					; VERSION 02
    30					;
    31					; L.D. WEBBER	26-SEP-77
    32					;
    33					; VERSION 5
    34					;
    35					; A.D. PECKHAM	25-JAN-78
    36					;
    37					; VERSION 7
    38					;
    39					; A.D. PECKHAM  6-JUN-80
    40					;
    41					; MACRO LIBRARY CALLS
    42					;
    43						.MCALL	CCBDF$,DAT$,DSP$B,ScDF$,PHD$b
    44						.MCALL	MAP$,POP$S,PUSH$S,SAVMAP,RESMAP
    45						.MCALL	NCRA$,NACC$,NREJ$,NDAK$,NDIS$,NABO$
    46						.MCALL	NDAT$,NDRQ$,NRTN$,NIRQ$,NRTI$
    47	000000'					CCBDF$			; DEFINE CCB OFFSETS
    48	000000'					scDF$			; DEFINE Sc OFFSETS
    49	000000'					nrmdf$
    50
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 2
NRM.M11    30-DEC-82 04:00

    52					;
    53					; LOCAL MACROS
    54					;
    55					;  GTPCB$ - GET THE ASSOCIATED PCB IN R3
    56					;
    57
    58						.MACRO	GTPCB$
    59						GTULA$	R0
    60						CALL	$PCBPT
    61						.ENDM	GTPCB$
    62
    63					;
    64					;  GTTCB$ - GET THE ASSOCIATED TCB IN R5
    65					;
    66
    67						.MACRO	GTTCB$
    68						CLR	R0
    69						BISB	C.lix(R4),R0
    70						CALL	$TCBTT
    71						.ENDM	GTTCB$
    72
    73					;
    74					;  RESPOND - SEND A RESPONSE TO THE CURRENT RESOURCE MESSAGE
    75					;
    76
    77						.MACRO	RESPOND	CODE,SUB
    78						.IF EQ	<'CODE'-RC.IRC>	; ILLEGAL REQUEST CODE
    79						JMP	INVALID
    80						.IFF
    81						.IF	NB,<CODE>	; RESPONSE CODE
    82						MOV	#'CODE',R0
    83						.ENDC
    84						.IF	NB,<SUB>	; OPTIONAL DATA
    85						MOV	#'SUB',R5
    86						.ENDC
    87						JMP	RSPNS
    88						.ENDC
    89						.ENDM	RESPOND
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 3
NRM.M11    30-DEC-82 04:00		ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    91						.SBTTL	ATS RESOURCE MANAGER SYMBOL DEFINITIONS
    92					;+
    93					; THESE SYMBOL DEFINITIONS ARE LOCAL TO THE ATS RESOURCE MANAGER.
    94					; THE SYMBOLS WHICH ARE USED BY ALL THE ATS COMPONENTS (RESOURCE
    95					; MANAGER AND DIALOGUE MANAGERS) ARE DEFINED IN THE MACRO TTDF$
    96					; IN THE LIBRARY CELIB.MLB.
    97					;-
    98					 
    99					; REQUEST CODES (SET IN 1ST BYTE OF RESOURCE MESSAGE)
   100					 
   101		000041			RQ.RID=		041		; REQUESTOR ID
   102		000042			RQ.CAP=		042		; CAPABILITIES
   103		000047			RQ.RES=		047		; RESPONSE
   104		000050			RQ.SPC=		050		; SPECIFY
   105		000051			RQ.ACC=		051		; ACCESS
   106		000052			RQ.ASS=		052		; ASSIGN
   107		000053			RQ.STS=		053		; STATUS
   108		000054			RQ.CTL=		054		; CONTROL
   109					 
   110					 
   111					 
   112					; REQUEST TYPE CODES (SET IN 2ND BYTE OF RESOURCE MESSAGE)
   113					 
   114					; <SPECIFY> MESSAGE TYPES
   115					 
   116		000001			SY.RES=		001		; RESERVE
   117		000002			SY.SHR=		002		; SHARE
   118		000003			SY.REF=		003		; REFER
   119					 
   120					; <SPECIFY> MESSAGE FLAGS
   121					 
   122		000020			SY.DBL=		020		; DOUBLE (CONCATENATED) MESSAGE FLAG
   123					 
   124					; RANGE LIMITS FOR REQUEST CODE OF SECOND (CONCATENATED) MESSAGE
   125					 
   126		000051			RS.LOW=		051		; LOW LIMIT FOR REQUEST CODE
   127		000053			RS.HIH=		053		; HIGH LIMIT FOR REQUEST CODE
   128					 
   129					; <ACCESS> MESSAGE TYPES
   130					 
   131		000001			AC.SIN=		001		; OPEN SINGLE LOGICAL LINK
   132		000002			AC.SEP=		002		; OPEN SEPARATE DATA LINK
   133		000003			AC.CLO=		003		; CLOSE
   134		000004			AC.REL=		004		; RELEASE
   135					 
   136					 
   137					; <ASSIGN> MESSAGE TYPES
   138					 
   139		000001			AS.ASS=		001		; ASSIGN
   140		000002			AS.RES=		002		; RECLAIM
   141		000003			AS.HAN=		003		; HANDOFF
   142					 
   143					 
   144					; <STATUS> MESSAGE TYPES
   145					 
   146		000001			ST.QRY=		001		; QUERY
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 3-1
NRM.M11    30-DEC-82 04:00		ATS RESOURCE MANAGER SYMBOL DEFINITIONS

   147		000002			ST.REP=		002		; STATUS-REPORT
   148		000003			ST.ALT=		003		; STATUS-ALTER
   149					 
   150					 
   151					; <STATUS> MESSAGE SUB-TYPES
   152					 
   153		000001			SS.OPR=		001		; OPERATIONAL STATUS
   154		000002			SS.RES=		002		; RESOURCE CONTROL
   155		000003			SS.ERR=		003		; ERROR STATISTICS
   156		000004			SS.USA=		004		; USAGE ACCOUNTING
   157		000010			SS.ATS=		010		; ATS TERMINAL STATUS
   158					 
   159					; <STATUS> MESSAGE FLAGS
   160					 
   161		000020			ST.REL=		020		; AUTOMATIC STATUS-RELEASE FLAG
   162
   163					 
   164					; <RESPONSE> CODE DEFINITIONS
   165					 
   166		000000			RC.FIN=		0.		; FINAL RESPONSE, NO ERROR
   167		000001			RC.INT=		1.		; INTERMEDIATE RESPONSE
   168		000002			RC.ACC=		2.		; HANDOFEE ACCEPTS RESOURCE
   169		000024			RC.ANP=		20.		; ACCESS NOT PERMITTED
   170		000025			RC.IAC=		21.		; INVALID ACCOUNTING INFORMATION
   171		000026			RC.IRC=		22.		; INVALID OR UNSUPPORTED REQUEST TYPE
   172		000027			RC.ICT=		23.		; INVALID REQUEST CONCATENATION
   173		000030			RC.RQO=		24.		; CONTROL ID ALREADY IN USE
   174		000031			RC.RNE=		25.		; SPECIFIED RESOURCE DOES NOT EXIST
   175		000032			RC.RNA=		26.		; REQUESTED RESOURCE NOT AVAILABLE
   176		000033			RC.IRD=		27.		; INVALID RESOURCE DESCRIPTOR FORMAT
   177		000034			RC.GND=		28.		; GENERIC DESCRIPTOR NOT SUPPORTED
   178		000035			RC.SHN=		29.		; SHARED ACCESS NOT SUPPORTED
   179		000036			RC.RSO=		30.		; TOO MANY USERS OF THE RESOURCE
   180		000037			RC.MLN=		31.		; MULTI-LINK USAGE NOT SUPPORTED
   181		000040			RC.SLN=		32.		; SINGLE-LINK USAGE NOT SUPPORTED
   182		000041			RC.ISO=		33.		; INVALID SERVOR OPTION FIELD
   183		000042			RC.SNE=		34.		; SPECIFIED SERVOR DOES NOT EXIST
   184		000043			RC.CNO=		35.		; TOO MANY CONNECTIONS TO SERVOR
   185		000044			RC.RNS=		36.		; RESOURCE NOT SUPPORTED BY SERVOR
   186		000045			RC.RJS=		37.		; REQUEST REJECTED BY SERVOR
   187		000046			RC.RSI=		38.		; RESOURCE OR SERVOR STATE INCONSISTENCY
   188		000047			RC.RSE=		39.		; REQUEST MESSAGE SEQUENCE ERROR
   189		000050			RC.HNE=		40.		; HANDOFEE DOES NOT EXIST
   190		000051			RC.REJ=		41.		; HANDOFEE REJECTS RESOURCE
   191		000052			RC.ACA=		42.		; ACCEPTANCE OF HANDOFF ABORTED
   192					 
   193					 
   194					; <RESPONSE> MESSAGE DATA
   195					 
   196		000001			RD.PNC=		1.		; DATA PIPE NOT CONNECTED
   197		000002			RD.STR=		2.		; START THRESHOLD ERROR
   198		000001			RD.NDI=		1.		; REQUESTED RESOURCE NOT ONLINE
   199					 
   200					 
   201					; <STATUS-REPORT> MESSAGE DATA
   202					 
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 3-2
NRM.M11    30-DEC-82 04:00		ATS RESOURCE MANAGER SYMBOL DEFINITIONS

   203		000001			RP.RCV=		1.		; RECEIVE ERROR THRESHOLD ERROR
   204		000002			RP.REP=		2.		; REPLY THRESHOLD ERROR
   205		000003			RP.NAK=		3.		; NAK THRESHOLD ERROR
   206		000004			RP.TRM=		4.		; HARD TERMINAL ERROR
   207		000005			RP.IRQ=		5.		; INTERVENTION REQUIRED AT TERMINAL
   208		000006			RP.PWF=		6.		; POWERFAIL
   209		000007			RP.DSC=		7.		; DATA PIPE DISCONNECTED
   210
   211
   212
   213					;*THESE DEFINITIONS MUST *NOT* BE CHANGED !!!
   214
   215					;
   216					; BIT MASKS
   217					;
   218
   219		000007			PS.RCN	= PS.CI!PS.CC!PS.DIP		; PIPE READY FOR CONNECT
   220		000007			TS.OCP	= TS.CLP!TS.OPP!TS.OP		; TERMINAL OPEN OR CLOE PENDING
   221		000057			TS.ROP	= TS.OCP!TS.RLP!TS.HP		; TERMINAL READY FOR OPEN
   222		060000			TF.RAL	= TF.DEA!TF.DIS			; TERMINAL READY FOR ALLOCATION
   223
   224
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 4
NRM.M11    30-DEC-82 04:00		ATS RESOURCE MANAGER SYMBOL DEFINITIONS

   226					;+
   227					; INTERNAL DATA BASE FOR PROCESS
   228					;-
   229					 
   230
   231					;+
   232					; THESE DISPATCH TABLES ARE USED BY THE CCB DISPATCHER TO PASS CONTROL
   233					; TO THE APPROPRIATE ROUTINE IN THE RESOURCE MANAGER BASED ON THE FUNCTION
   234					; AND SUBFUNCTION PASSED IN THE CCB.
   235					;-
   236
   237	000000'					phd$b	NRM
   238	000040'					phd$d	nrmtb
   239	000020'					phd$e
   240
   241
   242					; FUNCTION DISPATCH TABLE
   243					 
   244		000000'				.PSECT	$PLIT$,D
   245	000000'				NRMTB:	DSP$B			; DISPATCH TABLE ADDRESS
   246	000000'					DSP$	FC.AST		; SRV Server error
   247	000002'					DSP$	FC.XME		;     TRANSMIT ENABLE ENTRY
   248	000004'					DSP$	FC.RCE		;     RECEIVE ENABLE ENTRY
   249	000006'					DSP$	FC.KIL		;     KILL ENABLE ENTRY
   250	000010'					DSP$	FC.CTL		; SRV CONTROL ENABLE ENTRY
   251	000012'					DSP$	FC.TIM,NRMTIM	;     TIMEOUT ENTRY
   252	000014'					DSP$	FC.XCP,NRMXCP	;     TRANSMIT COMPLETE ENTRY
   253	000016'					DSP$	FC.RCP,NRMRCP	; NSP RECEIVE COMPLETE ENTRY
   254	000020'					DSP$	FC.KCP		;     KILL COMPLETE ENTRY
   255	000022'					DSP$	FC.CCP,NRMCCP	;     CONTROL COMPLETE ENTRY
   256		000024			RM$RWT	= .-NRMTB
   257	000024'					DSP$	RM$RWT,NRMRWC	; NRM RESOURCE WAIT COMPLETE
   258	000026'					DSP$E
   259					 
   260					; 
   261					; SUB-FUNCTION DISPATCH
   262					;
   263
   264	000026'	000173	000032'		NRMXCP:	JMP	@10$(R3)	; Dispatch SC Transmit Complete:
   265
   266	000032'				10$:	DSP$B
   267	000032'					DSP$			; S$CON	- Connect complete
   268	000034'					DSP$	,REQUEST	; S$ACC	- Accept complete
   269	000036'					DSP$			; S$REJ	- Reject complete
   270	000040'					DSP$	,NRMDAT		; S$SND	- Data transmited
   271	000042'					DSP$			; S$MRQ	- Message request
   272	000044'					DSP$	,$CCBRT		; S$DRQ	- Segment request
   273	000046'					DSP$			; S$SNI	- Interrupt transmitted
   274	000050'					DSP$			; S$IRQ	- Interrupt requested
   275	000052'					DSP$			; S$DIS	- Disconnect complete
   276	000054'					DSP$	,NRMDIS		; S$ABO	- Abort complete
   277	000056'					DSP$			; S$GLN	- Here is local node information
   278	000060'					DSP$E
   279					 
   280	000060'	000173	000064'		NRMTIM:	jmp	@10$(r3)	; Timer dispatch vector
   281
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 4-1
NRM.M11    30-DEC-82 04:00		ATS RESOURCE MANAGER SYMBOL DEFINITIONS

   282	000064'				10$:	dsp$b
   283	000064'					dsp$			;short timer
   284	000066'					dsp$	,nrmtm		;long timer
   285	000070'					dsp$			;power fail
   286	000072'					dsp$	,pinset		;process initilization
   287	000074'					dsp$e
   288
   289	000074'	000173	000100'		NRMRCP:	JMP	@10$(R3)	; Dispatch SC Receive Complete:
   290
   291	000100'				10$:	DSP$B
   292	000100'					DSP$	,NSPCON		; S$CNR	- Connect received
   293	000102'					DSP$	,NSPDAT		; S$DAT	- Data received
   294	000104'					DSP$			; S$INT	- Interrupt message received
   295	000106'					DSP$	,nspdis		; S$DSR	- Disconnect received
   296	000110'					DSP$E
   297					 
   298
   299					 
   300	000110'	000173	000114'		NRMCCP:	JMP	@10$(R3)	;DISPATCH CONTROL COMPLETE:
   301
   302	000114'				10$:	DSP$B
   303	000114'					DSP$
   304	000116'					DSP$	FM.STR,SRVSTR	; SRV START COMPLETE ENTRY POINT 
   305	000120'					DSP$	FM.STP,SRVSTP	; SRV STOP COMPLETE ENTRY POINT 
   306	000122'					DSP$E
   307
   308
   309
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 5
NRM.M11    30-DEC-82 04:00		RESOURCE MESSAGE DISPATCH TABLES

   311						.SBTTL	RESOURCE MESSAGE DISPATCH TABLES
   312					;+
   313					; THESE DISPATCH TABLES ARE USED TO DISPATCH RESOURCE MESSAGES BASED 
   314					; ON THE REQUEST CODES AND REQUEST TYPES IN THE RESOURCE MESSAGE.
   315					; ALSO INCLUDED IS THE DISPATCH TABLE USED BY THE ERROR PROCESSOR
   316					; ($ERROR) TO DISPATCH ACCORDING TO ERROR CODE.
   317					;
   318					;-
   319		000122'				.PSECT	$PLIT$,D
   320
   321					;  REQUEST CODE DISPATCH TABLE
   322					 
   323		000041			RQ.MIN=		041		; MINIMUM REQUEST CODE
   324	000122'	004736'			MSGDSP:	.WORD	unsupported	; 041	REQUESTOR ID
   325	000124'	004736'				.WORD	UNSUPPORTED	; 042	CAPABILITIES
   326	000126'	004736'				.WORD	INVALID		; 043
   327	000130'	004736'				.WORD	INVALID		; 044
   328	000132'	004736'				.WORD	INVALID		; 045
   329	000134'	004736'				.WORD	INVALID		; 046
   330	000136'	004736'				.WORD	unsupported	; 047	RESPONSE 
   331	000140'	003224'				.WORD	SPECIFY		; 050	SPECIFY
   332	000142'	003530'				.WORD	ACCESS		; 051	ACCESS
   333	000144'	004564'				.WORD	ASSIGN		; 052	ASSIGN 
   334	000146'	004736'				.WORD	unsupported		; 053	STATUS
   335	000150'	004736'				.WORD	UNSUPPORTED	; 054	CONTROL
   336		000013			RQ.MAX	=	.-MSGDSP/2-1	; MAXIMUM REQUEST CODE
   337					 
   338					; REQUEST TYPE DISPATCH TABLES
   339
   340					; <CAPABILITIES> DISPATCH TABLE
   341
   342	000152'	004736'			CAPDSP:	.WORD	INVALID		; 000
   343	000154'	004736'				.WORD	UNSUPPORTED	; 001	CAPABILITIES-REPORT
   344	000156'	004736'				.WORD	UNSUPPORTED	; 002	CAPABILITIES-REQUEST
   345		000002			CP.MAX	=	.-CAPDSP/2-1	; MAXIMUM REQUEST CODE
   346					 
   347					; <SPECIFY> DISPATCH TABLE
   348					 
   349	000160'	004736'			SPCDSP:	.WORD	INVALID		; 000
   350	000162'	003434'				.WORD	RESERVE		; 001	SPECIFY-RESERVE
   351	000164'	003520'				.WORD	SHARE		; 002	SPECIFY-SHARE
   352	000166'	004736'				.WORD	unsupported	; 003	SPECIFY-REFER
   353		000003			SY.MAX	=	.-SPCDSP/2-1	; MAXIMUM REQUEST CODE
   354					 
   355					; <ACCESS> DISPATCH TABLE
   356					 
   357	000170'	004736'			ACCDSP:	.WORD	INVALID		; 000
   358	000172'	003600'				.WORD	OPEN1		; 001	ACCESS-OPEN, SINGLE LOGICAL LINK
   359	000174'	003610'				.WORD	OPEN2		; 002	ACCESS-OPEN  ON SEPARATE DATA LINK
   360	000176'	004122'				.WORD	CLOSE		; 003	ACCESS-CLOSE 
   361	000200'	004736'				.WORD	unsupported	; 004	ACCESS-RELEASE 
   362		000004			AC.MAX	=	.-ACCDSP/2-1	; MAXIMUM REQUEST CODE
   363					 
   364					 
   365					; <ASSIGN> DISPATCH TABLE
   366					 
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 5-1
NRM.M11    30-DEC-82 04:00		RESOURCE MESSAGE DISPATCH TABLES

   367	000202'	004736'			ASNDSP:	.WORD	INVALID		; 000
   368	000204'	004736'				.WORD	UNSUPPORTED	; 001	ASSIGN
   369	000206'	004736'				.WORD	UNSUPPORTED	; 002	ASSIGN-RECLAIM
   370	000210'	004736'				.WORD	UNSUPPORTED	; 003	ASSIGN-HANDOFF
   371		000003			AS.MAX	=	.-ASNDSP/2-1	; MAXIMUM REQUEST CODE
   372
   373					 
   374
   375
   376
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 6
NRM.M11    30-DEC-82 04:00		$PCBGT	- ALLOCATE A PCB

   378						.SBTTL	$PCBGT	- Allocate a PCB
   379					;+
   380					; This routine will allocate a pipe control block (if available).
   381					;
   382					; Input:
   383					;	None
   384					;
   385					; Output:
   386					;	If success:
   387					;	    R3 = address of PCB.
   388					;	If failure:
   389					;	    R3 = undefined.
   390					;-
   391
   392		000000'				.PSECT	$CODE$,I
   393	000000'				$PCBGT::PUSH$S	<R5,R4>		; Get room to move
   394	000004'	016705	000002G			mov	.crdat+2,r5	; pick up data base address
   395	000010'	016503	000016			MOV	R$PCB+2(R5),R3	; Get the PCB table
   396	000014'	016505	000014			MOV	R$PCB+0(R5),R5	; and number of pipes.
   397	000020'	001421				BEQ	90$		; (if there are any)
   398	000022'	010504				MOV	R5,R4		; Save for later.
   399	000024'	005763	000010		70$:	TST	P.STS(R3)	; Is this PCB free?
   400	000030'	001404				BEQ	80$		; If not,
   401	000032'	062703	000020			ADD	#PCBLEN,R3	; then go on to the next
   402	000036'	077406				SOB	R4,70$		; until we run out.
   403	000040'	000411				BR	90$		; Whoops! None available.
   404	000042'	160405			80$:	SUB	R4,R5		; Get the
   405	000044'	005205				INC	R5		; pipe number
   406	000046'	110563	000014			MOVB	R5,P.NUM(R3)	; and store it.
   407	000052'	005063	000002			CLR	P.RES(R3)	; Initialize various items.
   408	000056'	005063	000004			CLR	P.REF(R3)
   409	000062'	005727				TST	(PC)+		; (clear the carry)
   410	000064'	000261			90$:	SEC
   411	000066'					POP$S	<R4,R5>		; Restore his registers.
   412	000072'					RETURN
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 7
NRM.M11    30-DEC-82 04:00		DEALLOCATE A PCB

   414						.SBTTL	Deallocate a PCB
   415					;+
   416					; This routine deallocates a PCB by clearing the status word.
   417					;
   418					; Input:
   419					;	R3 = address of PCB
   420					;
   421					; Output:
   422					;	None
   423					;-
   424
   425		000074'				.PSECT	$CODE$,I
   426	000074'	005063	000010		$PCBRT::CLR	P.STS(R3)	; Make sure it is free.
   427	000100'					RETURN
   428
   429
   430
   431					;routine performs process initilization
   432
   433	000102'	004767	000000G		PINSET:	call	$ltmen		;enable long timer
   434	000106'	012700	055124			mov	#^rNRD,r0	;get nrd's pix
   435	000112'	004767	000000G			call	pidid
   436	000116'	110046				movb	r0,-(sp)
   437	000120'	012700	045710			mov	#^rLE,r0	;get LE's pix
   438	000124'	004767	000000G			call	pidid
   439	000130'	110046				movb	r0,-(sp)
   440	000132'	012700	012620			mov	#^rCR,r0
   441	000136'	004767	000000G			call	pidid
   442	000142'	110046				movb	r0,-(sp)
   443	000144'	005000				clr	r0
   444	000146'	005200			1$:	inc	r0
   445	000150'	004767	000234			call	$tcbpt
   446	000154'	103447				bcs	4$
   447	000156'	116665	000004	000017		movb	4(sp),t.spi(r5)		;set NRD's pix
   448	000164'	126527	000014	000006		cmpb	t.tt(r5),#tt.le		;LP11 ?
   449	000172'	001416				beq	2$
   450	000174'	126527	000014	000007		cmpb	t.tt(r5),#tt.lp		;LP20 ?
   451	000202'	001412				beq	2$
   452	000204'	126527	000014	000010		cmpb	t.tt(r5),#tt.cr		;CR11 ?
   453	000212'	001420				beq	3$
   454	000214'	126527	000014	000011		cmpb	t.tt(r5),#tt.cd		;CD11 ?
   455	000222'	105065	000020			clrb	t.pri(r5)		;ickmay !
   456	000226'	000747				br	1$
   457
   458	000230'	105766	000002		2$:	tstb	2(sp)			;is LE in system ?
   459	000234'	001404				beq	5$
   460	000236'	116665	000002	000020		movb	2(sp),t.pri(r5)		;set LE's pix
   461	000244'	000740				br	1$
   462	000246'	105065	000021		5$:	clrb	t.obj(r5)		;no LE here
   463	000252'	000735				br	1$
   464
   465	000254'	105716			3$:	tstb	(sp)			;is CR in system
   466	000256'	001403				beq	6$
   467	000260'	111665	000020			movb	(sp),t.pri(r5)		;set CR's pix
   468	000264'	000730				br	1$
   469	000266'	105065	000021		6$:	clrb	t.obj(r5)		;no CR here
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 7-1
NRM.M11    30-DEC-82 04:00		DEALLOCATE A PCB

   470	000272'	000725				br	1$
   471
   472	000274'	016705	000002G		4$:	mov	.crdat+2,r5		;set timer ticking
   473	000300'	105215				incb	(r5)
   474	000302'	022626				cmp	(sp)+,(sp)+		;house clean
   475	000304'	005726				tst	(sp)+
   476	000306'					return
   477
   478
   479					;routine $PCBCL called from NRD
   480
   481	000310'				$PCBCL::
   482	000310'	016500	000002			mov	2(r5),r0	;get the ULA
   483	000314'	004767	000010			call	$pcbpt		;get the PCB address
   484	000320'	103402				bcs	1$
   485	000322'	004767	177546			call	$pcbrt		;close up shop
   486	000326'				1$:	return
   487
   488
   489
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 8
NRM.M11    30-DEC-82 04:00		$PCBPT	- GET THE ADDRESS OF A PCB

   491						.SBTTL	$PCBPT	- Get the Address of a PCB
   492					;+
   493					; This routine gets the address of the given PCB.
   494					;
   495					; Input:
   496					;	R0 = pipe number (ULA)
   497					;
   498					; Output:
   499					;	If success:
   500					;	    R3 = address of PCB.
   501					;	If failure:
   502					;	    R3 = undefined.
   503					;-
   504
   505		000330'				.PSECT	$CODE$,I
   506	000330'				$PCBPT::PUSH$S	R5		; Get room to move
   507	000332'	016705	000002G			mov	.crdat+2,r5	; pick up data base address
   508	000336'	010003				MOV	R0,R3		; copy ULA
   509	000340'	005303				DEC	R3		; and turn into index.
   510	000342'	026503	000014			CMP	R$PCB+0(R5),R3	; If in range
   511	000346'	101405				BLOS	90$		; then
   512	000350'	070327	000020			MUL	#PCBLEN,R3	; index into
   513	000354'	066503	000016			ADD	R$PCB+2(R5),R3	; PCB table.
   514	000360'	005727				TST	(PC)+		; (clear the carry)
   515	000362'	000261			90$:	SEC
   516	000364'					POP$S	R5		; Recover his register.
   517	000366'					RETURN
   518
   519					;routine $PCBDB called from NRD
   520
   521	000370'				$PCBDB::
   522	000370'	016500	000002			mov	2(r5),r0	;get the ULA
   523	000374'	004767	177730			call	$pcbpt		;point to the PCB
   524	000400'	103001				bcc	1$		;huray(sp)!
   525	000402'	005003				clr	r3		;too bad so sad
   526	000404'	010300			1$:	mov	r3,r0		;return the PCB
   527	000406'					return
   528
   529
   530
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 9
NRM.M11    30-DEC-82 04:00		$TCBPT	- GET THE ADDRESS OF A TCB

   532						.SBTTL	$TCBPT	- Get the Address of a TCB
   533					;+
   534					; This routine gets the address of the given TCB.
   535					;
   536					; Input:
   537					;	R0 = resource number (BTN)
   538					;
   539					; Output:
   540					;	If success:
   541					;	    R5 = address of PCB.
   542					;	If failure:
   543					;	    R5 = undefined.
   544					;-
   545
   546		000410'				.PSECT	$CODE$,I
   547	000410'				$TCBPT::PUSH$S	R3		; Get room to move
   548	000412'	016705	000002G			mov	.crdat+2,r5	; pick up data base address
   549	000416'	010003				MOV	R0,R3		; copy BTN
   550	000420'	005303				DEC	R3		; and turn into index.
   551	000422'	026503	000020			CMP	R$TCB+0(R5),R3	; If within range
   552	000426'	101406				BLOS	90$		; then
   553	000430'	070327	000032			MUL	#TCBLEN,R3	; index into
   554	000434'	066503	000022			ADD	R$TCB+2(R5),R3	; TCB table
   555	000440'	010305				MOV	R3,R5		; and put in R5.
   556	000442'	005727				TST	(PC)+		; (clear the carry)
   557	000444'	000261			90$:	SEC
   558	000446'					POP$S	R3		; Restore his register.
   559	000450'					RETURN
   560
   561
   562
   563					;routine $TCBDB called from NRD
   564
   565	000452'				$TCBDB::
   566	000452'	016700	000002G			mov	.crdat+2,r0		;point to TCB's
   567	000456'	016003	000020			mov	r$tcb(r0),r3		;... and the
   568	000462'	016001	000022			mov	r$tcb+2(r0),r1		;the number of the buggers
   569	000466'	126561	000002	000020	1$:	cmpb	2(r5),t.pri(r1)		;do the pix's match
   570	000474'	001405				beq	2$			;jolly good show
   571	000476'	062701	000032			add	#tcblen,r1		;ring around the rosie
   572	000502'	077307				sob	r3,1$			;...
   573	000504'	005000				clr	r0			;confusion for later
   574	000506'	000401				br	3$			;exit
   575	000510'	010100			2$:	mov	r1,r0			;return TCB
   576	000512'				3$:	return
   577
   578
   579
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 10
NRM.M11    30-DEC-82 04:00		GETCPB	- GET CONNECT PENDING BLOCK

   581						.SBTTL	GETCPB	- Get Connect Pending Block
   582
   583					;+
   584					; Address the two parts of the NSP connect pending block.
   585					;
   586					; Input:
   587					;	R4 = address NSP connect-received CCB.
   588					;
   589					; Output:
   590					;	R0 = address of connect pending buffer.
   591					;	R2 = address of accounting information (k.RQDL)
   592					;	KISAR6 = mapped to connect pending buffer.
   593					;-
   594
   595		000514'				.PSECT	$CODE$,I
   596	000514'				GETCPB::MAP$	C.BUF(R4)	; Map CPB to APR6.
   597	000522'	016400	000020			MOV	C.BUF+2(R4),R0	; Address CPB
   598	000526'	012702	000056			MOV	#k.RQDL,R2	; and
   599	000532'	060002				ADD	R0,R2		; accounting area.
   600	000534'					RETURN
   601
   602
   603
   604	000536'				$TCBTT::
   605	000536'					push$s	<r1,r3>
   606	000542'	016703	000002G			mov	.crdat+2,r3		;get data base address
   607	000546'	016301	000020			mov	r$tcb(r3),r1		;number of the buggers
   608	000552'	016305	000022			mov	r$tcb+2(r3),r5		;where they is at
   609	000556'	120065	000020		1$:	cmpb	r0,t.pri(r5)		;got a match
   610	000562'	001405				beq	2$			;yes 
   611	000564'	062705	000032			add	#tcblen,r5		;more,more
   612	000570'	077106				sob	r1,1$
   613	000572'	012705	177777			mov	#-1,r5			;ickmay oemay
   614	000576'				2$:	pop$s	<r3,r1>
   615	000602'					return
   616
   617
   618
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 11
NRM.M11    30-DEC-82 04:00		GETCPB	- GET CONNECT PENDING BLOCK

   620						;routine $PCBOP called by NRD to open a data PCB
   621
   622	000604'				$PCBOP::
   623	000604'	016504	000002			mov	2(r5),r4		; connect CCB
   624	000610'					map$	c.buf(r4)		;map in connect block
   625	000616'	016402	000020			mov	c.buf+2(r4),r2		;....
   626	000622'	026227	000056	000002		cmp	k.rqdl(r2),#2		;requestor-id length
   627	000630'	001015				bne	2$			;not the right length
   628	000632'	005000				clr	r0
   629	000634'	005200			1$:	inc	r0
   630	000636'	004767	177466			call	$pcbpt			;get a pcb
   631	000642'	103412				bcs	3$			;none left
   632	000644'	032763	020000	000010		bit	#ps.dat,p.sts(r3)	;a data pipe?
   633	000652'	001770				beq	1$			;no only look at data pipes
   634	000654'	026362	000006	000060		cmp	p.user(r3),k.rqid(r2)	;can't have duplicate userid's
   635	000662'	001364				bne	1$
   636	000664'	005000			2$:	clr	r0			;error return
   637	000666'					return
   638	000670'	004767	177104		3$:	call	$pcbgt			;allocate a pcb
   639	000674'	103773				bcs	2$			;all gone too bad!!!
   640	000676'	016263	000060	000006		mov	k.rqid(r2),p.user(r3)	;copy all the good stuff..
   641	000704'	012700	055124			mov	#^rNRD,r0		;get NRD's pix
   642	000710'	004767	000000G			call	pidid			;...
   643	000714'	110063	000015			movb	r0,p.spi(r3)		;...
   644	000720'	052763	020002	000010		bis	#ps.cc!ps.dat,p.sts(r3)	;set connected data pipe
   645	000726'	010300				mov	r3,r0			;return PCB address
   646	000730'					return
   647
   648
   649
   650
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 12
NRM.M11    30-DEC-82 04:00		CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

   652						.SBTTL	CCB DISPATCHER/RESOURCE MANAGER SCHEDULER
   653					;+
   654					; THESE ROUTINES HANDLES LINE CONTROL REQUESTS AND RESOURCE ALLOCATION
   655					; FAILURE RECOVERY.
   656					;-
   657
   658
   659					;+
   660					; QUEUE UP A CCB FOR A RESOURCE WAIT
   661					;
   662					; INPUTS:
   663					;	R4 - CCB TO QUEUE UP
   664					;	(SP) - RETRY ADDRESS
   665					;
   666					; REGISTERS MODIFIED: R4,R3
   667					;-
   668
   669		000732'				.PSECT	$CODE$,I
   670	000732'	012664	000026		NRMRWT:	MOV	(SP)+,C.prm2(R4)	; SET RETURN ADDRESS
   671	000736'	112764	000024	000012		MOVB	#RM$RWT,C.fnc(R4) ; AND FUNCTION CODE.
   672					 
   673	000744'				ENQUE:
   674	000744'	016705	000002G			mov	.crdat+2,r5		; pick up data base address
   675	000750'	010503				MOV	R5,R3			; and copy address
   676	000752'	062703	000004			add	#r$rwt,r3		; point to resource queue
   677	000756'	052765	000400	000002		BIS	#RF.CCB,r$flg(r5)	; IF NO RECOVERY IN PROGRESS
   678	000764'	100402				BMI	10$			; THEN
   679	000766'					callr	$CMQIN			; QUEUE TO THE REAR
   680	000772'				10$:	callr	$CMQIF			; OTHERWISE TO THE FRONT.
   681
   682					;+
   683					; TIMER INTERRUPT - DO ANY RESOURCE RECOVERY WHICH IS REQUIRED AND THEN
   684					; HANDLE ANY TCBS WHICH REQUIRE LINE CONTROL SERVICE.
   685					;
   686					; INPUT:
   687					;	R5 - NRM DATA BASE ADDRESS
   688					;-
   689					 
   690		000776'				.PSECT	$CODE$,I
   691	000776'				NRMTM:
   692	000776'	016705	000002G			mov	.crdat+2,r5		;data base address
   693	001002'	105215				incb	(r5)			;reset timer
   694	001004'	032765	000400	000002		BIT	#RF.CCB,r$flg(R5)	; IF NOTHING TO DO
   695	001012'	001433				BEQ	900$			; THEN QUIT.
   696	001014'	042765	000400	000002		BIC	#RF.CCB,r$flg(R5)	; RESET CCB PENDING SWITCH
   697	001022'	052765	100000	000002		BIS	#RF.CVR,r$flg(R5)	; AND SET RECOVERY SWITCH.
   698	001030'	010503			120$:	MOV	R5,R3			; GET ADDRESS
   699	001032'	062703	000004			add	#r$rwt,r3		;of resource queue
   700	001036'	004767	000000G			CALL	$CMQRM			; AND SEE IF ANYTHING IS THERE.
   701	001042'	103414				BCS	190$			; IF SO,
   702	001044'	116403	000013			MOVB	C.MOD(R4),R3		; PICK UP MODIFIER
   703	001050'	116400	000012			MOVB	C.FNC(R4),R0		; AND FUNCTION CODE
   704	001054'	004770	000000'			CALL	@NRMTB(R0)		; AND RE-DISPATCH FUNCTION.
   705	001060'	016705	000002G			mov	.crdat+2,r5		; pick up data base address
   706	001064'	032765	000400	000002		BIT	#RF.CCB,r$flg(R5)	; IF NO RESOURCE ERROR,
   707	001072'	001756				BEQ	120$			; THEN GO FOR MORE.
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 12-1
NRM.M11    30-DEC-82 04:00		CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

   708	001074'	042765	100000	000002	190$:	BIC	#RF.CVR,r$flg(R5)	; RESET RECOVERY SWITCH
   709	001102'				900$:	RETURN				; AND WAIT.
   710
   711					;+
   712					; RESOURCE WAIT COMPLETE - DISPATCH THE CCB TO THE RETRY ROUTINE
   713					;-
   714					 
   715	001104'				NRMRWC:	GTPCB$			;GET THE PCB ADDRESS AND
   716	001116'	000174	000026			JMP	@C.prm2(R4)	;DISPATCH TO RETRY ROUTINE. 
   717
   718
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 12-2
NRM.M11    30-DEC-82 04:00		CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

   720					;+
   721					; FLUSH THE RESOURCE WAIT QUEUE OF REQUESTS FOR THE PIPE SPECIFIED
   722					; IN r$flg
   723					;-
   724
   725	001122'	016705	000002G		NRMFLS:	mov	.crdat+2,r5		;data bese address
   726	001126'	052765	100000	000002		BIS	#RF.CVR,r$flg(r5)	; SIMULATE RESOURCE RECOVERY
   727	001134'	042765	000400	000002		BIC	#RF.CCB,r$flg(r5)	; AND CLEAR THE CCB INDICATOR.
   728	001142'	016546	000006			MOV	r$rwt+2(r5),-(SP)	; PUSH THE LIST HEAD
   729	001146'	016546	000004			MOV	r$rwt(r5),-(SP)		; ONTO THE STACK
   730	001152'	005065	000004			CLR	r$rwt(r5)		; AND CLEAR IT.
   731	001156'	010503				mov	r5,r3			; and clean out
   732	001160'	062703	000004			add	#r$rwt,r3		; the resource queue
   733	001164'	010365	000006			mov	r3,r$rwt+2(r5)		; ...
   734
   735	001170'	016705	000002G		10$:	mov	.crdat+2,r5		;point to data base address
   736	001174'	010603				MOV	SP,R3			; GET STACK LISTHEAD
   737	001176'	004767	000000G			CALL	$CMQRM			; AND GET NEXT ITEM
   738	001202'	103421				BCS	30$			; IF THERE IS ONE.
   739	001204'	126564	000002	000024		cmpb	r$flg(r5),c.prm1(r4)	; GET SWITCHES
   740	001212'	001406				BEQ	20$			; IF NOT,
   741	001214'	052765	000400	000002		BIS	#RF.CCB,r$flg(R5)	; INDICATE QUEUE NOT CLEAR
   742	001222'	004767	000000G			CALL	$CMQIN			; AND RE-INSERT THE REQUEST.
   743	001226'	000760				BR	10$
   744	001230'	116403	000013		20$:	MOVB	C.MOD(R4),R3		; PICK UP MODIFIER
   745	001234'	116400	000012			MOVB	C.FNC(R4),R0		; FUNCTION CODE
   746	001240'	004770	000000'			CALL	@NRMTB(R0)		; AND DISPATCH.
   747	001244'	000751				BR	10$			; GO BACK FOR MORE.
   748	001246'	042765	100000	000002	30$:	BIC	#RF.CVR,r$flg(r5)	; TURN OFF RECOVERY BIT
   749	001254'	022626				CMP	(SP)+,(SP)+		; CLEAR OFF STACK
   750	001256'					RETURN				; AND GO BACK.
   751
   752
   753
   754
   755
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 13
NRM.M11    30-DEC-82 04:00		NSPCON	- CONNECT PROCESSOR

   757						.SBTTL	NSPCON	- CONNECT PROCESSOR
   758
   759					;+
   760					; THIS ROUTINE HANDLES CONNECT REQUESTS FOR CONTROL PIPES.
   761					; IT SEARCHES FOR A FREE PIPE.  IF OK, IT STORES THE USER ID IN THE
   762					; PCB, INITIALIZES THE PCB AND POSTS COMPLETION TO THE USER.
   763					;
   764					;  INPUTS:	R4 -> CONNECT CCB
   765					;
   766					;  SCAN FOR A FREE PIPE
   767					;
   768	001260'				nspcon:
   769	001260'	010446				mov	r4,-(sp)		;save connect ccb
   770	001262'					MAP$	c.buf(r4)		;map in connect block
   771	001270'	016402	000020			mov	c.buf+2(r4),r2		;...
   772	001274'	004767	000000G			call	$ccbgt			;try for accept ccb
   773	001300'	103004				bcc	1$			;got one
   774	001302'	005001				clr	r1			;failure indicator
   775	001304'	012705	177777			mov	#s.eres,r5		;set reject code
   776	001310'	000420				br	3$			;reject the connection
   777
   778	001312'	010401			1$:	mov	r4,r1			;stash accept ccb
   779	001314'	005000				clr	r0			;now check out the pipes..
   780	001316'	005200			2$:	inc	r0			;..for a duplicate user id
   781	001320'	004767	177004			call	$pcbpt			;pcb comes back in r3
   782	001324'	103427				bcs	4$			;looked at them all
   783	001326'	032763	010000	000010		bit	#ps.ctl,p.sts(r3)	;only want control pipes
   784	001334'	001770				beq	2$
   785	001336'	026362	000006	000060		cmp	p.user(r3),k.rqid(r2)	;have we had this one before
   786	001344'	001364				bne	2$			;no good
   787	001346'	012705	177754		6$:	mov	#s.erbo,r5		;set reject code
   788	001352'	012604			3$:	mov	(sp)+,r4		;get back connect ccb
   789	001354'					NCRA$	,r5			;reject the connect
   790	001372'	010104				mov	r1,r4			;point to accept ccb
   791	001374'	001402				beq	5$
   792	001376'	004767	000000G			call	$ccbrt			;release accept ccb
   793	001402'				5$:	return				;and exit
   794
   795					; FORMAT THE PIPE AND ACCEPT THE CONNECT
   796
   797	001404'	004767	176370		4$:	call	$pcbgt			; get a pcb
   798	001410'	012705	177777			mov	#s.eres,r5		; set reject code
   799	001414'	103756				bcs	3$			; and reject the connection
   800	001416'	016263	000060	000006		mov	k.rqid(r2),p.user(r3)	; save user id
   801	001424'	116763	000000G	000015		movb	.crpix,p.spi(r3)	; save owner of pipe
   802	001432'	052763	010002	000010		bis	#ps.cc!ps.ctl,p.sts(r3)	; set pipe flags
   803	001440'	012604				mov	(sp)+,r4		; point to connect ccb
   804	001442'	116461	000010	000010		movb	c.lix(r4),c.lix(r1)	; copy info to accept ccb
   805	001450'	116463	000010	000012		movb	c.lix(r4),p.lla(r3)	; put LLA in PCB
   806	001456'	116461	000011	000011		movb	c.pix(r4),c.pix(r1)	; put in dest pix
   807	001464'	116463	000011	000017		movb	c.pix(r4),p.pix(r3)	; and save it for later
   808	001472'					ncra$	p.num(r3)		; acknowledge intent to connect
   809	001512'	010104				mov	r1,r4			; accept the connection
   810	001514'	005064	000022			clr	c.cnt(r4)		; no optional data
   811	001520'					NACC$	,p.num(r3),#s$pseg	;....
   812	001554'					return
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 13-1
NRM.M11    30-DEC-82 04:00		NSPCON	- CONNECT PROCESSOR

   813
   814
   815					;this routine processes the connect complete from SC. if the
   816					;connect completes successfully then data segments are requested, else
   817					;the link is closed.
   818
   819	001556'				request:
   820	001556'					GTPCB$
   821	001570'	042763	000001	000010		bic	#ps.ci,p.sts(r3)	;clear connect initiated
   822	001576'	026427	000014	000001		cmp	c.sts(r4),#s.ssuc	;operation a success
   823	001604'	001022				bne	2$
   824	001606'	052763	000002	000010		bis	#ps.cc,p.sts(r3)	;set pipe connected
   825	001614'					NDRQ$	,,r$flw(r5)		;request a few segments
   826	001642'	116563	000012	000016		movb	r$flw(r5),p.segs(r3)	;set req cnt in PCB
   827	001650'					return
   828	001652'				2$:
   829	001652'					NABO$	p.num(r3)		;abort the link
   830	001700'					return				;and exit
   831
   832
   833
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 14
NRM.M11    30-DEC-82 04:00		NSPDIS	- DISCONNECT NSP CONTROL PIPE

   835						.SBTTL	NSPDIS	- DISCONNECT NSP CONTROL PIPE
   836						.SBTTL	SRVDIS	- DISCONNECT SERVER DATA PIPE
   837					;+
   838					; THIS ROUTINE HANDLES DISCONNECTS FOR BOTH CONTROL AND DATA PIPES.
   839					; CONTROL DISCONNECTS ARE RECEIVED BY THE NRM DIRECTLY FROM NSP.
   840					; IF A CONTROL PIPE, THE FOLLOWING OCCURS:
   841					;	1. ALL TERMINALS ARE CLOSED
   842					;	2. ALL TERMINALS ARE RELEASED
   843					;	3. ALL REFERRALS ARE TERMINATED
   844					;
   845					; DATA PIPE DISCONNECTS ARE RECEIVED BY THE ATS GENERIC MANAGER
   846					; AND SENT TO THE NRM BY A "TERMINATE" CONTROL ENABLE COMMAND.
   847					; IF A DATA PIPE, THE FOLLOWING OCCURS:
   848					;	ALL TERMINALS ARE CLOSED
   849					;
   850					; THE GENERAL PROCEDURE IS TO SEARCH THE RESERVED TERMINAL LIST UNTIL
   851					; AN OPEN TERMINAL IS FOUND.  A CLOSE IS THEN INITIATED FOR THAT TERMINAL
   852					; AND THE PROCESS EXITS.  AT THIS POINT THE NEXT TERMINAL IS
   853					; CLOSED WHEN A CLOSE COMPLETION IS RECEIVED FOR THE PRESENT TERMINAL.
   854					; WHEN ALL TERMINALS ARE CLOSED, THE PIPE TYPE IS DETERMINED.  IF DATA
   855					; PIPE, THE PROCESS SIMPLY POSTS DISCONNECT COMPLETION.  IF A CONTROL
   856					; PIPE, THE RESERVED TERMINALS ON THE PIPE ARE RELEASED,  ALL REFERAL
   857					; THREADS ARE TERMINATED, AND DISCONNECT COMPLETION IS POSTED.
   858					;
   859					; IF AN ABORT REQUEST IS RECEIVED, THE PROCESSING IS IDENTICAL TO THE
   860					; ABOVE, EXCEPT THAT COMPLETION IS NOT POSTED TO THE REQUESTOR.
   861					;
   862					; INPUT:
   863					;	R4= DISCONNECT CCB FROM NSP OR SERVER
   864					;
   865					;-
   866					 
   867	001702'				NSPDIS:				;DISCONNECT CONTROL PIPE
   868	001702'	010402				mov	r4,r2		;save disconnect ccb
   869	001704'	004767	000000G			call	$ccbgt		;try for working ccb
   870	001710'	010401				mov	r4,r1		;sqve it if got one
   871	001712'	010204				mov	r2,r4		;fetch disconnect ccb
   872	001714'	103002				bcc	10$
   873	001716'	000167	177022			jmp	enque		;resource recovery queue
   874
   875	001722'				10$:
   876	001722'					GTPCB$			;GET THE PIPE CONTROL BLOCK
   877	001734'	110065	000002			MOVB	R0,r$flg(r5)	;SAVE THE PIPE NUMBER for nrmfls routine
   878	001740'					NDAK$
   879	001752'	010104				mov	r1,r4		;working ccb
   880	001754'	042763	000002	000010		BIC	#PS.CC,P.STS(R3) ;CLEAR CONNECT COMPLETE.
   881	001762'	010546				mov	r5,-(sp)		;save the world
   882	001764'	010446				MOV	R4,-(SP)		;
   883	001766'	010346				mov	r3,-(sp)		;
   884	001770'	010146				mov	r1,-(sp)		;.....
   885	001772'	004767	177124			CALL	NRMFLS		;FLUSH RECOVERY REQUESTS
   886	001776'	012601				mov	(sp)+,r1		;recover the world
   887	002000'	012603				mov	(sp)+,r3		;
   888	002002'	012604				MOV	(SP)+,R4		;
   889	002004'	012605				mov	(sp)+,r5		;...
   890	002006'	000167	000000			jmp	discp
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 14-1
NRM.M11    30-DEC-82 04:00		SRVDIS	- DISCONNECT SERVER DATA PIPE

   891
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 14-2
NRM.M11    30-DEC-82 04:00		SRVDIS	- DISCONNECT SERVER DATA PIPE

   893					;+
   894					; CONTROL PIPE DISCONNECT (ENTRY  FROM <STOP> AND <START> COMPLETE PROCESSORS)
   895					;
   896					; INPUTS:
   897					;	R4= ADDRESS OF FREE CCB
   898					;	R3= ADDRESS OF CONTROL PCB
   899					;-
   900					 
   901	002012'	042763	000004	000010	DISCP:	BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
   902					 
   903					; CLOSE ALL TERMINALS ON CONTROL PIPE
   904					 
   905	002020'	010305				MOV	R3,R5		;POINT TO RESERVED TERMINAL LISTHEAD
   906	002022'	062705	000002			ADD	#P.RES,R5	;...
   907					 
   908	002026'	011505			10$:	MOV	(R5),R5		;GET ADDRESS OF NEXT TCB
   909	002030'	001427				BEQ	20$		;IF EQ, ALL TERMINALS PROCESSED
   910	002032'	032765	000007	000012		BIT	#TS.OCP,T.STS(R5) ;OPEN OR CLOSE PENDING OR TERM. OPEN?
   911	002040'	001772				BEQ	10$		;IF EQ, NO- TERMINAL IS NOT OPEN
   912	002042'	052763	000004	000010		BIS	#PS.DIP,P.STS(R3) ;ELSE YES- SET DISCONNECT PENDING
   913	002050'	032765	000002	000012		BIT	#TS.OPP,T.STS(R5) ;IF OPEN IN PROGRESS
   914	002056'	001006				BNE	15$		;THEN WAIT FOR OPEN TO FINISH.
   915	002060'	032765	000001	000012		BIT	#TS.CLP,T.STS(R5) ;IF CLOSE NOT ISSUED YET
   916	002066'	001357				BNE	10$		;THEN
   917	002070'	000167	002046			JMP	CLOSE2		;INITIATE A CLOSE ON THIS TERMINAL.
   918
   919	002074'	116364	000014	000024	15$:	MOVB	P.NUM(R3),C.prm1(R4) ;SAVE WHO WE ARE WORKING ON.
   920	002102'	004767	176624			CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
   921	002106'	000741				BR	DISCP		;AND TRY AGAIN.
   922
   923	002110'	032763	000004	000010	20$:	BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
   924	002116'	001402				BEQ	30$		;IF SO,
   925	002120'	000167	000000G			JMP	$ccbrt		;THEN WAIT FOR IT TO COME BACK. 
   926
   927					; CLEAR DISCONNECT PENDING FOR ALL ASSOCIATED DATA PIPES
   928					; AND SEND DISCONNECT COMPLETE FOR EACH DISCONNECTED DATA PIPE
   929					; DO NOT SEND COMPLETION FOR ABORTED DATA PIPES
   930					 
   931	002124'				30$:	PUSH$S	R4		;SAVE CCB ADDRESS (USE FOR CONTROL PIPE
   932	002126'	010305				MOV	R3,R5		;DISCONNECT COMPLETION)
   933	002130'	005000				CLR	R0		;SET FOR FIRST PCB
   934	002132'	005200			40$:	INC	R0		;GO TO NEXT PCB.
   935	002134'	004767	176170			CALL	$PCBPT		;GET THE PCB
   936	002140'	103437				BCS	70$		;IF THERE IS ONE.
   937	002142'	005763	000010			TST	P.STS(R3)	;IF NOT ACTIVE
   938	002146'	001771				BEQ	40$		;THEN IGNORE.
   939	002150'	032763	010000	000010		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
   940	002156'	001365				BNE	40$		;IF EQ, YES- GET NEXT PCB
   941	002160'	026563	000006	000006		CMP	P.USER(R5),P.USER(R3) ;CONTROL PIPE ASSOCIATED WITH DATA PIPE?
   942	002166'	001361				BNE	40$		;IF NE, NO- GET NEXT PCB
   943	002170'	032763	000004	000010		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
   944	002176'	001755				BEQ	40$		;IF EQ, NO
   945					 
   946	002200'	004767	000000G			CALL	$CCBGT		;GET A CCB
   947	002204'	103012				BCC	60$		;IF CC, GOT ONE
   948					;
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 14-3
NRM.M11    30-DEC-82 04:00		SRVDIS	- DISCONNECT SERVER DATA PIPE

   949					; RESOURCE FAILURE - WAIT A TICK AND TRY AGAIN
   950					;
   951	002206'	052763	000004	000010		BIS	#PS.DIP,P.STS(R3) ;MARK AS STILL DISCONNECTING
   952	002214'					POP$S	R4		;RESTORE CCB ADDRESS
   953	002216'	116364	000014	000024		MOVB	P.NUM(R3),c.prm1(R4) ;SAVE WHO WE ARE WORKING ON.
   954	002224'	004767	176502			CALL	NRMRWT		;GO TO RESOURCE SCHEDULER
   955	002230'	000735				BR	30$		;AND TRY AGAIN.
   956					 
   957					; CONTROL PIPE DISCONNECT REENTRY POINT
   958					 
   959					 
   960	002232'	004767	000250		60$:	CALL	DISPC		;TELL THE SERVER TO DISCONNECT
   961	002236'	000735				BR	40$		;AND CHECK SOME MORE.
   962					 
   963					; RELEASE ALL TERMINALS ON CONTROL PIPE
   964					 
   965	002240'	010503			70$:	MOV	R5,R3
   966	002242'	016305	000002		80$:	MOV	P.RES(R3),R5	;IF THERE IS ANOTHER RESOURCE
   967	002246'	001406				BEQ	110$		;THEN
   968	002250'	011563	000002			MOV	(R5),P.RES(R3)	;DE-LINK AND
   969	002254'	042765	000270	000012		BIC	#<TS.RS!TS.RLP!TS.HP!TS.SRP>,T.STS(R5) ;UNRESERVE IT.
   970	002262'	000767				BR	80$
   971					 
   972					 
   973	002264'				110$:	POP$S	R4		;RESTORE CCB POINTER
   974	002266'	042763	000004	000010		BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING FOR CONTROL PIPE
   975	002274'	000504				BR	DISPC		;AND GO FINISH UP IN COMMON CODE
   976
   977
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 15
NRM.M11    30-DEC-82 04:00		SRVDIS	- DISCONNECT SERVER DATA PIPE

   979					;+
   980					; DATA PIPE DISCONNECT (ENTRY FROM <START> AND <STOP> COMPLETE ROUTINES)
   981					;
   982					; INPUTS:
   983					;	R4= ADDRESS OF CCB
   984					;	R3= ADDRESS OF DATA PCB
   985					;-
   986					 
   987	002276'	042763	000004	000010	DISDP:	BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
   988					 
   989					; CHECK IF ASSOCIATED CONTROL PIPE IS ACTIVE
   990
   991	002304'	010305				MOV	R3,R5		;SAVE PCB ADDRESS 
   992	002306'	005000				CLR	R0		;AND SET FOR FIRST PCB.
   993	002310'	005200			10$:	INC	R0		;GO TO NEXT PCB 
   994	002312'	004767	176012			CALL	$PCBPT		;POINT TO IT
   995	002316'	103425				BCS	20$		;IF IT IS THERE.
   996	002320'	005763	000010			TST	P.STS(R3)	;IF NOT ACTIVE
   997	002324'	001771				BEQ	10$		;THEN IGNORE.
   998	002326'	032763	010000	000010		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
   999	002334'	001765				BEQ	10$		;IF EQ, NO
  1000					 
  1001	002336'	026563	000006	000006		CMP	P.USER(R5),P.USER(R3) ;DATA PIPE ASSOCIATED W/CONTROL PIPE?
  1002	002344'	001361				BNE	10$		;IF NE, NO
  1003	002346'	032763	000004	000010		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
  1004	002354'	001406				BEQ	20$		;IF EQ, NO
  1005	002356'	010503				MOV	R5,R3		;RESTORE PCB ADDRESS
  1006	002360'	052763	000004	000010		BIS	#PS.DIP,P.STS(R3) ;SET DISCONNECT PENDING
  1007	002366'	000167	000000G			JMP	$ccbrt		;RETURN CCB
  1008					 
  1009					;  CLOSE ALL TERMINALS ON DATA PIPE
  1010					 
  1011	002372'	010503			20$:	MOV	R5,R3		;RESTORE PCB POINTER
  1012	002374'	042763	000004	000010		BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
  1013	002402'	062705	000000			ADD	#<P.OPN-T.OLNK>,R5 ;POINT INTO OPEN LIST
  1014					 
  1015	002406'	016505	000002		30$:	MOV	T.OLNK(R5),R5	;GET ADDRESS OF NEXT TCB
  1016	002412'	001423				BEQ	40$		;IF THERE IS ONE
  1017	002414'	052763	000004	000010		BIS	#PS.DIP,P.STS(R3) ;SET DISCONNECT PENDING
  1018	002422'	032765	000002	000012		BIT	#TS.OPP,T.STS(R5) ;IF OPEN IN PROGRESS
  1019	002430'	001006				BNE	35$		;THEN WAIT FOR OPEN TO FINISH.
  1020	002432'	032765	000001	000012		BIT	#TS.CLP,T.STS(R5) ;IF CLOSE NOT PENDING
  1021	002440'	001362				BNE	30$		;THEN
  1022	002442'	000167	001474			JMP	CLOSE2		;INITIATE A CLOSE ON THIS TERMINAL.
  1023	002446'	116364	000014	000024	35$:	MOVB	P.NUM(R3),C.prm1(R4) ;SAVE WHO WE ARE WORKING ON
  1024	002454'	004767	176252			CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
  1025	002460'	000706				BR	DISDP		;AND TRY AGAIN.
  1026
  1027	002462'	032763	000004	000010	40$:	BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
  1028	002470'	001406				BEQ	DISPC		;IF SO,
  1029	002472'	116364	000014	000024		MOVB	P.NUM(R3),C.prm1(R4) ;SAVE WHO WE ARE WORKING ON.
  1030	002500'	004767	176226			CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
  1031	002504'	000674				BR	DISDP		;AND TRY AGAIN.
  1032
  1033
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 16
NRM.M11    30-DEC-82 04:00		SRVDIS	- DISCONNECT SERVER DATA PIPE

  1035					;+
  1036					; PIPE DISCONNECT COMPLETED - NOTIFY NSP OR SERVER
  1037					;
  1038					; INPUTS:
  1039					;	R4= ADDRESS OF CCB
  1040					;	R3= ADDRESS OF PCB
  1041					;-
  1042					 
  1043	002506'	032763	010000	000010	DISPC:	BIT	#PS.CTL,P.STS(R3)	;IF NOT CONTROL PIPE
  1044	002514'	001424				BEQ	80$			;THEN NOTIFY PIPE OWNER PIPE CLOSED.
  1045
  1046	002516'	005064	000022			clr	c.cnt(r4)		;no  data
  1047	002522'	116364	000017	000011		movb	p.pix(r3),c.pix(r4)	;set dest.
  1048	002530'	116364	000012	000010		movb	p.lla(r3),c.lix(r4)	;set LLA
  1049	002536'					NABO$	P.NUM(R3)		;ABORT
  1050	002564'					RETURN
  1051
  1052	002566'	116364	000014	000024	80$:	MOVB	P.NUM(R3),C.prm1(R4)
  1053	002574'	116364	000015	000011		MOVB	P.SPI(R3),C.pix(R4)
  1054	002602'	112764	000000	000012		MOVB	#FC.AST,C.FNC(R4)	; NOTIFY PIPE OWNER.
  1055	002610'	000167	000000G			JMP	$SCHED
  1056
  1057						.SBTTL	NRMDIS	- PIPE DISCONNECTED
  1058					;+
  1059					; LINK IS CLOSED - RETURN THE PIPE
  1060					;
  1061					; INPUTS:
  1062					;	R4 - DISCONNECT OR ABORT COMPLETE CCB
  1063					;-
  1064
  1065	002614'				NRMDIS:	GTPCB$			; GET THE PCB ADDRESS
  1066	002626'	010305				mov	r3,r5		; save ctl pcb
  1067	002630'	004767	175240			CALL	$PCBRT		; RETURN THE PCB
  1068	002634'	005000				CLR	R0		;AND SET FOR FIRST PCB.
  1069	002636'	005200			10$:	INC	R0		;GO TO NEXT PCB 
  1070	002640'	004767	175464			CALL	$PCBPT		;POINT TO IT
  1071	002644'	103426				BCS	20$		;IF IT IS THERE.
  1072	002646'	005763	000010			TST	P.STS(R3)	;IF NOT ACTIVE
  1073	002652'	001771				BEQ	10$		;THEN IGNORE.
  1074	002654'	032763	010000	000010		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
  1075	002662'	001365				Bne	10$		;IF EQ, NO
  1076					 
  1077	002664'	026563	000006	000006		CMP	P.USER(R5),P.USER(R3) ;DATA PIPE ASSOCIATED W/CONTROL PIPE?
  1078	002672'	001361				BNE	10$		;IF NE, NO
  1079
  1080	002674'	116364	000014	000024		MOVB	P.NUM(R3),C.prm1(R4)
  1081	002702'	116364	000015	000011		MOVB	P.SPI(R3),C.pix(R4)
  1082	002710'	112764	000000	000012		MOVB	#FC.AST,C.FNC(R4)	; NOTIFY PIPE OWNER.
  1083	002716'	000167	000000G			JMP	$SCHED
  1084
  1085
  1086	002722'	000167	000000G		20$:	JMP	$CCBRT		; AND THE DISCONNECT CCB.
  1087
  1088
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 17
NRM.M11    30-DEC-82 04:00		NSPDAT	- RESOURCE MESSAGE DISPATCHER

  1090						.SBTTL	NSPDAT	- RESOURCE MESSAGE DISPATCHER
  1091					;+
  1092					; THIS ROUTINE RECEIVES CONTROL FROM THE CCB DISPATCHER.
  1093					; ITS PURPOSE IS TO PASS CONTROL TO THE APPROPRIATE MESSAGE PROCESSOR
  1094					; BASED ON THE REQUEST CODE.
  1095					; A RECEIVE DATA BUFFER (RDB) MAY CONTAIN TWO RESOURCE MESSAGES.
  1096					; FOR EXAMPLE, AN OPEN MESSAGE MAY BE CONCATENATED WITH A RESERVE
  1097					; MESSAGE.  FOR SUCH A CASE, THE FIRST MESSAGE WILL ALWAYS HAVE A
  1098					; SPECIFY MESSAGE REQUEST CODE AND THE DOUBLE MESSAGE FLAG WILL
  1099					; BE SET IN THE REQUEST TYPE BYTE (M.TYP).  FOR DOUBLE MESSAGES
  1100					; ONLY ONE STATUS RESPONSE (INDICATING FAILURE OR THE HIGHEST LEVEL
  1101					; MESSAGE COMPLETION STATUS) IS RETURNED TO THE REQUESTOR .
  1102					; 
  1103					; INPUT:
  1104					;	R5= ADDRESS OF NRM DATA BASE
  1105					;	R4= ADDRESS OF CCB-RDB (WHICH POINTS TO RESOURCE MESSAGE)
  1106					;
  1107					; OUTPUT:
  1108					;	APR6= BIASED INTO RESOURCE MESSAGE
  1109					;	R4= ADDRESS OF WORKING CCB
  1110					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
  1111					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE 
  1112					;	R0= MESSAGE SUBTYPE
  1113					;
  1114					;-
  1115					 
  1116					 
  1117						.ENABL LSB
  1118					 
  1119	002726'				NSPDAT:				;MESSAGE ENTRY POINT
  1120	002726'					GTPCB$			;GET THE PCB
  1121
  1122	002740'	005765	000002		10$:	TST	r$flg(R5) 	; IF RESOURCE ERROR RECOVERY
  1123	002744'	100403				BMI	20$		; NOT IN EFFECT
  1124	002746'	005765	000004			TST	R$RWT(R5)	; AND THE QUEUE IS NOT EMPTY
  1125	002752'	001005				BNE	30$		; THEN ADD THIS TO IT.
  1126	002754'	010401			20$:	MOV	R4,R1		; SAVE THIS CCB
  1127	002756'	004767	000000G			CALL	$CCBGT		; AND TRY FOR A SPAWN CCB.
  1128	002762'	103003				BCC	40$		; IF FAILURE
  1129	002764'	010104				MOV	R1,R4		; GET NSP CCB BACK
  1130	002766'	000167	175752		30$:	JMP	ENQUE		; AND WAIT FOR THE PROPER MOMENT.
  1131
  1132	002772'	010446			40$:	mov	r4,-(sp)	;stash away stack ccb for now
  1133	002774'	105363	000016			decb	p.segs(r3)	;decrement flow count
  1134	003000'	001043				bne	48$		;still permissions outstanding
  1135	003002'	004767	000000G			call	$ccbgt		;must request data segments
  1136	003006'	103010				bcc	45$		;do it
  1137	003010'	012604				mov	(sp)+,r4	;return stacked ccb
  1138	003012'	004767	000000G			call	$ccbrt
  1139	003016'	105263	000016			incb	p.segs(r3)	;reset flow count
  1140	003022'	010104				mov	r1,r4		;and queue up received ccb
  1141	003024'	000167	175714			jmp	enque		;....
  1142
  1143	003030'	116364	000017	000011	45$:	movb	p.pix(r3),c.pix(r4)
  1144	003036'	116563	000012	000016		movb	r$flw(r5),p.segs(r3)
  1145	003044'	116300	000016			movb	p.segs(r3),r0
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 17-1
NRM.M11    30-DEC-82 04:00		NSPDAT	- RESOURCE MESSAGE DISPATCHER

  1146	003050'					NDRQ$	p.lla(r3),p.num(r3),r0
  1147
  1148	003110'	012604			48$:	mov	(sp)+,r4	;get back stack ccb
  1149
  1150	003112'	116164	000024	000010	50$:	MOVB	C.prm1(R1),C.lin(R4)   ;SAVE PIPE NUMBER
  1151	003120'	010164	000004			MOV	R1,C.stk(R4)	      ;NSP CCB-RDB ADDRESS
  1152	003124'	016161	000020	000014		MOV	C.BUF+2(R1),C.STS(R1) ;SET MESSAGE START ADDRESS.
  1153					 
  1154					; GET MESSAGE ADDRESS
  1155					 
  1156	003132'	016405	000004		NRMMSG:	MOV	C.stk(R4),R5	;GET NSP BUFFER ADDRESS
  1157	003136'					MAP$	C.BUF(R5)	;MAP TO RECIEVE DATA BUFFER
  1158	003144'	016502	000014			MOV	C.STS(R5),R2	;POINT TO RESOURCE MESSAGE BUFFER
  1159					 
  1160					; RANGE CHECK REQUEST CODE
  1161					 
  1162	003150'	004767	002342			CALL	GET1		;GET REQUEST CODE
  1163	003154'	162700	000041			SUB	#RQ.MIN,R0	;REQUEST CODE TOO LOW?
  1164	003160'	002403				BLT	70$		;IF LT, YES
  1165	003162'	022700	000013			CMP	#RQ.MAX,R0	;REQUEST CODE TOO HIGH?
  1166	003166'	103002				BHIS	80$		;IF LOS, NO- CONTINUE
  1167					 
  1168	003170'				70$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
  1169					 
  1170					; DISPATCH MESSAGE TO MESSAGE PROCESSOR
  1171					 
  1172	003174'	006300			80$:	ASL	R0		;MAKE A WORD INDEX
  1173	003176'	016046	000122'			MOV	MSGDSP(R0),-(SP) ;SAVE DISPATCH ADDRESS
  1174	003202'	004767	002310			CALL	GET1		;GET SUBTYPE
  1175	003206'					PUSH$S	R0		;SAVE WHILE WE
  1176	003210'	004767	002310			CALL	GET2		;GET CONTROL ID
  1177	003214'	010064	000024			MOV	R0,C.prm1(R4)	;AND STORE IT.
  1178	003220'					POP$S	R0		;RESTORE SUBTYPE
  1179	003222'	000207				RTS	PC		;AND DISPATCH MESSAGE (WITHOUT RETURN)
  1180
  1181						.DSABL LSB
  1182
  1183
  1184
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 18
NRM.M11    30-DEC-82 04:00		SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR

  1186						.SBTTL	SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR
  1187					;+
  1188					; THIS ROUTINE RECEIVES SPECIFY MESSAGES.  ITS DOES THE PROCESSING COMMON
  1189					; TO ALL SPECIFY MESSAGES.
  1190					; ALGORITHM:
  1191					;    CHECK FOR VALID SPECIFY-REQUEST TYPES. IF NOT VALID RETURN ERROR
  1192					;    SEARCH REFERRAL LIST FOR CCB WITH CONTROL ID. IF FOUND GO TO 1.
  1193					;    SEARCH RESERVED LIST FOR TCB WITH CONTROL ID. IF FOUND RETURN ERROR
  1194					;    ALLOCATE CCB AND LINK TO REFERRAL LIST
  1195					; 1. IF REFERRAL CCB DOES NOT POINT TO HANDOFF TCB GO TO 2.
  1196					;    DELINK REFERRAL CCB AND RETURN IT TO POOL
  1197					;    LINK TCB TO HANDOFEE'S RESERVED TERMINAL LIST
  1198					;    SEND RESPONSE MESSAGE TO HANDOFEE
  1199					;    SEND RESPONSE MESSAGE TO HANDOFER AND EXIT
  1200					; 2. SEARCH TCB TABLE FOR TCB CONTAINING TERMINAL NAME. IF FOUND RETURN SUCCESS
  1201					;    ELSE RETURN ERROR
  1202					;
  1203					; INPUT:
  1204					;	APR6= BIASED INTO RESOURCE MESSAGE
  1205					;	R4= ADDRESS OF WORKING CCB
  1206					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
  1207					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE 
  1208					;		= AT 'RESTYPE' FIELD
  1209					;	R0= MESSAGE SUBTYPE
  1210					;
  1211					; OUTPUT:
  1212					;	R4= ADDRESS OF WORKING CCB
  1213					;	R0= RESPONSE CODE
  1214					;
  1215					;	IF SUCCESS:
  1216					;	APR6= BIASED INTO RESOURCE MESSAGE
  1217					;	R5= ADDRESS OF TCB
  1218					;	R0= ADDRESS OF CCB CONTAINING CONTROL ID
  1219					;
  1220					;-
  1221					 
  1222	003224'				SPECIFY:
  1223					 
  1224					; VALIDATE REQUEST TYPE
  1225					 
  1226	003224'	142700	177760			BICB	#^C17,R0	;CLEAR OUT GARBAGE
  1227	003230'	001403				BEQ	10$		;IF EQ, INVALID REQUEST TYPE
  1228	003232'	122700	000003			CMPB	#SY.MAX,R0 	;REQUEST TYPE IN RANGE?
  1229	003236'	103002				BHIS	20$		;IF LOS, YES- CONTINUE
  1230	003240'				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
  1231					 
  1232					; THE CONTROL ID SHOULD NOT BE ASSOCIATED WITH A RESERVED RESOURCE
  1233					 
  1234	003244'	004767	002316		20$:	CALL	FNDRES		;CHECK RESERVED LIST
  1235	003250'	103404				BCS	40$		;IF CS, CONTINUE
  1236	003252'					RESPOND	RC.RQO		;ERROR - CONROL ID IN USE
  1237					 
  1238					 
  1239					; LOOK UP TCB CONTAINING RESOURCE DESCRIPTOR (TERMINAL NAME)
  1240					 
  1241	003262'	004767	002230		40$:	CALL	GET1		;GET THE RESOURCE OBJECT TYPE
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 18-1
NRM.M11    30-DEC-82 04:00		SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR

  1242	003266'	110064	000030			MOVB	R0,C.prm3(R4)	;SAVE THIS
  1243	003272'	004767	002220			CALL	GET1		;GET THE FIELD LENGTH
  1244	003276'	110064	000032			MOVB	R0,C.prm4(R4)	;SAVE THIS ALSO
  1245	003302'	010264	000034			MOV	R2,C.prm5(R4)	;SAVE NAME POSITION
  1246	003306'	005000				CLR	R0		;START WITH FIRST TCB
  1247	003310'	005200			50$:	INC	R0
  1248	003312'	004767	175072			CALL	$TCBPT		;POINT TO TCB
  1249	003316'	103010				BCC	70$		;IF NO MORE RESOURCES
  1250	003320'				60$:	RESPOND	RC.RNE		;ERROR - RESOURCE DOES NOT EXIST
  1251
  1252	003330'				61$:	RESPOND	RC.IRD		;ERROR - INVALID RESOURCE DESCRIPTOR
  1253
  1254						.IIF NE	<T.NAML-1-T.OBJ>,.ERROR T.NAML;MUST BE ADJACENT TO T.OBJ
  1255						.IIF NE	<T.NAM-1-T.NAML>,.ERROR T.NAM;MUST BE ADJACENT TO T.NAML
  1256
  1257	003340'	062705	000021		70$:	ADD	#T.OBJ,R5	;POINT TO OBJECT TYPE
  1258	003344'	126425	000030			CMPB	C.prm3(R4),(R5)+ ;IF OBJECT CODES DON'T MATCH
  1259	003350'	001357				BNE	50$		;THEN REJECT.
  1260	003352'	116401	000032			MOVB	C.prm4(R4),R1	;GET  NAME LENGTH
  1261	003356'	120125				CMPB	R1,(R5)+	;AND IF NO MATCH
  1262	003360'	001353				BNE	50$		;THEN REJECT THIS ALSO.
  1263	003362'	016402	000034			MOV	C.prm5(R4),R2	;POINT TO BEGINNING OF TERMINAL NAME
  1264	003366'	122225			80$:	CMPB	(R2)+,(R5)+	;AND COMPARE THE NAMES
  1265	003370'	001347				BNE	50$		;IF NO MATCH, REJECT
  1266	003372'	077103				SOB	R1,80$		;CHECK THE FULL NAME
  1267	003374'	116401	000032			MOVB	C.prm4(R4),R1	;GET LENGTH AGAIN
  1268	003400'	160105				SUB	R1,R5		;AND
  1269	003402'	162705	000023			SUB	#T.NAM,R5	;BACK UP TO TCB BEGINNING
  1270					 
  1271					; DISPATCH MESSAGE TO REQUEST PROCESSOR
  1272					 
  1273									;R5 POINTS TO TCB
  1274	003406'	016400	000004		90$:	MOV	C.stk(R4),R0	;GET
  1275	003412'	016000	000014			MOV	C.STS(R0),R0	;MESSAGE ADDRESS
  1276	003416'	116000	000001			MOVB	1(R0),R0	;AND REQUEST CODE
  1277	003422'	142700	177760			BICB	#^C17,R0	;CLEAR OUT GARBAGE
  1278	003426'	006300				ASL	R0		;MAKE A WORD INDEX
  1279	003430'	000170	000160'			JMP	@SPCDSP(R0)	;DISPATCH <SPECIFY> MESSAGE
  1280
  1281
  1282
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 19
NRM.M11    30-DEC-82 04:00		RESERVE	-   <SPECIFY-RESERVE> PROCESSOR

  1284						.SBTTL	RESERVE	-   <SPECIFY-RESERVE> PROCESSOR
  1285					;+
  1286					; THIS ROUTINE RECEIVES CONTROL FROM THE <SPECIFY> PRE-PROCESSOR.
  1287					; ITS FUNCTION IS TO RESERVE A TERMINAL   FOR A REQUESTOR. 
  1288					; THE STATE OF THE TERMINAL IS CHECKED AND IF FREE, IT IS RESERVED.
  1289					;
  1290					; NOTE:	ANY REFERRAL CCB IS LEFT ALONE UNTIL THE FULL COMMAND MESSAGE
  1291					;	IS PROCESSED (INCLUDING CONCATENATED MESSAGES)
  1292					; 
  1293					;
  1294					; INPUT:
  1295					;	R5= ADDRESS OF TCB
  1296					;	R4= ADDRESS OF WORKING CCB
  1297					;	R3= ADDRESS OF CONTROL PCB
  1298					;
  1299					; OUTPUT:
  1300					;	R4= ADDRESS OF WORKING CCB
  1301					;	R0= RESPONSE CODE
  1302					;-
  1303					 
  1304	003434'				RESERVE:
  1305	003434'	032765	060000	000014		BIT	#TF.RAL,T.FLG(R5) ;IF NOT READY FOR ALLOCATION
  1306	003442'	001404				Beq	10$		;OR
  1307	003444'	032765	000020	000012		BIT	#TS.RS,T.STS(R5) ;TERMINAL RESERVED
  1308	003452'	001404				BEQ	20$		;THEN
  1309	003454'				10$:	RESPOND	RC.RNA		;ERROR - RESOURCE NOT AVAILABLE
  1310					 
  1311					; RESERVE TERMINAL
  1312					 
  1313	003464'	016465	000024	000010	20$:	MOV	C.prm1(R4),T.RID(R5) ;STORE CONTROL ID
  1314	003472'	010365	000004			MOV	R3,T.PCBR(R5)	;STORE CONTROL PCB THREAD IN TCB
  1315	003476'	052765	000020	000012		BIS	#TS.RS,T.STS(R5) ;SET STATUS= 'RESERVED'
  1316	003504'	004767	002030			CALL	SETRES		;LINK INTO RESERVED LIST.
  1317					 
  1318	003510'					RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
  1319
  1320					;+
  1321					; SEND 'SPECIFY-SHARE' NOT SUPPORTED
  1322					;-
  1323
  1324	003520'				SHARE:	RESPOND	RC.SHN		;ERROR - SHARED ACCESS NOT SUPPORTED
  1325
  1326
  1327
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 20
NRM.M11    30-DEC-82 04:00		ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR

  1329						.SBTTL	ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR
  1330					;+
  1331					; THIS ROUTINE RECEIVES CONTROL FROM THE ATS RESOURCE MESSAGE DISPATCHER.
  1332					; IT GETS THE CONTROL ID AND SEARCHES THE RESERVED TERMINAL LIST
  1333					; FOR IT.  IF FOUND, THE <ACCESS> MESSAGE IS DISPATCHED.  ELSE A CHECK IS
  1334					; MADE FOR A REQUEST TYPE= RELEASE.  IF RELEASE, THE MESSAGE IS DISPATCHED,
  1335					; ELSE THE ACCESS IS REJECTED.
  1336					;
  1337					; INPUTS:
  1338					;	APR6= BIASED INTO RESOURCE MESSAGE
  1339					;	R4= ADDRESS OF WORKING CCB
  1340					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
  1341					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
  1342					;		= AT 'SRVTYPE' FIELD
  1343					;	R0= MESSAGE SUBTYPE
  1344					;
  1345					; OUTPUT:
  1346					;	APR6= BIASED INTO RESOURCE MESSAGE
  1347					;	R4= ADDRESS OF WORKING CCB
  1348					;	R3= ADDRESS OF PCB
  1349					;	R2= ADDRESS OF RESOURCE MESSAGE
  1350					;	R1= CONTROL ID
  1351					;
  1352					;	IF SUCCESS:
  1353					;	R5= ADDRESS OF TCB
  1354					;
  1355					;	IF FAILURE:
  1356					;	R0= RESPONSE CODE
  1357					;-
  1358					 
  1359	003530'				ACCESS:				;FIRST MESSAGE ENTRY POINT
  1360					 
  1361					; RANGE CHECK REQUEST TYPE
  1362					 
  1363	003530'	001403				BEQ	10$		;IF EQ, INVALID REQUEST TYPE
  1364	003532'	122700	000004			CMPB	#AC.MAX,R0 	;<ACCESS> TYPE IN RANGE?
  1365	003536'	103002				BHIS	20$		;IF LOS, YES- CONTINUE
  1366	003540'				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
  1367					 
  1368					; LOOK UP TCB
  1369					 
  1370	003544'	004767	002016		20$:	CALL	FNDRES		;CHECK RESERVED LIST FOR TERMINAL
  1371	003550'	103010				BCC	40$		;IF CC, FOUND IT
  1372	003552'	122700	000004			CMPB	#AC.REL,R0	;IS THIS A RELEASE?
  1373	003556'	001404				BEQ	30$		;IF EQ, YES
  1374	003560'					RESPOND	RC.RSE		;ERROR - REQUEST OUT OF SEQUENCE
  1375
  1376	003570'	005005			30$:	CLR	R5		;INDICATE TCB NOT FOUND
  1377	003572'	006300			40$:	ASL	R0		;MAKE A WORD INDEX
  1378	003574'	000170	000170'			JMP	@ACCDSP(R0)	;DISPATCH <ACCESS> MESSAGE
  1379
  1380					;+
  1381					; SEND 'ACCESS-OPEN ON SINGLE LINK' NOT SUPPORTED
  1382					;-
  1383
  1384	003600'				OPEN1:	RESPOND	RC.SLN		;ERROR - SINGLE LINK NOT SUPPORTED
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 20-1
NRM.M11    30-DEC-82 04:00		ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR

  1385
  1386
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 21
NRM.M11    30-DEC-82 04:00		OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR

  1388						.SBTTL	OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR
  1389					;+
  1390					; THIS ROUTINE RECEIVES CONTROL FROM THE <ACCESS> MESSAGE PRE-PROCESSOR.
  1391					; ITS FUNCTION IS TO OPEN A TERMINAL FOR A REQUESTOR.  THE BULA RECEIVED
  1392					; IN THE <OPEN> MESSAGE INDICATES THE DATA PIPE ONTO WHICH THE TERMINAL IS
  1393					; TO BE OPENED.  THE BULA IS VERIFIED TO BE A VALID DATA PIPE ASSOCIATED
  1394					; WITH THE REQUESTOR.  IF OK, THE DATA PIPE IS CHECKED TO BE CONNECTED,
  1395					; AND IF SO,  A START CCB IS QUEUED TO THE APPROPRIATE DIALOGUE MANAGER.
  1396					; [THE OPEN PROCESS IS COMPLETED IN THE <OPEN COMPLETE> PROCESSOR].
  1397					;
  1398					; INPUT:
  1399					;	APR6= BIASED INTO RESOURCE MESSAGE
  1400					;	R5= ADDRESS OF TCB
  1401					;	R4= ADDRESS OF WORKING CCB
  1402					;	R3= ADDRESS OF PCB
  1403					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
  1404					;		= AT 'SRVTYPE' FIELD
  1405					;
  1406					; OUTPUT:
  1407					;	IF SUCCESS:
  1408					;	R4= ADDRESS OF WORKING CCB
  1409					;
  1410					;	IF FAILURE:
  1411					;	R4= ADDRESS OF WORKING CCB
  1412					;	R0= RESPONSE CODE
  1413					;
  1414					;-
  1415					 
  1416	003610'				OPEN2:
  1417	003610'	032765	000057	000012		BIT	#TS.ROP,T.STS(R5) ;TERMINAL READY FOR OPEN?
  1418	003616'	001410				BEQ	60$		;IF EQ, YES
  1419	003620'					RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
  1420					 
  1421	003630'				40$:	RESPOND	RC.ISO		;ERROR - INVALID SERVER OPTION
  1422					 
  1423	003640'				60$:
  1424	003640'	005202				inc	r2		;past server obj type
  1425	003642'	004767	001650			call	get1		;length of srvdesc field
  1426	003646'	060002				add	r0,r2		;get server opts field
  1427	003650'	004767	001642			call	get1		;...
  1428	003654'	005700				tst	r0		;can't be null
  1429	003656'	001764				beq	40$
  1430	003660'	004767	001632			call	get1		;pick up bula
  1431	003664'					push$s	r3		;save ctl pipe
  1432	003666'	004767	174436			call	$pcbpt		;get data pipe
  1433	003672'	010300				mov	r3,r0		;...
  1434	003674'					pop$s	r3
  1435	003676'	103754				bcs	40$		;youcky poo
  1436
  1437	003700'	032760	020000	000010		BIT	#PS.DAT,P.STS(R0) ;IS THIS A DATA PIPE?
  1438	003706'	001750				BEQ	40$		;IF EQ, NO- GIVE ISO ERROR
  1439	003710'	026360	000006	000006		CMP	P.USER(R3),P.USER(R0) ;CONTROL PIPE OK FOR DATA PIPE?
  1440	003716'	001344				BNE	40$		;IF NE, NO- GIVE ISO ERROR
  1441	003720'	032760	000002	000010		BIT	#PS.CC,P.STS(R0) ;DATA PIPE CONNECTED?
  1442	003726'	001006				BNE	70$		;IF NE, YES- CONTINUE
  1443	003730'					RESPOND	RC.RJS,RD.PNC	;ERROR - DATA PIPE NOT CONNECTED
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 21-1
NRM.M11    30-DEC-82 04:00		OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR

  1444					 
  1445	003744'	010065	000006		70$:	MOV	R0,T.PCBD(R5)	;SET DATA PCB INTO TCB
  1446	003750'	052765	000002	000012		BIS	#TS.OPP,T.STS(R5) ;SET OPEN PENDING
  1447
  1448	003756'	116564	000017	000011		MOVB	T.SPI(R5),C.pix(R4)
  1449	003764'	116564	000020	000010		movb	t.pri(r5),c.lix(r4)
  1450	003772'	112764	000010	000012		MOVB	#FC.CTL,C.FNC(R4)
  1451	004000'	112764	000002	000013		MOVB	#FM.STR,C.MOD(R4)
  1452	004006'	000167	000000G			JMP	$SCHED
  1453
  1454
  1455
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 22
NRM.M11    30-DEC-82 04:00		SRVSTR	-	START COMPLETE PROCESSOR

  1457						.SBTTL	SRVSTR	-	START COMPLETE PROCESSOR
  1458					;+
  1459					; THIS ROUTINE RECEIVES CONTROL WHEN A DIALOGUE MANAGER POSTS AN
  1460					; OPEN COMPLETION TO THE RESOURCE MANAGER.  
  1461					; THE OPEN CCB IS RETURNED TO THE POOL.  THE TCB ASSOCIATED WITH THE
  1462					; TERMINAL NUMBER IS LOOKED UP, AND THE REGISTERS ARE SET UP FOR THE
  1463					; RESPONSE PROCESSOR.  THEN A RESPONSE MESSAGE IS GENERATED BASED ON THE
  1464					; STATUS OF THE OPEN COMPLETION.
  1465					;
  1466					; INPUT:
  1467					;	R4= ADDRESS OF OPEN CCB
  1468					;
  1469					; OUTPUT:
  1470					;	R4= ADDRESS OF CCB-RDB
  1471					;	R0= RESPONSE CODE
  1472					;
  1473					;	IF SUCCESS:
  1474					;	R5(LOW BYTE)= TERMINAL NUMBER (BTN)
  1475					;	R5(HIGH BYTE)= BOUNDARY USER LINK ADDRESS (BULA)
  1476					;
  1477					;-
  1478					 
  1479	004012'				SRVSTR:
  1480	004012'					GTTCB$			;GET THE TCB
  1481	004024'	016503	000004			MOV	T.PCBR(R5),R3	;THE CONTROL PIPE
  1482	004030'	042765	000002	000012		BIC	#TS.OPP,T.STS(R5) ;CLEAR START PENDING
  1483					 
  1484					; CHECK FOR SUCCESS OR FAILURE ON START
  1485					 
  1486	004036'	105764	000014			TSTB	C.STS(R4)	;START SUCCESSFUL?
  1487	004042'	100006				BPL	60$		;IF PL, YES
  1488	004044'					RESPOND	RC.RJS,RD.STR	;ERROR - STARTUP FAILED
  1489					 
  1490	004060'	016503	000006		60$:	MOV	T.PCBD(R5),R3	;GET DATA PCB ADDRESS
  1491	004064'	004767	001462			CALL	SETOPN		;LINK TCB INTO OPEN LIST.
  1492	004070'	052765	000004	000012		BIS	#TS.OP,T.STS(R5) ;SET STATUS= 'OPEN'
  1493	004076'	116546	000016			MOVB	T.NUM(R5),-(SP) ;SAVE TERMINAL NUMBER  (BTN)
  1494	004102'	116366	000014	000001		MOVB	P.NUM(R3),1(SP) ;PUT BULA IN HIGH BYTE
  1495	004110'	012605				MOV	(SP)+,R5	;LOAD BULA-BTN COMBO IN R5
  1496	004112'					RESPOND	RC.INT		;SUCCESS - RESOURCE OPEN
  1497
  1498
  1499
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 23
NRM.M11    30-DEC-82 04:00		CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR

  1501						.SBTTL	CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR
  1502					;+
  1503					; THIS ROUTINE RECEIVES CONTROL FROM THE <ACCESS> MESSAGE PRE-PROCESSOR.
  1504					; ITS FUNCTION IS TO CLOSE A TERMINAL FOR A REQUESTOR.  THE 'OPEN' BIT
  1505					; IS CLEARED, THE 'CLOSE PENDING' BIT IS SET, AND THE T.PCBR THREAD IS
  1506					; REDIRECTED FROM THE DATA PIPE TO THE CONTROL PIPE.
  1507					;
  1508					; INPUT:
  1509					;	APR6= BIASED INTO RESOURCE MESSAGE
  1510					;	R5= ADDRESS OF TCB
  1511					;	R4= ADDRESS OF WORKING CCB
  1512					;	R3= ADDRESS OF PCB
  1513					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
  1514					;		= AT 'SRVTYPE' FIELD
  1515					;
  1516					; OUTPUT:
  1517					;	IF SUCCESS:
  1518					;	R4= ADDRESS OF WORKING CCB
  1519					;
  1520					;	IF FAILURE:
  1521					;	R4= ADDRESS OF WORKING CCB
  1522					;	R0= RESPONSE CODE
  1523					;
  1524					;-
  1525					 
  1526	004122'				CLOSE:				;ENTRY POINT
  1527	004122'	032765	000004	000012		BIT	#TS.OP,T.STS(R5) ;TERMINAL OPEN?
  1528	004130'	001004				BNE	CLOSE1		;IF NE, YES
  1529	004132'					RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
  1530					 
  1531					; SECONDARY ENTRY POINT (FROM RELEASE PROCESSOR)
  1532					 
  1533	004142'				CLOSE1:
  1534					 
  1535					; SECONDARY ENTRY POINT (FROM ERROR PROCESSOR)
  1536					 
  1537	004142'				CLOSE2:
  1538	004142'	005064	000020			CLR	C.BUF+2(R4)	;INDICATE NO OPTIONAL DATA
  1539	004146'	005064	000022			CLR	C.CNT(R4)
  1540					 
  1541					; SEND CLOSE (STOP) MESSAGE TO DIALOGUE MANAGER
  1542					 
  1543	004152'	042765	000004	000012	80$:	BIC	#TS.OP,T.STS(R5) ;TERMINAL NO LONGER OPEN
  1544	004160'	052765	000001	000012		BIS	#TS.CLP,T.STS(R5) ;SET CLOSE PENDING
  1545	004166'	116564	000017	000011		MOVB	T.SPI(R5),C.pix(R4)
  1546	004174'	116564	000020	000010		movb	t.pri(r5),c.lix(r4)
  1547	004202'	112764	000010	000012		MOVB	#FC.CTL,C.FNC(R4)
  1548	004210'	112764	000004	000013		MOVB	#FM.STP,C.MOD(R4)
  1549	004216'	004767	000000G			CALL	$SCHED 
  1550	004222'	000241				CLC			;INDICATE SUCCESS
  1551	004224'					RETURN			;EXIT
  1552					 
  1553
  1554
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 24
NRM.M11    30-DEC-82 04:00		SRVSTP	-	STOP COMPLETE PROCESSOR

  1556						.SBTTL	SRVSTP	-	STOP COMPLETE PROCESSOR
  1557					;+
  1558					; THIS ROUTINE RECEIVES CONTROL WHEN A DIALOGUE MANAGER POSTS A
  1559					; CLOSE COMPLETION TO THE RESOURCE MANAGER.
  1560					; IF RELEASE PENDING IS SET, THE RELEASE PROCESSOR IS CALLED AT
  1561					; ITS 'RELES1' ENTRY POINT.  IN THIS CASE THE STATUS RETURNED TO
  1562					; THE USER WILL BE FOR A RELEASE REQUEST.
  1563					; IF A RELEASE IS NOT PENDING, A RESPONSE MESSAGE IS RETURNED
  1564					; TO THE USER FOR THE CLOSE REQUEST.
  1565					; IF THE CLOSE IS BEING DONE BECAUSE OF A DISCONNECT ON THE DATA
  1566					; PIPE AND THE CONTROL PIPE IS STILL ACTIVE, A <STATUS-REPORT>
  1567					; MESSAGE IS SENT ON THE CONTROL PIPE FOR THE TERMINAL BEING CLOSED.
  1568					; IN ANY CASE, THE CLOSE CCB IS RETURNED TO THE POOL.
  1569					;
  1570					; INPUT:
  1571					;	R4= ADDRESS OF CLOSE CCB
  1572					;
  1573					; OUTPUT:
  1574					;	R4= ADDRESS OF CCB-RDB
  1575					;	R0= RESPONSE CODE
  1576					;
  1577					;-
  1578					 
  1579	004226'				SRVSTP:				;ENTRY POINT
  1580	004226'					GTTCB$			;FIND THE RESOURCE CONTROL BLOCK
  1581	004240'	042765	000001	000012		BIC	#TS.CLP,T.STS(R5) ;CLEAR CLOSE PENDING
  1582	004246'	016503	000006			MOV	T.PCBD(R5),R3	;POINT TO DATA PCB
  1583	004252'	004767	001370			CALL	REMOPN		;REMOVE RESOURCE FROM OPEN LIST.
  1584	004256'	005001				CLR	R1		; TRANSFER RESOURCE
  1585	004260'	156501	000017			BISB	T.SPI(R5),R1	; FROM THE SERVER
  1586					 
  1587	004264'	016503	000004		10$:	MOV	T.PCBR(R5),R3	;POINT TO CONTROL PCB
  1588	004270'	116364	000014	000024		MOVB	P.NUM(R3),C.prm1(R4) ;AND RESET THE PIPE NUMBER.
  1589	004276'	005764	000004			TST	C.stk(R4)	;IF THIS IS A DISCONNECT OPERATION
  1590	004302'	001061				BNE	40$		;THEN
  1591	004304'	032763	000004	000010		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING ON CONTROL PIPE?
  1592	004312'	001405				BEQ	20$		;IF EQ, NO
  1593	004314'	042765	001410	000012		BIC	#<TS.STE!TS.OSP!TS.RLP>,T.STS(R5) ;ELSE CLEAR PENDING BITS
  1594	004322'	000167	175464			JMP	DISCP		;FINISH DISCONNECTING CONTROL PIPE
  1595
  1596	004326'	016500	000006		20$:	MOV	T.PCBD(R5),R0	;GET DATA PCB ADDRESS
  1597	004332'	032760	000004	000010		BIT	#PS.DIP,P.STS(R0) ;DISCONNECT PENDING ON DATA PIPE?
  1598	004340'	001431				BEQ	30$		;IF EQ, NO
  1599	004342'	032763	000002	000010	25$:	BIT	#PS.CC,P.STS(R3) ;IF CONTROL PIPE
  1600	004350'	001416				BEQ	26$		 ;  IS STILL ACTIVE,
  1601	004352'	016501	000010			MOV	T.RID(R5),R1	 ;  SEND A <STATUS-REPORT> MESSAGE
  1602	004356'	012700	000007			MOV	#RP.DSC,R0	 ;  ON THE PIPE
  1603	004362'	004767	000222			CALL	ASYREP		 ;  ASYNCHRONOUSLY
  1604	004366'	103007				BCC	26$		;IF NO RESOURCES
  1605	004370'	010564	000030			MOV	R5,C.prm3(R4)	;SAVE THE TCB ADDRESS
  1606	004374'	004767	174332			CALL	NRMRWT		;WAIT A TICK
  1607	004400'	016405	000030			MOV	C.prm3(R4),R5	;RESTORE THE TCB
  1608	004404'	000756				BR	25$		;AND TRY AGAIN
  1609
  1610	004406'	016503	000006		26$:	MOV	T.PCBD(R5),R3	 ;POINT TO DATA PCB
  1611	004412'	042765	001410	000012		BIC	#<TS.STE!TS.OSP!TS.RLP>,T.STS(R5) ;CLEAR PENDING BITS
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 24-1
NRM.M11    30-DEC-82 04:00		SRVSTP	-	STOP COMPLETE PROCESSOR

  1612	004420'	000167	175652			JMP	DISDP		;FINISH DISCONNECTING DATA PIPE
  1613					 
  1614	004424'	032765	001000	000012	30$:	BIT	#TS.STE,T.STS(R5) ;START ERROR PENDING?
  1615	004432'	001405				BEQ	40$		;IF EQ, NO
  1616	004434'	042765	001000	000012		BIC	#TS.STE,T.STS(R5) ;ELSE YES- CLEAR START ERROR PENDING
  1617	004442'	000167	000000G		35$:	JMP	$CCBRT		;RETURN STOP CCB
  1618					 
  1619	004446'	032765	000010	000012	40$:	BIT	#TS.RLP,T.STS(R5) ;IF RELEASE PENDING
  1620	004454'	001034				BNE	50$		;OR
  1621	004456'	032765	000400	000012		BIT	#TS.OSP,T.STS(R5) ;NO OPR RPT REQUEST PENDING
  1622	004464'	001430				BEQ	50$		;THEN
  1623	004466'	032763	000002	000010	45$:	BIT	#PS.CC,P.STS(R3) ;IF CONTROL PIPE
  1624	004474'	001424				BEQ	50$		 ;  IS STILL ACTIVE,
  1625	004476'	042765	000400	000012		BIC	#TS.OSP,T.STS(R5) ;CLEAR OPERATIONAL STATUS BIT
  1626	004504'	016501	000010			MOV	T.RID(R5),R1	;GET CONTROL ID
  1627	004510'	016400	000024			MOV	C.PRM1(R4),R0	;GET OPERATIONAL STATUS
  1628	004514'	004767	000070			CALL	ASYREP		;AND SEND STATUS-REPORT TO USER
  1629	004520'	103012				BCC	50$		;IF NOT SUCCESSFUL
  1630	004522'	052765	000400	000012		BIS	#TS.OSP,T.STS(R5) ;RESET THE BIT
  1631	004530'	010564	000030			MOV	R5,C.prm3(R4)	;SAVE THE TCB ADDRESS
  1632	004534'	004767	174172			CALL	NRMRWT		;WAIT A TICK
  1633	004540'	016405	000030			MOV	C.prm3(R4),R5	;RESTORE THE TCB
  1634	004544'	000750				BR	45$		;AND TRY AGAIN.
  1635
  1636	004546'	005764	000004		50$:	TST	C.stk(R4)	;IF NO ASSOCIATED MESSAGE
  1637	004552'	001733				BEQ	35$		;THEN THROW THIS AWAY.
  1638					 
  1639	004554'				70$:	RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
  1640
  1641
  1642
  1643
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 25
NRM.M11    30-DEC-82 04:00		ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR

  1645						.SBTTL	ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR
  1646					;+
  1647					; THIS ROUTINE RECEIVES CONTROL FROM THE RESOURCE MANAGER DISPATCHER.
  1648					; IT DOES PROCESSING COMMON TO ALL ASSIGN REQUEST MESSAGES.
  1649					; A RANGE CHECK IS DONE ON THE REQUEST TYPE AND THE MESSAGE IS DISPATCHED.
  1650					;
  1651					; INPUT:
  1652					;	APR6= BIASED INTO RESOURCE MESSAGE
  1653					;	R4= ADDRESS OF WORKING CCB
  1654					;	R3= ADDRESS OF CONTROL PCB
  1655					;	R2= ADDRESS OF RESOURCE MESSAGE
  1656					;		= AT 'MSGFLDS' FIELD
  1657					;	R0= MESSAGE SUBTYPE
  1658					;
  1659					; OUTPUT:
  1660					;	IF SUCCESS:
  1661					;	SAME AS INPUT
  1662					;
  1663					;	IF FAILURE:
  1664					;	SAME AS INPUT, PLUS:
  1665					;	R0= RESPONSE CODE
  1666					;-
  1667					 
  1668	004564'				ASSIGN:
  1669					 
  1670					; RANGE CHECK REQUEST TYPE
  1671					 
  1672	004564'	005700				TST	R0
  1673	004566'	001403				BEQ	10$		;IF EQ, INVALID STATUS TYPE
  1674	004570'	120027	000003			CMPB	R0,#AS.MAX	;ASSIGN TYPE IN RANGE?
  1675	004574'	101402				BLOS	20$		;IF LOS, YES- CONTINUE
  1676	004576'				10$:	RESPOND	RC.IRC		;ERROR - INVALID REQUEST CODE
  1677					 
  1678	004602'	006300			20$:	ASL	R0		;MAKE A WORD INDEX
  1679	004604'	000170	000202'			JMP	@ASNDSP(R0)	;AND DISPATCH ASSIGN MESSAGE
  1680
  1681
  1682
  1683
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 26
NRM.M11    30-DEC-82 04:00		ASYREP	- ASYNCHRONOUS STATUS REPORT

  1685						.SBTTL	ASYREP	- ASYNCHRONOUS STATUS REPORT
  1686					;+
  1687					; THIS ROUTINE RECEIVES CONTROL FROM THE ERROR PROCESSOR.
  1688					; ITS FUNCTION IS TO GET THE ATS TERMINAL STATUS AND THE OPERATIONAL
  1689					; STATUS, BUILD THE STATUS MESSAGE, ANS TRANSMIT THE MESSAGE.
  1690					;
  1691					; INPUTS:
  1692					;	R5= ADDRESS OF TCB
  1693					;	R3= ADDRESS OF CONTROL PCB
  1694					;	R1= CONTROL ID
  1695					;	R0= OPERATIONAL STATUS
  1696					;
  1697					; OUTPUT:
  1698					;	CARRY CLEAR= STATUS SENT
  1699					;	CARRY SET= COULD NOT OBTAIN RESOURCES
  1700					;
  1701					; REGISTERS MODIFIED: APR6,R2
  1702					;-
  1703					 
  1704	004610'				ASYREP:	PUSH$S	R4			; SAVE HIS CCB
  1705	004612'	004767	000564			CALL	CSBGT			; AND GET A REPORT BUFFER
  1706	004616'	103445				BCS	90$			; IF WE CAN.
  1707	004620'	010164	000024			MOV	R1,C.prm1(R4)		; SAVE CONTROL ID
  1708	004624'	116364	000012	000010		MOVB	P.LLA(R3),C.LIN(R4) 	; PIPE NUMBER
  1709	004632'	112764	000010	000013		MOVB	#SS.ATS,C.MOD(R4) 	; AND SET STATUS TYPE.
  1710	004640'	016402	000020			MOV	C.BUF+2(R4),R2		; GET BUFFER ADDRESS
  1711	004644'	004767	000446			CALL	STATSM			; AND SET UP THE MESSAGE.
  1712	004650'	166402	000020			SUB	C.BUF+2(R4),R2		; FIGURE THE LENGTH AND
  1713	004654'	010264	000022			MOV	R2,C.CNT(R4)		; STORE IT.
  1714	004660'	116364	000017	000011		movb	p.pix(r3),c.pix(r4)	;set destination
  1715	004666'					NDAT$	P.LLA(R3),p.num(r3),#s$peom
  1716	004730'	000241				CLC				; INDICATE SUCCESS
  1717	004732'				90$:	POP$S	R4			; RESTORE HIS CCB
  1718	004734'					RETURN
  1719
  1720
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 27
NRM.M11    30-DEC-82 04:00		INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR

  1722						.SBTTL	INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR
  1723					;+
  1724					; THIS ROUTINE PROVIDES A DISPATCH TARGET FOR ALL INVALID OR UNSUPPORTED
  1725					; REQUESTS DISPATCHED THRU THE DISPATCH TABLES.
  1726					;
  1727					; INPUT:
  1728					;	R4= ADDRESS OF CCB-RDB
  1729					;
  1730					; OUTPUT:
  1731					;	SAME AS INPUT, PLUS:
  1732					;	R0= RESPONSE CODE
  1733					;-
  1734					 
  1735	004736'				UNSUPPORTED:
  1736	004736'				INVALID:
  1737	004736'	012700	000026			MOV	#RC.IRC,R0	;ERROR - ILLEGAL REQUEST CODE
  1738						.IIF	NE,<.-RSPNS>,.ERROR RSPNS; routine must follow this one
  1739
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 28
NRM.M11    30-DEC-82 04:00		RSPNS	- RESPONSE MESSAGE GENERATOR

  1741						.SBTTL	RSPNS	- RESPONSE MESSAGE GENERATOR
  1742					;+
  1743					; GET DATA PIPE AND MESSAGE TYPE BEING RESPONDED TO AND FALL THROUGH TO
  1744					; RESPOND TO THE MESSAGE.
  1745					;
  1746					; INPUTS:
  1747					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
  1748					;	R4= ADDRESS OF WORKING CCB
  1749					;	R0= RESPONSE CODE
  1750					;
  1751					; OUTPUTS (TO RSPNS1):
  1752					;	APR6= MAPPED TO RESOURCE MESSAGE
  1753					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
  1754					;	R4= ADDRESS OF WORKING CCB
  1755					;	R3= ADDRESS OF CONTROL PCB
  1756					;	R1= MESSAGE TYPE (LOW BYTE) / SUBTYPE (HIGH BYTE)
  1757					;	R0= RESPONSE CODE
  1758					;-
  1759					 
  1760	004742'				RSPNS:	PUSH$S	<R0,R4>		; ROOM TO MOVE.
  1761	004746'	016404	000004			MOV	C.stk(R4),R4	; GET NSP BUFFER
  1762	004752'					GTPCB$			; AND PCB ADDRESS.
  1763	004764'					MAP$	C.BUF(R4)	; MAP TO BUFFER
  1764	004772'	016402	000014			MOV	C.STS(R4),R2	; GET ADDRESS
  1765	004776'	004767	000522			CALL	GET2		; AND PICK UP
  1766	005002'	010001				MOV	R0,R1		; MESSAGE TYPE / SUBTYPE.
  1767	005004'					POP$S	<R4,R0>		; RESET REGISTERS.
  1768						.IIF	NE,<.-RSPNS2>,.ERROR RSPNS2; routine must follow this one
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 28-1
NRM.M11    30-DEC-82 04:00		RSPNS	- RESPONSE MESSAGE GENERATOR

  1770					;+
  1771					; RELEASE THE NSP RESOURCE MESSAGE BUFFER, GET A RESPONSE BUFFER
  1772					; AND FALL THROUGH TO FILL THE BUFFER AND SEND THE RESPONSE.
  1773					;
  1774					; INPUT:
  1775					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
  1776					;	R4= ADDRESS OF WORKING CCB
  1777					;	R3= PCB ADDRESS
  1778					;	R1= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
  1779					;	R0= RESPONSE CODE
  1780					;
  1781					; OUTPUT (TO RSPNSM):
  1782					;	R4= ADDRESS OF WORKING CCB
  1783					;		C.prm1= CONTROL ID
  1784					;		C.FLG= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
  1785					;		C.PRM1= RESPONSE CODE
  1786					;		C.PRM2= RESPONSE DATA, IF R0=45 OR <OPEN> MESSAGE RESPONSE
  1787					;
  1788					; ALL REGISTERS MODIFIED
  1789					;-
  1790
  1791	005010'	010402			RSPNS2:	MOV	R4,R2
  1792	005012'	016404	000004			MOV	C.stk(R4),R4		; GET NSP'S CCB-BUFFER
  1793	005016'					NRTN$
  1794	005030'	010204				MOV	R2,R4			; RECOVER THE WORKING CCB.
  1795	005032'	004767	000362		20$:	CALL	SDBGT			; PUT A SDB IN OUR CCB
  1796	005036'	103030				BCC	30$			; IF NOT AVAILABLE
  1797	005040'	010164	000030			MOV	R1,C.prm3(R4)		; MESSAGE BEING RESPONDED TO
  1798	005044'	010064	000032			MOV	R0,C.prm4(R4)		; RESPONSE CODE
  1799	005050'	010564	000034			MOV	R5,C.prm5(R4)		; AND DATA.
  1800	005054'	016464	000024	000014		mov	c.prm1(r4),c.sts(r4)	; save the ctl-id
  1801	005062'	116364	000014	000024		movb	p.num(r3),c.prm1(r4)	; set up ULA for dispatch
  1802	005070'	004767	173636			CALL	NRMRWT			; WAIT FOR BETTER CONDITIONS
  1803	005074'	016405	000034			MOV	C.prm5(R4),R5		; RESTORE
  1804	005100'	016400	000032			MOV	C.prm4(R4),R0		; NEEDED
  1805	005104'	016401	000030			MOV	C.prm3(R4),R1		; DATA
  1806	005110'	016464	000014	000024		mov	c.sts(r4),c.prm1(r4)	; set up ctl-id
  1807	005116'	000745				BR	20$			; AND TRY AGAIN
  1808	005120'	016402	000020		30$:	MOV	C.BUF+2(R4),R2		; AND BUFFER ADDRESS
  1809	005124'	004767	000062			CALL	RSPNSM			; SET UP THE MESSAGE
  1810	005130'	166402	000020			SUB	C.BUF+2(R4),R2		; FIGURE THE LENGTH AND
  1811	005134'	010264	000022			MOV	R2,C.CNT(R4)		; STORE IT.
  1812	005140'	116364	000017	000011		movb	p.pix(r3),c.pix(r4)	;set destination
  1813	005146'					NDAT$	P.LLA(R3),p.num(r3),#s$peom
  1814	005210'					RETURN
  1815
  1816
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 29
NRM.M11    30-DEC-82 04:00		RSPNSM	- GENERATE A <RESPONSE> MESSAGE

  1818						.SBTTL	RSPNSM	- GENERATE A <RESPONSE> MESSAGE
  1819					;+
  1820					; SET UP A RESPONSE MESSAGE IN A GIVEN BUFFER.
  1821					;
  1822					; INPUT:
  1823					;	APR6= MAPPED TO RESPONSE BUFFER
  1824					;	R5= RESPONSE DATA, IF R0=45 OR <OPEN> MESSAGE RESPONSE
  1825					;	R4= ADDRESS OF RESPONSE CCB-BUFFER
  1826					;		C.prm1= CONTROL ID
  1827					;	R2= ADDRESS TO INSERT THE STATUS MESSAGE
  1828					;	R1= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
  1829					;	R0= RESPONSE CODE
  1830					;
  1831					; OUTPUTS:
  1832					;	R2= MOVED PAST THE MESSAGE INSERTED
  1833					;
  1834					; REGISTERS MODIFIED: R5,R2
  1835					;-
  1836
  1837	005212'	112722	000047		RSPNSM:	MOVB	#RQ.RES,(R2)+	; LOAD RESPONSE REQUEST CODE
  1838	005216'	110122				MOVB	R1,(R2)+	; LOAD RECEIVED MESSAGE'S REQUEST CODE
  1839	005220'	116422	000024			MOVB	C.prm1(R4),(R2)+	; LOAD LOW BYTE OF CONTROL ID
  1840	005224'	116422	000025			MOVB	C.prm1+1(R4),(R2)+ ; LOAD HIGH BYTE OF CONTROL ID
  1841	005230'	110022				MOVB	R0,(R2)+	; LOAD LOW BYTE
  1842	005232'	000300				SWAB	R0		; AND
  1843	005234'	110022				MOVB	R0,(R2)+	; HIGH BYTE OF RESPONSE CODE
  1844	005236'	000300				SWAB	R0		; RESTORE THE CODE.
  1845	005240'	022700	000045			CMP	#RC.RJS,R0	; IS THIS A SERVOR REJECTION?
  1846	005244'	001010				BNE	60$		; IF NE, NO
  1847	005246'	005705				TST	R5		; IS THERE RESPONSE DATA?
  1848	005250'	001420				BEQ	70$		; IF EQ, NO
  1849	005252'	112722	000002			MOVB	#2,(R2)+	; SET RESPONSE DATA COUNT
  1850	005256'	110522				MOVB	R5,(R2)+	; LOAD LOW BYTE
  1851	005260'	000305				SWAB	R5		; AND
  1852	005262'	110522				MOVB	R5,(R2)+	; HIGH BYTE OF RESPONSE DATA
  1853	005264'					RETURN			; SEND RESPONSE MESSGAGE
  1854
  1855	005266'	022701	001051		60$:	CMP	#RQ.ACC+<AC.SEP*400>,R1 ; IF <ACCESS-OPEN>
  1856	005272'	001007				BNE	70$		; WITH SEPERATE DATA PIPE
  1857	005274'	112722	000003			MOVB	#3,(R2)+	; THEN SET RESPONSE DATA COUNT
  1858	005300'	110522				MOVB	R5,(R2)+	; LOAD BTN
  1859	005302'	105022				CLRB	(R2)+		; CLEAR HIGH BYTE OF BTN
  1860	005304'	000305				SWAB	R5		; AND
  1861	005306'	110522				MOVB	R5,(R2)+	; LOAD BULA
  1862	005310'					RETURN			; AND SEND RESPONSE MESSAGE
  1863
  1864	005312'	105022			70$:	CLRB	(R2)+		; SET RESPONSE DATA LENGTH= 0
  1865	005314'					RETURN
  1866
  1867
  1868
  1869
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 30
NRM.M11    30-DEC-82 04:00		STATSM	- GENERATE A <STATUS> MESSAGE

  1871						.SBTTL	STATSM	- GENERATE A <STATUS> MESSAGE
  1872					;+
  1873					; SET UP A STATUS MESSAGE IN A GIVEN BUFFER.
  1874					;
  1875					; INPUT:
  1876					;	APR6= MAPPED TO RESPONSE BUFFER
  1877					;	R5= ADDRESS OF TCB FOR STATUS MESSAGE
  1878					;	R4= ADDRESS OF RESPONSE CCB-BUFFER
  1879					;		C.prm1= CONTROL ID
  1880					;		C.MOD= STATUS MESSAGE TYPE
  1881					;	R2= ADDRESS TO INSERT THE STATUS MESSAGE
  1882					;	R0= OPERATIONAL STATUS OR ZERO
  1883					;
  1884					; OUTPUTS:
  1885					;	R2= MOVED PAST THE MESSAGE INSERTED
  1886					;
  1887					; REGISTERS MODIFIED: R2
  1888					;-
  1889
  1890	005316'	112722	000053		STATSM:	MOVB	#RQ.STS,(R2)+	; LOAD STATUS REQUEST CODE
  1891	005322'	112722	000002			MOVB	#ST.REP,(R2)+	; AS <STATUS-REPORT>
  1892	005326'	116422	000024			MOVB	C.prm1(R4),(R2)+	; LOAD LOW BYTE OF CONTROL ID
  1893	005332'	116422	000025			MOVB	C.prm1+1(R4),(R2)+ ; LOAD HIGH BYTE OF CONTROL ID
  1894	005336'	116422	000013			MOVB	C.MOD(R4),(R2)+	; SET STATUS TYPE
  1895	005342'	112722	000002			MOVB	#2,(R2)+	; AND DEFAULT TO TWO.
  1896	005346'	116522	000012			MOVB	T.STS+0(R5),(R2)+ ; AND STORE
  1897	005352'	116522	000013			MOVB	T.STS+1(R5),(R2)+ ; TCB STATUS.
  1898	005356'	005700				TST	R0		; IS THERE ANY OPERATIONAL STATUS ?
  1899	005360'	001407				BEQ	80$		; IF SO,
  1900	005362'	112762	000004	177775		MOVB	#4,-3(R2)	; SET COUNT TO FOUR
  1901	005370'	110022				MOVB	R0,(R2)+	; AND LOAD THE
  1902	005372'	000300				SWAB	R0
  1903	005374'	110022				MOVB	R0,(R2)+	; OPERATIONAL STATUS.
  1904	005376'	000300				SWAB	R0
  1905	005400'				80$:	RETURN
  1906
  1907
  1908
  1909
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 31
NRM.M11    30-DEC-82 04:00		CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS

  1911						.SBTTL	CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS
  1912					;+
  1913					; GET A CCB/SDB AND FIX IT UP.
  1914					;
  1915					; NO INPUTS
  1916					;
  1917					; OUTPUTS:
  1918					;	APR6 - MAPPED TO SDB
  1919					;	R4 - CCB/SDB IF CARRY IS CLEAR
  1920					;
  1921					; REGISTERS MODIFIED: APR6,R4
  1922					;-
  1923
  1924	005402'				CSBGT:
  1925	005402'					push$s	<r1>
  1926	005404'	012701	000074			mov	#60.,r1
  1927	005410'	004767	000000G			CALL	$CBBGT		;GET A CCB/SDB
  1928	005414'					pop$s	<r1>
  1929	005416'					RETURN
  1930
  1931						.SBTTL	SDBGT	- GET A SDB AND INSERT IN CCB
  1932					;+
  1933					; THIS ROUTINE IS HERE FOR THE SAME REASON AS ABOVE.
  1934					;
  1935					; INPUTS:
  1936					;	R4 - CCB TO INSERT SDB INTO
  1937					;
  1938					; OUTPUTS (IF CARRY IS CLEAR):
  1939					;	APR6 - MAPPED TO SDB
  1940					;	C.BUF+0(R4) - SDB APR BIAS
  1941					;	C.BUF+2(R4) - SDB VIRTUAL ADDRESS
  1942					;
  1943					; REGISTERS MODIFIED: APR6
  1944					;-
  1945
  1946	005420'				SDBGT:	PUSH$S	<r1,r0>		; SAVE VOLOTILE REGISTERS
  1947	005424'	012701	000074			mov	#60.,r1
  1948	005430'	004767	000000G			CALL	$corGT		; AND BID FOR A SDB.
  1949	005434'	103405				BCS	90$		; IF WE WON
  1950	005436'					SMAP$	c.BUF+0(R4)	; INSERT APR BIAS
  1951	005444'	010064	000020			MOV	R0,C.BUF+2(R4)	; AND VIRTUAL ADDRSS
  1952	005450'				90$:	POP$S	<r0,R1>
  1953	005454'					RETURN
  1954
  1955						.SBTTL	NRMDAT	- RETURN A NRM DATA BUFFER
  1956					;+
  1957					; THIS ROUTINE RETURNS BUFFERS AFTER A TRANSMIT OPERATION COMPLETES.
  1958					;
  1959					; INPUT:
  1960					;	R4= ADDRESS OF CCB-SDB
  1961					;
  1962					; OUTPUT:
  1963					;	CCB-SDB RETURNED TO POOL
  1964					;-
  1965					 
  1966	005456'				NRMDAT:
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 31-1
NRM.M11    30-DEC-82 04:00		NRMDAT	- RETURN A NRM DATA BUFFER

  1967	005456'	012701	000074			mov	#60.,r1		;return 80. bytes
  1968	005462'	000167	000000G			JMP	$CbBRT		;AND RETURN CCB-SDB.
  1969
  1970
  1971
  1972
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 32
NRM.M11    30-DEC-82 04:00		NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER

  1974						.SBTTL	NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER
  1975					;+
  1976					;  THIS ROUTINE RETURNS CCBS AND RECEIVE BUFFERS ACQUIRED FROM NSP
  1977					;  IF ANY ARE ATTACHED TO THE CCB
  1978					;
  1979					;  INPUT:
  1980					;	R4 = ADDRESS OF CCB FOR BUFFER
  1981					;	R3 = CONTROL PCB
  1982					;
  1983					; REGISTERS MODIFIED: R1
  1984					;-
  1985					 
  1986	005466'	016401	000004		NSPRT:	MOV	C.stk(R4),R1	; PICK UP MYTHICAL NSP MESSAGE
  1987	005472'	004767	000000G			CALL	$CCBRT		; AND RELEASE THE CCB.
  1988	005476'	010104				MOV	R1,R4		; IF THE IS A NSP MESSAGE
  1989	005500'	001405				BEQ	90$		; THEN
  1990	005502'					NRTN$
  1991	005514'				90$:	RETURN
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 33
NRM.M11    30-DEC-82 04:00		NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER

  1993					;		***- RESOURCE MANAGER UTILITIES -***
  1994					 
  1995					 
  1996					;+
  1997					; THE FOLLOWING ROUTINES ARE GENERAL UTILITIES USED BY THE RESOURCE
  1998					; MANAGER AND THE ATS DIALOGUE MANAGERS FOR TABLE LOOKUP; INSERTION,
  1999					; DELETION AND SCANNING OF ITEMS IN LINKED LISTS; AND A 'PUSH ONTO QUEUE'
  2000					; ROUTINE.
  2001					;-
  2002					 
  2003					 
  2004						.SBTTL	GET*	- GET DATA FROM NRM MESSAGE
  2005					;+
  2006					; THE FOLLOWING ROUTINES EXTRACT DATA FROM THE NRM MESSAGE POINTED TO BY R2
  2007					; AND UPDATE R2 TO POINT AFTER THE DATA EXTRACTED.
  2008					;
  2009					; GET1	- GET A SINGLE BYTE (NO SIGN EXTENSION)
  2010					; GET2	- GET TWO BYTES AND ASSEMBLE AS WORD
  2011					;
  2012					; INPUTS:
  2013					;	APR6= BIASED INTO RESOURCE MESSAGE
  2014					;	R2 - POINTS TO DATA TO EXTRACT
  2015					;
  2016					; OUTPUTS:
  2017					;	R2 - POINTS AFTER EXTRACTED DATA
  2018					;	R0 - ASSEMBLED DATA
  2019					;-
  2020
  2021	005516'	005000			GET1:	CLR	R0		;PICK UP ONE BYTE
  2022	005520'	152200				BISB	(R2)+,R0	;WITHOUT EXTENDING SIGN.
  2023	005522'					RETURN
  2024
  2025	005524'	005000			GET2:	CLR	R0		;START WITH NOTHING
  2026	005526'	152200				BISB	(R2)+,R0	;PICK UP LOW BYTE
  2027	005530'	000300				SWAB	R0
  2028	005532'	152200				BISB	(R2)+,R0	;PICK UP HIGH BYTE
  2029	005534'	000300				SWAB	R0
  2030	005536'					RETURN
  2031
  2032
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 34
NRM.M11    30-DEC-82 04:00		GET*	- GET DATA FROM NRM MESSAGE

  2034					;+
  2035					; LIST MANIPULATION ROUTINES FOR REFERRAL LIST, RESERVED LIST, AND OPEN LIST.
  2036					;
  2037					; INPUTS:
  2038					;	R5= REFERRAL CCB OR RESOURCE TCB (IN SETXXX & REMXXX)
  2039					;	R4= WORKING CCB
  2040					;		C.prm1= CONTROL ID
  2041					;	R3= CONTROL / DATA PIPE ADDRESS
  2042					;
  2043					; OUTPUTS:
  2044					;	R5= REFERRAL CCB OR RESOURCE TCB (IN FNDXXX)
  2045					;-
  2046
  2047
  2048	005540'	016315	000002		SETRES:	MOV	P.RES(R3),(R5)	; LINK INTO
  2049	005544'	010563	000002			MOV	R5,P.RES(R3)	; RESERVED RESOURCE LIST.
  2050	005550'					RETURN
  2051
  2052	005552'	016365	000002	000002	SETOPN:	MOV	P.OPN(R3),T.OLNK(R5) ; LINK INTO
  2053	005560'	010563	000002			MOV	R5,P.OPN(R3)	; OPEN RESOURCE LIST.
  2054	005564'					RETURN
  2055
  2056
  2057	005566'	016305	000002		FNDRES:	MOV	P.RES(R3),R5	; GET FIRST RESERVED RESOURCE
  2058	005572'	001406				BEQ	80$		; IF THERE IS ONE.
  2059	005574'	026465	000024	000010	10$:	CMP	C.prm1(R4),T.RID(R5) ; IF CONTROL IDS MATCH
  2060	005602'	001403				BEQ	90$		; THEN ALL DONE
  2061	005604'	011505				MOV	(R5),R5		; OTHERWISE
  2062	005606'	001372				BNE	10$		; GO THROUGH LINKS
  2063	005610'	000261			80$:	SEC			; UNTIL WE RUN OUT.
  2064	005612'				90$:	RETURN
  2065
  2066
  2067
  2068	005614'				REMRES:	PUSH$S	R4		; GET A WORK REGISTER
  2069	005616'	012704	000002			MOV	#P.RES,R4	; AND POINT IT
  2070	005622'	060304				ADD	R3,R4		; TO RESERVED RESOURCE LIST.
  2071	005624'	021405			10$:	CMP	(R4),R5		; IF NO MATCH
  2072	005626'	001404				BEQ	20$		; THEN
  2073	005630'	011404				MOV	(R4),R4		; GO THROUGH
  2074	005632'	001374				BNE	10$		; THE LINKS
  2075	005634'	000261				SEC			; UMMMM....
  2076	005636'	000401				BR	80$		; UNTIL RUN OUT.
  2077	005640'	011514			20$:	MOV	(R5),(R4)	; IF FOUND, DE-LINK IT.
  2078	005642'				80$:	POP$S	R4		; RETURN R4
  2079	005644'					RETURN
  2080
  2081	005646'				REMOPN:	PUSH$S	R4		; GET A WORK REGISTER
  2082	005650'	012704	000000			MOV	#P.OPN-T.OLNK,R4 ; AND POINT IT
  2083	005654'	060304				ADD	R3,R4		; TO OPEN RESOURCE LIST.
  2084	005656'	026405	000002		10$:	CMP	T.OLNK(R4),R5	; IF NO MATCH
  2085	005662'	001405				BEQ	20$		; THEN
  2086	005664'	016404	000002			MOV	T.OLNK(R4),R4	; GO THROUGH
  2087	005670'	001372				BNE	10$		; THE LINKS
  2088	005672'	000261				SEC			; UMMMM....
  2089	005674'	000403				BR	80$		; UNTIL RUN OUT.
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 34-1
NRM.M11    30-DEC-82 04:00		GET*	- GET DATA FROM NRM MESSAGE

  2090	005676'	016564	000002	000002	20$:	MOV	T.OLNK(R5),T.OLNK(R4) ; IF FOUND, DE-LINK IT.
  2091	005704'				80$:	POP$S	R4		; RETURN R4
  2092	005706'					RETURN
  2093
  2094		000001				.END
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

ACCDSP  000170R    002	  357#	  362	 1378
ACCESS  003530R    003	  332	 1359#
AC.CLO= 000003        	  133#
AC.MAX= 000004        	  362#	 1364
AC.REL= 000004        	  134#	 1372
AC.SEP= 000002        	  132#	 1855
AC.SIN= 000001        	  131#
ASNDSP  000202R    002	  367#	  371	 1679
ASSIGN  004564R    003	  333	 1668#
ASYREP  004610R    003	 1603*	 1628*	 1704#
AS.ASS= 000001        	  139#
AS.HAN= 000003        	  141#
AS.MAX= 000003        	  371#	 1674
AS.RES= 000002        	  140#
CAPDSP  000152R    002	  342#	  345
CE.ABO= 177770        	   47#
CE.BUF= 177600        	   47#
CE.DCR= 177570        	   47#
CE.DEV= 177532        	   47#
CE.DIS= 177520        	   47#
CE.ERR= 177760        	   47#
CE.HFE= 177560        	   47#
CE.MOP= 177750        	   47#
CE.MTL= 177550        	   47#
CE.NTE= 177720        	   47#
CE.ROV= 177540        	   47#
CE.RTE= 177730        	   47#
CE.SRC= 177740        	   47#
CE.TMO= 177710        	   47#
CE.UDR= 177510        	   47#
CLOSE   004122R    003	  360	 1526#
CLOSE1  004142R    003	 1528	 1533#
CLOSE2  004142R    003	  917	 1022	 1537#
CP.MAX= 000002        	  345#
CSBGT   005402R    003	 1705*	 1924#
CS.SUC= 000001        	   47#
C.BUF   000016        	   47#	  596	  597	  624	  625	  770	  771	 1152	 1157	 1538*	 1710	 1712	 1763
			 1808	 1810	 1950*	 1951*
C.CHN   000002        	   47#
C.CNT   000022        	   47#	  810*	 1046*	 1539*	 1713*	 1811*
C.FNC   000012        	   47#	  671*	  703	  745	  789*	  808*	  811*	  825*	  829*	  878*	 1049*	 1054*	 1082*
			 1146*	 1450*	 1547*	 1715*	 1793*	 1813*	 1990*
C.LIN   000010        	   47#	 1150*	 1708*
C.LIX   000010        	   47#	  804*	  805	 1048*	 1146*	 1449*	 1480	 1546*	 1580	 1715*	 1813*
C.LNK   000000        	   47#	  715	  789	  808	  811	  820	  825	  829	  876	  878	 1049	 1065	 1120
			 1146	 1715	 1762	 1793	 1813	 1990
C.MOD   000013        	   47#	  702	  744	  811*	  825*	  829*	 1049*	 1146*	 1451*	 1548*	 1709*	 1715*	 1813*
			 1894
C.OWN   000006        	   47#
C.PIX   000011        	   47#	  806*	  807	 1047*	 1053*	 1081*	 1143*	 1448*	 1545*	 1714*	 1812*
C.PRM   000024        	   47#
C.PRM1  000024        	   47#	  715	  739	  808*	  811*	  820	  825*	  829*	  876	  919*	  953*	 1023*	 1029*
			 1049*	 1052*	 1065	 1080*	 1120	 1146*	 1150	 1177*	 1313	 1588*	 1627	 1707*	 1715*
			 1762	 1800	 1801*	 1806*	 1813*	 1839	 1840	 1892	 1893	 2059
C.PRM2  000026        	   47#	  670*	  716
C.PRM3  000030        	   47#	 1242*	 1258	 1605*	 1607	 1631*	 1633	 1797*	 1805
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-1
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

C.PRM4  000032        	   47#	 1244*	 1260	 1267	 1798*	 1804
C.PRM5  000034        	   47#	 1245*	 1263	 1799*	 1803
C.STK   000004        	   47#	 1151*	 1156	 1274	 1589	 1636	 1761	 1792	 1986
C.STS   000014        	   47#	  789*	  822	 1152*	 1158	 1275	 1486	 1764	 1800*	 1806
DISCP   002012R    003	  890	  901#	  921	 1594
DISDP   002276R    003	  987#	 1025	 1031	 1612
DISPC   002506R    003	  960*	  975	 1028	 1043#
ENQUE   000744R    003	  673#	  873	 1130	 1141
FC.AST= 000000        	   47#	  246	 1054	 1082
FC.CCP= 000022        	   47#	  255
FC.CTL= 000010        	   47#	  250	 1450	 1547
FC.KCP= 000020        	   47#	  254
FC.KIL= 000006        	   47#	  249
FC.RCE= 000004        	   47#	  248	  789	  808	  878	 1793	 1990
FC.RCP= 000016        	   47#	  253
FC.SYS= 000012        	   47#
FC.TIM= 000012        	   47#	  251
FC.XCP= 000014        	   47#	  252
FC.XME= 000002        	   47#	  247	  811	  825	  829	 1049	 1146	 1715	 1813
FD.AST= 000000        	   47#
FD.CCP= 000014        	   47#
FD.CTL= 000014        	   47#
FD.KCP= 000004        	   47#
FD.KIL= 000004        	   47#
FD.RCE= 000004        	   47#
FD.RCP= 000004        	   47#
FD.SYS= 000012        	   47#
FD.TIM= 000012        	   47#
FD.XCP= 000000        	   47#
FD.XME= 000000        	   47#
FM.CCB= 000010        	   47#
FM.CRA= 000002        	   47#
FM.DAT= 000000        	   47#
FM.GET= 000014        	   47#
FM.KIL= 000000        	   47#
FM.LTM= 000002        	   47#
FM.NM = 000006        	   47#
FM.PIN= 000006        	   47#
FM.PWF= 000004        	   47#
FM.RDB= 000012        	   47#
FM.RTN= 000002        	   47#
FM.SET= 000012        	   47#
FM.STM= 000000        	   47#
FM.STP= 000004        	   47#	  305	 1548
FM.STR= 000002        	   47#	  304	 1451
FM.SYN= 000004        	   47#
FM.XKL= 000004        	   47#
FNDRES  005566R    003	 1234*	 1370*	 2057#
GETCPB  000514RG   003	  596#
GET1    005516R    003	 1162*	 1174*	 1241*	 1243*	 1425*	 1427*	 1430*	 2021#
GET2    005524R    003	 1176*	 1765*	 2025#
INVALI  004736R    003	  326	  327	  328	  329	  342	  349	  357	  367	 1168	 1230	 1366	 1676	 1736#
KISAR6= ****** G      	  596#*	  624#*	  770#*	 1157#*	 1763#*	 1950#
K.ACNT  000114        	   48#
K.ACTL  000112        	   48#
K.DES   000002        	   48#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-2
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

K.DFMT  000006        	   48#
K.DGRP  000010        	   48#
K.DOBJ  000007        	   48#
K.DPL1  000010        	   48#
K.DPL2  000014        	   48#
K.DPR1  000012        	   48#
K.DPR2  000016        	   48#
K.DST   000010        	   48#
K.DUSR  000012        	   48#
K.ENDD  000156        	   48#
K.FMT   000000        	   48#
K.GRP   000002        	   48#
K.LEN   000002        	   48#
K.LN2   000006        	   48#
K.NAM   000004        	   48#
K.NM2   000010        	   48#
K.NODE  000000        	   48#
K.OBJ   000001        	   48#
K.OPDL  000134        	   48#
K.OPTD  000136        	   48#
K.PASL  000100        	   48#
K.PASW  000102        	   48#
K.RQDL  000056        	   48#	  598	  626
K.RQID  000060        	   48#	  634	  640	  785	  800
K.SFMT  000032        	   48#
K.SGRP  000034        	   48#
K.SIZE  000156        	   48#
K.SOBJ  000033        	   48#
K.SPL1  000034        	   48#
K.SPL2  000040        	   48#
K.SPR1  000036        	   48#
K.SPR2  000042        	   48#
K.SRC   000034        	   48#
K.SUSR  000036        	   48#
K.USR   000004        	   48#
MCB$V0= ****** G      	  237#
MCB$V1= ****** G      	  237#
MSGDSP  000122R    002	  324#	  336	 1173
NRMCCP  000110R    002	  255	  300#
NRMDAT  005456R    003	  270	 1966#
NRMDIS  002614R    003	  276	 1065#
NRMFLS  001122R    003	  725#	  885*
NRMMSG  003132R    003	 1156#
NRMRCP  000074R    002	  253	  289#
NRMRWC  001104R    003	  257	  715#
NRMRWT  000732R    003	  670#	  920*	  954*	 1024*	 1030*	 1606*	 1632*	 1802*
NRMTB   000000R    002	  238	  245#	  256	  704*	  746*
NRMTIM  000060R    002	  251	  280#
NRMTM   000776R    003	  284	  691#
NRMXCP  000026R    002	  252	  264#
NSPCON  001260R    003	  292	  768#
NSPDAT  002726R    003	  293	 1119#
NSPDIS  001702R    003	  295	  867#
NSPRT   005466R    003	 1986#
OPEN1   003600R    003	  358	 1384#
OPEN2   003610R    003	  359	 1416#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-3
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

PCBLEN  000020 G      	   49#	  401	  512
PHD$A   000000R       	  237#	  238	  239
PIDID = ****** GX     	  435*	  438*	  441*	  642*
PINSET  000102R    003	  286	  433#
PS.ABO= 000010 G      	   49#
PS.CC = 000002 G      	   49#	  219	  644	  802	  824	  880	 1441	 1599	 1623
PS.CI = 000001 G      	   49#	  219	  821
PS.CTL= 010000 G      	   49#	  783	  802	  939	  998	 1043	 1074
PS.DAT= 020000 G      	   49#	  632	  644	 1437
PS.DIP= 000004 G      	   49#	  219	  901	  912	  923	  943	  951	  974	  987	 1003	 1006	 1012	 1017
			 1027	 1591	 1597
PS.IMP= 000100 G      	   49#
PS.NKP= 000040 G      	   49#
PS.RCN= 000007        	  219#
PS.RQT= 040000 G      	   49#
P.CBTN  000004 G      	   49#
P.LLA   000012 G      	   49#	  805*	 1048	 1146	 1708	 1715	 1813
P.NUM   000014 G      	   49#	  406*	  808	  811	  829	  919	  953	 1023	 1029	 1049	 1052	 1080	 1146
			 1494	 1588	 1715	 1801	 1813
P.OPN   000002 G      	   49#	 1013	 2052	 2053*	 2082
P.PIX   000017 G      	   49#	  807*	 1047	 1143	 1714	 1812
P.REF   000004 G      	   49#	  408*
P.RES   000002 G      	   49#	  407*	  906	  966	  968*	 2048	 2049*	 2057	 2069
P.RSV   000000 G      	   49#
P.SEGS  000016 G      	   49#	  826*	 1133*	 1139*	 1144*	 1145
P.SPI   000015 G      	   49#	  643*	  801*	 1053	 1081
P.STS   000010 G      	   49#	  399	  426*	  632	  644*	  783	  802*	  821*	  824*	  880*	  901*	  912*	  923
			  937	  939	  943	  951*	  974*	  987*	  996	  998	 1003	 1006*	 1012*	 1017*	 1027
			 1043	 1072	 1074	 1437	 1441	 1591	 1597	 1599	 1623
P.USER  000006 G      	   49#	  634	  640*	  785	  800*	  941	 1001	 1077	 1439
RC.ACA= 000052        	  191#
RC.ACC= 000002        	  168#
RC.ANP= 000024        	  169#
RC.CNO= 000043        	  184#
RC.FIN= 000000        	  166#
RC.GND= 000034        	  177#
RC.HNE= 000050        	  189#
RC.IAC= 000025        	  170#
RC.ICT= 000027        	  172#
RC.INT= 000001        	  167#	 1318	 1496	 1639
RC.IRC= 000026        	  171#	 1168	 1230	 1236	 1250	 1252	 1309	 1318	 1324	 1366	 1374	 1384	 1419
			 1421	 1443	 1488	 1496	 1529	 1639	 1676	 1737
RC.IRD= 000033        	  176#	 1252
RC.ISO= 000041        	  182#	 1421
RC.MLN= 000037        	  180#
RC.REJ= 000051        	  190#
RC.RJS= 000045        	  186#	 1443	 1488	 1845
RC.RNA= 000032        	  175#	 1309
RC.RNE= 000031        	  174#	 1250
RC.RNS= 000044        	  185#
RC.RQO= 000030        	  173#	 1236
RC.RSE= 000047        	  188#	 1374
RC.RSI= 000046        	  187#	 1419	 1529
RC.RSO= 000036        	  179#
RC.SHN= 000035        	  178#	 1324
RC.SLN= 000040        	  181#	 1384
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-4
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

RC.SNE= 000042        	  183#
RD.NDI= 000001        	  198#
RD.PNC= 000001        	  196#	 1443
RD.STR= 000002        	  197#	 1488
REMOPN  005646R    003	 1583*	 2081#
REMRES  005614R    003	 2068#
REQUES  001556R    003	  268	  819#
RESERV  003434R    003	  350	 1304#
RF.CCB= 000400 G      	   49#	  677	  694	  696	  706	  727	  741
RF.CVR= 100000 G      	   49#	  697	  708	  726	  748
RF.LIN= 001000 G      	   49#
RM$RWT= 000024        	  256#	  257	  671
RP.DSC= 000007        	  209#	 1602
RP.IRQ= 000005        	  207#
RP.NAK= 000003        	  205#
RP.PWF= 000006        	  208#
RP.RCV= 000001        	  203#
RP.REP= 000002        	  204#
RP.TRM= 000004        	  206#
RQ.ACC= 000051        	  105#	 1855
RQ.ASS= 000052        	  106#
RQ.CAP= 000042        	  102#
RQ.CTL= 000054        	  108#
RQ.MAX= 000013        	  336#	 1165
RQ.MIN= 000041        	  323#	 1163
RQ.RES= 000047        	  103#	 1837
RQ.RID= 000041        	  101#
RQ.SPC= 000050        	  104#
RQ.STS= 000053        	  107#	 1890
RSPNS   004742R    003	 1236	 1250	 1252	 1309	 1318	 1324	 1374	 1384	 1419	 1421	 1443	 1488	 1496
			 1529	 1639	 1738	 1760#
RSPNSM  005212R    003	 1809*	 1837#
RSPNS2  005010R    003	 1768	 1791#
RS.HIH= 000053        	  127#
RS.LOW= 000051        	  126#
R$FLG   000002 G      	   49#	  677*	  694	  696*	  697*	  706	  708*	  726*	  727*	  739	  741*	  748*	  877*
			 1122
R$FLW   000012 G      	   49#	  825	  826	 1144
R$PCB   000014 G      	   49#	  395	  396	  510	  513
R$RWT   000004 G      	   49#	  676	  699	  728	  729	  730*	  732	  733*	 1124
R$TCB   000020 G      	   49#	  551	  554	  567	  568	  607	  608
R$TCQ   000010 G      	   49#
R$TIM   000000 G      	   49#
SDBGT   005420R    003	 1795*	 1946#
SETOPN  005552R    003	 1491*	 2052#
SETRES  005540R    003	 1316*	 2048#
SHARE   003520R    003	  351	 1324#
SPCDSP  000160R    002	  349#	  353	 1279
SPECIF  003224R    003	  331	 1222#
SRVSTP  004226R    003	  305	 1579#
SRVSTR  004012R    003	  304	 1479#
SS.ATS= 000010        	  157#	 1709
SS.ERR= 000003        	  155#
SS.OPR= 000001        	  153#
SS.RES= 000002        	  154#
SS.USA= 000004        	  156#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-5
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

STATSM  005316R    003	 1711*	 1890#
ST.ALT= 000003        	  148#
ST.QRY= 000001        	  146#
ST.REL= 000020        	  161#
ST.REP= 000002        	  147#	 1891
SY.DBL= 000020        	  122#
SY.MAX= 000003        	  353#	 1228
SY.REF= 000003        	  118#
SY.RES= 000001        	  116#
SY.SHR= 000002        	  117#
S$ABO = 000022        	   48#	  829	 1049
S$ACC = 000002        	   48#	  811
S$CNR = 000000        	   48#
S$CON = 000000        	   48#	  789	  808	  811	  825	  829	  878	 1049	 1146	 1715	 1793	 1813	 1990
S$DAT = 000002        	   48#
S$DIS = 000020        	   48#
S$DRQ = 000012        	   48#	  825	 1146
S$DSR = 000006        	   48#
S$GLN = 000024        	   48#
S$INT = 000004        	   48#
S$IRQ = 000016        	   48#
S$MRQ = 000010        	   48#
S$PBOM= 000001        	   48#
S$PEOM= 000004        	   48#	 1715	 1813
S$PMOM= 000002        	   48#
S$PMSG= 000002        	   48#
S$PSEG= 000001        	   48#	  811
S$REJ = 000004        	   48#
S$SND = 000006        	   48#	 1715	 1813
S$SNI = 000014        	   48#
S.EABL= 177755        	   48#
S.EABM= 177770        	   48#
S.EABO= 177767        	   48#
S.EABS= 177771        	   48#
S.EACR= 177736        	   48#
S.ECBE= 177764        	   48#
S.EDBO= 177754        	   48#
S.EERR= 177763        	   48#
S.EIDM= 177762        	   48#
S.EINF= 177766        	   48#
S.EIOF= 177773        	   48#
S.ELNS= 177765        	   48#
S.ELST= 177761        	   48#
S.ELWS= 177760        	   48#
S.EMTL= 177757        	   48#
S.ENOF= 177732        	   48#
S.ENRO= 177732        	   48#
S.ENSL= 177756        	   48#
S.ENUR= 177731        	   48#
S.EOTB= 177772        	   48#
S.ERBO= 177754        	   48#	  787
S.ERES= 177777        	   48#	  775	  798
S.ERNS= 177775        	   48#
S.ETMI= 177753        	   48#
S.EUNN= 177776        	   48#
S.EURO= 177774        	   48#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-6
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

S.SEOM= 000002        	   48#
S.SSUC= 000001        	   48#	  822
TCBLEN  000032 G      	   49#	  553	  571	  611
TF.DEA= 040000 G      	   49#	  222
TF.DIS= 020000 G      	   49#	  222
TF.RAL= 060000        	  222#	 1305
TS.CLP= 000001 G      	   49#	  220	  915	 1020	 1544	 1581
TS.HP = 000040 G      	   49#	  221	  969
TS.OCP= 000007        	  220#	  221	  910
TS.OP = 000004 G      	   49#	  220	 1492	 1527	 1543
TS.OPP= 000002 G      	   49#	  220	  913	 1018	 1446	 1482
TS.OSP= 000400 G      	   49#	 1593	 1611	 1621	 1625	 1630
TS.PWF= 002000 G      	   49#
TS.RLP= 000010 G      	   49#	  221	  969	 1593	 1611	 1619
TS.ROP= 000057        	  221#	 1417
TS.RS = 000020 G      	   49#	  969	 1307	 1315
TS.SRP= 000200 G      	   49#	  969
TS.STE= 001000 G      	   49#	 1593	 1611	 1614	 1616
TT.CD = 000011 G      	   49#	  454
TT.CR = 000010 G      	   49#	  452
TT.LE = 000006 G      	   49#	  448
TT.LP = 000007 G      	   49#	  450
T.FLG   000014 G      	   49#	 1305
T.LNK   000000 G      	   49#
T.NAM   000023 G      	   49#	 1255	 1269
T.NAML  000022 G      	   49#	 1254	 1255
T.NUM   000016 G      	   49#	 1493
T.OBJ   000021 G      	   49#	  462*	  469*	 1254	 1257
T.OLNK  000002 G      	   49#	 1013	 1015	 2052*	 2082	 2084	 2086	 2090*
T.PCBD  000006 G      	   49#	 1445*	 1490	 1582	 1596	 1610
T.PCBR  000004 G      	   49#	 1314*	 1481	 1587
T.PRI   000020 G      	   49#	  455*	  460*	  467*	  569	  609	 1449	 1546
T.RID   000010 G      	   49#	 1313*	 1601	 1626	 2059
T.SPI   000017 G      	   49#	  447*	 1448	 1545	 1585
T.STS   000012 G      	   49#	  910	  913	  915	  969*	 1018	 1020	 1307	 1315*	 1417	 1446*	 1482*	 1492*
			 1527	 1543*	 1544*	 1581*	 1593*	 1611*	 1614	 1616*	 1619	 1621	 1625*	 1630*	 1896
			 1897
T.TT    000014 G      	   49#	  448	  450	  452	  454
UNSUPP  004736R    003	  324	  325	  330	  334	  335	  343	  344	  352	  361	  368	  369	  370	 1735#
$CBBGT= ****** GX     	 1927*
$CBBRT= ****** GX     	 1968
$CCBGT= ****** GX     	  772*	  869*	  946*	 1127*	 1135*
$CCBRT= ****** GX     	  272	  792*	  925	 1007	 1086	 1138*	 1617	 1987*
$CMQIF= ****** GX     	  680
$CMQIN= ****** GX     	  679	  742*
$CMQRM= ****** GX     	  700*	  737*
$CORGT= ****** GX     	 1948*
$DSPCR= ****** G      	  246#	  247#	  248#	  249#	  250#	  254#	  267#	  269#	  271#	  273#	  274#	  275#	  277#
			  283#	  285#	  294#	  303#
$LTMEN= ****** GX     	  433*
$PCBCL  000310RG   003	  481#
$PCBDB  000370RG   003	  521#
$PCBGT  000000RG   003	  393#	  638*	  797*
$PCBOP  000604RG   003	  622#
$PCBPT  000330RG   003	  483*	  506#	  523*	  630*	  715*	  781*	  820*	  876*	  935*	  994*	 1065*	 1070*	 1120*
			 1432*	 1762*
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 35-7
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- USER SYMBOLS

$PCBRT  000074RG   003	  426#	  485*	 1067*
$SCHED= ****** GX     	  789*	  808*	  811*	  825*	  829*	  878*	 1049*	 1055	 1083	 1146*	 1452	 1549*	 1715*
			 1793*	 1813*	 1990*
$TCBDB  000452RG   003	  565#
$TCBPT  000410RG   003	  445*	  547#	 1248*
$TCBTT  000536RG   003	  604#	 1480*	 1580*
$$DAT = 000000        	   49#
$$LVL = 000000        	   49#
$$L0  = 000024        	   49#
$$TABG= 000114R    002	  245#	  246	  247	  248	  249	  250	  251	  252	  253	  254	  255	  257	  266#
			  282#	  291#	  302#	  304	  305
.     = 005710R    003	   47#	   48#	   49#	  238#	  239#	  245	  246	  247	  248	  249	  250	  251	  252
			  253	  254	  255	  256	  257	  266	  282	  291	  302	  304	  305	  336	  345
			  353	  362	  371	 1738	 1768
.CRDAT= ****** GX     	  394	  472	  507	  548	  566	  606	  674	  692	  705	  725	  735
.CRPIX= ****** GX     	  801
.DSPCR= ****** G      	  238#
...ULA= 000000        	  715#	  820#	  876#	 1065#	 1120#	 1762#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 36
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- MACRO NAMES

CALLR	  679	  680
CCBDF$	   43#	   47
CHR$B	   49#
CHR$W	   49#
COR$D	   49#
CSR$W	   49#
CTL$B	   49#
CTL$W	   49#
DAT$	   43#	   49
DAT$DF	   49#
DSP$	  245#	  246	  247	  248	  249	  250	  251	  252	  253	  254	  255	  257	  266#	  267	  268
	  269	  270	  271	  272	  273	  274	  275	  276	  277	  282#	  283	  284	  285	  286	  291#
	  292	  293	  294	  295	  302#	  303	  304	  305
DSP$B	   43#	  245	  266	  282	  291	  302
DSP$E	  245#	  258	  266#	  278	  282#	  287	  291#	  296	  302#	  306
DSR$W	   49#
END$	   49#
GTPCB$	   58#	  715	  820	  876	 1065	 1120	 1762
GTTCB$	   67#	 1480	 1580
GTULA$	  715	  820	  876	 1065	 1120	 1762
LIX$B	   49#
LIX$W	   49#
LST$D	   49#
MAP$	   44#	  596	  624	  770	 1157	 1763
NABO$	   45#	  829	 1049
NACC$	   45#	  811
NCRA$	   45#	  789	  808
NDAK$	   45#	  878
NDAT$	   46#	 1715	 1813
NDIS$	   45#
NDRQ$	   46#	  825	 1146
NIRQ$	   46#
NREJ$	   45#
NRMDF$	   49
NRTI$	   46#
NRTN$	   46#	 1793	 1990
PHD$B	   43#	  237
PHD$D	  237#	  238
PHD$E	  237#	  239
PHD$I	  237#
PHD$S	  237#
POP$S	   44#	  411	  516	  558	  614	  952	  973	 1178	 1434	 1717	 1767	 1928	 1952	 2078	 2091
PUSH$S	   44#	  393	  506	  547	  605	  931	 1175	 1431	 1704	 1760	 1925	 1946	 2068	 2081
RESMAP	   44#
RESPON	   77#	 1168	 1230	 1236	 1250	 1252	 1309	 1318	 1324	 1366	 1374	 1384	 1419	 1421	 1443
	 1488	 1496	 1529	 1639	 1676
RETURN	  412	  427	  476	  486	  517	  527	  559	  576	  600	  615	  637	  646	  709	  750	  793
	  812	  827	  830	 1050	 1551	 1718	 1814	 1853	 1862	 1865	 1905	 1929	 1953	 1991	 2023
	 2030	 2050	 2054	 2064	 2079	 2092
SAVMAP	   44#
SCDF$	   43#	   48
SMAP$	 1950
STA$B	   49#
STA$W	   49#
SYN$X	   49#
TMB$X	   49#
NRM - NODE RESOURCE MANAGER	DNMAC X24.07-563  04-JAN-83  16:28  PAGE 36-1
NRM.M11    30-DEC-82 04:00		CROSS REFERENCE TABLE -- MACRO NAMES

TRB$B	   49#
TRB$W	   49#
UNT$B	   49#
UNT$W	   49#
VFY$	   49#
$$BUF	  811#	  829#	 1049#	 1715#	 1813#
$$DEF	  715#	  789#	  808#	  811#	  820#	  825#	  829#	  876#	  878#	 1049#	 1065#	 1120#	 1146#	 1715#	 1762#
	 1793#	 1813#	 1990#
$$MOV	  789#	  808#	  811#	  829#	 1049#	 1715#	 1813#
$$MOVB	  789#	  808#	  811#	  825#	  829#	 1049#	 1146#	 1715#	 1793#	 1813#	 1990#
$$QUE	  789	  808	  811#	  825#	  829#	  878#	 1049#	 1146#	 1715#	 1793#	 1813#	 1990#


. ABS.  000156     000	   OVR   RW    REL   GBL   I  
        000040     001	   CON   RW    REL   LCL   I  
$PLIT$  000212     002	   CON   RW    REL   LCL   D  
$CODE$  005710     003	   CON   RW    REL   LCL   I  


 ERRORS DETECTED:  0
 DEFAULT GLOBALS GENERATED:  13

 NRM,NRM/CRF=MCB:MCBLIB.M11/PA:1,MCB:SCLIB.M11/PA:1,DSK:URDLIB.M11/PA:1,DSK:NRMLIB.M11/PA:1,DSK:NRM.M11
 RUN-TIME: 6 5 .9 SECONDS
 RUN-TIME RATIO: 76/13=5.8
 CORE USED:  14K  (27 PAGES)