Google
 

Trailing-Edge - PDP-10 Archives - BB-P363B-SM_1985 - mcb/nml/nmlevx.lst
There are no other files named nmlevx.lst in the archive.
								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   1
								 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (1)

;	  0001	!NET:<PECKHAM.DEVELOPMENT>NMLEVX.BLI.4 26-May-82 13:03:44, Edit by PECKHAM
;	  0002	!
;	  0003	! Ident 06.
;	  0004	! Update TQ [EQ_COUNT] when an event is extracted from TQ
;	  0005	! in NML$EVENT_TRANSMITTER.
;	  0006	!
;	  0007	!NET:<PECKHAM.DEVELOPMENT>NMLEVX.BLI.2 22-Apr-82 08:26:14, Edit by PECKHAM
;	  0008	!
;	  0009	! Ident 05.
;	  0010	! Change configuration switch naming.
;	  0011	!
;	  0012	!NET:<PECKHAM.DEVELOPMENT>NMLEVX.BLI.17 24-Mar-82 12:27:57, Edit by PECKHAM
;	  0013	!
;	  0014	! Ident 04.
;	  0015	! Rename NML$EVENT_XMIT to NML$EVENT_TRANSMITTER.
;	  0016	! Use new event queing routines.
;	  0017	! Use configuration switches from NMLCOM.
;	  0018	! Take advantage of fix in NMU$NETWORK_OPEN
;	  0019	! to make response buffer optional.
;	  0020	!
;	  0021	module NMLEVX (					! Event Transmitter
;	  0022			ident = 'X00.06',
;	  0023			language (common)
;	  0024			) =
;	  0025	begin
;	  0026	!
;	  0027	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0028	!                    DIGITAL EQUIPMENT CORPORATION
;	  0029	!                        Maynard, Massachusetts
;	  0030	!
;	  0031	!     This software is furnished under a license and may  be  used
;	  0032	!     and copied only in accordance with the terms of such license
;	  0033	!     and with the inclusion of the above copyright notice.   This
;	  0034	!     software  or any other copies thereof may not be provided or
;	  0035	!     otherwise made available to any other person.  No  title  to
;	  0036	!     and ownership of the software is hereby transferred.
;	  0037	!
;	  0038	!     The information  in  this  software  is  subject  to  change
;	  0039	!     without  notice  and should not be construed as a commitment
;	  0040	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0041	!
;	  0042	!     DIGITAL assumes no responsibility for the use or reliability
;	  0043	!     of  its  software  on  equipment  which  is  not supplied by
;	  0044	!     DIGITAL.
;	  0045	!
;	  0046	
;	  0047	!++
;	  0048	! Facility: LSG DECnet Network Management
;	  0049	!
;	  0050	! Abstract: This task takes the next request from the recorder
;	  0051	!	    queue destined for a remote node and transmits it.
;	  0052	!
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   2
X00.06								 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (1)

;	  0053	! Environment: TOPS10/TOPS20 user mode, MCB RSX task level
;	  0054	!
;	  0055	! Author: Scott G. Robinson, Creation date: 20-Mar-81
;	  0056	!	  from NMLXMT by Steven M. Jenness
;	  0057	!
;	  0058	! 1.02	L. Webber, 20-Oct-81
;	  0059	!	Add error pointer and length to NETWORK_OPEN parameters.
;	  0060	!
;	  0061	! 1.03  L. Webber, 10-Feb-82
;	  0062	!	Fix 1.02 bug in returning error buffer.
;	  0063	!
;	  0064	!--
;	  0065	
;	  0066	!<BLF/SYNONYM %unquote=>
;	  0067	!<BLF/SYNONYM $FIELD=FIELD>
;	  0068	!<BLF/PAGE>
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   3
X00.06								 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (2)

;	  0069	!
;	  0070	! Include files
;	  0071	!
;	  0072	
;	  0073	library 'NMLLIB';				! All needed definitions
;	  0074	
;	  0075	!
;	  0076	! Global routines
;	  0077	!
;	  0078	
;	  0079	forward routine
;	  0080	    NML$EVENT_TRANSMITTER : novalue;	! Main routine for transmitter task
;	  0081	
;	  0082	!
;	  0083	! Local routines
;	  0084	!
;	  0085	
;	  0086	forward routine
;	  0087	    CONNECT_TO_REMOTE;				! Make connection to remote Event Receiver
;	  0088	
;	  0089	!
;	  0090	! External references
;	  0091	!
;	  0092	
;	  0093	external routine
;	  0094	    NML$EVENT_MANAGER,                  ! Central EVENT request handler
;	  0095	    NMU$MEMORY_MANAGER,                 ! Memory management routines
;	  0096	    NMU$NETWORK_UTILITIES,              ! DECnet logical link interface
;	  0097	    NMU$QUEUE_MANAGER,                  ! Queue handling routines
;	  0098	    NMU$SCHED_MANAGER;                  ! Scheduler interface
;	  0099	
;	  0100	!
;	  0101	! Equated symbols
;	  0102	!
;	  0103	
;	  0104	literal
;	  0105	    TWO_SECONDS = 2,
;	  0106	    FIVE_SECONDS = 5,
;	  0107	    TEN_SECONDS = 10;
;	  0108	
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   4
X00.06		NML$EVENT_TRANSMITTER as EV_XMT			 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (3)

;	  0109	%global_routine ('NML$EVENT_TRANSMITTER', TB, TR) : novalue =
;	  0110	
;	  0111	!++
;	  0112	! Functional description:
;	  0113	!
;	  0114	!	This task runs forever (almost) removing remote requests
;	  0115	!	from the request queue and sending them to the appropriate
;	  0116	!	remote node for processing.
;	  0117	!
;	  0118	! Formal parameters:
;	  0119	!
;	  0120	!	.TB	Task block address
;	  0121	!	.TR	Task resource address
;	  0122	!
;	  0123	! Routine value: none
;	  0124	! Side effects: none
;	  0125	!
;	  0126	!--
;	  0127	
;	  0128	    begin
;	L 0129	%if NML$CFG_LOGGING_TRANSMITTER
;	  0130	%then
;	  0131	
;	  0132	    while $true do
;	  0133		begin
;	  0134	
;	  0135	        local
;	  0136	            TQ : ref TRANSMITTER_QUEUE,
;	  0137	            LINK_ID;
;	  0138	        !
;	  0139	        ! Get a transmitter queue to service
;	  0140	        !
;	  0141	
;	  0142		if (TQ = NML$TRANSMITTER_QUEUE_GET ()) eqla 0 then exitloop;
;	  0143	
;	  0144	        !
;	  0145	        ! Stick a null at the end of the node-id for safety.
;	  0146	        !
;	  0147	        ch$wchar (0, ch$ptr (TQ [TQ_SINK_NODE],
;	  0148	                             ch$rchar (ch$ptr (TQ [TQ_SINK_NODE], 2, 8)) + 3,
;	  0149	                             8));
;	  0150	        !
;	  0151	        ! Connect to remote EVENT processor.
;	  0152	        !
;	  0153	        LINK_ID = CONNECT_TO_REMOTE (ch$ptr (TQ [TQ_SINK_NODE],, 8));
;	  0154	
;	  0155	        if .LINK_ID gtr 0
;	  0156	        then
;	  0157	            begin
;	  0158	            !
;	  0159	            ! Send as many events as possible
;	  0160	            !
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   5
X00.06		NML$EVENT_TRANSMITTER as EV_XMT			 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (3)

;	  0161	            while $true do
;	  0162	                begin
;	  0163	
;	  0164	                map
;	  0165	                    TQ : ref EVENT_QUEUE;
;	  0166	
;	  0167	                local
;	  0168	                    EB : ref EVENT_BUFFER;
;	  0169	
;	  0170	                if (EB = NMU$QUEUE_REMOVE (.TQ)) eqla 0 then exitloop;
;	  0171	
;	  0172	                TQ [EQ_COUNT] = .TQ [EQ_COUNT] - 1;
;	  0173	                NMU$NETWORK_WRITE (.LINK_ID, $true, .EB [EB_LENGTH], ch$ptr (EB [EB_BUFFER],, 8));
;	  0174	                NMU$MEMORY_RELEASE (.EB, .EB [EB_ALLOCATION]);
;	  0175	                end;
;	  0176	            !
;	  0177	            ! Discard the link (done with the request)
;	  0178	            !
;	  0179	            NMU$NETWORK_CLOSE (.LINK_ID, 0, 0);
;	  0180	            end;
;	  0181		end;
;	  0182	
;	U 0183	%else
;	U 0184	    0                                   ! To avoid empty compound expression
;	  0185	%fi
;	  0186	    end;                                ! End of NML$EVENT_TRANSMITTER


						.TITLE	NMLEVX
						.IDENT	/X00.06/

						.GLOBL	EV.DEC, EQ.RES, EQ.INS, EQ.REM
						.GLOBL	EV.INI, EV.PRO, EV.REC, EV.GET
						.GLOBL	UM.RESET, UM.INITIALIZE, UM.GET
						.GLOBL	UM.RELEASE, UN.INIT, UN.LOCAL
						.GLOBL	UN.OPEN, UN.ACCEPT, UN.REJECT
						.GLOBL	UN.READ, UN.WRITE, UN.ABORT, UN.CLOSE
						.GLOBL	UN.STATUS, UN.VALIDATE, UQ.RESET
						.GLOBL	UQ.INSERT, UQ.REMOVE, UQ.EXTRACT
						.GLOBL	UQ.LENGTH, UQ.SCAN, UQ.SEXTRACT
						.GLOBL	US.CREATE, US.ABORT, US.FINI, US.COMPLETE
						.GLOBL	US.ERROR, US.INSERT, US.REMOVE
						.GLOBL	US.QRESET, US.QQINS, US.QQREM
						.GLOBL	US.QQSET, US.QQEXT, US.EVENT, US.WAIT
						.GLOBL	US.FLAG, US.SLEEP, US.CURRENT
						.GLOBL	US.DESCHEDULE


						.SBTTL	EV.XMT NML$EVENT_TRANSMITTER as EV_XMT
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			EV.XMT::JSR	R1,$SAVE3			;					0109
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   6
X00.06		NML$EVENT_TRANSMITTER as EV_XMT			 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (3)

000004	004767  000000G			1$:	JSR	PC,EV.GET			;					0142
000010	010001 					MOV	R0,R1				; *,TQ
000012	001456 					BEQ	5$
000014	005000 					CLR	R0				;					0149
000016	156100  000024 				BISB	24(R1),R0			; *(TQ),*
000022	060100 					ADD	R1,R0				; TQ,*
000024	105060  000025 				CLRB	25(R0)
000030	010146 					MOV	R1,-(SP)			; TQ,*					0153
000032	062716  000022 				ADD	#22,(SP)
000036	004767  000000V				JSR	PC,CONNECT.TO.REMOTE
000042	010003 					MOV	R0,R3				; *,LINK.ID
000044	003437 					BLE	4$				;					0155
000046	010116 				2$:	MOV	R1,(SP)				; TQ,*					0170
000050	004767  000000G				JSR	PC,UQ.REMOVE
000054	010002 					MOV	R0,R2				; *,EB
000056	001424 					BEQ	3$
000060	005361  000014 				DEC	14(R1)				; *(TQ)					0172
000064	010316 					MOV	R3,(SP)				; LINK.ID,*				0173
000066	012746  000001 				MOV	#1,-(SP)
000072	016246  000010 				MOV	10(R2),-(SP)			; *(EB),*
000076	010246 					MOV	R2,-(SP)			; EB,*
000100	062716  000012 				ADD	#12,(SP)
000104	004767  000000G				JSR	PC,UN.WRITE
000110	010216 					MOV	R2,(SP)				; EB,*					0174
000112	016246  000006 				MOV	6(R2),-(SP)			; *(EB),*
000116	004767  000000G				JSR	PC,UM.RELEASE
000122	062706  000010 				ADD	#10,SP				;					0162
000126	000747 					BR	2$				;					0161
000130	010316 				3$:	MOV	R3,(SP)				; LINK.ID,*				0179
000132	005046 					CLR	-(SP)
000134	005046 					CLR	-(SP)
000136	004767  000000G				JSR	PC,UN.CLOSE
000142	022626 					CMP	(SP)+,(SP)+			;					0157
000144	005726 				4$:	TST	(SP)+				;					0133
000146	000716 					BR	1$				;					0132
000150	000207 				5$:	RTS	PC				;					0109
; Routine Size:  53 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  10 words


;	  0187	
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   7
X00.06		CONNECT_TO_REMOTE				 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (4)

;	  0188	%routine ('CONNECT_TO_REMOTE', NODE_ID_PTR) =
;	  0189	
;	  0190	!++
;	  0191	! Functional description:
;	  0192	!
;	  0193	!	This routine connects to the EVENT listener on the
;	  0194	!	host specified in the request.  It does not return
;	  0195	!	until the connection is made (or determined to be
;	  0196	!	next to impossible).
;	  0197	!
;	  0198	! Formal parameters:
;	  0199	!
;	  0200	!	.NODE_ID_PTR    Pointer to target node-id
;	  0201	!
;	  0202	! Routine value:
;	  0203	!
;	  0204	!	Link id of DECnet link to remote EVENT listener
;	  0205	!
;	  0206	! Side effects: none
;	  0207	!
;	  0208	!--
;	  0209	
;	  0210	    begin
;	L 0211	%if NML$CFG_LOGGING_TRANSMITTER
;	  0212	%then
;	  0213	
;	  0214	    local
;	  0215		CONN_BLK : CONNECT_BLOCK,
;	  0216		LINK_ID;
;	  0217	
;	  0218	    CONN_BLK [CB_OBJECT] = EVENT_OBJECT;
;	  0219	    CONN_BLK [CB_DESCRIPTOR_LENGTH] = 0;
;	  0220	    CONN_BLK [CB_TASK_LENGTH] = 0;
;	  0221	    CONN_BLK [CB_HOST_LENGTH] = ch$rchar (ch$plus (.NODE_ID_PTR, 2)) + 3;
;	  0222	    CONN_BLK [CB_HOST] = .NODE_ID_PTR;
;	  0223	    CONN_BLK [CB_USERID] = 0;
;	  0224	    CONN_BLK [CB_USERID_LENGTH] = 0;
;	  0225	    CONN_BLK [CB_ACCOUNT] = 0;
;	  0226	    CONN_BLK [CB_ACCOUNT_LENGTH] = 0;
;	  0227	    CONN_BLK [CB_PASSWORD] = 0;
;	  0228	    CONN_BLK [CB_PASSWORD_LENGTH] = 0;
;	  0229	    CONN_BLK [CB_DATA] = ch$ptr (CONN_BLK [CB_DATA_BUFFER],, 8);
;	  0230	    CONN_BLK [CB_DATA_LENGTH] = 0;
;	  0231	
;	  0232	    decr NTIMES from 3 to 1 do
;	  0233		begin
;	  0234	        LINK_ID = NMU$NETWORK_OPEN (SOURCE_LINK, CONN_BLK, 0, 0, 0);
;	  0235	
;	  0236	        if .LINK_ID geq 0 then exitloop;
;	  0237	
;	  0238	        NMU$SCHED_SLEEP (TWO_SECONDS);
;	  0239		end;
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   8
X00.06		CONNECT_TO_REMOTE				 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (4)

;	  0240	
;	  0241	    .LINK_ID
;	U 0242	%else
;	U 0243	    0                                   ! To avoid empty compound expression
;	  0244	%fi
;	  0245	    end;                                ! End of CONNECT_TO_REMOTE


						.SBTTL	CONNECT.TO.REMOTE CONNECT_TO_REMOTE
000000	004167  000000G			CONNECT.TO.REMOTE:
						JSR	R1,$SAVE2			;					0188
000004	162706  000220 				SUB	#220,SP
000010	012746  000032 				MOV	#32,-(SP)			; *,CONN.BLK+4				0218
000014	005066  000030 				CLR	30(SP)				; CONN.BLK+34				0219
000020	005066  000004 				CLR	4(SP)				; CONN.BLK+10				0220
000024	016600  000232 				MOV	232(SP),R0			; NODE.ID.PTR,*				0221
000030	116046  000002 				MOVB	2(R0),-(SP)			; *,CONN.BLK+2
000034	105066  000001 				CLRB	1(SP)				; CONN.BLK+2
000040	062716  000003 				ADD	#3,(SP)				; *,CONN.BLK+2
000044	010046 					MOV	R0,-(SP)			; NODE.ID.PTR,CONN.BLK			0222
000046	005066  000012 				CLR	12(SP)				; CONN.BLK+12				0223
000052	005066  000014 				CLR	14(SP)				; CONN.BLK+14				0224
000056	005066  000022 				CLR	22(SP)				; CONN.BLK+22				0225
000062	005066  000024 				CLR	24(SP)				; CONN.BLK+24				0226
000066	005066  000026 				CLR	26(SP)				; CONN.BLK+26				0227
000072	005066  000030 				CLR	30(SP)				; CONN.BLK+30				0228
000076	012766  000204  000016 			MOV	#204,16(SP)			; *,CONN.BLK+16				0229
000104	060666  000016 				ADD	SP,16(SP)			; CONN.BLK+204,CONN.BLK+16
000110	005066  000020 				CLR	20(SP)				; CONN.BLK+20				0230
000114	012701  000003 				MOV	#3,R1				; *,NTIMES				0232
000120	012746  000002 			1$:	MOV	#2,-(SP)			;					0234
000124	012746  000004 				MOV	#4,-(SP)
000130	060616 					ADD	SP,(SP)				; CONN.BLK,*
000132	005046 					CLR	-(SP)
000134	005046 					CLR	-(SP)
000136	005046 					CLR	-(SP)
000140	004767  000000G				JSR	PC,UN.OPEN
000144	010002 					MOV	R0,R2				; *,LINK.ID
000146	002403 					BLT	2$				;					0236
000150	062706  000012 				ADD	#12,SP
000154	000407 					BR	3$
000156	012716  000002 			2$:	MOV	#2,(SP)				;					0238
000162	004767  000000G				JSR	PC,US.SLEEP
000166	062706  000012 				ADD	#12,SP				;					0233
000172	077126 					SOB	R1,1$				; NTIMES,*				0000
000174	010200 				3$:	MOV	R2,R0				; LINK.ID,*				0188
000176	062706  000226 				ADD	#226,SP
000202	000207 					RTS	PC
; Routine Size:  66 words,	Routine Base:  $CODE$ + 0152
; Maximum stack depth per invocation:  84 words

;	  0246	end                                     ! End of module NMLEVX
NMLEVX								24-May-1985 13:26:40	TOPS-20 Bliss-16 2A(530)	    Page   9
X00.06		CONNECT_TO_REMOTE				 3-Jan-1983 01:22:34	DNET61:<MCB.NML>NMLEVX.BLI.1 (4)

;	  0247	
;	  0248	eludom



;					OTS external references
						.GLOBL	$SAVE3, $SAVE2


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 $CODE$				  119	    RO ,  I  ,  LCL,  REL,  CON




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  DNET61:<MCB.NML>NMLLIB.L16.2		      2718       111         4         0





;	  0249	! Local Modes:
;	  0250	! Mode:Bliss
;	  0251	! Comment Start:!
;	  0252	! Comment Column:40
;	  0253	! Comment Rounding:+1
;	  0254	! Auto Save Mode:2
;	  0255	! End:
; Size:		119 code + 0 data words
; Run Time:	00:03.9
; Elapsed Time:	00:07.0
; Memory Used:	35 pages
; Compilation Complete
CB_ACCOUNT_LENGTH		 226
CB_ACCOUNT			 225
CB_DATA				 229
CB_DATA_BUFFER			 229
CB_DATA_LENGTH			 230
CB_DESCRIPTOR_LENGTH		 219
CB_HOST				 222
CB_HOST_LENGTH			 221
CB_OBJECT			 218
CB_PASSWORD			 227
CB_PASSWORD_LENGTH		 228
CB_TASK_LENGTH			 220
CB_USERID			 223
CB_USERID_LENGTH		 224
CH$WCHAR			 147
COMMON				  23
CONNECT_BLOCK			 215
CONNECT_TO_REMOTE		  87	 153
CONN_BLK			 215	 218#	 219#	 220#	 221#	 222#	 223#	 224#	 225#	 226#	 227#	 228#
				 229#	 230#	 234
EB				 168	 170#	 173	 174
EB_ALLOCATION			 174
EB_BUFFER			 173
EB_LENGTH			 173
EQ_COUNT			 172
EVENT_BUFFER			 168
EVENT_OBJECT			 218
EVENT_QUEUE			 165
FIVE_SECONDS			 106#
LANGUAGE			  23
LINK_ID				 137	 153#	 155	 173	 179	 216	 234#	 236	 241
NML$CFG_LOGGING_TRANSMITTER	 129	 211
NML$EVENT_MANAGER		  94*
NML$EVENT_TRANSMITTER		  80
NML$TRANSMITTER_QUEUE_GET	 142
NMLEVX				  21#
NMU$MEMORY_MANAGER		  95
NMU$MEMORY_RELEASE		 174
NMU$NETWORK_CLOSE		 179
NMU$NETWORK_OPEN		 234
NMU$NETWORK_UTILITIES		  96
NMU$NETWORK_WRITE		 173
NMU$QUEUE_MANAGER		  97
NMU$QUEUE_REMOVE		 170
NMU$SCHED_MANAGER		  98
NMU$SCHED_SLEEP			 238
NODE_ID_PTR			 188	 221	 222
NTIMES				 232
SOURCE_LINK			 234
TB				 109
TEN_SECONDS			 107#
TQ				 136	 142#	 147	 148	 153	 165	 170	 172#
TQ_SINK_NODE			 147	 148	 153
TR				 109
TRANSMITTER_QUEUE		 136
TWO_SECONDS			 105#	 238
$TRUE				 132	 161	 173
%GLOBAL_ROUTINE			 109#
%ROUTINE			 188#