Google
 

Trailing-Edge - PDP-10 Archives - BB-R598A-RM_1983 - swskit-v3/listings/xpt/xpt16.list
There are no other files named xpt16.list in the archive.
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   1
								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (1)

;	  0001	module XPT16	(
;	  0002			IDENT = 'X01150'
;	  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	!	16-bit or RSX-11M dependent routines for transport
;	  0033	!
;	  0034	! ENVIRONMENT:	MCB
;	  0035	!
;	  0036	! AUTHOR: L. Webber , CREATION DATE: 20-Jul-79
;	  0037	!
;	  0038	! MODIFIED BY:
;	  0039	!
;	  0040	!	20-Jul-79 : VERSION 1.00
;	  0041	!
;	  0042	! 1.01	L. Webber, 21-Oct-80
;	  0043	!	Change C_BUF and C_BUFA references to C_BIAS and C_ADDR
;	  0044	!
;	  0045	! 1.02	L. Webber, 11-Dec-80
;	  0046	!	Modify to support MCB 3.1
;	  0047	!
;	  0048	! 1.03	L. Webber, 11-Feb-81
;	  0049	!	Made XPT16 into three parallel modules: XPT16, TLI16 and XPE16.
;	  0050	!	This mod. also comprises the addition of several new entry points
;	  0051	!	over the last year.  This is the last of the identically numbered
;	  0052	!	mods. for the three -16 modules.
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   2
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (1)

;	  0053	!
;	  0054	! 1.04	L. Webber, 17-Feb-81
;	  0055	!	Made GETXDB CALL$ linkage.
;	  0056	!
;	  0057	! 1.05	L. Webber, 23-Feb-81
;	  0058	!	Fix event logging class and Event Buffer specification.
;	  0059	!
;	  0060	! 1.06	L. Webber, 25-Feb-81
;	  0061	!	Move $CDBV and $CBDMG to XPT16.
;	  0062	!
;	  0063	! 1.07	L. Webber, 10-Mar-81
;	  0064	!	Take retry queue length out of CHKBUF accounting.
;	  0065	!
;	  0066	! 1.08	L. Webber, 13-Mar-81
;	  0067	!	Add routine to untangle spawned CCBs.
;	  0068	!
;	  0069	! 1.09	L. Webber, 3-Apr-81
;	  0070	!	Signal the ENTITY value in LOG_EVENT.
;	  0071	!
;	  0072	! 1.10	L. Webber, 28-Jul-81
;	  0073	!	Fix UNSPAWN to specify the size of the buffer it is returning.
;	  0074	!
;	  0075	! 1.11	L. Webber, 18-Sep-81
;	  0076	!	Take out routines GETSDB,RETSDB.
;	  0077	!
;	  0078	! 1.12	L. Webber, 24-Sep-81
;	  0079	!	Take out routine MAPIN.
;	  0080	!
;	  0081	! 1.13	L. Webber, 24-Sep-81
;	  0082	!	Take reference to Event_Buffer out of the signal in LOG_EVENT.
;	  0083	!
;	  0084	! 1.14	A. Peckham, 19-Apr-82
;	  0085	!	Add XPT$GET_LINE_DB and XPT$GET_NODE_DB routines.
;	  0086	!	Remove LOG_EVENT, GETLINE, GETNODE.
;	  0087	!	Move $CBDMG and $CDBV back from XPE16
;	  0088	!       and rename them to CBTD and CDTB respectively.
;	  0089	!	Move GETXDB global to low psect.
;	  0090	!
;	  0091	! 1.15	A. Peckham, 6-May-82
;	  0092	!	Eliminate RLS_BLK, GET_BLK, OC_ADD, GET_EX.
;	  0093	!
;	  0094	!--
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   3
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (2)

;	  0095	
;	  0096	!
;	  0097	! INCLUDE FILES:
;	  0098	!
;	  0099	
;	  0100	require 'XPTMAC';
;	  0198	
;	  0199	!
;	  0200	! TABLE OF CONTENTS
;	  0201	!
;	  0202	
;	  0203	forward routine
;	  0204		XPT$GET_LINE_DB: XPT$LKG_NUM,
;	  0205		XPT$GET_NODE_DB: XPT$LKG_NUM,
;	  0206		GET_XPTDB: CALL$ novalue,
;	  0207		TOPOLOGY: CALL$,
;	  0208		CHKBUF: novalue;
;	  0209	
;	  0210	!
;	  0211	! MACROS:
;	  0212	!
;	  0213	
;	  0214	!
;	  0215	! EQUATED SYMBOLS:
;	  0216	!
;	  0217	
;	  0218	!
;	  0219	! OWN STORAGE:
;	  0220	!
;	  0221	
;	  0222	literal JUMP_TO = %o'137';
;	  0223	
;	  0224	psect
;	  0225	    global = XPTJMP (nowrite, execute);
;	  0226	
;	  0227	global
;	  0228	    GETXDB : vector [2] initial (JUMP_TO, GET_XPTDB),
;	  0229	    GETTOP : vector [2] initial (JUMP_TO, TOPOLOGY);
;	  0230	
;	  0231	undeclare JUMP_TO;
;	  0232	
;	  0233	!
;	  0234	! EXTERNAL REFERENCES:
;	  0235	!
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   4
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (3)

;	  0236	
;	  0237	global
;	  0238	routine XPT$GET_LINE_DB (LINE) : XPT$LKG_NUM =
;	  0239	
;	  0240	!++
;	  0241	! FUNCTIONAL DESCRIPTION:
;	  0242	!
;	  0243	! Returns the base address of the line data base entry for
;	  0244	! the specified line
;	  0245	!
;	  0246	! FORMAL PARAMETERS
;	  0247	!
;	  0248	!	LINE	Line number whose data base entry is to be
;	  0249	!		located
;	  0250	!
;	  0251	! IMPLICIT INPUTS
;	  0252	!
;	  0253	!	XPTDB
;	  0254	!
;	  0255	! ROUTINE VALUE:
;	  0256	!
;	  0257	!	The address of the line data base entry for .LINE
;	  0258	!
;	  0259	! SIDE EFFECTS:
;	  0260	!
;	  0261	!	NONE.
;	  0262	!
;	  0263	!--
;	  0264	
;	  0265	begin
;	  0266	require 'XPTSYM';
;	  0303	
;	  0304	LINE = .LINE - 1;
;	  0305	if .LINE lssu NLN
;	  0306	then
;	  0307	    begin
;	  0308	    LINE = .LINE*LINElength;
;	  0309	    .XPTDB[XPTlindb] + .LINE
;	  0310	    end
;	  0311	else
;	  0312	    0
;	  0313	end;				!End of XPT$GET_LINE_DB


						.TITLE	XPT16
						.IDENT	/X01150/


000000						.PSECT	XPTJMP,  RO 
000000	000137 				GETXDB::.WORD	137
000002	000000V					.WORD	U.3
000004	000137 				GETTOP::.WORD	137
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   5
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (3)

000006	000000V					.WORD	U.4


						.GLOBL	.CRDAT


						.SBTTL	GTLINE
000000						.PSECT	$CODE$,  RO 

000000	010146 				GTLINE::
					U.1:	MOV	R1,-(SP)			;					0238
000002	010001 					MOV	R0,R1				; *,LINE
000004	005301 					DEC	R1				; LINE					0304
000006	016700  000002G				MOV	.CRDAT+2,R0			;					0305
000012	020160  000022 				CMP	R1,22(R0)			; LINE,*
000016	103010 					BHIS	1$
000020	070127  000104 				MUL	#104,R1				;					0308
000024	016700  000002G				MOV	.CRDAT+2,R0			;					0309
000030	016000  000020 				MOV	20(R0),R0
000034	060100 					ADD	R1,R0				; LINE,*
000036	000401 					BR	2$				;					0305
000040	005000 				1$:	CLR	R0
000042	012601 				2$:	MOV	(SP)+,R1			;					0238
000044	000207 					RTS	PC

; Routine Size:  19 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  2 words
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   6
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (4)

;	  0314	
;	  0315	global
;	  0316	routine XPT$GET_NODE_DB (NODE) : XPT$LKG_NUM =
;	  0317	
;	  0318	!++
;	  0319	! FUNCTIONAL DESCRIPTION:
;	  0320	!
;	  0321	! Returns the base address of the node data base entry for
;	  0322	! the specified node number
;	  0323	!
;	  0324	! FORMAL PARAMETERS
;	  0325	!
;	  0326	!	NODE	Node number of the node whose data base is to be
;	  0327	!		located
;	  0328	!
;	  0329	! IMPLICIT INPUTS
;	  0330	!
;	  0331	!	XPTDB
;	  0332	!
;	  0333	! ROUTINE VALUE:
;	  0334	!
;	  0335	!	Address of the node data base entry for .NODE
;	  0336	!
;	  0337	! SIDE EFFECTS:
;	  0338	!
;	  0339	!	NONE.
;	  0340	!
;	  0341	!--
;	  0342	
;	  0343	begin
;	  0344	require 'XPTSYM';
;	  0381	
;	  0382	NODE = .NODE - 1;
;	  0383	if .NODE lssu NN
;	  0384	then
;	  0385	    begin
;	  0386	    NODE = .NODE*NODElength;
;	  0387	    .XPTDB[XPTnoddb] + .NODE
;	  0388	    end
;	  0389	else
;	  0390	    0
;	  0391	end;				!End of XPT$GET_NODE_DB


						.SBTTL	GTNODE
000000	010146 				GTNODE::
					U.2:	MOV	R1,-(SP)			;					0316
000002	010001 					MOV	R0,R1				; *,NODE
000004	005301 					DEC	R1				; NODE					0382
000006	016700  000002G				MOV	.CRDAT+2,R0			;					0383
000012	020160  000016 				CMP	R1,16(R0)			; NODE,*
000016	103012 					BHIS	1$
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   7
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (4)

000020	010100 					MOV	R1,R0				; NODE,*				0386
000022	072027  000003 				ASH	#3,R0
000026	010001 					MOV	R0,R1				; *,NODE
000030	016700  000002G				MOV	.CRDAT+2,R0			;					0387
000034	016000  000012 				MOV	12(R0),R0
000040	060100 					ADD	R1,R0				; NODE,*
000042	000401 					BR	2$				;					0383
000044	005000 				1$:	CLR	R0
000046	012601 				2$:	MOV	(SP)+,R1			;					0316
000050	000207 					RTS	PC

; Routine Size:  21 words,	Routine Base:  $CODE$ + 0046
; Maximum stack depth per invocation:  2 words
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   8
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (5)

;	  0392	
;	  0393	global
;	  0394	routine GET_XPTDB (DBADDR): CALL$ novalue =
;	  0395	
;	  0396	!++
;	  0397	! FUNCTIONAL DESCRIPTION:
;	  0398	!
;	  0399	! Returns the address of the Transport data base in the specified location.
;	  0400	!
;	  0401	! FORMAL PARAMETERS
;	  0402	!
;	  0403	!	DBADDR		The address of an area to contain the doubleword
;	  0404	!			address of the data base.
;	  0405	!
;	  0406	! IMPLICIT INPUTS
;	  0407	!
;	  0408	!	NONE.
;	  0409	!
;	  0410	! ROUTINE VALUE:
;	  0411	! COMPLETION CODES:
;	  0412	!
;	  0413	!	NONE.
;	  0414	!
;	  0415	! SIDE EFFECTS:
;	  0416	!
;	  0417	!	NONE.
;	  0418	!
;	  0419	!--
;	  0420	
;	  0421	begin
;	  0422	map DBADDR: ref vector[2];
;	  0423	external MCB$GAW_PROCESS_DATA_BASE: vector[2];
;	  0424	
;	  0425	DBADDR[0] = .MCB$GAW_PROCESS_DATA_BASE[0];
;	  0426	DBADDR[1] = .MCB$GAW_PROCESS_DATA_BASE[1];
;	  0427	
;	  0428	end;				!End of GET_XPTDB


						.SBTTL	GET.XPTDB
000000	016775  000000G 000002 		GET.XPTDB::
					U.3:	MOV	.CRDAT,@2(R5)			; *,DBADDR(.AP.)			0425
000006	016505  000002 				MOV	2(R5),R5			; DBADDR(.AP.),*			0426
000012	016765  000002G 000002 			MOV	.CRDAT+2,2(R5)
000020	000207 					RTS	PC				;					0394

; Routine Size:  9 words,	Routine Base:  $CODE$ + 0120
; Maximum stack depth per invocation:  0 words
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page   9
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (6)

;	  0429	
;	  0430	routine TOPOLOGY (_CCB): CALL$ =
;	  0431	
;	  0432	!++
;	  0433	! FUNCTIONAL DESCRIPTION:
;	  0434	!
;	  0435	!
;	  0436	! FORMAL PARAMETERS
;	  0437	!
;	  0438	!	_CCB	Function CCB to be passed to the routine.
;	  0439	!
;	  0440	! IMPLICIT INPUTS
;	  0441	!
;	  0442	!	NONE.
;	  0443	!
;	  0444	! ROUTINE VALUE:
;	  0445	! COMPLETION CODES:
;	  0446	!
;	  0447	!	NONE.
;	  0448	!
;	  0449	! SIDE EFFECTS:
;	  0450	!
;	  0451	!	NONE.
;	  0452	!
;	  0453	!--
;	  0454	
;	  0455	begin
;	  0456	require 'XPTSYM';
;	  0493	stacklocal NODEs;
;	  0494	local CCB: ref block field (C_fields),
;	  0495	      NODEb: ref NODEblock,
;	  0496	      NODEn,WORK;
;	  0497	pointer PTR;
;	  0498	
;	  0499	CCB = ._CCB;
;	  0500	MAP$(.CCB[C_BIAS]);
;	  0501	PTR = .CCB[C_ADDR];
;	  0502	NODEb = .XPTDB[XPTnoddb];
;	  0503	NODEs = NN;
;	  0504	ch$wchar_a(.NODEs<0,8>,PTR);    ! Move in NN
;	  0505	ch$wchar_a(.NODEs<8,8>,PTR);
;	  0506	NODEn = 0;
;	  0507	WORK = 0;
;	  0508	do
;	  0509	    begin
;	  0510	    local TYPE;
;	  0511	    NODEn = .NODEn + 1;
;	  0512	    TYPE = 0^8;                         ! Assume node unreachable
;	  0513	    if .Reach                           !   Node reachable -
;	  0514	    then begin
;	  0515	         TYPE = 3^8;                    ! Assume Phase III
;	  0516		 if .Phase2_node
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  10
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (6)

;	  0517	         then TYPE = 2^8;               ! Phase II
;	  0518	         end;
;	  0519	    WORK = .WORK or .TYPE;
;	  0520	    WORK = .WORK^-2;
;	  0521	    if .NODEn<0,2> eql 0
;	  0522	    then begin
;	  0523	         ch$wchar_a(.WORK,PTR);
;	  0524	         WORK = 0;
;	  0525	         end;
;	  0526	    NODEb = vector[.NODEb,NODEsize];
;	  0527	    end
;	  0528	while .NODEn lss .NODEs;
;	  0529	
;	  0530	if .NODEn<0,2> neq 0
;	  0531	then begin
;	  0532	     do (NODEn = .NODEn + 1; WORK = .WORK^-2) while .NODEn<0,2> neq 0;
;	  0533	     ch$wchar_a(.WORK,PTR);
;	  0534	     end;
;	  0535	
;	  0536	PTR = ch$diff(.PTR,.CCB[C_ADDR]);
;	  0537	CCB[C_CNT] = .PTR;                      ! Set up buffer count
;	  0538	true
;	  0539	end;				!End of TOPOLOGY


						.GLOBL	KISAR6


						.SBTTL	TOPOLOGY
000000	016504  000002 			; TOPOLOGY
					U.4:	MOV	2(R5),R4			; .CCB(.AP.),CCB			0499
000004	016467  000016  000000G			MOV	16(R4),KISAR6			; *(CCB),*				0500
000012	016400  000020 				MOV	20(R4),R0			; *(CCB),PTR				0501
000016	016701  000002G				MOV	.CRDAT+2,R1			;					0502
000022	016105  000012 				MOV	12(R1),R5			; *,NODEB
000026	016146  000016 				MOV	16(R1),-(SP)			; *,NODES				0503
000032	111620 					MOVB	(SP),(R0)+			; NODES,PTR				0504
000034	116620  000001 				MOVB	1(SP),(R0)+			; NODES,PTR				0505
000040	005003 					CLR	R3				; NODEN					0506
000042	005002 					CLR	R2				; WORK					0507
000044	005203 				1$:	INC	R3				; NODEN					0511
000046	005001 					CLR	R1				; TYPE					0512
000050	005715 					TST	(R5)				; NODEB					0513
000052	100007 					BPL	2$
000054	012701  001400 				MOV	#1400,R1			; *,TYPE				0515
000060	032715  001000 				BIT	#1000,(R5)			; *,NODEB				0516
000064	001402 					BEQ	2$
000066	012701  001000 				MOV	#1000,R1			; *,TYPE				0517
000072	050102 				2$:	BIS	R1,R2				; TYPE,WORK				0519
000074	006202 					ASR	R2				; WORK					0520
000076	006202 					ASR	R2				; WORK
000100	032703  000003 				BIT	#3,R3				; *,NODEN				0521
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  11
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (6)

000104	001002 					BNE	3$
000106	110220 					MOVB	R2,(R0)+			; WORK,PTR				0523
000110	005002 					CLR	R2				; WORK					0524
000112	062705  000010 			3$:	ADD	#10,R5				; *,NODEB				0526
000116	020316 					CMP	R3,(SP)				; NODEN,NODES				0528
000120	002751 					BLT	1$
000122	032703  000003 				BIT	#3,R3				; *,NODEN				0530
000126	001407 					BEQ	5$
000130	005203 				4$:	INC	R3				; NODEN					0532
000132	006202 					ASR	R2				; WORK
000134	006202 					ASR	R2				; WORK
000136	032703  000003 				BIT	#3,R3				; *,NODEN
000142	001372 					BNE	4$
000144	110220 					MOVB	R2,(R0)+			; WORK,PTR				0533
000146	166400  000020 			5$:	SUB	20(R4),R0			; *(CCB),PTR				0536
000152	010064  000022 				MOV	R0,22(R4)			; PTR,*(CCB)				0537
000156	012700  000001 				MOV	#1,R0				;					0430
000162	005726 					TST	(SP)+
000164	000207 					RTS	PC

; Routine Size:  59 words,	Routine Base:  $CODE$ + 0142
; Maximum stack depth per invocation:  1 word
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  12
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (7)

;	  0540	
;	  0541	global
;	  0542	routine CDTB (BUF_PTR,LEN) =
;	  0543	
;	  0544	!++
;	  0545	! FUNCTIONAL DESCRIPTION:
;	  0546	!
;	  0547	! This routine takes two parameters which describe a potential
;	  0548	! image numeric ASCII field, and attempt to convert it to binary.
;	  0549	! The number is assumed to be expressed in decimal radix.  If a
;	  0550	! non-numeric character is encountered before the field is exhausted,
;	  0551	! an error code of -1 is returned.
;	  0552	!
;	  0553	! FORMAL PARAMETERS
;	  0554	!
;	  0555	!	BUF_PTR - A character pointer to the field to
;	  0556	!	          be examined.
;	  0557	!	LEN - The length of the field.
;	  0558	!
;	  0559	! IMPLICIT INPUTS
;	  0560	!
;	  0561	!	NONE.
;	  0562	!
;	  0563	! ROUTINE VALUE: "Failure" or the converted binary number.
;	  0564	! COMPLETION CODES:
;	  0565	!
;	  0566	!	<  0 : Failure - the whole field is not numeric.
;	  0567	!	>= 0 : The binary number converted from the field.
;	  0568	!
;	  0569	! SIDE EFFECTS:
;	  0570	!
;	  0571	!	NONE.
;	  0572	!
;	  0573	!--
;	  0574	
;	  0575	begin
;	  0576	
;	  0577	local VALUE;
;	  0578	pointer P;
;	  0579	
;	  0580	P = .BUF_PTR;
;	  0581	VALUE = 0;
;	  0582	
;	  0583	!
;	  0584	!  Scan through specified string
;	  0585	!
;	  0586	
;	  0587	incr I from 1 to .LEN do
;	  0588	    begin
;	  0589	    local DIGIT;
;	  0590	    DIGIT = getb(P)-%c'0';
;	  0591	    if (.DIGIT lss 0)			!If the next character
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  13
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (7)

;	  0592	    or (.DIGIT gtr 9)			!  is out of decimal range,
;	  0593	    then return -1;			!  then quit, otherwise
;	  0594	    VALUE = (.VALUE*10) + .DIGIT;	!  add it into accumulated value
;	  0595	    end;
;	  0596	
;	  0597	.VALUE
;	  0598	end;				!End of CDTB


						.SBTTL	CDTB
000000	004167  000000G			CDTB::	JSR	R1,$SAVE4			;					0542
000004	016603  000016 				MOV	16(SP),R3			; BUF.PTR,P				0580
000010	005000 					CLR	R0				; VALUE					0581
000012	005004 					CLR	R4				; I					0587
000014	000420 					BR	4$
000016	005002 				1$:	CLR	R2				; DIGIT					0590
000020	152302 					BISB	(R3)+,R2			; P,DIGIT
000022	162702  000060 				SUB	#60,R2				; *,DIGIT
000026	100403 					BMI	2$				;					0591
000030	020227  000011 				CMP	R2,#11				; DIGIT,*				0592
000034	003403 					BLE	3$
000036	012700  177777 			2$:	MOV	#-1,R0				;					0593
000042	000207 					RTS	PC
000044	010001 				3$:	MOV	R0,R1				; VALUE,*				0594
000046	070127  000012 				MUL	#12,R1
000052	060201 					ADD	R2,R1				; DIGIT,*
000054	010100 					MOV	R1,R0				; *,VALUE
000056	005204 				4$:	INC	R4				; I					0587
000060	020466  000014 				CMP	R4,14(SP)			; I,LEN
000064	003754 					BLE	1$
000066	000207 					RTS	PC				;					0542

; Routine Size:  28 words,	Routine Base:  $CODE$ + 0330
; Maximum stack depth per invocation:  6 words
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  14
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (8)

;	  0599	
;	  0600	global
;	  0601	routine CBTD (PTR_ADDR,NUM) =
;	  0602	
;	  0603	!++
;	  0604	! FUNCTIONAL DESCRIPTION:
;	  0605	!
;	  0606	! This routine, which is a short replacement for the -11S one,
;	  0607	! converts a number to decimal ASCII characters. At least one
;	  0608	! character will always be written; the number 0 will come out
;	  0609	! as '0'.
;	  0610	!
;	  0611	! FORMAL PARAMETERS
;	  0612	!
;	  0613	!	PTR_ADDR	Address of a pointer to the area where the
;	  0614	!			number is to be expanded.  The pointer will
;	  0615	!			be updated to point past the expanded number.
;	  0616	!
;	  0617	!	NUM		The number to be expanded.  The number will be
;	  0618	!			treated as unsigned.
;	  0619	!
;	  0620	! IMPLICIT INPUTS
;	  0621	!
;	  0622	!	NONE.
;	  0623	!
;	  0624	! ROUTINE VALUE:  The number of characters written (1-6).
;	  0625	! COMPLETION CODES:
;	  0626	!
;	  0627	!	NONE.
;	  0628	!
;	  0629	! SIDE EFFECTS:
;	  0630	!
;	  0631	!	NONE.
;	  0632	!
;	  0633	!--
;	  0634	
;	  0635	begin
;	  0636	local CHR,CNT;
;	  0637	CHR=(.NUM mod 10)+%c'0';
;	  0638	if .NUM gtr 9
;	  0639	then CNT=CBTD(.PTR_ADDR,.NUM/10)
;	  0640	else CNT=0;
;	  0641	ch$wchar_a (.CHR,.PTR_ADDR);
;	  0642	.CNT+1
;	  0643	end;				!End of CBTD


						.SBTTL	CBTD
000000	004167  000000G			CBTD::	JSR	R1,$SAVE3			;					0601
000004	016602  000012 				MOV	12(SP),R2			; NUM,*					0637
000010	010201 					MOV	R2,R1
000012	006700 					SXT	R0
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  15
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (8)

000014	071027  000012 				DIV	#12,R0
000020	010103 					MOV	R1,R3				; *,CHR
000022	062703  000060 				ADD	#60,R3				; *,CHR
000026	020227  000011 				CMP	R2,#11				;					0638
000032	003413 					BLE	1$
000034	016646  000014 				MOV	14(SP),-(SP)			; PTR.ADDR,*				0639
000040	010201 					MOV	R2,R1
000042	006700 					SXT	R0
000044	071027  000012 				DIV	#12,R0
000050	010046 					MOV	R0,-(SP)
000052	004767  177722 				JSR	PC,CBTD
000056	022626 					CMP	(SP)+,(SP)+
000060	000401 					BR	2$				;					0638
000062	005000 				1$:	CLR	R0				; CNT					0640
000064	017601  000014 			2$:	MOV	@14(SP),R1			; PTR.ADDR,*				0641
000070	110311 					MOVB	R3,(R1)				; CHR,*
000072	005276  000014 				INC	@14(SP)				; PTR.ADDR
000076	005200 					INC	R0				; CNT					0642
000100	000207 					RTS	PC				;					0601

; Routine Size:  33 words,	Routine Base:  $CODE$ + 0420
; Maximum stack depth per invocation:  7 words
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  16
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (9)

;	  0644	
;	  0645	%IF %VARIANT NEQ 0 %THEN
;	  0646	global
;	  0647	routine CHKBUF: novalue =
;	  0648	
;	  0649	!++
;	  0650	! FUNCTIONAL DESCRIPTION:
;	  0651	!
;	  0652	! Does a check for lost buffers, by:
;	  0653	!	1) calculating the number of buffers outstanding from all other
;	  0654	!	   processes to Transport; and
;	  0655	!	2) subtracting the number of buffers outstanding from Transport
;	  0656	!	   to all other processes.
;	  0657	! If this number is not 0, there is a buffer missing somewhere.
;	  0658	!
;	  0659	! FORMAL PARAMETERS
;	  0660	!
;	  0661	!	NONE.
;	  0662	!
;	  0663	! IMPLICIT INPUTS
;	  0664	!
;	  0665	!	The following quotas and counters:
;	  0666	!
;	  0667	!		INPUTquota	$INPQ
;	  0668	!		ECLquota	$ECLQ
;	  0669	!		LINEquota	$LINQ
;	  0670	!		INPUTcount
;	  0671	!		REqueue_count
;	  0672	!
;	  0673	! ROUTINE VALUE:
;	  0674	! COMPLETION CODES:
;	  0675	!
;	  0676	!	NONE.
;	  0677	!
;	  0678	! SIDE EFFECTS:
;	  0679	!
;	  0680	!	Blows up the system if the buffer check fails.
;	  0681	!
;	  0682	!--
;	  0683	
;	  0684	begin
;	  0685	
;	  0686	local LINEb;
;	  0687	require 'XPTSYM';
;	  0724	local LC,COUNT: signed;
;	  0725	bind Q = max(($LINQ/(if NLN lss 3 then 1 else if NLN lss 7 then 2 else 3)),1);
;	  0726	
;	  0727	COUNT =   ($INPQ - .INPUTquota)			! Buffers in from ECL
;	  0728		- (LC = 0;
;	  0729		   decr I from NLN to 1 do begin	
;	  0730		     LINEb = $XPT_GET_LINE_DB(.I);	! For each line:
;	  0731		     LC = .LC + (Q - .LINEquota);	!   Buffers out to line
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  17
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (9)

;	  0732		     LC = .LC - .INPUTcount;		!   Buffers in from line
;	  0733		     end;
;	  0734		   .LC)
;	  0735		- ($ECLQ - .ECLquota);			! Buffers out to ECL
;	  0736	
;	  0737	if .COUNT neq 0 then				! Oops...
;	  0738	    SIGNAL_STOP(XPT$_BUF,.COUNT);
;	  0739	
;	  0740	end;				!End of CHKBUF


						.SBTTL	CHKBUF
000000	004167  000000G			CHKBUF::
					U.5:	JSR	R1,$SAVE5			;					0647
000004	005746 					TST	-(SP)
000006	016703  000002G				MOV	.CRDAT+2,R3			;					0725
000012	016305  000022 				MOV	22(R3),R5
000016	020527  000003 				CMP	R5,#3
000022	002003 					BGE	1$
000024	012702  000001 				MOV	#1,R2
000030	000411 					BR	4$
000032	020527  000007 			1$:	CMP	R5,#7
000036	002003 					BGE	2$
000040	012700  000002 				MOV	#2,R0
000044	000402 					BR	3$
000046	012700  000003 			2$:	MOV	#3,R0
000052	010002 				3$:	MOV	R0,R2
000054	005001 				4$:	CLR	R1
000056	156301  000034 				BISB	34(R3),R1
000062	005000 					CLR	R0
000064	071002 					DIV	R2,R0
000066	010004 					MOV	R0,R4
000070	003002 					BGT	5$
000072	012704  000001 				MOV	#1,R4
000076	116301  000104 			5$:	MOVB	104(R3),R1			;					0727
000102	005000 					CLR	R0
000104	156300  000103 				BISB	103(R3),R0
000110	160100 					SUB	R1,R0
000112	010016 					MOV	R0,(SP)
000114	005002 					CLR	R2				; LC					0728
000116	005705 					TST	R5				; I					0729
000120	003417 					BLE	7$
000122	010500 				6$:	MOV	R5,R0				; I,*					0730
000124	004767  000000G				JSR	PC,GTLINE
000130	010003 					MOV	R0,R3				; *,LINEB
000132	116300  000036 				MOVB	36(R3),R0			; *(LINEB),*				0731
000136	010401 					MOV	R4,R1
000140	160001 					SUB	R0,R1
000142	060201 					ADD	R2,R1				; LC,*
000144	010102 					MOV	R1,R2				; *,LC
000146	005000 					CLR	R0				;					0732
000150	156300  000043 				BISB	43(R3),R0			; *(LINEB),*
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  18
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (9)

000154	160002 					SUB	R0,R2				; *,LC
000156	077517 					SOB	R5,6$				; I,*					0000
000160	160216 				7$:	SUB	R2,(SP)				; LC,*					0728
000162	016701  000002G				MOV	.CRDAT+2,R1			;					0735
000166	010100 					MOV	R1,R0				; XPTDB,*
000170	005002 					CLR	R2
000172	156102  000101 				BISB	101(R1),R2
000176	116000  000102 				MOVB	102(R0),R0
000202	042700  177400 				BIC	#177400,R0
000206	160200 					SUB	R2,R0
000210	060016 					ADD	R0,(SP)
000212	011600 					MOV	(SP),R0				; *,COUNT				0727
000214	001411 					BEQ	8$				;					0737
000216	010046 					MOV	R0,-(SP)			; COUNT,*				0738
000220	012746  100114 				MOV	#-77664,-(SP)
000224	012746  000002 				MOV	#2,-(SP)
000230	004767  000000G				JSR	PC,$STOP
000234	062706  000006 				ADD	#6,SP
000240	005726 				8$:	TST	(SP)+				;					0647
000242	000207 					RTS	PC

; Routine Size:  82 words,	Routine Base:  $CODE$ + 0522
; Maximum stack depth per invocation:  11 words


;	  0741	%FI
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  19
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (10)

;	  0742	
;	  0743	global
;	  0744	routine UNSPAWN(CCB): novalue =
;	  0745	
;	  0746	!++
;	  0747	! FUNCTIONAL DESCRIPTION:
;	  0748	!
;	  0749	! Untangles a CCB spawned by Transport:
;	  0750	!
;	  0751	!	1.  If the CCB has a buffer of its own, release it.
;	  0752	!	2.  If the pass-through CCB (the one the spawned CCB points to)
;	  0753	!	    has had its buffer pointer adjusted, un-adjust it.
;	  0754	!	3.  Release the spawned CCB.
;	  0755	!
;	  0756	! FORMAL PARAMETERS
;	  0757	!
;	  0758	!	CCB	Address of the spawned CCB.
;	  0759	!
;	  0760	! IMPLICIT INPUTS
;	  0761	!
;	  0762	!	NONE.
;	  0763	!
;	  0764	! ROUTINE VALUE:
;	  0765	! COMPLETION CODES:
;	  0766	!
;	  0767	!	NONE.
;	  0768	!
;	  0769	! SIDE EFFECTS:
;	  0770	!
;	  0771	!	NONE.
;	  0772	!
;	  0773	!--
;	  0774	
;	  0775	begin
;	  0776	
;	  0777	map CCB: ref block field(C_XPT_fields);
;	  0778	bind CCB_P = .CCB[C_STK]: block field(C_fields);
;	  0779	local ADJ;
;	  0780	
;	  0781	if ((ADJ=.CCB[C_XPT_ADJUST]) neq 0) then begin  ! Nonzero adjustment factor:
;	  0782	    CCB_P[C_ADDR] = ch$plus(.CCB_P[C_ADDR],-.ADJ); !   readjust pass-through
;	  0783	    CCB_P[C_CNT] = .CCB_P[C_CNT] + .ADJ;	   !   buffer descriptor
;	  0784	    end;
;	  0785	if ((.CCB[C_CHN] neq 0)			! If the spawned CCB
;	  0786	and (.CCB[C_BIAS] neq 0)) then		!   has an SDB of
;	P 0787	    $MCB_RETURN_CCB_AND_BUFFER		!   its own, release
;	  0788		(.CCB[C_XPT_ALLOCATION],.CCB)	!   them both
;	  0789	else $MCB_RETURN_CCB(.CCB);		! Otherwise, just release the CCB
;	  0790	
;	  0791	end;				!End of UNSPAWN
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  20
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (10)

						.GLOBL	$CBBRT, $CCBRT


						.SBTTL	UNSPAWN
000000	004167  000000G			UNSPAWN::
						JSR	R1,$SAVE4			;					0744
000004	016604  000014 				MOV	14(SP),R4			; CCB,*					0778
000010	116400  000033 				MOVB	33(R4),R0			; *,ADJ					0781
000014	001406 					BEQ	1$
000016	016401  000004 				MOV	4(R4),R1			;					0782
000022	160061  000020 				SUB	R0,20(R1)			; ADJ,*
000026	060061  000022 				ADD	R0,22(R1)			; ADJ,*					0783
000032	005764  000002 			1$:	TST	2(R4)				;					0785
000036	001410 					BEQ	2$
000040	005764  000016 				TST	16(R4)				;					0786
000044	001405 					BEQ	2$
000046	016401  000034 				MOV	34(R4),R1			;					0788
000052	004767  000000G				JSR	PC,$CBBRT
000056	000207 					RTS	PC				;					0785
000060	004767  000000G			2$:	JSR	PC,$CCBRT			;					0789
000064	000207 					RTS	PC				;					0744

; Routine Size:  27 words,	Routine Base:  $CODE$ + 0766
; Maximum stack depth per invocation:  6 words


;	  0792	
;	  0793	end				!End of module XPT16
;	  0794	eludom



;					OTS external references
						.GLOBL	$SAVE5, $SAVE4, $SAVE3, $STOP


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 XPTJMP				    4	    RO ,  I  ,  LCL,  REL,  CON
;	 $CODE$				  278	    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        26         6         0
XPT16								25-Jan-1983 09:55:02	TOPS-20 Bliss-16 2A(530)	    Page  21
X01150								30-Dec-1982 21:23:04	NETPKG:<XPT>XPT16.B16.8 (10)

;  NETPKG:<MCB>NMXLIB.L16.13		       200         0         0         0
;  NETPKG:<XPT>XPTLIB.L16.3		       510       165        32         0





; Size:		278 code + 4 data words
; Run Time:	00:06.6
; Elapsed Time:	00:24.4
; Memory Used:	32 pages
; Compilation Complete
ADDRESS				 152+	 154+	 155+	 157+	 158+	 160+	 161+	 167+	 168+	 171+	 172+	 173+
ADJ				 779	 781#	 782	 783
BPT				 181+#	 193+#
BUFCHK				 185+	 186+#	 195+	 196+#
BUF_PTR				 542	 580
CALL$				 206	 207	 394#	 430#
CBTD				 601*	 639
CCB				 494	 499#	 500	 501	 536	 537#	 744	 777	 778	 781	 785	 786
				 788	 789
CCB_P				 778#	 782#	 783#
CDTB				 542*
CHKBUF				 188+*	 189+	 208	 647*
CHR				 636	 637#	 641
CNT				 636	 639#	 640#	 642
COUNT				 724	 727#	 737	 738
C_ADDR				 501	 536	 782
C_BIAS				 500	 786
C_CHN				 785
C_CNT				 537	 783
C_FIELDS			 494	 778
C_STK				 778
C_XPT_ADJUST			 781
C_XPT_ALLOCATION		 788
C_XPT_FIELDS			 777
DBADDR				 394	 422	 425#	 426#
DIGIT				 589	 590#	 591	 592	 594
ECLQUOTA			 735
GETB				 590
GETQ				 152+#
GETTOP				 229
GETW				 131+#	 154+	 155+
GETXDB				 228
GET_XPTDB			 206	 228	 394*
I				 176+	 178+	 587	 729	 730
INPUTCOUNT			 732
INPUTQUOTA			 727
J				 176+	 178+
JUMP_TO				 222#	 228	 229	 231
LC				 724	 728#	 731#	 732#	 734
LEN				 542	 587
LINE				 238	 304#	 305	 308#	 309
LINEBLOCK			 293+	 371+	 483+	 714+
LINEB				 291+	 293+	 369+	 371+	 481+	 483+	 686	 712+	 714+	 730#
LINELENGTH			 308
LINEQUOTA			 731
M				 176+	 177+
MAP$				 500
MATRIX				 176+#	 178+
MCB$GAW_PROCESS_DATA_BASE	 296+	 297+	 300+	 374+	 375+	 378+	 423	 425	 426	 486+	 487+	 490+
				 717+	 718+	 721+
N				 176+	 177+
NL				 176+	 178+
NLN				 305	 725	 729
NN				 383	 503
NODE				 316	 382#	 383	 386#	 387
NODEBLOCK			 288+	 366+	 478+	 495	 709+
NODEB				 286+	 288+	 364+	 366+	 476+	 478+	 495	 502#	 526#	 707+	 709+
NODELENGTH			 386
NODEN				 496	 506#	 511#	 521	 528	 530	 532#
NODESIZE			 526
NODES				 493	 503#	 504	 505	 528
NOP				 193+	 194+	 196+
NO_LINEB			 292+	 370+	 482+	 713+
NO_NODEB			 287+	 365+	 477+	 708+
NUM				 601	 637	 638	 639
P				 578	 580#	 590
PHASE2_NODE			 516
POINTER				 497	 578
PTR				 131+	 134+	 135+	 138+	 141+	 142+	 148+	 149+	 152+	 154+	 155+	 157+
				 160+	 161+	 162+	 163+	 167+	 168+	 497	 501#	 504	 505	 523	 533
				 536#	 537
PTR_ADDR			 601	 639	 641
PUTQ				 157+#
PUTW				 138+#	 167+	 168+
Q				 725#	 731
REACH				 513
TOPOLOGY			 207	 229	 430*
TRUE				 538
TYPE				 510	 512#	 515#	 517#	 519
UNIT				 176+#	 177+	 178+
UNSPAWN				 744*
VALUE				 138+	 139+	 141+	 142+	 147+	 577	 581#	 594#	 597
WORK				 496	 507#	 519#	 520#	 523	 524#	 532#	 533
X				 133+	 134+#	 135+#	 136+	 146+	 147+#	 148+	 149+
XPT$GET_LINE_DB			 204	 238*
XPT$GET_NODE_DB			 205	 316*
XPT$LKG_NUM			 204	 205	 238#	 316#
XPT$_BUF			 738
XPT16				   1#
XPTDBBLOCK			 302+	 380+	 492+	 723+
XPTDB				 299+	 300+#	 301+	 309	 377+	 378+#	 379+	 387	 489+	 490+#	 491+	 502
				 720+	 721+#	 722+
XPTJMP				 225
XPTLINDB			 309
XPTNODDB			 387	 502
ZEROQ				 171+#
_CCB				 430	 499
$ECLQ				 735
$INPQ				 727
$LINQ				 725
$MCB_RETURN_CCB_AND_BUFFER	 787
$MCB_RETURN_CCB			 789
$XPT_GET_LINE_DB		 730
%CTCE				 139+	 158+
%REMAINING			 183+