Google
 

Trailing-Edge - PDP-10 Archives - BB-H348C-RM_1982 - swskit-v21/listings/mcb/nrm.list
There are no other files named nrm.list in the archive.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48
TABLE OF CONTENTS

     6-  121	ATS RESOURCE MANAGER SYMBOL DEFINITIONS
     8-  314	RESOURCE MESSAGE DISPATCH TABLES
     9-  409	CCB DISPATCHER/RESOURCE MANAGER SCHEDULER
    11-  524	DLXSTR	- SET A LINE AS ACTIVE
    11-  543	DLXSTP	- MAKE A LINE INACTIVE
    12-  597	NRMLIN	- NRM RESOURCE LINE CONTROL
    13-  654	NSPCON	- CONNECT PROCESSOR
    14-  747	NSPDIS	- DISCONNECT NSP CONTROL PIPE
    14-  748	SRVDIS	- DISCONNECT SERVER DATA PIPE
    17-  976	NRMDIS	- PIPE DISCONNECTED
    18-  988	NSPDAT	- RESOURCE MESSAGE DISPATCHER
    19- 1067	REQEST	-  <REQUESTOR ID> PROCESSOR
    20- 1131	RESPON	-  <RESPONSE> PROCESSOR
    21- 1194	SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR
    22- 1296	RESERVE	-   <SPECIFY-RESERVE> PROCESSOR
    23- 1338	REFER	-   <SPECIFY-REFER> REQUEST PROCESSOR
    24- 1380	ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR
    25- 1437	OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR
    26- 1519	SRVGOT	-	PARAMETERS RECIEVED FROM GENERIC SERVER
    27- 1559	SRVSTR	-	START COMPLETE PROCESSOR
    28- 1601	CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR
    29- 1661	SRVSTP	-	STOP COMPLETE PROCESSOR
    30- 1751	RELEASE	-   <ACCESS-RELEASE> MESSAGE PROCESSOR
    31- 1825	ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR
    33- 1957	STATUS	-  <STATUS> MESSAGE PRE-PROCESSOR
    34- 2033	QUERY	-   <STATUS-QUERY> MESSAGE DISPATCHER
    35- 2063	QRYATS	-    <STATUS-REPORT-ATS TERMINAL> MESSAGE GENERATOR
    36- 2112	ASYREP	- ASYNCHRONOUS STATUS REPORT
    37- 2154	INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR
    38- 2172	RSPNS	- RESPONSE MESSAGE GENERATOR
    41- 2320	RSPNSM	- GENERATE A <RESPONSE> MESSAGE
    42- 2369	SPCFYM	- GENERATE A <SPECIFY> MESSAGE
    43- 2402	STATSM	- GENERATE A <STATUS> MESSAGE
    44- 2438	NSPINT	- EXTRANEOUS INTERRUPT MESSAGE
    45- 2462	NSPXOF	- BACK-PRESSURE A LINE
    45- 2479	NSPXON	- ENABLE BACK-PRESSURED LINE
    46- 2499	CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS
    46- 2520	SDBGT	- GET A SDB AND INSERT IN CCB
    46- 2545	NRMDAT	- RETURN A NRM DATA BUFFER
    47- 2563	SRVERR	- ERROR PROCESSOR
    48- 2612	NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER
    49- 2642	GET*	- GET DATA FROM NRM MESSAGE
    49- 2669	GIVLIN	- GIVE A LINE TO A SERVER
    49- 2690	GETLIN	- REGAIN A LINE FROM A SERVER
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 3


      1						.TITLE	NRM - NODE RESOURCE MANAGER
      2						.IDENT	/006230/
      3						.LIST	MEB
      4
      5					;
      6					; COPYRIGHT (C) 1976,1977,1978
      7					; DIGITAL EQUIPMENT CORPORATION, MAYNARD, MASS.
      8					;
      9					;
     10					; THIS SOFTWARE IS FURNISHED  UNDER A LICENSE  FOR USE ONLY ON  A
     11					; SINGLE  COMPUTER  SYSTEM  AND  MAY  BE  COPIED  ONLY  WITH  THE
     12					; INCLUSION OF THE ABOVE COPYRIGHT NOTICE.  THIS SOFTWARE, OR ANY
     13					; OTHER COPIES THEREOF,  MAY NOT BE PROVIDED  OR  OTHERWISE  MADE
     14					; AVAILABLE TO ANY OTHER PERSON EXCEPT FOR USE ON SUCH SYSTEM AND
     15					; TO  ONE  WHO  AGREES  TO  THESE  LICENSE  TERMS.  TITLE TO  AND
     16					; OWNERSHIP OF THE SOFTWARE SHALL AT ALL TIMES REMAIN IN DEC.
     17					;
     18					; THE INFORMATION IN  THIS SOFTWARE IS  SUBJECT TO CHANGE WITHOUT
     19					; NOTICE AND SHOULD NOT  BE CONSTRUED AS  A COMMITMENT BY DIGITAL
     20					; EQUIPMENT CORPORATION.
     21					;
     22					; DEC ASSUMES  NO  RESPONSIBILITY  FOR  THE  USE  OR  RELIABILITY
     23					; OF ITS  SOFTWARE  ON  EQUIPMENT  WHICH IS NOT  SUPPLIED BY DEC.
     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					;
     38					; MACRO LIBRARY CALLS
     39					;
     40						.MCALL	HWDDF$,CCBDF$,PDVDF$,SLTDF$,NSPDF$,TTDF$,RMDDB$,RMDF$
     41						.MCALL	$QLLC,$QDLC,MAP,SAVMAP,RESMAP
     42	000000					HWDDF$			; DEFINE HARDWARE OFFSETS
     43	000000					CCBDF$			; DEFINE CCB OFFSETS
     44	000000					PDVDF$			; DEFINE PDV SYMBOLS
     45	000000					SLTDF$			; DEFINE SLT SYMBOLS
     46	000000					NSPDF$			; DEFINE NSP OFFSETS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 4


     48						.LIST	ME
     49
     50	000000					RMDDB$	<:>,<=>		; DEFINE NRM DATA BASE OFFSETS
						.MCALL	TMPDF$
	000000					TMPDF$
						.MCALL	.BIN,.CNB,.CNW,.CORE,.CSR,.DVCHA,.INT,.INT1,.INT2,.INT3
						.MCALL	.LIBR,.LINKS,.LFLHD,.LSTHD,.LTAB,.MPLHD,.POOL,.PRI,.SCOM
						.MCALL	.SECSR,.SLNB,.SLNW,.STNB,.STNW,.UNB,.UNW,.VFY
					;+
					; THE RESOURCE MANAGER DATA BASE DESCRIPTION
					;-
	000014					.ASECT
		000000 			.=0
	000000				R$FLG::	.BLKW	1		; CONTROL FLAGS:
		100000 			 RF.CVR	==	100000		;  RESOURCE RECOVERY IN PROGRESS.
		001000 			 RF.LIN	==	001000		;  RESOURCE LINE SERVICE PENDING.
		000400 			 RF.CCB	==	000400		;  CCB PENDING.
					 ;		000377		;  PIPE BEING FLUSHED.
	000002				R$RWT::	.LSTHD			; RESOURCE WAIT QUEUE.
						.EVEN
	000002					.BLKW	2
	000006				R$TCQ::	.BLKW	1		; RESOURCE LINE SERVICE QUEUE.
	000010				R$PCB::	.BLKW	1		; NUMBER OF PCBS FOLLOWED BY
	000012					.POOL			; THE POINTER TO THE PCB TABLE.
						.EVEN
	000012					.BLKW	1
	000014				R$TCB::	.BLKW	1		; NUMBER OF TCBS FOLLOWED BY
	000016					.BLKW	0		; THE TCB TABLE.
	000000					.PSECT
     51
     52	000000					TTDF$	<:>,<=>		; DEFINE ATS OFFSETS
	000016					.ASECT
					;+
					;		    PIPE CONTROL BLOCK (PCB)
					;
					;		+----------------------------------+	000
					;		!		P.RSV		   !
					;		+----------------------------------+	002
					;		!	    P.RES / P.OPN	   !
					;		+----------------------------------+	004
					;		!	    P.REF / P.CBTN	   !
					;		+----------------------------------+	006
					;		!		P.USER		   !
					;		+----------------------------------+	010
					;		!		P.STS		   !
					;		+----------------------------------+	012
					;		!				   !
					;		+		P.BPQ		   +
					;		!				   !
					;		+----------------------------------+	016
					;		!		  !	P.LLA	   !
					;		+----------------------------------+	020
					;		!	P.SPI	  !	P.NUM	   !
					;		+----------------------------------+	022
					;		!		P.SEG		   !
					;		+----------------------------------+	024
					;-
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 4-1



					;  PCB OFFSET DEFINITIONS

		000000 			.=0
	000000				P.RSV::	.BLKW	1		; RESERVED WORD
	000002				P.RES::				; * POINTER TO RESERVED TERMINAL LIST
	000002				P.OPN::	.BLKW	1		; ** POINTER TO OPEN TERMINAL LIST
	000004				P.REF::				; * POINTER TO REFERED CONTROL TERMINAL LIST
	000004				P.CBTN::	.BLKW	1		; ** CURRENT BTN FOR MULTI-SEGMENT MSSAGES
	000006				P.USER::	.BLKW	1		; USER IDENTIFICATION NUMBER
	000010				P.STS::	.BLKW	1		; PIPE STATUS:
		000001 			 PS.CI	==	000001		;  CONNECT INITIATED
		000002 			 PS.CC	==	000002		;  CONNECT COMPLETED
		000004 			 PS.DIP	==	000004		;  DISCONNECT INITIATE PENDING
		000010 			 PS.ABO	==	000010		;  ABORT PENDING
		000020 			 PS.BP	==	000020		;  LINK IS BACK-PRESSURED
		000040 			 PS.NKP	==	000040		;  NAK PENDING
		000100 			 PS.IMP	==	000100		;  INTERRUPT MESSAGE PENDING
		010000 			 PS.CTL	==	010000		;  * PIPE IS CONTROL PIPE
		020000 			 PS.DAT	==	020000		;  ** PIPE IS DATA PIPE
	000012				P.BPQ::	.BLKW	2		; BACK-PRESSURE QUEUE
	000016				P.LLA::	.BLKB	1		; LOGICAL LINK ADDRESS OF PIPE
	000017					.BLKB	1		; (RESERVED)
	000020				P.NUM::	.BLKB	1		; PIPE NUMBER
	000021				P.SPI::	.BLKB	1		; PDV INDEX OF PIPE OWNER
	000022				P.SEG::	.BLKW	1		; LINK SEGMENT SIZE
		000024 			PCBLEN == .			; LENGTH OF PCB
					; NOTE::
					; *  - CONTROL PIPE ONLY
					; ** - DATA PIPE ONLY

					;+
					;
					;		  TERMINAL CONTROL BLOCK (TCB)
					;
					;		+--------------------------------+	000
					;		!		T.LNK		 !
					;		+--------------------------------+	002
					;		!		T.OLNK		 !
					;		+--------------------------------+	004
					;		!		T.PCBR		 !
					;		+--------------------------------+	006
					;		!		T.PCBD		 !
					;		+--------------------------------+	010
					;		!		T.RID		 !
					;		+--------------------------------+	012
					;		!		T.STS		 !
					;		+--------------------------------+	014
					;		!	T.FLG	 !	T.TT	 !
					;		+--------------------------------+	016
					;		!	T.SPI	 !	T.NUM	 !
					;		+--------------------------------+	020
					;		!	T.NAML	 !	T.OBJ	 !
					;		+--------------------------------+	022
					;		!				 !
					;		=		T.NAM		 =
					;		!				 !
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 4-2


					;		+--------------------------------+	030
					;		!		T.WCNT		 !
					;		+--------------------------------+	032
					;		!		T.RCNT		 !
					;		+--------------------------------+	034
					;		!		T.DMRB		 !
					;		+--------------------------------+	036
					;		!		T.DMVA		 !
					;		+--------------------------------+	040
					;
					;-

					;
					;  TCB OFFSET DEFINITIONS
					;
		000000 			.=0
	000000				T.LNK::	.BLKW	1		; LINK TO NEXT RESERVED TERMINAL
	000002				T.OLNK::	.BLKW	1		; LINK TO NEXT OPENED TERMINAL
	000004				T.PCBR::	.BLKW	1		; LINK TO RESERVER'S CONTROL/DATA PCB
	000006				T.PCBD::	.BLKW	1		; LINK TO DATA PCB/HANDOFFEE'S CONTROL PCB
	000010				T.RID::	.BLKW	1		; REQUESTOR ID FOR RESERVER
	000012				T.STS::	.BLKW	1		; TERMINAL STATUS:
		000001 			 TS.CLP	==	000001		;  CLOSE PENDING
		000002 			 TS.OPP	==	000002		;  OPEN PENDING
		000004 			 TS.OP	==	000004		;  OPEN TERMINAL
		000010 			 TS.RLP	==	000010		;  RELEASE PENDING
		000020 			 TS.RS	==	000020		;  RESERVED
		000040 			 TS.HP	==	000040		;  HANDOFF PENDING
		000200 			 TS.SRP	==	000200		;  STATUS REPORT PENDING
		000400 			 TS.OSP	==	000400		;  OPERATIONAL STATUS PENDING
		001000 			 TS.STE	==	001000		;  START ERROR PENDING
		002000 			 TS.PWF	==	002000		;  POWERFAIL PROCESSING PENDING
	000014				T.TT::	.BLKB	0		; RESOURCE TYPE:
		000001 			 TT.V62	==	  1.		;  VT62 TERMINAL
		000002 			 TT.V52	==	  2.		;  VT52 TERMINAL
		000003 			 TT.L36	==	  3.		;  LA36 TERMINAL
		000004 			 TT.L18	==	  4.		;  LA180 PRINTER
		000005 			 TT.DDC	==	  5.		;  DDCMP LINE
		000006 			 TT.LE	==	  6.		;  LP11 LINE PRINTER
		000007 			 TT.LP	==	  7.		;  LP20 LINE PRINTER
		000010 			 TT.CR	==	  8.		;  CR11 CARD READER
		000011 			 TT.CD	==	  9.		;  CD20 CARD READER
	000014				T.FLG::	.BLKW	1		; CONTROL FLAGS:
		040000 			 TF.DEA	==	040000		;  RESOURCE DEASSIGNED
		020000 			 TF.DIS	==	020000		;  LINE DISABLED
					;		000377		; (RESOURCE TYPE)
	000016				T.NUM::	.BLKB	1		; TERMINAL NUMBER
	000017				T.SPI::	.BLKB	1		; SERVER PROCESS INDEX
	000020				T.OBJ::	.BLKB	1		; RESOURCE OBJECT TYPE
	000021				T.NAML::	.BLKB	1		; TERMINAL NAME LENGTH
	000022				T.NAM::	.BLKB	6		; TERMINAL NAME (ASCII)
	000030				T.WCNT::	.BLKW	1		; WRITE COUNT
	000032				T.RCNT::	.BLKW	1		; READ COUNT
	000034				T.DMRB::	.BLKW	1		; RELOCATION BIAS OF DIALOG MANAGER BUFFER
	000036				T.DMVA::	.BLKW	1		; VIRTUAL ADDRESS OF DIALOG MANAGER BUFFER
		000040 			TCBLEN	== .			; LENGTH OF TCB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 4-3



	000000					.PSECT
     53
     54						.NLIST	ME
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 5


     56					;
     57					; LOCAL MACROS
     58					;
     59					;  FALLR - MAKE SURE SPECIFIED ROUTINE IMMEDIATELY FOLLOWS THIS
     60					;
     61
     62						.MACRO	FALLR	ADR
     63						.IF NE	<ADR-.>
     64						.ERROR	ADR;ROUTINE ''ADR'' DOES NOT FOLLOW THIS MODULE
     65						.ENDC
     66						.ENDM	FALLR
     67
     68					;
     69					;  STANDARD STACK MANIPULATION MACROS
     70					;
     71
     72						.MACRO	PUSH LIST
     73						.IRP	ITEM,<LIST>
     74						MOV	'ITEM',-(SP)
     75						.ENDR
     76						.ENDM	PUSH
     77
     78						.MACRO	POP LIST
     79						.IRP	ITEM,<LIST>
     80						MOV	(SP)+,'ITEM'
     81						.ENDR
     82						.ENDM	POP
     83
     84					;
     85					;  GTPCB$ - GET THE ASSOCIATED PCB IN R3
     86					;
     87
     88						.MACRO	GTPCB$
     89						GTULA$	R0
     90						CALL	$PCBPT
     91						.ENDM	GTPCB$
     92
     93					;
     94					;  GTTCB$ - GET THE ASSOCIATED TCB IN R5
     95					;
     96
     97						.MACRO	GTTCB$
     98						CLR	R0
     99						BISB	C.LIN(R4),R0
    100						CALL	$TCBPT
    101						.ENDM	GTTCB$
    102
    103					;
    104					;  RESPOND - SEND A RESPONSE TO THE CURRENT RESOURCE MESSAGE
    105					;
    106
    107						.MACRO	RESPOND	CODE,SUB
    108						.IF EQ	<'CODE'-RC.IRC>	; ILLEGAL REQUEST CODE
    109						JMP	INVALID
    110						.IFF
    111						.IF	NB,<CODE>	; RESPONSE CODE
    112						MOV	#'CODE',R0
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 5-1


    113						.ENDC
    114						.IF	NB,<SUB>	; OPTIONAL DATA
    115						MOV	#'SUB',R5
    116						.ENDC
    117						JMP	RSPNS
    118						.ENDC
    119						.ENDM	RESPOND
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 6
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    121						.SBTTL	ATS RESOURCE MANAGER SYMBOL DEFINITIONS
    122					;+
    123					; THESE SYMBOL DEFINITIONS ARE LOCAL TO THE ATS RESOURCE MANAGER.
    124					; THE SYMBOLS WHICH ARE USED BY ALL THE ATS COMPONENTS (RESOURCE
    125					; MANAGER AND DIALOGUE MANAGERS) ARE DEFINED IN THE MACRO TTDF$
    126					; IN THE LIBRARY CELIB.MLB.
    127					;-
    128
    129					; REQUEST CODES (SET IN 1ST BYTE OF RESOURCE MESSAGE)
    130
    131		000041 			RQ.RID=		041		; REQUESTOR ID
    132		000042 			RQ.CAP=		042		; CAPABILITIES
    133		000047 			RQ.RES=		047		; RESPONSE
    134		000050 			RQ.SPC=		050		; SPECIFY
    135		000051 			RQ.ACC=		051		; ACCESS
    136		000052 			RQ.ASS=		052		; ASSIGN
    137		000053 			RQ.STS=		053		; STATUS
    138		000054 			RQ.CTL=		054		; CONTROL
    139
    140
    141
    142					; REQUEST TYPE CODES (SET IN 2ND BYTE OF RESOURCE MESSAGE)
    143
    144					; <SPECIFY> MESSAGE TYPES
    145
    146		000001 			SY.RES=		001		; RESERVE
    147		000002 			SY.SHR=		002		; SHARE
    148		000003 			SY.REF=		003		; REFER
    149
    150					; <SPECIFY> MESSAGE FLAGS
    151
    152		000020 			SY.DBL=		020		; DOUBLE (CONCATENATED) MESSAGE FLAG
    153
    154					; RANGE LIMITS FOR REQUEST CODE OF SECOND (CONCATENATED) MESSAGE
    155
    156		000051 			RS.LOW=		051		; LOW LIMIT FOR REQUEST CODE
    157		000053 			RS.HIH=		053		; HIGH LIMIT FOR REQUEST CODE
    158
    159					; <ACCESS> MESSAGE TYPES
    160
    161		000001 			AC.SIN=		001		; OPEN SINGLE LOGICAL LINK
    162		000002 			AC.SEP=		002		; OPEN SEPARATE DATA LINK
    163		000003 			AC.CLO=		003		; CLOSE
    164		000004 			AC.REL=		004		; RELEASE
    165
    166
    167					; <ASSIGN> MESSAGE TYPES
    168
    169		000001 			AS.ASS=		001		; ASSIGN
    170		000002 			AS.RES=		002		; RECLAIM
    171		000003 			AS.HAN=		003		; HANDOFF
    172
    173
    174					; <STATUS> MESSAGE TYPES
    175
    176		000001 			ST.QRY=		001		; QUERY
    177		000002 			ST.REP=		002		; STATUS-REPORT
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 6-1
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    178		000003 			ST.ALT=		003		; STATUS-ALTER
    179
    180
    181					; <STATUS> MESSAGE SUB-TYPES
    182
    183		000001 			SS.OPR=		001		; OPERATIONAL STATUS
    184		000002 			SS.RES=		002		; RESOURCE CONTROL
    185		000003 			SS.ERR=		003		; ERROR STATISTICS
    186		000004 			SS.USA=		004		; USAGE ACCOUNTING
    187		000010 			SS.ATS=		010		; ATS TERMINAL STATUS
    188
    189					; <STATUS> MESSAGE FLAGS
    190
    191		000020 			ST.REL=		020		; AUTOMATIC STATUS-RELEASE FLAG
    192
    193						.LIST	ME
    194	000000					RMDF$	<:>,<=>

					;+
					; THIS MACRO DEFINES THE SYMBOLS WHICH THE RESOURCE MANAGER USES
					; TO GENERATE RETURN CODES TO THE USER PROGRAM.
					;-


					; <RESPONSE> CODE DEFINITIONS

		000000 			RC.FIN==		0.		; FINAL RESPONSE, NO ERROR
		000001 			RC.INT==		1.		; INTERMEDIATE RESPONSE
		000002 			RC.ACC==		2.		; HANDOFEE ACCEPTS RESOURCE
		000024 			RC.ANP==		20.		; ACCESS NOT PERMITTED
		000025 			RC.IAC==		21.		; INVALID ACCOUNTING INFORMATION
		000026 			RC.IRC==		22.		; INVALID OR UNSUPPORTED REQUEST TYPE
		000027 			RC.ICT==		23.		; INVALID REQUEST CONCATENATION
		000030 			RC.RQO==		24.		; CONTROL ID ALREADY IN USE
		000031 			RC.RNE==		25.		; SPECIFIED RESOURCE DOES NOT EXIST
		000032 			RC.RNA==		26.		; REQUESTED RESOURCE NOT AVAILABLE
		000033 			RC.IRD==		27.		; INVALID RESOURCE DESCRIPTOR FORMAT
		000034 			RC.GND==		28.		; GENERIC DESCRIPTOR NOT SUPPORTED
		000035 			RC.SHN==		29.		; SHARED ACCESS NOT SUPPORTED
		000036 			RC.RSO==		30.		; TOO MANY USERS OF THE RESOURCE
		000037 			RC.MLN==		31.		; MULTI-LINK USAGE NOT SUPPORTED
		000040 			RC.SLN==		32.		; SINGLE-LINK USAGE NOT SUPPORTED
		000041 			RC.ISO==		33.		; INVALID SERVOR OPTION FIELD
		000042 			RC.SNE==		34.		; SPECIFIED SERVOR DOES NOT EXIST
		000043 			RC.CNO==		35.		; TOO MANY CONNECTIONS TO SERVOR
		000044 			RC.RNS==		36.		; RESOURCE NOT SUPPORTED BY SERVOR
		000045 			RC.RJS==		37.		; REQUEST REJECTED BY SERVOR
		000046 			RC.RSI==		38.		; RESOURCE OR SERVOR STATE INCONSISTENCY
		000047 			RC.RSE==		39.		; REQUEST MESSAGE SEQUENCE ERROR
		000050 			RC.HNE==		40.		; HANDOFEE DOES NOT EXIST
		000051 			RC.REJ==		41.		; HANDOFEE REJECTS RESOURCE
		000052 			RC.ACA==		42.		; ACCEPTANCE OF HANDOFF ABORTED


					; <RESPONSE> MESSAGE DATA

		000001 			RD.PNC==		1.		; DATA PIPE NOT CONNECTED
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 6-2
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

		000002 			RD.STR==		2.		; START THRESHOLD ERROR
		000001 			RD.NDI==		1.		; REQUESTED RESOURCE NOT ONLINE


					; <STATUS-REPORT> MESSAGE DATA

		000001 			RP.RCV==		1.		; RECEIVE ERROR THRESHOLD ERROR
		000002 			RP.REP==		2.		; REPLY THRESHOLD ERROR
		000003 			RP.NAK==		3.		; NAK THRESHOLD ERROR
		000004 			RP.TRM==		4.		; HARD TERMINAL ERROR
		000005 			RP.IRQ==		5.		; INTERVENTION REQUIRED AT TERMINAL
		000006 			RP.PWF==		6.		; POWERFAIL
		000007 			RP.DSC==		7.		; DATA PIPE DISCONNECTED


	000000					.PSECT
    195						.NLIST	ME
    196
    197					;+
    198					; REFERRAL CCB OFFSETS
    199					;-
    200
    201					;SACRED	==C.LNK			;*REFERRAL LIST LINK
    202		000004 			R.CID	==C.NSP			;*CONTROL ID
    203		000012 			R.STS	==C.STS			; REFERRAL STATUS:
    204		100000 			 RS.RQ	==	100000		;  REFERRAL ESTABLISHED BY <REQUESTOR ID>
    205
    206		000016 			R.TCB	==C.BUF+2		; TCB POINTER
    207		000032 			R.NSP	==C.FLG2		; POINTER TO HANDOFF-ER'S WORKING CCB
    208
    209					;+
    210					; WORKING CCB OFFSET DEFINITIONS
    211					;-
    212
    213		000004 			W.CID	==C.NSP			;*CONTROL ID
    214		000032 			W.NSP	==C.FLG2		;*POINTER TO ASSOCIATED NSP CCB-RDB
    215
    216					; ADDITIONAL WORDS USED DURING A RESOURCE WAIT
    217
    218					;SACRED	==C.LNK			;*CCB LINK
    219		000006 			W.LIN	==C.LIN			;*PIPE NUMBER
    220					;SACRED	==C.STS			;*USED DURING CCB QUEUEING
    221		000010 			W.FNC	==C.FNC			;*RESOURCE WAIT FUNCTION / MODIFIER
    222		000030 			W.ADR	==C.CNT2		; RESTART ADDRESS
    223		000014 			W.TMP	==C.BUF			; TEMPORARY STORAGE (2 WORDS)
    224
    225					;*THESE DEFINITIONS MUST *NOT* BE CHANGED !!!
    226
    227					;
    228					; BIT MASKS
    229					;
    230
    231		000007 			PS.RCN	= PS.CI!PS.CC!PS.DIP		; PIPE READY FOR CONNECT
    232		000007 			TS.OCP	= TS.CLP!TS.OPP!TS.OP		; TERMINAL OPEN OR CLOE PENDING
    233		000057 			TS.ROP	= TS.OCP!TS.RLP!TS.HP		; TERMINAL READY FOR OPEN
    234		000257 			TS.RHF	= TS.ROP!TS.SRP			; TEMRINAL READY FOR HANDOFF
    235		000053 			TS.RRL	= TS.CLP!TS.OPP!TS.RLP!TS.HP	; TERMINAL READY FOR RELEASE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 6-3
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    236		060000 			TF.RAL	= TF.DEA!TF.DIS			; TERMINAL READY FOR ALLOCATION
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 7
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    238					;+
    239					; INTERNAL DATA BASE FOR PROCESS
    240					;-
    241
    242	000000	000000 			.NRMDB::.WORD	0		; NRM DATA BASE ADDRESS.
    243
    244					;+
    245					; THESE DISPATCH TABLES ARE USED BY THE CCB DISPATCHER TO PASS CONTROL
    246					; TO THE APPROPRIATE ROUTINE IN THE RESOURCE MANAGER BASED ON THE FUNCTION
    247					; AND SUBFUNCTION PASSED IN THE CCB.
    248					;-
    249
    250					; FUNCTION DISPATCH TABLE
    251
    252	000002				$NRMTB::			;DISPATCH TABLE ADDRESS
    253	000002	000003'				.WORD	.+1		;FC.XME	    TRANSMIT ENABLE ENTRY
    254	000004	000005'				.WORD	.+1		;FC.RCE	    RECEIVE ENABLE ENTRY
    255	000006	000007'				.WORD	.+1		;FC.KIL	    KILL ENABLE ENTRY
    256	000010	000070'				.WORD	NRMCTL		;FC.CTL	SRV CONTROL ENABLE ENTRY
    257	000012	000342'				.WORD	NRMTIM		;FC.TIM	    TIMEOUT ENTRY
    258	000014	000026'				.WORD	NRMXCP		;FC.XCP	    TRANSMIT COMPLETE ENTRY
    259	000016	000056'				.WORD	NRMRCP		;FC.RCP	NSP RECEIVE COMPLETE ENTRY
    260	000020	000021'				.WORD	.+1		;FC.KCP	    KILL COMPLETE ENTRY
    261	000022	000104'				.WORD	NRMCCP		;FC.CCP	    CONTROL COMPLETE ENTRY
    262		000022 			RM$RWT	=.-$NRMTB
    263	000024	000546'				.WORD	NRMRWC		;RM$RWT	NRM RESOURCE WAIT COMPLETE
    264
    265					;
    266					; SUB-FUNCTION DISPATCH
    267					;
    268
    269	000026	000173 	000032'		NRMXCP:	JMP	@10$(R3)	;DISPATCH TRANSMIT COMPLETE:
    270
    271	000032	000033'			10$:	.WORD	.+1		;NT$CON	NSP CONNECT COMPLETE
    272	000034	007440'				.WORD	NRMDAT		;NT$DAT	NSP DATA TRANSMITTED
    273	000036	000037'				.WORD	.+1		;NT$INT	NSP INTERRUPT TRANSMITTED
    274	000040	000041'				.WORD	.+1		;NT$SNG
    275	000042	002642'				.WORD	NRMDIS		;NT$DIS	NSP DISCONNECT COMPLETE
    276	000044	000000G				.WORD	$CCBRT		;NT$MOD	NSP FLOW CONTROL MODIFIED
    277	000046	000047'				.WORD	.+1		;NT$QRY	NSP HERE ARE REMOTE REQUEST COUNTS
    278	000050	000051'				.WORD	.+1		;NT$XON	NSP LINK ENABLED
    279	000052	000053'				.WORD	.+1		;NT$XOF	NSP LINK DISABLED
    280	000054	002642'				.WORD	NRMDIS		;NT$ABO	NSP ABORT COMPLETE
    281
    282
    283	000056	000173 	000062'		NRMRCP:	JMP	@10$(R3)	;DISPATCH RECEIVE COMPLETE:
    284
    285	000062	001322'			10$:	.WORD	NSPCON		;NT$CON	NSP RECEIVE CONNECT MESSAGE
    286	000064	002664'				.WORD	NSPDAT		;NT$DAT	NSP RECEIVE RESOURCE MESSAGE
    287	000066	007140'				.WORD	NSPINT		;NT$INT	NSP RECEIVE INTERRUPT MESSAGE
    288
    289
    290	000070	000173 	000074'		NRMCTL:	JMP	@10$(R3)	;DISPATCH CONTROL ENABLE:
    291
    292	000074	000075'			10$:	.WORD	.+1		;FS.INI	    INITIALIZE
    293	000076	000700'				.WORD	DLXSTR		;FS.STR	DLX START
    294	000100	000734'				.WORD	DLXSTP		;FS.STP	DLX STOP
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 7-1
ATS RESOURCE MANAGER SYMBOL DEFINITIONS

    295	000102	001670'				.WORD	SRVDIS		;FS.TRM	SRV DISCONNECT DATA PIPE
    296
    297
    298	000104	000173 	000110'		NRMCCP:	JMP	@10$(R3)	;DISPATCH CONTROL COMPLETE:
    299
    300	000110	007466'			10$:	.WORD	SRVERR		;FS.AST	    ERROR REPORTING ENTRY POINT
    301	000112	004400'				.WORD	SRVSTR		;FS.STR	SRV START COMPLETE ENTRY POINT
    302	000114	004650'				.WORD	SRVSTP		;FS.STP	SRV STOP COMPLETE ENTRY POINT
    303	000116	000117'				.WORD	.+1		;FS.TRM	    UNUSED
    304	000120	001576'				.WORD	NSPDIS		;NT$DIS	NSP DISCONNECT ENTRY POINT
    305	000122	000123'				.WORD	.+1		;FS.SET	    UNUSED
    306	000124	004202'				.WORD	SRVGOT		;FS.GET	SRV HERE IS SERVER NAME
    307	000126	007274'				.WORD	NSPXON		;NT$XON	NSP ENABLE FLOW
    308	000130	007250'				.WORD	NSPXOF		;NT$XOF	NSP DISABLE FLOW
    309	000132	000133'				.WORD	.+1		;FS.RNG	DLC LOOK FOR RING
    310	000134	001170'				.WORD	DLCENB		;FS.ENB	DLC ENABLE LINE
    311	000136	001212'				.WORD	DLCDIS		;FS.DIS	DLC DISABLE LINE
    312	000140	000141'				.WORD	.+1		;FS.MSN	DLC MODEM SENSE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 8
RESOURCE MESSAGE DISPATCH TABLES

    314						.SBTTL	RESOURCE MESSAGE DISPATCH TABLES
    315					;+
    316					; THESE DISPATCH TABLES ARE USED TO DISPATCH RESOURCE MESSAGES BASED
    317					; ON THE REQUEST CODES AND REQUEST TYPES IN THE RESOURCE MESSAGE.
    318					; ALSO INCLUDED IS THE DISPATCH TABLE USED BY THE ERROR PROCESSOR
    319					; ($ERROR) TO DISPATCH ACCORDING TO ERROR CODE.
    320					;
    321					;-
    322
    323					;  REQUEST CODE DISPATCH TABLE
    324
    325		000041 			RQ.MIN=		041		; MINIMUM REQUEST CODE
    326	000142	003064'			MSGDSP:	.WORD	REQEST		; 041	REQUESTOR ID
    327	000144	006174'				.WORD	UNSUPPORTED	; 042	CAPABILITIES
    328	000146	006174'				.WORD	INVALID		; 043
    329	000150	006174'				.WORD	INVALID		; 044
    330	000152	006174'				.WORD	INVALID		; 045
    331	000154	006174'				.WORD	INVALID		; 046
    332	000156	003176'				.WORD	RESPONSE	; 047	RESPONSE
    333	000160	003206'				.WORD	SPECIFY		; 050	SPECIFY
    334	000162	003630'				.WORD	ACCESS		; 051	ACCESS
    335	000164	005400'				.WORD	ASSIGN		; 052	ASSIGN
    336	000166	005424'				.WORD	STATUS		; 053	STATUS
    337	000170	006174'				.WORD	UNSUPPORTED	; 054	CONTROL
    338		000013 			RQ.MAX	=	.-MSGDSP/2-1	; MAXIMUM REQUEST CODE
    339
    340					; REQUEST TYPE DISPATCH TABLES
    341
    342					; <CAPABILITIES> DISPATCH TABLE
    343
    344	000172	006174'			CAPDSP:	.WORD	INVALID		; 000
    345	000174	006174'				.WORD	UNSUPPORTED	; 001	CAPABILITIES-REPORT
    346	000176	006174'				.WORD	UNSUPPORTED	; 002	CAPABILITIES-REQUEST
    347		000002 			CP.MAX	=	.-CAPDSP/2-1	; MAXIMUM REQUEST CODE
    348
    349					; <SPECIFY> DISPATCH TABLE
    350
    351	000200	006174'			SPCDSP:	.WORD	INVALID		; 000
    352	000202	003444'				.WORD	RESERVE		; 001	SPECIFY-RESERVE
    353	000204	003530'				.WORD	SHARE		; 002	SPECIFY-SHARE
    354	000206	003540'				.WORD	REFER		; 003	SPECIFY-REFER
    355		000003 			SY.MAX	=	.-SPCDSP/2-1	; MAXIMUM REQUEST CODE
    356
    357					; <ACCESS> DISPATCH TABLE
    358
    359	000210	006174'			ACCDSP:	.WORD	INVALID		; 000
    360	000212	003700'				.WORD	OPEN1		; 001	ACCESS-OPEN, SINGLE LOGICAL LINK
    361	000214	003710'				.WORD	OPEN2		; 002	ACCESS-OPEN  ON SEPARATE DATA LINK
    362	000216	004516'				.WORD	CLOSE		; 003	ACCESS-CLOSE
    363	000220	005234'				.WORD	RELEASE		; 004	ACCESS-RELEASE
    364		000004 			AC.MAX	=	.-ACCDSP/2-1	; MAXIMUM REQUEST CODE
    365
    366					; <STATUS> DISPATCH TABLE
    367
    368	000222	006174'			STSDSP:	.WORD	INVALID		; 000
    369	000224	005544'				.WORD	QUERY		; 001	STATUS-QUERY
    370	000226	006174'				.WORD	UNSUPPORTED	; 002	STATUS-REPORT
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 8-1
RESOURCE MESSAGE DISPATCH TABLES

    371	000230	006174'				.WORD	UNSUPPORTED	; 003	STATUS-ALTER
    372		000003 			ST.MAX	=	.-STSDSP/2-1	; MAXIMUM REQUEST CODE
    373
    374					; <STATUS QUERY> SUB-DISPATCH TABLE
    375
    376	000232	006174'			STADSP:	.WORD	INVALID		; 000
    377	000234	006174'				.WORD	UNSUPPORTED	; 001	OPERATIONAL
    378	000236	006174'				.WORD	UNSUPPORTED	; 002	RESOURCE CONTROL
    379	000240	006174'				.WORD	UNSUPPORTED	; 003	ERROR STATISTICS
    380	000242	006174'				.WORD	UNSUPPORTED	; 004	USAGE ACCOUNTING
    381	000244	006174'				.WORD	INVALID		; 005
    382	000246	006174'				.WORD	INVALID		; 006
    383	000250	006174'				.WORD	INVALID		; 007
    384	000252	005574'				.WORD	QRYATS		; 010	ATS TERMINAL STATUS
    385		000010 			SS.MAX	=	.-STADSP/2-1	; MAXIMUM REQUEST CODE
    386
    387					; <ASSIGN> DISPATCH TABLE
    388
    389	000254	006174'			ASNDSP:	.WORD	INVALID		; 000
    390	000256	006174'				.WORD	UNSUPPORTED	; 001	ASSIGN
    391	000260	006174'				.WORD	UNSUPPORTED	; 002	ASSIGN-RECLAIM
    392	000262	006174'				.WORD	UNSUPPORTED	; 003	ASSIGN-HANDOFF
    393		000003 			AS.MAX	=	.-ASNDSP/2-1	; MAXIMUM REQUEST CODE
    394
    395					; <CONTROL> DISPATCH TABLE
    396
    397	000264	006174'			CTLDSP:	.WORD	INVALID		; 000
    398	000266	006174'				.WORD	UNSUPPORTED	; 001	REQUEST LINK DISCONNECT
    399		000001 			CT.MAX	=	.-CTLDSP/2-1	; MAXIMUM REQUEST CODE
    400
    401					; ERROR DISPATCH TABLE
    402
    403	000270	000271'			ERRDSP:	.WORD	.+1		; 000	INVALID (SYSTEM GENERATED) CODE
    404	000272	007610'				.WORD	RCVTHR		; 001	RECEIVE THRESHOLD ERROR
    405	000274	007610'				.WORD	REPTHR		; 002	REP TIMER THRESHOLD ERROR
    406	000276	007610'				.WORD	NAKTHR		; 003	NAK THRESHOLD ERROR
    407	000300	007610'				.WORD	TRMERR		; 004	HARD TERMINAL ERROR
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 9
CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

    409						.SBTTL	CCB DISPATCHER/RESOURCE MANAGER SCHEDULER
    410					;+
    411					; THESE ROUTINES HANDLES LINE CONTROL REQUESTS AND RESOURCE ALLOCATION
    412					; FAILURE RECOVERY.
    413					;-
    414
    415						.IIF NE	R$FLG,		 R$FLG;MUST BE FIRST WORD IN DATA BASE
    416						.IIF NE <R$RWT-2>,	 R$RWT;MUST COME DIRECTLY AFTER R$FLG
    417						.IIF NE	<RF.CVR-100000>, RF.CVY;MUST BE SIGN BIT
    418						.IIF NE	<W.LIN-C.LIN>,	 W.LIN;MUST BE THE SAME AS C.LIN
    419
    420					;+
    421					; QUEUE UP A CCB FOR A RESOURCE WAIT
    422					;
    423					; INPUTS:
    424					;	R4 - CCB TO QUEUE UP
    425					;	(SP) - RETRY ADDRESS
    426					;
    427					; REGISTERS MODIFIED: R4,R3
    428					;-
    429
    430	000302	012664 	000030 		NRMRWT:	MOV	(SP)+,W.ADR(R4)	; SET RETURN ADDRESS
    431	000306	112764 	000022 	000010 		MOVB	#RM$RWT,W.FNC(R4) ; AND FUNCTION CODE.
    432
    433	000314	016703 	177460 		ENQUE:	MOV	.NRMDB,R3	; GET DATA BASE ADDRESS
    434	000320	052723 	000400 			BIS	#RF.CCB,(R3)+	; IF NO RECOVERY IN PROGRESS
    435	000324	100402 				BMI	10$		; THEN
    436	000326					CALLR	$CMQIN		; QUEUE TO THE REAR
	000326	000167 	000000G			JMP	$CMQIN
    437	000332				10$:	CALLR	$CMQIF		; OTHERWISE TO THE FRONT.
	000332	000167 	000000G			JMP	$CMQIF
    438
    439					;+
    440					; TIMER INTERRUPT - DO ANY RESOURCE RECOVERY WHICH IS REQUIRED AND THEN
    441					; HANDLE ANY TCBS WHICH REQUIRE LINE CONTROL SERVICE.
    442					;
    443					; INPUT:
    444					;	R5 - NRM DATA BASE ADDRESS
    445					;-
    446	000336	054134 	003310 		NETACP:	.RAD50	/NETACP/	; NETACP TASK NAME
    447
    448	000342	016703 	177432 		NRMTIM:	MOV	.NRMDB,R3	; IF WE HAVEN'T RUN YET
    449	000346	001015 				BNE	110$		; THEN
    450	000350	012703 	000336'			MOV	#NETACP,R3	; CHECK IF NETACP IS RUNNING.
    451	000354					CALL	$SRSTD		; GET TASK CONTROL BLOCK
	000354	004767 	000000G			JSR	PC,$SRSTD
    452	000360	103471 				BCS	900$		; IF NOT THERE
    453	000362	032760 	000000G	000000G		BIT	#TS.EXE,T.STAT(R0) ; OR NOT RUNNING
    454	000370	001065 				BNE	900$		; THEN DON'T DO ANYTHING YET.
    455	000372	010567 	177402 			MOV	R5,.NRMDB	; OTHERWISE SAVE DATA BASE ADDRESS
    456	000376	052715 	001000 			BIS	#RF.LIN,(R5)	; AND ASSUME LINE ACTIVITY NEEDED.
    457	000402	032715 	000400 		110$:	BIT	#RF.CCB,(R5)	; IF NOTHING TO DO
    458	000406	001426 				BEQ	200$		; THEN QUIT.
    459	000410	042715 	000400 			BIC	#RF.CCB,(R5)	; RESET CCB PENDING SWITCH
    460	000414	052715 	100000 			BIS	#RF.CVR,(R5)	; AND SET RECOVERY SWITCH.
    461	000420	010503 			120$:	MOV	R5,R3		; GET ADDRESS
    462	000422	005723 				TST	(R3)+		; OF RESOURCE RECOVERY QUEUE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 9-1
CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

    463	000424					CALL	$CMQRM		; AND SEE IF ANYTHING IS THERE.
	000424	004767 	000000G			JSR	PC,$CMQRM
    464	000430	103413 				BCS	190$		; IF SO,
    465	000432	116403 	000011 			MOVB	C.MOD(R4),R3	; PICK UP MODIFIER
    466	000436	116400 	000010 			MOVB	C.FNC(R4),R0	; AND FUNCTION CODE
    467	000442					CALL	@$NRMTB(R0)	; AND RE-DISPATCH FUNCTION.
	000442	004770 	000002'			JSR	PC,@$NRMTB(R0)
    468	000446	016705 	177326 			MOV	.NRMDB,R5	; RECOVER DATA BASE ADDRESS
    469	000452	032715 	000400 			BIT	#RF.CCB,(R5)	; IF NO RESOURCE ERROR,
    470	000456	001760 				BEQ	120$		; THEN GO FOR MORE.
    471	000460	042715 	100000 		190$:	BIC	#RF.CVR,(R5)	; RESET RECOVERY SWITCH
    472	000464	032715 	001000 		200$:	BIT	#RF.LIN,(R5)	; ANY LINE OPERATIONS ?
    473	000470	001425 				BEQ	900$		; IF SO,
    474	000472	042715 	001000 			BIC	#RF.LIN,(R5)	; RESET THE REQUEST.
    475	000476	016703 	177276 		210$:	MOV	.NRMDB,R3	; GET DATA BASE ADDRESS
    476	000502	016305 	000006 			MOV	R$TCQ(R3),R5	; IF THERE IS A TCB
    477	000506	001416 				BEQ	900$		; PENDING FOR LINE CONTROL
    478	000510	011563 	000006 			MOV	(R5),R$TCQ(R3)	; THEN DE-LINK IT
    479	000514	005015 				CLR	(R5)
    480	000516					CALL	NRMLIN		; DO THE LINE CONTROL
	000516	004767 	000354 			JSR	PC,NRMLIN
    481	000522	103365 				BCC	210$		; IF SUCCESSFUL, DO MORE
    482	000524	016703 	177250 			MOV	.NRMDB,R3	; OTHERWISE
    483	000530	016315 	000006 			MOV	R$TCQ(R3),(R5)	; RETURN TCB
    484	000534	010563 	000006 			MOV	R5,R$TCQ(R3)	; TO THE QUEUE.
    485	000540	052713 	001000 			BIS	#RF.LIN,(R3)	; SAY OPERATION IS STILL PENDING
    486	000544				900$:	RETURN			; AND WAIT.
	000544	000207 				RTS	PC
    487
    488					;+
    489					; RESOURCE WAIT COMPLETE - DISPATCH THE CCB TO THE RETRY ROUTINE
    490					;-
    491
    492	000546				NRMRWC:	GTPCB$			;GET THE PCB ADDRESS AND
	000546	005000 				  CLR	  R0
	000550	156400 	000006 			  BISB	  C.LIN(R4),R0
	000554	004767 	000000G			JSR	PC,$PCBPT
    493	000560	000174 	000030 			JMP	@W.ADR(R4)	;DISPATCH TO RETRY ROUTINE.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 10
CCB DISPATCHER/RESOURCE MANAGER SCHEDULER

    495					;+
    496					; FLUSH THE RESOURCE WAIT QUEUE OF REQUESTS FOR THE PIPE SPECIFIED
    497					; IN "@.NRMDB".
    498					;-
    499
    500	000564	016703 	177210 		NRMFLS:	MOV	.NRMDB,R3	; POINT TO THE SWITCHES
    501	000570	052713 	100000 			BIS	#RF.CVR,(R3)	; SIMULATE RESOURCE RECOVERY
    502	000574	042723 	000400 			BIC	#RF.CCB,(R3)+	; AND CLEAR THE CCB INDICATOR.
    503	000600	016346 	000002 			MOV	2(R3),-(SP)	; PUSH THE LIST HEAD
    504	000604	011346 				MOV	(R3),-(SP)	; ONTO THE STACK
    505	000606	005013 				CLR	(R3)		; AND CLEAR IT.
    506	000610	010363 	000002 			MOV	R3,2(R3)
    507	000614	010603 			10$:	MOV	SP,R3		; GET STACK LISTHEAD
    508	000616					CALL	$CMQRM		; AND GET NEXT ITEM
	000616	004767 	000000G			JSR	PC,$CMQRM
    509	000622	103421 				BCS	30$		; IF THERE IS ONE.
    510	000624	016703 	177150 			MOV	.NRMDB,R3	; GET SWITCHES
    511	000630	126413 	000006 			CMPB	C.LIN(R4),(R3)	; IS THIS FOR THE RIGHT PIPE ?
    512	000634	001405 				BEQ	20$		; IF NOT,
    513	000636	052723 	000400 			BIS	#RF.CCB,(R3)+	; INDICATE QUEUE NOT CLEAR
    514	000642					CALL	$CMQIN		; AND RE-INSERT THE REQUEST.
	000642	004767 	000000G			JSR	PC,$CMQIN
    515	000646	000762 				BR	10$
    516	000650	116403 	000011 		20$:	MOVB	C.MOD(R4),R3	; PICK UP MODIFIER
    517	000654	116400 	000010 			MOVB	C.FNC(R4),R0	; FUNCTION CODE
    518	000660					CALL	@$NRMTB(R0)	; AND DISPATCH.
	000660	004770 	000002'			JSR	PC,@$NRMTB(R0)
    519	000664	000753 				BR	10$		; GO BACK FOR MORE.
    520	000666	042777 	100000 	177104 	30$:	BIC	#RF.CVR,@.NRMDB	; TURN OFF RECOVERY BIT
    521	000674	022626 				CMP	(SP)+,(SP)+	; CLEAR OFF STACK
    522	000676					RETURN			; AND GO BACK.
	000676	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 11
DLXSTR	- SET A LINE AS ACTIVE

    524						.SBTTL	DLXSTR	- SET A LINE AS ACTIVE
    525					;+
    526					; THIS ENTRY IS USED BY OTHER LINE CONTROL UTILITIES TO NOTIFY NRM
    527					; OF LINE BEING MADE ACTIVE.
    528					;
    529					; INPUTS:
    530					;	R5 - NRM DATA BASE
    531					;	R4 - START CCB
    532					;-
    533
    534	000700				DLXSTR:	CALL	DLXLIN		; GET TCB ADDRESS
	000700	004767 	000076 			JSR	PC,DLXLIN
    535	000704	103412 				BCS	80$		; IF WE CAN.
    536	000706	012703 	000000G			MOV	#IS.SET,R3	; ASSUME ALREADY SET.
    537	000712	032765 	040000 	000014 		BIT	#TF.DEA,T.FLG(R5) ; IF ASSIGNED TO NRM
    538	000720	001404 				BEQ	80$		; THEN GO SAY SO.
    539	000722	042765 	040000 	000014 		BIC	#TF.DEA,T.FLG(R5) ; OTHERWISE INDICATE WE HAVE IT
    540	000730	005003 				CLR	R3		; NO STATUS AT PRESENT.
    541	000732				80$:	RETURN
	000732	000207 				RTS	PC
    542
    543						.SBTTL	DLXSTP	- MAKE A LINE INACTIVE
    544					;+
    545					; THIS ENTRY IS USED BY OTHER LINE CONTROL UTILITIES TO TELL NRM
    546					; TO DEACTIVATE THE SPECIFIED LINE.  IF THE LINE IS BUSY, REJECT
    547					; THE REQUEST.
    548					;-
    549
    550	000734				DLXSTP:	CALL	DLXLIN		; GET TCB ADDRESS
	000734	004767 	000042 			JSR	PC,DLXLIN
    551	000740	103417 				BCS	80$		; IF WE CAN.
    552	000742	012703 	000000G			MOV	#IS.SET,R3	; ASSUME ALREADY RELEASED
    553	000746	032765 	040000 	000014 		BIT	#TF.DEA,T.FLG(R5) ; IF DEASSIGNED
    554	000754	001011 				BNE	80$		; THEN DONE.
    555	000756	012703 	000000G			MOV	#IE.ABO,R3	; MAY BE BUSY.
    556	000762	005765 	000012 			TST	T.STS(R5)	; THE LINE IS NOT DORMANT
    557	000766	001004 				BNE	80$		; THEN HE IS IN ERROR.
    558	000770	052765 	040000 	000014 		BIS	#TF.DEA,T.FLG(R5) ; OTHERWISE INDICATE NOT OURS
    559	000776	005003 				CLR	R3		; NO STATUS AT PRESENT.
    560	001000				80$:	RETURN
	001000	000207 				RTS	PC
    561
    562					;+
    563					; COMMON ROUTINE FOR RESOURCE SERVICE
    564					;
    565					; INPUTS:
    566					;	R5 - NRM DATA BASE ADDRESS
    567					;	R4 - REQUESTOR'S CCB
    568					;
    569					; CO-ROUTINE OUTPUTS:
    570					;	R5 - REFERRED RESOURCE TCB
    571					;	R4 - REQUESTOR'S CCB
    572					;	R3 - IE.ABO RESPONSE CODE
    573					;	R2 - NRM DATA BASE ADDRESS
    574					;	CARRY SET IF NON-EXISTANT RESOURCE
    575					;
    576					; CO-ROUTINE INPUTS:
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 11-1
DLXSTP	- MAKE A LINE INACTIVE

    577					;	R5,R4,R2 - SAME AS ABOVE
    578					;	R3 - RESPONSE CODE
    579					;	     OR ZERO IF OPERATION ACCEPTED
    580					;-
    581
    582	001002	010502 			DLXLIN:	MOV	R5,R2		; SAVE NRM DDB POINTER
    583	001004	012703 	000000G			MOV	#IE.ABO,R3	; AND ASSUME FAILURE
    584	001010					GTTCB$			; GET THE TERMINAL CONTROL BLOCK
	001010	005000 				CLR	R0
	001012	156400 	000006 			BISB	C.LIN(R4),R0
	001016	004767 	000000G			JSR	PC,$TCBPT
    585	001022					CALL	@(SP)+		; TRY TO DO THE OPERATION
	001022	004736 				JSR	PC,@(SP)+
    586	001024	010364 	000012 			MOV	R3,C.STS(R4)	; SET STATUS CODE
    587	001030	001011 				BNE	80$		; IF NO STATUS TO RETURN
    588	001032	010465 	000002 			MOV	R4,T.OLNK(R5)	; SAVE CCB ADDRESS
    589	001036	016215 	000006 			MOV	R$TCQ(R2),(R5)	; SET TCB UP
    590	001042	010562 	000006 			MOV	R5,R$TCQ(R2)	; FOR LINE CONTROL
    591	001046	052712 	001000 			BIS	#RF.LIN,(R2)	; SET LINE REQUEST FLAG
    592	001052					RETURN			; AND WAIT OUR TURN.
	001052	000207 				RTS	PC
    593	001054	016464 	000004 	000006 	80$:	MOV	C.NSP(R4),C.LIN(R4) ; RETURN ADDRESS
    594	001062					$QLLC	#<FC.CCP!FS.STR>
	001062	012764 	001020 	000010 		MOV	#<FC.CCP!FS.STR>,C.FNC(R4)
	001070	004767 	000000G			JSR	PC,$LLCRS
    595	001074					RETURN
	001074	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 12
NRMLIN	- NRM RESOURCE LINE CONTROL

    597						.SBTTL	NRMLIN	- NRM RESOURCE LINE CONTROL
    598					;+
    599					; ENTERED FROM THE TIMER TO ENABLE OR DISABLE RESOURCES
    600					;
    601					; INPUT:
    602					;	R5 - RESOURCE CONTROL BLOCK
    603					;
    604					; OUTPUTS:
    605					;	R5 - RESOURCE CONTROL BLOCK
    606					;	CC-C - SET IF UNABLE TO INITIATE FUNCTION
    607					;-
    608
    609	001076	032765 	040000 	000014 	NRMLIN:	BIT	#TF.DEA,T.FLG(R5) ; IF OURS
    610	001104	001007 				BNE	20$		; THEN
    611
    612	001106	032765 	020000 	000014 		BIT	#TF.DIS,T.FLG(R5) ; CHECK IF DISABLED.
    613	001114	001463 				BEQ	DONLIN		; IF SO,
    614	001116	012700 	012006 			MOV	#FC.CTL!FS.ENB,R0 ; ENABLE THE LINE
    615	001122	000406 				BR	80$
    616
    617	001124	032765 	020000 	000014 	20$:	BIT	#TF.DIS,T.FLG(R5) ; CHECK IF DISABLED.
    618	001132	001054 				BNE	DONLIN		; IF NOT,
    619	001134	012700 	013006 			MOV	#FC.CTL!FS.DIS,R0 ; DISABLE THE LINE
    620
    621	001140				80$:	CALL	$CCBGT		; GET A CCB
	001140	004767 	000000G			JSR	PC,$CCBGT
    622	001144	103410 				BCS	90$		; IF AVAILABLE
    623	001146					$QDLC	R0,T.NUM(R5)	; INITIATE THE FUNCTION.
	001146	010064 	000010 			MOV	R0,C.FNC(R4)
	001152	116564 	000016 	000006 		MOVB	T.NUM(R5),C.LIN(R4)
	001160	004767 	000000G			JSR	PC,$LLCRQ
    624	001164	000241 				CLC
    625	001166				90$:	RETURN
	001166	000207 				RTS	PC
    626
    627	001170				DLCENB:	CALL	DLCDON		; GET TCB AND TEST STATUS
	001170	004767 	000040 			JSR	PC,DLCDON
    628	001174	100405 				BMI	90$		; IF NO ERROR
    629	001176	042765 	020000 	000014 		BIC	#TF.DIS,T.FLG(R5) ; LINE IS NOW ENABLED
    630	001204	012703 	000000G			MOV	#IS.SUC,R3	; INDICATE SUCCESS
    631	001210				90$:	RETURN
	001210	000207 				RTS	PC
    632
    633	001212				DLCDIS:	CALL	DLCDON		; GET TCB AND TEST STATUS
	001212	004767 	000016 			JSR	PC,DLCDON
    634	001216	100405 				BMI	90$		; IF NO ERROR
    635	001220	052765 	020000 	000014 		BIS	#TF.DIS,T.FLG(R5) ; LINE IS NOW DISABLED
    636	001226	012703 	000000G			MOV	#IS.SUC,R3	; INDICATE SUCCESS
    637	001232				90$:	RETURN
	001232	000207 				RTS	PC
    638
    639	001234				DLCDON:	GTTCB$			; GET THE RESOURCE CONTROL BLOCK
	001234	005000 				CLR	R0
	001236	156400 	000006 			BISB	C.LIN(R4),R0
	001242	004767 	000000G			JSR	PC,$TCBPT
    640	001246	012703 	000000G			MOV	#IE.ABO,R3	; ASSUME ERROR
    641	001252	016402 	000012 			MOV	C.STS(R4),R2	; AND TEST STATUS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 12-1
NRMLIN	- NRM RESOURCE LINE CONTROL

    642	001256					CALL	@(SP)+		; LET COROUTINE THINK ABOUT IT
	001256	004736 				JSR	PC,@(SP)+
    643	001260					CALL	$CCBRT		; RELEASE CCB AND
	001260	004767 	000000G			JSR	PC,$CCBRT
    644
    645	001264	016504 	000002 		DONLIN:	MOV	T.OLNK(R5),R4	; GET THE GUILTY CCB
    646	001270	001412 				BEQ	80$		; IF THERE WAS ONE
    647	001272	010364 	000012 			MOV	R3,C.STS(R4)	; SET STATUS
    648	001276	016464 	000004 	000006 		MOV	C.NSP(R4),C.LIN(R4) ; AND SEND BACK.
    649	001304	112764 	000020 	000010 		MOVB	#FC.CCP,C.FNC(R4)
    650	001312					$QLLC
	001312	004767 	000000G			JSR	PC,$LLCRS
    651	001316	000241 			80$:	CLC
    652	001320					RETURN
	001320	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 13
NSPCON	- CONNECT PROCESSOR

    654						.SBTTL	NSPCON	- CONNECT PROCESSOR
    655					;+
    656					; THIS ROUTINE HANDLES CONNECT REQUESTS FOR CONTROL PIPES.
    657					; IT SEARCHES FOR A FREE PIPE.  IF OK, IT STORES THE USER ID IN THE
    658					; PCB, INITIALIZES THE PCB AND POSTS COMPLETION TO THE USER.
    659					;
    660					;  INPUTS:	R4 -> CONNECT CCB
    661					;	        CCB         	   CONNECT BLOCK
    662					;	--------------------	--------------------
    663					;	! 		   !	!    TARGET	   !  N.NODE
    664					;	=		   =	!     NODE	   !
    665					;	!		   !	!     NAME	   !
    666					;	!------------------!    !------------------!
    667					;C.LIN	!  NRM   !   LLA   !    ! TARGET SEGMENT   !  N.SEG
    668					;C.STA	!  PDV#  !	   !	!      SIZE        !
    669					;	!------------------!	!------------------!
    670					;C.FNC	! NT.CON ! FC.RCP  !	! NRM/ATS !   0    ! N.DFMT
    671					;C.MOD	!	 !	   !	! OBJ TYP !	   ! N.DOBJ
    672					;	!------------------!	!------------------!
    673					;	=		   =	=		   =
    674					;C.BUF	! DOUBLEWORD ADDR  !	! SOURCE  ! SOURCE ! N.SFMT
    675					;	! OF CONNECT BLOCK !	! OBJ TYP !  FMT   ! N.SOBJ
    676					;	!------------------!	!------------------!
    677					;C.CNT	!    SIZE OF	   !	!	SOURCE	   ! N.SDSC
    678					;	!  CONNECT BLOCK   !	!    DESCRIPTOR	   !
    679					;	!------------------!	=		   =
    680					;C.FLG	!     FLAGS	   !	!		   !
    681					;	!------------------!	!------------------!
    682					;				!REQSTR ID LEN = 2 ! N.RQDL
    683					;	 			!------------------!
    684					;	 			!    USER ID	   ! N.RQID
    685					;	 			!------------------!
    686					;
    687					;
    688					;
    689					;  OUTPUT:	R4 -> CONNECT CCB
    690					;
    691					;		CCB
    692					;	!------------------!
    693					;	!		   !
    694					;	=		   =
    695					;	!		   !
    696					;	!------------------!
    697					;C.LIN	! PD$NSP !  ULA	   !
    698					;C.STA	!	 !	   !
    699					;	!------------------!
    700					;C.FNC	! NT.ACC ! FC.RCE  !
    701					;C.MOD	!   OR   !	   !
    702					;	! NT.REJ !	   !
    703					;	!------------------!
    704					;	!		   !
    705					;	=		   =
    706					;	!		   !
    707					;	!------------------!
    708					;C.CNT2 ! LENGTH OF OPT.   !
    709					;	! DATA = 0	   !
    710					;	!------------------!
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 13-1
NSPCON	- CONNECT PROCESSOR

    711					;
    712
    713					;
    714					;  SCAN FOR A FREE PIPE
    715					;
    716	001322				NSPCON:	MAP	C.BUF(R4)	;MAP TO CONNECT BLOCK
	001322	016467 	000014 	172354 		MOV	  C.BUF(R4),KISAR6
    717	001330	016402 	000016 			MOV	C.BUF+2(R4),R2	;AND GET ITS ADDRESS.
    718	001334	026227 	000006 	000014 		CMP	N.SEG(R2),#12.	;CHECK SEGMENT SIZE
    719	001342	002421 				BLT	30$		;AS IT MUST HOLD MAXIMUM MESSAGE.
    720	001344	026227 	000060 	000002 		CMP	N.RQDL(R2),#2	;REQUESTOR-ID MUST BE 2 BYTES LONG
    721	001352	001015 				BNE	30$		;IF SO,
    722	001354	005000 				CLR	R0		;SET FOR FIRST PCB
    723	001356	005200 			20$:	INC	R0		;GO TO NEXT PCB
    724	001360					CALL	$PCBPT		;AND GET IT.
	001360	004767 	000000G			JSR	PC,$PCBPT
    725	001364	103432 				BCS	80$		;IF THERE IS ANOTHER PIPE
    726	001366	032763 	010000 	000010 		BIT	#PS.CTL,P.STS(R3) ;AND
    727	001374	001770 				BEQ	20$		;IT IS AN ACTIVE CONTROL PIPE
    728	001376	026362 	000006 	000062 		CMP	P.USER(R3),N.RQID(R2) ;CHECK IF DUPLICATE USERID.
    729	001404	001364 				BNE	20$		;IF ONE IS FOUND
    730	001406				30$:	NREJ$	#0		;REJECT THE CONNECTION.
	001406	016446 	000004 			MOV	C.NSP(R4),-(SP)
	001412	016464 	000006 	000004 		MOV	C.LIN(R4),C.NSP(R4)
	001420	012664 	000006 			MOV	(SP)+,C.LIN(R4)
	001424	005064 	000020 			    CLR	    C.CNT1(R4)
	001430	012764 	002002 	000010 		MOV	#<NT$REJ*400!FC.RCE>,C.FNC(R4)
	001436	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	001444	004767 	000000G			JSR	PC,$LLCRS
    731	001450					RETURN
	001450	000207 				RTS	PC
    732
    733					;
    734					; FORMAT THE PIPE AND ACCEPT THE CONNECT
    735					;
    736
    737	001452				80$:	CALL	$PCBGT		;GET A PCB
	001452	004767 	000000G			JSR	PC,$PCBGT
    738	001456	103753 				BCS	30$		;IF ONE IS AVAILABLE
    739	001460	016263 	000062 	000006 		MOV	N.RQID(R2),P.USER(R3) ;SAVE USER ID IN PCB
    740	001466	016263 	000006 	000022 		MOV	N.SEG(R2),P.SEG(R3) ;DATA SEGMENT SIZE
    741	001474	116463 	000007 	000021 		MOVB	C.STA(R4),P.SPI(R3) ;WE NOW OWN THIS PIPE
    742	001502					GTLLA$	P.LLA(R3)	;SAVE LLA
	001502	116463 	000004 	000016 		  MOVB	  C.NSP(R4),P.LLA(R3)
    743	001510	052763 	010022 	000010 		BIS	#PS.CC!PS.CTL!PS.BP,P.STS(R3) ;MARK PCB AS "CONNECT COMPLETE"
    744	001516					NACC$	P.NUM(R3),#NT.NFL,#0 ;ACCEPT CONNECTION
	001516	016446 	000004 			MOV	C.NSP(R4),-(SP)
	001522	016464 	000006 	000004 		MOV	C.LIN(R4),C.NSP(R4)
	001530	012664 	000006 			MOV	(SP)+,C.LIN(R4)
	001534	116364 	000020 	000004 		    MOVB    P.NUM(R3),C.NSP(R4)
	001542	012764 	000000 	000012 		    MOV	    #NT.NFL,C.STS(R4)
	001550	005064 	000020 			    CLR	    C.CNT1(R4)
	001554	012764 	001002 	000010 		MOV	#<NT$ACC*400!FC.RCE>,C.FNC(R4)
	001562	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	001570	004767 	000000G			JSR	PC,$LLCRS
    745	001574					RETURN			     ;  (USING PIPE# AS ULA)
	001574	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 14
NSPDIS	- DISCONNECT NSP CONTROL PIPE

    747						.SBTTL	NSPDIS	- DISCONNECT NSP CONTROL PIPE
    748						.SBTTL	SRVDIS	- DISCONNECT SERVER DATA PIPE
    749					;+
    750					; THIS ROUTINE HANDLES DISCONNECTS FOR BOTH CONTROL AND DATA PIPES.
    751					; CONTROL DISCONNECTS ARE RECEIVED BY THE NRM DIRECTLY FROM NSP.
    752					; IF A CONTROL PIPE, THE FOLLOWING OCCURS:
    753					;	1. ALL TERMINALS ARE CLOSED
    754					;	2. ALL TERMINALS ARE RELEASED
    755					;	3. ALL REFERRALS ARE TERMINATED
    756					;
    757					; DATA PIPE DISCONNECTS ARE RECEIVED BY THE ATS GENERIC MANAGER
    758					; AND SENT TO THE NRM BY A "TERMINATE" CONTROL ENABLE COMMAND.
    759					; IF A DATA PIPE, THE FOLLOWING OCCURS:
    760					;	ALL TERMINALS ARE CLOSED
    761					;
    762					; THE GENERAL PROCEDURE IS TO SEARCH THE RESERVED TERMINAL LIST UNTIL
    763					; AN OPEN TERMINAL IS FOUND.  A CLOSE IS THEN INITIATED FOR THAT TERMINAL
    764					; AND THE PROCESS EXITS.  AT THIS POINT THE NEXT TERMINAL IS
    765					; CLOSED WHEN A CLOSE COMPLETION IS RECEIVED FOR THE PRESENT TERMINAL.
    766					; WHEN ALL TERMINALS ARE CLOSED, THE PIPE TYPE IS DETERMINED.  IF DATA
    767					; PIPE, THE PROCESS SIMPLY POSTS DISCONNECT COMPLETION.  IF A CONTROL
    768					; PIPE, THE RESERVED TERMINALS ON THE PIPE ARE RELEASED,  ALL REFERAL
    769					; THREADS ARE TERMINATED, AND DISCONNECT COMPLETION IS POSTED.
    770					;
    771					; IF AN ABORT REQUEST IS RECEIVED, THE PROCESSING IS IDENTICAL TO THE
    772					; ABOVE, EXCEPT THAT COMPLETION IS NOT POSTED TO THE REQUESTOR.
    773					;
    774					; INPUT:
    775					;	R4= DISCONNECT CCB FROM NSP OR SERVER
    776					;
    777					;-
    778
    779	001576				NSPDIS:				;DISCONNECT CONTROL PIPE
    780	001576	016400 	000016 			MOV	C.BUF+2(R4),R0	;IF THERE IS OPTIONAL DATA
    781	001602	001405 				BEQ	10$		;THEN
    782	001604	010401 				MOV	R4,R1		;SAVE DISCONNECT CCB
    783	001606	010004 				MOV	R0,R4		;AND
    784	001610					CALL	$CCBRT		;RELEASE THE DATA CCB.
	001610	004767 	000000G			JSR	PC,$CCBRT
    785	001614	010104 				MOV	R1,R4
    786	001616				10$:	GTPCB$			;GET THE PIPE CONTROL BLOCK
	001616	005000 				  CLR	  R0
	001620	156400 	000006 			  BISB	  C.LIN(R4),R0
	001624	004767 	000000G			JSR	PC,$PCBPT
    787	001630	110077 	176144 			MOVB	R0,@.NRMDB	;SAVE THE PIPE NUMBER
    788	001634	042763 	000002 	000010 		BIC	#PS.CC,P.STS(R3) ;CLEAR CONNECT COMPLETE.
    789	001642	122764 	177776 	000012 		CMPB	#NE.ABO,C.STS(R4) ;IF AN ABORT
    790	001650	001003 				BNE	20$		;THEN
    791	001652	052763 	000010 	000010 		BIS	#PS.ABO,P.STS(R3) ;SO INDICATE.
    792	001660	010446 			20$:	MOV	R4,-(SP)	;SAVE THE DISCONNECT CCB
    793	001662					CALL	NRMFLS		;FLUSH RECOVERY REQUESTS
	001662	004767 	176676 			JSR	PC,NRMFLS
    794	001666	012604 				MOV	(SP)+,R4	;AND RECOVER THE CCB.
    795
    796	001670				SRVDIS:				;DISCONNECT DATA PIPE
    797	001670					GTPCB$			;GET THE PIPE CONTROL BLOCK
	001670	005000 				  CLR	  R0
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 14-1
SRVDIS	- DISCONNECT SERVER DATA PIPE

	001672	156400 	000006 			  BISB	  C.LIN(R4),R0
	001676	004767 	000000G			JSR	PC,$PCBPT
    798	001702	005064 	000032 			CLR	W.NSP(R4)	;INDICATE NO NSP MESSAGE ATTACHED.
    799	001706	032763 	010000 	000010 		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
    800	001714	001002 				BNE	DISCP		;IF NOT,
    801	001716	000167 	000302 			JMP	DISDP		;GO TO DATA PIPE PROCESSOR
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 15
SRVDIS	- DISCONNECT SERVER DATA PIPE

    803					;+
    804					; CONTROL PIPE DISCONNECT (ENTRY  FROM <STOP> AND <START> COMPLETE PROCESSORS)
    805					;
    806					; INPUTS:
    807					;	R4= ADDRESS OF FREE CCB
    808					;	R3= ADDRESS OF CONTROL PCB
    809					;-
    810
    811	001722	042763 	000004 	000010 	DISCP:	BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
    812
    813					; CLOSE ALL TERMINALS ON CONTROL PIPE
    814
    815	001730	010305 				MOV	R3,R5		;POINT TO RESERVED TERMINAL LISTHEAD
    816	001732	062705 	000002 			ADD	#P.RES,R5	;...
    817
    818	001736	011505 			10$:	MOV	(R5),R5		;GET ADDRESS OF NEXT TCB
    819	001740	001427 				BEQ	20$		;IF EQ, ALL TERMINALS PROCESSED
    820	001742	032765 	000007 	000012 		BIT	#TS.OCP,T.STS(R5) ;OPEN OR CLOSE PENDING OR TERM. OPEN?
    821	001750	001772 				BEQ	10$		;IF EQ, NO- TERMINAL IS NOT OPEN
    822	001752	052763 	000004 	000010 		BIS	#PS.DIP,P.STS(R3) ;ELSE YES- SET DISCONNECT PENDING
    823	001760	032765 	000002 	000012 		BIT	#TS.OPP,T.STS(R5) ;IF OPEN IN PROGRESS
    824	001766	001006 				BNE	15$		;THEN WAIT FOR OPEN TO FINISH.
    825	001770	032765 	000001 	000012 		BIT	#TS.CLP,T.STS(R5) ;IF CLOSE NOT ISSUED YET
    826	001776	001357 				BNE	10$		;THEN
    827	002000					CALLR	CLOSE2		;INITIATE A CLOSE ON THIS TERMINAL.
	002000	000167 	002566 			JMP	CLOSE2
    828
    829	002004	116364 	000020 	000006 	15$:	MOVB	P.NUM(R3),C.LIN(R4) ;SAVE WHO WE ARE WORKING ON.
    830	002012					CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
	002012	004767 	176264 			JSR	PC,NRMRWT
    831	002016	000741 				BR	DISCP		;AND TRY AGAIN.
    832
    833	002020	032763 	000004 	000010 	20$:	BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
    834	002026	001402 				BEQ	30$		;IF SO,
    835	002030					CALLR	NSPRT		;THEN WAIT FOR IT TO COME BACK.
	002030	000167 	005560 			JMP	NSPRT
    836					; CLEAR DISCONNECT PENDING FOR ALL ASSOCIATED DATA PIPES
    837					; AND SEND DISCONNECT COMPLETE FOR EACH DISCONNECTED DATA PIPE
    838					; DO NOT SEND COMPLETION FOR ABORTED DATA PIPES
    839
    840	002034				30$:	PUSH	R4		;SAVE CCB ADDRESS (USE FOR CONTROL PIPE
	002034	010446 				MOV	R4,-(SP)
    841	002036	010305 				MOV	R3,R5		;DISCONNECT COMPLETION)
    842	002040	005000 				CLR	R0		;SET FOR FIRST PCB
    843	002042	005200 			40$:	INC	R0		;GO TO NEXT PCB.
    844	002044					CALL	$PCBPT		;GET THE PCB
	002044	004767 	000000G			JSR	PC,$PCBPT
    845	002050	103437 				BCS	70$		;IF THERE IS ONE.
    846	002052	005763 	000010 			TST	P.STS(R3)	;IF NOT ACTIVE
    847	002056	001771 				BEQ	40$		;THEN IGNORE.
    848	002060	032763 	010000 	000010 		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
    849	002066	001365 				BNE	40$		;IF EQ, YES- GET NEXT PCB
    850	002070	026563 	000006 	000006 		CMP	P.USER(R5),P.USER(R3) ;CONTROL PIPE ASSOCIATED WITH DATA PIPE?
    851	002076	001361 				BNE	40$		;IF NE, NO- GET NEXT PCB
    852	002100	032763 	000004 	000010 		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
    853	002106	001755 				BEQ	40$		;IF EQ, NO
    854
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 15-1
SRVDIS	- DISCONNECT SERVER DATA PIPE

    855	002110					CALL	$CCBGT		;GET A CCB
	002110	004767 	000000G			JSR	PC,$CCBGT
    856	002114	103012 				BCC	60$		;IF CC, GOT ONE
    857					;
    858					; RESOURCE FAILURE - WAIT A TICK AND TRY AGAIN
    859					;
    860	002116	052763 	000004 	000010 		BIS	#PS.DIP,P.STS(R3) ;MARK AS STILL DISCONNECTING
    861	002124					POP	R4		;RESTORE CCB ADDRESS
	002124	012604 				MOV	(SP)+,R4
    862	002126	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4) ;SAVE WHO WE ARE WORKING ON.
    863	002134					CALL	NRMRWT		;GO TO RESOURCE SCHEDULER
	002134	004767 	176142 			JSR	PC,NRMRWT
    864	002140	000735 				BR	30$		;AND TRY AGAIN.
    865
    866					; CONTROL PIPE DISCONNECT REENTRY POINT
    867
    868
    869	002142				60$:	CALL	DISPC		;TELL THE SERVER TO DISCONNECT
	002142	004767 	000266 			JSR	PC,DISPC
    870	002146	000735 				BR	40$		;AND CHECK SOME MORE.
    871
    872					; RELEASE ALL TERMINALS ON CONTROL PIPE
    873
    874	002150	010503 			70$:	MOV	R5,R3
    875	002152	016305 	000002 		80$:	MOV	P.RES(R3),R5	;IF THERE IS ANOTHER RESOURCE
    876	002156	001412 				BEQ	110$		;THEN
    877	002160	011563 	000002 			MOV	(R5),P.RES(R3)	;DE-LINK AND
    878	002164	042765 	000270 	000012 		BIC	#<TS.RS!TS.RLP!TS.HP!TS.SRP>,T.STS(R5) ;UNRESERVE IT.
    879	002172	000767 				BR	80$
    880
    881					; TERMINATE ALL REFERRAL THREADS
    882
    883	002174	011463 	000004 		100$:	MOV	(R4),P.REF(R3)	;DE-LINK THIS CCB
    884	002200					CALL	$CCBRT		;AND RETURN IT.
	002200	004767 	000000G			JSR	PC,$CCBRT
    885	002204	016304 	000004 		110$:	MOV	P.REF(R3),R4	;GET THE NEXT ONE
    886	002210	001371 				BNE	100$		;IF THERE IS ONE.
    887
    888	002212					POP	R4		;RESTORE CCB POINTER
	002212	012604 				MOV	(SP)+,R4
    889	002214	042763 	000004 	000010 		BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING FOR CONTROL PIPE
    890	002222	000504 				BR	DISPC		;AND GO FINISH UP IN COMMON CODE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 16
SRVDIS	- DISCONNECT SERVER DATA PIPE

    892					;+
    893					; DATA PIPE DISCONNECT (ENTRY FROM <START> AND <STOP> COMPLETE ROUTINES)
    894					;
    895					; INPUTS:
    896					;	R4= ADDRESS OF CCB
    897					;	R3= ADDRESS OF DATA PCB
    898					;-
    899
    900	002224	042763 	000004 	000010 	DISDP:	BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
    901
    902					; CHECK IF ASSOCIATED CONTROL PIPE IS ACTIVE
    903
    904	002232	010305 				MOV	R3,R5		;SAVE PCB ADDRESS
    905	002234	005000 				CLR	R0		;AND SET FOR FIRST PCB.
    906	002236	005200 			10$:	INC	R0		;GO TO NEXT PCB
    907	002240					CALL	$PCBPT		;POINT TO IT
	002240	004767 	000000G			JSR	PC,$PCBPT
    908	002244	103425 				BCS	20$		;IF IT IS THERE.
    909	002246	005763 	000010 			TST	P.STS(R3)	;IF NOT ACTIVE
    910	002252	001771 				BEQ	10$		;THEN IGNORE.
    911	002254	032763 	010000 	000010 		BIT	#PS.CTL,P.STS(R3) ;IS THIS A CONTROL PIPE?
    912	002262	001765 				BEQ	10$		;IF EQ, NO
    913
    914	002264	026563 	000006 	000006 		CMP	P.USER(R5),P.USER(R3) ;DATA PIPE ASSOCIATED W/CONTROL PIPE?
    915	002272	001361 				BNE	10$		;IF NE, NO
    916	002274	032763 	000004 	000010 		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
    917	002302	001406 				BEQ	20$		;IF EQ, NO
    918	002304	010503 				MOV	R5,R3		;RESTORE PCB ADDRESS
    919	002306	052763 	000004 	000010 		BIS	#PS.DIP,P.STS(R3) ;SET DISCONNECT PENDING
    920	002314					CALLR	NSPRT		;RETURN CCB
	002314	000167 	005274 			JMP	NSPRT
    921
    922					;  CLOSE ALL TERMINALS ON DATA PIPE
    923
    924	002320	010503 			20$:	MOV	R5,R3		;RESTORE PCB POINTER
    925	002322	042763 	000004 	000010 		BIC	#PS.DIP,P.STS(R3) ;CLEAR DISCONNECT PENDING
    926	002330	062705 	000000 			ADD	#<P.OPN-T.OLNK>,R5 ;POINT INTO OPEN LIST
    927
    928	002334	016505 	000002 		30$:	MOV	T.OLNK(R5),R5	;GET ADDRESS OF NEXT TCB
    929	002340	001423 				BEQ	40$		;IF THERE IS ONE
    930	002342	052763 	000004 	000010 		BIS	#PS.DIP,P.STS(R3) ;SET DISCONNECT PENDING
    931	002350	032765 	000002 	000012 		BIT	#TS.OPP,T.STS(R5) ;IF OPEN IN PROGRESS
    932	002356	001006 				BNE	35$		;THEN WAIT FOR OPEN TO FINISH.
    933	002360	032765 	000001 	000012 		BIT	#TS.CLP,T.STS(R5) ;IF CLOSE NOT PENDING
    934	002366	001362 				BNE	30$		;THEN
    935	002370					CALLR	CLOSE2		;INITIATE A CLOSE ON THIS TERMINAL.
	002370	000167 	002176 			JMP	CLOSE2
    936	002374	116364 	000020 	000006 	35$:	MOVB	P.NUM(R3),C.LIN(R4) ;SAVE WHO WE ARE WORKING ON
    937	002402					CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
	002402	004767 	175674 			JSR	PC,NRMRWT
    938	002406	000706 				BR	DISDP		;AND TRY AGAIN.
    939
    940	002410	032763 	000004 	000010 	40$:	BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
    941	002416	001406 				BEQ	DISPC		;IF SO,
    942	002420	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4) ;SAVE WHO WE ARE WORKING ON.
    943	002426					CALL	NRMRWT		;WAIT FOR ACTION TO FINISH
	002426	004767 	175650 			JSR	PC,NRMRWT
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 16-1
SRVDIS	- DISCONNECT SERVER DATA PIPE

    944	002432	000674 				BR	DISDP		;AND TRY AGAIN.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 17
SRVDIS	- DISCONNECT SERVER DATA PIPE

    946					;+
    947					; PIPE DISCONNECT COMPLETED - NOTIFY NSP OR SERVER
    948					;
    949					; INPUTS:
    950					;	R4= ADDRESS OF CCB
    951					;	R3= ADDRESS OF PCB
    952					;-
    953
    954	002434	032763 	010000 	000010 	DISPC:	BIT	#PS.CTL,P.STS(R3) ;IF NOT CONTROL PIPE
    955	002442	001463 				BEQ	80$		;THEN NOTIFY PIPE OWNER PIPE CLOSED.
    956	002444					PUSH	R4		;SAVE THE DISCONNECT CCB
	002444	010446 				MOV	R4,-(SP)
    957	002446	062703 	000012 			ADD	#P.BPQ,R3	;AND EMPTY
    958	002452				10$:	CALL	$CMQRM		;THE BACK-PRESSURE QUEUE
	002452	004767 	000000G			JSR	PC,$CMQRM
    959	002456	103403 				BCS	20$
    960	002460					CALL	NRMDAT		;THROW THE SEGMENTS AWAY.
	002460	004767 	004754 			JSR	PC,NRMDAT
    961	002464	000772 				BR	10$
    962	002466	162703 	000012 		20$:	SUB	#P.BPQ,R3	;RESTORE PCB ADDRESS
    963	002472					POP	R4		;AND CCB.
	002472	012604 				MOV	(SP)+,R4
    964	002474	032763 	000010 	000010 		BIT	#PS.ABO,P.STS(R3) ;ABORT PENDING?
    965	002502	001425 				BEQ	70$		;IF EQ, NO- GO POST COMPLETION
    966	002504	042763 	000010 	000010 		BIC	#PS.ABO,P.STS(R3) ;ELSE CLEAR ABORT PENDING FLAG
    967	002512					NABO$	P.NUM(R3)	;ABORT OUR LINK
	002512	116364 	000020 	000004 		    MOVB    P.NUM(R3),C.NSP(R4)
	002520	116764 	000000G	000005 		    MOVB    $CMPDV,C.NSP+1(R4)
	002526	052764 	100000 	000004 		BIS	#100000,C.NSP(R4)
	002534	012764 	011000 	000010 		MOV	#<NT$ABO*400!FC.XME>,C.FNC(R4)
	002542	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	002550	004767 	000000G			JSR	PC,$LLCRS
    968	002554					RETURN
	002554	000207 				RTS	PC
    969
    970	002556				70$:	NDIS$	P.LLA(R3),<,,#0> ;POST DISCONNECT COMPLETION
	002556	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	002564	005064 	000020 			    CLR	    C.CNT1(R4)
	002570	012764 	004000 	000010 		MOV	#<NT$DIS*400!FC.XME>,C.FNC(R4)
	002576	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	002604	004767 	000000G			JSR	PC,$LLCRS
    971	002610					RETURN
	002610	000207 				RTS	PC
    972
    973	002612				80$:	$QLLC	#<FC.CCP!FS.TRM>,P.SPI(R3),P.NUM(R3) ;NOTIFY PIPE OWNER.
	002612	012764 	003020 	000010 		MOV	#<FC.CCP!FS.TRM>,C.FNC(R4)
	002620	116364 	000021 	000007 		MOVB	P.SPI(R3),C.STA(R4)
	002626	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4)
	002634	004767 	000000G			JSR	PC,$LLCRS
    974	002640					RETURN
	002640	000207 				RTS	PC
    975
    976						.SBTTL	NRMDIS	- PIPE DISCONNECTED
    977					;+
    978					; LINK IS CLOSED - RETURN THE PIPE
    979					;
    980					; INPUTS:
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 17-1
NRMDIS	- PIPE DISCONNECTED

    981					;	R4 - DISCONNECT OR ABORT COMPLETE CCB
    982					;-
    983
    984	002642				NRMDIS:	GTPCB$			; GET THE PCB ADDRESS
	002642	005000 				  CLR	  R0
	002644	156400 	000006 			  BISB	  C.LIN(R4),R0
	002650	004767 	000000G			JSR	PC,$PCBPT
    985	002654					CALL	$PCBRT		; RETURN THE PCB
	002654	004767 	000000G			JSR	PC,$PCBRT
    986	002660					CALLR	$CCBRT		; AND THE DISCONNECT CCB.
	002660	000167 	000000G			JMP	$CCBRT
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 18
NSPDAT	- RESOURCE MESSAGE DISPATCHER

    988						.SBTTL	NSPDAT	- RESOURCE MESSAGE DISPATCHER
    989					;+
    990					; THIS ROUTINE RECEIVES CONTROL FROM THE CCB DISPATCHER.
    991					; ITS PURPOSE IS TO PASS CONTROL TO THE APPROPRIATE MESSAGE PROCESSOR
    992					; BASED ON THE REQUEST CODE.
    993					; A RECEIVE DATA BUFFER (RDB) MAY CONTAIN TWO RESOURCE MESSAGES.
    994					; FOR EXAMPLE, AN OPEN MESSAGE MAY BE CONCATENATED WITH A RESERVE
    995					; MESSAGE.  FOR SUCH A CASE, THE FIRST MESSAGE WILL ALWAYS HAVE A
    996					; SPECIFY MESSAGE REQUEST CODE AND THE DOUBLE MESSAGE FLAG WILL
    997					; BE SET IN THE REQUEST TYPE BYTE (M.TYP).  FOR DOUBLE MESSAGES
    998					; ONLY ONE STATUS RESPONSE (INDICATING FAILURE OR THE HIGHEST LEVEL
    999					; MESSAGE COMPLETION STATUS) IS RETURNED TO THE REQUESTOR .
   1000					;
   1001					; INPUT:
   1002					;	R5= ADDRESS OF NRM DATA BASE
   1003					;	R4= ADDRESS OF CCB-RDB (WHICH POINTS TO RESOURCE MESSAGE)
   1004					;
   1005					; OUTPUT:
   1006					;	APR6= BIASED INTO RESOURCE MESSAGE
   1007					;	R4= ADDRESS OF WORKING CCB
   1008					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
   1009					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1010					;	R0= MESSAGE SUBTYPE
   1011					;
   1012					;-
   1013
   1014
   1015						.ENABL LSB
   1016
   1017	002664				NSPDAT:				;MESSAGE ENTRY POINT
   1018	002664					GTPCB$			;GET THE PCB
	002664	005000 				  CLR	  R0
	002666	156400 	000006 			  BISB	  C.LIN(R4),R0
	002672	004767 	000000G			JSR	PC,$PCBPT
   1019	002676	032763 	020000 	000010 		BIT	#PS.DAT,P.STS(R3) ;IF A DATA PIPE
   1020	002704	001406 				BEQ	10$		;THEN
   1021	002706					$QLLC	,P.SPI(R3)	;SEND TO THE SERVER.
	002706	116364 	000021 	000007 		MOVB	P.SPI(R3),C.STA(R4)
	002714	004767 	000000G			JSR	PC,$LLCRS
   1022	002720					RETURN
	002720	000207 				RTS	PC
   1023
   1024	002722	005715 			10$:	TST	(R5)		; IF RESOURCE ERROR RECOVERY
   1025	002724	100403 				BMI	20$		; NOT IN EFFECT
   1026	002726	005765 	000002 			TST	R$RWT(R5)	; AND THE QUEUE IS NOT EMPTY
   1027	002732	001005 				BNE	30$		; THEN ADD THIS TO IT.
   1028	002734	010401 			20$:	MOV	R4,R1		; SAVE THIS CCB
   1029	002736					CALL	$CCBGT		; AND TRY FOR A SPAWN CCB.
	002736	004767 	000000G			JSR	PC,$CCBGT
   1030	002742	103003 				BCC	40$		; IF FAILURE
   1031	002744	010104 				MOV	R1,R4		; GET NSP CCB BACK
   1032	002746				30$:	CALLR	ENQUE		; AND WAIT FOR THE PROPER MOMENT.
	002746	000167 	175342 			JMP	ENQUE
   1033
   1034	002752	116164 	000006 	000006 	40$:	MOVB	C.LIN(R1),W.LIN(R4)   ;SAVE PIPE NUMBER
   1035	002760	010164 	000032 			MOV	R1,W.NSP(R4)	      ;NSP CCB-RDB ADDRESS
   1036	002764	016161 	000016 	000012 		MOV	C.BUF+2(R1),C.STS(R1) ;SET MESSAGE START ADDRESS.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 18-1
NSPDAT	- RESOURCE MESSAGE DISPATCHER

   1037
   1038					; GET MESSAGE ADDRESS
   1039
   1040	002772	016405 	000032 		NRMMSG:	MOV	W.NSP(R4),R5	;GET NSP BUFFER ADDRESS
   1041	002776					MAP	C.BUF(R5)	;MAP TO RECIEVE DATA BUFFER
	002776	016567 	000014 	172354 		MOV	  C.BUF(R5),KISAR6
   1042	003004	016502 	000012 			MOV	C.STS(R5),R2	;POINT TO RESOURCE MESSAGE BUFFER
   1043
   1044					; RANGE CHECK REQUEST CODE
   1045
   1046	003010					CALL	GET1		;GET REQUEST CODE
	003010	004767 	004652 			JSR	PC,GET1
   1047	003014	162700 	000041 			SUB	#RQ.MIN,R0	;REQUEST CODE TOO LOW?
   1048	003020	002403 				BLT	70$		;IF LT, YES
   1049	003022	022700 	000013 			CMP	#RQ.MAX,R0	;REQUEST CODE TOO HIGH?
   1050	003026	103002 				BHIS	80$		;IF LOS, NO- CONTINUE
   1051
   1052	003030				70$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	003030	000167 	003140 			JMP	INVALID
   1053
   1054					; DISPATCH MESSAGE TO MESSAGE PROCESSOR
   1055
   1056	003034	006300 			80$:	ASL	R0		;MAKE A WORD INDEX
   1057	003036	016046 	000142'			MOV	MSGDSP(R0),-(SP) ;SAVE DISPATCH ADDRESS
   1058	003042					CALL	GET1		;GET SUBTYPE
	003042	004767 	004620 			JSR	PC,GET1
   1059	003046					PUSH	R0		;SAVE WHILE WE
	003046	010046 				MOV	R0,-(SP)
   1060	003050					CALL	GET2		;GET CONTROL ID
	003050	004767 	004620 			JSR	PC,GET2
   1061	003054	010064 	000004 			MOV	R0,W.CID(R4)	;AND STORE IT.
   1062	003060					POP	R0		;RESTORE SUBTYPE
	003060	012600 				MOV	(SP)+,R0
   1063	003062	000207 				RTS	PC		;AND DISPATCH MESSAGE (WITHOUT RETURN)
   1064
   1065						.DSABL LSB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 19
REQEST	-  <REQUESTOR ID> PROCESSOR

   1067						.SBTTL	REQEST	-  <REQUESTOR ID> PROCESSOR
   1068					;+
   1069					; THIS ROUTINE RECEIVES A REQUESTOR ID MESSAGE AND 'LOGS IN' A
   1070					; REQUESTOR WITH THE CONTROL ID SUPPLIED IN THE RESOURCE MESSAGE.
   1071					; [A REQUESTOR MAY BE LOGGED IN  WITH MORE THAN ONE CONTROL ID.]
   1072					; ALGORITHM:
   1073					;    SEARCH REFERRAL LIST FOR CCB WITH CONTROL ID. IF NOT FOUND GO TO 1.
   1074					;    ELSE IF REFERRAL CCB IS POINTING HANDOFF TCB THEN GO TO 4.
   1075					;    ELSE GO TO 2.
   1076					; 1. SEARCH RESERVED LIST FOR TCB WITH CONTROL ID. IF NOT FOUND GO TO 3.
   1077					; 2. RETURN ERROR RESPONSE
   1078					; 3. STORE CONTROL ID IN CCB
   1079					;    LINK CCB TO CCB TO REFERRAL LIST
   1080					; 4. RETURN SUCCESS RESPONSE
   1081					;
   1082					; INPUT:
   1083					;	APR6= BIASED INTO RESOURCE MESSAGE
   1084					;	R4= ADDRESS OF WORKING CCB
   1085					;	R3= ADDRESS OF CONTROL PIPE
   1086					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1087					;		= AT 'RQSTRID' FIELD.
   1088					;	R1 - CONTROL ID
   1089					;	R0 - REQUEST SUBTYPE
   1090					;
   1091					; OUTPUT (TO RESPONSE PROCESSOR):
   1092					;	R4= ADDRESS OF WORKING CCB
   1093					;	R0= RESPONSE CODE
   1094					;
   1095					;
   1096					;-
   1097
   1098	003064				REQEST:				;ENTRY POINT
   1099	003064	105700 				TSTB	R0		;REQUEST TYPE= 0?
   1100	003066	001402 				BEQ	10$		;IF EQ, YES- CONTINUE
   1101	003070					RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	003070	000167 	003100 			JMP	INVALID
   1102
   1103					; CHECK TO MAKE SURE THE CONTROL ID IS NOT IN USE
   1104
   1105	003074				10$:	CALL	FNDRES		;CHECK RESERVED LIST
	003074	004767 	005060 			JSR	PC,FNDRES
   1106	003100	103003 				BCC	20$
   1107	003102					CALL	FNDREF		;CHECK REFERRAL LIST
	003102	004767 	005024 			JSR	PC,FNDREF
   1108	003106	103404 				BCS	60$
   1109	003110				20$:	RESPOND	RC.RQO		;ERROR - CONTROL ID IN USE
	003110	012700 	000030 			MOV	#RC.RQO,R0
	003114	000167 	003060 			JMP	RSPNS
   1110
   1111					; GET A REFERRAL CCB
   1112
   1113	003120				60$:	PUSH	R4		;SAVE CCB-RDB ADDRESS
	003120	010446 				MOV	R4,-(SP)
   1114	003122					CALL	$CCBGT		;GET A CCB
	003122	004767 	000000G			JSR	PC,$CCBGT
   1115	003126	010405 				MOV	R4,R5		;COPY NEW CCB
   1116	003130					POP	R4		;AND RESTORE WORKING CCB.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 19-1
REQEST	-  <REQUESTOR ID> PROCESSOR

	003130	012604 				MOV	(SP)+,R4
   1117	003132	103003 				BCC	70$		;IF CC, GOT ONE
   1118	003134					CALL	NRMRWT		;WAIT A TICK
	003134	004767 	175142 			JSR	PC,NRMRWT
   1119	003140	000767 				BR	60$		;AND TRY AGAIN.
   1120
   1121					; LINK REFERRAL CCB TO REFERRAL LIST
   1122
   1123	003142	016465 	000004 	000004 	70$:	MOV	W.CID(R4),R.CID(R5) ;SAVE CONTROL ID IN CCB
   1124	003150	012765 	100000 	000012 		MOV	#RS.RQ,R.STS(R5) ;SET STATUS AS REQUESTOR ID REFERRAL
   1125	003156	005065 	000016 			CLR	R.TCB(R5)	;NO TCB
   1126	003162					CALL	SETREF		;LINK CCB INTO REFERRAL LIST
	003162	004767 	004704 			JSR	PC,SETREF
   1127
   1128	003166				90$:	RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
	003166	012700 	000001 			MOV	#RC.INT,R0
	003172	000167 	003002 			JMP	RSPNS
   1129
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 20
RESPON	-  <RESPONSE> PROCESSOR

   1131						.SBTTL	RESPON	-  <RESPONSE> PROCESSOR
   1132					;+
   1133					; THIS ROUTINE IS INVOKED BY THE ATS MESSAGE DISPATCHER WHENEVER
   1134					; A RESPONSE MESSAGE IS RECEIVED.
   1135					; PRESENTLY, THE RESPONSE MESSAGE IS USED IN THE HANDOFF PROTOCOL
   1136					; SEQUENCE TO INDICATE WHETHER A USER DESIRES TO ACCEPT OR TO REJECT
   1137					; A RESOURCE FOR WHICH HE IS THE POTENTIAL RECIPIENT.
   1138					; IF AN 'ACCEPT' RESPONSE IS RECEIVED, THE 'STATUS-REPORT PENDING'
   1139					; STATE IS CLEARED AND THE RESOURCE MANAGER AWAITS THE RECEIPT OF A
   1140					; SPECIFY-RESERVE MESSAGE FROM THE HANDOFEE.
   1141					; IF A 'REJECT' RESPONSE IS RECEIVED, THE RESPONSE IS PASSED ON TO THE
   1142					; HANDOFER AND THE HANDOFF SEQUENCE IS TERMINATED.
   1143					;
   1144					; INPUT:
   1145					;	APR6= BIASED INTO RESOURCE MESSAGE
   1146					;	R4= ADDRESS OF WORKING CCB
   1147					;	R3= CONTROL PCB
   1148					;	R2= ADDRESS OF RESOURCE MESSAGE
   1149					;		= AT 'RSPCODE' FIELD
   1150					;	R1= CONTROL ID
   1151					;	R0= MESSAGE SUBTYPE
   1152					;
   1153					; OUTPUT:
   1154					;	IF SUCCESS: NONE
   1155					;
   1156					;	IF FAILURE:
   1157					;	SAME AS INPUT, PLUS:
   1158					;	R5= ADDRESS OF TCB
   1159					;	R0= RESPONSE CODE
   1160					;-
   1161
   1162	003176				RESPON:
   1163		000000 				.REPT	0		; HANDOFF NOT SUPPORTED !!!!
   1164
   1165						CALL	FNDREF		;CHECK THE REFERAL LIST
   1166						BCS	100$		;IF CS, SEND ERROR
   1167						MOV	R.TCB(R5),R5	;GET ADDRESS OF TCB
   1168						BEQ	100$		;IF EQ, NO TCB THERE
   1169						BIT	#TS.HP,T.STS(R5) ;HANDOFF PENDING?
   1170						BEQ	100$		;IF NO- SEND ERROR
   1171						BIT	#TS.SRP,T.STS(R5) ;STATUS-REPORT PENDING?
   1172						BEQ	100$		;IF NO, SEND ERROR
   1173						CMP	R3,T.PCBD(R5)	;RESPONSE MESSAGE FROM HANDOFEE?
   1174						BNE	100$		;IF NE, NO- SEND ERROR
   1175						BIC	#TS.SRP,T.STS(R5) ;CLEAR STATUS-REPORT PENDING
   1176						CMPB	#RQ.SPC,R0	;IS THIS A SPECIFY RESPONSE?
   1177						BEQ	20$		;IF EQ, YES- FINISH HANDOFF SEQUENCE
   1178
   1179						CMPB	#RQ.STS,(SP)	;IS THIS A STATUS RESPONSE?
   1180						BNE	100$		;IF NE, NO
   1181						CALL	GET1		;GET RESPONSE CODE
   1182						CMP	#RC.ACC,R0	;DID HANDOFEE ACCEPT RESOURCE?
   1183						BNE	20$		;IF NE, NO
   1184						CALLR	NSPRT		;RETURN NSP BUFFER
   1185
   1186					20$:	BIC	#TS.HP,T.STS(R5) ;CLEAR HANDOFF PENDING
   1187						MOV	R.NSP(R0),R4	;RECOVER WORKING CCB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 20-1
RESPON	-  <RESPONSE> PROCESSOR

   1188						RESPOND	RC.REJ		;ERROR - HANDOFEE REJECTED THE RESOURCE
   1189
   1190					100$:	.ENDR
   1191
   1192	003176					RESPOND	RC.RSE		;ERROR - REQUEST OUT OF SEQUENCE
	003176	012700 	000047 			MOV	#RC.RSE,R0
	003202	000167 	002772 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 21
SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR

   1194						.SBTTL	SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR
   1195					;+
   1196					; THIS ROUTINE RECEIVES SPECIFY MESSAGES.  ITS DOES THE PROCESSING COMMON
   1197					; TO ALL SPECIFY MESSAGES.
   1198					; ALGORITHM:
   1199					;    CHECK FOR VALID SPECIFY-REQUEST TYPES. IF NOT VALID RETURN ERROR
   1200					;    SEARCH REFERRAL LIST FOR CCB WITH CONTROL ID. IF FOUND GO TO 1.
   1201					;    SEARCH RESERVED LIST FOR TCB WITH CONTROL ID. IF FOUND RETURN ERROR
   1202					;    ALLOCATE CCB AND LINK TO REFERRAL LIST
   1203					; 1. IF REFERRAL CCB DOES NOT POINT TO HANDOFF TCB GO TO 2.
   1204					;    DELINK REFERRAL CCB AND RETURN IT TO POOL
   1205					;    LINK TCB TO HANDOFEE'S RESERVED TERMINAL LIST
   1206					;    SEND RESPONSE MESSAGE TO HANDOFEE
   1207					;    SEND RESPONSE MESSAGE TO HANDOFER AND EXIT
   1208					; 2. SEARCH TCB TABLE FOR TCB CONTAINING TERMINAL NAME. IF FOUND RETURN SUCCESS
   1209					;    ELSE RETURN ERROR
   1210					;
   1211					; INPUT:
   1212					;	APR6= BIASED INTO RESOURCE MESSAGE
   1213					;	R4= ADDRESS OF WORKING CCB
   1214					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
   1215					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1216					;		= AT 'RESTYPE' FIELD
   1217					;	R0= MESSAGE SUBTYPE
   1218					;
   1219					; OUTPUT:
   1220					;	R4= ADDRESS OF WORKING CCB
   1221					;	R0= RESPONSE CODE
   1222					;
   1223					;	IF SUCCESS:
   1224					;	APR6= BIASED INTO RESOURCE MESSAGE
   1225					;	R5= ADDRESS OF TCB
   1226					;	R0= ADDRESS OF CCB CONTAINING CONTROL ID
   1227					;
   1228					;-
   1229
   1230	003206				SPECIFY:
   1231
   1232					; VALIDATE REQUEST TYPE
   1233
   1234	003206	142700 	177760 			BICB	#^C17,R0	;CLEAR OUT GARBAGE
   1235	003212	001403 				BEQ	10$		;IF EQ, INVALID REQUEST TYPE
   1236	003214	122700 	000003 			CMPB	#SY.MAX,R0 	;REQUEST TYPE IN RANGE?
   1237	003220	103002 				BHIS	20$		;IF LOS, YES- CONTINUE
   1238	003222				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	003222	000167 	002746 			JMP	INVALID
   1239
   1240					; THE CONTROL ID SHOULD NOT BE ASSOCIATED WITH A RESERVED RESOURCE
   1241
   1242	003226				20$:	CALL	FNDRES		;CHECK RESERVED LIST
	003226	004767 	004726 			JSR	PC,FNDRES
   1243	003232	103404 				BCS	30$		;IF CS, CONTINUE
   1244	003234					RESPOND	RC.RQO		;ERROR - CONROL ID IN USE
	003234	012700 	000030 			MOV	#RC.RQO,R0
	003240	000167 	002734 			JMP	RSPNS
   1245
   1246					; IF IN THE REFERRAL LIST, THERE SHOULD BE NO ATTACHED RESOURCE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 21-1
SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR

   1247
   1248	003244				30$:	CALL	FNDREF		;CHECK REFERRAL LIST
	003244	004767 	004662 			JSR	PC,FNDREF
   1249	003250	103407 				BCS	40$		;IF CS, THIS IS A NEW CONTROL THREAD
   1250	003252	005765 	000016 			TST	R.TCB(R5)	;IF RESOURCE IS ESTABLISHED
   1251	003256	001404 				BEQ	40$		;THEN
   1252	003260					RESPOND	RC.RSE		;ERROR - REQUEST IS OUT OF SEQUENCE
	003260	012700 	000047 			MOV	#RC.RSE,R0
	003264	000167 	002710 			JMP	RSPNS
   1253
   1254					; LOOK UP TCB CONTAINING RESOURCE DESCRIPTOR (TERMINAL NAME)
   1255
   1256	003270				40$:	CALL	GET1		;GET THE RESOURCE OBJECT TYPE
	003270	004767 	004372 			JSR	PC,GET1
   1257	003274	110064 	000014 			MOVB	R0,W.TMP+0(R4)	;SAVE THIS
   1258	003300					CALL	GET1		;GET THE FIELD LENGTH
	003300	004767 	004362 			JSR	PC,GET1
   1259	003304	110064 	000015 			MOVB	R0,W.TMP+1(R4)	;SAVE THIS ALSO
   1260	003310	010264 	000016 			MOV	R2,W.TMP+2(R4)	;SAVE NAME POSITION
   1261	003314	005000 				CLR	R0		;START WITH FIRST TCB
   1262	003316	005200 			50$:	INC	R0
   1263	003320					CALL	$TCBPT		;POINT TO TCB
	003320	004767 	000000G			JSR	PC,$TCBPT
   1264	003324	103010 				BCC	70$		;IF NO MORE RESOURCES
   1265	003326				60$:	RESPOND	RC.RNE		;ERROR - RESOURCE DOES NOT EXIST
	003326	012700 	000031 			MOV	#RC.RNE,R0
	003332	000167 	002642 			JMP	RSPNS
   1266
   1267	003336				61$:	RESPOND	RC.IRD		;ERROR - INVALID RESOURCE DESCRIPTOR
	003336	012700 	000033 			MOV	#RC.IRD,R0
	003342	000167 	002632 			JMP	RSPNS
   1268
   1269						.IIF NE	<T.NAML-1-T.OBJ>,.ERROR T.NAML;MUST BE ADJACENT TO T.OBJ
   1270						.IIF NE	<T.NAM-1-T.NAML>,.ERROR T.NAM;MUST BE ADJACENT TO T.NAML
   1271
   1272	003346	062705 	000020 		70$:	ADD	#T.OBJ,R5	;POINT TO OBJECT TYPE
   1273	003352	126425 	000014 			CMPB	W.TMP+0(R4),(R5)+ ;IF OBJECT CODES DON'T MATCH
   1274	003356	001357 				BNE	50$		;THEN REJECT.
   1275	003360	116401 	000015 			MOVB	W.TMP+1(R4),R1	;GET  NAME LENGTH
   1276	003364	120125 				CMPB	R1,(R5)+	;AND IF NO MATCH
   1277	003366	001353 				BNE	50$		;THEN REJECT THIS ALSO.
   1278	003370	016402 	000016 			MOV	W.TMP+2(R4),R2	;POINT TO BEGINNING OF TERMINAL NAME
   1279	003374	122225 			80$:	CMPB	(R2)+,(R5)+	;AND COMPARE THE NAMES
   1280	003376	001347 				BNE	50$		;IF NO MATCH, REJECT
   1281	003400					SOB	R1,80$		;CHECK THE FULL NAME
	003400	005301 				DEC	R1
	003402	001374 				BNE	80$
   1282	003404	116401 	000015 			MOVB	W.TMP+1(R4),R1	;GET LENGTH AGAIN
   1283	003410	160105 				SUB	R1,R5		;AND
   1284	003412	162705 	000022 			SUB	#T.NAM,R5	;BACK UP TO TCB BEGINNING
   1285
   1286					; DISPATCH MESSAGE TO REQUEST PROCESSOR
   1287
   1288									;R5 POINTS TO TCB
   1289	003416	016400 	000032 		90$:	MOV	W.NSP(R4),R0	;GET
   1290	003422	016000 	000012 			MOV	C.STS(R0),R0	;MESSAGE ADDRESS
   1291	003426	116000 	000001 			MOVB	1(R0),R0	;AND REQUEST CODE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 21-2
SPECIFY	-  <SPECIFY> MESSAGE PRE-PROCESSOR
   1292	003432	142700 	177760 			BICB	#^C17,R0	;CLEAR OUT GARBAGE
   1293	003436	006300 				ASL	R0		;MAKE A WORD INDEX
   1294	003440					CALLR	@SPCDSP(R0)	;DISPATCH <SPECIFY> MESSAGE
	003440	000170 	000200'			JMP	@SPCDSP(R0)
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 22
RESERVE	-   <SPECIFY-RESERVE> PROCESSOR

   1296						.SBTTL	RESERVE	-   <SPECIFY-RESERVE> PROCESSOR
   1297					;+
   1298					; THIS ROUTINE RECEIVES CONTROL FROM THE <SPECIFY> PRE-PROCESSOR.
   1299					; ITS FUNCTION IS TO RESERVE A TERMINAL   FOR A REQUESTOR.
   1300					; THE STATE OF THE TERMINAL IS CHECKED AND IF FREE, IT IS RESERVED.
   1301					;
   1302					; NOTE:	ANY REFERRAL CCB IS LEFT ALONE UNTIL THE FULL COMMAND MESSAGE
   1303					;	IS PROCESSED (INCLUDING CONCATENATED MESSAGES)
   1304					;
   1305					;
   1306					; INPUT:
   1307					;	R5= ADDRESS OF TCB
   1308					;	R4= ADDRESS OF WORKING CCB
   1309					;	R3= ADDRESS OF CONTROL PCB
   1310					;
   1311					; OUTPUT:
   1312					;	R4= ADDRESS OF WORKING CCB
   1313					;	R0= RESPONSE CODE
   1314					;-
   1315
   1316	003444				RESERVE:
   1317	003444	032765 	060000 	000014 		BIT	#TF.RAL,T.FLG(R5) ;IF NOT READY FOR ALLOCATION
   1318	003452	001004 				BNE	10$		;OR
   1319	003454	032765 	000020 	000012 		BIT	#TS.RS,T.STS(R5) ;TERMINAL RESERVED
   1320	003462	001404 				BEQ	20$		;THEN
   1321	003464				10$:	RESPOND	RC.RNA		;ERROR - RESOURCE NOT AVAILABLE
	003464	012700 	000032 			MOV	#RC.RNA,R0
	003470	000167 	002504 			JMP	RSPNS
   1322
   1323					; RESERVE TERMINAL
   1324
   1325	003474	016465 	000004 	000010 	20$:	MOV	W.CID(R4),T.RID(R5) ;STORE CONTROL ID
   1326	003502	010365 	000004 			MOV	R3,T.PCBR(R5)	;STORE CONTROL PCB THREAD IN TCB
   1327	003506	052765 	000020 	000012 		BIS	#TS.RS,T.STS(R5) ;SET STATUS= 'RESERVED'
   1328	003514					CALL	SETRES		;LINK INTO RESERVED LIST.
	003514	004767 	004364 			JSR	PC,SETRES
   1329
   1330	003520					RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
	003520	012700 	000001 			MOV	#RC.INT,R0
	003524	000167 	002450 			JMP	RSPNS
   1331
   1332					;+
   1333					; SEND 'SPECIFY-SHARE' NOT SUPPORTED
   1334					;-
   1335
   1336	003530				SHARE:	RESPOND	RC.SHN		;ERROR - SHARED ACCESS NOT SUPPORTED
	003530	012700 	000035 			MOV	#RC.SHN,R0
	003534	000167 	002440 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 23
REFER	-   <SPECIFY-REFER> REQUEST PROCESSOR

   1338						.SBTTL	REFER	-   <SPECIFY-REFER> REQUEST PROCESSOR
   1339					;+
   1340					; THIS ROUTINE RECEIVES REFER MESSAGES.  IF THIS IS A NEW CONTROL LINK,
   1341					; THEN ALLOCATE A REFERRAL CCB AND MARK IT AS BEING CREATED BY US.  THEN
   1342					; ASSOCIATE THE SPECIFIED RESOURCE WITH THE CONTROL LINK.
   1343					;
   1344					; INPUT:
   1345					;	R5= ADDRESS OF TCB
   1346					;	R4= ADDRESS OF WORKING CCB
   1347					;	R3= ADDRESS OF PCB
   1348					;
   1349					; OUTPUT:
   1350					;	R4= ADDRESS OF WORKING CCB
   1351					;	R0= RESPONSE CODE
   1352					;
   1353					;
   1354					;-
   1355
   1356	003540				REFER:
   1357	003540	010564 	000014 			MOV	R5,W.TMP(R4)	; SAVE THE TCB
   1358	003544					CALL	FNDREF		; CHECK REFERRAL LIST FOR CONTROL ID
	003544	004767 	004362 			JSR	PC,FNDREF
   1359	003550	103020 				BCC	80$		; AND IF NOT FOUND
   1360
   1361					; ALLOCATE AND FORMAT A REFERRAL CCB
   1362
   1363	003552				20$:	PUSH	R4		;WORKING CCB ADDRESS
	003552	010446 				MOV	R4,-(SP)
   1364	003554					CALL	$CCBGT		;AND GET A CCB.
	003554	004767 	000000G			JSR	PC,$CCBGT
   1365	003560	010405 				MOV	R4,R5		;COPY ITS ADDRESS
   1366	003562					POP	R4		;AND RESTORE THE WORKING CCB.
	003562	012604 				MOV	(SP)+,R4
   1367	003564	103003 				BCC	30$		;IF NOT FOUND,
   1368	003566					CALL	NRMRWT		;WAIT A TICK.
	003566	004767 	174510 			JSR	PC,NRMRWT
   1369	003572	000767 				BR	20$		;AND TRY AGAIN.
   1370
   1371	003574	016465 	000004 	000004 	30$:	MOV	W.CID(R4),R.CID(R5) ;STORE CONTROL ID
   1372	003602	005065 	000012 			CLR	R.STS(R5)	;CLEAR STATUS
   1373	003606					CALL	SETREF		;AND LINK INTO REFERRAL LIST.
	003606	004767 	004260 			JSR	PC,SETREF
   1374
   1375					; SET RESOURCE BEING REFERRED
   1376
   1377	003612	016465 	000014 	000016 	80$:	MOV	W.TMP(R4),R.TCB(R5) ;LINK TCB TO CCB
   1378	003620					RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
	003620	012700 	000001 			MOV	#RC.INT,R0
	003624	000167 	002350 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 24
ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR

   1380						.SBTTL	ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR
   1381					;+
   1382					; THIS ROUTINE RECEIVES CONTROL FROM THE ATS RESOURCE MESSAGE DISPATCHER.
   1383					; IT GETS THE CONTROL ID AND SEARCHES THE RESERVED TERMINAL LIST
   1384					; FOR IT.  IF FOUND, THE <ACCESS> MESSAGE IS DISPATCHED.  ELSE A CHECK IS
   1385					; MADE FOR A REQUEST TYPE= RELEASE.  IF RELEASE, THE MESSAGE IS DISPATCHED,
   1386					; ELSE THE ACCESS IS REJECTED.
   1387					;
   1388					; INPUTS:
   1389					;	APR6= BIASED INTO RESOURCE MESSAGE
   1390					;	R4= ADDRESS OF WORKING CCB
   1391					;	R3= ADDRESS OF CONTROL PCB (OVER WHICH MESSAGE WAS RECEIVED)
   1392					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1393					;		= AT 'SRVTYPE' FIELD
   1394					;	R0= MESSAGE SUBTYPE
   1395					;
   1396					; OUTPUT:
   1397					;	APR6= BIASED INTO RESOURCE MESSAGE
   1398					;	R4= ADDRESS OF WORKING CCB
   1399					;	R3= ADDRESS OF PCB
   1400					;	R2= ADDRESS OF RESOURCE MESSAGE
   1401					;	R1= CONTROL ID
   1402					;
   1403					;	IF SUCCESS:
   1404					;	R5= ADDRESS OF TCB
   1405					;
   1406					;	IF FAILURE:
   1407					;	R0= RESPONSE CODE
   1408					;-
   1409
   1410	003630				ACCESS:				;FIRST MESSAGE ENTRY POINT
   1411
   1412					; RANGE CHECK REQUEST TYPE
   1413
   1414	003630	001403 				BEQ	10$		;IF EQ, INVALID REQUEST TYPE
   1415	003632	122700 	000004 			CMPB	#AC.MAX,R0 	;<ACCESS> TYPE IN RANGE?
   1416	003636	103002 				BHIS	20$		;IF LOS, YES- CONTINUE
   1417	003640				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	003640	000167 	002330 			JMP	INVALID
   1418
   1419					; LOOK UP TCB
   1420
   1421	003644				20$:	CALL	FNDRES		;CHECK RESERVED LIST FOR TERMINAL
	003644	004767 	004310 			JSR	PC,FNDRES
   1422	003650	103010 				BCC	40$		;IF CC, FOUND IT
   1423	003652	122700 	000004 			CMPB	#AC.REL,R0	;IS THIS A RELEASE?
   1424	003656	001404 				BEQ	30$		;IF EQ, YES
   1425	003660					RESPOND	RC.RSE		;ERROR - REQUEST OUT OF SEQUENCE
	003660	012700 	000047 			MOV	#RC.RSE,R0
	003664	000167 	002310 			JMP	RSPNS
   1426
   1427	003670	005005 			30$:	CLR	R5		;INDICATE TCB NOT FOUND
   1428	003672	006300 			40$:	ASL	R0		;MAKE A WORD INDEX
   1429	003674					CALLR	@ACCDSP(R0)	;DISPATCH <ACCESS> MESSAGE
	003674	000170 	000210'			JMP	@ACCDSP(R0)
   1430
   1431					;+
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 24-1
ACCESS	-  <ACCESS> MESSAGE PRE-PROCESSOR

   1432					; SEND 'ACCESS-OPEN ON SINGLE LINK' NOT SUPPORTED
   1433					;-
   1434
   1435	003700				OPEN1:	RESPOND	RC.SLN		;ERROR - SINGLE LINK NOT SUPPORTED
	003700	012700 	000040 			MOV	#RC.SLN,R0
	003704	000167 	002270 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 25
OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR

   1437						.SBTTL	OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR
   1438					;+
   1439					; THIS ROUTINE RECEIVES CONTROL FROM THE <ACCESS> MESSAGE PRE-PROCESSOR.
   1440					; ITS FUNCTION IS TO OPEN A TERMINAL FOR A REQUESTOR.  THE BULA RECEIVED
   1441					; IN THE <OPEN> MESSAGE INDICATES THE DATA PIPE ONTO WHICH THE TERMINAL IS
   1442					; TO BE OPENED.  THE BULA IS VERIFIED TO BE A VALID DATA PIPE ASSOCIATED
   1443					; WITH THE REQUESTOR.  IF OK, THE DATA PIPE IS CHECKED TO BE CONNECTED,
   1444					; AND IF SO,  A START CCB IS QUEUED TO THE APPROPRIATE DIALOGUE MANAGER.
   1445					; [THE OPEN PROCESS IS COMPLETED IN THE <OPEN COMPLETE> PROCESSOR].
   1446					;
   1447					; INPUT:
   1448					;	APR6= BIASED INTO RESOURCE MESSAGE
   1449					;	R5= ADDRESS OF TCB
   1450					;	R4= ADDRESS OF WORKING CCB
   1451					;	R3= ADDRESS OF PCB
   1452					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1453					;		= AT 'SRVTYPE' FIELD
   1454					;
   1455					; OUTPUT:
   1456					;	IF SUCCESS:
   1457					;	R4= ADDRESS OF WORKING CCB
   1458					;
   1459					;	IF FAILURE:
   1460					;	R4= ADDRESS OF WORKING CCB
   1461					;	R0= RESPONSE CODE
   1462					;
   1463					;-
   1464
   1465	003710				OPEN2:
   1466	003710	032765 	000057 	000012 		BIT	#TS.ROP,T.STS(R5) ;TERMINAL READY FOR OPEN?
   1467	003716	001404 				BEQ	10$		;IF EQ, YES
   1468	003720					RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
	003720	012700 	000046 			MOV	#RC.RSI,R0
	003724	000167 	002250 			JMP	RSPNS
   1469
   1470	003730				10$:	CALL	GET1		;PICK UP THE SERVER OBJECT TYPE
	003730	004767 	003732 			JSR	PC,GET1
   1471	003734	010001 				MOV	R0,R1		;AND FIND THE SERVER PDV INDEX.
   1472	003736					CALL	$MPOBJ
	003736	004767 	000000G			JSR	PC,$MPOBJ
   1473	003742	103402 				BCS	15$		;IF CC, FOUND
   1474	003744	005701 				TST	R1		;IT MUST BE A
   1475	003746	001004 				BNE	20$		;MCB PROCESS.
   1476	003750				15$:	RESPOND	RC.SNE		;ERROR - SERVER DOES NOT EXIST
	003750	012700 	000042 			MOV	#RC.SNE,R0
	003754	000167 	002220 			JMP	RSPNS
   1477
   1478	003760	110165 	000017 		20$:	MOVB	R1,T.SPI(R5)	;SET SERVER PDV INDEX IN TCB.
   1479	003764					CALL	GET1		;GET LENGTH OF SRVDESC FIELD
	003764	004767 	003676 			JSR	PC,GET1
   1480	003770	013764 	172354 	000014 		MOV	@#KISAR6,C.BUF(R4) ;SET BIAS
   1481	003776	010264 	000016 			MOV	R2,C.BUF+2(R4)	;ADDRESS
   1482	004002	010064 	000020 			MOV	R0,C.CNT(R4)	;AND LENGTH FOR OPEN PARAMETERS.
   1483	004006	060002 				ADD	R0,R2		;BYPASS TO
   1484	004010					CALL	GET1		;CHECK SRVOPTS FIELD.
	004010	004767 	003652 			JSR	PC,GET1
   1485	004014	005700 				TST	R0		;IF NULL
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 25-1
OPEN	-   <ACCESS-OPEN> MESSAGE PROCESSOR

   1486	004016	001410 				BEQ	40$		;THEN SIGNAL ERROR
   1487	004020					CALL	GET1		;GET BULA FROM SRVOPTS FIELD.
	004020	004767 	003642 			JSR	PC,GET1
   1488
   1489					; VALIDATE BULA
   1490
   1491	004024					PUSH	R3		;SAVE CONTROL PCB ADDRESS
	004024	010346 				MOV	R3,-(SP)
   1492	004026					CALL	$PCBPT		;CHECK RANGE OF BULA
	004026	004767 	000000G			JSR	PC,$PCBPT
   1493	004032	010300 				MOV	R3,R0		;GET PCB ADDRESS OF BULA PIPE
   1494	004034					POP	R3		;RESTORE CONTROL PCB ADDRESS
	004034	012603 				MOV	(SP)+,R3
   1495	004036	103004 				BCC	60$		;IF CC, RANGE IS GOOD
   1496	004040				40$:	RESPOND	RC.ISO		;ERROR - INVALID SERVER OPTION
	004040	012700 	000041 			MOV	#RC.ISO,R0
	004044	000167 	002130 			JMP	RSPNS
   1497
   1498	004050	032760 	020000 	000010 	60$:	BIT	#PS.DAT,P.STS(R0) ;IS THIS A DATA PIPE?
   1499	004056	001770 				BEQ	40$		;IF EQ, NO- GIVE ISO ERROR
   1500	004060	026360 	000006 	000006 		CMP	P.USER(R3),P.USER(R0) ;CONTROL PIPE OK FOR DATA PIPE?
   1501	004066	001364 				BNE	40$		;IF NE, NO- GIVE ISO ERROR
   1502	004070	032760 	000002 	000010 		BIT	#PS.CC,P.STS(R0) ;DATA PIPE CONNECTED?
   1503	004076	001006 				BNE	70$		;IF NE, YES- CONTINUE
   1504	004100					RESPOND	RC.RJS,RD.PNC	;ERROR - DATA PIPE NOT CONNECTED
	004100	012700 	000045 			MOV	#RC.RJS,R0
	004104	012705 	000001 			MOV	#RD.PNC,R5
	004110	000167 	002064 			JMP	RSPNS
   1505
   1506	004114	010065 	000006 		70$:	MOV	R0,T.PCBD(R5)	;SET DATA PCB INTO TCB
   1507	004120	052765 	000002 	000012 		BIS	#TS.OPP,T.STS(R5) ;SET OPEN PENDING
   1508
   1509	004126	005064 	000022 			CLR	C.FLG(R4)	;THERE IS A SECOND BUFFER.
   1510	004132	012764 	000017 	000026 		MOV	#T.SPI,C.BUF2+2(R4) ;SET RETURN DATA ADDRESS
   1511	004140	060564 	000026 			ADD	R5,C.BUF2+2(R4)	;TO POINT INTO DATA PCB
   1512	004144	012764 	000001 	000030 		MOV	#1,C.CNT2(R4)	;ONE BYTE OF SERVER PROCESS INDEX.
   1513
   1514					; GET DIALOG MANAGER PDV INDEX FROM GENERIC SERVER
   1515
   1516	004152					$QLLC	#<FC.CTL!FS.GET>,T.SPI(R5),T.NUM(R5) ;SEND TO SERVER
	004152	012764 	006006 	000010 		MOV	#<FC.CTL!FS.GET>,C.FNC(R4)
	004160	116564 	000017 	000007 		MOVB	T.SPI(R5),C.STA(R4)
	004166	116564 	000016 	000006 		MOVB	T.NUM(R5),C.LIN(R4)
	004174	004767 	000000G			JSR	PC,$LLCRS
   1517	004200					RETURN			;EXIT
	004200	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 26
SRVGOT	-	PARAMETERS RECIEVED FROM GENERIC SERVER

   1519						.SBTTL	SRVGOT	-	PARAMETERS RECIEVED FROM GENERIC SERVER
   1520					;+
   1521					; THIS ROUTINE RECIEVES THE SERVER PDV INDEX FOR THE SPECIFIED RESOURCE
   1522					; AND ATTACHES THAT LLC TO THE DLC/DDM THROUGH THE PDV ENTRY FOR THAT LLC
   1523					; AND $LLCTA.  IT THEN ISSUES AN OPEN TO THE GIVEN SERVER.
   1524					;
   1525					; INPUTS:
   1526					;	R4 - ADDRESS OF GET COMPLETE CCB:
   1527					;		C.STS = +1 IF SERVER IS AVAILABLE FOR GIVEN RESOURCE
   1528					;			-1 IF NO SERVER IS AVAILABLE
   1529					;		@C.BUF2 = RAD50 SERVER PROCESS PDV INDEX
   1530					;-
   1531
   1532	004202				SRVGOT:				; ENTRY POINT
   1533	004202					GTTCB$			; GET THE RESOURCE CONTROL BLOCK
	004202	005000 				CLR	R0
	004204	156400 	000006 			BISB	C.LIN(R4),R0
	004210	004767 	000000G			JSR	PC,$TCBPT
   1534	004214	016503 	000004 			MOV	T.PCBR(R5),R3	; AND CONTROL PIPE ADDRESS.
   1535	004220	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4) ; RESET PIPE NUMBER.
   1536	004226	005764 	000012 			TST	C.STS(R4)	; IF ERROR IN FINDING SERVER
   1537	004232	100453 				BMI	70$		; THEN SEND ERROR RC.RNS.
   1538	004234	005001 				CLR	R1		; GET THE SERVER INDEX
   1539	004236	156501 	000017 			BISB	T.SPI(R5),R1
   1540	004242	110164 	000007 			MOVB	R1,C.STA(R4)	; STORE FOR THE START AND
   1541	004246					CALL	GIVLIN		; GIVE THE LINE TO THE SERVER.
	004246	004767 	003436 			JSR	PC,GIVLIN
   1542	004252	016402 	000032 			MOV	W.NSP(R4),R2	; GET NSP MESSAGE
   1543	004256					MAP	C.BUF(R4)	; TO TANGLE WITH
	004256	016467 	000014 	172354 		MOV	  C.BUF(R4),KISAR6
   1544	004264	016402 	000012 			MOV	C.STS(R4),R2	; THE RESOURCE MESSAGE.
   1545	004270	062702 	000005 			ADD	#5,R2		; BYPASS FIXED FIELDS
   1546	004274					CALL	GET1		; AND
	004274	004767 	003366 			JSR	PC,GET1
   1547	004300	060002 				ADD	R0,R2		; SERVER DESCRIPTION
   1548	004302					CALL	GET1		; TO GET TO SERVER OPTIONS.
	004302	004767 	003360 			JSR	PC,GET1
   1549	004306	013764 	172354 	000014 		MOV	@#KISAR6,C.BUF(R4) ; SET BIAS
   1550	004314	010264 	000016 			MOV	R2,C.BUF+2(R4)	; ADDRESS
   1551	004320	010064 	000020 			MOV	R0,C.CNT(R4)	; AND LENGTH.
   1552	004324	012764 	100000 	000022 		MOV	#CF.LB,C.FLG(R4)
   1553	004332					$QLLC	#<FC.CTL!FS.STR>,T.SPI(R5),T.NUM(R5) ; START HIM UP.
	004332	012764 	001006 	000010 		MOV	#<FC.CTL!FS.STR>,C.FNC(R4)
	004340	116564 	000017 	000007 		MOVB	T.SPI(R5),C.STA(R4)
	004346	116564 	000016 	000006 		MOVB	T.NUM(R5),C.LIN(R4)
	004354	004767 	000000G			JSR	PC,$LLCRS
   1554	004360					RETURN
	004360	000207 				RTS	PC
   1555
   1556	004362	042765 	000002 	000012 	70$:	BIC	#TS.OPP,T.STS(R5) ; RESET OPEN PENDING
   1557	004370					RESPOND	RC.RNS		; ERROR - RESOURCE NOT SUPPORTED BY SERVER
	004370	012700 	000044 			MOV	#RC.RNS,R0
	004374	000167 	001600 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 27
SRVSTR	-	START COMPLETE PROCESSOR

   1559						.SBTTL	SRVSTR	-	START COMPLETE PROCESSOR
   1560					;+
   1561					; THIS ROUTINE RECEIVES CONTROL WHEN A DIALOGUE MANAGER POSTS AN
   1562					; OPEN COMPLETION TO THE RESOURCE MANAGER.
   1563					; THE OPEN CCB IS RETURNED TO THE POOL.  THE TCB ASSOCIATED WITH THE
   1564					; TERMINAL NUMBER IS LOOKED UP, AND THE REGISTERS ARE SET UP FOR THE
   1565					; RESPONSE PROCESSOR.  THEN A RESPONSE MESSAGE IS GENERATED BASED ON THE
   1566					; STATUS OF THE OPEN COMPLETION.
   1567					;
   1568					; INPUT:
   1569					;	R4= ADDRESS OF OPEN CCB
   1570					;
   1571					; OUTPUT:
   1572					;	R4= ADDRESS OF CCB-RDB
   1573					;	R0= RESPONSE CODE
   1574					;
   1575					;	IF SUCCESS:
   1576					;	R5(LOW BYTE)= TERMINAL NUMBER (BTN)
   1577					;	R5(HIGH BYTE)= BOUNDARY USER LINK ADDRESS (BULA)
   1578					;
   1579					;-
   1580
   1581	004400				SRVSTR:
   1582	004400					GTTCB$			;GET THE TCB
	004400	005000 				CLR	R0
	004402	156400 	000006 			BISB	C.LIN(R4),R0
	004406	004767 	000000G			JSR	PC,$TCBPT
   1583	004412	016503 	000004 			MOV	T.PCBR(R5),R3	;THE CONTROL PIPE
   1584	004416	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4) ;AND RESET THE PIPE NUMBER.
   1585	004424	042765 	000002 	000012 		BIC	#TS.OPP,T.STS(R5) ;CLEAR START PENDING
   1586
   1587					; CHECK FOR SUCCESS OR FAILURE ON START
   1588
   1589	004432	105764 	000012 			TSTB	C.STS(R4)	;START SUCCESSFUL?
   1590	004436	100006 				BPL	60$		;IF PL, YES
   1591	004440					RESPOND	RC.RJS,RD.STR	;ERROR - STARTUP FAILED
	004440	012700 	000045 			MOV	#RC.RJS,R0
	004444	012705 	000002 			MOV	#RD.STR,R5
	004450	000167 	001524 			JMP	RSPNS
   1592
   1593	004454	016503 	000006 		60$:	MOV	T.PCBD(R5),R3	;GET DATA PCB ADDRESS
   1594	004460					CALL	SETOPN		;LINK TCB INTO OPEN LIST.
	004460	004767 	003432 			JSR	PC,SETOPN
   1595	004464	052765 	000004 	000012 		BIS	#TS.OP,T.STS(R5) ;SET STATUS= 'OPEN'
   1596	004472	116546 	000016 			MOVB	T.NUM(R5),-(SP) ;SAVE TERMINAL NUMBER  (BTN)
   1597	004476	116366 	000020 	000001 		MOVB	P.NUM(R3),1(SP) ;PUT BULA IN HIGH BYTE
   1598	004504	012605 				MOV	(SP)+,R5	;LOAD BULA-BTN COMBO IN R5
   1599	004506					RESPOND	RC.INT		;SUCCESS - RESOURCE OPEN
	004506	012700 	000001 			MOV	#RC.INT,R0
	004512	000167 	001462 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 28
CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR

   1601						.SBTTL	CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR
   1602					;+
   1603					; THIS ROUTINE RECEIVES CONTROL FROM THE <ACCESS> MESSAGE PRE-PROCESSOR.
   1604					; ITS FUNCTION IS TO CLOSE A TERMINAL FOR A REQUESTOR.  THE 'OPEN' BIT
   1605					; IS CLEARED, THE 'CLOSE PENDING' BIT IS SET, AND THE T.PCBR THREAD IS
   1606					; REDIRECTED FROM THE DATA PIPE TO THE CONTROL PIPE.
   1607					;
   1608					; INPUT:
   1609					;	APR6= BIASED INTO RESOURCE MESSAGE
   1610					;	R5= ADDRESS OF TCB
   1611					;	R4= ADDRESS OF WORKING CCB
   1612					;	R3= ADDRESS OF PCB
   1613					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   1614					;		= AT 'SRVTYPE' FIELD
   1615					;
   1616					; OUTPUT:
   1617					;	IF SUCCESS:
   1618					;	R4= ADDRESS OF WORKING CCB
   1619					;
   1620					;	IF FAILURE:
   1621					;	R4= ADDRESS OF WORKING CCB
   1622					;	R0= RESPONSE CODE
   1623					;
   1624					;-
   1625
   1626						.ENABL LSB
   1627
   1628	004516				CLOSE:				;ENTRY POINT
   1629	004516	032765 	000004 	000012 		BIT	#TS.OP,T.STS(R5) ;TERMINAL OPEN?
   1630	004524	001004 				BNE	CLOSE1		;IF NE, YES
   1631	004526					RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
	004526	012700 	000046 			MOV	#RC.RSI,R0
	004532	000167 	001442 			JMP	RSPNS
   1632
   1633					; SECONDARY ENTRY POINT (FROM RELEASE PROCESSOR)
   1634
   1635	004536				CLOSE1:
   1636	004536	005202 				INC	R2		;BYPASS SERVER TYPE
   1637	004540					CALL	GET1		;AND DESCRIPTOR
	004540	004767 	003122 			JSR	PC,GET1
   1638	004544	060002 				ADD	R0,R2
   1639	004546					CALL	GET1		;GET LENGTH OF CLOSE OPTIONS
	004546	004767 	003114 			JSR	PC,GET1
   1640	004552	013764 	172354 	000014 		MOV	@#KISAR6,C.BUF(R4) ;AND
   1641	004560	010264 	000016 			MOV	R2,C.BUF+2(R4)	;SET UP CONTROL CCB.
   1642	004564	010064 	000020 			MOV	R0,C.CNT(R4)
   1643	004570	000404 				BR	80$
   1644
   1645					; SECONDARY ENTRY POINT (FROM ERROR PROCESSOR)
   1646
   1647	004572				CLOSE2:
   1648	004572	005064 	000016 			CLR	C.BUF+2(R4)	;INDICATE NO OPTIONAL DATA
   1649	004576	005064 	000020 			CLR	C.CNT(R4)
   1650
   1651					; SEND CLOSE (STOP) MESSAGE TO DIALOGUE MANAGER
   1652
   1653	004602	042765 	000004 	000012 	80$:	BIC	#TS.OP,T.STS(R5) ;TERMINAL NO LONGER OPEN
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 28-1
CLOSE	-   <ACCESS-CLOSE> MESSAGE PROCESSOR

   1654	004610	052765 	000001 	000012 		BIS	#TS.CLP,T.STS(R5) ;SET CLOSE PENDING
   1655	004616					$QLLC	#<FC.CTL!FS.STP>,T.SPI(R5),T.NUM(R5) ;SEND STOP MESSAGE
	004616	012764 	002006 	000010 		MOV	#<FC.CTL!FS.STP>,C.FNC(R4)
	004624	116564 	000017 	000007 		MOVB	T.SPI(R5),C.STA(R4)
	004632	116564 	000016 	000006 		MOVB	T.NUM(R5),C.LIN(R4)
	004640	004767 	000000G			JSR	PC,$LLCRS
   1656	004644	000241 				CLC			;INDICATE SUCCESS
   1657	004646					RETURN			;EXIT
	004646	000207 				RTS	PC
   1658
   1659						.DSABL LSB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 29
SRVSTP	-	STOP COMPLETE PROCESSOR

   1661						.SBTTL	SRVSTP	-	STOP COMPLETE PROCESSOR
   1662					;+
   1663					; THIS ROUTINE RECEIVES CONTROL WHEN A DIALOGUE MANAGER POSTS A
   1664					; CLOSE COMPLETION TO THE RESOURCE MANAGER.
   1665					; IF RELEASE PENDING IS SET, THE RELEASE PROCESSOR IS CALLED AT
   1666					; ITS 'RELES1' ENTRY POINT.  IN THIS CASE THE STATUS RETURNED TO
   1667					; THE USER WILL BE FOR A RELEASE REQUEST.
   1668					; IF A RELEASE IS NOT PENDING, A RESPONSE MESSAGE IS RETURNED
   1669					; TO THE USER FOR THE CLOSE REQUEST.
   1670					; IF THE CLOSE IS BEING DONE BECAUSE OF A DISCONNECT ON THE DATA
   1671					; PIPE AND THE CONTROL PIPE IS STILL ACTIVE, A <STATUS-REPORT>
   1672					; MESSAGE IS SENT ON THE CONTROL PIPE FOR THE TERMINAL BEING CLOSED.
   1673					; IN ANY CASE, THE CLOSE CCB IS RETURNED TO THE POOL.
   1674					;
   1675					; INPUT:
   1676					;	R4= ADDRESS OF CLOSE CCB
   1677					;
   1678					; OUTPUT:
   1679					;	R4= ADDRESS OF CCB-RDB
   1680					;	R0= RESPONSE CODE
   1681					;
   1682					;-
   1683
   1684	004650				SRVSTP:				;ENTRY POINT
   1685	004650					GTTCB$			;FIND THE RESOURCE CONTROL BLOCK
	004650	005000 				CLR	R0
	004652	156400 	000006 			BISB	C.LIN(R4),R0
	004656	004767 	000000G			JSR	PC,$TCBPT
   1686	004662	042765 	000001 	000012 		BIC	#TS.CLP,T.STS(R5) ;CLEAR CLOSE PENDING
   1687	004670	016503 	000006 			MOV	T.PCBD(R5),R3	;POINT TO DATA PCB
   1688	004674					CALL	REMOPN		;REMOVE RESOURCE FROM OPEN LIST.
	004674	004767 	003402 			JSR	PC,REMOPN
   1689	004700	005001 				CLR	R1		; TRANSFER RESOURCE
   1690	004702	156501 	000017 			BISB	T.SPI(R5),R1	; FROM THE SERVER
   1691	004706					CALL	GETLIN		; BACK TO NRM.
	004706	004767 	003032 			JSR	PC,GETLIN
   1692
   1693	004712	016503 	000004 		10$:	MOV	T.PCBR(R5),R3	;POINT TO CONTROL PCB
   1694	004716	116364 	000020 	000006 		MOVB	P.NUM(R3),C.LIN(R4) ;AND RESET THE PIPE NUMBER.
   1695	004724	005764 	000032 			TST	W.NSP(R4)	;IF THIS IS A DISCONNECT OPERATION
   1696	004730	001061 				BNE	40$		;THEN
   1697	004732	032763 	000004 	000010 		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING ON CONTROL PIPE?
   1698	004740	001405 				BEQ	20$		;IF EQ, NO
   1699	004742	042765 	001410 	000012 		BIC	#<TS.STE!TS.OSP!TS.RLP>,T.STS(R5) ;ELSE CLEAR PENDING BITS
   1700	004750					CALLR	DISCP		;FINISH DISCONNECTING CONTROL PIPE
	004750	000167 	174746 			JMP	DISCP
   1701
   1702	004754	016500 	000006 		20$:	MOV	T.PCBD(R5),R0	;GET DATA PCB ADDRESS
   1703	004760	032760 	000004 	000010 		BIT	#PS.DIP,P.STS(R0) ;DISCONNECT PENDING ON DATA PIPE?
   1704	004766	001431 				BEQ	30$		;IF EQ, NO
   1705	004770	032763 	000002 	000010 	25$:	BIT	#PS.CC,P.STS(R3) ;IF CONTROL PIPE
   1706	004776	001416 				BEQ	26$		 ;  IS STILL ACTIVE,
   1707	005000	016501 	000010 			MOV	T.RID(R5),R1	 ;  SEND A <STATUS-REPORT> MESSAGE
   1708	005004	012700 	000007 			MOV	#RP.DSC,R0	 ;  ON THE PIPE
   1709	005010					CALL	ASYREP		 ;  ASYNCHRONOUSLY
	005010	004767 	001012 			JSR	PC,ASYREP
   1710	005014	103007 				BCC	26$		;IF NO RESOURCES
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 29-1
SRVSTP	-	STOP COMPLETE PROCESSOR

   1711	005016	010564 	000014 			MOV	R5,W.TMP(R4)	;SAVE THE TCB ADDRESS
   1712	005022					CALL	NRMRWT		;WAIT A TICK
	005022	004767 	173254 			JSR	PC,NRMRWT
   1713	005026	016405 	000014 			MOV	W.TMP(R4),R5	;RESTORE THE TCB
   1714	005032	000756 				BR	25$		;AND TRY AGAIN
   1715
   1716	005034	016503 	000006 		26$:	MOV	T.PCBD(R5),R3	 ;POINT TO DATA PCB
   1717	005040	042765 	001410 	000012 		BIC	#<TS.STE!TS.OSP!TS.RLP>,T.STS(R5) ;CLEAR PENDING BITS
   1718	005046					CALLR	DISDP		;FINISH DISCONNECTING DATA PIPE
	005046	000167 	175152 			JMP	DISDP
   1719
   1720	005052	032765 	001000 	000012 	30$:	BIT	#TS.STE,T.STS(R5) ;START ERROR PENDING?
   1721	005060	001405 				BEQ	40$		;IF EQ, NO
   1722	005062	042765 	001000 	000012 		BIC	#TS.STE,T.STS(R5) ;ELSE YES- CLEAR START ERROR PENDING
   1723	005070				35$:	CALLR	$CCBRT		;RETURN STOP CCB
	005070	000167 	000000G			JMP	$CCBRT
   1724
   1725	005074	032765 	000010 	000012 	40$:	BIT	#TS.RLP,T.STS(R5) ;IF RELEASE PENDING
   1726	005102	001034 				BNE	50$		;OR
   1727	005104	032765 	000400 	000012 		BIT	#TS.OSP,T.STS(R5) ;NO OPR RPT REQUEST PENDING
   1728	005112	001430 				BEQ	50$		;THEN
   1729	005114	032763 	000002 	000010 	45$:	BIT	#PS.CC,P.STS(R3) ;IF CONTROL PIPE
   1730	005122	001424 				BEQ	50$		 ;  IS STILL ACTIVE,
   1731	005124	042765 	000400 	000012 		BIC	#TS.OSP,T.STS(R5) ;CLEAR OPERATIONAL STATUS BIT
   1732	005132	016501 	000010 			MOV	T.RID(R5),R1	;GET CONTROL ID
   1733	005136	016400 	000024 			MOV	C.BUF2(R4),R0	;GET OPERATIONAL STATUS
   1734	005142					CALL	ASYREP		;AND SEND STATUS-REPORT TO USER
	005142	004767 	000660 			JSR	PC,ASYREP
   1735	005146	103012 				BCC	50$		;IF NOT SUCCESSFUL
   1736	005150	052765 	000400 	000012 		BIS	#TS.OSP,T.STS(R5) ;RESET THE BIT
   1737	005156	010564 	000014 			MOV	R5,W.TMP(R4)	;SAVE THE TCB ADDRESS
   1738	005162					CALL	NRMRWT		;WAIT A TICK
	005162	004767 	173114 			JSR	PC,NRMRWT
   1739	005166	016405 	000014 			MOV	W.TMP(R4),R5	;RESTORE THE TCB
   1740	005172	000750 				BR	45$		;AND TRY AGAIN.
   1741
   1742	005174	005764 	000032 		50$:	TST	W.NSP(R4)	;IF NO ASSOCIATED MESSAGE
   1743	005200	001733 				BEQ	35$		;THEN THROW THIS AWAY.
   1744	005202	032765 	000010 	000012 		BIT	#TS.RLP,T.STS(R5) ;IF RELEASE PENDING
   1745	005210	001405 				BEQ	70$		;THEN
   1746	005212	042765 	000400 	000012 		BIC	#TS.OSP,T.STS(R5) ;CLEAR OPERATIONAL STATUS PENDING
   1747	005220					CALLR	RELES1		;AND RELEASE TERMINAL
	005220	000167 	000112 			JMP	RELES1
   1748
   1749	005224				70$:	RESPOND	RC.INT		;SUCCESS - CONTROL THREAD OPEN
	005224	012700 	000001 			MOV	#RC.INT,R0
	005230	000167 	000744 			JMP	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 30
RELEASE	-   <ACCESS-RELEASE> MESSAGE PROCESSOR

   1751						.SBTTL	RELEASE	-   <ACCESS-RELEASE> MESSAGE PROCESSOR
   1752					;+
   1753					; THIS ROUTINE RECEIVES CONTROL FROM THE <ACCESS> MESSAGE PRE-PROCESSOR.
   1754					; A RELEASE TERMINATES A CONTROL STREAM (IDENTIFIED BY THE 'CONTROL ID').
   1755					; TWO TYPES OF CONTROL STREAMS EXIST: RESERVE STREAMS AND REFER STREAMS.
   1756					; IF A REFER STREAM IS IN EXISTENCE, THE RELEASE DELINKS THE REFERRAL CCB
   1757					; FROM THE REFERRAL LIST (P.REF) AND RETURNS THE CCB TO THE POOL.
   1758					; IF A RESERVE STREAM IS IN EXISTENCE, THE FOLLOWING OCCURS:
   1759					; IF THE TERMINAL IS OPEN, THEN TS.RLP 'RELEASE PENDING' IS SET AND
   1760					; THE TERMINAL IS FIRST CLOSED. [THE CLOSE PROCESSOR WILL RETURN CONTROL
   1761					; TO THE RELES1 ENTRY POINT.]
   1762					; IF THE TERMINAL IS ALREADY CLOSED, THE TCB IS DELINKED FROM THE
   1763					; RESERVED LIST (P.RES) AND THE 'RESERVED' STATUS BIT (TS.RS) IS CLEARED.
   1764					;
   1765					; INPUT:
   1766					;	APR6= BIASED INTO RESOURCE MESSAGE
   1767					;	R5= ADDRESS OF TCB (RESERVE-RELEASE) OR 0 (REFER-RELEASE)
   1768					;	R4= ADDRESS OF WORKING CCB
   1769					;	R3= ADDRESS OF PCB
   1770					;	R2= ADDRESS OF RESOURCE MESSAGE
   1771					;		= AT 'SRVTYPE' FIELD
   1772					;	R1= CONTROL ID
   1773					;
   1774					; OUTPUT:
   1775					;	R4= ADDRESS OF CCB-RDB
   1776					;	R0= RESPONSE CODE
   1777					;
   1778					;-
   1779
   1780						.ENABL LSB
   1781
   1782	005234				RELEASE:
   1783	005234	005705 				TST	R5		;DOES R5 POINT TO TCB?
   1784	005236	001012 				BNE	8$		;IF NE, YES
   1785	005240					CALL	FNDREF		;CHECK REFERRAL LIST
	005240	004767 	002666 			JSR	PC,FNDREF
   1786	005244	103004 				BCC	5$		;IF CC, FOUND CCB WITH CONTROL ID
   1787	005246					RESPOND	RC.RSE		;ERROR - REQUEST OUT OF SEQUENCE
	005246	012700 	000047 			MOV	#RC.RSE,R0
	005252	000167 	000722 			JMP	RSPNS
   1788
   1789					; RELEASE REFERRAL CCB
   1790
   1791	005256				5$:	CALL	REMREF		;REMOVE FROM REFERRAL LIST
	005256	004767 	002724 			JSR	PC,REMREF
   1792	005262	000442 				BR	90$		;AND SEND FINAL RESPONSE.
   1793
   1794					; RELEASE TCB
   1795
   1796	005264	032765 	000053 	000012 	8$:	BIT	#TS.RRL,T.STS(R5) ;TERMINAL READY FOR RELEASE?
   1797	005272	001004 				BNE	10$		;IF NE, NO
   1798	005274	032765 	000020 	000012 		BIT	#TS.RS,T.STS(R5) ;TERMINAL RESERVED?
   1799	005302	001004 				BNE	20$		;IF NE, YES- CONTINUE
   1800	005304				10$:	RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
	005304	012700 	000046 			MOV	#RC.RSI,R0
	005310	000167 	000664 			JMP	RSPNS
   1801
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 30-1
RELEASE	-   <ACCESS-RELEASE> MESSAGE PROCESSOR

   1802	005314	032765 	000004 	000012 	20$:	BIT	#TS.OP,T.STS(R5) ;TERMINAL OPEN?
   1803	005322	001410 				BEQ	40$		;IF EQ, NO
   1804
   1805
   1806					; CLOSE TERMINAL BEFORE RELEASING
   1807
   1808	005324	052765 	000010 	000012 		BIS	#TS.RLP,T.STS(R5) ;SET RELEASE PENDING
   1809	005332					CALLR	CLOSE1		;CLOSE TERMINAL BEFORE RELEASING
	005332	000167 	177200 			JMP	CLOSE1
   1810
   1811					; RETURN FROM CLOSE COMPLETE HERE
   1812
   1813	005336				RELES1:
   1814	005336	042765 	000010 	000012 		BIC	#TS.RLP,T.STS(R5) ;CLEAR RELEASE PENDING
   1815
   1816	005344				40$:	CALL	REMRES		;REMOVE FROM RESERVED LIST
	005344	004767 	002700 			JSR	PC,REMRES
   1817	005350	042765 	000020 	000012 		BIC	#TS.RS,T.STS(R5) ;CLEAR RESERVED STATUS
   1818	005356					CALL	FNDREF		;IF THERE IS A REFERRAL CCB
	005356	004767 	002550 			JSR	PC,FNDREF
   1819	005362	103402 				BCS	90$		;THEN
   1820	005364					CALL	REMREF		;RELEASE THAT ALSO.
	005364	004767 	002616 			JSR	PC,REMREF
   1821	005370				90$:	RESPOND	RC.FIN		;SUCCESS - RESOURCE CLOSED
	005370	012700 	000000 			MOV	#RC.FIN,R0
	005374	000167 	000600 			JMP	RSPNS
   1822
   1823						.DSABL LSB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 31
ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR

   1825						.SBTTL	ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR
   1826					;+
   1827					; THIS ROUTINE RECEIVES CONTROL FROM THE RESOURCE MANAGER DISPATCHER.
   1828					; IT DOES PROCESSING COMMON TO ALL ASSIGN REQUEST MESSAGES.
   1829					; A RANGE CHECK IS DONE ON THE REQUEST TYPE AND THE MESSAGE IS DISPATCHED.
   1830					;
   1831					; INPUT:
   1832					;	APR6= BIASED INTO RESOURCE MESSAGE
   1833					;	R4= ADDRESS OF WORKING CCB
   1834					;	R3= ADDRESS OF CONTROL PCB
   1835					;	R2= ADDRESS OF RESOURCE MESSAGE
   1836					;		= AT 'MSGFLDS' FIELD
   1837					;	R0= MESSAGE SUBTYPE
   1838					;
   1839					; OUTPUT:
   1840					;	IF SUCCESS:
   1841					;	SAME AS INPUT
   1842					;
   1843					;	IF FAILURE:
   1844					;	SAME AS INPUT, PLUS:
   1845					;	R0= RESPONSE CODE
   1846					;-
   1847
   1848	005400				ASSIGN:
   1849
   1850					; RANGE CHECK REQUEST TYPE
   1851
   1852	005400	005700 				TST	R0
   1853	005402	001403 				BEQ	10$		;IF EQ, INVALID STATUS TYPE
   1854	005404	120027 	000003 			CMPB	R0,#AS.MAX	;ASSIGN TYPE IN RANGE?
   1855	005410	101402 				BLOS	20$		;IF LOS, YES- CONTINUE
   1856	005412				10$:	RESPOND	RC.IRC		;ERROR - INVALID REQUEST CODE
	005412	000167 	000556 			JMP	INVALID
   1857
   1858	005416	006300 			20$:	ASL	R0		;MAKE A WORD INDEX
   1859	005420					CALLR	@ASNDSP(R0)	;AND DISPATCH ASSIGN MESSAGE
	005420	000170 	000254'			JMP	@ASNDSP(R0)
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 32
ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR

   1861		000000 				.REPT	0		; NOT SUPPORTED !!!!
   1862
   1863						.SBTTL	HANDOF	-   <ASSIGN-HANDOFF> MESSAGE PROCESSOR
   1864					;+
   1865					; THIS ROUTINE RECEIVES CONTROL FROM THE ASSIGN MESSAGE PRE-PROCESSOR.
   1866					; ITS PURPOSE IS TO INITIATE A HANDOFF SEQUENCE, USING THE INFORMATION
   1867					; IN THE HANDOFF MESSAGE.
   1868					; ALGORITHM:
   1869					; THE TERMINAL IS CHECKED TO BE IN A PROPER STATE FOR HANDOFF. IF SO,
   1870					; THE PCB TABLE ($PCBTB) IS SEARCHED FOR A PCB WHICH CONTAINS THE
   1871					; USER NUMBER OF THE POTENTIAL HANDOFF RECIPIENT. IF FOUND,  TS.HP AND
   1872					; TS.SRP ARE MARKED, A REFERRAL CCB (POINTING TO THE TCB BEING HANDED
   1873					; OFF) IS LINKED TO THE REFERRAL LIST, AND THE CONTROL PCB OF THE
   1874					; HANDOFF RECIPIENT IS THREADED TO THE TCB. FINALLY, A REFER-
   1875					; STATUS MESSAGE IS SENT TO THE POTENTIAL HANDOFF RECIPIENT.
   1876					;
   1877					; INPUT:
   1878					;	APR6= BIASED INTO RESOURCE MESSAGE
   1879					;	R4= ADDRESS OF WORKING CCB
   1880					;	R3= ADDRESS OF CONTROL PCB
   1881					;	R2= ADDRESS OF RESOURCE MESSAGE
   1882					;		= AT 'NODNAME' FIELD
   1883					;
   1884					; OUTPUT:
   1885					;	IF SUCCESS:
   1886					;	R4= ADDRESS OF WORKING CCB
   1887					;
   1888					;	IF FAILURE:
   1889					;	SAME AS INPUT, PLUS:
   1890					;	R5= ADDRESS OF TCB
   1891					;	R0= RESPONSE CODE
   1892					;-
   1893
   1894					HANDOF:	CALL	FNDRES		;CHECK RESERVED LIST
   1895						BCC	10$		;IF CC, FOUND IT
   1896						RESPOND	RC.RSE		;ERROR - REQUEST SEQUENCE ERROR
   1897
   1898					10$:	BIT	#TS.RHF,T.STS(R5) ;TERMINAL READY FOR HANDOFF?
   1899						BEQ	20$		;IF EQ, YES
   1900						RESPOND	RC.RSI		;ERROR - RESOURCE STATE INCONSISTENCY
   1901
   1902					20$:	CALL	GET1		;GET USER ID OF HANDOFEE
   1903						MOV	R0,R1
   1904						MOV	#P.USER,R0	;GET OFFSET OF USER ID IN PCB
   1905					;	CALL	$SPCB		;SEARCH PCB TABLE FOR USER ID OF HANDOFEE
   1906						BCC	30$		;IF CC, FOUND IT
   1907						RESPOND	RC.HNE		;ERROR - NONEXISTENT HANDOFF TARGET
   1908
   1909					30$:	MOV	W.CID(R4),R1	;CONTROL ID
   1910						PUSH	R4		;SAVE CCB-RDB ADDRESS
   1911						CALL	$CCBGT		;GET A CCB
   1912						BCC	50$		;IF CC, GOT ONE
   1913						POP	R4		;RESTORE CCB-RDB ADDRESS
   1914						MOV	R0,W.TMP(R4)	;SAVE REFERRAL CCB
   1915						MOV	R5,W.TMP+2(R4)	;TCB ADDRESS
   1916						CALL	NRMRWT		;AND WAIT A TICK.
   1917						MOV	W.TMP(R4),R0	;RESTORE REFERRAL CCB
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 32-1
ASSIGN	-  <ASSIGN> MESSAGE PRE-PROCESSOR

   1918						MOV	W.TMP+2(R4),R5	;TCB ADDRESS
   1919						BR	30$		;AND TRY AGAIN.
   1920					;***
   1921					;***  NOT QUITE THERE - MUST GET CSB FOR MESSAGE
   1922					;***
   1923					50$:	BIS	#<TS.HP!TS.SRP>,T.STS(R5) ;SET HANDOFF+STATUS-REPORT PENDING
   1924						MOV	R0,T.PCBD(R5)	;POINT TCB TO HANDOFEE'S CONTROL PCB
   1925						MOV	R1,R.CID(R4)	;STORE CONTROL ID IN HANDOFEE'S CCB
   1926						CLR	R.STS(R4)	;CLEAR STATUS BITS
   1927						MOV	R5,R.TCB(R4)	;TCB BEING HANDED OFF
   1928						POP	R.NSP(R4)	;AND WORKING CCB.
   1929						MOV	R0,R3		;POINT TO HANDOFEE'S CONTROL PCB
   1930						CALL	SETREF		;LINK INTO REFERRAL LIST.
   1931					;
   1932					; SET UP AND SEND MESSAGE TO HANDOFFEE
   1933					;
   1934						MAP	C.BUF(R4)	;MAP TO BUFFER
   1935						MOV	C.BUF+2(R4),R2	;AND GET ADDRESS.
   1936						MOV	R1,C.NSP(R4)	;INSERT CONTROL ID
   1937						MOVB	P.LLA(R3),C.LIN(R4) ; SET PIPE LLA
   1938						MOVB	#SY.REF!SY.DBL,C.MOD(R4)
   1939						CALL	SPCFYM		;SET SPECIFY MESSAGE IN BUFFER
   1940						MOVB	#SS.RES,C.MOD(R4) ;LOAD STATUS TYPE
   1941						CLR	R0		;NO OPERATIONAL STATUS
   1942						CALL	STATSM		;SET STATUS MESSAGE IN BUFFER
   1943						MOV	#CF.LB,C.FLG(R4) ;MARK AS ONLY ONE BUFFER
   1944						SUB	C.BUF+2(R4),R2	;FIGURE LENGTH
   1945						MOV	R2,C.CNT(R4)	;AND STORE IT.
   1946						MOV	#NT.SOL,C.STS(R4) ;THIS IS THE ONLY MESSAGE.
   1947						BIT	#PS.BP,P.STS(R3) ; IF BACK-PRESSURED
   1948						BEQ	70$		; THEN
   1949						ADD	#P.BPQ,R3	; POINT TO BPC QUEUE
   1950						CALL	$CMQIN		; AND QUEUE UP THE MESSAGE.
   1951						RETURN			; GOOD-BYE !
   1952					70$:	NDAT$	P.LLA(R3)	; SEND MESSAGE
   1953						RETURN			; AND EXIT
   1954
   1955						.ENDR
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 33
STATUS	-  <STATUS> MESSAGE PRE-PROCESSOR

   1957						.SBTTL	STATUS	-  <STATUS> MESSAGE PRE-PROCESSOR
   1958					;+
   1959					; THIS ROUTINE RECEIVES CONTROL FROM THE RESOURCE MESSAGE DISPATCHER.
   1960					; IT DOES THE PROCESSING COMMON TO ALL STATUS REQUEST MESSAGES.
   1961					; FOR ENTRY AT 'STATUS', THE RESERVED TERMINAL LIST IS SEARCHED FOR
   1962					; THE TCB CONTAINING THE CONTROL ID.  IF FOUND, THE MESSAGE IS VALIDATED,
   1963					; ELSE THE REFERRAL LIST IS SEARCHED FOR A CCB CONTAINING THE CONTROL ID.
   1964					; IF FOUND, THE MESSAGE IS VALIDATED, ELSE THE STATUS IS REJECTED.
   1965					;
   1966					; INPUT:
   1967					;	APR6= BIASED INTO RESOURCE MESSAGE
   1968					;	R4= ADDRESS OF WORKING CCB
   1969					;	R3= ADDRESS OF CONTROL PCB
   1970					;	R2= ADDRESS OF RESOURCE MESSAGE
   1971					;		= AT 'STSTYPE' FIELD
   1972					;	R0= MESSAGE SUBTYPE
   1973					;
   1974					; OUTPUT:
   1975					;	R4= ADDRESS OF WORKING CCB
   1976					;	R3= ADDRESS OF PCB
   1977					;
   1978					;	IF SUCCESS:
   1979					;	APR6= BIASED INTO RESOURCE MESSAGE
   1980					;	R5= ADDRESS OF TCB
   1981					;	R2= ADDRESS OF RESOURCE MESSAGE
   1982					;
   1983					;	IF FAILURE:
   1984					;	R0= RESPONSE CODE
   1985					;
   1986					;-
   1987
   1988	005424				STATUS:				;FIRST MESSAGE ENTRY POINT
   1989	005424	142700 	177760 			BICB	#^C17,R0	;CLEAR OUT JUNK
   1990	005430	001403 				BEQ	10$		;IF EQ, INVALID REQUEST TYPE
   1991	005432	120027 	000003 			CMPB	R0,#ST.MAX	;STATUS TYPE IN RANGE?
   1992	005436	101402 				BLOS	20$		;IF LOS, YES- CONTINUE
   1993	005440				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	005440	000167 	000530 			JMP	INVALID
   1994
   1995					; SEARCH RESERVED LIST FOR TCB WITH CONTROL ID
   1996
   1997	005444				20$:	CALL	FNDRES		;CHECK RESERVED LIST FOR RESOURCE
	005444	004767 	002510 			JSR	PC,FNDRES
   1998	005450	103006 				BCC	30$		;IF CC, FOUND IT
   1999
   2000					; SEARCH REFERRAL LIST FOR CCB WITH CONTROL ID
   2001
   2002	005452					CALL	FNDREF		;CHECK REFERRAL LIST FOR CONTROL ID
	005452	004767 	002454 			JSR	PC,FNDREF
   2003	005456	103413 				BCS	25$		;IF CS, NOT FOUND- SEND RESPONSE
   2004	005460	016505 	000016 			MOV	R.TCB(R5),R5	;IF RESOURCE IS REFERRED TO
   2005	005464	001410 				BEQ	25$		;THEN
   2006
   2007	005466	016401 	000032 		30$:	MOV	W.NSP(R4),R1	;GET TO THE START
   2008	005472	016101 	000012 			MOV	C.STS(R1),R1	;OF THE MESSAGE TO
   2009	005476	132761 	000020 	000001 		BITB	#ST.REL,1(R1)	;CHECK IF RELEASE WAS REQUESTED.
   2010	005504	001404 				BEQ	35$		;IF EQ, NO- CONTINUE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 33-1
STATUS	-  <STATUS> MESSAGE PRE-PROCESSOR

   2011	005506				25$:	RESPOND	RC.RSE		;ERROR - REQUEST OUT OF SEQUENCE
	005506	012700 	000047 			MOV	#RC.RSE,R0
	005512	000167 	000462 			JMP	RSPNS
   2012
   2013	005516	006300 			35$:	ASL	R0		;MAKE A WORD INDEX
   2014	005520					CALLR	@STSDSP(R0)	;AND DISPATCH STATUS MESSAGE(WITH RETURN)
	005520	000170 	000222'			JMP	@STSDSP(R0)
   2015
   2016					;+
   2017					; DO AUTOMATIC STATUS-RELEASE
   2018					;
   2019					; INPUTS:
   2020					;	R4= ADDRESS OF WORKING CCB
   2021					;	R3= CONTROL PCB
   2022					;
   2023					; NO REGISTERS MODIFIED
   2024					;-
   2025
   2026	005524				STSREL:	PUSH	R5
	005524	010546 				MOV	R5,-(SP)
   2027	005526					CALL	FNDREF		;FIND REFERRAL FOR CONTROL ID
	005526	004767 	002400 			JSR	PC,FNDREF
   2028	005532	103402 				BCS	90$
   2029	005534					CALL	REMREF		;REMOVE CCB FROM REFFERAL LIST
	005534	004767 	002446 			JSR	PC,REMREF
   2030	005540				90$:	POP	R5
	005540	012605 				MOV	(SP)+,R5
   2031	005542					RETURN
	005542	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 34
QUERY	-   <STATUS-QUERY> MESSAGE DISPATCHER

   2033						.SBTTL	QUERY	-   <STATUS-QUERY> MESSAGE DISPATCHER
   2034					;+
   2035					; THIS ROUTINE IS CALLED BY THE STATUS-MESSAGE PREPROCESSOR TO DISPATCH
   2036					; A STATUS MESSAGE WHICH IS A QUERY.
   2037					;
   2038					; INPUT:
   2039					;	APR6= BIASED INTO RESOURCE MESSAGE
   2040					;	R4= ADDRESS OF WORKING CCB
   2041					;	R3= ADDRESS OF CONTROL PCB
   2042					;	R2= ADDRESS OF RESOURCE MESSAGE
   2043					;		= AT 'STSTYPE' FIELD
   2044					;
   2045					; OUTPUT:
   2046					;	APR6= BIASED INTO RESOURCE MESSAGE
   2047					;	R2= ADDRESS OF RESOURCE MESSAGE
   2048					;		= END OF MESSAGE
   2049					;
   2050					;-
   2051
   2052	005544				QUERY:				;ENTRY POINT
   2053	005544					CALL	GET1		;GET STATUS TYPE
	005544	004767 	002116 			JSR	PC,GET1
   2054	005550	005700 				TST	R0
   2055	005552	001403 				BEQ	10$		;IF EQ, INVALID STATUS TYPE
   2056	005554	120027 	000010 			CMPB	R0,#SS.MAX 	;STATUS TYPE IN RANGE?
   2057	005560	101402 				BLOS	20$		;IF LOS, YES- CONTINUE
   2058	005562				10$:	RESPOND	RC.IRC		;ERROR - ILLEGAL REQUEST CODE
	005562	000167 	000406 			JMP	INVALID
   2059
   2060	005566	006300 			20$:	ASL	R0		;MAKE A WORD INDEX
   2061	005570					CALLR	@STADSP(R0)	;AND DISPATCH STATUS-QUERY MESSAGE
	005570	000170 	000232'			JMP	@STADSP(R0)
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 35
QRYATS	-    <STATUS-REPORT-ATS TERMINAL> MESSAGE GENERATOR

   2063						.SBTTL	QRYATS	-    <STATUS-REPORT-ATS TERMINAL> MESSAGE GENERATOR
   2064					;+
   2065					; THIS ROUTINE RECEIVES CONTROL FROM THE STATUS PRE-PROCESSOR.
   2066					; ITS FUNCTION IS TO GET THE ATS TERMINAL STATUS INFORMATION, BUILD THE
   2067					; STATUS MESSAGE AND TRANSMIT THE STATUS MESSAGE.  IF A AUTO-ACCESS-RELEASE
   2068					; WAS SPECIFIED, IT IS DONE AFTER THE RESPONSE BUFFER IS OBTAINED,
   2069					; THUS AVOIDING MANIPULATION OF THE RESOURCE UNTIL WE HAVE THE STATUS.
   2070					;
   2071					; INPUTS:
   2072					;	R5= ADDRESS OF TCB
   2073					;	R4= ADDRESS OF WORKING CCB
   2074					;	R3= ADDRESS OF CONTROL PCB
   2075					;
   2076					; NO OUTPUTS
   2077					;
   2078					; ALL REGISTERS MODIFIED
   2079					;-
   2080
   2081	005574				QRYATS:
   2082	005574	010401 				MOV	R4,R1
   2083	005576	016404 	000032 			MOV	W.NSP(R4),R4	; GET NSP'S CCB-BUFFER
   2084	005602	016402 	000012 			MOV	C.STS(R4),R2	; (WHILE WE ARE HERE,
   2085	005606	116261 	000001 	000011 		MOVB	1(R2),C.MOD(R1)	;  PICK UP SUB-TYPE BITS)
   2086	005614					NRTN$	P.LLA(R3),#NT.ACK ; RETURN THE BUFFER TO NSP.
	005614	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	005622	012764 	000001 	000012 		    MOV	    #NT.ACK,C.STS(R4)
	005630	012764 	000002 	000010 		MOV	#<NT$RTN*400!FC.RCE>,C.FNC(R4)
	005636	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	005644	004767 	000000G			JSR	PC,$LLCRS
   2087	005650	010104 				MOV	R1,R4		; RESTORE FREE CCB.
   2088	005652				20$:	CALL	SDBGT		; INSERT A SDB IN OUR CCB
	005652	004767 	001526 			JSR	PC,SDBGT
   2089	005656	103007 				BCC	30$		; IF NONE AVAILABLE
   2090	005660	010564 	000014 			MOV	R5,W.TMP(R4)	; SAVE TCB ADDRESS
   2091	005664					CALL	NRMRWT		; AND WAIT FOR BETTER CONDITIONS
	005664	004767 	172412 			JSR	PC,NRMRWT
   2092	005670	016405 	000014 			MOV	W.TMP(R4),R5	; RESTORE TCB ADDRESS
   2093	005674	000766 				BR	20$		; AND TRY AGAIN
   2094	005676	132764 	000020 	000011 	30$:	BITB	#ST.REL,C.MOD(R4) ; IF RELEASE REQUESTED
   2095	005704	001402 				BEQ	40$		; THEN
   2096	005706					CALL	STSREL		; RELEASE THE REFERRAL.
	005706	004767 	177612 			JSR	PC,STSREL
   2097	005712	112764 	000010 	000011 	40$:	MOVB	#SS.ATS,C.MOD(R4) ; SET STATUS TYPE
   2098	005720	005000 				CLR	R0		; NO OPERATIONAL STATUS
   2099	005722	016402 	000016 			MOV	C.BUF+2(R4),R2	; GET THE BUFFER ADDRESS
   2100	005726					CALL	STATSM		; AND SET UP THE MESSAGE.
	005726	004767 	001122 			JSR	PC,STATSM
   2101	005732	012764 	100000 	000022 		MOV	#CF.LB,C.FLG(R4) ; MARK AS ONLY ONE BUFFER
   2102	005740	166402 	000016 			SUB	C.BUF+2(R4),R2	; FIGURE THE LENGTH AND
   2103	005744	010264 	000020 			MOV	R2,C.CNT(R4)	; STORE IT.
   2104	005750	012764 	000140 	000012 		MOV	#NT.SOL,C.STS(R4) ; THIS IS HE ONLY SEGMENT.
   2105	005756	032763 	000020 	000010 		BIT	#PS.BP,P.STS(R3) ; IF BACKPRESSURED
   2106	005764	001404 				BEQ	70$		; THEN
   2107	005766	062703 	000012 			ADD	#P.BPQ,R3	; POINT TO BACK-PRESSURE QUEUE
   2108	005772					CALLR	$CMQIN		; AND QUEUE UP THE MESSAGE.
	005772	000167 	000000G			JMP	$CMQIN
   2109	005776				70$:	NDAT$	P.LLA(R3)	; SEND RESPONSE MESSAGE
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 35-1
QRYATS	-    <STATUS-REPORT-ATS TERMINAL> MESSAGE GENERATOR

	005776	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	006004	012764 	001000 	000010 		MOV	#<NT$DAT*400!FC.XME>,C.FNC(R4)
	006012	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	006020	004767 	000000G			JSR	PC,$LLCRS
   2110	006024					RETURN
	006024	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 36
ASYREP	- ASYNCHRONOUS STATUS REPORT

   2112						.SBTTL	ASYREP	- ASYNCHRONOUS STATUS REPORT
   2113					;+
   2114					; THIS ROUTINE RECEIVES CONTROL FROM THE ERROR PROCESSOR.
   2115					; ITS FUNCTION IS TO GET THE ATS TERMINAL STATUS AND THE OPERATIONAL
   2116					; STATUS, BUILD THE STATUS MESSAGE, ANS TRANSMIT THE MESSAGE.
   2117					;
   2118					; INPUTS:
   2119					;	R5= ADDRESS OF TCB
   2120					;	R3= ADDRESS OF CONTROL PCB
   2121					;	R1= CONTROL ID
   2122					;	R0= OPERATIONAL STATUS
   2123					;
   2124					; OUTPUT:
   2125					;	CARRY CLEAR= STATUS SENT
   2126					;	CARRY SET= COULD NOT OBTAIN RESOURCES
   2127					;
   2128					; REGISTERS MODIFIED: APR6,R2
   2129					;-
   2130
   2131	006026				ASYREP:	PUSH	R4		; SAVE HIS CCB
	006026	010446 				MOV	R4,-(SP)
   2132	006030					CALL	CSBGT		; AND GET A REPORT BUFFER
	006030	004767 	001332 			JSR	PC,CSBGT
   2133	006034	103455 				BCS	90$		; IF WE CAN.
   2134	006036	010164 	000004 			MOV	R1,C.NSP(R4)	; SAVE CONTROL ID
   2135	006042	116364 	000016 	000006 		MOVB	P.LLA(R3),C.LIN(R4) ; PIPE NUMBER
   2136	006050	112764 	000010 	000011 		MOVB	#SS.ATS,C.MOD(R4) ; AND SET STATUS TYPE.
   2137	006056	016402 	000016 			MOV	C.BUF+2(R4),R2	; GET BUFFER ADDRESS
   2138	006062					CALL	STATSM		; AND SET UP THE MESSAGE.
	006062	004767 	000766 			JSR	PC,STATSM
   2139	006066	012764 	100000 	000022 		MOV	#CF.LB,C.FLG(R4) ; MARK AS ONLY ONE BUFFER
   2140	006074	166402 	000016 			SUB	C.BUF+2(R4),R2	; FIGURE THE LENGTH AND
   2141	006100	010264 	000020 			MOV	R2,C.CNT(R4)	; STORE IT.
   2142	006104	012764 	000140 	000012 		MOV	#NT.SOL,C.STS(R4) ; THIS IS HE ONLY SEGMENT.
   2143	006112	032763 	000020 	000010 		BIT	#PS.BP,P.STS(R3) ; IF BACKPRESSURED
   2144	006120	001407 				BEQ	70$		; THEN
   2145	006122	062703 	000012 			ADD	#P.BPQ,R3	; POINT TO BACK-PRESSURE QUEUE
   2146	006126					CALL	$CMQIN		; AND QUEUE UP THE MESSAGE.
	006126	004767 	000000G			JSR	PC,$CMQIN
   2147	006132	162703 	000012 			SUB	#P.BPQ,R3	; RESTORE PCB ADDRESS.
   2148	006136	000413 				BR	80$
   2149	006140				70$:	NDAT$	P.LLA(R3)	; SEND RESPONSE MESSAGE
	006140	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	006146	012764 	001000 	000010 		MOV	#<NT$DAT*400!FC.XME>,C.FNC(R4)
	006154	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	006162	004767 	000000G			JSR	PC,$LLCRS
   2150	006166	000241 			80$:	CLC			; INDICATE SUCCESS
   2151	006170				90$:	POP	R4		; RESTORE HIS CCB
	006170	012604 				MOV	(SP)+,R4
   2152	006172					RETURN
	006172	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 37
INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR

   2154						.SBTTL	INVALID	- INVALID OR UNSUPPORTED REQUEST PROCESSOR
   2155					;+
   2156					; THIS ROUTINE PROVIDES A DISPATCH TARGET FOR ALL INVALID OR UNSUPPORTED
   2157					; REQUESTS DISPATCHED THRU THE DISPATCH TABLES.
   2158					;
   2159					; INPUT:
   2160					;	R4= ADDRESS OF CCB-RDB
   2161					;
   2162					; OUTPUT:
   2163					;	SAME AS INPUT, PLUS:
   2164					;	R0= RESPONSE CODE
   2165					;-
   2166
   2167	006174				UNSUPPORTED:
   2168	006174				INVALID:
   2169	006174	012700 	000026 			MOV	#RC.IRC,R0	;ERROR - ILLEGAL REQUEST CODE
   2170	006200					FALLR	RSPNS
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 38
RSPNS	- RESPONSE MESSAGE GENERATOR

   2172						.SBTTL	RSPNS	- RESPONSE MESSAGE GENERATOR
   2173					;+
   2174					; GET DATA PIPE AND MESSAGE TYPE BEING RESPONDED TO AND FALL THROUGH TO
   2175					; RESPOND TO THE MESSAGE.
   2176					;
   2177					; INPUTS:
   2178					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
   2179					;	R4= ADDRESS OF WORKING CCB
   2180					;	R0= RESPONSE CODE
   2181					;
   2182					; OUTPUTS (TO RSPNS1):
   2183					;	APR6= MAPPED TO RESOURCE MESSAGE
   2184					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
   2185					;	R4= ADDRESS OF WORKING CCB
   2186					;	R3= ADDRESS OF CONTROL PCB
   2187					;	R1= MESSAGE TYPE (LOW BYTE) / SUBTYPE (HIGH BYTE)
   2188					;	R0= RESPONSE CODE
   2189					;-
   2190
   2191	006200				RSPNS:	PUSH	<R0,R4>		; ROOM TO MOVE.
	006200	010046 				MOV	R0,-(SP)
	006202	010446 				MOV	R4,-(SP)
   2192	006204	016404 	000032 			MOV	W.NSP(R4),R4	; GET NSP BUFFER
   2193	006210					GTPCB$			; AND PCB ADDRESS.
	006210	005000 				  CLR	  R0
	006212	156400 	000006 			  BISB	  C.LIN(R4),R0
	006216	004767 	000000G			JSR	PC,$PCBPT
   2194	006222					MAP	C.BUF(R4)	; MAP TO BUFFER
	006222	016467 	000014 	172354 		MOV	  C.BUF(R4),KISAR6
   2195	006230	016402 	000012 			MOV	C.STS(R4),R2	; GET ADDRESS
   2196	006234					CALL	GET2		; AND PICK UP
	006234	004767 	001434 			JSR	PC,GET2
   2197	006240	010001 				MOV	R0,R1		; MESSAGE TYPE / SUBTYPE.
   2198	006242					POP	<R4,R0>		; RESET REGISTERS.
	006242	012604 				MOV	(SP)+,R4
	006244	012600 				MOV	(SP)+,R0
   2199	006246					FALLR	RSPNS1		; FALL THROUGH
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 39
RSPNS	- RESPONSE MESSAGE GENERATOR

   2201					;+
   2202					; IF RESPONSE IS SUCCESSFUL AND THERE IS A CONCATENATED MESSAGE
   2203					; THEN DISPATCH THE NEXT MESSAGE.  IF RESPONSE INDICATES FAILURE AND
   2204					; THIS IS THE SECOND MESSAGE OF A CONCATENATED SPECIFY MESSAGE, THEN
   2205					; UNDO THE DAMAGE DONE BY THE SPECIFY.
   2206					;
   2207					; INPUTS:
   2208					;	APR6= MAPPED TO RESOURCE MESSAGE
   2209					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
   2210					;	R4= ADDRESS OF WORKING CCB
   2211					;	R3= ADDRESS OF CONTROL PCB
   2212					;	R1= MESSAGE TYPE (LOW BYTE) / SUBTYPE (HIGH BYTE)
   2213					;	R0= RESPONSE CODE
   2214					;
   2215					; OUTPUTS (TO RSPNS2):
   2216					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
   2217					;	R4= ADDRESS OF WORKING CCB
   2218					;	R3= ADDRESS OF CONTROL PCB
   2219					;	R1= MESSAGE TYPE (LOW BYTE) / SUBTYPE (HIGH BYTE)
   2220					;	R0= RESPONSE CODE
   2221					;
   2222					; OUTPUTS (FOR CONCATENATED MESSAGE DISPATCH):
   2223					;	APR6= MAPPED TO RESOURCE MESSAGE
   2224					;	R4= ADDRESS OF WORKING CCB
   2225					;	R3= ADDRESS OF CONTROL PCB
   2226					;	R2= CURRENT ADDRESS OF RESOURCE MESSAGE
   2227					;	R0= MESSAGE SUBTYPE
   2228					;-
   2229
   2230	006246	022700 	000024 		RSPNS1:	CMP	#20.,R0		; IF NOT A SUCCESSFUL RESPONSE
   2231	006252	101446 				BLOS	40$		; THEN IGNORE CONCATENATED MESSAGE.
   2232	006254	122701 	000050 			CMPB	#RQ.SPC,R1	; IF NOT A SPECIFY
   2233	006260	001075 				BNE	RSPNS2		; OR
   2234	006262	032701 	010000 			BIT	#SY.DBL*400,R1	; THE DOUBLE BIT IS NOT ON
   2235	006266	001472 				BEQ	RSPNS2		; THEN THERE IS NO CC MESSAGE.
   2236	006270	016405 	000032 			MOV	W.NSP(R4),R5	; LOOKING GOOD - GET NSP CCB
   2237	006274					MAP	C.BUF(R5)	; MAP TO BUFFER
	006274	016567 	000014 	172354 		MOV	  C.BUF(R5),KISAR6
   2238	006302	016502 	000012 			MOV	C.STS(R5),R2	; GET ADDRESS
   2239	006306	062702 	000005 			ADD	#5,R2		; AND BYPASS
   2240	006312					CALL	GET1		; THE SPECIFY MESSAGE.
	006312	004767 	001350 			JSR	PC,GET1
   2241	006316	060002 				ADD	R0,R2
   2242	006320	122712 	000051 			CMPB	#RS.LOW,(R2)	; IS IT WITHIN BOUNDS ?
   2243	006324	101323 				BHI	INVALID
   2244	006326	122712 	000051 			CMPB	#RS.LOW,(R2)	; IF NOT,
   2245	006332	103720 				BLO	INVALID		; RESTART WITH NEW ERROR CODE.
   2246	006334	010265 	000012 			MOV	R2,C.STS(R5)	; SET NEW MESSAGE ADDRESS
   2247	006340					CALL	GET1		; GET TYPE
	006340	004767 	001322 			JSR	PC,GET1
   2248	006344	162700 	000041 			SUB	#RQ.MIN,R0	; AND
   2249	006350	006300 				ASL	R0
   2250	006352	016046 	000142'			MOV	MSGDSP(R0),-(SP) ; GET THE DISPATCH ADDRESS.
   2251	006356					CALL	GET1		; THIS IS THE SUBTYPE.
	006356	004767 	001304 			JSR	PC,GET1
   2252	006362	062702 	000002 			ADD	#2,R2		; USE OLD CONTROL ID
   2253	006366					RETURN			; AND DISPATCH.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 39-1
RSPNS	- RESPONSE MESSAGE GENERATOR

	006366	000207 				RTS	PC
   2254
   2255	006370	016402 	000032 		40$:	MOV	W.NSP(R4),R2	; GET THE NSP CCB
   2256	006374	026262 	000016 	000012 		CMP	C.BUF+2(R2),C.STS(R2) ; AND IF THE FIRST MESSAGE
   2257	006402	001424 				BEQ	RSPNS2		; THEN SEND THE RESPONSE
   2258	006404					PUSH	R5		; OTHERWISE SAVE THE RESPONSE DATA
	006404	010546 				MOV	R5,-(SP)
   2259	006406					CALL	FNDREF		; LOOK FOR A REFERRAL
	006406	004767 	001520 			JSR	PC,FNDREF
   2260	006412	103407 				BCS	50$		; IF FOUND
   2261	006414	032765 	100000 	000012 		BIT	#RS.RQ,R.STS(R5) ; AND
   2262	006422	001013 				BNE	90$		; WE CREATED IT
   2263	006424					CALL	REMREF		; THEN REMOVE IT.
	006424	004767 	001556 			JSR	PC,REMREF
   2264	006430	000410 				BR	90$		; OTHERWISE
   2265	006432				50$:	CALL	FNDRES		; IF WE HAVE
	006432	004767 	001522 			JSR	PC,FNDRES
   2266	006436	103405 				BCS	90$		; A RESERVED RESOURCE
   2267	006440					CALL	REMRES		; THAT MUST BE RELEASED.
	006440	004767 	001604 			JSR	PC,REMRES
   2268	006444	042765 	000020 	000012 		BIC	#TS.RS,T.STS(R5)
   2269	006452				90$:	POP	R5		; RESTORE RESPONSE DATA
	006452	012605 				MOV	(SP)+,R5
   2270	006454					FALLR	RSPNS2		; AND FALL INTO RESPONSE GENERATOR.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 40
RSPNS	- RESPONSE MESSAGE GENERATOR

   2272					;+
   2273					; RELEASE THE NSP RESOURCE MESSAGE BUFFER, GET A RESPONSE BUFFER
   2274					; AND FALL THROUGH TO FILL THE BUFFER AND SEND THE RESPONSE.
   2275					;
   2276					; INPUT:
   2277					;	R5= RESPONSE DATA, IF R0=RC.RJS OR <ACCESS-OPEN> MESSAGE RESPONSE
   2278					;	R4= ADDRESS OF WORKING CCB
   2279					;	R3= PCB ADDRESS
   2280					;	R1= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
   2281					;	R0= RESPONSE CODE
   2282					;
   2283					; OUTPUT (TO RSPNSM):
   2284					;	R4= ADDRESS OF WORKING CCB
   2285					;		C.NSP=W.CID= CONTROL ID
   2286					;		C.FLG= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
   2287					;		C.BUF2= RESPONSE CODE
   2288					;		C.BUF2+2= RESPONSE DATA, IF R0=45 OR <OPEN> MESSAGE RESPONSE
   2289					;
   2290					; ALL REGISTERS MODIFIED
   2291					;-
   2292
   2293	006454	010402 			RSPNS2:	MOV	R4,R2
   2294	006456	016404 	000032 			MOV	W.NSP(R4),R4	; GET NSP'S CCB-BUFFER
   2295	006462					NRTN$	P.LLA(R3),#NT.ACK ; RETURN THE BUFFER TO NSP.
	006462	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	006470	012764 	000001 	000012 		    MOV	    #NT.ACK,C.STS(R4)
	006476	012764 	000002 	000010 		MOV	#<NT$RTN*400!FC.RCE>,C.FNC(R4)
	006504	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	006512	004767 	000000G			JSR	PC,$LLCRS
   2296	006516	010204 				MOV	R2,R4		; RECOVER THE WORKING CCB.
   2297	006520				20$:	CALL	SDBGT		; PUT A SDB IN OUR CCB
	006520	004767 	000660 			JSR	PC,SDBGT
   2298	006524	103017 				BCC	30$		; IF NOT AVAILABLE
   2299	006526	010164 	000014 			MOV	R1,W.TMP+0(R4)	; MESSAGE BEING RESPONDED TO
   2300	006532	010064 	000016 			MOV	R0,W.TMP+2(R4)	; RESPONSE CODE
   2301	006536	010564 	000020 			MOV	R5,W.TMP+4(R4)	; AND DATA.
   2302	006542					CALL	NRMRWT		; WAIT FOR BETTER CONDITIONS
	006542	004767 	171534 			JSR	PC,NRMRWT
   2303	006546	016405 	000020 			MOV	W.TMP+4(R4),R5	; RESTORE
   2304	006552	016400 	000016 			MOV	W.TMP+2(R4),R0	; NEEDED
   2305	006556	016401 	000014 			MOV	W.TMP+0(R4),R1	; DATA
   2306	006562	000756 				BR	20$		; AND TRY AGAIN
   2307	006564	016402 	000016 		30$:	MOV	C.BUF+2(R4),R2	; AND BUFFER ADDRESS
   2308	006570					CALL	RSPNSM		; SET UP THE MESSAGE
	006570	004767 	000074 			JSR	PC,RSPNSM
   2309	006574	012764 	100000 	000022 		MOV	#CF.LB,C.FLG(R4) ; MARK AS ONLY ONE BUFFER
   2310	006602	166402 	000016 			SUB	C.BUF+2(R4),R2	; FIGURE THE LENGTH AND
   2311	006606	010264 	000020 			MOV	R2,C.CNT(R4)	; STORE IT.
   2312	006612	012764 	000140 	000012 		MOV	#NT.SOL,C.STS(R4) ; THIS IS HE ONLY SEGMENT.
   2313	006620	032763 	000020 	000010 		BIT	#PS.BP,P.STS(R3) ; IF BACKPRESSURED
   2314	006626	001404 				BEQ	70$		; THEN
   2315	006630	062703 	000012 			ADD	#P.BPQ,R3	; POINT TO BACK-PRESSURE QUEUE
   2316	006634					CALLR	$CMQIN		; AND QUEUE UP THE MESSAGE.
	006634	000167 	000000G			JMP	$CMQIN
   2317	006640				70$:	NDAT$	P.LLA(R3)	; SEND RESPONSE MESSAGE
	006640	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	006646	012764 	001000 	000010 		MOV	#<NT$DAT*400!FC.XME>,C.FNC(R4)
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 40-1
RSPNS	- RESPONSE MESSAGE GENERATOR

	006654	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	006662	004767 	000000G			JSR	PC,$LLCRS
   2318	006666					RETURN
	006666	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 41
RSPNSM	- GENERATE A <RESPONSE> MESSAGE

   2320						.SBTTL	RSPNSM	- GENERATE A <RESPONSE> MESSAGE
   2321					;+
   2322					; SET UP A RESPONSE MESSAGE IN A GIVEN BUFFER.
   2323					;
   2324					; INPUT:
   2325					;	APR6= MAPPED TO RESPONSE BUFFER
   2326					;	R5= RESPONSE DATA, IF R0=45 OR <OPEN> MESSAGE RESPONSE
   2327					;	R4= ADDRESS OF RESPONSE CCB-BUFFER
   2328					;		C.NSP= CONTROL ID
   2329					;	R2= ADDRESS TO INSERT THE STATUS MESSAGE
   2330					;	R1= MESSAGE TYPE (LOW BYTE), SUBTYPE (HIGH BYTE)
   2331					;	R0= RESPONSE CODE
   2332					;
   2333					; OUTPUTS:
   2334					;	R2= MOVED PAST THE MESSAGE INSERTED
   2335					;
   2336					; REGISTERS MODIFIED: R5,R2
   2337					;-
   2338
   2339	006670	112722 	000047 		RSPNSM:	MOVB	#RQ.RES,(R2)+	; LOAD RESPONSE REQUEST CODE
   2340	006674	110122 				MOVB	R1,(R2)+	; LOAD RECEIVED MESSAGE'S REQUEST CODE
   2341	006676	116422 	000004 			MOVB	C.NSP(R4),(R2)+	; LOAD LOW BYTE OF CONTROL ID
   2342	006702	116422 	000005 			MOVB	C.NSP+1(R4),(R2)+ ; LOAD HIGH BYTE OF CONTROL ID
   2343	006706	110022 				MOVB	R0,(R2)+	; LOAD LOW BYTE
   2344	006710	000300 				SWAB	R0		; AND
   2345	006712	110022 				MOVB	R0,(R2)+	; HIGH BYTE OF RESPONSE CODE
   2346	006714	000300 				SWAB	R0		; RESTORE THE CODE.
   2347	006716	022700 	000045 			CMP	#RC.RJS,R0	; IS THIS A SERVOR REJECTION?
   2348	006722	001010 				BNE	60$		; IF NE, NO
   2349	006724	005705 				TST	R5		; IS THERE RESPONSE DATA?
   2350	006726	001420 				BEQ	70$		; IF EQ, NO
   2351	006730	112722 	000002 			MOVB	#2,(R2)+	; SET RESPONSE DATA COUNT
   2352	006734	110522 				MOVB	R5,(R2)+	; LOAD LOW BYTE
   2353	006736	000305 				SWAB	R5		; AND
   2354	006740	110522 				MOVB	R5,(R2)+	; HIGH BYTE OF RESPONSE DATA
   2355	006742					RETURN			; SEND RESPONSE MESSGAGE
	006742	000207 				RTS	PC
   2356
   2357	006744	022701 	001051 		60$:	CMP	#RQ.ACC+<AC.SEP*400>,R1 ; IF <ACCESS-OPEN>
   2358	006750	001007 				BNE	70$		; WITH SEPERATE DATA PIPE
   2359	006752	112722 	000003 			MOVB	#3,(R2)+	; THEN SET RESPONSE DATA COUNT
   2360	006756	110522 				MOVB	R5,(R2)+	; LOAD BTN
   2361	006760	105022 				CLRB	(R2)+		; CLEAR HIGH BYTE OF BTN
   2362	006762	000305 				SWAB	R5		; AND
   2363	006764	110522 				MOVB	R5,(R2)+	; LOAD BULA
   2364	006766					RETURN			; AND SEND RESPONSE MESSAGE
	006766	000207 				RTS	PC
   2365
   2366	006770	105022 			70$:	CLRB	(R2)+		; SET RESPONSE DATA LENGTH= 0
   2367	006772					RETURN
	006772	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 42
SPCFYM	- GENERATE A <SPECIFY> MESSAGE

   2369						.SBTTL	SPCFYM	- GENERATE A <SPECIFY> MESSAGE
   2370					;+
   2371					; SET UP A SPECIFY MESSAGE IN A GIVEN BUFFER.
   2372					;
   2373					; INPUT:
   2374					;	APR6= MAPPED TO RESPONSE BUFFER
   2375					;	R5= ADDRESS OF TCB FOR RESOURCE REFERENCE
   2376					;	R4= ADDRESS OF RESPONSE CCB-BUFFER
   2377					;		C.NSP= CONTROL ID
   2378					;		C.MOD= SPECIFY MESSAGE TYPE
   2379					;	R2= ADDRESS TO INSERT THE SPECIFY MESSAGE
   2380					;
   2381					; OUTPUTS:
   2382					;	R2= MOVED PAST THE MESSAGE INSERTED
   2383					;
   2384					; REGISTERS MODIFIED: R2
   2385					;-
   2386
   2387	006774	112722 	000050 		SPCFYM:	MOVB	#RQ.SPC,(R2)+	; LOAD SPECIFY REQUEST CODE
   2388	007000	116422 	000011 			MOVB	C.MOD(R4),(R2)+	; AND SPECIFY SUB-TYPE
   2389	007004	116422 	000004 			MOVB	C.NSP(R4),(R2)+	; LOAD LOW BYTE OF CONTROL ID
   2390	007010	116422 	000005 			MOVB	C.NSP+1(R4),(R2)+ ; LOAD HIGH BYTE OF CONTROL ID
   2391	007014	112722 	000112 			MOVB	#112,(R2)+	; SET RESOURCE TYPE= 'ATS INTELLIGENT'
   2392	007020					PUSH	<R1,R0>		; GET SOME ROOM
	007020	010146 				MOV	R1,-(SP)
	007022	010046 				MOV	R0,-(SP)
   2393	007024	012701 	000006 			MOV	#6,R1		; SET COUNT OF TERMINAL NAME
   2394	007030	010500 				MOV	R5,R0		; POINT TO TERMINAL NAME BYTE STRING
   2395	007032	062700 	000022 			ADD	#T.NAM,R0
   2396	007036	110122 				MOVB	R1,(R2)+	; SET BYTE COUNT OF TERMINAL NAME
   2397	007040	112022 			60$:	MOVB	(R0)+,(R2)+	; LOAD NAME BYTE INTO MESSAGE
   2398	007042					SOB	R1,60$		; AND DO IT AGAIN UNTIL NAME LOADED.
	007042	005301 				DEC	R1
	007044	001375 				BNE	60$
   2399	007046					POP	<R0,R1>		; RESTORE REGISTERS.
	007046	012600 				MOV	(SP)+,R0
	007050	012601 				MOV	(SP)+,R1
   2400	007052					RETURN
	007052	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 43
STATSM	- GENERATE A <STATUS> MESSAGE

   2402						.SBTTL	STATSM	- GENERATE A <STATUS> MESSAGE
   2403					;+
   2404					; SET UP A STATUS MESSAGE IN A GIVEN BUFFER.
   2405					;
   2406					; INPUT:
   2407					;	APR6= MAPPED TO RESPONSE BUFFER
   2408					;	R5= ADDRESS OF TCB FOR STATUS MESSAGE
   2409					;	R4= ADDRESS OF RESPONSE CCB-BUFFER
   2410					;		C.NSP= CONTROL ID
   2411					;		C.MOD= STATUS MESSAGE TYPE
   2412					;	R2= ADDRESS TO INSERT THE STATUS MESSAGE
   2413					;	R0= OPERATIONAL STATUS OR ZERO
   2414					;
   2415					; OUTPUTS:
   2416					;	R2= MOVED PAST THE MESSAGE INSERTED
   2417					;
   2418					; REGISTERS MODIFIED: R2
   2419					;-
   2420
   2421	007054	112722 	000053 		STATSM:	MOVB	#RQ.STS,(R2)+	; LOAD STATUS REQUEST CODE
   2422	007060	112722 	000002 			MOVB	#ST.REP,(R2)+	; AS <STATUS-REPORT>
   2423	007064	116422 	000004 			MOVB	C.NSP(R4),(R2)+	; LOAD LOW BYTE OF CONTROL ID
   2424	007070	116422 	000005 			MOVB	C.NSP+1(R4),(R2)+ ; LOAD HIGH BYTE OF CONTROL ID
   2425	007074	116422 	000011 			MOVB	C.MOD(R4),(R2)+	; SET STATUS TYPE
   2426	007100	112722 	000002 			MOVB	#2,(R2)+	; AND DEFAULT TO TWO.
   2427	007104	116522 	000012 			MOVB	T.STS+0(R5),(R2)+ ; AND STORE
   2428	007110	116522 	000013 			MOVB	T.STS+1(R5),(R2)+ ; TCB STATUS.
   2429	007114	005700 				TST	R0		; IS THERE ANY OPERATIONAL STATUS ?
   2430	007116	001407 				BEQ	80$		; IF SO,
   2431	007120	112762 	000004 	177775 		MOVB	#4,-3(R2)	; SET COUNT TO FOUR
   2432	007126	110022 				MOVB	R0,(R2)+	; AND LOAD THE
   2433	007130	000300 				SWAB	R0
   2434	007132	110022 				MOVB	R0,(R2)+	; OPERATIONAL STATUS.
   2435	007134	000300 				SWAB	R0
   2436	007136				80$:	RETURN
	007136	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 44
NSPINT	- EXTRANEOUS INTERRUPT MESSAGE

   2438						.SBTTL	NSPINT	- EXTRANEOUS INTERRUPT MESSAGE
   2439					;+
   2440					; IF WE RECEIVE AN INTERRUPT MESSAGE, CLOSE THE PIPE.
   2441					;
   2442					; INPUTS:
   2443					;	R4 - CCB FOR NSP INTERRUPT MESSAGE
   2444					;-
   2445
   2446	007140	010405 			NSPINT:	MOV	R4,R5		; SAVE THE INTERRUPT CCB
   2447	007142					CALL	$CCBGT		; AND TRY TO GET A DISCONNECT CCB
	007142	004767 	000000G			JSR	PC,$CCBGT
   2448	007146	103003 				BCC	10$		; IF WE CAN'T GET IT
   2449	007150	010504 				MOV	R5,R4		; RESTORE CCB ADDRESS
   2450	007152					CALLR	ENQUE		; AND RESCHEDULE IT.
	007152	000167 	171136 			JMP	ENQUE
   2451
   2452	007156	010401 			10$:	MOV	R4,R1		; SHUFFLE CCBS
   2453	007160	010504 				MOV	R5,R4
   2454	007162					GTPCB$			; GET THE PCB
	007162	005000 				  CLR	  R0
	007164	156400 	000006 			  BISB	  C.LIN(R4),R0
	007170	004767 	000000G			JSR	PC,$PCBPT
   2455	007174					NRTI$	P.LLA(R3)	; RETURN THE INTERRUPT CCB
	007174	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	007202	012764 	004002 	000010 		MOV	#<NT$RTI*400!FC.RCE>,C.FNC(R4)
	007210	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	007216	004767 	000000G			JSR	PC,$LLCRS
   2456	007222	052764 	000010 	000010 		BIS	#PS.ABO,P.STS(R4) ; INDICATE ABORT IN PROGRESS
   2457	007230	010104 				MOV	R1,R4		; GET DISCONNECT CCB
   2458	007232	110064 	000006 			MOVB	R0,C.LIN(R4)	; SET THE PIPE NUMBER
   2459	007236	012764 	003006 	000010 		MOV	#<FC.CTL!FS.TRM>,C.FNC(R4) ; THE FUNCTION
   2460	007244	000167 	172420 			JMP	SRVDIS		; AND DISCONNECT THE PIPE.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 45
NSPXOF	- BACK-PRESSURE A LINE

   2462						.SBTTL	NSPXOF	- BACK-PRESSURE A LINE
   2463					;+
   2464					; WHEN THE OTHER END OF THE LINK IS TIRED OF US, EITHER THROUGH
   2465					; FLOW CONTROL OR THE USE OF BACK-PRESSURE COMMANDS, WE WILL BE NOTIFIED
   2466					; THROUGH THIS ENTRY TO STOP SENDING. WE SIMPLY SET THE BACK-PRESSURE BIT
   2467					; IN THE PIPE STATUS WORD.
   2468					;
   2469					; INPUTS:
   2470					;	R4 - FREE CCB WITH PIPE NUMBER (ULA)
   2471					;
   2472					; NO OUTPUTS
   2473					;-
   2474
   2475	007250				NSPXOF:	GTPCB$			; GET THE PCB
	007250	005000 				  CLR	  R0
	007252	156400 	000006 			  BISB	  C.LIN(R4),R0
	007256	004767 	000000G			JSR	PC,$PCBPT
   2476	007262	052763 	000020 	000010 		BIS	#PS.BP,P.STS(R3) ; INDICATE BACK-PRESSURED.
   2477	007270					CALLR	$CCBRT		; RETURN THE CCB.
	007270	000167 	000000G			JMP	$CCBRT
   2478
   2479						.SBTTL	NSPXON	- ENABLE BACK-PRESSURED LINE
   2480					;+
   2481					; WHEN NSP IS READY TO ACCEPT DATA ON THE DATA LINK, NRM WILL BE
   2482					; NOTIFIED THROUGH THIS ENTRY
   2483					;
   2484					; INPUTS:
   2485					;	R4 - FREE CCB WITH PIPE NUMBER (ULA)
   2486					;-
   2487
   2488	007274				NSPXON:	GTPCB$			; GET THE PCB
	007274	005000 				  CLR	  R0
	007276	156400 	000006 			  BISB	  C.LIN(R4),R0
	007302	004767 	000000G			JSR	PC,$PCBPT
   2489	007306					CALL	$CCBRT		; WE DON'T NEED THIS CCB.
	007306	004767 	000000G			JSR	PC,$CCBRT
   2490	007312	116301 	000016 			MOVB	P.LLA(R3),R1	; GET LLA
   2491	007316	042763 	000020 	000010 		BIC	#PS.BP,P.STS(R3) ; CLEAR BACK-PRESSURE FLAG
   2492	007324	062703 	000012 			ADD	#P.BPQ,R3	; AND POINT TO BACK-PRESSURE QUEUE.
   2493	007330				10$:	CALL	$CMQRM		; SEE IF THERE ARE
	007330	004767 	000000G			JSR	PC,$CMQRM
   2494	007334	103413 				BCS	90$		; CCBS AWAITING TRANSMISSION.
   2495	007336					NDAT$	R1		; IF SO, SEND IT
	007336	110164 	000006 			    MOVB    R1,C.LIN(R4)
	007342	012764 	001000 	000010 		MOV	#<NT$DAT*400!FC.XME>,C.FNC(R4)
	007350	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	007356	004767 	000000G			JSR	PC,$LLCRS
   2496	007362	000762 				BR	10$		; AND TRY FOR MORE.
   2497	007364				90$:	RETURN
	007364	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 46
CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS

   2499						.SBTTL	CSBGT	- GET A CCB/SDB AND SAVE BUFFER ADDRESS
   2500					;+
   2501					; GET A CCB/SDB AND FIX IT UP.
   2502					;
   2503					; SINCE NSP USES C.BUF2+2 DURING TRANSMITS (AS IF ALL BUFFERS WERE LDBS)
   2504					; WE MUST SET THIS PRECIOUS WORD UP OR LOSE OUR PRECIOUS SYSTEM....
   2505					;
   2506					; NO INPUTS
   2507					;
   2508					; OUTPUTS:
   2509					;	APR6 - MAPPED TO SDB
   2510					;	R4 - CCB/SDB IF CARRY IS CLEAR
   2511					;
   2512					; REGISTERS MODIFIED: APR6,R4
   2513					;-
   2514
   2515	007366				CSBGT:	CALL	$CSBGT		;GET A CCB/SDB
	007366	004767 	000000G			JSR	PC,$CSBGT
   2516	007372	103403 				BCS	10$		;AND IF SUCCESSFUL
   2517	007374	016464 	000016 	000026 		MOV	C.BUF+2(R4),C.BUF2+2(R4) ;COPY THE BUFFER ADDRESS.
   2518	007402				10$:	RETURN
	007402	000207 				RTS	PC
   2519
   2520						.SBTTL	SDBGT	- GET A SDB AND INSERT IN CCB
   2521					;+
   2522					; THIS ROUTINE IS HERE FOR THE SAME REASON AS ABOVE.
   2523					;
   2524					; INPUTS:
   2525					;	R4 - CCB TO INSERT SDB INTO
   2526					;
   2527					; OUTPUTS (IF CARRY IS CLEAR):
   2528					;	APR6 - MAPPED TO SDB
   2529					;	C.BUF+0(R4) - SDB APR BIAS
   2530					;	C.BUF+2(R4) - SDB VIRTUAL ADDRESS
   2531					;	C.BUF2+2(R4) - SDB VIRTUAL ADDRESS
   2532					;
   2533					; REGISTERS MODIFIED: APR6
   2534					;-
   2535
   2536	007404				SDBGT:	PUSH	<R3,R2>		; SAVE VOLOTILE REGISTERS
	007404	010346 				MOV	R3,-(SP)
	007406	010246 				MOV	R2,-(SP)
   2537	007410					CALL	$SDBGT		; AND BID FOR A SDB.
	007410	004767 	000000G			JSR	PC,$SDBGT
   2538	007414	103406 				BCS	90$		; IF WE WON
   2539	007416	010364 	000014 			MOV	R3,C.BUF+0(R4)	; INSERT APR BIAS
   2540	007422	010264 	000016 			MOV	R2,C.BUF+2(R4)	; AND VIRTUAL ADDRSS
   2541	007426	010264 	000026 			MOV	R2,C.BUF2+2(R4)	; INTO CCB.
   2542	007432				90$:	POP	<R2,R3>
	007432	012602 				MOV	(SP)+,R2
	007434	012603 				MOV	(SP)+,R3
   2543	007436					RETURN
	007436	000207 				RTS	PC
   2544
   2545						.SBTTL	NRMDAT	- RETURN A NRM DATA BUFFER
   2546					;+
   2547					; THIS ROUTINE RETURNS BUFFERS AFTER A TRANSMIT OPERATION COMPLETES.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 46-1
NRMDAT	- RETURN A NRM DATA BUFFER

   2548					;
   2549					; INPUT:
   2550					;	R4= ADDRESS OF CCB-RDB
   2551					;
   2552					; OUTPUT:
   2553					;	CCB-RDB RETURNED TO POOL
   2554					;-
   2555
   2556	007440				NRMDAT:				;MESSAGE ENTRY POINT
   2557	007440	132764 	000004 	000003 		BITB	#CB.RDB,C.BID(R4) ;IF A CCB-RDB
   2558	007446	001402 				BEQ	10$		;THEN
   2559	007450					CALLR	$LDBRT		;RETURN LARGE DATA BUFFER
	007450	000167 	000000G			JMP	$LDBRT
   2560	007454	016464 	000026 	000016 	10$:	MOV	C.BUF2+2(R4),C.BUF+2(R4) ;ELSE RESTORE BUFFER ADDRESS
   2561	007462					CALLR	$CSBRT		;AND RETURN CCB-SDB.
	007462	000167 	000000G			JMP	$CSBRT
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 47
SRVERR	- ERROR PROCESSOR

   2563						.SBTTL	SRVERR	- ERROR PROCESSOR
   2564					;+
   2565					; THIS ROUTINE PROVIDES THE MECHANISM FOR A DIALOGUE MANAGER TO
   2566					; SEND AN ASYNCHRONOUS ERROR MESSAGE TO THE RESOURCE MANAGER.
   2567					; THE ERROR MESSAGE IS ENCODED AS A WORD  AND IS STORED IN C.BUF2
   2568					; OF THE CCB.
   2569					; THIS ROUTINE GETS THE ERROR MESSAGE AND USES IT TO DISPATCH TO
   2570					; THE APPROPRIATE ERROR HANDLER.
   2571					; PRESENTLY, ALL ERRORS RESULT IN A CLOSE MESSAGE BEING SENT TO
   2572					; THE DIALOGUE MANAGER.
   2573					;
   2574					; INPUT:
   2575					;	R4= ADDRESS OF CCB CONTAINING ERROR MESSAGE
   2576					;
   2577					; OUTPUT:
   2578					;	ERROR MESSAGE DEPENDENT
   2579					;
   2580					;-
   2581
   2582	007466				SRVERR:				;ENTRY POINT
   2583	007466	005064 	000032 			CLR	W.NSP(R4)	;INDICATE NO NSP CCB-RDB
   2584	007472					GTTCB$			;GET THE RESOURCE CONTROL BLOCK
	007472	005000 				CLR	R0
	007474	156400 	000006 			BISB	C.LIN(R4),R0
	007500	004767 	000000G			JSR	PC,$TCBPT
   2585	007504	016503 	000004 			MOV	T.PCBR(R5),R3	;AND CONTROL PCB ADDRESS
   2586	007510	032763 	000004 	000010 		BIT	#PS.DIP,P.STS(R3) ;DISCONNECT PENDING?
   2587	007516	001012 				BNE	2$		;IF NE, YES- DISCARD ERROR MESSAGE
   2588	007520	016500 	000006 			MOV	T.PCBD(R5),R0	;POINT TO DATA PCB
   2589	007524	032760 	000004 	000010 		BIT	#PS.DIP,P.STS(R0) ;DISCONNECT PENDING?
   2590	007532	001004 				BNE	2$		;IF NE, YES- DISCARD ERROR MESSAGE
   2591	007534	032765 	000001 	000012 		BIT	#TS.CLP,T.STS(R5) ;CLOSE PENDING?
   2592	007542	001402 				BEQ	5$		;IF EQ, NO- CONTINUE
   2593	007544				2$:	CALLR	NSPRT		;RETURN CCB
	007544	000167 	000044 			JMP	NSPRT
   2594
   2595	007550	032765 	000002 	000012 	5$:	BIT	#TS.OPP,T.STS(R5) ;OPEN PENDING?
   2596	007556	001404 				BEQ	10$		;IF EQ, NO- CONTINUE
   2597	007560	052765 	001000 	000012 		BIS	#TS.STE,T.STS(R5) ;SET START ERROR PENDING
   2598	007566	000403 				BR	15$		;AND CONTINUE
   2599
   2600	007570	052765 	000400 	000012 	10$:	BIS	#TS.OSP,T.STS(R5) ;SET OPERATIONAL STATUS PENDING
   2601
   2602	007576	016400 	000024 		15$:	MOV	C.BUF2(R4),R0	;GET ERROR CODE
   2603	007602	006300 				ASL	R0		;MAKE A WORD INDEX
   2604	007604	000170 	000270'			JMP	@ERRDSP(R0)	;AND DISPATCH TO ERROR PROCESSOR
   2605
   2606	007610				RCVTHR:
   2607	007610				REPTHR:
   2608	007610				NAKTHR:
   2609	007610				TRMERR:
   2610	007610					CALLR	CLOSE2		;ELSE CLOSE TERMINAL
	007610	000167 	174756 			JMP	CLOSE2
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 48
NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER

   2612						.SBTTL	NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER
   2613					;+
   2614					;  THIS ROUTINE RETURNS CCBS AND RECEIVE BUFFERS ACQUIRED FROM NSP
   2615					;  IF ANY ARE ATTACHED TO THE CCB
   2616					;
   2617					;  INPUT:
   2618					;	R4 = ADDRESS OF CCB FOR BUFFER
   2619					;	R3 = CONTROL PCB
   2620					;
   2621					; REGISTERS MODIFIED: R1
   2622					;-
   2623
   2624	007614	016401 	000032 		NSPRT:	MOV	W.NSP(R4),R1	; PICK UP MYTHICAL NSP MESSAGE
   2625	007620					CALL	$CCBRT		; AND RELEASE THE CCB.
	007620	004767 	000000G			JSR	PC,$CCBRT
   2626	007624	010104 				MOV	R1,R4		; IF THE IS A NSP MESSAGE
   2627	007626	001416 				BEQ	90$		; THEN
   2628	007630					NRTN$	P.LLA(R3),#NT.ACK ; ACK THE MESSAGE.
	007630	116364 	000016 	000006 		    MOVB    P.LLA(R3),C.LIN(R4)
	007636	012764 	000001 	000012 		    MOV	    #NT.ACK,C.STS(R4)
	007644	012764 	000002 	000010 		MOV	#<NT$RTN*400!FC.RCE>,C.FNC(R4)
	007652	112764 	000200G	000007 		MOVB	#<200+PD$NSP>,C.LIN+1(R4)
	007660	004767 	000000G			JSR	PC,$LLCRS
   2629	007664				90$:	RETURN
	007664	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 49
NSPRT	- RETURN CCB & ASSOCIATED NSP BUFFER

   2631					;		***- RESOURCE MANAGER UTILITIES -***
   2632
   2633
   2634					;+
   2635					; THE FOLLOWING ROUTINES ARE GENERAL UTILITIES USED BY THE RESOURCE
   2636					; MANAGER AND THE ATS DIALOGUE MANAGERS FOR TABLE LOOKUP; INSERTION,
   2637					; DELETION AND SCANNING OF ITEMS IN LINKED LISTS; AND A 'PUSH ONTO QUEUE'
   2638					; ROUTINE.
   2639					;-
   2640
   2641
   2642						.SBTTL	GET*	- GET DATA FROM NRM MESSAGE
   2643					;+
   2644					; THE FOLLOWING ROUTINES EXTRACT DATA FROM THE NRM MESSAGE POINTED TO BY R2
   2645					; AND UPDATE R2 TO POINT AFTER THE DATA EXTRACTED.
   2646					;
   2647					; GET1	- GET A SINGLE BYTE (NO SIGN EXTENSION)
   2648					; GET2	- GET TWO BYTES AND ASSEMBLE AS WORD
   2649					;
   2650					; INPUTS:
   2651					;	APR6= BIASED INTO RESOURCE MESSAGE
   2652					;	R2 - POINTS TO DATA TO EXTRACT
   2653					;
   2654					; OUTPUTS:
   2655					;	R2 - POINTS AFTER EXTRACTED DATA
   2656					;	R0 - ASSEMBLED DATA
   2657					;-
   2658
   2659	007666	005000 			GET1:	CLR	R0		;PICK UP ONE BYTE
   2660	007670	152200 				BISB	(R2)+,R0	;WITHOUT EXTENDING SIGN.
   2661	007672					RETURN
	007672	000207 				RTS	PC
   2662
   2663	007674	005000 			GET2:	CLR	R0		;START WITH NOTHING
   2664	007676	152200 				BISB	(R2)+,R0	;PICK UP LOW BYTE
   2665	007700	000300 				SWAB	R0
   2666	007702	152200 				BISB	(R2)+,R0	;PICK UP HIGH BYTE
   2667	007704	000300 				SWAB	R0
   2668	007706					RETURN
	007706	000207 				RTS	PC
   2669						.SBTTL	GIVLIN	- GIVE A LINE TO A SERVER
   2670					;+
   2671					; TRANSFER THE GIVEN LINE TO THE CONTROL OF THE SERVER. THIS INVOLVES
   2672					; SETTING THE MAPPING TABLE OF THE SERVER AND THE LLC TABLE.
   2673					;
   2674					; INPUTS:
   2675					;	R1 - LLC PDV INDEX
   2676					;	R0 - RESOURCE NUMBER
   2677					;
   2678					; NO OUTPUTS
   2679					;-
   2680
   2681	007710				GIVLIN:	CALL	$SAVAL		; SAVE ALL REGISTERS
	007710	004767 	000000G			JSR	PC,$SAVAL
   2682	007714	010102 				MOV	R1,R2		; SET THE TRANSFERREE
   2683	007716	016701 	000000G			MOV	$CMPDV,R1	; US AS TRANSFERRER
   2684	007722					CALL	FNDLIN		; AND INIT.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 49-1
GIVLIN	- GIVE A LINE TO A SERVER

	007722	004767 	000050 			JSR	PC,FNDLIN
   2685	007726	103405 				BCS	90$		; IF OWNED BY TRANSFERER,
   2686	007730	110260 	000001 			MOVB	R2,1(R0)	; DIRECT SLN TO TRANSFEREE
   2687	007734	016465 	000016 	000016 		MOV	Z.MAP(R4),Z.MAP(R5) ; AND MAP HIM TO IT.
   2688	007742				90$:	RETURN
	007742	000207 				RTS	PC
   2689
   2690						.SBTTL	GETLIN	- REGAIN A LINE FROM A SERVER
   2691					;+
   2692					; TRANSFER CONTROL OF THE GIVEN LINE BACK TO NRM. THIS INVOLVES
   2693					; SETTING THE MAPPING TABLE OF THE SERVER AND THE LLC TABLE.
   2694					;
   2695					; INPUTS:
   2696					;	R1 - LLC PDV INDEX
   2697					;	R0 - RESOURCE NUMBER
   2698					;
   2699					; NO OUTPUTS
   2700					;-
   2701
   2702	007744				GETLIN:	CALL	$SAVAL		; SAVE ALL REGISTERS
	007744	004767 	000000G			JSR	PC,$SAVAL
   2703	007750	016702 	000000G			MOV	$CMPDV,R2	; SET US AS TRANSFEREE
   2704	007754					CALL	FNDLIN		; AND INIT.
	007754	004767 	000016 			JSR	PC,FNDLIN
   2705	007760	103405 				BCS	90$		; IF OWNED BY SERVER,
   2706	007762	110260 	000001 			MOVB	R2,1(R0)	; GET THE SLN BACK
   2707	007766	012764 	100000 	000016 		MOV	#100000,Z.MAP(R4) ; AND CLEAR THE MAP ENTRY.
   2708	007774				90$:	RETURN
	007774	000207 				RTS	PC
   2709
   2710					;+
   2711					; GET INFO PERTINENT TO LINE TRANSFER
   2712					;
   2713					; INPUTS:
   2714					;	R0 - LINE NUMBER
   2715					;	R1 - TRANSFERRING PDV INDEX
   2716					;	R2 - TRANSFEREE'S PDV INDEX
   2717					;
   2718					; OUTPUTS:
   2719					;	R0 - LLC TABLE ENTRY ADDRESS
   2720					;	R1 - TRANSFERRING PDV INDEX
   2721					;	R2 - TRANSFEREE'S PDV INDEX
   2722					;	R4 + Z.MAP = TRANSFERRER'S PDV MAP ENTRY
   2723					;	R5 + Z.MAP = TRANSFERREE'S PDV MAP ENTRY
   2724					;
   2725					; REGISTERS DESTROYED: R5,R4,R3,R0
   2726					;-
   2727
   2728	007776	010205 			FNDLIN:	MOV	R2,R5		; COPY AND
   2729	010000	066705 	000000G			ADD	$PDVTA,R5	; PICK UP
   2730	010004	011505 				MOV	(R5),R5		; TRANSFEREE'S PDV
   2731	010006	006300 				ASL	R0		; AND INDEX
   2732	010010	060005 				ADD	R0,R5		; INTO THE CHANNEL MAP.
   2733	010012	010104 				MOV	R1,R4		; ALSO COPY
   2734	010014	066704 	000000G			ADD	$PDVTA,R4	; AND GET
   2735	010020	011404 				MOV	(R4),R4		; TRANSFERER'S PDV
   2736	010022	060004 				ADD	R0,R4		; AND INDEX HERE ALSO.
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 49-2
GETLIN	- REGAIN A LINE FROM A SERVER

   2737	010024	016400 	000016 			MOV	Z.MAP(R4),R0	; GET SLN AND CHECK IF ASSIGNED
   2738	010030	100416 				BMI	80$		; IF NEGATIVE, NO GO.
   2739	010032	042700 	177400 			BIC	#^C377,R0	; ISOLATE THE SLN
   2740	010036	006300 				ASL	R0		; AND
   2741	010040	066700 	000000G			ADD	$LLCTA,R0	; INDEX INTO THE LLC TABLE.
   2742	010044	011003 				MOV	(R0),R3		; CHECK IF IT HAS STATIONS.
   2743	010046	100006 				BPL	70$		; IF SO,
   2744	010050	006303 				ASL	R3		; THEN GET THE STATION TABLE
   2745	010052	005000 				CLR	R0		; AND
   2746	010054	156400 	000017 			BISB	Z.MAP+1(R4),R0	; STATION NUMBER
   2747	010060	006300 				ASL	R0		; AND INDEX
   2748	010062	060300 				ADD	R3,R0		; INTO TABLE.
   2749	010064	005727 			70$:	TST	(PC)+		; SUCCESS OR
   2750	010066	000261 			80$:	SEC			; FAILURE.
   2751	010070					RETURN
	010070	000207 				RTS	PC
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 50
GETLIN	- REGAIN A LINE FROM A SERVER

   2753					;+
   2754					; LIST MANIPULATION ROUTINES FOR REFERRAL LIST, RESERVED LIST, AND OPEN LIST.
   2755					;
   2756					; INPUTS:
   2757					;	R5= REFERRAL CCB OR RESOURCE TCB (IN SETXXX & REMXXX)
   2758					;	R4= WORKING CCB
   2759					;		W.CID= CONTROL ID
   2760					;	R3= CONTROL / DATA PIPE ADDRESS
   2761					;
   2762					; OUTPUTS:
   2763					;	R5= REFERRAL CCB OR RESOURCE TCB (IN FNDXXX)
   2764					;-
   2765
   2766	010072	016315 	000004 		SETREF:	MOV	P.REF(R3),(R5)	; LINK INTO
   2767	010076	010563 	000004 			MOV	R5,P.REF(R3)	; REFERRAL LIST.
   2768	010102					RETURN
	010102	000207 				RTS	PC
   2769
   2770	010104	016315 	000002 		SETRES:	MOV	P.RES(R3),(R5)	; LINK INTO
   2771	010110	010563 	000002 			MOV	R5,P.RES(R3)	; RESERVED RESOURCE LIST.
   2772	010114					RETURN
	010114	000207 				RTS	PC
   2773
   2774	010116	016365 	000002 	000002 	SETOPN:	MOV	P.OPN(R3),T.OLNK(R5) ; LINK INTO
   2775	010124	010563 	000002 			MOV	R5,P.OPN(R3)	; OPEN RESOURCE LIST.
   2776	010130					RETURN
	010130	000207 				RTS	PC
   2777
   2778	010132	016305 	000004 		FNDREF:	MOV	P.REF(R3),R5	; GET FIRST REFERRAL CCB
   2779	010136	001406 				BEQ	80$		; IF THERE IS ONE.
   2780	010140	026465 	000004 	000004 	10$:	CMP	W.CID(R4),R.CID(R5) ; IF CONTROL IDS MATCH
   2781	010146	001403 				BEQ	90$		; THEN ALL DONE
   2782	010150	011505 				MOV	(R5),R5		; OTHERWISE
   2783	010152	001372 				BNE	10$		; GO THROUGH LINKS
   2784	010154	000261 			80$:	SEC			; UNTIL WE RUN OUT.
   2785	010156				90$:	RETURN
	010156	000207 				RTS	PC
   2786
   2787	010160	016305 	000002 		FNDRES:	MOV	P.RES(R3),R5	; GET FIRST RESERVED RESOURCE
   2788	010164	001406 				BEQ	80$		; IF THERE IS ONE.
   2789	010166	026465 	000004 	000010 	10$:	CMP	W.CID(R4),T.RID(R5) ; IF CONTROL IDS MATCH
   2790	010174	001403 				BEQ	90$		; THEN ALL DONE
   2791	010176	011505 				MOV	(R5),R5		; OTHERWISE
   2792	010200	001372 				BNE	10$		; GO THROUGH LINKS
   2793	010202	000261 			80$:	SEC			; UNTIL WE RUN OUT.
   2794	010204				90$:	RETURN
	010204	000207 				RTS	PC
   2795
   2796	010206				REMREF:	PUSH	R4		; GET A WORK REGISTER
	010206	010446 				MOV	R4,-(SP)
   2797	010210	012704 	000004 			MOV	#P.REF,R4	; AND POINT IT
   2798	010214	060304 				ADD	R3,R4		; TO REFERRAL LIST.
   2799	010216	021405 			10$:	CMP	(R4),R5		; IF NO MATCH
   2800	010220	001404 				BEQ	20$		; THEN
   2801	010222	011404 				MOV	(R4),R4		; GO THROUGH
   2802	010224	001374 				BNE	10$		; THE LINKS
   2803	010226	000261 				SEC			; UMMMM....
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 50-1
GETLIN	- REGAIN A LINE FROM A SERVER

   2804	010230	000405 				BR	80$		; UNTIL RUN OUT.
   2805	010232	011514 			20$:	MOV	(R5),(R4)	; IF FOUND, DE-LINK IT.
   2806	010234	010504 				MOV	R5,R4
   2807	010236					CALL	$CCBRT		; THROW IT AWAY
	010236	004767 	000000G			JSR	PC,$CCBRT
   2808	010242	000241 				CLC			; ALL OKAY
   2809	010244				80$:	POP	R4		; RETURN R4
	010244	012604 				MOV	(SP)+,R4
   2810	010246					RETURN
	010246	000207 				RTS	PC
   2811
   2812	010250				REMRES:	PUSH	R4		; GET A WORK REGISTER
	010250	010446 				MOV	R4,-(SP)
   2813	010252	012704 	000002 			MOV	#P.RES,R4	; AND POINT IT
   2814	010256	060304 				ADD	R3,R4		; TO RESERVED RESOURCE LIST.
   2815	010260	021405 			10$:	CMP	(R4),R5		; IF NO MATCH
   2816	010262	001404 				BEQ	20$		; THEN
   2817	010264	011404 				MOV	(R4),R4		; GO THROUGH
   2818	010266	001374 				BNE	10$		; THE LINKS
   2819	010270	000261 				SEC			; UMMMM....
   2820	010272	000401 				BR	80$		; UNTIL RUN OUT.
   2821	010274	011514 			20$:	MOV	(R5),(R4)	; IF FOUND, DE-LINK IT.
   2822	010276				80$:	POP	R4		; RETURN R4
	010276	012604 				MOV	(SP)+,R4
   2823	010300					RETURN
	010300	000207 				RTS	PC
   2824
   2825	010302				REMOPN:	PUSH	R4		; GET A WORK REGISTER
	010302	010446 				MOV	R4,-(SP)
   2826	010304	012704 	000000 			MOV	#P.OPN-T.OLNK,R4 ; AND POINT IT
   2827	010310	060304 				ADD	R3,R4		; TO OPEN RESOURCE LIST.
   2828	010312	026405 	000002 		10$:	CMP	T.OLNK(R4),R5	; IF NO MATCH
   2829	010316	001405 				BEQ	20$		; THEN
   2830	010320	016404 	000002 			MOV	T.OLNK(R4),R4	; GO THROUGH
   2831	010324	001372 				BNE	10$		; THE LINKS
   2832	010326	000261 				SEC			; UMMMM....
   2833	010330	000403 				BR	80$		; UNTIL RUN OUT.
   2834	010332	016564 	000002 	000002 	20$:	MOV	T.OLNK(R5),T.OLNK(R4) ; IF FOUND, DE-LINK IT.
   2835	010340				80$:	POP	R4		; RETURN R4
	010340	012604 				MOV	(SP)+,R4
   2836	010342					RETURN
	010342	000207 				RTS	PC
   2837
   2838		000001 				.END
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 50-2
SYMBOL TABLE

ACCDSP  000210R  	CTLDSP  000264R  	FE.MXT= 040000   	LD$LP = 000000   	NRMRWC  000546R
ACCESS  003630R  	CT.MAX= 000001   	FE.NLG= 100000   	LF.ACT= 100000   	NRMRWT  000302R
AC.CLO= 000003   	C$$CKP= 000000   	FE.PKT= 000100   	LF.BWT= 000007   	NRMTIM  000342R
AC.MAX= 000004   	C$$ORE= 000400   	FE.PLA= 000020   	LF.DLO= 000040   	NRMXCP  000026R
AC.REL= 000004   	C$$RSH= 177564   	FNDLIN  007776R  	LF.ENA= 002000   	NSPCON  001322R
AC.SEP= 000002   	C.BID   000003   	FNDREF  010132R  	LF.MDC= 000100   	NSPDAT  002664R
AC.SIN= 000001   	C.BUF   000014   	FNDRES  010160R  	LF.MFL= 004000   	NSPDIS  001576R
ASNDSP  000254R  	C.BUF1  000014   	FS.AST= 000000   	LF.MTP= 000020   	NSPINT  007140R
ASSIGN  005400R  	C.BUF2  000024   	FS.CIB= 002000   	LF.RDY= 040000   	NSPRT   007614R
ASYREP  006026R  	C.CNT   000020   	FS.CRA= 001000   	LF.REA= 010000   	NSPXOF  007250R
AS.ASS= 000001   	C.CNT1  000020   	FS.DIS= 013000   	LF.TIM= 000010   	NSPXON  007274R
AS.HAN= 000003   	C.CNT2  000030   	FS.DVC= 001000   	LF.UNL= 020000   	NS.BOM= 000040
AS.MAX= 000003   	C.FLG   000022   	FS.ENB= 012000   	L$$ASG= 000000   	NS.EOM= 000100
AS.RES= 000002   	C.FLG1  000022   	FS.GET= 006000   	L$$DRV= 000000   	NS.MFL= 000003
A$$CHK= 000000   	C.FLG2  000032   	FS.INI= 000000   	L$$P11= 000001   	NS.MOM= 000000
A$$CPS= 000000   	C.FNC   000010   	FS.KIL= 000000   	L$$11R= 000000   	NS.NFL= 000001
A$$PRI= 000000   	C.LIN   000006   	FS.LTM= 001000   	L.CTL   000012   	NS.SET= 000002
A$$TRP= 000000   	C.LNK   000000   	FS.MNT= 004000   	L.DDM   000002   	NS.SFL= 000002
CAPDSP  000172R  	C.MOD   000011   	FS.MSN= 014000   	L.DDS   000004   	NS.SOL= 000140
CB.CCB= 000002   	C.NSP   000004   	FS.RNG= 011000   	L.DLC   000003   	NS.SUC= 000001
CB.RDB= 000004   	C.RSV   000002   	FS.RTN= 001000   	L.DLM   000006   	NT$ABO= 000022
CE.ABO= 100362   	C.STA   000007   	FS.SET= 005000   	L.DLS   000010   	NT$ACC= 000002
CE.DIS= 100366   	C.STS   000012   	FS.STM= 000000   	L.FLG   000000   	NT$ADS= 000000
CE.ERR= 100370   	DISCP   001722R  	FS.STP= 002000   	L.LEN = 000014   	NT$CON= 000000
CE.MOP= 100372   	DISDP   002224R  	FS.STR= 001000   	L.UNT   000013   	NT$DAT= 000002
CE.NTE= 100361   	DISPC   002434R  	FS.TRM= 003000   	MPAR  = 172100   	NT$DIS= 000010
CE.RTE= 100376   	DLCDIS  001212R  	FS.XKL= 002000   	MPCSR = 177746   	NT$INT= 000004
CE.SRC= 100364   	DLCDON  001234R  	FS.XOF= 010000   	MSGDSP  000142R  	NT$MOD= 000012
CE.TMO= 100374   	DLCENB  001170R  	FS.XON= 007000   	M$$CRB= 000124   	NT$NAK= 000022
CF.EOM= 000004   	DLXLIN  001002R  	F$$LVL= 000001   	M$$CRX= 000000   	NT$OFF= 000026
CF.HDR= 000020   	DLXSTP  000734R  	GETLIN  007744R  	M$$FCS= 000000   	NT$ON = 000002
CF.LB = 100000   	DLXSTR  000700R  	GET1    007666R  	M$$MGE= 000000   	NT$QRY= 000014
CF.SOM= 000010   	DONLIN  001264R  	GET2    007674R  	M$$OVR= 000000   	NT$REJ= 000004
CF.SYN= 000040   	D$$BUG= 177514   	GIVLIN  007710R  	NAKTHR  007610R  	NT$RTI= 000010
CF.TRN= 000100   	D$$ISK= 000000   	G$$TPP= 000000   	NC.FM0= 000000   	NT$RTN= 000000
CLOSE   004516R  	D$$L11= 000001   	G$$TSS= 000000   	NC.FM1= 000001   	NT$SNG= 000006
CLOSE1  004536R  	D$$YNC= 000000   	G$$TTK= 000000   	NC.FM2= 000002   	NT$STP= 000004
CLOSE2  004572R  	D$$YNM= 000000   	G$$WRD= 000000   	NETACP  000336R  	NT$XOF= 000020
CMODE = 140000   	ENQUE   000314R  	IE.ABO= ****** GX	NE.ABO= 177776   	NT$XON= 000016
CP.MAX= 000002   	ERRDSP  000270R  	INVALI  006174R  	NE.ACT= 177771   	NT.ACK= 000001
CSBGT   007366R  	E$$XPR= 000000   	IS.SET= ****** GX	NE.CLS= 177767   	NT.BOM= 000040
CS.ABO= 000100   	FC.CCP= 000020   	IS.SUC= ****** GX	NE.DIS= 177777   	NT.EOM= 000100
CS.BUF= 000200   	FC.CTL= 000006   	I$$RAR= 000000   	NE.FMT= 177770   	NT.FCN= 037400
CS.DCR= 000400   	FC.KCP= 000016   	I$$RDN= 000000   	NE.NDT= 177766   	NT.MD1= 000420
CS.DEV= 000002   	FC.KIL= 000004   	KDSAR0= 172360   	NE.NOD= 177774   	NT.MFL= 000002
CS.DIS= 000040   	FC.RCE= 000002   	KDSDR0= 172320   	NE.REJ= 177775   	NT.MOD= 000020
CS.ENB= 000020   	FC.RCP= 000014   	KISAR0= 172340   	NE.RES= 177773   	NT.MOM= 000000
CS.EOF= 000001   	FC.TIM= 000010   	KISAR5= 172352   	NE.TIM= 177772   	NT.NAK= 000002
CS.ERR= 100000   	FC.XCP= 000012   	KISAR6= 172354   	NP$RTR= 000003   	NT.NFL= 000000
CS.HFE= 002000   	FC.XME= 000000   	KISAR7= 172356   	NRMCCP  000104R  	NT.SFL= 000001
CS.LST= 040000   	FE.CAL= 000040   	KISDR0= 172300   	NRMCTL  000070R  	NT.SOL= 000140
CS.MTL= 004000   	FE.DRV= 000010   	KISDR6= 172314   	NRMDAT  007440R  	NT.XOF= 000004
CS.RNG= 000010   	FE.EXP= 000200   	KISDR7= 172316   	NRMDIS  002642R  	NT.XON= 000010
CS.ROV= 000004   	FE.EXT= 000001   	K$$CNT= 177546   	NRMFLS  000564R  	N$$DAT= 000030
CS.RSN= 010000   	FE.EXV= 000004   	K$$CSR= 177546   	NRMLIN  001076R  	N$$DIS= 000020
CS.SUC= 000001   	FE.LSI= 000400   	K$$LDC= 000000   	NRMMSG  002772R  	N$$INT= 000020
CS.TMO= 020000   	FE.MUP= 000002   	K$$TPS= 000074   	NRMRCP  000056R  	N$$LDV= 000001
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 50-3
SYMBOL TABLE

N$$MOV= 000010   	P$$WRD= 000000   	RF.CVR= 100000 G 	SS.ERR= 000003   	T.FLG   000014 G
N$$OPT= 000020   	P.BPQ   000012 G 	RF.LIN= 001000 G 	SS.MAX= 000010   	T.LNK   000000 G
N$$OVR= 000042   	P.CBTN  000004 G 	RM$RWT= 000022   	SS.OPR= 000001   	T.NAM   000022 G
N$$SYS= 000001   	P.LLA   000016 G 	RP.DSC= 000007 G 	SS.RES= 000002   	T.NAML  000021 G
N$$USR= 000001   	P.NUM   000020 G 	RP.IRQ= 000005 G 	SS.USA= 000004   	T.NUM   000016 G
N.ACNT  000116   	P.OPN   000002 G 	RP.NAK= 000003 G 	STADSP  000232R  	T.OBJ   000020 G
N.ACTL  000114   	P.REF   000004 G 	RP.PWF= 000006 G 	STATSM  007054R  	T.OLNK  000002 G
N.DDL1  000012   	P.RES   000002 G 	RP.RCV= 000001 G 	STATUS  005424R  	T.PCBD  000006 G
N.DDL2  000016   	P.RSV   000000 G 	RP.REP= 000002 G 	STSDSP  000222R  	T.PCBR  000004 G
N.DDS1  000014   	P.SEG   000022 G 	RP.TRM= 000004 G 	STSREL  005524R  	T.RCNT  000032 G
N.DDS2  000020   	P.SPI   000021 G 	RQ.ACC= 000051   	ST.ALT= 000003   	T.RID   000010 G
N.DFMT  000010   	P.STS   000010 G 	RQ.ASS= 000052   	ST.MAX= 000003   	T.SPI   000017 G
N.DGRP  000012   	P.USER  000006 G 	RQ.CAP= 000042   	ST.QRY= 000001   	T.STAT= ****** GX
N.DOBJ  000011   	QRYATS  005574R  	RQ.CTL= 000054   	ST.REL= 000020   	T.STS   000012 G
N.DUSR  000014   	QUERY   005544R  	RQ.MAX= 000013   	ST.REP= 000002   	T.TT    000014 G
N.LGTH= 000160   	Q$$OPT= 000010   	RQ.MIN= 000041   	SWR   = 177570   	T.WCNT  000030 G
N.NODE  000000   	RCVTHR  007610R  	RQ.RES= 000047   	SY.DBL= 000020   	UBMPR = 170200
N.OPDL  000136   	RC.ACA= 000052 G 	RQ.RID= 000041   	SY.MAX= 000003   	UDSAR0= 177660
N.OPTD  000140   	RC.ACC= 000002 G 	RQ.SPC= 000050   	SY.REF= 000003   	UDSDR0= 177620
N.PASL  000102   	RC.ANP= 000024 G 	RQ.STS= 000053   	SY.RES= 000001   	UISAR0= 177640
N.PASS  000104   	RC.CNO= 000043 G 	RSPNS   006200R  	SY.SHR= 000002   	UISAR4= 177650
N.RQDL  000060   	RC.FIN= 000000 G 	RSPNSM  006670R  	S$$WRG= 000000   	UISAR5= 177652
N.RQID  000062   	RC.GND= 000034 G 	RSPNS1  006246R  	S$$YSZ= 007600   	UISAR6= 177654
N.RSRV= 000030   	RC.HNE= 000050 G 	RSPNS2  006454R  	TCBLEN= 000040 G 	UISAR7= 177656
N.SDL1  000036   	RC.IAC= 000025 G 	RS.HIH= 000053   	TF.DEA= 040000 G 	UISDR0= 177600
N.SDL2  000042   	RC.ICT= 000027 G 	RS.LOW= 000051   	TF.DIS= 020000 G 	UISDR4= 177610
N.SDS1  000040   	RC.INT= 000001 G 	RS.RQ = 100000 G 	TF.RAL= 060000   	UISDR5= 177612
N.SDS2  000056   	RC.IRC= 000026 G 	R$FLG   000000 G 	TPS   = 177564   	UISDR6= 177614
N.SEG   000006   	RC.IRD= 000033 G 	R$PCB   000010 G 	TRMERR  007610R  	UISDR7= 177616
N.SFMT  000034   	RC.ISO= 000041 G 	R$RWT   000002 G 	TS.CLP= 000001 G 	UNSUPP  006174R
N.SGRP  000036   	RC.MLN= 000037 G 	R$TCB   000014 G 	TS.EXE= ****** GX	V$$CTR= 001000
N.SOBJ  000035   	RC.REJ= 000051 G 	R$TCQ   000006 G 	TS.HP = 000040 G 	W.ADR = 000030 G
N.SUSR  000040   	RC.RJS= 000045 G 	R$$DER= 000000   	TS.OCP= 000007   	W.CID = 000004 G
OPEN1   003700R  	RC.RNA= 000032 G 	R$$K11= 000001   	TS.OP = 000004 G 	W.FNC = 000010 G
OPEN2   003710R  	RC.RNE= 000031 G 	R$$SND= 000000   	TS.OPP= 000002 G 	W.LIN = 000006 G
PCBLEN= 000024 G 	RC.RNS= 000044 G 	R$$11M= 000000   	TS.OSP= 000400 G 	W.NSP = 000032 G
PD$NSP= ****** GX	RC.RQO= 000030 G 	R.CID = 000004 G 	TS.PWF= 002000 G 	W.TMP = 000014 G
PIRQ  = 177772   	RC.RSE= 000047 G 	R.NSP = 000032 G 	TS.RHF= 000257   	X$$DBT= 000000
PMODE = 030000   	RC.RSI= 000046 G 	R.STS = 000012 G 	TS.RLP= 000010 G 	ZF.DDM= 000001
PR0   = 000000   	RC.RSO= 000036 G 	R.TCB = 000016 G 	TS.ROP= 000057   	ZF.DLC= 000002
PR1   = 000040   	RC.SHN= 000035 G 	SDBGT   007404R  	TS.RRL= 000053   	ZF.KMX= 000020
PR4   = 000200   	RC.SLN= 000040 G 	SETOPN  010116R  	TS.RS = 000020 G 	ZF.LLC= 000004
PR5   = 000240   	RC.SNE= 000042 G 	SETREF  010072R  	TS.SRP= 000200 G 	ZF.LMC= 000100
PR6   = 000300   	RD.NDI= 000001 G 	SETRES  010104R  	TS.STE= 001000 G 	ZF.MFL= 000010
PR7   = 000340   	RD.PNC= 000001 G 	SHARE   003530R  	TT.CD = 000011 G 	ZF.MUX= 000040
PS    = 177776   	RD.STR= 000002 G 	SISDR0= 172200   	TT.CR = 000010 G 	ZF.TIM= 000200
PS.ABO= 000010 G 	REFER   003540R  	SPCDSP  000200R  	TT.DDC= 000005 G 	Z.DAT   000014
PS.BP = 000020 G 	RELEAS  005234R  	SPCFYM  006774R  	TT.LE = 000006 G 	Z.DSP   000000
PS.CC = 000002 G 	RELES1  005336R  	SPECIF  003206R  	TT.LP = 000007 G 	Z.FLG   000011
PS.CI = 000001 G 	REMOPN  010302R  	SRVDIS  001670R  	TT.L18= 000004 G 	Z.LEN = 000014
PS.CTL= 010000 G 	REMREF  010206R  	SRVERR  007466R  	TT.L36= 000003 G 	Z.LLN   000010
PS.DAT= 020000 G 	REMRES  010250R  	SRVGOT  004202R  	TT.V52= 000002 G 	Z.MAP   000016
PS.DIP= 000004 G 	REPTHR  007610R  	SRVSTP  004650R  	TT.V62= 000001 G 	Z.NAM   000006
PS.IMP= 000100 G 	REQEST  003064R  	SRVSTR  004400R  	T$$KMG= 000000   	Z.PCB   000012
PS.NKP= 000040 G 	RESERV  003444R  	SR0   = 177572   	T$$MIN= 000000   	Z.SCH   000004
PS.RCN= 000007   	RESPON  003176R  	SR3   = 172516   	T.DMRB  000034 G 	$CCBGT= ****** GX
P$$P45= 000000   	RF.CCB= 000400 G 	SS.ATS= 000010   	T.DMVA  000036 G 	$CCBRT= ****** GX
NRM - NODE RESOURCE MANAGER	MACRO M1110  13-OCT-79 09:48  PAGE 50-4
SYMBOL TABLE

$CMPDV= ****** GX	$CSBRT= ****** GX	$MPOBJ= ****** GX	$PDVTA= ****** GX	$TCBPT= ****** GX
$CMQIF= ****** GX	$LDBRT= ****** GX	$NRMTB  000002RG 	$SAVAL= ****** GX	$$NARG= 000002
$CMQIN= ****** GX	$LLCRQ= ****** GX	$PCBGT= ****** GX	$SDBGT= ****** GX	$$TYPE= 000000
$CMQRM= ****** GX	$LLCRS= ****** GX	$PCBPT= ****** GX	$SRSTD= ****** GX	.NRMDB  000000RG
$CSBGT= ****** GX	$LLCTA= ****** GX	$PCBRT= ****** GX

. ABS.	000160	   000
      	010344	   001
ERRORS DETECTED:  0

VIRTUAL MEMORY USED:  17950 WORDS  ( 71 PAGES)
DYNAMIC MEMORY:  19564 WORDS  ( 75 PAGES)
ELAPSED TIME:  00:02:38
NRM,[131,34]NRM/CR/-SP=[130,10]NETLIB/ML,RSXMC4/PA:1,[131,10]NRM
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 1

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

ACCDSP	  000210 R	#8-359      8-364      24-1429   
ACCESS	  003630 R	 8-334     #24-1410   
AC.CLO	= 000003	#6-163     
AC.MAX	= 000004	#8-364      24-1415   
AC.REL	= 000004	#6-164      24-1423   
AC.SEP	= 000002	#6-162      41-2357   
AC.SIN	= 000001	#6-161     
ASNDSP	  000254 R	#8-389      8-393      31-1859   
ASSIGN	  005400 R	 8-335     #31-1848   
ASYREP	  006026 R	 29-1709    29-1734   #36-2131   
AS.ASS	= 000001	#6-169     
AS.HAN	= 000003	#6-171     
AS.MAX	= 000003	#8-393      31-1854   
AS.RES	= 000002	#6-170     
CAPDSP	  000172 R	#8-344      8-347     
CB.RDB	= 000004	 46-2557   
CF.LB 	= 100000	 26-1552    35-2101    36-2139    40-2309   
CLOSE 	  004516 R	 8-362     #28-1628   
CLOSE1	  004536 R	 28-1630   #28-1635    30-1809   
CLOSE2	  004572 R	 15-827     16-935    #28-1647    47-2610   
CP.MAX	= 000002	#8-347     
CSBGT 	  007366 R	 36-2132   #46-2515   
CTLDSP	  000264 R	#8-397      8-399     
CT.MAX	= 000001	#8-399     
C.BID 	  000003	 46-2557   
C.BUF 	  000014	 6-206      6-223      13-716     13-717     14-780     18-1036    18-1041   *25-1480   *25-1481   
                         26-1543   *26-1549   *26-1550   *28-1640   *28-1641   *28-1648    35-2099    35-2102    36-2137   
                         36-2140    38-2194    39-2237    39-2256    40-2307    40-2310    46-2517   *46-2539   *46-2540   
                        *46-2560   
C.BUF2	  000024	*25-1510   *25-1511    29-1733   *46-2517   *46-2541    46-2560    47-2602   
C.CNT 	  000020	*25-1482   *26-1551   *28-1642   *28-1649   *35-2103   *36-2141   *40-2311   
C.CNT1	  000020	*13-730    *13-744    *17-970    
C.CNT2	  000030	 6-222     *25-1512   
C.FLG 	  000022	*25-1509   *26-1552   *35-2101   *36-2139   *40-2309   
C.FLG2	  000032	 6-207      6-214     
C.FNC 	  000010	 6-221      9-466      10-517    *11-594    *12-623    *12-649    *13-730    *13-744    *17-967    
                        *17-970    *17-973    *25-1516   *26-1553   *28-1655   *35-2086   *35-2109   *36-2149   *40-2295   
                        *40-2317   *44-2455   *44-2459   *45-2495   *48-2628   
C.LIN 	  000006	 6-219      9-418      9-492      10-511     11-584    *11-593    *12-623     12-639    *12-648    
                         13-730    *13-730    *13-730     13-744    *13-744    *13-744     14-786     14-797    *15-829    
                        *15-862    *16-936    *16-942    *17-967    *17-970    *17-970    *17-973     17-984     18-1018   
                         18-1034   *25-1516    26-1533   *26-1535   *26-1553    27-1582   *27-1584   *28-1655    29-1685   
                        *29-1694   *35-2086   *35-2086   *35-2109   *35-2109   *36-2135   *36-2149   *36-2149    38-2193   
                        *40-2295   *40-2295   *40-2317   *40-2317    44-2454   *44-2455   *44-2455   *44-2458    45-2475   
                         45-2488   *45-2495   *45-2495    47-2584   *48-2628   *48-2628   
C.MOD 	  000011	 9-465      10-516    *35-2085    35-2094   *35-2097   *36-2136    42-2388    43-2425   
C.NSP 	  000004	 6-202      6-213      11-593     12-648     13-730    *13-730     13-742     13-744    *13-744    
                        *13-744    *17-967    *17-967    *17-967    *36-2134    41-2341    41-2342    42-2389    42-2390   
                         43-2423    43-2424   
C.STA 	  000007	 13-741    *17-973    *18-1021   *25-1516   *26-1540   *26-1553   *28-1655   
C.STS 	  000012	 6-203     *11-586     12-641    *12-647    *13-744     14-789    *18-1036    18-1042    21-1290   
                         26-1536    26-1544    27-1589    33-2008    35-2084   *35-2086   *35-2104   *36-2142    38-2195   
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 2

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

                         39-2238   *39-2246    39-2256   *40-2295   *40-2312   *48-2628   
DISCP 	  001722 R	 14-800    #15-811     15-831     29-1700   
DISDP 	  002224 R	 14-801    #16-900     16-938     16-944     29-1718   
DISPC 	  002434 R	 15-869     15-890     16-941    #17-954    
DLCDIS	  001212 R	 7-311     #12-633    
DLCDON	  001234 R	 12-627     12-633    #12-639    
DLCENB	  001170 R	 7-310     #12-627    
DLXLIN	  001002 R	 11-534     11-550    #11-582    
DLXSTP	  000734 R	 7-294     #11-550    
DLXSTR	  000700 R	 7-293     #11-534    
DONLIN	  001264 R	 12-613     12-618    #12-645    
ENQUE 	  000314 R	#9-433      18-1032    44-2450   
ERRDSP	  000270 R	#8-403      47-2604   
FC.CCP	= 000020	 11-594     12-649     17-973    
FC.CTL	= 000006	 12-614     12-619     25-1516    26-1553    28-1655    44-2459   
FC.RCE	= 000002	 13-730     13-744     35-2086    40-2295    44-2455    48-2628   
FC.XME	= 000000	 17-967     17-970     35-2109    36-2149    40-2317    45-2495   
FNDLIN	  007776 R	 49-2684    49-2704   #49-2728   
FNDREF	  010132 R	 19-1107    21-1248    23-1358    30-1785    30-1818    33-2002    33-2027    39-2259   #50-2778   
FNDRES	  010160 R	 19-1105    21-1242    24-1421    33-1997    39-2265   #50-2787   
FS.DIS	= 013000	 12-619    
FS.ENB	= 012000	 12-614    
FS.GET	= 006000	 25-1516   
FS.STP	= 002000	 28-1655   
FS.STR	= 001000	 11-594     26-1553   
FS.TRM	= 003000	 17-973     44-2459   
GETLIN	  007744 R	 29-1691   #49-2702   
GET1  	  007666 R	 18-1046    18-1058    21-1256    21-1258    25-1470    25-1479    25-1484    25-1487    26-1546   
                         26-1548    28-1637    28-1639    34-2053    39-2240    39-2247    39-2251   #49-2659   
GET2  	  007674 R	 18-1060    38-2196   #49-2663   
GIVLIN	  007710 R	 26-1541   #49-2681   
IE.ABO	= ******  GX	 11-555     11-583     12-640    
INVALI	  006174 R	 8-328      8-329      8-330      8-331      8-344      8-351      8-359      8-368      8-376     
                         8-381      8-382      8-383      8-389      8-397      18-1052    19-1101    21-1238    24-1417   
                         31-1856    33-1993    34-2058   #37-2168    39-2243    39-2245   
IS.SET	= ******  GX	 11-536     11-552    
IS.SUC	= ******  GX	 12-630     12-636    
I$$AS 	= ******	 3-44      
KISAR6	= 172354	*13-716    *18-1041    25-1480   *26-1543    26-1549    28-1640   *38-2194   *39-2237   
LF.ACT	= 100000	#3-45      
LF.BWT	= 000007	#3-45      
LF.DLO	= 000040	#3-45      
LF.ENA	= 002000	#3-45      
LF.MDC	= 000100	#3-45      
LF.MFL	= 004000	#3-45      
LF.MTP	= 000020	#3-45      
LF.RDY	= 040000	#3-45      
LF.REA	= 010000	#3-45      
LF.TIM	= 000010	#3-45      
LF.UNL	= 020000	#3-45      
L.CTL 	  000012	#3-45      
L.DDM 	  000002	#3-45      
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 3

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

L.DDS 	  000004	#3-45      
L.DLC 	  000003	#3-45      
L.DLM 	  000006	#3-45      
L.DLS 	  000010	#3-45      
L.FLG 	  000000	#3-45      
L.LEN 	= 000014	#3-45      
L.UNT 	  000013	#3-45      
MSGDSP	  000142 R	#8-326      8-338      18-1057    39-2250   
M$$MGE	= 000000	 13-716     18-1041    26-1543    38-2194    39-2237   
NAKTHR	  007610 R	 8-406     #47-2608   
NETACP	  000336 R	#9-446      9-450     
NE.ABO	= 177776	 14-789    
NRMCCP	  000104 R	 7-261     #7-298     
NRMCTL	  000070 R	 7-256     #7-290     
NRMDAT	  007440 R	 7-272      17-960    #46-2556   
NRMDIS	  002642 R	 7-275      7-280     #17-984    
NRMFLS	  000564 R	#10-500     14-793    
NRMLIN	  001076 R	 9-480     #12-609    
NRMMSG	  002772 R	#18-1040   
NRMRCP	  000056 R	 7-259     #7-283     
NRMRWC	  000546 R	 7-263     #9-492     
NRMRWT	  000302 R	#9-430      15-830     15-863     16-937     16-943     19-1118    23-1368    29-1712    29-1738   
                         35-2091    40-2302   
NRMTIM	  000342 R	 7-257     #9-448     
NRMXCP	  000026 R	 7-258     #7-269     
NSPCON	  001322 R	 7-285     #13-716    
NSPDAT	  002664 R	 7-286     #18-1017   
NSPDIS	  001576 R	 7-304     #14-779    
NSPINT	  007140 R	 7-287     #44-2446   
NSPRT 	  007614 R	 15-835     16-920     47-2593   #48-2624   
NSPXOF	  007250 R	 7-308     #45-2475   
NSPXON	  007274 R	 7-307     #45-2488   
NT$ABO	= 000022	 17-967    
NT$ACC	= 000002	 13-744    
NT$DAT	= 000002	 35-2109    36-2149    40-2317    45-2495   
NT$DIS	= 000010	 17-970    
NT$REJ	= 000004	 13-730    
NT$RTI	= 000010	 44-2455   
NT$RTN	= 000000	 35-2086    40-2295    48-2628   
NT.ACK	= 000001	 35-2086    40-2295    48-2628   
NT.NFL	= 000000	 13-744    
NT.SOL	= 000140	 35-2104    36-2142    40-2312   
N.RQDL	  000060	 13-720    
N.RQID	  000062	 13-728     13-739    
N.SEG 	  000006	 13-718     13-740    
OPEN1 	  003700 R	 8-360     #24-1435   
OPEN2 	  003710 R	 8-361     #25-1465   
PCBLEN	= 000024  G	#4-52      
PD$NSP	= ******  GX	 13-730     13-744     17-967     17-970     35-2086    35-2109    36-2149    40-2295    40-2317   
                         44-2455    45-2495    48-2628   
PS.ABO	= 000010  G	#4-52       14-791     17-964     17-966     44-2456   
PS.BP 	= 000020  G	#4-52       13-743     35-2105    36-2143    40-2313    45-2476    45-2491   
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 4

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

PS.CC 	= 000002  G	#4-52       6-231      13-743     14-788     25-1502    29-1705    29-1729   
PS.CI 	= 000001  G	#4-52       6-231     
PS.CTL	= 010000  G	#4-52       13-726     13-743     14-799     15-848     16-911     17-954    
PS.DAT	= 020000  G	#4-52       18-1019    25-1498   
PS.DIP	= 000004  G	#4-52       6-231      15-811     15-822     15-833     15-852     15-860     15-889     16-900    
                         16-916     16-919     16-925     16-930     16-940     29-1697    29-1703    47-2586    47-2589   
PS.IMP	= 000100  G	#4-52      
PS.NKP	= 000040  G	#4-52      
PS.RCN	= 000007	#6-231     
P.BPQ 	  000012  G	#4-52       17-957     17-962     35-2107    36-2145    36-2147    40-2315    45-2492   
P.CBTN	  000004  G	#4-52      
P.LLA 	  000016  G	#4-52       13-742    *13-742     17-970     35-2086    35-2109    36-2135    36-2149    40-2295   
                         40-2317    44-2455    45-2490    48-2628   
P.NUM 	  000020  G	#4-52       13-744     15-829     15-862     16-936     16-942     17-967     17-973     26-1535   
                         27-1584    27-1597    29-1694   
P.OPN 	  000002  G	#4-52       16-926     50-2774   *50-2775    50-2826   
P.REF 	  000004  G	#4-52      *15-883     15-885     50-2766   *50-2767    50-2778    50-2797   
P.RES 	  000002  G	#4-52       15-816     15-875    *15-877     50-2770   *50-2771    50-2787    50-2813   
P.RSV 	  000000  G	#4-52      
P.SEG 	  000022  G	#4-52      *13-740    
P.SPI 	  000021  G	#4-52      *13-741     17-973     18-1021   
P.STS 	  000010  G	#4-52       13-726    *13-743    *14-788    *14-791     14-799    *15-811    *15-822     15-833    
                         15-846     15-848     15-852    *15-860    *15-889    *16-900     16-909     16-911     16-916    
                        *16-919    *16-925    *16-930     16-940     17-954     17-964    *17-966     18-1019    25-1498   
                         25-1502    29-1697    29-1703    29-1705    29-1729    35-2105    36-2143    40-2313   *44-2456   
                        *45-2476   *45-2491    47-2586    47-2589   
P.USER	  000006  G	#4-52       13-728    *13-739     15-850     15-850     16-914     16-914     25-1500    25-1500   
QRYATS	  005574 R	 8-384     #35-2081   
QUERY 	  005544 R	 8-369     #34-2052   
RCVTHR	  007610 R	 8-404     #47-2606   
RC.ACA	= 000052  G	#6-194     
RC.ACC	= 000002  G	#6-194     
RC.ANP	= 000024  G	#6-194     
RC.CNO	= 000043  G	#6-194     
RC.FIN	= 000000  G	#6-194      30-1821    30-1821   
RC.GND	= 000034  G	#6-194     
RC.HNE	= 000050  G	#6-194     
RC.IAC	= 000025  G	#6-194     
RC.ICT	= 000027  G	#6-194     
RC.INT	= 000001  G	#6-194      19-1128    19-1128    22-1330    22-1330    23-1378    23-1378    27-1599    27-1599   
                         29-1749    29-1749   
RC.IRC	= 000026  G	#6-194      18-1052    18-1052    19-1101    19-1101    19-1109    19-1128    20-1192    21-1238   
                         21-1238    21-1244    21-1252    21-1265    21-1267    22-1321    22-1330    22-1336    23-1378   
                         24-1417    24-1417    24-1425    24-1435    25-1468    25-1476    25-1496    25-1504    26-1557   
                         27-1591    27-1599    28-1631    29-1749    30-1787    30-1800    30-1821    31-1856    31-1856   
                         33-1993    33-1993    33-2011    34-2058    34-2058    37-2169   
RC.IRD	= 000033  G	#6-194      21-1267    21-1267   
RC.ISO	= 000041  G	#6-194      25-1496    25-1496   
RC.MLN	= 000037  G	#6-194     
RC.REJ	= 000051  G	#6-194     
RC.RJS	= 000045  G	#6-194      25-1504    25-1504    27-1591    27-1591    41-2347   
RC.RNA	= 000032  G	#6-194      22-1321    22-1321   
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 5

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RC.RNE	= 000031  G	#6-194      21-1265    21-1265   
RC.RNS	= 000044  G	#6-194      26-1557    26-1557   
RC.RQO	= 000030  G	#6-194      19-1109    19-1109    21-1244    21-1244   
RC.RSE	= 000047  G	#6-194      20-1192    20-1192    21-1252    21-1252    24-1425    24-1425    30-1787    30-1787   
                         33-2011    33-2011   
RC.RSI	= 000046  G	#6-194      25-1468    25-1468    28-1631    28-1631    30-1800    30-1800   
RC.RSO	= 000036  G	#6-194     
RC.SHN	= 000035  G	#6-194      22-1336    22-1336   
RC.SLN	= 000040  G	#6-194      24-1435    24-1435   
RC.SNE	= 000042  G	#6-194      25-1476    25-1476   
RD.NDI	= 000001  G	#6-194     
RD.PNC	= 000001  G	#6-194      25-1504   
RD.STR	= 000002  G	#6-194      27-1591   
REFER 	  003540 R	 8-354     #23-1356   
RELEAS	  005234 R	 8-363     #30-1782   
RELES1	  005336 R	 29-1747   #30-1813   
REMOPN	  010302 R	 29-1688   #50-2825   
REMREF	  010206 R	 30-1791    30-1820    33-2029    39-2263   #50-2796   
REMRES	  010250 R	 30-1816    39-2267   #50-2812   
REPTHR	  007610 R	 8-405     #47-2607   
REQEST	  003064 R	 8-326     #19-1098   
RESERV	  003444 R	 8-352     #22-1316   
RESPON	  003176 R	 8-332     #20-1162   
RF.CCB	= 000400  G	#4-50       9-434      9-457      9-459      9-469      10-502     10-513    
RF.CVR	= 100000  G	#4-50       9-417      9-460      9-471      10-501     10-520    
RF.LIN	= 001000  G	#4-50       9-456      9-472      9-474      9-485      11-591    
RM$RWT	= 000022	#7-262      9-431     
RP.DSC	= 000007  G	#6-194      29-1708   
RP.IRQ	= 000005  G	#6-194     
RP.NAK	= 000003  G	#6-194     
RP.PWF	= 000006  G	#6-194     
RP.RCV	= 000001  G	#6-194     
RP.REP	= 000002  G	#6-194     
RP.TRM	= 000004  G	#6-194     
RQ.ACC	= 000051	#6-135      41-2357   
RQ.ASS	= 000052	#6-136     
RQ.CAP	= 000042	#6-132     
RQ.CTL	= 000054	#6-138     
RQ.MAX	= 000013	#8-338      18-1049   
RQ.MIN	= 000041	#8-325      18-1047    39-2248   
RQ.RES	= 000047	#6-133      41-2339   
RQ.RID	= 000041	#6-131     
RQ.SPC	= 000050	#6-134      39-2232    42-2387   
RQ.STS	= 000053	#6-137      43-2421   
RSPNS 	  006200 R	 19-1109    19-1128    20-1192    21-1244    21-1252    21-1265    21-1267    22-1321    22-1330   
                         22-1336    23-1378    24-1425    24-1435    25-1468    25-1476    25-1496    25-1504    26-1557   
                         27-1591    27-1599    28-1631    29-1749    30-1787    30-1800    30-1821    33-2011    37-2170   
                        #38-2191   
RSPNSM	  006670 R	 40-2308   #41-2339   
RSPNS1	  006246 R	 38-2199   #39-2230   
RSPNS2	  006454 R	 39-2233    39-2235    39-2257    39-2270   #40-2293   
RS.HIH	= 000053	#6-157     
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 6

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

RS.LOW	= 000051	#6-156      39-2242    39-2244   
RS.RQ 	= 100000  G	#6-204      19-1124    39-2261   
R$FLG 	  000000  G	#4-50       9-415     
R$PCB 	  000010  G	#4-50      
R$RWT 	  000002  G	#4-50       9-416      18-1026   
R$TCB 	  000014  G	#4-50      
R$TCQ 	  000006  G	#4-50       9-476     *9-478      9-483     *9-484      11-589    *11-590    
R$$11D	= ******	 3-44      
R$$11M	= 000000	 3-44      
R$$11S	= ******	 3-44      
R.CID 	= 000004  G	#6-202     *19-1123   *23-1371    50-2780   
R.NSP 	= 000032  G	#6-207     
R.STS 	= 000012  G	#6-203     *19-1124   *23-1372    39-2261   
R.TCB 	= 000016  G	#6-206     *19-1125    21-1250   *23-1377    33-2004   
SDBGT 	  007404 R	 35-2088    40-2297   #46-2536   
SETOPN	  010116 R	 27-1594   #50-2774   
SETREF	  010072 R	 19-1126    23-1373   #50-2766   
SETRES	  010104 R	 22-1328   #50-2770   
SHARE 	  003530 R	 8-353     #22-1336   
SPCDSP	  000200 R	#8-351      8-355      21-1294   
SPCFYM	  006774 R	#42-2387   
SPECIF	  003206 R	 8-333     #21-1230   
SRVDIS	  001670 R	 7-295     #14-796     44-2460   
SRVERR	  007466 R	 7-300     #47-2582   
SRVGOT	  004202 R	 7-306     #26-1532   
SRVSTP	  004650 R	 7-302     #29-1684   
SRVSTR	  004400 R	 7-301     #27-1581   
SS.ATS	= 000010	#6-187      35-2097    36-2136   
SS.ERR	= 000003	#6-185     
SS.MAX	= 000010	#8-385      34-2056   
SS.OPR	= 000001	#6-183     
SS.RES	= 000002	#6-184     
SS.USA	= 000004	#6-186     
STADSP	  000232 R	#8-376      8-385      34-2061   
STATSM	  007054 R	 35-2100    36-2138   #43-2421   
STATUS	  005424 R	 8-336     #33-1988   
STSDSP	  000222 R	#8-368      8-372      33-2014   
STSREL	  005524 R	#33-2026    35-2096   
ST.ALT	= 000003	#6-178     
ST.MAX	= 000003	#8-372      33-1991   
ST.QRY	= 000001	#6-176     
ST.REL	= 000020	#6-191      33-2009    35-2094   
ST.REP	= 000002	#6-177      43-2422   
SY.DBL	= 000020	#6-152      39-2234   
SY.MAX	= 000003	#8-355      21-1236   
SY.REF	= 000003	#6-148     
SY.RES	= 000001	#6-146     
SY.SHR	= 000002	#6-147     
TCBLEN	= 000040  G	#4-52      
TF.DEA	= 040000  G	#4-52       6-236      11-537     11-539     11-553     11-558     12-609    
TF.DIS	= 020000  G	#4-52       6-236      12-612     12-617     12-629     12-635    
TF.RAL	= 060000	#6-236      22-1317   
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 7

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

TRMERR	  007610 R	 8-407     #47-2609   
TS.CLP	= 000001  G	#4-52       6-232      6-235      15-825     16-933     28-1654    29-1686    47-2591   
TS.EXE	= ******  GX	 9-453     
TS.HP 	= 000040  G	#4-52       6-233      6-235      15-878    
TS.OCP	= 000007	#6-232      6-233      15-820    
TS.OP 	= 000004  G	#4-52       6-232      27-1595    28-1629    28-1653    30-1802   
TS.OPP	= 000002  G	#4-52       6-232      6-235      15-823     16-931     25-1507    26-1556    27-1585    47-2595   
TS.OSP	= 000400  G	#4-52       29-1699    29-1717    29-1727    29-1731    29-1736    29-1746    47-2600   
TS.PWF	= 002000  G	#4-52      
TS.RHF	= 000257	#6-234     
TS.RLP	= 000010  G	#4-52       6-233      6-235      15-878     29-1699    29-1717    29-1725    29-1744    30-1808   
                         30-1814   
TS.ROP	= 000057	#6-233      6-234      25-1466   
TS.RRL	= 000053	#6-235      30-1796   
TS.RS 	= 000020  G	#4-52       15-878     22-1319    22-1327    30-1798    30-1817    39-2268   
TS.SRP	= 000200  G	#4-52       6-234      15-878    
TS.STE	= 001000  G	#4-52       29-1699    29-1717    29-1720    29-1722    47-2597   
TT.CD 	= 000011  G	#4-52      
TT.CR 	= 000010  G	#4-52      
TT.DDC	= 000005  G	#4-52      
TT.LE 	= 000006  G	#4-52      
TT.LP 	= 000007  G	#4-52      
TT.L18	= 000004  G	#4-52      
TT.L36	= 000003  G	#4-52      
TT.V52	= 000002  G	#4-52      
TT.V62	= 000001  G	#4-52      
T.DMRB	  000034  G	#4-52      
T.DMVA	  000036  G	#4-52      
T.FLG 	  000014  G	#4-52       11-537    *11-539     11-553    *11-558     12-609     12-612     12-617    *12-629    
                        *12-635     22-1317   
T.LNK 	  000000  G	#4-52      
T.NAM 	  000022  G	#4-52       21-1270    21-1284    42-2395   
T.NAML	  000021  G	#4-52       21-1269    21-1270   
T.NUM 	  000016  G	#4-52       12-623     25-1516    26-1553    27-1596    28-1655   
T.OBJ 	  000020  G	#4-52       21-1269    21-1272   
T.OLNK	  000002  G	#4-52      *11-588     12-645     16-926     16-928    *50-2774    50-2826    50-2828    50-2830   
                         50-2834   *50-2834   
T.PCBD	  000006  G	#4-52      *25-1506    27-1593    29-1687    29-1702    29-1716    47-2588   
T.PCBR	  000004  G	#4-52      *22-1326    26-1534    27-1583    29-1693    47-2585   
T.RCNT	  000032  G	#4-52      
T.RID 	  000010  G	#4-52      *22-1325    29-1707    29-1732    50-2789   
T.SPI 	  000017  G	#4-52      *25-1478    25-1510    25-1516    26-1539    26-1553    28-1655    29-1690   
T.STAT	= ******  GX	 9-453     
T.STS 	  000012  G	#4-52       11-556     15-820     15-823     15-825    *15-878     16-931     16-933     22-1319   
                        *22-1327    25-1466   *25-1507   *26-1556   *27-1585   *27-1595    28-1629   *28-1653   *28-1654   
                        *29-1686   *29-1699   *29-1717    29-1720   *29-1722    29-1725    29-1727   *29-1731   *29-1736   
                         29-1744   *29-1746    30-1796    30-1798    30-1802   *30-1808   *30-1814   *30-1817   *39-2268   
                         43-2427    43-2428    47-2591    47-2595   *47-2597   *47-2600   
T.TT  	  000014  G	#4-52      
T.WCNT	  000030  G	#4-52      
UNSUPP	  006174 R	 8-327      8-337      8-345      8-346      8-370      8-371      8-377      8-378      8-379     
                         8-380      8-390      8-391      8-392      8-398     #37-2167   
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 8

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

W.ADR 	= 000030  G	#6-222     *9-430      9-493     
W.CID 	= 000004  G	#6-213     *18-1061    19-1123    22-1325    23-1371    50-2780    50-2789   
W.FNC 	= 000010  G	#6-221     *9-431     
W.LIN 	= 000006  G	#6-219      9-418     *18-1034   
W.NSP 	= 000032  G	#6-214     *14-798    *18-1035    18-1040    21-1289    26-1542    29-1695    29-1742    33-2007   
                         35-2083    38-2192    39-2236    39-2255    40-2294   *47-2583    48-2624   
W.TMP 	= 000014  G	#6-223     *21-1257   *21-1259   *21-1260    21-1273    21-1275    21-1278    21-1282   *23-1357   
                         23-1377   *29-1711    29-1713   *29-1737    29-1739   *35-2090    35-2092   *40-2299   *40-2300   
                        *40-2301    40-2303    40-2304    40-2305   
X$$MCB	= ******	 3-44       3-44      
ZF.DDM	= 000001	#3-44      
ZF.DLC	= 000002	#3-44      
ZF.KMX	= 000020	#3-44      
ZF.LLC	= 000004	#3-44      
ZF.LMC	= 000100	#3-44      
ZF.MFL	= 000010	#3-44      
ZF.MUX	= 000040	#3-44      
ZF.TIM	= 000200	#3-44      
Z.DAT 	  000014	#3-44      
Z.DSP 	  000000	#3-44       3-44      
Z.FLG 	  000011	#3-44      
Z.LEN 	= 000014	#3-44      
Z.LLN 	  000010	#3-44      
Z.MAP 	  000016	#3-44       49-2687   *49-2687   *49-2707    49-2737    49-2746   
Z.NAM 	  000006	#3-44      
Z.PCB 	  000012	#3-44      
Z.SCH 	  000004	#3-44      
$CCBGT	= ******  GX	 12-621     15-855     18-1029    19-1114    23-1364    44-2447   
$CCBRT	= ******  GX	 7-276      12-643     14-784     15-884     17-986     29-1723    45-2477    45-2489    48-2625   
                         50-2807   
$CMPDV	= ******  GX	 17-967     49-2683    49-2703   
$CMQIF	= ******  GX	 9-437     
$CMQIN	= ******  GX	 9-436      10-514     35-2108    36-2146    40-2316   
$CMQRM	= ******  GX	 9-463      10-508     17-958     45-2493   
$CSBGT	= ******  GX	 46-2515   
$CSBRT	= ******  GX	 46-2561   
$LDBRT	= ******  GX	 46-2559   
$LLCRQ	= ******  GX	 12-623    
$LLCRS	= ******  GX	 11-594     12-650     13-730     13-744     17-967     17-970     17-973     18-1021    25-1516   
                         26-1553    28-1655    35-2086    35-2109    36-2149    40-2295    40-2317    44-2455    45-2495   
                         48-2628   
$LLCTA	= ******  GX	 49-2741   
$MPOBJ	= ******  GX	 25-1472   
$NRMTB	  000002 RG	#7-252      7-262      9-467      10-518    
$PCBGT	= ******  GX	 13-737    
$PCBPT	= ******  GX	 9-492      13-724     14-786     14-797     15-844     16-907     17-984     18-1018    25-1492   
                         38-2193    44-2454    45-2475    45-2488   
$PCBRT	= ******  GX	 17-985    
$PDVTA	= ******  GX	 49-2729    49-2734   
$SAVAL	= ******  GX	 49-2681    49-2702   
$SDBGT	= ******  GX	 46-2537   
$SRSTD	= ******  GX	 9-451     
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 9

SYMBOL CROSS REFERENCE                                  CREF         

SYMBOL	VALUE		REFERENCES

$TCBPT	= ******  GX	 11-584     12-639     21-1263    26-1533    27-1582    29-1685    47-2584   
$$NARG	= 000002	#17-970     17-970     17-970    #35-2109    35-2109   #36-2149    36-2149   #40-2317    40-2317   
                        #45-2495    45-2495   
$$TYPE	= 000000	#9-492      9-492     #13-742     13-742     13-742    #14-786     14-786    #14-797     14-797    
                        #17-984     17-984    #18-1018    18-1018   #38-2193    38-2193   #44-2454    44-2454   #45-2475   
                         45-2475   #45-2488    45-2488   
.NRMDB	  000000 RG	#7-242      9-433      9-448     *9-455      9-468      9-475      9-482      10-500     10-510    
                         10-520     14-787    
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 10

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

CALL  		 9-451      9-463      9-467      9-480      9-492      10-508     10-514     10-518     11-534     11-550    
                 11-584     11-585     12-621     12-627     12-633     12-639     12-642     12-643     13-724     13-730    
                 13-737     13-744     14-784     14-786     14-793     14-797     15-830     15-844     15-855     15-863    
                 15-869     15-884     16-907     16-937     16-943     17-958     17-960     17-967     17-970     17-984    
                 17-985     18-1018    18-1029    18-1046    18-1058    18-1060    19-1105    19-1107    19-1114    19-1118   
                 19-1126    21-1242    21-1248    21-1256    21-1258    21-1263    22-1328    23-1358    23-1364    23-1368   
                 23-1373    24-1421    25-1470    25-1472    25-1479    25-1484    25-1487    25-1492    26-1533    26-1541   
                 26-1546    26-1548    27-1582    27-1594    28-1637    28-1639    29-1685    29-1688    29-1691    29-1709   
                 29-1712    29-1734    29-1738    30-1785    30-1791    30-1816    30-1818    30-1820    33-1997    33-2002   
                 33-2027    33-2029    34-2053    35-2086    35-2088    35-2091    35-2096    35-2100    35-2109    36-2132   
                 36-2138    36-2146    36-2149    38-2193    38-2196    39-2240    39-2247    39-2251    39-2259    39-2263   
                 39-2265    39-2267    40-2295    40-2297    40-2302    40-2308    40-2317    44-2447    44-2454    44-2455   
                 45-2475    45-2488    45-2489    45-2493    45-2495    46-2515    46-2537    47-2584    48-2625    48-2628   
                 49-2681    49-2684    49-2702    49-2704    50-2807   
CALLR 		#9-436     #9-437     #15-827    #15-835    #16-920    #16-935    #17-986    #18-1032   #21-1294   #24-1429   
                #29-1700   #29-1718   #29-1723   #29-1747   #30-1809   #31-1859   #33-2014   #34-2061   #35-2108   #40-2316   
                #44-2450   #45-2477   #46-2559   #46-2561   #47-2593   #47-2610   
CCBDF$		#3-40      #3-43      
FALLR 		#5-62      #37-2170   #38-2199   #39-2270   
GTLLA$		#13-742    
GTPCB$		#5-88       9-492      14-786     14-797     17-984     18-1018    38-2193    44-2454    45-2475    45-2488   
GTTCB$		#5-97       11-584     12-639     26-1533    27-1582    29-1685    47-2584   
GTULA$		 9-492      14-786     14-797     17-984     18-1018    38-2193    44-2454    45-2475    45-2488   
HWDDF$		#3-40      #3-42      #13-716    #13-716    #18-1041   #18-1041   #26-1543   #26-1543   #38-2194   #38-2194   
                #39-2237   #39-2237   
MAP   		#3-41       13-716     18-1041    26-1543    38-2194    39-2237   
NABO$ 		#17-967    
NACC$ 		#13-744    
NDAT$ 		 35-2109    36-2149    40-2317    45-2495   
NDIS$ 		 17-970    
NREJ$ 		 13-730    
NRTI$ 		 44-2455   
NRTN$ 		#35-2086   #40-2295   #48-2628   
NSPDF$		#3-40       3-46      
PDVDF$		#3-40      #3-44      
POP   		#5-78       15-861     15-888     17-963     18-1062    19-1116    23-1366    25-1494    33-2030    36-2151   
                 38-2198    39-2269    42-2399    46-2542    50-2809    50-2822    50-2835   
PUSH  		#5-72       15-840     17-956     18-1059    19-1113    23-1363    25-1491    33-2026    36-2131    38-2191   
                 39-2258    42-2392    46-2536    50-2796    50-2812    50-2825   
RESMAP		#3-41      
RESPON		#5-107     #18-1052   #19-1101   #19-1109   #19-1128   #20-1192   #21-1238   #21-1244   #21-1252   #21-1265   
                #21-1267   #22-1321   #22-1330   #22-1336   #23-1378   #24-1417   #24-1425   #24-1435   #25-1468   #25-1476   
                #25-1496   #25-1504   #26-1557   #27-1591   #27-1599   #28-1631   #29-1749   #30-1787   #30-1800   #30-1821   
                #31-1856   #33-1993   #33-2011   #34-2058   
RETURN		 9-486      10-522     11-541     11-560     11-592     11-595     12-625     12-631     12-637     12-652    
                 13-731     13-745     17-968     17-971     17-974     18-1022    25-1517    26-1554    28-1657    33-2031   
                 35-2110    36-2152    39-2253    40-2318    41-2355    41-2364    41-2367    42-2400    43-2436    45-2497   
                 46-2518    46-2543    48-2629    49-2661    49-2668    49-2688    49-2708    49-2751    50-2768    50-2772   
                 50-2776    50-2785    50-2794    50-2810    50-2823    50-2836   
RMDDB$		#3-40      #4-50      
RMDF$ 		#3-40      #6-194     
SAVMAP		#3-41      
NRM        CREATED BY  MACRO  ON 13-OCT-79 AT 09:49	PAGE 11

MACRO CROSS REFERENCE                                   CREF         

MACRO NAME	REFERENCES

SLTDF$		#3-40       3-45      
SOB   		#21-1281   #42-2398   
TMPDF$		#4-50       4-50      
TTDF$ 		#3-40      #4-52      
$QDLC 		#3-41       12-623    
$QLLC 		#3-41       11-594     12-650     17-973     18-1021    25-1516    26-1553    28-1655   
$$BUFD		#13-730    #17-970    #17-970    #35-2109   #35-2109   #36-2149   #36-2149   #40-2317   #40-2317   #45-2495   
                #45-2495   
$$GETB		#9-492     #9-492     #13-742    #13-742    #14-786    #14-786    #14-797    #14-797    #17-984    #17-984    
                #18-1018   #18-1018   #38-2193   #38-2193   #44-2454   #44-2454   #45-2475   #45-2475   #45-2488   #45-2488   
$$MOV 		#13-730    #13-730    #13-744    #13-744    #13-744    #13-744    #17-970    #17-970    #17-970    #17-970    
                #35-2086   #35-2086   #35-2109   #35-2109   #36-2149   #36-2149   #40-2295   #40-2295   #40-2317   #40-2317   
                #45-2495   #45-2495   #48-2628   #48-2628   
$$MOVB		#13-744    #13-744    #17-967    #17-967    #17-967    #17-970    #17-970    #35-2086   #35-2086   #35-2109   
                #35-2109   #36-2149   #36-2149   #40-2295   #40-2295   #40-2317   #40-2317   #44-2455   #44-2455   #45-2495   
                #45-2495   #48-2628   #48-2628   
$$QUE 		#13-730     13-730    #13-744     13-744    #17-967     17-967    #17-970     17-970    #35-2086    35-2086   
                #35-2109    35-2109   #36-2149    36-2149   #40-2295    40-2295   #40-2317    40-2317   #44-2455    44-2455   
                #45-2495    45-2495   #48-2628    48-2628   
.BIN  		#4-50      
.CNB  		#4-50      
.CNW  		#4-50      
.CORE 		#4-50      
.CSR  		#4-50      
.DVCHA		#4-50      
.INT  		#4-50      
.INT1 		#4-50      
.INT2 		#4-50      
.INT3 		#4-50      
.LFLHD		#4-50      
.LIBR 		#4-50      
.LINKS		#4-50      
.LSTHD		#4-50      #4-50      
.LTAB 		#4-50      
.MPLHD		#4-50      
.POOL 		#4-50      #4-50      
.PRI  		#4-50      
.SCOM 		#4-50      
.SECSR		#4-50      
.SLNB 		#4-50      
.SLNW 		#4-50      
.STNB 		#4-50      
.STNW 		#4-50      
.UNB  		#4-50      
.UNW  		#4-50      
.VFY  		#4-50