Google
 

Trailing-Edge - PDP-10 Archives - BB-R598A-RM_1983 - swskit-v3/listings/xpt/xptupd.list
There are no other files named xptupd.list in the archive.
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   1
								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (1)

;	  0001	module XPTUPD	(
;	  0002			IDENT = 'X01110'
;	  0003			) =
;	  0004	begin
;	  0005	
;	  0006	!
;	  0007	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0008	!                    DIGITAL EQUIPMENT CORPORATION
;	  0009	!                        Maynard, Massachusetts
;	  0010	!
;	  0011	!     This software is furnished under a license and may  be  used
;	  0012	!     and copied only in accordance with the terms of such license
;	  0013	!     and with the inclusion of the above copyright notice.   This
;	  0014	!     software  or any other copies thereof may not be provided or
;	  0015	!     otherwise made available to any other person.  No  title  to
;	  0016	!     and ownership of the software is hereby transferred.
;	  0017	!
;	  0018	!     The information  in  this  software  is  subject  to  change
;	  0019	!     without  notice  and should not be construed as a commitment
;	  0020	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0021	!
;	  0022	!     DIGITAL assumes no responsibility for the use or reliability
;	  0023	!     of  its  software  on  equipment  which  is  not supplied by
;	  0024	!     DIGITAL.
;	  0025	!
;	  0026	
;	  0027	!++
;	  0028	! FACILITY:	Transport
;	  0029	!
;	  0030	! ABSTRACT:
;	  0031	!
;	  0032	!	Transport update module; responsible for the propagation of
;	  0033	!	routing messages.
;	  0034	!
;	  0035	! ENVIRONMENT:	MCB
;	  0036	!
;	  0037	! AUTHOR: L. Webber , CREATION DATE: 20-Jul-79
;	  0038	!
;	  0039	! MODIFIED BY:
;	  0040	!
;	  0041	!	L. Webber, 20-Jul-79 : VERSION 01
;	  0042	!
;	  0043	! 1.01	L. Webber, 23-Oct-79
;	  0044	!	Rewrote routines UPDTIM and UPDFMT
;	  0045	!
;	  0046	! 1.02	L. Webber, 1-Apr-80
;	  0047	!	Modified Transport data base structure; added
;	  0048	!	Node and Line sub-data-bases.
;	  0049	!
;	  0050	! 1.03	L. Webber, 30-Jun-80
;	  0051	!	Modify to use MCBLIB macros
;	  0052	!
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   2
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (1)

;	  0053	! 1.04	L. Webber, 21-Nov-80
;	  0054	!	Fix UPDTIM to clear SRM after sending a message
;	  0055	!
;	  0056	! 1.05	L. Webber, 11-Dec-80
;	  0057	!	Modify to support MCB 3.1
;	  0058	!
;	  0059	! 1.06	L. Webber, 9-Feb-81
;	  0060	!	Change references to SNDBUF to CALL$E
;	  0061	!
;	  0062	! 1.07	L. Webber, 9-Feb-81
;	  0063	!	Change back to direct call; an interface routine has been added.
;	  0064	!
;	  0065	! 1.08	L. Webber, 10-Feb-81
;	  0066	!	This module is now in XPE; SNDBUF now becomes _SNDBUF and CALL$,
;	  0067	!	while UPDTIM itself becomes CALL$.
;	  0068	!
;	  0069	! 1.09	L. Webber, 3-Jun-81
;	  0070	!	Allocate a buffer of a specific size rather than an LDB.
;	  0071	!
;	  0072	! 1.10	A. Peckham, 22-Apr-82
;	  0073	!       Eliminate GETLINE, GETNODE references.
;	  0074	!
;	  0075	! 1.11	A. Peckham, 23-Sep-82
;	  0076	!       Send shortened routing messages to nodes with fences.
;	  0077	!
;	  0078	!--
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   3
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (2)

;	  0079	
;	  0080	!
;	  0081	! INCLUDE FILES:
;	  0082	!
;	  0083	
;	  0084	require 'XPTMAC';
;	  0182	
;	  0183	!
;	  0184	! TABLE OF CONTENTS
;	  0185	!
;	  0186	
;	  0187	forward routine
;	  0188		UPDFMT: LINKAGE_DB_CCB novalue;
;	  0189	
;	  0190	!
;	  0191	! MACROS:
;	  0192	!
;	  0193	
;	  0194	!
;	  0195	! EQUATED SYMBOLS:
;	  0196	!
;	  0197	
;	  0198	!
;	  0199	! OWN STORAGE:
;	  0200	!
;	  0201	
;	  0202	!
;	  0203	! EXTERNAL REFERENCES:
;	  0204	!
;	  0205	
;	  0206	external routine
;	  0207	    _SNDBUF: CALL$ novalue;
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   4
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (3)

;	  0208	routine UPDFMT (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  0209	
;	  0210	!++
;	  0211	! FUNCTIONAL DESCRIPTION:
;	  0212	!
;	  0213	!  Formats and sends a routing message over the specified line.
;	  0214	!
;	  0215	! FORMAL PARAMETERS
;	  0216	!
;	  0217	!       LINEb   Line over which to send the message
;	  0218	!	CCB	LDB in which to build the routing message
;	  0219	!
;	  0220	! IMPLICIT INPUTS
;	  0221	!
;	  0222	!	Minhop,Mincost.
;	  0223	!
;	  0224	! ROUTINE VALUE:
;	  0225	! COMPLETION CODES:
;	  0226	!
;	  0227	!	NONE.
;	  0228	!
;	  0229	! SIDE EFFECTS:
;	  0230	!
;	  0231	!	NONE.
;	  0232	!
;	  0233	!--
;	  0234	
;	  0235	begin
;	  0236	map CCB: ref block field (C_XPT_fields);
;	  0237	require 'XPTSYM';
;	  0274	pointer PTR;
;	  0275	local NO_NODES,SUM;
;	  0276	
;	  0277	begin                          ! Get number of nodes to process
;	  0278	bind MXA = NO_NODES: ref vector;
;	  0279	
;	  0280	if (MXA = .NODEmaximum_address_vector) neqa 0
;	  0281	then begin
;	  0282	     if (MXA = .MXA [.Nid - 1]) neq 0
;	  0283	     then begin
;	  0284	          if .MXA gtr NN
;	  0285	          then MXA = NN;
;	  0286	          end
;	  0287	     else MXA = NN;
;	  0288	     end
;	  0289	else MXA = NN;
;	  0290	end;
;	  0291	CCB[C_XPT_TYPE] = UPDATEcode;           ! Move buffer type into CCB
;	  0292	CCB[C_XPT_SUBTYPE] = UPDATEcode;	!  (subtype also)
;	  0293	MAPBUF(.CCB,PTR);                       ! Map to buffer and get address
;	  0294	putb(7,PTR);				! Put in control flags
;	  0295	putb(.(Tid)<0,8>,PTR);			! Put in source node (us)
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   5
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (3)

;	  0296	putb(.(Tid)<8,8>,PTR);
;	  0297	SUM = 0;				! Initialize checksum
;	  0298	$XPT_for_each_NODEb_do_begin
;	  0299	    local WORK;
;	  0300	    if .NODEaddress gtr .NO_NODES then exitloop;
;	  0301	    WORK = .Minhop^Hop_P+.Mincost^Cost_P; !  hop/cost word
;	  0302	    putb(.WORK<0,8>,PTR);               !  and add word
;	  0303	    putb(.WORK<8,8>,PTR);
;	  0304	    checksum(SUM,.WORK);                !  into checksum
;	  0305	$XPT_next_NODEb_end;
;	  0306	putb(.SUM<0,8>,PTR);			! Store checksum into message
;	  0307	putb(.SUM<8,8>,PTR);
;	  0308	CCB[C_CNT] = ch$diff(.PTR,.CCB[C_ADDR]);! Calculate message length;
;	  0309	CCB[C_XPT_ALLOCATION] = .CCB[C_CNT];    !  also store it as buffer length
;	  0310	end;				!End of UPDFMT


						.TITLE	XPTUPD
						.IDENT	/X01110/

						.GLOBL	.SNDBUF, .CRDAT, KISAR6


						.SBTTL	UPDFMT
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			; UPDFMT
					U.1:	JSR	R1,$SAVE5			;					0208
000004	010446 					MOV	R4,-(SP)
000006	016702  000002G				MOV	.CRDAT+2,R2			;					0280
000012	012700  000016 				MOV	#16,R0				;					0284
000016	060200 					ADD	R2,R0
000020	016201  000024 				MOV	24(R2),R1			; *,MXA					0280
000024	001413 					BEQ	1$
000026	016505  000004 				MOV	4(R5),R5			; *(LINEB),*				0282
000032	006305 					ASL	R5
000034	060105 					ADD	R1,R5				; MXA,*
000036	016501  177776 				MOV	-2(R5),R1			; *,MXA
000042	001404 					BEQ	1$
000044	011004 					MOV	(R0),R4				;					0284
000046	020104 					CMP	R1,R4				; MXA,*
000050	003403 					BLE	3$
000052	000401 					BR	2$				;					0285
000054	011004 				1$:	MOV	(R0),R4				;					0289
000056	010401 				2$:	MOV	R4,R1				; *,MXA
000060	011600 				3$:	MOV	(SP),R0				;					0291
000062	112760  000001  000032 			MOVB	#1,32(R0)
000070	016067  000016  000000G			MOV	16(R0),KISAR6			;					0293
000076	016005  000020 				MOV	20(R0),R5			; *,PTR
000102	112725  000007 				MOVB	#7,(R5)+			; *,PTR					0294
000106	116225  000056 				MOVB	56(R2),(R5)+			; *,PTR					0295
000112	116225  000057 				MOVB	57(R2),(R5)+			; *,PTR					0296
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   6
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (3)

000116	005000 					CLR	R0				; SUM					0297
000120	016202  000012 				MOV	12(R2),R2			; *,NODEB
000124	010403 					MOV	R4,R3				; *,$XPT$NODEB.CNT
000126	001423 					BEQ	5$
000130	026201  000002 			4$:	CMP	2(R2),R1			; *(NODEB),NO.NODES			0300
000134	003020 					BGT	5$
000136	016204  000004 				MOV	4(R2),R4			; *(NODEB),*				0301
000142	072427  000012 				ASH	#12,R4
000146	066204  000006 				ADD	6(R2),R4			; *(NODEB),*
000152	110425 					MOVB	R4,(R5)+			; WORK,PTR				0302
000154	010446 					MOV	R4,-(SP)			; WORK,*				0303
000156	000316 					SWAB	(SP)
000160	112625 					MOVB	(SP)+,(R5)+			; *,PTR
000162	060400 					ADD	R4,R0				; WORK,SUM				0304
000164	010004 					MOV	R0,R4				; SUM,*
000166	005500 					ADC	R0				; SUM
000170	062702  000010 				ADD	#10,R2				; *,NODEB
000174	077323 					SOB	R3,4$				; $XPT$NODEB.CNT,*			0000
000176	110025 				5$:	MOVB	R0,(R5)+			; SUM,PTR				0306
000200	010001 					MOV	R0,R1				; SUM,*					0307
000202	000301 					SWAB	R1
000204	110125 					MOVB	R1,(R5)+			; *,PTR
000206	012600 					MOV	(SP)+,R0			;					0308
000210	010560  000022 				MOV	R5,22(R0)			; PTR,*
000214	010001 					MOV	R0,R1
000216	166160  000020  000022 			SUB	20(R1),22(R0)
000224	016160  000022  000034 			MOV	22(R1),34(R0)			;					0309
000232	000207 					RTS	PC				;					0208

; Routine Size:  78 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  8 words
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   7
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (4)

;	  0311	global routine UPDTIM: CALL$ novalue =
;	  0312	
;	  0313	!++
;	  0314	! FUNCTIONAL DESCRIPTION:
;	  0315	!
;	  0316	!  Processes calls from the Transport timer routine.
;	  0317	!  If the Update_clock has expired, sends a routing message
;	  0318	!  on each line with Srm set.
;	  0319	!
;	  0320	! FORMAL PARAMETERS
;	  0321	!
;	  0322	!	NONE.
;	  0323	!
;	  0324	! IMPLICIT INPUTS
;	  0325	!
;	  0326	!	Update_clock, Srm, UPDATEquota, NEXTline
;	  0327	!
;	  0328	! ROUTINE VALUE:
;	  0329	! COMPLETION CODES:
;	  0330	!
;	  0331	!	NONE.
;	  0332	!
;	  0333	! SIDE EFFECTS:
;	  0334	!
;	  0335	!	If Update_clock is expired, Update_clock is reset.
;	  0336	!	If a routing message is sent on a line, Srm is cleared for the line.
;	  0337	!
;	  0338	!--
;	  0339	
;	  0340	begin
;	  0341	require 'XPTSYM';
;	  0378	label LINE_CHECKER;
;	  0379	local CCB,LIN;
;	  0380	
;	  0381	LIN = .NEXTline;			! Start scan at end of last time's
;	  0382	
;	  0383	    do
;	  0384	LINE_CHECKER:
;	  0385	        begin				!Scan each line
;	  0386	        local LINEb: ref LINEblock;
;	  0387		LINEb = $XPT_GET_LINE_DB(.LIN); !  Address line data base entry
;	  0388	
;	  0389		if .LINEstate neq RU then leave LINE_CHECKER;
;	  0390	
;	  0391	        if .Nty neq Full then leave LINE_CHECKER;
;	  0392	
;	  0393		if not .Srm then leave LINE_CHECKER;
;	  0394	
;	  0395	        if .UPDATEquota eql 0 then exitloop;    !  If no congestion
;	  0396	                                        ! and
;	  0397		if not $MCB_GET_CCB_AND_BUFFER (NN*2 + 5, CCB)  ! resource available,
;	  0398	        then exitloop;
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   8
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (4)

;	  0399	
;	  0400	        UPDATEquota = .UPDATEquota - 1; ! Update the Update quota
;	  0401	        UPDFMT(.LINEb,.CCB);            !    build the routing message
;	  0402	        _SNDBUF(.LINEb,.CCB);           !    and send it out
;	  0403	        Srm = false;
;	  0404		end
;	  0405	    while
;	  0406	        begin
;	  0407		LIN = .LIN + 1;			!  Try next line,
;	  0408		if .LIN gtr NLN then LIN = 1;	!    wrapping around if necessary
;	  0409	        .LIN neq .NEXTline
;	  0410	        end;
;	  0411	
;	  0412	NEXTline = .LIN;
;	  0413	end;				!End of UPDTIM


						.GLOBL	GTLINE, $CBBGT


						.SBTTL	UPDTIM
000000	016700  000002G			UPDTIM::MOV	.CRDAT+2,R0			;					0381
000004	116002  000076 				MOVB	76(R0),R2			; *,LIN
000010	010200 				1$:	MOV	R2,R0				; LIN,*					0387
000012	004767  000000G				JSR	PC,GTLINE
000016	010005 					MOV	R0,R5				; *,LINEB
000020	121527  000010 				CMPB	(R5),#10			; LINEB,*				0389
000024	001007 					BNE	2$
000026	126527  000002  000002 			CMPB	2(R5),#2			; *(LINEB),*				0391
000034	001003 					BNE	2$
000036	032715  020000 				BIT	#20000,(R5)			; *,LINEB				0393
000042	001002 					BNE	3$
000044	024646 				2$:	CMP	-(SP),-(SP)
000046	000440 					BR	4$
000050	016700  000002G			3$:	MOV	.CRDAT+2,R0			;					0395
000054	105760  000100 				TSTB	100(R0)
000060	001452 					BEQ	6$
000062	010001 					MOV	R0,R1				; XPTDB,*				0397
000064	016101  000016 				MOV	16(R1),R1
000070	006301 					ASL	R1
000072	062701  000005 				ADD	#5,R1
000076	004767  000000G				JSR	PC,$CBBGT
000102	103441 					BCS	6$
000104	010403 					MOV	R4,R3				; $MCB$R4,CCB
000106	016700  000002G				MOV	.CRDAT+2,R0			;					0398
000112	105360  000100 				DECB	100(R0)				;					0400
000116	004767  177422 				JSR	PC,U.1				;					0401
000122	010346 					MOV	R3,-(SP)			; CCB,*					0402
000124	010546 					MOV	R5,-(SP)			; LINEB,*
000126	012746  000002 				MOV	#2,-(SP)
000132	012746  000000G				MOV	#.SNDBUF,-(SP)
000136	004767  000000G				JSR	PC,$CALL
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page   9
X01110								30-Dec-1982 21:49:52	NETPKG:<XPT>XPTUPD.BLI.8 (4)

000142	022626 					CMP	(SP)+,(SP)+
000144	042715  020000 				BIC	#20000,(R5)			; *,LINEB				0403
000150	022626 				4$:	CMP	(SP)+,(SP)+			;					0383
000152	005202 					INC	R2				; LIN					0407
000154	016700  000002G				MOV	.CRDAT+2,R0			;					0408
000160	020260  000022 				CMP	R2,22(R0)			; LIN,*
000164	003402 					BLE	5$
000166	012702  000001 				MOV	#1,R2				; *,LIN
000172	016700  000002G			5$:	MOV	.CRDAT+2,R0			;					0409
000176	116001  000076 				MOVB	76(R0),R1
000202	020201 					CMP	R2,R1				; LIN,*
000204	001301 					BNE	1$
000206	016700  000002G			6$:	MOV	.CRDAT+2,R0			;					0410
000212	110260  000076 				MOVB	R2,76(R0)			; LIN,*					0412
000216	000207 					RTS	PC				;					0311

; Routine Size:  72 words,	Routine Base:  $CODE$ + 0234
; Maximum stack depth per invocation:  5 words


;	  0414	
;	  0415	end				!End of module XPTUPD
;	  0416	eludom



;					OTS external references
						.GLOBL	$SAVE5, $CALL


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




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  NETPKG:<MCB>XPORTX.L16.15		       599         0         0         0
;  NETPKG:<MCB>MCBLIB.L16.15		       372        30         8         0
;  NETPKG:<MCB>NMXLIB.L16.13		       200         0         0         0
;  NETPKG:<XPT>XPTLIB.L16.3		       510       174        34         0
XPTUPD								25-Jan-1983 09:59:08	TOPS-20 Bliss-16 2A(530)	    Page  10
X01110											

; Size:		150 code + 0 data words
; Run Time:	00:04.9
; Elapsed Time:	00:17.5
; Memory Used:	39 pages
; Compilation Complete
ADDRESS				 136+	 138+	 139+	 141+	 142+	 144+	 145+	 151+	 152+	 155+	 156+	 157+
BPT				 165+#	 177+#
BUFCHK				 169+	 170+#	 179+	 180+#
CALL$				 207	 311#
CCB				 208	 236	 291#	 292#	 293	 308#	 309#	 379	 397	 401	 402
CHECKSUM			 304
CHKBUF				 172+*	 173+
COST_P				 301
C_ADDR				 308
C_CNT				 308	 309
C_XPT_ALLOCATION		 309
C_XPT_FIELDS			 236
C_XPT_SUBTYPE			 292
C_XPT_TYPE			 291
FALSE				 403
FULL				 391
GETQ				 136+#
GETW				 115+#	 138+	 139+
HOP_P				 301
I				 160+	 162+
J				 160+	 162+
LIN				 379	 381#	 387	 407#	 408#	 409	 412
LINEBLOCK			 264+	 368+	 386
LINEB				 208	 262+	 264+	 366+	 368+	 386	 387#	 401	 402
LINESTATE			 389
LINE_CHECKER			 378	 384	 389	 391	 393
LINKAGE_DB_CCB			 188	 208#
M				 160+	 161+
MAPBUF				 293
MATRIX				 160+#	 162+
MCB$GAW_PROCESS_DATA_BASE	 267+	 268+	 271+	 371+	 372+	 375+
MINCOST				 301
MINHOP				 301
MXA				 278#	 280#	 282#	 284	 285#	 287#	 289#
N				 160+	 161+
NEXTLINE			 381	 409	 412#
NID				 282
NL				 160+	 162+
NLN				 408
NN				 284	 285	 287	 289	 397
NODEADDRESS			 300
NODEBLOCK			 259+	 363+
NODEB				 257+	 259+	 361+	 363+
NODEMAXIMUM_ADDRESS_VECTOR	 280
NOP				 177+	 178+	 180+
NO_LINEB			 263+	 367+
NO_NODEB			 258+	 362+
NO_NODES			 275	 278	 300
NTY				 391
POINTER				 274
PTR				 115+	 118+	 119+	 122+	 125+	 126+	 132+	 133+	 136+	 138+	 139+	 141+
				 144+	 145+	 146+	 147+	 151+	 152+	 274	 293	 294	 295	 296	 302
				 303	 306	 307	 308
PUTB				 294	 295	 296	 302	 303	 306	 307
PUTQ				 141+#
PUTW				 122+#	 151+	 152+
RU				 389
SRM				 393	 403#
SUM				 275	 297#	 304	 306	 307
TID				 295	 296
UNIT				 160+#	 161+	 162+
UPDATECODE			 291	 292
UPDATEQUOTA			 395	 400#
UPDFMT				 188	 208*	 401
UPDTIM				 311*
VALUE				 122+	 123+	 125+	 126+	 131+
WORK				 299	 301#	 302	 303	 304
X				 117+	 118+#	 119+#	 120+	 130+	 131+#	 132+	 133+
XPTDBBLOCK			 273+	 377+
XPTDB				 270+	 271+#	 272+	 374+	 375+#	 376+
XPTUPD				   1#
ZEROQ				 155+#
_SNDBUF				 207*	 402
$MCB_GET_CCB_AND_BUFFER		 397
$XPT_FOR_EACH_NODEB_DO_BEGIN	 298
$XPT_GET_LINE_DB		 387
$XPT_NEXT_NODEB_END		 305
%CTCE				 123+	 142+
%REMAINING			 167+