Google
 

Trailing-Edge - PDP-10 Archives - BB-R598A-RM_1983 - swskit-v3/listings/xpt/tlilin.list
There are no other files named tlilin.list in the archive.
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   1
								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0001	module TLILIN	(
;	  0002			IDENT = 'X01640'
;	  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	!	Line Support module for Transport Line Interface: handles all
;	  0033	!	changes in circuit state, brings circuit up and down.
;	  0034	!
;	  0035	! ENVIRONMENT:	MCB
;	  0036	!
;	  0037	! AUTHOR: L. Webber , CREATION DATE: 23-Jul-79
;	  0038	!
;	  0039	! MODIFIED BY:
;	  0040	!
;	  0041	!	L. Webber, 23-Jul-79 : VERSION 01
;	  0042	!
;	  0043	! 1.01	26-Oct-79, L. Webber
;	  0044	!	Modified to allocate all its own buffers
;	  0045	!
;	  0046	! 1.02	19-Dec-79, L. Webber
;	  0047	!	Modifications to break out Transport Line Interface into its
;	  0048	!	own process
;	  0049	!
;	  0050	! 1.03	3-Jan-80, L. Webber
;	  0051	!	Remove the OT state
;	  0052	!
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   2
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0053	! 1.04	2-Apr-80, L. Webber
;	  0054	!	Modify to support node and line sub-data-bases
;	  0055	!
;	  0056	! 1.05	16-May-80, L. Webber
;	  0057	!	Convert LIX to/from line index
;	  0058	!
;	  0059	! 1.06	30-Jun-80, L. Webber
;	  0060	!	Modify to use MCBLIB macros
;	  0061	!
;	  0062	! 1.07	A. Peckham, 15-Oct-80
;	  0063	!	Update to use new function modifiers.
;	  0064	!
;	  0065	! 1.08  L. Webber, 20-Nov-80
;	  0066	!	Put in DTE detection for TOPS-20 adjacent nodes.
;	  0067	!
;	  0068	! 1.09	L. Webber, 11-Dec-80
;	  0069	!	Modify to support MCB 3.1
;	  0070	!
;	  0071	! 1.10	L. Webber, 12-Jan-80
;	  0072	!	Make INI_LIN and TERM_LIN linkages CALL$; return Network
;	  0073	!	Management codes for the two functions.
;	  0074	!
;	  0075	! 1.11	L. Webber, 27-Feb-81
;	  0076	!	Fix bug in TI processing: if a bad message is received, return
;	  0077	!	the message to the DLL.
;	  0078	!
;	  0079	! 1.12	L. Webber, 17-Mar-81
;	  0080	!	Make all fetch references to LINEstate UNSAFE, so that they
;	  0081	!	always cause the data base to be re-referenced.
;	  0082	!
;	  0083	! 1.13	L. Webber, 26-Mar-81
;	  0084	!	Put Phase II DLL block size into Node Init; make segment size the
;	  0085	!	same.
;	  0086	!
;	  0087	! 1.14	L. Webber, 27-Mar-81
;	  0088	!	Add reason code to event logging data
;	  0089	!
;	  0090	! 1.15	L. Webber, 1-Apr-81
;	  0091	!	Fix LINE_FAIL linkage to include modifier; this is only necessary
;	  0092	!	to humor the Test Bed, and adds no code.
;	  0093	!
;	  0094	! 1.16	L. Webber, 1-Apr-81
;	  0095	!	Fix so that RCV_TI and RCV_OTI reject initialization on remote
;	  0096	!	blksize LARGER than local, not smaller.
;	  0097	!
;	  0098	! 1.17	L. Webber, 6-Apr-81
;	  0099	!	Add code for initialization timer.
;	  0100	!
;	  0101	! 1.18	L. Webber, 10-Apr-81
;	  0102	!	Release node ID block on line down (for Phase II nodes).
;	  0103	!
;	  0104	! 1.19	L. Webber, 13-Apr-81
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   3
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0105	!	Fix mapping bug in RCV_OTI
;	  0106	!
;	  0107	! 1.20	L. Webber, 1-May-81
;	  0108	!	Fix LINTIM to put LIX into CCB gotten and dispatched.
;	  0109	!
;	  0110	! 1.21	L. Webber, 27-May-81
;	  0111	!	Modify to support the new DLL Interface.  This is a major modification.
;	  0112	!	Some of the changes involved are:
;	  0113	!
;	  0114	!	o  The $DLL_REQUEST_CIRCUIT and $DLL_RELEASE_CIRCUIT functions to
;	  0115	!	   the DLL have been introduced.  These functions are queued functions
;	  0116	!	   (they use CCBs).
;	  0117	!	o  "Start" and "stop" have been replaced by $DLL_INITIALIZE and
;	  0118	!	   $DLL_STOP.  These functions are queued functions.
;	  0119	!	o  Because it is not necessary to stop a running circuit before doing
;	  0120	!	   a $DLL_INITIALIZE, the DP state has been eliminated.
;	  0121	!	o  TLI now monitors the DLL circuit state by means of state change AST
;	  0122	!	   CCBs from the DLL.  These state changes trigger many of the
;	  0123	!	   Transport line events once triggered by CCB completions.
;	  0124	!	o  The circuit identification over the DLL Interface has been simpli-
;	  0125	!	   fied.  The circuit is always identified to the DLL by "provider
;	  0126	!	   PIX"; this quantity is set in LINEindex by the Network Management
;	  0127	!	   code prior to TLI being invoked.  The Transport identification for
;	  0128	!	   the circuit, the index of the circuit's entry in the line data base,
;	  0129	!	   is passed to the DLL by $DLL_REQUEST_CIRCUIT and to Network Manage-
;	  0130	!	   ment by the Transport Network Management code; any subsequent calls
;	  0131	!	   to Transport about the circuit uses the Transport ID.  LIXxlate has
;	  0132	!	   been eliminated.  The index of a circuit's data base entry may be
;	  0133	!	   found in the LINEnumber field in the entry.
;	  0134	!
;	  0135	! 1.22	L. Webber, 27-May-81
;	  0136	!	Fix LINEDN so that a running line that goes down loses its node type
;	  0137	!	immediately.
;	  0138	!
;	  0139	! 1.23	L. Webber, 28-May-81
;	  0140	!	Put a canned password in the send OTV code.
;	  0141	!
;	  0142	! 1.24	L. Webber, 1-Jun-81
;	  0143	!	Modify all LOG_EVENT calls to pass the NMXid.
;	  0144	!
;	  0145	! 1.25	L. Webber, 3-Jun-81
;	  0146	!	Zero out link field when CCB_CMP removes a CCB from LINEccb.
;	  0147	!
;	  0148	! 1.26	L. Webber, 19-Jun-81
;	  0149	!	When a REQUEST_CIRCUIT completes, do a LINE_EVENT with the returned
;	  0150	!	status.
;	  0151	!
;	  0152	! 1.27	L. Webber, 22-Jun-81
;	  0153	!	Fix bug in REQ_COMPLETE which was saving the returned CCB in LINEevent
;	  0154	!	without noticing there was already one there.
;	  0155	!
;	  0156	! 1.28	L. Webber, 22-Jun-81
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   4
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0157	!	Change all $DLRCE's to straight $MCB_SCHEDULE_CCB's
;	  0158	!
;	  0159	! 1.29	L. Webber, 30-Jun-81
;	  0160	!	Fix REQUEST_CIRCUIT to get the provider PIX out of the line data base,
;	  0161	!	not the function CCB.
;	  0162	!
;	  0163	! 1.30	L. Webber, 23-Jul-81
;	  0164	!	Fix LINE_EVENT and REQUEST_CIRCUIT to distinguish whether the circuit
;	  0165	!	is ON or OFF.
;	  0166	!
;	  0167	! 1.31	L. Webber, 3-Aug-81
;	  0168	!	Fix resource retry for FUNCreini to bring the line down if it is
;	  0169	!	running.
;	  0170	!
;	  0171	! 1.32	L. Webber, 5-Aug-81
;	  0172	!	Fix LINE_EVENT so that two successive RUNNING state notifications
;	  0173	!	won't cause a SIGNAL_STOP.
;	  0174	!
;	  0175	! 1.33	L. Webber, 12-Aug-81
;	  0176	!	Finish up fix 1.32; a RUNNING can even occur in DT state.
;	  0177	!
;	  0178	! 1.34	L. Webber, 12-Aug-81
;	  0179	!	Fix LINE_EVENT so that it logs events on transient/persistent errors
;	  0180	!	UNLESS it's an entry to MOP, not IF.
;	  0181	!
;	  0182	! 1.35	L. Webber, 19-Aug-81
;	  0183	!	Fix LINE_EVENT so that a state transition to SYNCHRONIZING or RUNNING
;	  0184	!	causes a $DLL_STOP to be (re-)issued.
;	  0185	!
;	  0186	! 1.36	L. Webber, 20-Aug-81
;	  0187	!	Fix LINE_EVENT not to change the line state on a transient error, but
;	  0188	!	to wait for the DLL state change notification.
;	  0189	!
;	  0190	! 1.37	L. Webber, 20-Aug-81
;	  0191	!	Fix SEND_TV to put in the (null) function value.
;	  0192	!
;	  0193	! 1.38	L. Webber, 8-Sep-81
;	  0194	!	Fix REQ_COMPLETE not to initialize the circuit unless Network
;	  0195	!	Management has set it ON.
;	  0196	!
;	  0197	! 1.39	L. Webber, 10-Sep-81
;	  0198	!	Fix INI_LIN always to set the circuit state to DS when it wants to
;	  0199	!	initialize the circuit, even if it can't get the buffer to do the
;	  0200	!	initialization.  This allows the circuit to be brought up with only
;	  0201	!	one buffer.
;	  0202	!
;	  0203	! 1.40	L. Webber, 11-Sep-81
;	  0204	!	Create the macro SAVSDB, which normally would just put a buffer
;	  0205	!	address into LINEevent.  Currently, because of scarceness of buffers,
;	  0206	!	it releases the buffer.
;	  0207	!
;	  0208	! 1.41	L. Webber, 15-Sep-81
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   5
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0209	!	Fix RCV_OTI so that it doesn't clear LINEevent when LINEevent contains
;	  0210	!	a restart code.
;	  0211	!
;	  0212	! 1.42	A. Peckham, 21-Sep-81
;	  0213	!	Change transient and persistent error response strategy in LINE_EVENT.
;	  0214	!
;	  0215	! 1.43	L. Webber, 24-Sep-81
;	  0216	!	Modify event logging to use new macros for building the event buffer.
;	  0217	!
;	  0218	! 1.44	L. Webber, 2-Oct-81
;	  0219	!	Fix transient error processing so that, when it reinitializes the
;	  0220	!	circuit, it sets the state to DS.
;	  0221	!
;	  0222	! 1.45	A. Peckham, 6-Oct-81
;	  0223	!	Only re-initialize line on WARNING status codes in LINE_EVENT.
;	  0224	!
;	  0225	! 1.46	L. Webber, 20-Oct-81
;	  0226	!	Add a "Reset" line flag to communicate to Decision that a circuit being
;	  0227	!	taken down had a Phase II node adjacent.  This is because it is
;	  0228	!	necessary to zero out the node type immediately.
;	  0229	!
;	  0230	! 1.47	L. Webber, 28-Oct-81
;	  0231	!	Fix the transient/permanent error processing to declare a running
;	  0232	!	circuit down instead of just restarting it.
;	  0233	!
;	  0234	! 1.48	L. Webber, 29-Oct-81
;	  0235	!	Add code to "pause" a circuit for a few seconds after bringing it
;	  0236	!	down, before bringing it back up or closing it down for good.
;	  0237	!
;	  0238	! 1.49	L. Webber, 4-Nov-81
;	  0239	!	Fix dot bug in 1.48.
;	  0240	!
;	  0241	! 1.50	L. Webber, 5-Nov-81
;	  0242	!	Take out 1.48; it didn't help anything.
;	  0243	!
;	  0244	! 1.51	L. Webber, 4-Jan-82
;	  0245	!	Release the CTL/STP CCB when it comes back from the provider in
;	  0246	!	    REL_CMP.
;	  0247	!	Zero out FNC/MOD in CCB GETCCB gets (for debugging).
;	  0248	!
;	  0249	! 1.52	L. Webber, 12-Jan-82
;	  0250	!	Fix a dot bug in RCV_TV.
;	  0251	!
;	  0252	! 1.53	L. Webber, 12-Mar-82
;	  0253	!	Fix RCV_TI to get a CCB to declare the circut up, rather than waiting
;	  0254	!	for the TI transmit to complete (it may already have done so).
;	  0255	!
;	  0256	! 1.54	L. Webber, 22-Mar-82
;	  0257	!	Add support for the Ph2Circuit circuit type.  This circuit will only
;	  0258	!	talk to Phase II nodes.
;	  0259	!
;	  0260	! 1.55	A. Peckham, 19-Apr-82
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   6
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (1)

;	  0261	!	Eliminate references to LOG_EVENT, GETLINE.
;	  0262	!       Work on INILIN to count down its own timers.
;	  0263	!
;	  0264	! 1.56	A. Peckham, 6-May-82
;	  0265	!	Eliminate references to RLS_BLK, GET_BLK.
;	  0266	!
;	  0267	! 1.57	A. Peckham, 2-Jul-82
;	  0268	!	Rework line handling.
;	  0269	!       Add false node-init code, but do not enable.
;	  0270	!
;	  0271	! 1.58	A. Peckham, 6-Jul-82
;	  0272	!	Utilize new XPT data base for initialization passwords.
;	  0273	!
;	  0274	! 1.59	A. Peckham, 8-Jul-82
;	  0275	!       Start initialization clock after TI is transmitted, instead of
;	  0276	!	DLL_RUNNING transition.  More work on password data base.
;	  0277	!       Rename RCV_OTI to RCV_NI.
;	  0278	!
;	  0279	! 1.60	A. Peckham, 23-Aug-82
;	  0280	!       Fix bug in RCV_NI which caused the DN20 to recognize only KLs
;	  0281	!       with even node numbers.  On the node number, bit 0 instead of bit 7
;	  0282	!       was being tested for the node number extension.
;	  0283	!
;	  0284	! 1.61	A. Peckham, 10-Sep-82
;	  0285	!       Add mechanism for getting initial circuit cost from DLL layer:
;	  0286	!         LINRVR: Zero out C_PRM1 before sending $DLL_REQUEST_CIRCUIT.
;	  0287	!         CCPSTR: If Lcv is zero, move C_PRM1 to Lcv, and if that is zero,
;	  0288	!                 set it to one.
;	  0289	!
;	  0290	! 1.62	A. Peckham, 13-Sep-82
;	  0291	!       Maintain Block_size in RCV_NI and RCV_TI.
;	  0292	!
;	  0293	! 1.63	A. Peckham,  4-Oct-82
;	  0294	!       Do not check user-ECO field of TI message in RCV_TI.
;	  0295	!
;	  0296	! 1.64	A. Peckham,  5-Dec-82
;	  0297	!       Acomodate RSX bug in RCV_TI by not verifying full TI length.
;	  0298	!
;	  0299	!--
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   7
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (2)

;	  0300	
;	  0301	!
;	  0302	! INCLUDE FILES:
;	  0303	!
;	  0304	
;	  0305	require 'XPTMAC';
;	  0403	
;	  0404	!
;	  0405	! TABLE OF CONTENTS
;	  0406	!
;	L 0407	%if %bliss(bliss16)
;	  0408	%then linkage TLI_LKG_LINEb_CCB = jsr (register = 5, register = 4),
;	  0409	              TLI_LKG_LINEb_FNC = jsr (register = 5, register = 0);
;	U 0410	%else macro TLI_LKG_LINEb_CCB = bliss36c %,
;	U 0411	            TLI_LKG_LINEb_FNC = bliss36c %;
;	  0412	%fi
;	  0413	
;	  0414	forward routine
;	  0415	    BAD_MSG: LINKAGE_DB_CCB novalue,
;	  0416	    CCB_CMP: LINKAGE_DB novalue,
;	  0417	    CCPSTP: MCB_DB_CCB novalue,
;	  0418	    CCPSTR: MCB_DB_CCB novalue,
;	  0419	    CIRCUIT_DOWN: LINKAGE_DB novalue,
;	  0420	    CIRCUIT_STATE: LINKAGE_DB_CCB novalue,
;	  0421	    CIRCUIT_UP: LINKAGE_DB novalue,
;	  0422	    CKTOFF: LINKAGE_DB_CCB novalue,
;	  0423	    CKTON: LINKAGE_DB_CCB novalue,
;	  0424	    GET_FALSE_NI: LINKAGE_DB_CCB novalue,
;	  0425	    GET_PWDb,
;	  0426	    INI_LIN: CALL$ novalue,
;	  0427	    LD_CMP: MCB_DB_CCB novalue,
;	  0428	    LINRVR: LINKAGE_DB novalue,
;	  0429	    LOG_PACKET_HEADER: LINKAGE_DB_CCB novalue,
;	  0430	    LU_CMP: MCB_DB_CCB novalue,
;	  0431	    NEW_FUNCTION: TLI_LKG_LINEb_FNC novalue,
;	  0432	    NEW_STATE: TLI_LKG_LINEb_FNC novalue,
;	  0433	    NEXT_ACTION: LINKAGE_DB novalue,
;	  0434	    NEXT_STATE: TLI_LKG_LINEb_FNC novalue,
;	  0435	    RCV_HLO: LINKAGE_DB_CCB novalue,
;	  0436	    RCV_NI: LINKAGE_DB_CCB novalue,
;	  0437	    RCV_NV: LINKAGE_DB_CCB novalue,
;	  0438	    RCV_TI: LINKAGE_DB_CCB novalue,
;	  0439	    RCV_TV: LINKAGE_DB_CCB novalue,
;	  0440	    TERM_LIN: CALL$ novalue,
;	  0441	    TLIAST: LINKAGE_DB_CCB_MOD novalue,
;	  0442	    XCPDAT: MCB_DB_CCB novalue,
;	  0443	    XCPINI: MCB_DB_CCB novalue,
;	  0444	    XCPSTP: MCB_DB_CCB novalue;
;	  0445	
;	  0446	!
;	  0447	! MACROS:
;	  0448	!
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   8
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (2)

;	  0449	
;	M 0450	macro RAD50(NAME) =
;	M 0451	    %IF %BLISS(BLISS16) %THEN %rad50_11
;	M 0452	    %ELSE %IF %BLISS(BLISS36) %THEN %rad50_10
;	M 0453	    %FI %FI
;	  0454	    %string(NAME) %;
;	  0455	
;	  0456	!
;	  0457	! EQUATED SYMBOLS:
;	  0458	!
;	  0459	
;	  0460	!
;	  0461	! OWN STORAGE:
;	  0462	!
;	  0463	
;	  0464	!
;	  0465	! EXTERNAL REFERENCES:
;	  0466	!
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page   9
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

;	  0467	global routine BAD_MSG (LINEb,CCB,CODE): LINKAGE_DB_CCB novalue =
;	  0468	
;	  0469	!++
;	  0470	! FUNCTIONAL DESCRIPTION:
;	  0471	!
;	  0472	!  Processes an invalid message.  In any part of the initialization
;	  0473	!  sequence where the DLL has been started, this event will cause the
;	  0474	!  initialization sequence to be restarted (or started from the RU state).
;	  0475	!  In the rest of the initialization sequence and all of the termination
;	  0476	!  sequence, the event is ignored.
;	  0477	!
;	  0478	! FORMAL PARAMETERS
;	  0479	!
;	  0480	!	LINEb	Address of data base entry for the circuit over which the
;	  0481	!		bad message was received
;	  0482	!
;	  0483	!       CCB	CCB pointing to bad message.  This parameter is
;	  0484	!		meaningful for reason codes 1-8.
;	  0485	!
;	  0486	!	CODE	Reason message is bad:
;	  0487	!
;	  0488	!		0	None of this routine's business
;	  0489	!		1	Unexpected TI or TV when circuit is up
;	  0490	!		2	Unexpected message during initialization
;	  0491	!		3	Version skew
;	  0492	!		4	Out-of-range or invalid node ID
;	  0493	!		5	Invalid remote blocksize
;	  0494	!		6	Invalid verification seed in TI
;	  0495	!		7	Format error
;	  0496	!		8	Verification reject
;	  0497	!               9	Resource failure during initialization
;	  0498	!
;	  0499	! IMPLICIT INPUTS
;	  0500	!
;	  0501	!	LINEstate
;	  0502	!
;	  0503	! ROUTINE VALUE:
;	  0504	! COMPLETION CODES:
;	  0505	!
;	  0506	!	NONE.
;	  0507	!
;	  0508	! SIDE EFFECTS:
;	  0509	!
;	  0510	!	May commence or restart initialization.
;	  0511	!
;	  0512	!--
;	  0513	
;	  0514	begin
;	  0515	map CCB: ref block field(C_XPT_fields);
;	  0516	require 'XPTSYM';
;	  0553	bind REASON = uplit(!	DNA "reason"	CODE parameter
;	  0554	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  10
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

;	  0555				0,		!	0
;	  0556				2,		!	1
;	  0557				2,		!	2
;	  0558				6,		!	3
;	  0559				7,		!	4
;	  0560				8,		!	5
;	  0561				9,		!	6
;	  0562				2,		!	7
;	  0563				0,		!	8
;	  0564				0):		!	9
;	  0565		      vector;
;	  0566	local PTR,RET;
;	  0567	
;	  0568	if .CODE eql 0 then return;
;	  0569	
;	  0570	PTR = .CCB[C_ADDR];
;	  0571	
;	  0572	!
;	  0573	! Log an event
;	  0574	!
;	  0575	
;	  0576	$NM_LOG_BEGIN();
;	  0577	
;	  0578	case .CODE from 1 to 9 of		! Fill event buffer and determine code
;	  0579	set
;	  0580	
;	  0581	[1]:		begin			! Unexpected TI or TV, running circuit:
;	  0582	    RET = 4^6+$XPT$E_LSF;
;	  0583	    COUNTER_INCREMENT(LINEb,XPTlinedn); !   increment circuit failure counter
;	  0584	    LOG_PACKET_HEADER(.LINEb,.CCB);	!   move packet hdr into event buffer
;	  0585	    PARAMETER_C_1(5,REASON[.CODE]);	!   log the reason code
;	  0586			end;
;	  0587	
;	  0588	[2]:		begin			! Unexpected message while initializing
;	  0589	    RET = 4^6+$XPT$E_ISF;
;	  0590	    COUNTER_INCREMENT(LINEb,XPTini_fail);!  increment init. failure counter
;	  0591	    LOG_PACKET_HEADER(.LINEb,.CCB);	!   move packet hdr into event buffer
;	  0592	    PARAMETER_C_1(5,REASON[.CODE]);	!   log the reason code
;	  0593			end;
;	  0594	
;	  0595	[3 to 6]:	begin			! Version skew, out-of-range/invalid
;	  0596	    local VALUE;			! node ID, invalid remote blocksize,
;	  0597	    pointer P;				! or invalid verification seed:
;	  0598	    P = ch$plus(.PTR,6);		!
;	  0599	    RET = 4^6+$XPT$E_IOF;
;	  0600	    COUNTER_INCREMENT(LINEb,XPTini_fail);!  increment init. failure counter,
;	  0601	    LOG_PACKET_HEADER(.LINEb,.CCB);	!   move packet hdr into event buffer
;	  0602	    if .CODE eql 3 then begin		!   packet header
;	  0603		PARAMETER_CM(6,3);		!   and the version
;	  0604		VALUE = getb(P);		!   (if needed)
;	  0605		PARAMETER_DU_1(,VALUE);		!
;	  0606		VALUE = getb(P);
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  11
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

;	  0607		PARAMETER_DU_1(,VALUE);
;	  0608		VALUE = getb(P);
;	  0609		PARAMETER_DU_1(,VALUE);
;	  0610		end;
;	  0611	    PARAMETER_C_1(5,REASON[.CODE]);	!   log the reason code
;	  0612			end;
;	  0613	
;	  0614	[7]:		begin			! Format error:
;	  0615	    RET = 4^6+$XPT$E_FMT;
;	  0616	    COUNTER_INCREMENT(XPTDB,XPTfmt_loss);!  increment format loss counter
;	  0617	    LOG_PACKET_HEADER(.LINEb,.CCB);	!   move packet hdr into event buffer
;	  0618	    PARAMETER_C_1(5,REASON[.CODE]);	!   log the reason code
;	  0619			end;
;	  0620	
;	  0621	[8]:		begin			! Verification reject:
;	  0622	    local VALUE;
;	  0623	    pointer P;
;	  0624	    P = ch$plus(.PTR,1);
;	  0625	    RET = 4^6+$XPT$E_VER;
;	  0626	    COUNTER_INCREMENT(XPTDB,XPTver_rej);!  increment verification counter
;	  0627	    PARAMETER_CM(3,1);			!   and move in
;	  0628	    VALUE = getw(P);			!   the source
;	  0629	    PARAMETER_DU_2(,VALUE);		!   node address
;	  0630			end;
;	  0631	
;	  0632	[9]:		begin			! Resource failure while initializing:
;	  0633	    RET = 4^6+$XPT$E_ISF;
;	  0634	    COUNTER_INCREMENT(LINEb,XPTini_fail);!  increment init. failure counter
;	  0635	    PARAMETER_C_1(5,REASON[.CODE]);	!   log the reason code
;	  0636			end;
;	  0637	
;	  0638	[outrange]:	;
;	  0639	
;	  0640	tes;
;	  0641	$NM_LOG_END(.RET,.NMXid);               ! Log the event
;	  0642	
;	  0643	CALL$L(INI_LIN,.LINEb);                 ! Re-initialize the line
;	  0644	end;				!End of BAD_MSG


						.TITLE	TLILIN
						.IDENT	/X01640/


000000						.PSECT	$PLIT$,  RO ,  D  
000000	000000 				P.AAA:	.WORD	0
000002	000002 					.WORD	2
000004	000002 					.WORD	2
000006	000006 					.WORD	6
000010	000007 					.WORD	7
000012	000010 					.WORD	10
000014	000011 					.WORD	11
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  12
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

000016	000002 					.WORD	2
000020	000000 					.WORD	0
000022	000000 					.WORD	0


						.GLOBL	.CRDAT, $NLBEG, $IC8, $DPC1, $DPCM
						.GLOBL	$TPDU1, $TPDU2, $NLEND


	000000'				; REASON
					U.34=		    P.AAA


						.SBTTL	BAD.MSG
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			BAD.MSG::
					U.1:	JSR	R1,$SAVE5			;					0467
000004	005746 					TST	-(SP)
000006	010546 					MOV	R5,-(SP)
000010	016602  000022 				MOV	22(SP),R2			; CODE,*				0568
000014	001002 					BNE	1$
000016	000167  000424 				JMP	15$
000022	016401  000020 			1$:	MOV	20(R4),R1			; *(CCB),PTR				0570
000026	004767  000000G				JSR	PC,$NLBEG			;					0576
000032	010200 					MOV	R2,R0				;					0578
000034	005300 					DEC	R0
000036	020027  000010 				CMP	R0,#10
000042	101162 					BHI	14$
000044	006300 					ASL	R0
000046	066007  000024'				ADD	P.AAB(R0),PC			; Case dispatch
000052	000556 				2$:	BR	14$
000054	012703  000410 			3$:	MOV	#410,R3				; *,RET					0582
000060	011605 					MOV	(SP),R5				;					0583
000062	062705  000102 				ADD	#102,R5
000066	000405 					BR	5$
000070	012703  000414 			4$:	MOV	#414,R3				; *,RET					0589
000074	011605 					MOV	(SP),R5				;					0590
000076	062705  000103 				ADD	#103,R5
000102	010500 				5$:	MOV	R5,R0
000104	000455 					BR	8$
000106	062701  000006 			6$:	ADD	#6,R1				; *,PTR					0598
000112	012703  000415 				MOV	#415,R3				; *,RET					0599
000116	011605 					MOV	(SP),R5				;					0600
000120	062705  000103 				ADD	#103,R5
000124	010500 					MOV	R5,R0
000126	004767  000000G				JSR	PC,$IC8
000132	011605 					MOV	(SP),R5				;					0601
000134	004767  000000V				JSR	PC,U.15
000140	020227  000003 				CMP	R2,#3				;					0602
000144	001042 					BNE	9$
000146	012746  000006 				MOV	#6,-(SP)			;					0603
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  13
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

000152	012700  000003 				MOV	#3,R0
000156	004767  000000G				JSR	PC,$DPCM
000162	005004 					CLR	R4				; VALUE					0604
000164	152104 					BISB	(R1)+,R4			; P,VALUE
000166	110400 					MOVB	R4,R0				; VALUE,*				0605
000170	004767  000000G				JSR	PC,$TPDU1
000174	005004 					CLR	R4				; VALUE					0606
000176	152104 					BISB	(R1)+,R4			; P,VALUE
000200	110400 					MOVB	R4,R0				; VALUE,*				0607
000202	004767  000000G				JSR	PC,$TPDU1
000206	005004 					CLR	R4				; VALUE					0608
000210	152104 					BISB	(R1)+,R4			; P,VALUE
000212	110400 					MOVB	R4,R0				; VALUE,*				0609
000214	004767  000000G				JSR	PC,$TPDU1
000220	005726 					TST	(SP)+				;					0602
000222	000413 					BR	9$				;					0611
000224	012703  000404 			7$:	MOV	#404,R3				; *,RET					0615
000230	016700  000002G				MOV	.CRDAT+2,R0			;					0616
000234	062700  000133 				ADD	#133,R0
000240	004767  000000G			8$:	JSR	PC,$IC8
000244	011605 					MOV	(SP),R5				;					0617
000246	004767  000000V				JSR	PC,U.15
000252	012746  000005 			9$:	MOV	#5,-(SP)			;					0618
000256	010201 					MOV	R2,R1
000260	006301 					ASL	R1
000262	116100  000000'				MOVB	U.34(R1),R0
000266	000445 					BR	12$
000270	005201 				10$:	INC	R1				; PTR					0624
000272	012703  000406 				MOV	#406,R3				; *,RET					0625
000276	016700  000002G				MOV	.CRDAT+2,R0			;					0626
000302	062700  000135 				ADD	#135,R0
000306	004767  000000G				JSR	PC,$IC8
000312	012746  000003 				MOV	#3,-(SP)			;					0627
000316	012700  000001 				MOV	#1,R0
000322	004767  000000G				JSR	PC,$DPCM
000326	112166  000004 				MOVB	(R1)+,4(SP)			; P,X					0628
000332	112166  000005 				MOVB	(R1)+,5(SP)			; P,X
000336	016600  000004 				MOV	4(SP),R0			; X,VALUE
000342	004767  000000G				JSR	PC,$TPDU2			;					0629
000346	000417 					BR	13$				;					0621
000350	012703  000414 			11$:	MOV	#414,R3				; *,RET					0633
000354	011605 					MOV	(SP),R5				;					0634
000356	062705  000103 				ADD	#103,R5
000362	010500 					MOV	R5,R0
000364	004767  000000G				JSR	PC,$IC8
000370	012746  000005 				MOV	#5,-(SP)			;					0635
000374	006302 					ASL	R2
000376	116200  000000'				MOVB	U.34(R2),R0
000402	004767  000000G			12$:	JSR	PC,$DPC1
000406	005726 				13$:	TST	(SP)+				;					0632
000410	010300 				14$:	MOV	R3,R0				; RET,*					0641
000412	011602 					MOV	(SP),R2
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  14
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (3)

000414	016201  000034 				MOV	34(R2),R1
000420	004767  000000G				JSR	PC,$NLEND
000424	011646 					MOV	(SP),-(SP)			;					0643
000426	012746  000001 				MOV	#1,-(SP)
000432	012746  000000V				MOV	#U.12,-(SP)
000436	004767  000000G				JSR	PC,$CALL
000442	062706  000006 				ADD	#6,SP				;					0514
000446	022626 				15$:	CMP	(SP)+,(SP)+			;					0467
000450	000207 					RTS	PC

; Routine Size:  149 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  12 words


000024						.PSECT	$PLIT$,  RO ,  D  

					P.AAB:						; CASE Table for BAD.MSG+0046		0578
000024	000002 					.WORD	2				; [3$]
000026	000016 					.WORD	16				; [4$]
000030	000034 					.WORD	34				; [6$]
000032	000034 					.WORD	34				; [6$]
000034	000034 					.WORD	34				; [6$]
000036	000034 					.WORD	34				; [6$]
000040	000152 					.WORD	152				; [7$]
000042	000216 					.WORD	216				; [10$]
000044	000276 					.WORD	276				; [11$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  15
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (4)

;	  0645	routine CCB_CMP (LINEb): LINKAGE_DB novalue =
;	  0646	
;	  0647	!++
;	  0648	! FUNCTIONAL DESCRIPTION:
;	  0649	!
;	  0650	!  Terminates all pending function CCBs for a circuit with "success".
;	  0651	!
;	  0652	! FORMAL PARAMETERS
;	  0653	!
;	  0654	!	LINEb	Address of the line data base entry whose function CCB
;	  0655	!		queue is to be cleared out.
;	  0656	!
;	  0657	! IMPLICIT INPUTS
;	  0658	!
;	  0659	!	LINEccb
;	  0660	!
;	  0661	! ROUTINE VALUE:
;	  0662	! COMPLETION CODES:
;	  0663	!
;	  0664	!	NONE.
;	  0665	!
;	  0666	! SIDE EFFECTS:
;	  0667	!
;	  0668	!	NONE.
;	  0669	!
;	  0670	!--
;	  0671	
;	  0672	begin
;	  0673	
;	  0674	require 'XPTSYM';
;	  0711	
;	  0712	while true do
;	  0713	    begin
;	  0714	    local CCB: ref block field (C_XPT_fields);
;	  0715	    if (CCB = .LINEccb) eqla 0 then exitloop;   ! If there is a CCB,
;	  0716	    LINEccb = .CCB[C_LNK];              ! then de-link it,
;	  0717	    CCB[C_FNC] = FC_CCP;		!  terminate the CCB
;	  0718	    CCB[C_STS] = NM$SUC;		!  with a "success" code;
;	  0719	    $MCB_SCHEDULE_CCB(.CCB);
;	  0720	    end;
;	  0721	
;	  0722	end;			!End of CCB_CMP


						.GLOBL	$SCHED


						.SBTTL	CCB.CMP
000452						.PSECT	$CODE$,  RO 

000000	010446 				; CCB.CMP
					U.2:	MOV	R4,-(SP)			;					0645
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  16
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (4)

000002	016504  000050 			1$:	MOV	50(R5),R4			; *(LINEB),CCB				0715
000006	001413 					BEQ	2$
000010	011465  000050 				MOV	(R4),50(R5)			; CCB,*(LINEB)				0716
000014	112764  000022  000012 			MOVB	#22,12(R4)			; *,*(CCB)				0717
000022	012764  000001  000014 			MOV	#1,14(R4)			; *,*(CCB)				0718
000030	004767  000000G				JSR	PC,$SCHED			;					0719
000034	000762 					BR	1$				;					0712
000036	012604 				2$:	MOV	(SP)+,R4			;					0645
000040	000207 					RTS	PC

; Routine Size:  17 words,	Routine Base:  $CODE$ + 0452
; Maximum stack depth per invocation:  2 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  17
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (5)

;	  0723	global routine CCPSTR (LINEb,CCB): MCB_DB_CCB novalue =
;	  0724	
;	  0725	!++
;	  0726	! FUNCTIONAL DESCRIPTION:
;	  0727	!
;	  0728	!  This is a REQUEST complete.
;	  0729	!
;	  0730	! FORMAL PARAMETERS
;	  0731	!
;	  0732	!	CCB	Function CCB
;	  0733	!
;	  0734	! IMPLICIT INPUTS
;	  0735	!
;	  0736	!	LINEstate
;	  0737	!
;	  0738	! ROUTINE VALUE:
;	  0739	! COMPLETION CODES:
;	  0740	!
;	  0741	!	NONE.
;	  0742	!
;	  0743	! SIDE EFFECTS:
;	  0744	!
;	  0745	!--
;	  0746	
;	  0747	begin
;	  0748	map CCB: ref block field(C_fields);
;	  0749	require 'XPTSYM';
;	  0786	
;	  0787	LINEfunction = 0;
;	  0788	
;	  0789	!
;	  0790	!  Get the initial line cost if necessary.
;	  0791	!
;	  0792	
;	  0793	if .Lcv eql 0
;	  0794	then if (Lcv = .CCB[C_PRM1]) eql 0
;	  0795	     then Lcv = .Lcv + 1;
;	  0796	
;	  0797	!
;	  0798	!  Set the Transport circuit state, depending on whether the circuit
;	  0799	!  is ON or OFF.
;	  0800	!
;	  0801	
;	  0802	if .NMstate eql ON
;	  0803	then NEW_STATE (.LINEb, DS);
;	  0804	
;	  0805	!
;	  0806	!  Simulate a line state change event
;	  0807	!
;	  0808	
;	  0809	CIRCUIT_STATE(.LINEb,.CCB);
;	  0810	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  18
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (5)

;	  0811	$MCB_RETURN_CCB (.CCB);
;	  0812	CCB_CMP(.LINEb);			! Clear out circuit's function queue
;	  0813	NEXT_ACTION (.LINEb);
;	  0814	end;                                    ! End of CCPSTR


						.GLOBL	$CCBRT


						.SBTTL	CCPSTR
000000	105065  000040 			CCPSTR::
					U.4:	CLRB	40(R5)				; *(LINEB)				0787
000004	012700  000020 				MOV	#20,R0				;					0793
000010	060500 					ADD	R5,R0				; LINEB,*
000012	005710 					TST	(R0)
000014	001004 					BNE	1$
000016	016410  000024 				MOV	24(R4),(R0)			; *(CCB),*				0794
000022	001001 					BNE	1$
000024	005210 					INC	(R0)				;					0795
000026	105765  000037 			1$:	TSTB	37(R5)				; *(LINEB)				0802
000032	001004 					BNE	2$
000034	012700  000004 				MOV	#4,R0				;					0803
000040	004767  000000V				JSR	PC,U.18
000044	004767  000000V			2$:	JSR	PC,U.6				;					0809
000050	004767  000000G				JSR	PC,$CCBRT			;					0811
000054	004767  177656 				JSR	PC,U.2				;					0812
000060	004767  000000V				JSR	PC,U.19				;					0813
000064	000207 					RTS	PC				;					0723

; Routine Size:  27 words,	Routine Base:  $CODE$ + 0514
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  19
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (6)

;	  0815	global routine CCPSTP (LINEb,CCB): MCB_DB_CCB novalue =
;	  0816	
;	  0817	!++
;	  0818	! FUNCTIONAL DESCRIPTION:
;	  0819	!
;	  0820	!  This is a RELEASE complete.
;	  0821	!
;	  0822	! FORMAL PARAMETERS
;	  0823	!
;	  0824	!	CCB	Function CCB
;	  0825	!
;	  0826	! IMPLICIT INPUTS
;	  0827	!
;	  0828	!	LINEstate
;	  0829	!
;	  0830	! ROUTINE VALUE:
;	  0831	! COMPLETION CODES:
;	  0832	!
;	  0833	!	NONE.
;	  0834	!
;	  0835	! SIDE EFFECTS:
;	  0836	!
;	  0837	!--
;	  0838	
;	  0839	begin
;	  0840	map CCB: ref block field(C_fields);
;	  0841	require 'XPTSYM';
;	  0878	
;	  0879	LINEfunction = 0;
;	  0880	DLLstate = DLL_FREE;                    ! We are no longer using this circuit
;	  0881	Freeing = false;                        !   and complete freeing process
;	  0882	OWNED = false;
;	  0883	$MCB_RETURN_CCB(.CCB);			! Return the CCB
;	  0884	CCB_CMP(.LINEb);			! Post all function CCBs complete
;	  0885	NEXT_ACTION (.LINEb);
;	  0886	end;                                    ! End of CCPSTP


						.SBTTL	CCPSTP
000000	105065  000040 			CCPSTP::
					U.3:	CLRB	40(R5)				; *(LINEB)				0879
000004	105065  000006 				CLRB	6(R5)				; *(LINEB)				0880
000010	042715  004400 				BIC	#4400,(R5)			; *,LINEB				0882
000014	004767  000000G				JSR	PC,$CCBRT			;					0883
000020	004767  177624 				JSR	PC,U.2				;					0884
000024	004767  000000V				JSR	PC,U.19				;					0885
000030	000207 					RTS	PC				;					0815

; Routine Size:  13 words,	Routine Base:  $CODE$ + 0602
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  20
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (7)

;	  0887	routine CIRCUIT_DOWN (LINEb): LINKAGE_DB novalue =
;	  0888	
;	  0889	!++
;	  0890	! FUNCTIONAL DESCRIPTION:
;	  0891	!
;	  0892	!
;	  0893	! FORMAL PARAMETERS
;	  0894	!
;	  0895	!       LINEb - line data base
;	  0896	!
;	  0897	! IMPLICIT INPUTS
;	  0898	!
;	  0899	!	None
;	  0900	!
;	  0901	! ROUTINE VALUE:
;	  0902	! COMPLETION CODES:
;	  0903	!
;	  0904	!	NONE.
;	  0905	!
;	  0906	! SIDE EFFECTS:
;	  0907	!
;	  0908	!	NONE.
;	  0909	!--
;	  0910	
;	  0911	begin
;	  0912	require 'XPTSYM';
;	  0949	
;	  0950	case .LINEstate from HA to RU of	! Actions are based
;	  0951	    set					! circuit states:
;	  0952	    [RU,TC]:				!   Running -
;	  0953	        NEW_STATE (.LINEb, LR);
;	  0954	    [DT]:                               !   Terminate
;	  0955	        NEXT_STATE (.LINEb, OFF);
;	  0956	    [TI,TV]:                            !   Handshaking -
;	  0957	        NEW_STATE (.LINEb, DS);
;	  0958	    [inrange]:
;	  0959	        ;                               !   Otherwise - do nothing
;	  0960	    tes;
;	  0961	
;	  0962	end;			!End of CIRCUIT_DOWN


						.SBTTL	CIRCUIT.DOWN
000000	111500 				; CIRCUIT.DOWN
					U.5:	MOVB	(R5),R0				; LINEB,*				0950
000002	006300 					ASL	R0
000004	066007  000046'				ADD	P.AAC(R0),PC			; Case dispatch
000010	012700  000003 			1$:	MOV	#3,R0				;					0953
000014	000407 					BR	4$
000016	012700  000002 			2$:	MOV	#2,R0				;					0955
000022	004767  000000V				JSR	PC,U.20
000026	000207 					RTS	PC				;					0950
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  21
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (7)

000030	012700  000004 			3$:	MOV	#4,R0				;					0957
000034	004767  000000V			4$:	JSR	PC,U.18
000040	000207 				5$:	RTS	PC				;					0887

; Routine Size:  17 words,	Routine Base:  $CODE$ + 0634
; Maximum stack depth per invocation:  1 word


000046						.PSECT	$PLIT$,  RO ,  D  

					P.AAC:						; CASE Table for CIRCUIT.DOWN+0004	0950
000046	000030 					.WORD	30				; [5$]
000050	000006 					.WORD	6				; [2$]
000052	000030 					.WORD	30				; [5$]
000054	000030 					.WORD	30				; [5$]
000056	000030 					.WORD	30				; [5$]
000060	000020 					.WORD	20				; [3$]
000062	000020 					.WORD	20				; [3$]
000064	000000 					.WORD	0				; [1$]
000066	000000 					.WORD	0				; [1$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  22
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (8)

;	  0963	routine CIRCUIT_STATE (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  0964	
;	  0965	!++
;	  0966	! FUNCTIONAL DESCRIPTION:
;	  0967	!
;	  0968	!
;	  0969	! FORMAL PARAMETERS
;	  0970	!
;	  0971	!       LINEb - line data base
;	  0972	!       CCB - CCB containing the state notification
;	  0973	!
;	  0974	! IMPLICIT INPUTS
;	  0975	!
;	  0976	!	None
;	  0977	!
;	  0978	! ROUTINE VALUE:
;	  0979	! COMPLETION CODES:
;	  0980	!
;	  0981	!	NONE.
;	  0982	!
;	  0983	! SIDE EFFECTS:
;	  0984	!
;	  0985	!	NONE.
;	  0986	!--
;	  0987	
;	  0988	begin
;	  0989	map CCB: ref block field (C_XPT_fields);
;	  0990	require 'XPTSYM';
;	  1027	
;	  1028	selectone .CCB[C_STS] of
;	  1029	    set
;	  1030	
;	  1031	!
;	  1032	!  Transition to OFF (or MAINTENANCE, which is equivalent to Transport)
;	  1033	!
;	  1034	
;	  1035	    [DLL$_STATE_OFF]:
;	  1036	        begin
;	  1037	        DLLstate = DLL_OFF;
;	  1038	        CIRCUIT_DOWN(.LINEb);
;	  1039	        end;
;	  1040	    [DLL$_STATE_MAINTENANCE]:
;	  1041	        begin
;	  1042	        DLLstate = DLL_MAINTENANCE;
;	  1043	        CIRCUIT_DOWN(.LINEb);
;	  1044	        end;
;	  1045	    [DLL$_STATE_SYNCHRONIZING]:
;	  1046	        begin
;	  1047	        local CB: ref block field (C_XPT_fields);
;	  1048	        DLLstate = DLL_SYNCHRONIZING;
;	  1049	        end;
;	  1050	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  23
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (8)

;	  1051	    [DLL$_STATE_RUNNING]:
;	  1052	        begin
;	  1053	        DLLstate = DLL_RUNNING;
;	  1054	        CIRCUIT_UP(.LINEb);
;	  1055	        end;
;	  1056	
;	  1057	    tes;
;	  1058	
;	  1059	end;			!End of CIRCUIT_STATE


						.SBTTL	CIRCUIT.STATE
000676						.PSECT	$CODE$,  RO 

000000	016400  000014 			; CIRCUIT.STATE
					U.6:	MOV	14(R4),R0			; *(CCB),*				1028
000004	020027  100043 				CMP	R0,#-77735
000010	001004 					BNE	1$
000012	112765  000001  000006 			MOVB	#1,6(R5)			; *,*(LINEB)				1037
000020	000406 					BR	2$				;					1038
000022	020027  100073 			1$:	CMP	R0,#-77705			;					1028
000026	001006 					BNE	3$
000030	112765  000003  000006 			MOVB	#3,6(R5)			; *,*(LINEB)				1042
000036	004767  177674 			2$:	JSR	PC,U.5				;					1043
000042	000207 					RTS	PC				;					1028
000044	020027  100053 			3$:	CMP	R0,#-77725
000050	001004 					BNE	4$
000052	112765  000002  000006 			MOVB	#2,6(R5)			; *,*(LINEB)				1048
000060	000207 					RTS	PC				;					1028
000062	020027  100063 			4$:	CMP	R0,#-77715
000066	001005 					BNE	5$
000070	112765  000004  000006 			MOVB	#4,6(R5)			; *,*(LINEB)				1053
000076	004767  000000V				JSR	PC,U.7				;					1054
000102	000207 				5$:	RTS	PC				;					0963

; Routine Size:  34 words,	Routine Base:  $CODE$ + 0676
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  24
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (9)

;	  1060	routine CIRCUIT_UP (LINEb): LINKAGE_DB novalue =
;	  1061	
;	  1062	!++
;	  1063	! FUNCTIONAL DESCRIPTION:
;	  1064	!
;	  1065	!
;	  1066	! FORMAL PARAMETERS
;	  1067	!
;	  1068	!       LINEb - line data base
;	  1069	!
;	  1070	! IMPLICIT INPUTS
;	  1071	!
;	  1072	!	None
;	  1073	!
;	  1074	! ROUTINE VALUE:
;	  1075	! COMPLETION CODES:
;	  1076	!
;	  1077	!	NONE.
;	  1078	!
;	  1079	! SIDE EFFECTS:
;	  1080	!
;	  1081	!	NONE.
;	  1082	!--
;	  1083	
;	  1084	begin
;	  1085	require 'XPTSYM';
;	  1122	local CB: ref block field (C_XPT_FIELDS);
;	  1123	
;	  1124	if .LINEstate eql DS
;	  1125	then NEXT_STATE (.LINEb, TI);
;	  1126	
;	  1127	end;			!End of CIRCUIT_UP


						.SBTTL	CIRCUIT.UP
000000	121527  000004 			; CIRCUIT.UP
					U.7:	CMPB	(R5),#4				; LINEB,*				1124
000004	001004 					BNE	1$
000006	012700  000005 				MOV	#5,R0				;					1125
000012	004767  000000V				JSR	PC,U.20
000016	000207 				1$:	RTS	PC				;					1060

; Routine Size:  8 words,	Routine Base:  $CODE$ + 1002
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  25
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (10)

;	  1128	global routine CKTOFF (LINEb, CCB): LINKAGE_DB_CCB novalue =
;	  1129	
;	  1130	!++
;	  1131	! FUNCTIONAL DESCRIPTION:
;	  1132	!
;	  1133	! Releases a circuit to the DLL.
;	  1134	!
;	  1135	! FORMAL PARAMETERS
;	  1136	!
;	  1137	!	CCB	Function CCB
;	  1138	!
;	  1139	!		CCB[C_LIN]	Index of data base entry for circuit
;	  1140	!		CCB[C_PRM2]	Provider PIX
;	  1141	!
;	  1142	! IMPLICIT INPUTS
;	  1143	!
;	  1144	!	LINEccb
;	  1145	!
;	  1146	! ROUTINE VALUE:
;	  1147	! COMPLETION CODES:
;	  1148	!
;	  1149	!	NONE.
;	  1150	!
;	  1151	! SIDE EFFECTS:
;	  1152	!
;	  1153	!	NONE.
;	  1154	!
;	  1155	!--
;	  1156	
;	  1157	begin
;	  1158	map CCB: ref block field (C_XPT_FIELDS);
;	  1159	require 'XPTSYM';
;	  1196	
;	  1197	!
;	  1198	!  Queue the function CCB into the data base
;	  1199	!
;	  1200	
;	  1201	CCB[C_LNK] = .LINEccb;
;	  1202	LINEccb = .CCB;
;	  1203	
;	  1204	Freeing = true;                         !   indicate we're freeing
;	  1205	
;	  1206	!
;	  1207	!  If the circuit needs to be brought down, start with that.
;	  1208	!  Otherwise, get to the releasing.
;	  1209	!
;	  1210	
;	  1211	if .LINEstate neq HA                    ! If not halted,
;	  1212	then NEW_STATE (.LINEb, DT)             ! start it on the road to HA state.
;	  1213	else begin
;	  1214	     LINEfunction = FUNCrelease;
;	  1215	     NEXT_ACTION (.LINEb);
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  26
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (10)

;	  1216	     end;
;	  1217	
;	  1218	end;				!End of CKTOFF


						.SBTTL	CKTOFF
000000	016514  000050 			CKTOFF::
					U.8:	MOV	50(R5),(R4)			; *(LINEB),CCB				1201
000004	010465  000050 				MOV	R4,50(R5)			; CCB,*(LINEB)				1202
000010	052715  004000 				BIS	#4000,(R5)			; *,LINEB				1204
000014	105715 					TSTB	(R5)				; LINEB					1211
000016	001405 					BEQ	1$
000020	012700  000001 				MOV	#1,R0				;					1212
000024	004767  000000V				JSR	PC,U.18
000030	000207 					RTS	PC				;					1211
000032	112765  000002  000040 		1$:	MOVB	#2,40(R5)			; *,*(LINEB)				1214
000040	004767  000000V				JSR	PC,U.19				;					1215
000044	000207 					RTS	PC				;					1128

; Routine Size:  19 words,	Routine Base:  $CODE$ + 1022
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  27
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (11)

;	  1219	global routine CKTON (LINEb, CCB): LINKAGE_DB_CCB novalue =
;	  1220	
;	  1221	!++
;	  1222	! FUNCTIONAL DESCRIPTION:
;	  1223	!
;	  1224	! Issues a request for a circuit to the DLL.
;	  1225	!
;	  1226	! FORMAL PARAMETERS
;	  1227	!
;	  1228	!	CCB	Function CCB
;	  1229	!
;	  1230	!		CCB[C_LIN]	Line number (index to data base entry)
;	  1231	!		CCB[C_PRM2]	Provider PIX
;	  1232	!
;	  1233	! IMPLICIT INPUTS
;	  1234	!
;	  1235	!	LINEccb
;	  1236	!
;	  1237	! ROUTINE VALUE:
;	  1238	! COMPLETION CODES:
;	  1239	!
;	  1240	!	NONE.
;	  1241	!
;	  1242	! SIDE EFFECTS:
;	  1243	!
;	  1244	!	NONE.
;	  1245	!
;	  1246	!--
;	  1247	
;	  1248	begin
;	  1249	map CCB: ref block field (C_XPT_FIELDS);
;	  1250	require 'XPTSYM';
;	  1287	
;	  1288	!
;	  1289	!  Queue the function CCB into the data base
;	  1290	!
;	  1291	
;	  1292	CCB[C_LNK] = .LINEccb;
;	  1293	LINEccb = .CCB;
;	  1294	
;	  1295	OWNED = true;                           ! Set state to "owned"
;	  1296	
;	  1297	!
;	  1298	!  Line will be halted.
;	  1299	!  Start it on the road to RU state.
;	  1300	!
;	  1301	
;	  1302	LINEfunction = FUNCrequest;
;	  1303	LINRVR(.LINEb);
;	  1304	end;				!End of CKTON
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  28
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (11)

						.SBTTL	CKTON
000000	016514  000050 			CKTON::
					U.9:	MOV	50(R5),(R4)			; *(LINEB),CCB				1292
000004	010465  000050 				MOV	R4,50(R5)			; CCB,*(LINEB)				1293
000010	052715  000400 				BIS	#400,(R5)			; *,LINEB				1295
000014	112765  000001  000040 			MOVB	#1,40(R5)			; *,*(LINEB)				1302
000022	004767  000000V				JSR	PC,U.14				;					1303
000026	000207 					RTS	PC				;					1219

; Routine Size:  12 words,	Routine Base:  $CODE$ + 1070
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  29
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (12)

;	  1305	routine GET_FALSE_NI (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  1306	
;	  1307	!++
;	  1308	! FUNCTIONAL DESCRIPTION:
;	  1309	!
;	  1310	!  Constructs the False_NI_msg.
;	  1311	!
;	  1312	! FORMAL PARAMETERS
;	  1313	!
;	  1314	!       LINEb - line data base
;	  1315	!
;	  1316	! IMPLICIT INPUTS
;	  1317	!
;	  1318	!	None
;	  1319	!
;	  1320	! ROUTINE VALUE:
;	  1321	! COMPLETION CODES:
;	  1322	!
;	  1323	!	NONE.
;	  1324	!
;	  1325	! SIDE EFFECTS:
;	  1326	!
;	  1327	!	NONE.
;	  1328	!
;	  1329	!--
;	  1330	
;	  1331	begin
;	  1332	map CCB: ref block field (C_XPT_FIELDS);
;	  1333	require 'XPTSYM';
;	  1370	pointer PTR;
;	  1371	
;	  1372	if ch$rchar (.CCB[C_ADDR]) eql OTI_CTLflg
;	  1373	then begin                              ! Copy and update NI.
;	  1374	     PTR = .False_NI_msg_ADDR;
;	  1375	     ch$move(.CCB[C_CNT],.CCB[C_ADDR],.PTR);
;	  1376	     False_NI_msg_CNT = .CCB [C_CNT];
;	  1377	     PTR = ch$plus(.PTR,2);             ! Bypass MSGFLG and SUBFLG
;	  1378	     do 0 while biton(getb(PTR),%o'200'); ! NODEADDR,
;	  1379	     begin                              ! NODENAME
;	  1380	     local TMP;
;	  1381	     TMP = getb(PTR);
;	  1382	     PTR = ch$plus(.PTR,.TMP);
;	  1383	     end;
;	  1384	     PTR = ch$plus(.PTR,1);             !  SERVICES
;	  1385	     if .Request_OTV
;	  1386	     then ch$wchar((ch$rchar(.PTR) or 1),.PTR);
;	  1387	     PTR = ch$plus(.PTR,1);             !  REQUESTS
;	  1388	     byt$short_string(PH2size,PTR);     ! Put in the maximum blocksize
;	  1389	     byt$short_string(PH2size,PTR);     !  and the maximum segment size
;	  1390	     putw($MAXlk,PTR);                  !  and the maximum number of links
;	  1391	     end;
;	  1392	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  30
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (12)

;	  1393	end;			!End of GET_FALSE_NI


						.SBTTL	GET.FALSE.NI
000000	004167  000000G			; GET.FALSE.NI
					U.10:	JSR	R1,$SAVE5			;					1305
000004	005746 					TST	-(SP)
000006	127427  000020  000130 			CMPB	@20(R4),#130			; *(CCB),*				1372
000014	001070 					BNE	3$
000016	016700  000002G				MOV	.CRDAT+2,R0			;					1374
000022	016005  000172 				MOV	172(R0),R5			; *,PTR
000026	016446  000022 				MOV	22(R4),-(SP)			; *(CCB),*				1375
000032	016446  000020 				MOV	20(R4),-(SP)			; *(CCB),*
000036	010546 					MOV	R5,-(SP)			; PTR,*
000040	004767  000000G				JSR	PC,BL$MOV
000044	016700  000002G				MOV	.CRDAT+2,R0
000050	016460  000022  000174 			MOV	22(R4),174(R0)			; *(CCB),*				1376
000056	062705  000002 				ADD	#2,R5				; *,PTR					1377
000062	105725 				1$:	TSTB	(R5)+				; PTR					1378
000064	100776 					BMI	1$
000066	005004 					CLR	R4				; TMP					1381
000070	152504 					BISB	(R5)+,R4			; PTR,TMP
000072	060405 					ADD	R4,R5				; TMP,PTR				1382
000074	005205 					INC	R5				; PTR					1384
000076	032710  001000 				BIT	#1000,(R0)			;					1385
000102	001405 					BEQ	2$
000104	005004 					CLR	R4				;					1386
000106	151504 					BISB	(R5),R4				; PTR,*
000110	052704  000001 				BIS	#1,R4
000114	110415 					MOVB	R4,(R5)				; *,PTR
000116	005205 				2$:	INC	R5				; PTR					1387
000120	016000  000126 				MOV	126(R0),R0			; *,NUM					1388
000124	110025 					MOVB	R0,(R5)+			; NUM,PTR
000126	000300 					SWAB	R0				; NUM
000130	110025 					MOVB	R0,(R5)+			; NUM,PTR
000132	016700  000002G				MOV	.CRDAT+2,R0			;					1389
000136	016000  000126 				MOV	126(R0),R0			; *,NUM
000142	110025 					MOVB	R0,(R5)+			; NUM,PTR
000144	000300 					SWAB	R0				; NUM
000146	110025 					MOVB	R0,(R5)+			; NUM,PTR
000150	016700  000002G				MOV	.CRDAT+2,R0			;					1390
000154	016066  000032  000006 			MOV	32(R0),6(SP)			; *,X
000162	116625  000006 				MOVB	6(SP),(R5)+			; X,PTR
000166	116625  000007 				MOVB	7(SP),(R5)+			; X,PTR
000172	062706  000006 				ADD	#6,SP				;					1373
000176	005726 				3$:	TST	(SP)+				;					1305
000200	000207 					RTS	PC

; Routine Size:  65 words,	Routine Base:  $CODE$ + 1120
; Maximum stack depth per invocation:  11 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  31
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (13)

;	  1394	routine GET_PWDb (ADDR) =
;	  1395	
;	  1396	!++
;	  1397	! FUNCTIONAL DESCRIPTION:
;	  1398	!
;	  1399	!  Returns a password data base address for the given node.
;	  1400	!
;	  1401	! FORMAL PARAMETERS
;	  1402	!
;	  1403	!       ADDR - Node address
;	  1404	!
;	  1405	! IMPLICIT INPUTS
;	  1406	!
;	  1407	!	None
;	  1408	!
;	  1409	! ROUTINE VALUE:
;	  1410	! COMPLETION CODES:
;	  1411	!
;	  1412	!       Address of PWDb.
;	  1413	!
;	  1414	! SIDE EFFECTS:
;	  1415	!
;	  1416	!	NONE.
;	  1417	!
;	  1418	!--
;	  1419	
;	  1420	begin
;	  1421	require 'XPTSYM';
;	  1458	
;	  1459	$TLI_for_each_PWDb_do_begin
;	  1460	    if .PWDnode eql 0 then return .PWDb;
;	  1461	    if .PWDnode eql .ADDR then return .PWDb;
;	  1462	$TLI_next_PWDb_end;
;	  1463	
;	  1464	0                                       ! Never gets here
;	  1465	end;			!End of GET_PWDb


						.SBTTL	GET.PWDB
000000	010146 				; GET.PWDB
					U.11:	MOV	R1,-(SP)			;					1394
000002	016700  000002G				MOV	.CRDAT+2,R0			;					1457
000006	016001  000152 				MOV	152(R0),R1			; *,PWDB
000012	001412 					BEQ	4$
000014	016100  000002 			1$:	MOV	2(R1),R0			; *(PWDB),*				1460
000020	001403 					BEQ	2$
000022	020066  000004 				CMP	R0,4(SP)			; *,ADDR				1461
000026	001002 					BNE	3$
000030	010100 				2$:	MOV	R1,R0				; PWDB,*
000032	000403 					BR	5$
000034	011101 				3$:	MOV	(R1),R1				; PWDB,PWDB
000036	001366 					BNE	1$
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  32
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (13)

000040	005000 				4$:	CLR	R0				;					1394
000042	012601 				5$:	MOV	(SP)+,R1
000044	000207 					RTS	PC

; Routine Size:  19 words,	Routine Base:  $CODE$ + 1322
; Maximum stack depth per invocation:  2 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  33
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (14)

;	  1466	global routine INI_LIN (LINEb_): CALL$ novalue =
;	  1467	
;	  1468	!++
;	  1469	! FUNCTIONAL DESCRIPTION:
;	  1470	!
;	  1471	!  Initializes a circuit, i.e., starts it up and transport-initializes it.
;	  1472	!
;	  1473	! FORMAL PARAMETERS
;	  1474	!
;	  1475	!       LINEb - line data base
;	  1476	!
;	  1477	! IMPLICIT INPUTS
;	  1478	!
;	  1479	!	LINEstate
;	  1480	!
;	  1481	! ROUTINE VALUE:
;	  1482	! COMPLETION CODES:
;	  1483	!
;	  1484	!	NONE.
;	  1485	!
;	  1486	! SIDE EFFECTS:
;	  1487	!
;	  1488	!	Changes circuit state.  Declares circuit "down" if it is not already.
;	  1489	!	Aborts a Terminate sequence.
;	  1490	! NOTE:	This routine acquires a free CCB.  If it is unable to do so, it
;	  1491	!	will place the function requested in the LINEfunction entry for the
;	  1492	!	circuit.  Upon timeout, the function will be rescheduled.
;	  1493	!
;	  1494	!--
;	  1495	
;	  1496	begin
;	  1497	local LINEb;
;	  1498	require 'XPTSYM';
;	  1535	LINEb = .LINEb_;
;	  1536	!
;	  1537	!  Do initialization action depending on the circuit state
;	  1538	!
;	  1539	
;	  1540	case .LINEstate from HA to RU of
;	  1541	    set
;	  1542	    [RU,TC,OFF]:                        ! If XPT possibly notified,
;	  1543	        NEW_STATE (.LINEb, LR);         ! then make sure line_down is done.
;	  1544	    [HA,DT,TI,TV]:                      ! otherwise
;	  1545	        NEW_STATE (.LINEb, DS);         ! initialize line.
;	  1546	    [inrange]:
;	  1547	        ;                               ! (already initializing)
;	  1548	    tes;
;	  1549	
;	  1550	end;				!End of INI_LIN


						.SBTTL	INI.LIN
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  34
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (14)

000000	016505  000002 			INI.LIN::
					U.12:	MOV	2(R5),R5			; LINEB.(.AP.),LINEB			1535
000004	111500 					MOVB	(R5),R0				; LINEB,*				1540
000006	006300 					ASL	R0
000010	066007  000070'				ADD	P.AAD(R0),PC			; Case dispatch
000014	012700  000003 			1$:	MOV	#3,R0				;					1543
000020	000402 					BR	3$
000022	012700  000004 			2$:	MOV	#4,R0				;					1545
000026	004767  000000V			3$:	JSR	PC,U.18
000032	000207 				4$:	RTS	PC				;					1466

; Routine Size:  14 words,	Routine Base:  $CODE$ + 1370
; Maximum stack depth per invocation:  1 word


000070						.PSECT	$PLIT$,  RO ,  D  

					P.AAD:						; CASE Table for INI.LIN+0010		1540
000070	000006 					.WORD	6				; [2$]
000072	000006 					.WORD	6				; [2$]
000074	000000 					.WORD	0				; [1$]
000076	000016 					.WORD	16				; [4$]
000100	000016 					.WORD	16				; [4$]
000102	000006 					.WORD	6				; [2$]
000104	000006 					.WORD	6				; [2$]
000106	000000 					.WORD	0				; [1$]
000110	000000 					.WORD	0				; [1$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  35
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (15)

;	  1551	global routine LD_CMP (LINEb,CCB): MCB_DB_CCB novalue =
;	  1552	
;	  1553	!++
;	  1554	! FUNCTIONAL DESCRIPTION:
;	  1555	!
;	  1556	!  Processes "line down" completion
;	  1557	!
;	  1558	! FORMAL PARAMETERS
;	  1559	!
;	  1560	!	CCB[C_LIN] - circuit that is now "down"
;	  1561	!
;	  1562	! IMPLICIT INPUTS
;	  1563	!
;	  1564	!	LINEstate
;	  1565	!
;	  1566	! ROUTINE VALUE:
;	  1567	! COMPLETION CODES:
;	  1568	!
;	  1569	!	NONE.
;	  1570	!
;	  1571	! SIDE EFFECTS:
;	  1572	!
;	  1573	!	Changes circuit state.  If in initialization sequence, starts
;	  1574	!	DLL reinitialization of circuit.  If in termination sequence,
;	  1575	!	either returns SDB to pool or (if requested to release circuit)
;	  1576	!	tell the DLL to release the circuit.
;	  1577	!
;	  1578	!--
;	  1579	
;	  1580	begin
;	  1581	map CCB: ref block field (C_XPT_FIELDS);
;	  1582	require 'XPTSYM';
;	  1619	
;	  1620	LINEfunction = 0;
;	  1621	$MCB_RETURN_CCB (.CCB);
;	  1622	
;	  1623	case .LINEstate from HA to RU of
;	  1624	    set
;	  1625	    [LR]:                               ! Continuing initialization:
;	  1626	        NEXT_STATE (.LINEb, DS);
;	  1627	    [OFF]:                              ! Continuing termination:
;	  1628	        NEXT_STATE (.LINEb, HA);
;	  1629	    [inrange]:
;	  1630		NEXT_ACTION (.LINEb);
;	  1631	    tes;
;	  1632	
;	  1633	end;				!End of LD_CMP


						.SBTTL	LD.CMP
001424						.PSECT	$CODE$,  RO 
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  36
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (15)

000000	105065  000040 			LD.CMP::
					U.13:	CLRB	40(R5)				; *(LINEB)				1620
000004	004767  000000G				JSR	PC,$CCBRT			;					1621
000010	111500 					MOVB	(R5),R0				; LINEB,*				1623
000012	006300 					ASL	R0
000014	066007  000112'				ADD	P.AAE(R0),PC			; Case dispatch
000020	012700  000004 			1$:	MOV	#4,R0				;					1626
000024	000401 					BR	3$
000026	005000 				2$:	CLR	R0				;					1628
000030	004767  000000V			3$:	JSR	PC,U.20
000034	000207 					RTS	PC				;					1623
000036	004767  000000V			4$:	JSR	PC,U.19				;					1630
000042	000207 					RTS	PC				;					1551

; Routine Size:  18 words,	Routine Base:  $CODE$ + 1424
; Maximum stack depth per invocation:  1 word


000112						.PSECT	$PLIT$,  RO ,  D  

					P.AAE:						; CASE Table for LD.CMP+0014		1623
000112	000016 					.WORD	16				; [4$]
000114	000016 					.WORD	16				; [4$]
000116	000006 					.WORD	6				; [2$]
000120	000000 					.WORD	0				; [1$]
000122	000016 					.WORD	16				; [4$]
000124	000016 					.WORD	16				; [4$]
000126	000016 					.WORD	16				; [4$]
000130	000016 					.WORD	16				; [4$]
000132	000016 					.WORD	16				; [4$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  37
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

;	  1634	global routine LINRVR (LINEb): LINKAGE_DB novalue =
;	  1635	
;	  1636	!++
;	  1637	! FUNCTIONAL DESCRIPTION:
;	  1638	!
;	  1639	!  Called by main Transport timer routine.
;	  1640	!  This routine performs resource recovery.
;	  1641	!
;	  1642	!  RESOURCE RECOVERY
;	  1643	!
;	  1644	!  If a function code (distinguished from a SDB address by being only one
;	  1645	!  byte in significance) is in LINEfunction for a circuit, the routine will
;	  1646	!  attempt to get an SDB for the circuit.  If it succeeds, the SDB will be
;	  1647	!  passed to the routine if the routine takes a CCB, and returned otherwise.
;	  1648	!  The routine to be retried will depend on the value of LINEfunction.
;	  1649	!
;	  1650	! FORMAL PARAMETERS
;	  1651	!
;	  1652	!	NONE.
;	  1653	!
;	  1654	! IMPLICIT INPUTS
;	  1655	!
;	  1656	!	LINEfunction
;	  1657	!
;	  1658	! ROUTINE VALUE:
;	  1659	! COMPLETION CODES:
;	  1660	!
;	  1661	!	NONE.
;	  1662	!
;	  1663	! SIDE EFFECTS:
;	  1664	!
;	  1665	!
;	  1666	!--
;	  1667	
;	  1668	begin
;	  1669	require 'XPTSYM';
;	  1706	
;	  1707	if .LINEfunction leq 0 then return;
;	  1708	
;	  1709	case .LINEfunction from FUNClo to FUNChi of
;	  1710	    set
;	  1711	    [FUNCrequest] :
;	  1712	        begin
;	  1713	        local CCB: ref block field (C_XPT_FIELDS);
;	  1714	        if not $MCB_GET_CCB(CCB) then return;
;	  1715	        CCB[C_PRM1] = 0;
;	  1716	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1717	        $DLL_REQUEST_CIRCUIT(.CCB);
;	  1718	        end;
;	  1719	    [FUNCrelease]:
;	  1720	        begin
;	  1721	        local CCB: ref block field (C_XPT_FIELDS);
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  38
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

;	  1722	        if not $MCB_GET_CCB(CCB) then return;
;	  1723	        LINEstate = HA;
;	  1724	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1725	        $DLL_RELEASE_CIRCUIT(.CCB);
;	  1726	        end;
;	  1727	    [FUNCinitialize]:
;	  1728	        begin
;	  1729	        local CCB: ref block field (C_XPT_FIELDS);
;	  1730	        if not $MCB_GET_CCB(CCB) then return;
;	  1731	        LINEstate = DS;
;	  1732	        Ph2circuit = false;
;	  1733	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1734	        $DLL_INITIALIZE(.CCB);
;	  1735	        end;
;	  1736	    [FUNCstop]:
;	  1737	        begin
;	  1738	        local CCB: ref block field (C_XPT_FIELDS);
;	  1739	        if not $MCB_GET_CCB(CCB) then return;
;	  1740	        LINEstate = DT;
;	  1741	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1742	        $DLL_STOP(.CCB);
;	  1743	        end;
;	  1744	    [FUNC_TI]:
;	  1745	        begin
;	  1746	        local CCB: ref block field (C_XPT_FIELDS);
;	  1747	        if not $MCB_GET_CCB(CCB) then return;
;	  1748	        CCB[C_XPT_TYPE] = FUNC_TI;
;	  1749	        CCB[C_BIAS] = 0;
;	  1750	        if not (.Ph2only or .Ph2circuit)
;	  1751	        then begin
;	  1752	             CCB[C_ADDR] = .TI_msg_ADDR;
;	  1753	             CCB[C_CNT] = .TI_msg_CNT;
;	  1754	             end
;	  1755	        else if .Intercept
;	  1756	             then begin
;	  1757	                  CCB[C_ADDR] = .NI_msg_ADDR;
;	  1758	                  CCB[C_CNT] = .NI_msg_CNT;
;	  1759	                  end
;	  1760	             else begin
;	  1761	                  CCB[C_ADDR] = .False_NI_msg_ADDR;
;	  1762	                  CCB[C_CNT] = .False_NI_msg_CNT;
;	  1763	                  end;
;	  1764	        Send_TI = false;
;	  1765	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1766	        $DLL_TRANSMIT(.CCB);
;	  1767	        end;
;	  1768	    [FUNC_TV]:
;	  1769	        begin
;	  1770	        local CCB: ref block field (C_XPT_FIELDS),
;	  1771	              PWDb: ref PWDblock;
;	  1772	        if not $MCB_GET_CCB(CCB) then return;
;	  1773	        CCB[C_XPT_TYPE] = FUNC_TV;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  39
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

;	  1774	        PWDb = GET_PWDb (.Nid);
;	  1775	        if not (.Ph2only or .Ph2circuit)
;	  1776	        then begin
;	  1777	             CCB[C_ADDR] = PWD3TVmsg_ptr;
;	  1778	             CCB[C_CNT] = PWD3TVmsg_len;
;	  1779	             end
;	  1780	        else begin
;	  1781	             CCB[C_ADDR] = PWD2TVmsg_ptr;
;	  1782	             CCB[C_CNT] = PWD2TVmsg_len;
;	  1783	             end;
;	  1784	        Send_TV = false;
;	  1785	        CCB[C_HANDLE] = .DLLhandle;     !  and DLL handle
;	  1786	        $DLL_TRANSMIT(.CCB);
;	  1787	        end;
;	  1788	    [FUNCline_up]:
;	  1789	        begin
;	  1790	        local CCB: ref block field (C_XPT_FIELDS);
;	  1791	        if not $MCB_GET_CCB(CCB) then return;
;	  1792	        XPTstate = ON;
;	  1793	        LINEstate = TC;
;	  1794	        CCB[C_HANDLE] = .XPThandle;     !  and XPT handle
;	  1795	        CCB[C_MOD] = TM_INI;            !   "line up" CCB
;	  1796	        CCB[C_FNC] = FC_RCP;            !   and queue it
;	  1797	        $MCB_SCHEDULE_CCB(.CCB);        !   to Transport
;	  1798	        end;
;	  1799	    [FUNCline_down]:
;	  1800	        begin
;	  1801	        local CCB: ref block field (C_XPT_FIELDS);
;	  1802	        if not $MCB_GET_CCB(CCB) then return;
;	  1803	        XPTstate = OFF;
;	  1804	        case .LINEstate_desired from HA to RU of
;	  1805	            set
;	  1806	            [LR,DS,TI,TV,TC,RU]: LINEstate = LR;
;	  1807	            [DT,OFF,HA]: LINEstate = OFF;
;	  1808	            tes;
;	  1809	
;	  1810	        if .Nty eql TOPS20
;	  1811	        then begin                      ! TOPS20 node:
;	  1812	             False_NI_LINEb = 0;        !   no longer available
;	  1813	             $XPT_for_each_LINEb_do_begin       ! Stop all adjacent
;	  1814	                 if .Ph2circuit and not .Intercept      ! aspiring
;	  1815	                 then CALL$L(TERM_LIN,.LINEb);  ! Phase II nodes
;	  1816	             $XPT_next_LINEb_end;
;	  1817	             end;
;	  1818	
;	  1819	        Nty = 0;                        ! Zero out adjacent node type
;	  1820	
;	  1821	        CCB[C_HANDLE] = .XPThandle;     !  and XPT handle
;	  1822	        CCB[C_MOD] = TM_TRM;            !   "line down" CCB
;	  1823	        CCB[C_FNC] = FC_RCP;            !   and queue it
;	  1824	        $MCB_SCHEDULE_CCB(.CCB);        !   to Transport
;	  1825	        end;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  40
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

;	  1826	    tes;
;	  1827	
;	  1828	LINEfunction = -.LINEfunction;
;	  1829	end;				!End of LINRVR


						.GLOBL	$CCBGT


						.SBTTL	LINRVR
001470						.PSECT	$CODE$,  RO 

000000	004167  000000G			LINRVR::
					U.14:	JSR	R1,$SAVE4			;					1634
000004	012746  000040 				MOV	#40,-(SP)			;					1707
000010	060516 					ADD	R5,(SP)				; LINEB,*
000012	105776  000000 				TSTB	@0(SP)
000016	003002 					BGT	2$
000020	000167  000776 			1$:	JMP	28$
000024	117600  000000 			2$:	MOVB	@0(SP),R0			;					1709
000030	005300 					DEC	R0
000032	006300 					ASL	R0
000034	066007  000134'				ADD	P.AAF(R0),PC			; Case dispatch
000040	004767  000000G			3$:	JSR	PC,$CCBGT			;					1714
000044	103765 					BCS	1$
000046	005064  000024 				CLR	24(R4)				; *(CCB)				1715
000052	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1716
000060	112764  000010  000012 			MOVB	#10,12(R4)			; *,*(CCB)				1717
000066	000431 					BR	6$
000070	004767  000000G			4$:	JSR	PC,$CCBGT			;					1722
000074	103751 					BCS	1$
000076	105015 					CLRB	(R5)				; LINEB					1723
000100	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1724
000106	112764  000010  000012 			MOVB	#10,12(R4)			; *,*(CCB)				1725
000114	000435 					BR	8$
000116	004767  000000G			5$:	JSR	PC,$CCBGT			;					1730
000122	103736 					BCS	1$
000124	112715  000004 				MOVB	#4,(R5)				; *,LINEB				1731
000130	042765  001000  000002 			BIC	#1000,2(R5)			; *,*(LINEB)				1732
000136	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1733
000144	112764  000002  000012 			MOVB	#2,12(R4)			; *,*(CCB)				1734
000152	112764  000002  000013 		6$:	MOVB	#2,13(R4)			; *,*(CCB)
000160	000503 					BR	13$
000162	004767  000000G			7$:	JSR	PC,$CCBGT			;					1739
000166	103714 					BCS	1$
000170	112715  000001 				MOVB	#1,(R5)				; *,LINEB				1740
000174	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1741
000202	112764  000002  000012 			MOVB	#2,12(R4)			; *,*(CCB)				1742
000210	112764  000004  000013 		8$:	MOVB	#4,13(R4)			; *,*(CCB)
000216	000464 					BR	13$
000220	004767  000000G			9$:	JSR	PC,$CCBGT			;					1747
000224	103675 					BCS	1$
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  41
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

000226	112764  000005  000032 			MOVB	#5,32(R4)			; *,*(CCB)				1748
000234	005064  000016 				CLR	16(R4)				; *(CCB)				1749
000240	012702  000020 				MOV	#20,R2				;					1752
000244	060402 					ADD	R4,R2				; CCB,*
000246	016700  000002G				MOV	.CRDAT+2,R0
000252	012701  000022 				MOV	#22,R1				;					1753
000256	060401 					ADD	R4,R1				; CCB,*
000260	012703  000002 				MOV	#2,R3				;					1750
000264	060503 					ADD	R5,R3				; LINEB,*
000266	032713  002000 				BIT	#2000,(R3)
000272	001010 					BNE	10$
000274	032713  001000 				BIT	#1000,(R3)
000300	001005 					BNE	10$
000302	016012  000154 				MOV	154(R0),(R2)			;					1752
000306	016011  000156 				MOV	156(R0),(R1)			;					1753
000312	000414 					BR	12$				;					1750
000314	032713  000400 			10$:	BIT	#400,(R3)			;					1755
000320	001405 					BEQ	11$
000322	016012  000160 				MOV	160(R0),(R2)			;					1757
000326	016011  000162 				MOV	162(R0),(R1)			;					1758
000332	000404 					BR	12$				;					1755
000334	016012  000172 			11$:	MOV	172(R0),(R2)			;					1761
000340	016011  000174 				MOV	174(R0),(R1)			;					1762
000344	042715  001000 			12$:	BIC	#1000,(R5)			; *,LINEB				1764
000350	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1765
000356	112764  000002  000012 			MOVB	#2,12(R4)			; *,*(CCB)				1766
000364	105064  000013 				CLRB	13(R4)				; *(CCB)
000370	000167  000416 			13$:	JMP	26$
000374	004767  000000G			14$:	JSR	PC,$CCBGT			;					1772
000400	103607 					BCS	1$
000402	112764  000006  000032 			MOVB	#6,32(R4)			; *,*(CCB)				1773
000410	016546  000004 				MOV	4(R5),-(SP)			; *(LINEB),*				1774
000414	004767  177212 				JSR	PC,U.11
000420	032765  002000  000002 			BIT	#2000,2(R5)			; *,*(LINEB)				1775
000426	001025 					BNE	15$
000430	032765  001000  000002 			BIT	#1000,2(R5)			; *,*(LINEB)
000436	001021 					BNE	15$
000440	116002  000026 				MOVB	26(R0),R2			; *(PWDB),*				1777
000444	060002 					ADD	R0,R2				; PWDB,*
000446	010200 					MOV	R2,R0
000450	062700  000027 				ADD	#27,R0
000454	010064  000020 				MOV	R0,20(R4)			; *,*(CCB)
000460	116064  000003  000022 			MOVB	3(R0),22(R4)			; *,*(CCB)				1778
000466	105064  000023 				CLRB	23(R4)				; *(CCB)
000472	062764  000004  000022 			ADD	#4,22(R4)			; *,*(CCB)
000500	000410 					BR	16$				;					1775
000502	010064  000020 			15$:	MOV	R0,20(R4)			; PWDB,*(CCB)				1781
000506	062764  000014  000020 			ADD	#14,20(R4)			; *,*(CCB)
000514	012764  000012  000022 			MOV	#12,22(R4)			; *,*(CCB)				1782
000522	042715  002000 			16$:	BIC	#2000,(R5)			; *,LINEB				1784
000526	016564  000032  000010 			MOV	32(R5),10(R4)			; *(LINEB),*(CCB)			1785
000534	112764  000002  000012 			MOVB	#2,12(R4)			; *,*(CCB)				1786
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  42
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

000542	105064  000013 				CLRB	13(R4)				; *(CCB)
000546	004767  000000G				JSR	PC,$SCHED
000552	005726 					TST	(SP)+				;					1769
000554	000520 					BR	27$				;					1709
000556	004767  000000G			17$:	JSR	PC,$CCBGT			;					1791
000562	103517 					BCS	28$
000564	042776  177400  000000 			BIC	#177400,@0(SP)			;					1792
000572	112715  000007 				MOVB	#7,(R5)				; *,LINEB				1793
000576	016564  000026  000010 			MOV	26(R5),10(R4)			; *(LINEB),*(CCB)			1794
000604	112764  000014  000013 			MOVB	#14,13(R4)			; *,*(CCB)				1795
000612	000474 					BR	25$				;					1796
000614	004767  000000G			18$:	JSR	PC,$CCBGT			;					1802
000620	103500 					BCS	28$
000622	042776  177400  000000 			BIC	#177400,@0(SP)			;					1803
000630	052776  001000  000000 			BIS	#1000,@0(SP)
000636	116500  000042 				MOVB	42(R5),R0			; *(LINEB),*				1804
000642	006300 					ASL	R0
000644	066007  000154'				ADD	P.AAG(R0),PC			; Case dispatch
000650	112715  000003 			19$:	MOVB	#3,(R5)				; *,LINEB				1806
000654	000402 					BR	21$				;					1804
000656	112715  000002 			20$:	MOVB	#2,(R5)				; *,LINEB				1807
000662	126527  000002  000005 		21$:	CMPB	2(R5),#5			; *(LINEB),*				1810
000670	001035 					BNE	24$
000672	016700  000002G				MOV	.CRDAT+2,R0			;					1811
000676	005060  000170 				CLR	170(R0)				;					1812
000702	016002  000020 				MOV	20(R0),R2			; *,LINEB
000706	016003  000022 				MOV	22(R0),R3			; *,$XPT$LINEB.CNT
000712	001424 					BEQ	24$
000714	032762  001000  000002 		22$:	BIT	#1000,2(R2)			; *,*(LINEB)				1814
000722	001415 					BEQ	23$
000724	032762  000400  000002 			BIT	#400,2(R2)			; *,*(LINEB)
000732	001011 					BNE	23$
000734	010246 					MOV	R2,-(SP)			; LINEB,*				1815
000736	012746  000001 				MOV	#1,-(SP)
000742	012746  000000V				MOV	#U.26,-(SP)
000746	004767  000000G				JSR	PC,$CALL
000752	062706  000006 				ADD	#6,SP
000756	062702  000104 			23$:	ADD	#104,R2				; *,LINEB
000762	077324 					SOB	R3,22$				; $XPT$LINEB.CNT,*			0000
000764	105065  000002 			24$:	CLRB	2(R5)				; *(LINEB)				1819
000770	016564  000026  000010 			MOV	26(R5),10(R4)			; *(LINEB),*(CCB)			1821
000776	112764  000016  000013 			MOVB	#16,13(R4)			; *,*(CCB)				1822
001004	112764  000016  000012 		25$:	MOVB	#16,12(R4)			; *,*(CCB)				1823
001012	004767  000000G			26$:	JSR	PC,$SCHED			;					1824
001016	105476  000000 			27$:	NEGB	@0(SP)				;					1828
001022	005726 				28$:	TST	(SP)+				;					1634
001024	000207 					RTS	PC

; Routine Size:  267 words,	Routine Base:  $CODE$ + 1470
; Maximum stack depth per invocation:  10 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  43
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (16)

000134						.PSECT	$PLIT$,  RO ,  D  

					P.AAF:						; CASE Table for LINRVR+0034		1709
000134	000000 					.WORD	0				; [3$]
000136	000030 					.WORD	30				; [4$]
000140	000056 					.WORD	56				; [5$]
000142	000122 					.WORD	122				; [7$]
000144	000160 					.WORD	160				; [9$]
000146	000334 					.WORD	334				; [14$]
000150	000554 					.WORD	554				; [18$]
000152	000516 					.WORD	516				; [17$]

					P.AAG:						; CASE Table for LINRVR+0644		1804
000154	000006 					.WORD	6				; [20$]
000156	000006 					.WORD	6				; [20$]
000160	000006 					.WORD	6				; [20$]
000162	000000 					.WORD	0				; [19$]
000164	000000 					.WORD	0				; [19$]
000166	000000 					.WORD	0				; [19$]
000170	000000 					.WORD	0				; [19$]
000172	000000 					.WORD	0				; [19$]
000174	000000 					.WORD	0				; [19$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  44
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (17)

;	  1830	routine LOG_PACKET_HEADER (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  1831	
;	  1832	!++
;	  1833	! FUNCTIONAL DESCRIPTION:
;	  1834	!
;	  1835	!  Constructs the False_NI_msg.
;	  1836	!
;	  1837	! FORMAL PARAMETERS
;	  1838	!
;	  1839	!       LINEb - line data base
;	  1840	!
;	  1841	! IMPLICIT INPUTS
;	  1842	!
;	  1843	!	None
;	  1844	!
;	  1845	! ROUTINE VALUE:
;	  1846	! COMPLETION CODES:
;	  1847	!
;	  1848	!	NONE.
;	  1849	!
;	  1850	! SIDE EFFECTS:
;	  1851	!
;	  1852	!	NONE.
;	  1853	!
;	  1854	!--
;	  1855	
;	  1856	begin
;	  1857	map CCB: ref block field (C_XPT_FIELDS);
;	  1858	require 'XPTSYM';
;	  1895	local TMP;
;	  1896	pointer PTR;
;	  1897	
;	  1898	PTR = .CCB[C_ADDR];
;	  1899	PARAMETER_CM(0,2);                      ! Multiple fields, 2
;	  1900	TMP=getb(PTR);                          ! Message type
;	  1901	PARAMETER_H_1(,TMP);                    ! Hex field, 1 byte: routing flags
;	  1902	TMP=getw(PTR);                          ! Decimal unsigned, 2 bytes:
;	  1903	PARAMETER_DU_2(,TMP);                   !   source node address
;	  1904	end;			!End of LOG_PACKET_HEADER


						.GLOBL	$TPH1


						.SBTTL	LOG.PACKET.HEADER
002516						.PSECT	$CODE$,  RO 

000000	004167  000000G			; LOG.PACKET.HEADER
					U.15:	JSR	R1,$SAVE5			;					1830
000004	005746 					TST	-(SP)
000006	016404  000020 				MOV	20(R4),R4			; *(CCB),PTR				1898
000012	005046 					CLR	-(SP)				;					1899
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  45
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (17)

000014	012700  000002 				MOV	#2,R0
000020	004767  000000G				JSR	PC,$DPCM
000024	005005 					CLR	R5				; TMP					1900
000026	152405 					BISB	(R4)+,R5			; PTR,TMP
000030	110500 					MOVB	R5,R0				; TMP,*					1901
000032	004767  000000G				JSR	PC,$TPH1
000036	112466  000002 				MOVB	(R4)+,2(SP)			; PTR,X					1902
000042	112466  000003 				MOVB	(R4)+,3(SP)			; PTR,X
000046	016605  000002 				MOV	2(SP),R5			; X,TMP
000052	010500 					MOV	R5,R0				; TMP,*					1903
000054	004767  000000G				JSR	PC,$TPDU2
000060	022626 					CMP	(SP)+,(SP)+			;					1830
000062	000207 					RTS	PC

; Routine Size:  26 words,	Routine Base:  $CODE$ + 2516
; Maximum stack depth per invocation:  9 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  46
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (18)

;	  1905	global routine LU_CMP (LINEb,CCB): MCB_DB_CCB novalue =
;	  1906	
;	  1907	!++
;	  1908	! FUNCTIONAL DESCRIPTION:
;	  1909	!
;	  1910	!  Processes a "line up" completion from Decision.
;	  1911	!
;	  1912	! FORMAL PARAMETERS
;	  1913	!
;	  1914	!	CCB[C_LIN] - circuit that is now "up"
;	  1915	!
;	  1916	! IMPLICIT INPUTS
;	  1917	!
;	  1918	!	LINEstate
;	  1919	!
;	  1920	! ROUTINE VALUE:
;	  1921	! COMPLETION CODES:
;	  1922	!
;	  1923	!	NONE.
;	  1924	!
;	  1925	! SIDE EFFECTS:
;	  1926	!
;	  1927	!	Changes circuit state.  Returns parameter CCB to SDB pool.
;	  1928	!
;	  1929	!--
;	  1930	
;	  1931	begin
;	  1932	map CCB: ref block field (C_XPT_fields);
;	  1933	require 'XPTSYM';
;	  1970	
;	  1971	LINEfunction = 0;
;	  1972	$MCB_RETURN_CCB(.CCB);
;	  1973	
;	  1974	if .LINEstate eql TC
;	  1975	then NEXT_STATE (.LINEb, RU)
;	  1976	else NEXT_ACTION (.LINEb);
;	  1977	
;	  1978	end;				!End of LU_CMP 


						.SBTTL	LU.CMP
000000	105065  000040 			LU.CMP::
					U.16:	CLRB	40(R5)				; *(LINEB)				1971
000004	004767  000000G				JSR	PC,$CCBRT			;					1972
000010	121527  000007 				CMPB	(R5),#7				; LINEB,*				1974
000014	001005 					BNE	1$
000016	012700  000010 				MOV	#10,R0				;					1975
000022	004767  000000V				JSR	PC,U.20
000026	000207 					RTS	PC				;					1974
000030	004767  000000V			1$:	JSR	PC,U.19				;					1976
000034	000207 					RTS	PC				;					1905
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  47
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (18)

; Routine Size:  15 words,	Routine Base:  $CODE$ + 2602
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  48
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (19)

;	  1979	routine NEW_FUNCTION (LINEb,FUNC): TLI_LKG_LINEb_FNC novalue =
;	  1980	
;	  1981	!++
;	  1982	! FUNCTIONAL DESCRIPTION:
;	  1983	!
;	  1984	!  Set up a new function and initiate it.
;	  1985	!
;	  1986	! FORMAL PARAMETERS
;	  1987	!
;	  1988	!	LINEB	address of the line data base
;	  1989	!	FUNC	the new function to initiate.
;	  1990	!
;	  1991	! IMPLICIT INPUTS
;	  1992	!
;	  1993	!	None
;	  1994	!
;	  1995	! ROUTINE VALUE: TRUE/FALSE
;	  1996	! COMPLETION CODES:
;	  1997	!
;	  1998	!	None
;	  1999	!
;	  2000	! SIDE EFFECTS:
;	  2001	!       None
;	  2002	!--
;	  2003	
;	  2004	begin
;	  2005	require 'XPTSYM';
;	  2042	
;	  2043	LINEfunction = .FUNC;
;	  2044	LINRVR (.LINEb);
;	  2045	end;                                    ! End of NEW_FUNCTION


						.SBTTL	NEW.FUNCTION
000000	110065  000040 			; NEW.FUNCTION
					U.17:	MOVB	R0,40(R5)			; FUNC,*(LINEB)				2043
000004	004767  176620 				JSR	PC,LINRVR			;					2044
000010	000207 					RTS	PC				;					1979

; Routine Size:  5 words,	Routine Base:  $CODE$ + 2640
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  49
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (20)

;	  2046	routine NEW_STATE (LINEb,STATE): TLI_LKG_LINEb_FNC novalue =
;	  2047	
;	  2048	!++
;	  2049	! FUNCTIONAL DESCRIPTION:
;	  2050	!
;	  2051	!  Set the line on the way to the given new state
;	  2052	!
;	  2053	! FORMAL PARAMETERS
;	  2054	!
;	  2055	!	LINEB	address of the line data base
;	  2056	!	STATE	the desired new state.
;	  2057	!
;	  2058	! IMPLICIT INPUTS
;	  2059	!
;	  2060	!	None
;	  2061	!
;	  2062	! ROUTINE VALUE: TRUE/FALSE
;	  2063	! COMPLETION CODES:
;	  2064	!
;	  2065	!	None
;	  2066	!
;	  2067	! SIDE EFFECTS:
;	  2068	!       None
;	  2069	!--
;	  2070	
;	  2071	begin
;	  2072	require 'XPTSYM';
;	  2109	
;	  2110	LINEstate_desired = .STATE;
;	  2111	if .LINEfunction geq 0
;	  2112	then LINEfunction = 0
;	  2113	else if .LINEfunction lss 0
;	  2114	     then selectone .LINEfunction of
;	  2115	              set
;	  2116	              [-FUNC_TI,-FUNC_TV]:
;	  2117	                  LINEfunction = 0;
;	  2118	              [otherwise]:
;	  2119	                  ;
;	  2120	              tes;
;	  2121	NEXT_ACTION (.LINEb);
;	  2122	end;                                    ! End of NEW_STATE


						.SBTTL	NEW.STATE
000000	110065  000042 			; NEW.STATE
					U.18:	MOVB	R0,42(R5)			; STATE,*(LINEB)			2110
000004	012700  000040 				MOV	#40,R0				;					2111
000010	060500 					ADD	R5,R0				; LINEB,*
000012	105710 					TSTB	(R0)
000014	002401 					BLT	1$
000016	000406 					BR	2$				;					2112
000020	121027  177772 			1$:	CMPB	(R0),#-6			;					2114
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  50
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (20)

000024	002404 					BLT	3$
000026	121027  177773 				CMPB	(R0),#-5
000032	003001 					BGT	3$
000034	105010 				2$:	CLRB	(R0)				;					2117
000036	004767  000000V			3$:	JSR	PC,U.19				;					2121
000042	000207 					RTS	PC				;					2046

; Routine Size:  18 words,	Routine Base:  $CODE$ + 2652
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  51
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

;	  2123	routine NEXT_ACTION (LINEb): LINKAGE_DB novalue =
;	  2124	
;	  2125	!++
;	  2126	! FUNCTIONAL DESCRIPTION:
;	  2127	!
;	  2128	!  Find the next action for the line.
;	  2129	!
;	  2130	! FORMAL PARAMETERS
;	  2131	!
;	  2132	!	LINEB	address of the line data base
;	  2133	!
;	  2134	! IMPLICIT INPUTS
;	  2135	!
;	  2136	!	None
;	  2137	!
;	  2138	! ROUTINE VALUE: TRUE/FALSE
;	  2139	! COMPLETION CODES:
;	  2140	!
;	  2141	!	None
;	  2142	!
;	  2143	! SIDE EFFECTS:
;	  2144	!       None
;	  2145	!--
;	  2146	
;	  2147	begin
;	  2148	require 'XPTSYM';
;	  2185	
;	  2186	case .LINEstate_desired from HA to RU of
;	  2187	    set
;	  2188	    [HA]:
;	  2189	        begin
;	  2190	        Listen_clock = 0;
;	  2191	        Send_TI = false;
;	  2192	        Send_TV = false;
;	  2193	
;	  2194	        if .LINEfunction neq 0 then return;
;	  2195	
;	  2196	        if .LINEstate eql HA then return;
;	  2197	
;	  2198	        selectone .DLLstate of
;	  2199	            set
;	  2200	            [DLL_OFF,DLL_FREE]:
;	  2201	                ;
;	  2202	            [otherwise]:
;	  2203	                return NEW_FUNCTION (.LINEb, FUNCstop);
;	  2204	            tes;
;	  2205	
;	  2206	        if .XPTstate eql ON
;	  2207	        then return NEW_FUNCTION (.LINEb, FUNCline_down);
;	  2208	
;	  2209	        if .Freeing and (.DLLstate neq DLL_FREE)
;	  2210	        then return NEW_FUNCTION (.LINEb, FUNCrelease);
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  52
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

;	  2211	
;	  2212	        LINEstate = .LINEstate_desired;
;	  2213	        end;
;	  2214	    [DT]:
;	  2215	        begin
;	  2216	        Listen_clock = 0;
;	  2217	        Send_TI = false;
;	  2218	        Send_TV = false;
;	  2219	
;	  2220	        if .LINEfunction neq 0 then return;
;	  2221	
;	  2222	        if .LINEstate eql DT then return;
;	  2223	
;	  2224	        return NEW_FUNCTION (.LINEb, FUNCstop);
;	  2225	        end;
;	  2226	    [OFF]:
;	  2227	        begin
;	  2228	        Listen_clock = 0;
;	  2229	        Send_TI = false;
;	  2230	        Send_TV = false;
;	  2231	
;	  2232	        if .LINEfunction neq 0 then return;
;	  2233	
;	  2234	        if .LINEstate eql OFF then return;
;	  2235	
;	  2236	        selectone .DLLstate of
;	  2237	            set
;	  2238	            [DLL_OFF,DLL_FREE]:
;	  2239	                ;
;	  2240	            [otherwise]:
;	  2241	                return NEW_FUNCTION (.LINEb, FUNCstop);
;	  2242	            tes;
;	  2243	
;	  2244	        return NEW_FUNCTION (.LINEb, FUNCline_down);
;	  2245	        end;
;	  2246	    [LR]:
;	  2247	        begin
;	  2248	        Listen_clock = 0;
;	  2249	        Send_TI = false;
;	  2250	        Send_TV = false;
;	  2251	
;	  2252	        if .LINEfunction neq 0 then return;
;	  2253	
;	  2254	        if .LINEstate eql LR then return;
;	  2255	
;	  2256	        return NEW_FUNCTION (.LINEb, FUNCline_down);
;	  2257	        end;
;	  2258	    [DS]:
;	  2259	        begin
;	  2260	        Listen_clock = 0;
;	  2261	        Send_TI = false;
;	  2262	        Send_TV = false;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  53
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

;	  2263	
;	  2264	        if .LINEfunction neq 0 then return;
;	  2265	
;	  2266	        if .LINEstate eql DS then return;
;	  2267	
;	  2268	        return NEW_FUNCTION (.LINEB, FUNCinitialize);
;	  2269	        end;
;	  2270	    [TI]:                               ! Line running; Waiting for TI
;	  2271	        begin
;	  2272	
;	  2273	        if .DLLstate neq DLL_RUNNING then return;
;	  2274	
;	  2275	        If .LINEstate neq TI
;	  2276	        then begin
;	  2277	             LINEstate = TI;
;	  2278	             Send_TI = true;
;	  2279	             end;
;	  2280	
;	  2281	        if .LINEfunction neq 0 then return;
;	  2282	
;	  2283	        selectone true of
;	  2284	            set
;	  2285	            [.Send_TI]:
;	  2286	                return NEW_FUNCTION (.LINEB, FUNC_TI);
;	  2287	            [.Send_TV]:
;	  2288	                return NEW_FUNCTION (.LINEB, FUNC_TV);
;	  2289	            [otherwise]:
;	  2290	                ;
;	  2291	            tes;
;	  2292	
;	  2293	        return;
;	  2294	        end;
;	  2295	    [TV]:                               ! TI received; waiting for TV
;	  2296	        begin
;	  2297	
;	  2298	        if .DLLstate neq DLL_RUNNING then return;
;	  2299	
;	  2300	        if .Nty eql 0 then return;
;	  2301	
;	  2302	        LINEstate = TV;
;	  2303	
;	  2304	        if .LINEfunction neq 0 then return;
;	  2305	
;	  2306	        selectone true of
;	  2307	            set
;	  2308	            [.Send_TI]:
;	  2309	                return NEW_FUNCTION (.LINEB, FUNC_TI);
;	  2310	            [.Send_TV]:
;	  2311	                return NEW_FUNCTION (.LINEB, FUNC_TV);
;	  2312	            [otherwise]:
;	  2313	                ;
;	  2314	            tes;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  54
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

;	  2315	
;	  2316	        return;
;	  2317	        end;
;	  2318	    [TC]:                               ! TI(/TV) exchanged
;	  2319	        begin
;	  2320	
;	  2321	        if .LINEfunction neq 0 then return;
;	  2322	
;	  2323	        if .DLLstate neq DLL_RUNNING then return;
;	  2324	
;	  2325	        selectone true of
;	  2326	            set
;	  2327	            [.Send_TI]:
;	  2328	                return NEW_FUNCTION (.LINEB, FUNC_TI);
;	  2329	            [.Send_TV]:
;	  2330	                return NEW_FUNCTION (.LINEB, FUNC_TV);
;	  2331	            [otherwise]:
;	  2332	                ;
;	  2333	            tes;
;	  2334	
;	  2335	        if .Nty neq 0
;	  2336	        then return NEW_FUNCTION (.LINEB, FUNCline_up);
;	  2337	
;	  2338	        return;
;	  2339	        end;
;	  2340	    [RU]:
;	  2341	        begin
;	  2342	
;	  2343	        if .LINEfunction neq 0 then return;
;	  2344	
;	  2345	        if .DLLstate neq DLL_RUNNING then return;
;	  2346	
;	  2347	        if .XPTstate neq ON then return;
;	  2348	
;	  2349	        if .LINEstate eql RU then return;
;	  2350	
;	  2351	        Listen_clock = 0;		! Stop the initialization timer.
;	  2352	        LINEstate = RU;
;	  2353	        CCB_CMP(.LINEb);                ! Clean out the function CCB queue
;	  2354	
;	  2355	        selectone .Nty of
;	  2356	            set
;	  2357	            [Full,Small]:
;	  2358	                Listen_clock = .Listen_timer;
;	  2359	            [TOPS20]:
;	  2360	                begin
;	  2361	                False_NI_LINEb = .LINEb;
;	  2362	                $XPT_for_each_LINEb_do_begin    ! Start up all adjacent
;	  2363	                    if .Ph2circuit and not .Intercept   ! aspiring
;	  2364	                    then CALL$L(INI_LIN,.LINEb);        ! Phase II nodes
;	  2365	                $XPT_next_LINEb_end;
;	  2366	                end;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  55
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

;	  2367	            [otherwise]:
;	  2368	                ;
;	  2369	            tes;
;	  2370	
;	  2371	        return;
;	  2372	        end;
;	  2373	    tes;
;	  2374	
;	  2375	end;                                    ! End of NEXT_ACTION


						.SBTTL	NEXT.ACTION
000000	004167  000000G			; NEXT.ACTION
					U.19:	JSR	R1,$SAVE5			;					2123
000004	012701  000040 				MOV	#40,R1				;					2194
000010	060501 					ADD	R5,R1				; LINEB,*
000012	116500  000042 				MOVB	42(R5),R0			; *(LINEB),*				2186
000016	006300 					ASL	R0
000020	066007  000176'				ADD	P.AAH(R0),PC			; Case dispatch
000024	005065  000046 			1$:	CLR	46(R5)				; *(LINEB)				2190
000030	042715  003000 				BIC	#3000,(R5)			; *,LINEB				2192
000034	105711 					TSTB	(R1)				;					2194
000036	001165 					BNE	14$
000040	105715 					TSTB	(R5)				; LINEB					2196
000042	001554 					BEQ	12$
000044	116500  000006 				MOVB	6(R5),R0			; *(LINEB),*				2198
000050	002452 					BLT	5$
000052	020027  000001 				CMP	R0,#1
000056	003047 					BGT	5$				;					2203
000060	105761  000001 				TSTB	1(R1)				;					2206
000064	001460 					BEQ	7$				;					2207
000066	032715  004000 				BIT	#4000,(R5)			; *,LINEB				2209
000072	001405 					BEQ	2$
000074	105700 					TSTB	R0
000076	001403 					BEQ	2$
000100	012700  000002 				MOV	#2,R0				;					2210
000104	000564 					BR	19$
000106	116515  000042 			2$:	MOVB	42(R5),(R5)			; *(LINEB),LINEB			2212
000112	000207 					RTS	PC				;					2186
000114	005065  000046 			3$:	CLR	46(R5)				; *(LINEB)				2216
000120	042715  003000 				BIC	#3000,(R5)			; *,LINEB				2218
000124	105711 					TSTB	(R1)				;					2220
000126	001166 					BNE	21$
000130	121527  000001 				CMPB	(R5),#1				; LINEB,*				2222
000134	001566 					BEQ	22$
000136	000417 					BR	5$				;					2224
000140	005065  000046 			4$:	CLR	46(R5)				; *(LINEB)				2228
000144	042715  003000 				BIC	#3000,(R5)			; *,LINEB				2230
000150	105711 					TSTB	(R1)				;					2232
000152	001154 					BNE	21$
000154	121527  000002 				CMPB	(R5),#2				; LINEB,*				2234
000160	001554 					BEQ	22$
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  56
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

000162	116500  000006 				MOVB	6(R5),R0			; *(LINEB),*				2236
000166	002403 					BLT	5$
000170	020027  000001 				CMP	R0,#1
000174	003414 					BLE	7$
000176	012700  000004 			5$:	MOV	#4,R0				;					2241
000202	000525 					BR	19$
000204	005065  000046 			6$:	CLR	46(R5)				; *(LINEB)				2248
000210	042715  003000 				BIC	#3000,(R5)			; *,LINEB				2250
000214	105711 					TSTB	(R1)				;					2252
000216	001162 					BNE	24$
000220	121527  000003 				CMPB	(R5),#3				; LINEB,*				2254
000224	001570 					BEQ	25$
000226	012700  000007 			7$:	MOV	#7,R0				;					2256
000232	000511 					BR	19$
000234	005065  000046 			8$:	CLR	46(R5)				; *(LINEB)				2260
000240	042715  003000 				BIC	#3000,(R5)			; *,LINEB				2262
000244	105711 					TSTB	(R1)				;					2264
000246	001146 					BNE	24$
000250	121527  000004 				CMPB	(R5),#4				; LINEB,*				2266
000254	001554 					BEQ	25$
000256	012700  000003 				MOV	#3,R0				;					2268
000262	000475 					BR	19$
000264	126527  000006  000004 		9$:	CMPB	6(R5),#4			; *(LINEB),*				2273
000272	001172 					BNE	28$
000274	121527  000005 				CMPB	(R5),#5				; LINEB,*				2275
000300	001404 					BEQ	10$
000302	112715  000005 				MOVB	#5,(R5)				; *,LINEB				2277
000306	052715  001000 				BIS	#1000,(R5)			; *,LINEB				2278
000312	105711 				10$:	TSTB	(R1)				;					2281
000314	001161 					BNE	28$
000316	032715  001000 				BIT	#1000,(R5)			; *,LINEB				2283
000322	001037 					BNE	15$				;					2286
000324	032715  002000 				BIT	#2000,(R5)			; *,LINEB				2283
000330	001553 					BEQ	28$
000332	000441 					BR	17$				;					2288
000334	126527  000006  000004 		11$:	CMPB	6(R5),#4			; *(LINEB),*				2298
000342	001146 					BNE	28$
000344	105765  000002 				TSTB	2(R5)				; *(LINEB)				2300
000350	001543 					BEQ	28$
000352	112715  000006 				MOVB	#6,(R5)				; *,LINEB				2302
000356	105711 					TSTB	(R1)				;					2304
000360	001137 					BNE	28$
000362	032715  001000 				BIT	#1000,(R5)			; *,LINEB				2306
000366	001015 					BNE	15$				;					2309
000370	032715  002000 				BIT	#2000,(R5)			; *,LINEB				2306
000374	001531 				12$:	BEQ	28$
000376	000417 					BR	17$				;					2311
000400	105711 				13$:	TSTB	(R1)				;					2321
000402	001126 					BNE	28$
000404	126527  000006  000004 			CMPB	6(R5),#4			; *(LINEB),*				2323
000412	001122 				14$:	BNE	28$
000414	032715  001000 				BIT	#1000,(R5)			; *,LINEB				2325
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  57
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)

000420	001403 					BEQ	16$
000422	012700  000005 			15$:	MOV	#5,R0				;					2328
000426	000413 					BR	19$
000430	032715  002000 			16$:	BIT	#2000,(R5)			; *,LINEB				2325
000434	001403 					BEQ	18$
000436	012700  000006 			17$:	MOV	#6,R0				;					2330
000442	000405 					BR	19$
000444	105765  000002 			18$:	TSTB	2(R5)				; *(LINEB)				2335
000450	001503 					BEQ	28$
000452	012700  000010 				MOV	#10,R0				;					2336
000456	004767  177240 			19$:	JSR	PC,U.17
000462	000207 					RTS	PC
000464	105711 				20$:	TSTB	(R1)				;					2343
000466	001074 					BNE	28$
000470	126527  000006  000004 			CMPB	6(R5),#4			; *(LINEB),*				2345
000476	001070 					BNE	28$
000500	105761  000001 				TSTB	1(R1)				;					2347
000504	001065 				21$:	BNE	28$
000506	121527  000010 				CMPB	(R5),#10			; LINEB,*				2349
000512	001462 				22$:	BEQ	28$
000514	005065  000046 				CLR	46(R5)				; *(LINEB)				2351
000520	112715  000010 				MOVB	#10,(R5)			; *,LINEB				2352
000524	004767  175004 				JSR	PC,U.2				;					2353
000530	116500  000002 				MOVB	2(R5),R0			; *(LINEB),*				2355
000534	020027  000002 				CMP	R0,#2
000540	002407 					BLT	23$
000542	020027  000003 				CMP	R0,#3
000546	003004 					BGT	23$
000550	016565  000024  000046 			MOV	24(R5),46(R5)			; *(LINEB),*(LINEB)			2358
000556	000207 					RTS	PC				;					2355
000560	020027  000005 			23$:	CMP	R0,#5
000564	001035 				24$:	BNE	28$
000566	016700  000002G				MOV	.CRDAT+2,R0			;					2360
000572	010560  000170 				MOV	R5,170(R0)			; LINEB,*				2361
000576	016005  000020 				MOV	20(R0),R5			; *,LINEB
000602	016001  000022 				MOV	22(R0),R1			; *,$XPT$LINEB.CNT
000606	001424 				25$:	BEQ	28$
000610	032765  001000  000002 		26$:	BIT	#1000,2(R5)			; *,*(LINEB)				2363
000616	001415 					BEQ	27$
000620	032765  000400  000002 			BIT	#400,2(R5)			; *,*(LINEB)
000626	001011 					BNE	27$
000630	010546 					MOV	R5,-(SP)			; LINEB,*				2364
000632	012746  000001 				MOV	#1,-(SP)
000636	012746  001370'				MOV	#INI.LIN,-(SP)
000642	004767  000000G				JSR	PC,$CALL
000646	062706  000006 				ADD	#6,SP
000652	062705  000104 			27$:	ADD	#104,R5				; *,LINEB
000656	077124 					SOB	R1,26$				; $XPT$LINEB.CNT,*			0000
000660	000207 				28$:	RTS	PC				;					2123

; Routine Size:  217 words,	Routine Base:  $CODE$ + 2716
; Maximum stack depth per invocation:  10 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  58
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (21)



000176						.PSECT	$PLIT$,  RO ,  D  

					P.AAH:						; CASE Table for NEXT.ACTION+0020	2186
000176	000000 					.WORD	0				; [1$]
000200	000070 					.WORD	70				; [3$]
000202	000114 					.WORD	114				; [4$]
000204	000160 					.WORD	160				; [6$]
000206	000210 					.WORD	210				; [8$]
000210	000240 					.WORD	240				; [9$]
000212	000310 					.WORD	310				; [11$]
000214	000354 					.WORD	354				; [13$]
000216	000440 					.WORD	440				; [20$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  59
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (22)

;	  2376	routine NEXT_STATE (LINEb,STATE): TLI_LKG_LINEb_FNC novalue =
;	  2377	
;	  2378	!++
;	  2379	! FUNCTIONAL DESCRIPTION:
;	  2380	!
;	  2381	!  This is called on an automatic line state change.  It only changes
;	  2382	!  the desired state is not forcing a different state.
;	  2383	!
;	  2384	! FORMAL PARAMETERS
;	  2385	!
;	  2386	!	LINEB	address of the line data base
;	  2387	!	STATE	the desired new state.
;	  2388	!
;	  2389	! IMPLICIT INPUTS
;	  2390	!
;	  2391	!	None
;	  2392	!
;	  2393	! ROUTINE VALUE: TRUE/FALSE
;	  2394	! COMPLETION CODES:
;	  2395	!
;	  2396	!	None
;	  2397	!
;	  2398	! SIDE EFFECTS:
;	  2399	!       None
;	  2400	!--
;	  2401	
;	  2402	begin
;	  2403	require 'XPTSYM';
;	  2440	
;	  2441	if .LINEstate_desired eql .LINEstate
;	  2442	then LINEstate_desired = .STATE;
;	  2443	
;	  2444	NEXT_ACTION (.LINEb);
;	  2445	end;                                    ! End of NEXT_STATE


						.SBTTL	NEXT.STATE
003600						.PSECT	$CODE$,  RO 

000000	126515  000042 			; NEXT.STATE
					U.20:	CMPB	42(R5),(R5)			; *(LINEB),LINEB			2441
000004	001002 					BNE	1$
000006	110065  000042 				MOVB	R0,42(R5)			; STATE,*(LINEB)			2442
000012	004767  177100 			1$:	JSR	PC,U.19				;					2444
000016	000207 					RTS	PC				;					2376

; Routine Size:  8 words,	Routine Base:  $CODE$ + 3600
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  60
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (23)

;	  2446	global routine RCV_HLO (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  2447	
;	  2448	!++
;	  2449	! FUNCTIONAL DESCRIPTION:
;	  2450	!
;	  2451	!
;	  2452	! FORMAL PARAMETERS
;	  2453	!
;	  2454	!	CCB[C_LIN] - Index of circuit data base entry
;	  2455	!	CCB[C_BIAS] - buffer descriptor for the NI
;	  2456	!
;	  2457	! IMPLICIT INPUTS
;	  2458	!
;	  2459	!	LINEstate
;	  2460	!
;	  2461	! ROUTINE VALUE:
;	  2462	! COMPLETION CODES:
;	  2463	!
;	  2464	!	NONE.
;	  2465	!
;	  2466	! SIDE EFFECTS:
;	  2467	!
;	  2468	!
;	  2469	!--
;	  2470	
;	  2471	begin
;	  2472	map CCB: ref block field(C_fields);
;	  2473	require 'XPTSYM';
;	  2510	label MSG_CHECK;
;	  2511	MSG_CHECK:
;	  2512	begin                                   ! MSG_CHECK
;	  2513	local CNT;
;	  2514	pointer PTR;
;	  2515	
;	  2516	! The message is already mapped.
;	  2517	
;	  2518	PTR = ch$plus(.CCB[C_ADDR],1);          ! Address buffer past HELLO flag
;	  2519	
;	  2520	if (CNT = .CCB[C_CNT] - 4) lss 0 then leave MSG_CHECK;
;	  2521	
;	  2522	!
;	  2523	!  Validate the source node address.
;	  2524	!
;	  2525	
;	  2526	if getw(PTR) neq .Nid
;	  2527	then begin                              ! Wrong source node:
;	  2528	     $NM_LOG_BEGIN();                   ! Build event buffer
;	  2529	     LOG_PACKET_HEADER(.LINEb,.CCB);	!   move packet hdr into event buffer
;	  2530	     PARAMETER_CM(4,1);                 !   and expected
;	  2531	     PARAMETER_DU_2(,Nid);              !   node address
;	  2532	     $NM_LOG_END(4^6+$XPT$E_LOF,.NMXid);
;	  2533	     CALL$L(INI_LIN,.LINEb);            !   signal the line should be killed
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  61
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (23)

;	  2534	     leave MSG_CHECK;
;	  2535	     end;
;	  2536	
;	  2537	!
;	  2538	!  Validate the data
;	  2539	!
;	  2540	
;	  2541	if .CNT neq getb(PTR)                   ! Extra or missing data bytes:
;	  2542	then begin                              !   fail
;	  2543	     CALL$L(INI_LIN,.LINEb);
;	  2544	     leave MSG_CHECK;
;	  2545	     end;
;	  2546	
;	  2547	if .CNT neq 0
;	  2548	then do begin
;	  2549	        if getb(PTR) neq %o'252'        !   wrong pattern:
;	  2550	        then begin
;	  2551	             $NM_LOG_BEGIN();           !  log the event
;	  2552	             PARAMETER_C_1(5,uplit(11));
;	  2553	             $NM_LOG_END(4^6+$XPT$E_LLF,.NMXid);
;	  2554	             CALL$L(INI_LIN,.LINEb);
;	  2555	             leave MSG_CHECK;
;	  2556	             end;
;	  2557	        end
;	  2558	     while (CNT = .CNT - 1) neq 0;
;	  2559	
;	  2560	end;                                    ! MSG_CHECK
;	  2561	end;				!End of RCV_HLO



000220						.PSECT	$PLIT$,  RO ,  D  
000220	000013 				P.AAI:	.WORD	13


						.SBTTL	RCV.HLO
003620						.PSECT	$CODE$,  RO 

000000	004167  000000G			RCV.HLO::
					U.21:	JSR	R1,$SAVE3			;					2446
000004	005746 					TST	-(SP)
000006	016402  000020 				MOV	20(R4),R2			; *(CCB),PTR				2518
000012	005202 					INC	R2				; PTR
000014	016403  000022 				MOV	22(R4),R3			; *(CCB),CNT				2520
000020	162703  000004 				SUB	#4,R3				; *,CNT
000024	100474 					BMI	7$
000026	112216 					MOVB	(R2)+,(SP)			; PTR,X					2526
000030	112266  000001 				MOVB	(R2)+,1(SP)			; PTR,X
000034	011600 					MOV	(SP),R0				; X,*
000036	020065  000004 				CMP	R0,4(R5)			; *,*(LINEB)
000042	001421 					BEQ	1$
000044	004767  000000G				JSR	PC,$NLBEG			;					2528
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  62
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (23)

000050	004767  176622 				JSR	PC,U.15				;					2529
000054	012746  000004 				MOV	#4,-(SP)			;					2530
000060	012700  000001 				MOV	#1,R0
000064	004767  000000G				JSR	PC,$DPCM
000070	016500  000004 				MOV	4(R5),R0			; *(LINEB),*				2531
000074	004767  000000G				JSR	PC,$TPDU2
000100	012700  000411 				MOV	#411,R0				;					2532
000104	000425 					BR	4$
000106	005000 				1$:	CLR	R0				;					2541
000110	152200 					BISB	(R2)+,R0			; PTR,*
000112	020300 					CMP	R3,R0				; CNT,*
000114	001402 					BEQ	2$
000116	010546 					MOV	R5,-(SP)			; LINEB,*				2543
000120	000424 					BR	5$
000122	005703 				2$:	TST	R3				; CNT					2547
000124	001434 					BEQ	7$
000126	122227  000252 			3$:	CMPB	(R2)+,#252			; PTR,*					2549
000132	001430 					BEQ	6$
000134	004767  000000G				JSR	PC,$NLBEG			;					2551
000140	012746  000005 				MOV	#5,-(SP)			;					2552
000144	116700  000220'				MOVB	P.AAI,R0
000150	004767  000000G				JSR	PC,$DPC1
000154	012700  000407 				MOV	#407,R0				;					2553
000160	016501  000034 			4$:	MOV	34(R5),R1			; *(LINEB),*
000164	004767  000000G				JSR	PC,$NLEND
000170	010516 					MOV	R5,(SP)				; LINEB,*				2554
000172	012746  000001 			5$:	MOV	#1,-(SP)
000176	012746  001370'				MOV	#INI.LIN,-(SP)
000202	004767  000000G				JSR	PC,$CALL
000206	062706  000006 				ADD	#6,SP				;					2555
000212	000401 					BR	7$
000214	077334 				6$:	SOB	R3,3$				; CNT,*					2558
000216	005726 				7$:	TST	(SP)+				;					2446
000220	000207 					RTS	PC

; Routine Size:  73 words,	Routine Base:  $CODE$ + 3620
; Maximum stack depth per invocation:  9 words
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  63
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

;	  2562	global routine RCV_NI (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  2563	
;	  2564	!++
;	  2565	! FUNCTIONAL DESCRIPTION:
;	  2566	!
;	  2567	!  Processes a received Node Init message (Phase II variety).  If we are in
;	  2568	!  the TI state (expecting a Transport Init), we will send a Node Init, a
;	  2569	!  Node Verify if one is requested, and declare a "line up".  (For sim-
;	  2570	!  plicity, this implementation will never request verification from a Phase
;	  2571	!  II node.) (The "line up" will be delayed until the transmit of the Trans-
;	  2572	!  port Init and Transport Verify have completed.)  The adjacent node type
;	  2573	!  for the circuit will be set to "Phase II".
;	  2574	!
;	  2575	! FORMAL PARAMETERS
;	  2576	!
;	  2577	!	CCB[C_LIN] - Index of circuit data base entry
;	  2578	!	CCB[C_BIAS] - buffer descriptor for the NI
;	  2579	!
;	  2580	! IMPLICIT INPUTS
;	  2581	!
;	  2582	!	LINEstate
;	  2583	!
;	  2584	! ROUTINE VALUE:
;	  2585	! COMPLETION CODES:
;	  2586	!
;	  2587	!	NONE.
;	  2588	!
;	  2589	! SIDE EFFECTS:
;	  2590	!
;	  2591	!	Will mark the node at the other end as Phase II and will perform
;	  2592	!	special Phase II processing against it from now on (until the circuit
;	  2593	!	goes down).  May commence or restart an initialization sequence if
;	  2594	!	we are in the wrong state.
;	  2595	!
;	  2596	!--
;	  2597	
;	  2598	begin
;	  2599	map CCB: ref block field (C_fields);
;	  2600	require 'XPTSYM';
;	  2637	label MSG_CHECK,TI_CHECK;
;	  2638	local GOOD,NODEADDR,NAMEPTR,REQUESTS,BLKSIZE,RET;
;	  2639	
;	  2640	MSG_CHECK:
;	  2641	begin                                   ! MSG_CHECK
;	  2642	pointer PTR;
;	  2643	
;	  2644	MAPBUF(.CCB,PTR);
;	  2645	
;	  2646	!
;	  2647	!  Validate the NI message; if it's no good, treat as a BAD_MSG
;	  2648	!
;	  2649	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  64
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

;	  2650	PTR = ch$plus(.PTR,2);                  ! Bypass MSGFLG and STARTTYPE
;	  2651	
;	  2652	begin                                   ! Get NODEADDR
;	  2653	if biton((NODEADDR = getb(PTR)),%o'200')
;	  2654	then begin
;	  2655	     NODEADDR = .NODEADDR <0, 7>;
;	  2656	     NODEADDR = .NODEADDR + getb(PTR)^7;
;	  2657	     end;
;	  2658	end;
;	  2659	
;	  2660	if .NODEADDR gtru NN
;	  2661	then begin
;	  2662	     GOOD = 4;                          ! Source address too large
;	  2663	     leave MSG_CHECK;
;	  2664	     end;
;	  2665	
;	  2666	begin
;	  2667	local LEN;
;	  2668	NAMEPTR = .PTR;
;	  2669	LEN = getb (PTR);                       ! Get node name length
;	  2670	
;	  2671	selectone .LEN of
;	  2672	    set
;	  2673	    [1 to 6]:
;	  2674	        begin
;	  2675	        PTR = ch$plus(.PTR,.LEN);       ! Bump pointer past name
;	  2676	        end;
;	  2677	    [otherwise]:
;	  2678	        begin
;	  2679	        GOOD = 7;
;	  2680	        leave MSG_CHECK;
;	  2681	        end;
;	  2682	    tes;
;	  2683	end;
;	  2684	
;	  2685	PTR = ch$plus(.PTR,1);                  ! Bypass FUNCTIONS
;	  2686	
;	  2687	REQUESTS = getb(PTR);                   ! Save REQUESTS
;	  2688	
;	  2689	BLKSIZE = getw(PTR);                    ! BLKSIZE
;	  2690	
;	  2691	if .BLKSIZE gtru .PH2size               ! BLKSIZE too large -
;	  2692	then begin
;	  2693	     GOOD = 5;                          !  fail initialization
;	  2694	     leave MSG_CHECK;
;	  2695	     end;
;	  2696	
;	C 2697	%(
;	C 2698	PTR = ch$plus(.PTR,2);                  ! NSPSIZE
;	C 2699	
;	C 2700	PTR = ch$plus(.PTR,2);                  ! MAXLNKS
;	C 2701	
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  65
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

;	C 2702	PTR = ch$plus(.PTR,3);                  ! ROUTVER
;	C 2703	
;	C 2704	PTR = ch$plus(.PTR,3);                  ! COMMVER
;	C 2705	
;	C 2706	begin
;	C 2707	local LEN;
;	C 2708	LEN = GETB(PTR);
;	C 2709	PTR = ch$plus(.PTR,.LEN);               ! SYSVER
;	C 2710	end;
;	  2711	)%
;	  2712	
;	  2713	GOOD = 0;
;	  2714	end;                                    ! MSG_CHECK
;	  2715	
;	  2716	!
;	  2717	!  Dispatch on circuit state
;	  2718	!
;	  2719	
;	  2720	case .LINEstate from HA to RU of
;	  2721	    set
;	  2722	    [TI]:                               ! This is the big case
;	  2723	TI_CHECK:
;	  2724	        begin
;	  2725	        MAP$(.CCB[C_BIAS]);             ! Re-map the buffer
;	  2726	
;	  2727	        !
;	  2728	        !  Good Node Init - send Verification (if requested) and change state
;	  2729	        !
;	  2730	
;	  2731	        if .GOOD eql 0
;	  2732	        then begin
;	  2733	             Ph2circuit = true;
;	  2734	             if not .DTEcircuit         !  Not DTE circuit -
;	  2735	             then begin
;	  2736	                  if (not .Intercept) and
;	  2737	                     (.False_NI_LINEb eqla 0)
;	  2738	                  then begin
;	  2739	                       NEW_STATE (.LINEb, DT);
;	  2740	                       leave TI_CHECK;
;	  2741	                       end;
;	  2742	                  Nty = PhTwo;          !  type is standard Phase II
;	  2743	                  end
;	  2744	             else begin                 !  DTE circuit -
;	  2745	                  GET_FALSE_NI(.LINEb,.CCB);    ! Save NI for later
;	  2746	                  Nty = TOPS20;         !  Node type is TOPS-20
;	  2747	                  end;
;	  2748	             Nid = .NODEADDR;           ! Set node address,
;	  2749	             Nnml = getb (NAMEPTR);     ! name length,
;	  2750	             ch$move (.Nnml,.NAMEPTR,byt$ptr(Nnm));     ! and name.
;	  2751	             Block_size = .BLKSIZE;     ! Block size.
;	  2752	             if not .Ph2only            ! If Phase II NI not sent yet,
;	  2753	             then Send_TI = true;       ! then set to send one.
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  66
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

;	  2754	             if .REQUESTS<0,1> neq 0    ! If requested,
;	  2755	             then Send_TV = true;       ! set to send OTV.
;	  2756	             if .Request_OTV
;	  2757	             then NEXT_STATE (.LINEb, TV)  ! Wait for TV.
;	  2758	             else NEXT_STATE (.LINEb, TC); ! Request a line-up.
;	  2759	             end;
;	  2760	        end;
;	  2761	    [RU]:                               ! Circuit running, message unexpected -
;	  2762		GOOD = 1;                       !    and treat as garbage message
;	  2763	    [TV,TC]:				! Circuit initializing,
;	  2764		GOOD = 2;                       !    and treat as garbage message
;	  2765	    [inrange]:				! In middle of DLL protocol -
;	  2766	        GOOD = 0;
;	  2767	    tes;
;	  2768	
;	  2769	if .GOOD neq 0                          ! If error, then
;	  2770	then BAD_MSG(.LINEb,.CCB,.GOOD);        ! treat as garbage message
;	  2771	end;				!End of RCV_NI


						.GLOBL	KISAR6


						.SBTTL	RCV.NI
000000	004167  000000G			RCV.NI::
					U.22:	JSR	R1,$SAVE5			;					2562
000004	162706  000012 				SUB	#12,SP
000010	010566  000004 				MOV	R5,4(SP)
000014	016467  000016  000000G			MOV	16(R4),KISAR6			; *(CCB),*				2644
000022	016401  000020 				MOV	20(R4),R1			; *(CCB),PTR
000026	062701  000002 				ADD	#2,R1				; *,PTR					2653
000032	005002 					CLR	R2				; NODEADDR
000034	152102 					BISB	(R1)+,R2			; PTR,NODEADDR
000036	100010 					BPL	1$
000040	042702  177600 				BIC	#177600,R2			; *,NODEADDR				2655
000044	005000 					CLR	R0				;					2656
000046	152100 					BISB	(R1)+,R0			; PTR,*
000050	072027  000007 				ASH	#7,R0
000054	060200 					ADD	R2,R0				; NODEADDR,*
000056	010002 					MOV	R0,R2				; *,NODEADDR
000060	016705  000002G			1$:	MOV	.CRDAT+2,R5			;					2660
000064	020265  000016 				CMP	R2,16(R5)			; NODEADDR,*
000070	101403 					BLOS	2$
000072	012716  000004 				MOV	#4,(SP)				; *,GOOD				2662
000076	000437 					BR	6$				;					2663
000100	010103 				2$:	MOV	R1,R3				; PTR,NAMEPTR				2668
000102	005000 					CLR	R0				; LEN					2669
000104	152100 					BISB	(R1)+,R0			; PTR,LEN
000106	005700 					TST	R0				; LEN					2671
000110	003405 					BLE	3$
000112	020027  000006 				CMP	R0,#6				; LEN,*
000116	003002 					BGT	3$
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  67
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

000120	060001 					ADD	R0,R1				; LEN,PTR				2675
000122	000403 					BR	4$				;					2671
000124	012716  000007 			3$:	MOV	#7,(SP)				; *,GOOD				2679
000130	000422 					BR	6$				;					2680
000132	005201 				4$:	INC	R1				; PTR					2687
000134	112166  000006 				MOVB	(R1)+,6(SP)			; PTR,REQUESTS
000140	105066  000007 				CLRB	7(SP)				; REQUESTS
000144	112166  000010 				MOVB	(R1)+,10(SP)			; PTR,X					2689
000150	112166  000011 				MOVB	(R1)+,11(SP)			; PTR,X
000154	016601  000010 				MOV	10(SP),R1			; X,BLKSIZE
000160	020165  000126 				CMP	R1,126(R5)			; BLKSIZE,*				2691
000164	101403 					BLOS	5$
000166	012716  000005 				MOV	#5,(SP)				; *,GOOD				2693
000172	000401 					BR	6$				;					2694
000174	005016 				5$:	CLR	(SP)				; GOOD					2713
000176	117600  000004 			6$:	MOVB	@4(SP),R0			;					2720
000202	006300 					ASL	R0
000204	066007  000222'				ADD	P.AAJ(R0),PC			; Case dispatch
000210	016467  000016  000000G		7$:	MOV	16(R4),KISAR6			; *(CCB),*				2725
000216	005716 					TST	(SP)				; GOOD					2731
000220	001140 					BNE	20$
000222	012700  000002 				MOV	#2,R0				;					2732
000226	066600  000004 				ADD	4(SP),R0
000232	010066  000002 				MOV	R0,2(SP)
000236	052710  001000 				BIS	#1000,(R0)			;					2733
000242	032710  010000 				BIT	#10000,(R0)			;					2734
000246	001021 					BNE	9$
000250	032710  000400 				BIT	#400,(R0)			;					2736
000254	001012 					BNE	8$
000256	005765  000170 				TST	170(R5)				;					2737
000262	001007 					BNE	8$
000264	016605  000004 				MOV	4(SP),R5			;					2739
000270	012700  000001 				MOV	#1,R0
000274	004767  176310 				JSR	PC,U.18
000300	000506 					BR	18$				;					2740
000302	112776  000004  000002 		8$:	MOVB	#4,@2(SP)			;					2742
000310	000407 					BR	10$				;					2734
000312	016605  000004 			9$:	MOV	4(SP),R5			;					2745
000316	004767  174534 				JSR	PC,U.10
000322	112776  000005  000002 			MOVB	#5,@2(SP)			;					2746
000330	016600  000004 			10$:	MOV	4(SP),R0			;					2748
000334	010260  000004 				MOV	R2,4(R0)			; NODEADDR,*
000340	112360  000007 				MOVB	(R3)+,7(R0)			; NAMEPTR,*				2749
000344	010002 					MOV	R0,R2				;					2750
000346	116200  000007 				MOVB	7(R2),R0
000352	010046 					MOV	R0,-(SP)
000354	010346 					MOV	R3,-(SP)			; NAMEPTR,*
000356	012700  000010 				MOV	#10,R0
000362	060200 					ADD	R2,R0
000364	010046 					MOV	R0,-(SP)
000366	004767  000000G				JSR	PC,BL$MOV
000372	016600  000012 				MOV	12(SP),R0			;					2751
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  68
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (24)

000376	010160  000016 				MOV	R1,16(R0)			; BLKSIZE,*
000402	032776  002000  000010 			BIT	#2000,@10(SP)			;					2752
000410	001002 					BNE	11$
000412	052710  001000 				BIS	#1000,(R0)			;					2753
000416	032766  000001  000014 		11$:	BIT	#1,14(SP)			; *,REQUESTS				2754
000424	001403 					BEQ	12$
000426	052776  002000  000012 			BIS	#2000,@12(SP)			;					2755
000434	032777  001000  000002G		12$:	BIT	#1000,@.CRDAT+2			;					2756
000442	001405 					BEQ	13$
000444	016605  000012 				MOV	12(SP),R5			;					2757
000450	012700  000006 				MOV	#6,R0
000454	000404 					BR	14$
000456	016605  000012 			13$:	MOV	12(SP),R5			;					2758
000462	012700  000007 				MOV	#7,R0
000466	004767  177044 			14$:	JSR	PC,U.20
000472	062706  000006 				ADD	#6,SP				;					2732
000476	000407 					BR	18$				;					2720
000500	012716  000001 			15$:	MOV	#1,(SP)				; *,GOOD				2762
000504	000405 					BR	19$				;					2720
000506	012716  000002 			16$:	MOV	#2,(SP)				; *,GOOD				2764
000512	000402 					BR	19$				;					2720
000514	005016 				17$:	CLR	(SP)				; GOOD					2766
000516	005716 				18$:	TST	(SP)				; GOOD					2769
000520	001406 				19$:	BEQ	21$
000522	011646 				20$:	MOV	(SP),-(SP)			; GOOD,*				2770
000524	016605  000006 				MOV	6(SP),R5
000530	004767  173202 				JSR	PC,BAD.MSG
000534	005726 					TST	(SP)+
000536	062706  000012 			21$:	ADD	#12,SP				;					2562
000542	000207 					RTS	PC

; Routine Size:  178 words,	Routine Base:  $CODE$ + 4042
; Maximum stack depth per invocation:  15 words


000222						.PSECT	$PLIT$,  RO ,  D  

					P.AAJ:						; CASE Table for RCV.NI+0204		2720
000222	000304 					.WORD	304				; [17$]
000224	000304 					.WORD	304				; [17$]
000226	000304 					.WORD	304				; [17$]
000230	000304 					.WORD	304				; [17$]
000232	000304 					.WORD	304				; [17$]
000234	000000 					.WORD	0				; [7$]
000236	000276 					.WORD	276				; [16$]
000240	000276 					.WORD	276				; [16$]
000242	000270 					.WORD	270				; [15$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  69
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (25)

;	  2772	global routine RCV_NV (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  2773	
;	  2774	!++
;	  2775	! FUNCTIONAL DESCRIPTION:
;	  2776	!
;	  2777	!  Processes a received Node Verification message.  If we
;	  2778	!  are expecting one, we will validate it and if valid, declare
;	  2779	!  the circuit up.  (If we have not received back the NI message we
;	  2780	!  sent, the "line up" will be delayed until we do.)
;	  2781	!
;	  2782	! FORMAL PARAMETERS
;	  2783	!
;	  2784	!	CCB[C_LIN] - Index of circuit data base entry
;	  2785	!	CCB[C_BIAS] - buffer descriptor for OTV's buffer
;	  2786	!
;	  2787	! IMPLICIT INPUTS
;	  2788	!
;	  2789	!	LINEstate
;	  2790	!
;	  2791	! ROUTINE VALUE:
;	  2792	! COMPLETION CODES:
;	  2793	!
;	  2794	!	NONE.
;	  2795	!
;	  2796	! SIDE EFFECTS:
;	  2797	!
;	  2798	!	May commence or restart an initialization sequence if we are in
;	  2799	!	the wrong state.
;	  2800	!
;	  2801	!--
;	  2802	
;	  2803	begin
;	  2804	map CCB: ref block field (C_fields);
;	  2805	require 'XPTSYM';
;	  2842	local GOOD;
;	  2843	label MSG_CHECK,TV_CHECK;
;	  2844	
;	  2845	MSG_CHECK:
;	  2846	begin                                   ! MSG_CHECK
;	  2847	local CNT;
;	  2848	pointer PTR;
;	  2849	MAPBUF(.CCB,PTR,CNT);
;	  2850	
;	  2851	!
;	  2852	!  Validate the NV message; if it's no good, treat as a BAD_MSG
;	  2853	!
;	  2854	
;	  2855	CNT = .CNT - 10;                        ! Account for full message
;	  2856	
;	  2857	if .CNT lss 0
;	  2858	then begin
;	  2859	     GOOD = 7;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  70
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (25)

;	  2860	     leave MSG_CHECK;
;	  2861	     end;
;	  2862	
;	  2863	GOOD = 0;
;	  2864	end;                                    ! MSG_CHECK
;	  2865	
;	  2866	!
;	  2867	!  Dispatch on circuit state
;	  2868	!
;	  2869	
;	  2870	case .LINEstate from HA to RU of
;	  2871	    set
;	  2872	    [TV]:                               ! This is the big case
;	  2873	TV_CHECK:
;	  2874	        begin
;	  2875	        local PWDb: ref PWDblock;
;	  2876	        pointer PTR;
;	  2877	
;	  2878	        if .GOOD neq 0 then leave TV_CHECK;
;	  2879	
;	  2880	        PWDb = GET_PWDb (.Nid);
;	  2881	        PTR = ch$plus (.CCB[C_ADDR],3);
;	  2882	
;	  2883	        if ch$rchar(byt$ptr (PWD2rcv)) neq 0
;	  2884	        then if ch$neq (8, .PTR, 8, byt$ptr (PWD2rcv), 0)
;	  2885	             then begin
;	  2886	                  GOOD = 8;
;	  2887	                  leave TV_CHECK;
;	  2888	                  end;
;	  2889	
;	  2890	        NEXT_STATE (.LINEb, TC);
;	  2891	        end;
;	  2892	    [RU]:                               ! Circuit running, message unexpected -
;	  2893		GOOD = 1;                       !    and treat as garbage message
;	  2894	    [TI,TC]:				! Circuit initializing,
;	  2895		GOOD = 2;                       !    and treat as garbage message
;	  2896	    [inrange]:				! In middle of DLL protocol -
;	  2897	        GOOD = 0;
;	  2898	    tes;
;	  2899	
;	  2900	if .GOOD neq 0
;	  2901	then BAD_MSG(.LINEb,.CCB,.GOOD);        ! Treat as garbage message
;	  2902	end;				!End of RCV_NV


						.SBTTL	RCV.NV
004606						.PSECT	$CODE$,  RO 

000000	004167  000000G			RCV.NV::
					U.23:	JSR	R1,$SAVE2			;					2772
000004	016467  000016  000000G			MOV	16(R4),KISAR6			; *(CCB),*				2849
000012	016400  000022 				MOV	22(R4),R0			; *(CCB),CNT
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  71
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (25)

000016	162700  000012 				SUB	#12,R0				; *,CNT					2855
000022	100003 					BPL	1$				;					2857
000024	012701  000007 				MOV	#7,R1				; *,GOOD				2859
000030	000401 					BR	2$				;					2860
000032	005001 				1$:	CLR	R1				; GOOD					2863
000034	111500 				2$:	MOVB	(R5),R0				; LINEB,*				2870
000036	006300 					ASL	R0
000040	066007  000244'				ADD	P.AAK(R0),PC			; Case dispatch
000044	005701 				3$:	TST	R1				; GOOD					2878
000046	001402 					BEQ	4$
000050	005746 					TST	-(SP)
000052	000441 					BR	6$
000054	016546  000004 			4$:	MOV	4(R5),-(SP)			; *(LINEB),*				2880
000060	004767  174430 				JSR	PC,U.11
000064	010002 					MOV	R0,R2				; *,PWDB
000066	016400  000020 				MOV	20(R4),R0			; *(CCB),PTR				2881
000072	062700  000003 				ADD	#3,R0				; *,PTR
000076	062702  000004 				ADD	#4,R2				;					2883
000102	105712 					TSTB	(R2)
000104	001420 					BEQ	5$
000106	012716  000010 				MOV	#10,(SP)			;					2884
000112	010046 					MOV	R0,-(SP)			; PTR,*
000114	012746  000010 				MOV	#10,-(SP)
000120	010246 					MOV	R2,-(SP)
000122	005046 					CLR	-(SP)
000124	004767  000000G				JSR	PC,BL$NEQ
000130	062706  000010 				ADD	#10,SP
000134	006000 					ROR	R0
000136	103003 					BCC	5$
000140	012701  000010 				MOV	#10,R1				; *,GOOD				2886
000144	000404 					BR	6$				;					2887
000146	012700  000007 			5$:	MOV	#7,R0				;					2890
000152	004767  176614 				JSR	PC,U.20
000156	005726 				6$:	TST	(SP)+				;					2870
000160	000407 					BR	10$
000162	012701  000001 			7$:	MOV	#1,R1				; *,GOOD				2893
000166	000405 					BR	11$				;					2870
000170	012701  000002 			8$:	MOV	#2,R1				; *,GOOD				2895
000174	000402 					BR	11$				;					2870
000176	005001 				9$:	CLR	R1				; GOOD					2897
000200	005701 				10$:	TST	R1				; GOOD					2900
000202	001404 				11$:	BEQ	12$
000204	010146 					MOV	R1,-(SP)			; GOOD,*				2901
000206	004767  172760 				JSR	PC,BAD.MSG
000212	005726 					TST	(SP)+
000214	000207 				12$:	RTS	PC				;					2772

; Routine Size:  71 words,	Routine Base:  $CODE$ + 4606
; Maximum stack depth per invocation:  9 words


000244						.PSECT	$PLIT$,  RO ,  D  
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  72
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (25)


					P.AAK:						; CASE Table for RCV.NV+0040		2870
000244	000132 					.WORD	132				; [9$]
000246	000132 					.WORD	132				; [9$]
000250	000132 					.WORD	132				; [9$]
000252	000132 					.WORD	132				; [9$]
000254	000132 					.WORD	132				; [9$]
000256	000124 					.WORD	124				; [8$]
000260	000000 					.WORD	0				; [3$]
000262	000124 					.WORD	124				; [8$]
000264	000116 					.WORD	116				; [7$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  73
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)

;	  2903	global routine RCV_TI (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  2904	
;	  2905	!++
;	  2906	! FUNCTIONAL DESCRIPTION:
;	  2907	!
;	  2908	!  Processes a received Transport Init message.  If we are expecting
;	  2909	!  one, we will send a Transport Verify if one is requested and go either
;	  2910	!  to receive a Transport Verify (if we asked for one) or to declare a "line
;	  2911	!  up".  (If we have not received back the TI message we sent, the "line up"
;	  2912	!  will be delayed until we do.)
;	  2913	!
;	  2914	! FORMAL PARAMETERS
;	  2915	!
;	  2916	!	CCB[C_LIN] - Index of circuit data base entry for circuit
;	  2917	!	CCB[C_BIAS] - buffer descriptor for TI
;	  2918	!
;	  2919	! IMPLICIT INPUTS
;	  2920	!
;	  2921	!	LINEstate
;	  2922	!
;	  2923	! ROUTINE VALUE:
;	  2924	! COMPLETION CODES:
;	  2925	!
;	  2926	!	NONE.
;	  2927	!
;	  2928	! SIDE EFFECTS:
;	  2929	!
;	  2930	!	May commence or restart an initialization sequence if we are in
;	  2931	!	the wrong state.
;	  2932	!
;	  2933	!--
;	  2934	
;	  2935	begin
;	  2936	map CCB: ref block field (C_fields);
;	  2937	require 'XPTSYM';
;	  2974	local GOOD,NODEADDR,TIINFO,BLKSIZE;
;	  2975	label MSG_CHECK;
;	  2976	
;	  2977	!
;	  2978	!  If the circuit is a Ph2Circuit, ignore the message
;	  2979	!
;	  2980	
;	  2981	if .Ph2only then return;
;	  2982	
;	  2983	MSG_CHECK:
;	  2984	begin                                   ! MSG_CHECK
;	  2985	local CNT;
;	  2986	pointer PTR;
;	  2987	
;	  2988	MAPBUF (.CCB,PTR,CNT);
;	  2989	
;	  2990	!
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  74
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)

;	  2991	!  Validate the TI message; if it's no good, treat as a BAD_MSG
;	  2992	!
;	  2993	
;	  2994	if (CNT = .CNT - 9) lss 0 then leave MSG_CHECK;
;	  2995	
;	  2996	begin                                   ! CTLFLG
;	  2997	local CTLFLG;
;	  2998	CTLFLG = getb(PTR);
;	  2999	if biton(.CTLFLG,%b'11110000')          ! Check the control header
;	  3000	then begin
;	  3001	     GOOD = 7;                          ! Reserved bits on - no good
;	  3002	     leave MSG_CHECK;
;	  3003	     end;
;	  3004	end;
;	  3005	
;	  3006	if (NODEADDR = getw(PTR)) gtru NN       ! SRCNODE
;	  3007	then begin
;	  3008	     GOOD = 4;                          ! Source node address too large
;	  3009	     leave MSG_CHECK;
;	  3010	     end;
;	  3011	
;	  3012	begin                                   ! TIINFO
;	  3013	TIINFO = getb(PTR);
;	  3014	if biton(.TIINFO,%b'11111000')
;	  3015	then begin
;	  3016	     GOOD = 7;                          ! Reserved bits on
;	  3017	     leave MSG_CHECK;
;	  3018	     end;
;	  3019	selectone .TIINFO<0,2,0> of
;	  3020	    set
;	  3021	    [2,3]:
;	  3022	        0;
;	  3023	    [otherwise]:
;	  3024	        begin
;	  3025		GOOD = 7;                       ! Node type no good
;	  3026	        leave MSG_CHECK;
;	  3027	        end;
;	  3028	    tes;
;	  3029	end;
;	  3030	BLKSIZE = getw(PTR);
;	  3031	
;	  3032	if .BLKSIZE gtru .DLLsize              ! BLKSIZE
;	  3033	then begin
;	  3034	     GOOD = 5;				! Remote blocksize too large
;	  3035	     leave MSG_CHECK;
;	  3036	     end;
;	  3037	
;	  3038	begin                                   ! TIVER
;	  3039	if ((getb(PTR) neq 1) or
;	  3040	    (getb(PTR) neq 3))
;	  3041	then begin
;	  3042	     GOOD = 3;				! Incompatible version number
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  75
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)

;	  3043	     leave MSG_CHECK;
;	  3044	     end;
;	  3045	getb(PTR);
;	  3046	end;
;	  3047	
;	C 3048	%(
;	C 3049	if getb(PTR) neq 0                      ! RESERVED
;	C 3050	then begin
;	C 3051	     GOOD = 7;
;	C 3052	     end;
;	  3053	)%
;	  3054	
;	  3055	GOOD = 0;				! Sorry, nothing wrong
;	  3056	end;                                    ! MSG_CHECK
;	  3057	
;	  3058	!
;	  3059	! Dispatch on circuit state
;	  3060	!
;	  3061	
;	  3062	case .LINEstate from HA to RU of
;	  3063	    set
;	  3064	    [TI]:                               ! This is the big case
;	  3065	        begin
;	  3066	        !
;	  3067	        !  Now process message
;	  3068	        !
;	  3069	
;	  3070	        if .GOOD eql 0
;	  3071	        then begin
;	  3072	             Nty = .TIINFO<0,2,0>;      ! Set routing type.
;	  3073	             Nid = .NODEADDR;           ! Save adjacent node address
;	  3074	             Nnml = 0;                  !  with no name.
;	  3075	             Block_size = .BLKSIZE;     ! This is his block size.
;	  3076	             if biton(.TIINFO,VFY_req)  ! and If requested,
;	  3077	             then Send_TV = true;       ! then schedule one sent.
;	  3078	             if .Request_TV
;	  3079	             then NEXT_STATE (.LINEb, TV)  ! Wait for TV.
;	  3080	             else NEXT_STATE (.LINEb, TC); ! Request a line-up.
;	  3081	             end;
;	  3082	        end;
;	  3083	    [RU]:                               ! Circuit running, message unexpected -
;	  3084		GOOD = 1;                       !    and treat as garbage message
;	  3085	    [TV,TC]:				! Circuit initializing,
;	  3086		GOOD = 2;                       !    and treat as garbage message
;	  3087	    [inrange]:                          ! In middle of DLL protocol -
;	  3088	        GOOD = 0;
;	  3089	    tes;
;	  3090	
;	  3091	if .GOOD neq 0
;	  3092	then BAD_MSG(.LINEb,.CCB,.GOOD);        ! Treat as garbage message
;	  3093	end;				!End of RCV_TI
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  76
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)


						.SBTTL	RCV.TI
005024						.PSECT	$CODE$,  RO 

000000	004167  000000G			RCV.TI::
					U.24:	JSR	R1,$SAVE5			;					2903
000004	024646 					CMP	-(SP),-(SP)
000006	010446 					MOV	R4,-(SP)
000010	010566  000002 				MOV	R5,2(SP)
000014	010500 					MOV	R5,R0				;					2981
000016	032760  002000  000002 			BIT	#2000,2(R0)
000024	001402 					BEQ	1$
000026	000167  000406 				JMP	19$
000032	010400 				1$:	MOV	R4,R0				;					2988
000034	016067  000016  000000G			MOV	16(R0),KISAR6
000042	010401 					MOV	R4,R1
000044	016100  000020 				MOV	20(R1),R0			; *,PTR
000050	010402 					MOV	R4,R2
000052	016201  000022 				MOV	22(R2),R1			; *,CNT
000056	162701  000011 				SUB	#11,R1				; *,CNT					2994
000062	100471 					BMI	8$
000064	005001 					CLR	R1				; CTLFLG				2998
000066	152001 					BISB	(R0)+,R1			; PTR,CTLFLG
000070	032701  000360 				BIT	#360,R1				; *,CTLFLG				2999
000074	001031 					BNE	3$				;					3001
000076	112066  000004 				MOVB	(R0)+,4(SP)			; PTR,X					3006
000102	112066  000005 				MOVB	(R0)+,5(SP)			; PTR,X
000106	016603  000004 				MOV	4(SP),R3			; X,NODEADDR
000112	016701  000002G				MOV	.CRDAT+2,R1
000116	020361  000016 				CMP	R3,16(R1)			; NODEADDR,*
000122	101403 					BLOS	2$
000124	012704  000004 				MOV	#4,R4				; *,GOOD				3008
000130	000446 					BR	8$				;					3009
000132	005002 				2$:	CLR	R2				; TIINFO				3013
000134	152002 					BISB	(R0)+,R2			; PTR,TIINFO
000136	032702  000370 				BIT	#370,R2				; *,TIINFO				3014
000142	001006 					BNE	3$				;					3016
000144	010201 					MOV	R2,R1				; TIINFO,*				3019
000146	042701  177774 				BIC	#177774,R1
000152	020127  000002 				CMP	R1,#2
000156	103003 					BHIS	4$
000160	012704  000007 			3$:	MOV	#7,R4				; *,GOOD				3025
000164	000430 					BR	8$				;					3026
000166	112066  000004 			4$:	MOVB	(R0)+,4(SP)			; PTR,X					3030
000172	112066  000005 				MOVB	(R0)+,5(SP)			; PTR,X
000176	016605  000004 				MOV	4(SP),R5			; X,BLKSIZE
000202	016701  000002G				MOV	.CRDAT+2,R1			;					3032
000206	020561  000124 				CMP	R5,124(R1)			; BLKSIZE,*
000212	101403 					BLOS	5$
000214	012704  000005 				MOV	#5,R4				; *,GOOD				3034
000220	000412 					BR	8$				;					3035
000222	122027  000001 			5$:	CMPB	(R0)+,#1			; PTR,*					3039
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  77
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)

000226	001003 					BNE	6$
000230	122027  000003 				CMPB	(R0)+,#3			; PTR,*					3040
000234	001403 					BEQ	7$
000236	012704  000003 			6$:	MOV	#3,R4				; *,GOOD				3042
000242	000401 					BR	8$				;					3043
000244	005004 				7$:	CLR	R4				; GOOD					3055
000246	117600  000002 			8$:	MOVB	@2(SP),R0			;					3062
000252	006300 					ASL	R0
000254	066007  000266'				ADD	P.AAL(R0),PC			; Case dispatch
000260	005704 				9$:	TST	R4				; GOOD					3070
000262	001056 					BNE	18$
000264	010200 					MOV	R2,R0				; TIINFO,*				3072
000266	042700  177774 				BIC	#177774,R0
000272	016601  000002 				MOV	2(SP),R1
000276	105061  000002 				CLRB	2(R1)
000302	150061  000002 				BISB	R0,2(R1)
000306	010100 					MOV	R1,R0				;					3073
000310	010360  000004 				MOV	R3,4(R0)			; NODEADDR,*
000314	105060  000007 				CLRB	7(R0)				;					3074
000320	010560  000016 				MOV	R5,16(R0)			; BLKSIZE,*				3075
000324	032702  000004 				BIT	#4,R2				; *,TIINFO				3076
000330	001402 					BEQ	10$
000332	052710  002000 				BIS	#2000,(R0)			;					3077
000336	032777  002000  000002G		10$:	BIT	#2000,@.CRDAT+2			;					3078
000344	001405 					BEQ	11$
000346	016605  000002 				MOV	2(SP),R5			;					3079
000352	012700  000006 				MOV	#6,R0
000356	000404 					BR	12$
000360	016605  000002 			11$:	MOV	2(SP),R5			;					3080
000364	012700  000007 				MOV	#7,R0
000370	004767  176160 			12$:	JSR	PC,U.20
000374	000407 					BR	16$				;					3070
000376	012704  000001 			13$:	MOV	#1,R4				; *,GOOD				3084
000402	000405 					BR	17$				;					3062
000404	012704  000002 			14$:	MOV	#2,R4				; *,GOOD				3086
000410	000402 					BR	17$				;					3062
000412	005004 				15$:	CLR	R4				; GOOD					3088
000414	005704 				16$:	TST	R4				; GOOD					3091
000416	001410 				17$:	BEQ	19$
000420	010446 				18$:	MOV	R4,-(SP)			; GOOD,*				3092
000422	016605  000004 				MOV	4(SP),R5
000426	016604  000002 				MOV	2(SP),R4
000432	004767  172316 				JSR	PC,BAD.MSG
000436	005726 					TST	(SP)+
000440	062706  000006 			19$:	ADD	#6,SP				;					2903
000444	000207 					RTS	PC

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


000266						.PSECT	$PLIT$,  RO ,  D  
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  78
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (26)


					P.AAL:						; CASE Table for RCV.TI+0254		3062
000266	000132 					.WORD	132				; [15$]
000270	000132 					.WORD	132				; [15$]
000272	000132 					.WORD	132				; [15$]
000274	000132 					.WORD	132				; [15$]
000276	000132 					.WORD	132				; [15$]
000300	000000 					.WORD	0				; [9$]
000302	000124 					.WORD	124				; [14$]
000304	000124 					.WORD	124				; [14$]
000306	000116 					.WORD	116				; [13$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  79
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (27)

;	  3094	global routine RCV_TV (LINEb,CCB): LINKAGE_DB_CCB novalue =
;	  3095	
;	  3096	!++
;	  3097	! FUNCTIONAL DESCRIPTION:
;	  3098	!
;	  3099	!  Processes a received Transport Verification message.  If we
;	  3100	!  are expecting one, we will validate it and if valid, declare
;	  3101	!  the circuit up.  (If we have not received back the TI message we
;	  3102	!  sent, the "line up" will be delayed until we do.)
;	  3103	!
;	  3104	! FORMAL PARAMETERS
;	  3105	!
;	  3106	!	CCB[C_LIN] - Index of circuit data base entry
;	  3107	!	CCB[C_BIAS] - buffer descriptor for TV's buffer
;	  3108	!
;	  3109	! IMPLICIT INPUTS
;	  3110	!
;	  3111	!	LINEstate
;	  3112	!
;	  3113	! ROUTINE VALUE:
;	  3114	! COMPLETION CODES:
;	  3115	!
;	  3116	!	NONE.
;	  3117	!
;	  3118	! SIDE EFFECTS:
;	  3119	!
;	  3120	!	May commence or restart an initialization sequence if we are in
;	  3121	!	the wrong state.
;	  3122	!
;	  3123	!--
;	  3124	
;	  3125	begin
;	  3126	map CCB: ref block field (C_fields);
;	  3127	require 'XPTSYM';
;	  3164	local GOOD;
;	  3165	label MSG_CHECK,TV_CHECK;
;	  3166	
;	  3167	MSG_CHECK:
;	  3168	begin                                   ! MSG_CHECK
;	  3169	local CNT;
;	  3170	pointer PTR;
;	  3171	MAPBUF(.CCB,PTR,CNT);
;	  3172	
;	  3173	!
;	  3174	!  Validate the TV message; if it's no good, treat as a BAD_MSG
;	  3175	!
;	  3176	
;	  3177	if (CNT = .CNT - 4) lss 0 then leave MSG_CHECK;
;	  3178	
;	  3179	begin                                   ! CTLFLG
;	  3180	local CTLFLG;
;	  3181	CTLFLG = getb(PTR);
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  80
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (27)

;	  3182	if biton(.CTLFLG,%b'11110000')          ! Check the control header
;	  3183	then begin
;	  3184	     GOOD = 7;                          ! Reserved bits on - no good
;	  3185	     leave MSG_CHECK;
;	  3186	     end;
;	  3187	end;
;	  3188	
;	  3189	if getw(PTR) neq .Nid                   ! SRCNODE
;	  3190	then begin
;	  3191	     GOOD = 4;                          ! Source node is not the adjacent node
;	  3192	     leave MSG_CHECK;
;	  3193	     end;
;	  3194	
;	C 3195	%(
;	C 3196	begin                                   ! FCNVAL
;	C 3197	local LEN;
;	C 3198	LEN = getb(PTR);
;	C 3199	PTR = ch$plus(.PTR,.LEN);
;	C 3200	end;
;	  3201	)%
;	  3202	
;	  3203	GOOD = 0;
;	  3204	end;                                    ! MSG_CHECK
;	  3205	
;	  3206	!
;	  3207	!  Dispatch on circuit state
;	  3208	!
;	  3209	
;	  3210	case .LINEstate from HA to RU of
;	  3211	    set
;	  3212	    [TV]:                               ! This is the big case
;	  3213	TV_CHECK:
;	  3214	        begin
;	  3215	        local PWDb: ref PWDblock;
;	  3216	        pointer PTR;
;	  3217	
;	  3218	        if .GOOD neq 0 then leave TV_CHECK;
;	  3219	
;	  3220	        PWDb = GET_PWDb (.Nid);
;	  3221	        PTR = ch$plus (.CCB[C_ADDR],3);
;	  3222	
;	  3223	        if .PWD3rcv_length neq 0
;	  3224	        then if (getb(PTR) neq .PWD3rcv_length) or
;	  3225	                 ch$neq (.PWD3rcv_length, .PTR,
;	  3226	                         .PWD3rcv_length, byt$ptr (PWD3rcv), 0)
;	  3227	             then begin
;	  3228	                  GOOD = 8;
;	  3229	                  leave TV_CHECK;
;	  3230	                  end;
;	  3231	
;	  3232	        NEXT_STATE (.LINEb, TC);
;	  3233	        end;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  81
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (27)

;	  3234	    [RU]:                               ! Circuit running, message unexpected -
;	  3235		GOOD = 1;                       !    and treat as garbage message
;	  3236	    [TI,TC]:				! Circuit initializing,
;	  3237		GOOD = 2;                       !    and treat as garbage message
;	  3238	    [inrange]:				! In middle of DLL protocol -
;	  3239	        GOOD = 0;
;	  3240	    tes;
;	  3241	
;	  3242	if .GOOD neq 0
;	  3243	then BAD_MSG(.LINEb,.CCB,.GOOD);        ! Treat as garbage message
;	  3244	end;				!End of RCV_TV


						.SBTTL	RCV.TV
005472						.PSECT	$CODE$,  RO 

000000	004167  000000G			RCV.TV::
					U.25:	JSR	R1,$SAVE3			;					3094
000004	005746 					TST	-(SP)
000006	016467  000016  000000G			MOV	16(R4),KISAR6			; *(CCB),*				3171
000014	016400  000020 				MOV	20(R4),R0			; *(CCB),PTR
000020	016401  000022 				MOV	22(R4),R1			; *(CCB),CNT
000024	162701  000004 				SUB	#4,R1				; *,CNT					3177
000030	100423 					BMI	3$
000032	005001 					CLR	R1				; CTLFLG				3181
000034	152001 					BISB	(R0)+,R1			; PTR,CTLFLG
000036	032701  000360 				BIT	#360,R1				; *,CTLFLG				3182
000042	001403 					BEQ	1$
000044	012701  000007 				MOV	#7,R1				; *,GOOD				3184
000050	000413 					BR	3$				;					3185
000052	112016 				1$:	MOVB	(R0)+,(SP)			; PTR,X					3189
000054	112066  000001 				MOVB	(R0)+,1(SP)			; PTR,X
000060	011600 					MOV	(SP),R0				; X,*
000062	020065  000004 				CMP	R0,4(R5)			; *,*(LINEB)
000066	001403 					BEQ	2$
000070	012701  000004 				MOV	#4,R1				; *,GOOD				3191
000074	000401 					BR	3$				;					3192
000076	005001 				2$:	CLR	R1				; GOOD					3203
000100	111500 				3$:	MOVB	(R5),R0				; LINEB,*				3210
000102	006300 					ASL	R0
000104	066007  000310'				ADD	P.AAM(R0),PC			; Case dispatch
000110	005701 				4$:	TST	R1				; GOOD					3218
000112	001402 					BEQ	5$
000114	005746 					TST	-(SP)
000116	000445 					BR	8$
000120	016546  000004 			5$:	MOV	4(R5),-(SP)			; *(LINEB),*				3220
000124	004767  173500 				JSR	PC,U.11
000130	010002 					MOV	R0,R2				; *,PWDB
000132	016400  000020 				MOV	20(R4),R0			; *(CCB),PTR				3221
000136	062700  000003 				ADD	#3,R0				; *,PTR
000142	116203  000026 				MOVB	26(R2),R3			; *(PWDB),*				3223
000146	001425 					BEQ	7$
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  82
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (27)

000150	112046 					MOVB	(R0)+,-(SP)			; PTR,*					3224
000152	105066  000001 				CLRB	1(SP)
000156	022603 					CMP	(SP)+,R3
000160	001015 					BNE	6$
000162	010316 					MOV	R3,(SP)				;					3226
000164	010046 					MOV	R0,-(SP)			; PTR,*
000166	010346 					MOV	R3,-(SP)
000170	010246 					MOV	R2,-(SP)			; PWDB,*
000172	062716  000027 				ADD	#27,(SP)
000176	005046 					CLR	-(SP)
000200	004767  000000G				JSR	PC,BL$NEQ
000204	062706  000010 				ADD	#10,SP
000210	006000 					ROR	R0
000212	103003 					BCC	7$
000214	012701  000010 			6$:	MOV	#10,R1				; *,GOOD				3228
000220	000404 					BR	8$				;					3229
000222	012700  000007 			7$:	MOV	#7,R0				;					3232
000226	004767  175654 				JSR	PC,U.20
000232	005726 				8$:	TST	(SP)+				;					3210
000234	000407 					BR	12$
000236	012701  000001 			9$:	MOV	#1,R1				; *,GOOD				3235
000242	000405 					BR	13$				;					3210
000244	012701  000002 			10$:	MOV	#2,R1				; *,GOOD				3237
000250	000402 					BR	13$				;					3210
000252	005001 				11$:	CLR	R1				; GOOD					3239
000254	005701 				12$:	TST	R1				; GOOD					3242
000256	001404 				13$:	BEQ	14$
000260	010146 					MOV	R1,-(SP)			; GOOD,*				3243
000262	004767  172020 				JSR	PC,BAD.MSG
000266	005726 					TST	(SP)+
000270	005726 				14$:	TST	(SP)+				;					3094
000272	000207 					RTS	PC

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


000310						.PSECT	$PLIT$,  RO ,  D  

					P.AAM:						; CASE Table for RCV.TV+0104		3210
000310	000142 					.WORD	142				; [11$]
000312	000142 					.WORD	142				; [11$]
000314	000142 					.WORD	142				; [11$]
000316	000142 					.WORD	142				; [11$]
000320	000142 					.WORD	142				; [11$]
000322	000134 					.WORD	134				; [10$]
000324	000000 					.WORD	0				; [4$]
000326	000134 					.WORD	134				; [10$]
000330	000126 					.WORD	126				; [9$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  83
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (28)

;	  3245	global routine TERM_LIN (LINEb): CALL$ novalue =
;	  3246	
;	  3247	!++
;	  3248	! FUNCTIONAL DESCRIPTION:
;	  3249	!
;	  3250	!  Terminates a circuit, i.e., stops the circuit at the Data Link Level and
;	  3251	!  generates a "line down" event.  The sequence that this routine starts
;	  3252	!  differs from that of INI_LIN in that the circuit will not be restarted;
;	  3253	!  to restart the circuit, call INI_LIN.
;	  3254	!
;	  3255	! FORMAL PARAMETERS
;	  3256	!
;	  3257	!       LINEb - line data base
;	  3258	!
;	  3259	! IMPLICIT INPUTS
;	  3260	!
;	  3261	!	LINEstate
;	  3262	!
;	  3263	! ROUTINE VALUE:
;	  3264	! COMPLETION CODES:
;	  3265	!
;	  3266	!	NONE.
;	  3267	!
;	  3268	! SIDE EFFECTS:
;	  3269	!
;	  3270	!	Changes circuit state.  Declares circuit "down" if it is not down
;	  3271	!	already.  Terminates a Initialize sequence.
;	  3272	! NOTE:	This routine acquires a free CCB.  If it is unable to get one,
;	  3273	!	the function requested will be put in the LINEfunction cell for the
;	  3274	!	circuit.  The function will be retried on timeout.
;	  3275	!
;	  3276	!--
;	  3277	
;	  3278	begin
;	  3279	require 'XPTSYM';
;	  3316	
;	  3317	begin                                   ! Kill all start requests
;	  3318	local Chain;
;	  3319	Chain = .LINEccb;
;	  3320	LINEccb = 0;
;	  3321	while true do
;	  3322	    begin
;	  3323	    local CCB: ref block field (C_fields);
;	  3324	    if (CCB = .Chain) eqla 0 then exitloop;
;	  3325	    Chain = .CCB[C_LNK];
;	  3326	    if (.CCB[C_MOD] eql FM_STR)         !  If this is...
;	  3327	    then begin                          !    ...an initialization function,
;	  3328	         CCB[C_STS] = CE_DIS;           !      then return the CCB to the
;	  3329	         CCB[C_FNC] = FC_CCP;           !      caller with a failure code
;	  3330	         $MCB_SCHEDULE_CCB(.CCB);
;	  3331	         end
;	  3332	    else begin                          ! otherwise
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  84
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (28)

;	  3333	         CCB[C_LNK] = .LINEccb;         ! hold on to it.
;	  3334	         LINEccb = .CCB;
;	  3335	         end;
;	  3336	    end;
;	  3337	end;
;	  3338	
;	  3339	!
;	  3340	!  Do termination processing depending on the circuit state
;	  3341	!
;	  3342	
;	  3343	case .LINEstate from HA to RU of
;	  3344	    set
;	  3345	    [OFF,DT]:                           ! Do nothing
;	  3346	        ;
;	  3347	    [HA]:                               ! Already halted -
;	  3348		CCB_CMP(.LINEb);		!  clean out function queue
;	  3349	    [inrange]:				! Start termination:
;	  3350	        NEW_STATE (.LINEb, DT);
;	  3351	    tes;
;	  3352	
;	  3353	end;				!End of TERM_LIN


						.SBTTL	TERM.LIN
005766						.PSECT	$CODE$,  RO 

000000	016505  000002 			TERM.LIN::
					U.26:	MOV	2(R5),R5			; LINEB(.AP.),*				3319
000004	012701  000050 				MOV	#50,R1
000010	060501 					ADD	R5,R1
000012	011100 					MOV	(R1),R0				; *,CHAIN
000014	005011 					CLR	(R1)				;					3320
000016	010004 				1$:	MOV	R0,R4				; CHAIN,CCB				3324
000020	001421 					BEQ	3$
000022	011400 					MOV	(R4),R0				; CCB,CHAIN				3325
000024	126427  000013  000002 			CMPB	13(R4),#2			; *(CCB),*				3326
000032	001011 					BNE	2$
000034	012764  177520  000014 			MOV	#-260,14(R4)			; *,*(CCB)				3328
000042	112764  000022  000012 			MOVB	#22,12(R4)			; *,*(CCB)				3329
000050	004767  000000G				JSR	PC,$SCHED			;					3330
000054	000760 					BR	1$				;					3326
000056	011114 				2$:	MOV	(R1),(R4)			; *,CCB					3333
000060	010411 					MOV	R4,(R1)				; CCB,*					3334
000062	000755 					BR	1$				;					3321
000064	111500 				3$:	MOVB	(R5),R0				;					3343
000066	006300 					ASL	R0
000070	066007  000332'				ADD	P.AAN(R0),PC			; Case dispatch
000074	000207 				4$:	RTS	PC
000076	004767  172362 			5$:	JSR	PC,U.2				;					3348
000102	000207 					RTS	PC				;					3343
000104	012700  000001 			6$:	MOV	#1,R0				;					3350
000110	004767  174550 				JSR	PC,U.18
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  85
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (28)

000114	000207 				7$:	RTS	PC				;					3245

; Routine Size:  39 words,	Routine Base:  $CODE$ + 5766
; Maximum stack depth per invocation:  1 word


000332						.PSECT	$PLIT$,  RO ,  D  

					P.AAN:						; CASE Table for TERM.LIN+0070		3343
000332	000002 					.WORD	2				; [5$]
000334	000020 					.WORD	20				; [7$]
000336	000020 					.WORD	20				; [7$]
000340	000010 					.WORD	10				; [6$]
000342	000010 					.WORD	10				; [6$]
000344	000010 					.WORD	10				; [6$]
000346	000010 					.WORD	10				; [6$]
000350	000010 					.WORD	10				; [6$]
000352	000010 					.WORD	10				; [6$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  86
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (29)

;	  3354	global routine TLIAST (DATABASE,CCB,MODIFIER): LINKAGE_DB_CCB_MOD novalue =
;	  3355	
;	  3356	!++
;	  3357	! FUNCTIONAL DESCRIPTION:
;	  3358	!
;	  3359	! Processes an asynchronous event from the DLL.  There are three types of
;	  3360	! asynchronous events:
;	  3361	!
;	  3362	!	o  State Change		This allows Transport to follow the DLL
;	  3363	!				state.  State changes drive part of the
;	  3364	!				TLI state machine.
;	  3365	!
;	  3366	!	o  Transient Error	These are "software" errors, which indicate
;	  3367	!				an interruption of the DLL protocol on
;	  3368	!				the circuit.  Receipt of such an error will
;	  3369	!				cause Transport to recycle the circuit, if
;	  3370	!				it is up.
;	  3371	!
;	  3372	!	o  Persistent Error	These are errors from which the device or
;	  3373	!				protocol cannot recover on its own.  If it
;	  3374	!				is a warning, recovery can be made through
;	  3375	!                               initialization, otherwise stop using
;	  3376	!                               the circuit.
;	  3377	!
;	  3378	! All transient and persistent errors (except entry to MOP) cause logging of
;	  3379	! circuit events; no state change does so directly.
;	  3380	!
;	  3381	! FORMAL PARAMETERS
;	  3382	!
;	  3383	!	DATABASE	Dummy parameter; not used
;	  3384	!	CCB		Function CCB for the asynchronous event
;	  3385	!	  CCB[C_MOD]		Event class:
;	  3386	!				  DLL$K_STATE
;	  3387	!				  DLL$K_TRANSIENT_ERROR
;	  3388	!				  DLL$K_PERSISTENT_ERROR
;	  3389	!	  CCB[C_STS]		Specific event type:
;	  3390	!
;	  3391	!				  For DLL$K_STATE:
;	  3392	!					DLL$_STATE_OFF
;	  3393	!					DLL$_STATE_SYNCHRONIZING
;	  3394	!					DLL$_STATE_RUNNING
;	  3395	!					DLL$_STATE_MAINTENANCE
;	  3396	!
;	  3397	!				  For DLL$K_TRANSIENT_ERROR:
;	  3398	!					DLL$_START_RECEIVED
;	  3399	!					DLL$_TRANSMIT_THRESHOLD
;	  3400	!					DLL$_RECEIVE_THRESHOLD
;	  3401	!					DLL$_SELECTION_THRESHOLD
;	  3402	!
;	  3403	!				  For DLL$K_PERSISTENT_ERROR:
;	  3404	!					DLL$_DEVICE_RESPONSE_ERROR
;	  3405	!					DLL$_DEVICE_SERVICE_ERROR
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  87
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (29)

;	  3406	!					DLL$_DEVICE_OPERATION_ERROR
;	  3407	!
;	  3408	!	MODIFIER	Dummy parameter; not used
;	  3409	!
;	  3410	! IMPLICIT INPUTS
;	  3411	!
;	  3412	!	LINEstate
;	  3413	!
;	  3414	! ROUTINE VALUE:
;	  3415	! COMPLETION CODES:
;	  3416	!
;	  3417	!	NONE.
;	  3418	!
;	  3419	! SIDE EFFECTS:
;	  3420	!
;	  3421	!	NONE.
;	  3422	!--
;	  3423	
;	  3424	begin
;	  3425	
;	  3426	local LINEb;
;	  3427	require 'XPTSYM';
;	  3464	map CCB: ref block field (C_XPT_FIELDS);
;	  3465	local CB: ref block field (C_XPT_FIELDS);
;	  3466	local REASON;
;	  3467	literal
;	  3468	    REASONstop = 1^8,
;	  3469	    REASONlog = 1^9,
;	  3470	    REASONinit = 1^10;
;	  3471	
;	  3472	!
;	  3473	!  Address the circuit data base entry
;	  3474	!
;	  3475	
;	  3476	LINEb = $TLI_GET_LINE_DB(.CCB[C_LIN]);
;	  3477	REASON = 0;
;	  3478	
;	  3479	select .CCB[C_MOD] of
;	  3480	    set
;	  3481	    [DLL$K_STATE]:                      ! State change
;	  3482	        CIRCUIT_STATE(.LINEb,.CCB);
;	  3483	    [DLL$K_TRANSIENT_ERROR]:            ! Transient errors
;	  3484	        REASON = REASONinit + REASONlog + 0;	! Synch lost
;	  3485	    [DLL$K_PERSISTENT_ERROR]:           ! Persistent errors
;	  3486	        selectone .block [CCB[C_STS], STS$V_SEVERITY] of
;	  3487	            set
;	  3488	            [STS$K_WARNING]:
;	  3489	                REASON = REASONinit + REASONlog + 0;	! Synch lost
;	  3490	            [otherwise]:
;	  3491	                REASON = REASONstop + REASONlog + 1;    ! Data errors
;	  3492	            tes;
;	  3493	    tes;
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  88
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (29)

;	  3494	
;	  3495	
;	  3496	!
;	  3497	!  Log an event (except for MOP Mode Received)
;	  3498	!
;	  3499	
;	  3500	    if biton(.REASON,REASONlog) then begin
;	  3501		local VALUE;
;	  3502		$NM_LOG_BEGIN();
;	  3503		VALUE = .REASON<0,8>;			! Move in the
;	  3504		PARAMETER_C_1(5,VALUE);			!   reason code
;	  3505	
;	P 3506		$NM_LOG_END(4^6+
;	P 3507		(case .LINEstate from HA to RU of
;	P 3508		set
;	P 3509		[HA,DT,OFF,DS]:	begin
;	P 3510		    COUNTER_INCREMENT(LINEb,XPTini_fail);! Increment the
;	P 3511		    $XPT$E_ILF				!   appropriate counter
;	P 3512				end;			!   ("line down" or
;	P 3513		[inrange]:	begin			!   "initialization failure")
;	P 3514		    COUNTER_INCREMENT(LINEb,XPTlinedn); !   and declare the
;	P 3515		    $XPT$E_LLF				!   appropriate event
;	P 3516				end;
;	  3517		tes),.NMXid);
;	  3518		end;
;	  3519	
;	  3520	!
;	  3521	!  If the error is correctible, reinitialize the circuit.
;	  3522	!  If it is permanent, terminate the circuit.
;	  3523	!
;	  3524	
;	  3525	    if biton(.REASON,REASONinit)        ! Correctible error -
;	  3526	    then selectone .LINEstate of        !   if necessary,
;	  3527	             set
;	  3528	             [RU,TC]:                   !   declare the
;	  3529	                 NEW_STATE (.LINEb, LR);
;	  3530	             [otherwise]:               !   otherwise just
;	  3531	                 NEW_STATE (.LINEb, DS);
;	  3532	             tes;
;	  3533	
;	  3534	    if biton(.REASON,REASONstop)        ! Permanent error -
;	  3535	    then NEW_STATE (.LINEb, DT);        !  bring the circuit down for good
;	  3536	
;	  3537	!
;	  3538	!  Release the function CCB
;	  3539	!
;	  3540	
;	  3541	$MCB_RETURN_CCB(.CCB);
;	  3542	end;			!End of TLIAST


						.GLOBL	GTLINE
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  89
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (29)



						.SBTTL	TLIAST
006104						.PSECT	$CODE$,  RO 

000000	004167  000000G			TLIAST::
					U.27:	JSR	R1,$SAVE5			;					3354
000004	005000 					CLR	R0				;					3476
000006	156400  000010 				BISB	10(R4),R0			; *(CCB),*
000012	004767  000000G				JSR	PC,GTLINE
000016	010005 					MOV	R0,R5				; *,LINEB
000020	005003 					CLR	R3				; REASON				3477
000022	005001 					CLR	R1				;					3479
000024	156401  000013 				BISB	13(R4),R1			; *(CCB),*
000030	005701 					TST	R1
000032	001002 					BNE	1$
000034	004767  172532 				JSR	PC,U.6				;					3482
000040	020127  000002 			1$:	CMP	R1,#2				;					3479
000044	001002 					BNE	2$
000046	012703  003000 				MOV	#3000,R3			; *,REASON				3484
000052	020127  000004 			2$:	CMP	R1,#4				;					3479
000056	001012 					BNE	4$
000060	116400  000014 				MOVB	14(R4),R0			; *(CCB),*				3486
000064	042700  177770 				BIC	#177770,R0
000070	001003 					BNE	3$
000072	012703  003000 				MOV	#3000,R3			; *,REASON				3489
000076	000402 					BR	4$				;					3486
000100	012703  001401 			3$:	MOV	#1401,R3			; *,REASON				3491
000104	032703  001000 			4$:	BIT	#1000,R3			; *,REASON				3500
000110	001443 					BEQ	8$
000112	004767  000000G				JSR	PC,$NLBEG			;					3502
000116	005001 					CLR	R1				; VALUE					3503
000120	150301 					BISB	R3,R1				; REASON,VALUE
000122	012746  000005 				MOV	#5,-(SP)			;					3504
000126	110100 					MOVB	R1,R0				; VALUE,*
000130	004767  000000G				JSR	PC,$DPC1
000134	111500 					MOVB	(R5),R0				; LINEB,*				3517
000136	006300 					ASL	R0
000140	066007  000354'				ADD	P.AAO(R0),PC			; Case dispatch
000144	012700  000103 			5$:	MOV	#103,R0
000150	060500 					ADD	R5,R0				; LINEB,*
000152	004767  000000G				JSR	PC,$IC8
000156	012700  000013 				MOV	#13,R0
000162	000407 					BR	7$
000164	012700  000102 			6$:	MOV	#102,R0
000170	060500 					ADD	R5,R0				; LINEB,*
000172	004767  000000G				JSR	PC,$IC8
000176	012700  000007 				MOV	#7,R0
000202	062700  000400 			7$:	ADD	#400,R0
000206	016501  000034 				MOV	34(R5),R1			; *(LINEB),*
000212	004767  000000G				JSR	PC,$NLEND
000216	005726 					TST	(SP)+				;					3500
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  90
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (29)

000220	032703  002000 			8$:	BIT	#2000,R3			; *,REASON				3525
000224	001415 					BEQ	11$
000226	121527  000007 				CMPB	(R5),#7				; LINEB,*				3526
000232	002406 					BLT	9$
000234	121527  000010 				CMPB	(R5),#10			; LINEB,*
000240	003003 					BGT	9$
000242	012700  000003 				MOV	#3,R0				;					3529
000246	000402 					BR	10$
000250	012700  000004 			9$:	MOV	#4,R0				;					3531
000254	004767  174266 			10$:	JSR	PC,U.18
000260	032703  000400 			11$:	BIT	#400,R3				; *,REASON				3534
000264	001404 					BEQ	12$
000266	012700  000001 				MOV	#1,R0				;					3535
000272	004767  174250 				JSR	PC,U.18
000276	004767  000000G			12$:	JSR	PC,$CCBRT			;					3541
000302	000207 					RTS	PC				;					3354

; Routine Size:  98 words,	Routine Base:  $CODE$ + 6104
; Maximum stack depth per invocation:  8 words


000354						.PSECT	$PLIT$,  RO ,  D  

					P.AAO:						; CASE Table for TLIAST+0140		3517
000354	000000 					.WORD	0				; [5$]
000356	000000 					.WORD	0				; [5$]
000360	000000 					.WORD	0				; [5$]
000362	000020 					.WORD	20				; [6$]
000364	000000 					.WORD	0				; [5$]
000366	000020 					.WORD	20				; [6$]
000370	000020 					.WORD	20				; [6$]
000372	000020 					.WORD	20				; [6$]
000374	000020 					.WORD	20				; [6$]
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  91
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (30)

;	  3543	global routine XCPDAT (LINEb,CCB): MCB_DB_CCB novalue =
;	  3544	
;	  3545	!++
;	  3546	! FUNCTIONAL DESCRIPTION:
;	  3547	!
;	  3548	!  This will be a TI/TV/OTI/OTV message
;	  3549	!
;	  3550	! FORMAL PARAMETERS
;	  3551	!
;	  3552	!	CCB	Function CCB
;	  3553	!
;	  3554	! IMPLICIT INPUTS
;	  3555	!
;	  3556	!	LINEstate
;	  3557	!
;	  3558	! ROUTINE VALUE:
;	  3559	! COMPLETION CODES:
;	  3560	!
;	  3561	!	NONE.
;	  3562	!
;	  3563	! SIDE EFFECTS:
;	  3564	!
;	  3565	!--
;	  3566	
;	  3567	begin
;	  3568	map CCB:ref block field (C_XPT_FIELDS);
;	  3569	require 'XPTSYM';
;	  3606	
;	  3607	if .CCB[C_XPT_TYPE] eql FUNC_TI
;	  3608	then if .LINEstate eql TI
;	  3609	     then Listen_clock = .Init_timer;
;	  3610	
;	  3611	CCB[C_XPT_TYPE] = -.CCB[C_XPT_TYPE];
;	  3612	
;	  3613	if .LINEfunction eql .CCB[C_XPT_TYPE]   ! (These functions can be cancelled)
;	  3614	then LINEfunction = 0;
;	  3615	
;	  3616	$MCB_RETURN_CCB(.CCB);
;	  3617	
;	  3618	NEXT_ACTION (.LINEb);
;	  3619	end;                                    ! End of XCPDAT


						.SBTTL	XCPDAT
006410						.PSECT	$CODE$,  RO 

000000	012701  000032 			XCPDAT::
					U.28:	MOV	#32,R1				;					3607
000004	060401 					ADD	R4,R1				; CCB,*
000006	121127  000005 				CMPB	(R1),#5
000012	001010 					BNE	1$
000014	121527  000005 				CMPB	(R5),#5				; LINEB,*				3608
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  92
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (30)

000020	001005 					BNE	1$
000022	016700  000002G				MOV	.CRDAT+2,R0			;					3609
000026	016065  000070  000046 			MOV	70(R0),46(R5)			; *,*(LINEB)
000034	105411 				1$:	NEGB	(R1)				;					3611
000036	126511  000040 				CMPB	40(R5),(R1)			; *(LINEB),*				3613
000042	001002 					BNE	2$
000044	105065  000040 				CLRB	40(R5)				; *(LINEB)				3614
000050	004767  000000G			2$:	JSR	PC,$CCBRT			;					3616
000054	004767  174226 				JSR	PC,U.19				;					3618
000060	000207 					RTS	PC				;					3543

; Routine Size:  25 words,	Routine Base:  $CODE$ + 6410
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  93
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (31)

;	  3620	global routine XCPINI (LINEb,CCB): MCB_DB_CCB novalue =
;	  3621	
;	  3622	!++
;	  3623	! FUNCTIONAL DESCRIPTION:
;	  3624	!
;	  3625	!  This will be a TI/TV/OTI/OTV/HELLO message
;	  3626	!
;	  3627	! FORMAL PARAMETERS
;	  3628	!
;	  3629	!	CCB	Function CCB
;	  3630	!
;	  3631	! IMPLICIT INPUTS
;	  3632	!
;	  3633	!	LINEstate
;	  3634	!
;	  3635	! ROUTINE VALUE:
;	  3636	! COMPLETION CODES:
;	  3637	!
;	  3638	!	NONE.
;	  3639	!
;	  3640	! SIDE EFFECTS:
;	  3641	!
;	  3642	!--
;	  3643	
;	  3644	begin
;	  3645	map CCB:ref block field (C_XPT_FIELDS);
;	  3646	require 'XPTSYM';
;	  3683	
;	  3684	LINEfunction = 0;
;	  3685	$MCB_RETURN_CCB (.CCB);
;	  3686	NEXT_ACTION (.LINEb);
;	  3687	end;                                    ! End of XCPINI


						.SBTTL	XCPINI
000000	105065  000040 			XCPINI::
					U.29:	CLRB	40(R5)				; *(LINEB)				3684
000004	004767  000000G				JSR	PC,$CCBRT			;					3685
000010	004767  174210 				JSR	PC,U.19				;					3686
000014	000207 					RTS	PC				;					3620

; Routine Size:  7 words,	Routine Base:  $CODE$ + 6472
; Maximum stack depth per invocation:  1 word
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  94
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (32)

;	  3688	global routine XCPSTP (LINEb,CCB): MCB_DB_CCB novalue =
;	  3689	
;	  3690	!++
;	  3691	! FUNCTIONAL DESCRIPTION:
;	  3692	!
;	  3693	!  This will be a TI/TV/OTI/OTV/HELLO message
;	  3694	!
;	  3695	! FORMAL PARAMETERS
;	  3696	!
;	  3697	!	CCB	Function CCB
;	  3698	!
;	  3699	! IMPLICIT INPUTS
;	  3700	!
;	  3701	!	LINEstate
;	  3702	!
;	  3703	! ROUTINE VALUE:
;	  3704	! COMPLETION CODES:
;	  3705	!
;	  3706	!	NONE.
;	  3707	!
;	  3708	! SIDE EFFECTS:
;	  3709	!
;	  3710	!--
;	  3711	
;	  3712	begin
;	  3713	map CCB:ref block field (C_XPT_FIELDS);
;	  3714	require 'XPTSYM';
;	  3751	
;	  3752	LINEfunction = 0;
;	  3753	$MCB_RETURN_CCB (.CCB);
;	  3754	NEXT_ACTION (.LINEb);
;	  3755	end;                                    ! End of XCPSTP


						.SBTTL	XCPSTP
000000	105065  000040 			XCPSTP::
					U.30:	CLRB	40(R5)				; *(LINEB)				3752
000004	004767  000000G				JSR	PC,$CCBRT			;					3753
000010	004767  174172 				JSR	PC,U.19				;					3754
000014	000207 					RTS	PC				;					3688

; Routine Size:  7 words,	Routine Base:  $CODE$ + 6510
; Maximum stack depth per invocation:  1 word


;	  3756	end                                     ! End of module TLILIN
;	  3757	eludom



;					OTS external references
						.GLOBL	$SAVE5, $SAVE4, $SAVE3, $SAVE2
TLILIN								25-Jan-1983 10:00:24	TOPS-20 Bliss-16 2A(530)	    Page  95
X01640								30-Dec-1982 21:14:18	NETPKG:<XPT>TLILIN.BLI.10 (32)

						.GLOBL	$CALL, BL$NEQ, BL$MOV


;					PSECT SUMMARY
;
;	Psect Name			Words	  Attributes
;	 $PLIT$				  127	    RO ,  D  ,  LCL,  REL,  CON
;	 $CODE$				 1707	    RO ,  I  ,  LCL,  REL,  CON




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  NETPKG:<MCB>XPORTX.L16.15		       599         3         0         0
;  NETPKG:<MCB>MCBLIB.L16.15		       372        45        12         0
;  NETPKG:<MCB>NMXLIB.L16.13		       200        13         6         0
;  NETPKG:<XPT>XPTLIB.L16.3		       510       265        51         0





; Size:		1707 code + 127 data words
; Run Time:	00:37.7
; Elapsed Time:	02:14.6
; Memory Used:	78 pages
; Compilation Complete
ADDR				1394	1461
ADDRESS				 357+	 359+	 360+	 362+	 363+	 365+	 366+	 372+	 373+	 376+	 377+	 378+
BAD_MSG				 415	 467*	2770	2901	3092	3243
BITON				1378	2653	2999	3014	3076	3182	3500	3525	3534
BLISS16				 407	 451
BLISS36				 452
BLKSIZE				2638	2689#	2691	2751	2974	3030#	3032	3075
BLOCK_SIZE			2751#	3075#
BPT				 386+#	 398+#
BUFCHK				 390+	 391+#	 400+	 401+#
BYT$PTR				2750	2883	2884	3226
BYT$SHORT_STRING		1388	1389
CALL$L				 643	1815	2364	2533	2543	2554
CALL$				 426	 440	1466#	3245#
CB				1047	1122	3465
CCB				 467	 515	 570	 584	 591	 601	 617	 714	 715#	 716	 717#	 718#
				 719	 723	 748	 794	 809	 811	 815	 840	 883	 963	 989	1028
				1128	1158	1201#	1202	1219	1249	1292#	1293	1305	1332	1372	1375
				1376	1551	1581	1621	1713	1714	1715#	1716#	1717	1721	1722	1724#
				1725	1729	1730	1733#	1734	1738	1739	1741#	1742	1746	1747	1748#
				1749#	1752#	1753#	1757#	1758#	1761#	1762#	1765#	1766	1770	1772	1773#
				1777#	1778#	1781#	1782#	1785#	1786	1790	1791	1794#	1795#	1796#	1797
				1801	1802	1821#	1822#	1823#	1824	1830	1857	1898	1905	1932	1972
				2446	2472	2518	2520	2529	2562	2599	2644	2725	2745	2770	2772
				2804	2849	2881	2901	2903	2936	2988	3092	3094	3126	3171	3221
				3243	3323	3324#	3325	3326	3328#	3329#	3330	3333#	3334	3354	3464
				3476	3479	3482	3486	3541	3543	3568	3607	3611#	3613	3616	3620
				3645	3685	3688	3713	3753
CCB_CMP				 416	 645*	 812	 884	2353	3348
CCPSTP				 417	 815*
CCPSTR				 418	 723*
CE_DIS				3328
CH$WCHAR			1386
CHAIN				3318	3319#	3324	3325#
CHKBUF				 393+*	 394+
CIRCUIT_DOWN			 419	 887*	1038	1043
CIRCUIT_STATE			 420	 809	 963*	3482
CIRCUIT_UP			 421	1054	1060*
CKTOFF				 422	1128*
CKTON				 423	1219*
CNT				2513	2520#	2541	2547	2558#	2847	2849	2855#	2857	2985	2988	2994#
				3169	3171	3177#
COUNTER_INCREMENT		 583	 590	 600	 616	 626	 634	3510	3514
CTLFLG				2997	2998#	2999	3180	3181#	3182
C_ADDR				 570	1372	1375	1752	1757	1761	1777	1781	1898	2518	2881	3221
C_BIAS				1749	2725
C_CNT				1375	1376	1753	1758	1762	1778	1782	2520
C_FIELDS			 748	 840	2472	2599	2804	2936	3126	3323
C_FNC				 717	1796	1823	3329
C_HANDLE			1716	1724	1733	1741	1765	1785	1794	1821
C_LIN				3476
C_LNK				 716	1201	1292	3325	3333
C_MOD				1795	1822	3326	3479
C_PRM1				 794	1715
C_STS				 718	1028	3328	3486
C_XPT_FIELDS			 515	 714	 989	1047	1122	1158	1249	1332	1581	1713	1721	1729
				1738	1746	1770	1790	1801	1857	1932	3464	3465	3568	3645	3713
C_XPT_TYPE			1748	1773	3607	3611	3613
DATABASE			3354
DLL$K_PERSISTENT_ERROR		3485
DLL$K_STATE			3481
DLL$K_TRANSIENT_ERROR		3483
DLL$_STATE_MAINTENANCE		1040
DLL$_STATE_OFF			1035
DLL$_STATE_RUNNING		1051
DLL$_STATE_SYNCHRONIZING	1045
DLLHANDLE			1716	1724	1733	1741	1765	1785
DLLSIZE				3032
DLLSTATE			 880#	1037#	1042#	1048#	1053#	2198	2209	2236	2273	2298	2323	2345
DLL_FREE			 880	2200	2209	2238
DLL_MAINTENANCE			1042
DLL_OFF				1037	2200	2238
DLL_RUNNING			1053	2273	2298	2323	2345
DLL_SYNCHRONIZING		1048
DS				 803	 957	1124	1545	1626	1731	1806	2258	2266	3509	3531
DT				 954	1212	1544	1740	1807	2214	2222	2739	3345	3350	3509	3535
DTECIRCUIT			2734
FALSE_NI_LINEB			1812#	2361#	2737
FALSE_NI_MSG_ADDR		1374	1761
FALSE_NI_MSG_CNT		1376#	1762
FALSE				 881	 882	1732	1764	1784	2191	2192	2217	2218	2229	2230	2249
				2250	2261	2262
FC_CCP				 717	3329
FC_RCP				1796	1823
FM_STR				3326
FREEING				 881#	1204#	2209
FULL				2357
FUNC				1979	2043
FUNCHI				1709
FUNCINITIALIZE			1727	2268
FUNCLINE_DOWN			1799	2207	2244	2256
FUNCLINE_UP			1788	2336
FUNCLO				1709
FUNCRELEASE			1214	1719	2210
FUNCREQUEST			1302	1711
FUNCSTOP			1736	2203	2224	2241
FUNC_TI				1744	1748	2116	2286	2309	2328	3607
FUNC_TV				1768	1773	2116	2288	2311	2330
GETB				 604	 606	 608	1378	1381	1900	2541	2549	2653	2656	2669	2687
				2749	2998	3013	3039	3040	3045	3181	3224
GETQ				 357+#
GETW				 336+#	 359+	 360+	 628	1902	2526	2689	3006	3030	3189
GET_FALSE_NI			 424	1305*	2745
GET_PWDB			 425	1394*	1774	2880	3220
GOOD				2638	2662#	2679#	2693#	2713#	2731	2762#	2764#	2766#	2769	2770	2842
				2859#	2863#	2878	2886#	2893#	2895#	2897#	2900	2901	2974	3001#	3008#
				3016#	3025#	3034#	3042#	3055#	3070	3084#	3086#	3088#	3091	3092	3164
				3184#	3191#	3203#	3218	3228#	3235#	3237#	3239#	3242	3243
HA				 950	1211	1540	1544	1623	1628	1723	1804	1807	2186	2188	2196
				2720	2870	3062	3210	3343	3347	3507	3509
I				 381+	 383+
INIT_TIMER			3609
INI_LIN				 426	 643	1466*	2364	2533	2543	2554
INTERCEPT			1755	1814	2363	2736
J				 381+	 383+
LCV				 793	 794#	 795#
LD_CMP				 427	1551*
LEN				2667	2669#	2671	2675
LINEBLOCK			 543+	 701+	 776+	 868+	 939+	1017+	1112+	1186+	1277+	1360+	1448+	1525+
				1609+	1696+	1885+	1960+	2032+	2099+	2175+	2430+	2500+	2627+	2832+	2964+
				3154+	3306+	3454+	3596+	3673+	3741+
LINEB_				1466	1535
LINEB				 467	 541+	 543+	 583	 584	 590	 591	 600	 601	 617	 634	 643
				 645	 699+	 701+	 723	 774+	 776+	 803	 809	 812	 813	 815	 866+
				 868+	 884	 885	 887	 937+	 939+	 953	 955	 957	 963	1015+	1017+
				1038	1043	1054	1060	1110+	1112+	1125	1128	1184+	1186+	1212	1215
				1219	1275+	1277+	1303	1305	1358+	1360+	1446+	1448+	1497	1523+	1525+
				1535#	1543	1545	1551	1607+	1609+	1626	1628	1630	1634	1694+	1696+
				1815	1830	1883+	1885+	1905	1958+	1960+	1975	1976	1979	2030+	2032+
				2044	2046	2097+	2099+	2121	2123	2173+	2175+	2203	2207	2210	2224
				2241	2244	2256	2268	2286	2288	2309	2311	2328	2330	2336	2353
				2361	2364	2376	2428+	2430+	2444	2446	2498+	2500+	2529	2533	2543
				2554	2562	2625+	2627+	2739	2745	2757	2758	2770	2772	2830+	2832+
				2890	2901	2903	2962+	2964+	3079	3080	3092	3094	3152+	3154+	3232
				3243	3245	3304+	3306+	3348	3350	3426	3452+	3454+	3476#	3482	3510
				3514	3529	3531	3535	3543	3594+	3596+	3618	3620	3671+	3673+	3686
				3688	3739+	3741+	3754
LINECCB				 715	 716#	1201	1202#	1292	1293#	3319	3320#	3333	3334#
LINEFUNCTION			 787#	 879#	1214#	1302#	1620#	1707	1709	1828#	1971#	2043#	2111	2112#
				2113	2114	2117#	2194	2220	2232	2252	2264	2281	2304	2321	2343
				3613	3614#	3684#	3752#
LINESTATE			 950	1124	1211	1540	1623	1723#	1731#	1740#	1793#	1806#	1807#	1974
				2196	2212#	2222	2234	2254	2266	2275	2277#	2302#	2349	2352#	2441
				2720	2870	3062	3210	3343	3507	3526	3608
LINESTATE_DESIRED		1804	2110#	2186	2212	2441	2442#
LINKAGE_DB_CCB			 415	 420	 422	 423	 424	 429	 435	 436	 437	 438	 439	 467#
				 963#	1128#	1219#	1305#	1830#	2446#	2562#	2772#	2903#	3094#
LINKAGE_DB_CCB_MOD		 441	3354#
LINKAGE_DB			 416	 419	 421	 428	 433	 645#	 887#	1060#	1634#	2123#
LINRVR				 428	1303	1634*	2044
LISTEN_CLOCK			2190#	2216#	2228#	2248#	2260#	2351#	2358#	3609#
LISTEN_TIMER			2358
LOG_PACKET_HEADER		 429	 584	 591	 601	 617	1830*	2529
LR				 953	1543	1625	1806	2246	2254	3529
LU_CMP				 430	1905*
M				 381+	 382+
MAP$				2725
MAPBUF				2644	2849	2988	3171
MATRIX				 381+#	 383+
MCB$GAW_PROCESS_DATA_BASE	 546+	 547+	 550+	 704+	 705+	 708+	 779+	 780+	 783+	 871+	 872+	 875+
				 942+	 943+	 946+	1020+	1021+	1024+	1115+	1116+	1119+	1189+	1190+	1193+
				1280+	1281+	1284+	1363+	1364+	1367+	1451+	1452+	1455+	1528+	1529+	1532+
				1612+	1613+	1616+	1699+	1700+	1703+	1888+	1889+	1892+	1963+	1964+	1967+
				2035+	2036+	2039+	2102+	2103+	2106+	2178+	2179+	2182+	2433+	2434+	2437+
				2503+	2504+	2507+	2630+	2631+	2634+	2835+	2836+	2839+	2967+	2968+	2971+
				3157+	3158+	3161+	3309+	3310+	3313+	3457+	3458+	3461+	3599+	3600+	3603+
				3676+	3677+	3680+	3744+	3745+	3748+
MCB_DB_CCB			 417	 418	 427	 430	 442	 443	 444	 723#	 815#	1551#	1905#	3543#
				3620#	3688#
MODIFIER			3354
MSG_CHECK			2510	2511	2520	2534	2544	2555	2637	2640	2663	2680	2694	2843
				2845	2860	2975	2983	2994	3002	3009	3017	3026	3035	3043	3165
				3167	3177	3185	3192
N				 381+	 382+
NAME				 450	 454
NAMEPTR				2638	2668#	2749	2750
NEW_FUNCTION			 431	1979*	2203	2207	2210	2224	2241	2244	2256	2268	2286	2288
				2309	2311	2328	2330	2336
NEW_STATE			 432	 803	 953	 957	1212	1543	1545	2046*	2739	3350	3529	3531
				3535
NEXT_ACTION			 433	 813	 885	1215	1630	1976	2121	2123*	2444	3618	3686	3754
NEXT_STATE			 434	 955	1125	1626	1628	1975	2376*	2757	2758	2890	3079	3080
				3232
NID				1774	2526	2531	2748#	2880	3073#	3189	3220
NI_MSG_ADDR			1757
NI_MSG_CNT			1758
NL				 381+	 383+
NM$SUC				 718
NMSTATE				 802
NMXID				 641	2532	2553	3517
NN				2660	3006
NNM				2750
NNML				2749#	2750	3074#
NODEADDR			2638	2653#	2655#	2656#	2660	2748	2974	3006#	3073
NODEBLOCK			 538+	 696+	 771+	 863+	 934+	1012+	1107+	1181+	1272+	1355+	1443+	1520+
				1604+	1691+	1880+	1955+	2027+	2094+	2170+	2425+	2495+	2622+	2827+	2959+
				3149+	3301+	3449+	3591+	3668+	3736+
NODEB				 536+	 538+	 694+	 696+	 769+	 771+	 861+	 863+	 932+	 934+	1010+	1012+
				1105+	1107+	1179+	1181+	1270+	1272+	1353+	1355+	1441+	1443+	1518+	1520+
				1602+	1604+	1689+	1691+	1878+	1880+	1953+	1955+	2025+	2027+	2092+	2094+
				2168+	2170+	2423+	2425+	2493+	2495+	2620+	2622+	2825+	2827+	2957+	2959+
				3147+	3149+	3299+	3301+	3447+	3449+	3589+	3591+	3666+	3668+	3734+	3736+
NOP				 398+	 399+	 401+
NO_LINEB			 542+	 700+	 775+	 867+	 938+	1016+	1111+	1185+	1276+	1359+	1447+	1524+
				1608+	1695+	1884+	1959+	2031+	2098+	2174+	2429+	2499+	2626+	2831+	2963+
				3153+	3305+	3453+	3595+	3672+	3740+
NO_NODEB			 537+	 695+	 770+	 862+	 933+	1011+	1106+	1180+	1271+	1354+	1442+	1519+
				1603+	1690+	1879+	1954+	2026+	2093+	2169+	2424+	2494+	2621+	2826+	2958+
				3148+	3300+	3448+	3590+	3667+	3735+
NTY				1810	1819#	2300	2335	2355	2742#	2746#	3072#
OFF				 955	1542	1627	1803	1807	2226	2234	3345	3509
ON				 802	1792	2206	2347
OTI_CTLFLG			1372
OWNED				 882#	1295#
P				 597	 598#	 604	 606	 608	 623	 624#	 628
PARAMETER_CM			 603	 627	1899	2530
PARAMETER_C_1			 585	 592	 611	 618	 635	2552	3504
PARAMETER_DU_1			 605	 607	 609
PARAMETER_DU_2			 629	1903	2531
PARAMETER_H_1			1901
PH2CIRCUIT			1732#	1750	1775	1814	2363	2733#
PH2ONLY				1750	1775	2752	2981
PH2SIZE				1388	1389	2691
PHTWO				2742
POINTER				 597	 623	1370	1896	2514	2642	2848	2876	2986	3170	3216
PTR				 336+	 339+	 340+	 343+	 346+	 347+	 353+	 354+	 357+	 359+	 360+	 362+
				 365+	 366+	 367+	 368+	 372+	 373+	 566	 570#	 598	 624	1370	1374#
				1375	1377#	1378	1381	1382#	1384#	1386	1387#	1388	1389	1390	1896
				1898#	1900	1902	2514	2518#	2526	2541	2549	2642	2644	2650#	2653
				2656	2668	2669	2675#	2685#	2687	2689	2848	2849	2876	2881#	2884
				2986	2988	2998	3006	3013	3030	3039	3040	3045	3170	3171	3181
				3189	3216	3221#	3224	3225
PUTQ				 362+#
PUTW				 343+#	 372+	 373+	1390
PWD2RCV				2883	2884
PWD2TVMSG_LEN			1782
PWD2TVMSG_PTR			1781
PWD3RCV				3226
PWD3RCV_LENGTH			3223	3224	3225	3226
PWD3TVMSG_LEN			1778
PWD3TVMSG_PTR			1777
PWDB				1460	1461	1771	1774#	2875	2880#	3215	3220#
PWDBLOCK			1771	2875	3215
PWDNODE				1460	1461
RAD50				 450#
RCV_HLO				 435	2446*
RCV_NI				 436	2562*
RCV_NV				 437	2772*
RCV_TI				 438	2903*
RCV_TV				 439	3094*
REASON				 553#	 585	 592	 611	 618	 635	3466	3477#	3484#	3489#	3491#	3500
				3503	3525	3534
REASONINIT			3470#	3484	3489	3525
REASONLOG			3469#	3484	3489	3491	3500
REASONSTOP			3468#	3491	3534
REQUESTS			2638	2687#	2754
REQUEST_OTV			1385	2756
REQUEST_TV			3078
RET				 566	 582#	 589#	 599#	 615#	 625#	 633#	 641	2638
RU				 950	 952	1540	1542	1623	1804	1806	1975	2186	2340	2349	2352
				2720	2761	2870	2892	3062	3083	3210	3234	3343	3507	3528
SEND_TI				1764#	2191#	2217#	2229#	2249#	2261#	2278#	2285	2308	2327	2753#
SEND_TV				1784#	2192#	2218#	2230#	2250#	2262#	2287	2310	2329	2755#	3077#
SMALL				2357
STATE				2046	2110	2376	2442
STS$K_WARNING			3488
STS$V_SEVERITY			3486
TC				 952	1542	1793	1806	1974	2318	2758	2763	2890	2894	3080	3085
				3232	3236	3528
TERM_LIN			 440	1815	3245*
TI				 956	1125	1544	1806	2270	2275	2277	2722	2894	3064	3236	3608
TIINFO				2974	3013#	3014	3019	3072	3076
TI_CHECK			2637	2723	2740
TI_MSG_ADDR			1752
TI_MSG_CNT			1753
TLIAST				 441	3354*
TLILIN				   1#
TLI_LKG_LINEB_CCB		 408#	 410#
TLI_LKG_LINEB_FNC		 409#	 411#	 431	 432	 434	1979#	2046#	2376#
TMP				1380	1381#	1382	1895	1900#	1901	1902#	1903
TM_INI				1795
TM_TRM				1822
TRUE				 712	1204	1295	2278	2283	2306	2325	2733	2753	2755	3077	3321
TV				 956	1544	1806	2295	2302	2757	2763	2872	3079	3085	3212
TV_CHECK			2843	2873	2878	2887	3165	3213	3218	3229
UNIT				 381+#	 382+	 383+
VALUE				 343+	 344+	 346+	 347+	 352+	 596	 604#	 605	 606#	 607	 608#	 609
				 622	 628#	 629	3501	3503#	3504
VFY_REQ				3076
X				 338+	 339+#	 340+#	 341+	 351+	 352+#	 353+	 354+
XCPDAT				 442	3543*
XCPINI				 443	3620*
XCPSTP				 444	3688*
XPTDBBLOCK			 552+	 710+	 785+	 877+	 948+	1026+	1121+	1195+	1286+	1369+	1457+	1534+
				1618+	1705+	1894+	1969+	2041+	2108+	2184+	2439+	2509+	2636+	2841+	2973+
				3163+	3315+	3463+	3605+	3682+	3750+
XPTDB				 549+	 550+#	 551+	 616	 626	 707+	 708+#	 709+	 782+	 783+#	 784+	 874+
				 875+#	 876+	 945+	 946+#	 947+	1023+	1024+#	1025+	1118+	1119+#	1120+	1192+
				1193+#	1194+	1283+	1284+#	1285+	1366+	1367+#	1368+	1454+	1455+#	1456+	1531+
				1532+#	1533+	1615+	1616+#	1617+	1702+	1703+#	1704+	1891+	1892+#	1893+	1966+
				1967+#	1968+	2038+	2039+#	2040+	2105+	2106+#	2107+	2181+	2182+#	2183+	2436+
				2437+#	2438+	2506+	2507+#	2508+	2633+	2634+#	2635+	2838+	2839+#	2840+	2970+
				2971+#	2972+	3160+	3161+#	3162+	3312+	3313+#	3314+	3460+	3461+#	3462+	3602+
				3603+#	3604+	3679+	3680+#	3681+	3747+	3748+#	3749+
XPTFMT_LOSS			 616
XPTHANDLE			1794	1821
XPTINI_FAIL			 590	 600	 634	3510
XPTLINEDN			 583	3514
XPTSTATE			1792#	1803#	2206	2347
XPTVER_REJ			 626
ZEROQ				 376+#
$DLL_INITIALIZE			1734
$DLL_RELEASE_CIRCUIT		1725
$DLL_REQUEST_CIRCUIT		1717
$DLL_STOP			1742
$DLL_TRANSMIT			1766	1786
$MAXLK				1390
$MCB_GET_CCB			1714	1722	1730	1739	1747	1772	1791	1802
$MCB_RETURN_CCB			 811	 883	1621	1972	3541	3616	3685	3753
$MCB_SCHEDULE_CCB		 719	1797	1824	3330
$NM_LOG_BEGIN			 576	2528	2551	3502
$NM_LOG_END			 641	2532	2553	3506
$TLI_FOR_EACH_PWDB_DO_BEGIN	1459
$TLI_GET_LINE_DB		3476
$TLI_NEXT_PWDB_END		1462
$XPT$E_FMT			 615
$XPT$E_ILF			3511
$XPT$E_IOF			 599
$XPT$E_ISF			 589	 633
$XPT$E_LLF			2553	3515
$XPT$E_LOF			2532
$XPT$E_LSF			 582
$XPT$E_VER			 625
$XPT_FOR_EACH_LINEB_DO_BEGIN	1813	2362
$XPT_NEXT_LINEB_END		1816	2365
%CTCE				 344+	 363+
%REMAINING			 388+