Google
 

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

;	  0001	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2  4-Oct-82 07:39:16, Edit by PECKHAM
;	  0002	!
;	  0003	! Ident 33.
;	  0004	!   Fix bug introduced to LOOP_LINE by last edit.
;	  0005	!
;	  0006	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2  3-Oct-82 14:59:41, Edit by PECKHAM
;	  0007	!
;	  0008	! Ident 32.
;	  0009	!   It was found that in-house VAXes returned a MOP loopback response code
;	  0010	!   of 25 - it will take too long to get them to fix it, so accomodate it.
;	  0011	!   Hack up LOOP_LINE to recognize it as valid message.
;	  0012	!
;	  0013	! <BRANDT.DEVELOPMENT>NMLLBK.BLI.1 14-Sep-82 11:43:23, Edit by BRANDT
;	  0014	!
;	  0015	! Ident 31.
;	  0016	!   In NML$TEST, include an entity id in the response message.  Include
;	  0017	!   the data field only for specific errors.
;	  0018	!
;	  0019	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2 23-Jun-82 11:37:06, Edit by PECKHAM
;	  0020	!
;	  0021	! Ident 30.
;	  0022	! Check RB_PRV_* bits in request block before performing requests.
;	  0023	!
;	  0024	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.3 14-Jun-82 13:43:13, Edit by PECKHAM
;	  0025	!
;	  0026	! Ident 29.
;	  0027	! Handle the MOP prompt message (ENTER MOP MODE) as a one byte message.
;	  0028	! This conforms to the VMS/RSX agreed-upon protocol.
;	  0029	!
;	  0030	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2 22-May-82 17:37:27, Edit by PECKHAM
;	  0031	!
;	  0032	! Ident 28.
;	  0033	! Check CIRCUIT STATE, SUBSTATE, and SERVICE in LINE_ACCESS
;	  0034	! for service interlocks.
;	  0035	!
;	  0036	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2 10-May-82 15:54:38, Edit by PECKHAM
;	  0037	!
;	  0038	! Ident 27.
;	  0039	! Fix linkage for BLISS-36
;	  0040	!
;	  0041	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.13  5-May-82 11:09:50, Edit by PECKHAM
;	  0042	!
;	  0043	! Ident 26.
;	  0044	! Disallow LOOP LINE in NML$TEST.
;	  0045	! Add Loop Request Parameter Block and use (for better code efficiency).
;	  0046	! Optimize linkages around the parameter block.
;	  0047	!
;	  0048	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.2 28-Apr-82 12:45:27, Edit by PECKHAM
;	  0049	!
;	  0050	! Ident 25.
;	  0051	! Change NMU$DLX_* routine references to $NMU_DLX_* macro references.
;	  0052	! Add receive timeout values where needed.
								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   2
								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (1)

;	  0053	!
;	  0054	! NET:<PECKHAM.DEVELOPMENT>NMLLBK.BLI.7  8-Mar-82 13:36:45, Edit by PECKHAM
;	  0055	!
;	  0056	! Ident 24.
;	  0057	! Do not send ENTER MOP MODE message on LOOP LINE initialization
;	  0058	! in LINE_ACCESS. Add retry code in LOOP_LINE.
;	  0059	!
;	  0060	! NET:<BRANDT.DEVELOP>NMLLBK.BLI.1 14-Dec-81 16:43:23, Edit by BRANDT
;	  0061	!
;	  0062	! Ident 23.
;	  0063	!   Change call to NML$SET_VDB_PARAMETER so that the address of the
;	  0064	!   data is passed, not the value.  Add literal defs from NMLDLW for
;	  0065	!   circuit parameter numbers and substate values.
;	  0066	!
;	  0067	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.4 21-Oct-81 09:13:23, Edit by WEBBER
;	  0068	!
;	  0069	! Ident 22.
;	  0070	! Modify interface to NETWORK_OPEN to pass the response buffer and its
;	  0071	! length.
;	  0072	!
;	  0073	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.3 16-Jun-81 17:05:02, Edit by GUNN
;	  0074	!
;	  0075	! Ident 21.
;	  0076	! Make check for looped message in LINE_ACCESS allow both
;	  0077	! function code LOOPBACK_TEST and LOOPED_DATA. 
;	  0078	! Allow for reflected ENTER-MOP-MODE message.
;	  0079	!
;	  0080	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.15 16-Jun-81 12:30:15, Edit by GUNN
;	  0081	!
;	  0082	! Ident 20.
;	  0083	! Fix response handling in LOOP_LINE.
;	  0084	!
;	  0085	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.12 15-Jun-81 10:04:26, Edit by GUNN
;	  0086	!
;	  0087	! Ident 19.
;	  0088	! Fix retrieval of response code from response buffer after calling
;	  0089	! LINE_ACCESS.
;	  0090	!
;	  0091	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.8 12-Jun-81 10:50:01, Edit by GUNN
;	  0092	!
;	  0093	! Ident 18.
;	  0094	! Change default LENGTH parameter to 127. Makes default work with 
;	  0095	! DECnet-M.
;	  0096	!
;	  0097	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.7 11-Jun-81 17:45:07, Edit by GUNN
;	  0098	!
;	  0099	! Ident 17.
;	  0100	! Build response message if LINE_ACCESS fails.
;	  0101	!
;	  0102	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.6 11-Jun-81 16:07:08, Edit by GUNN
;	  0103	!
;	  0104	! Ident 16.
								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   3
								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (1)

;	  0105	! Release MOP buffer in LINE_ACCESS.
;	  0106	! Put call to NML$SET_VDB_PARAMETER in comment.
;	  0107	!
;	  0108	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.5  8-Jun-81 10:16:54, Edit by GUNN
;	  0109	!
;	  0110	! Ident 15.
;	  0111	! Add code in LINE_ACCESS to write ENTER-MOP-MODE message and
;	  0112	! read MOP-MODE-RUNNING message. 
;	  0113	! Add code to handle read errors.
;	  0114	!
;	  0115	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.12 28-May-81 10:45:42, Edit by GUNN
;	  0116	!
;	  0117	! Ident 14.
;	  0118	! Set RB_RESPONSE_LENGTH from response message buffer after calling 
;	  0119	! LINE_ACCESS.
;	  0120	!
;	  0121	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.11 28-May-81 09:23:50, Edit by GUNN
;	  0122	!
;	  0123	! Ident 13.
;	  0124	! Change test for completion of NMU$DLX_OPEN to geq 0.
;	  0125	!
;	  0126	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.10 28-May-81 06:21:35, Edit by GUNN
;	  0127	!
;	  0128	! Ident 12.
;	  0129	! Add definition for RESPONSE_BUFFER_ALLOCATION.
;	  0130	!
;	  0131	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.9 28-May-81 06:11:12, Edit by GUNN
;	  0132	!
;	  0133	! Ident 11.
;	  0134	! Allocate a response message buffer in NML$TEST.
;	  0135	!
;	  0136	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.8 27-May-81 15:58:49, Edit by GUNN
;	  0137	!
;	  0138	! Ident 10.
;	  0139	! Add external declarations for NMU$DLX_xxx routines.
;	  0140	! Remove reference to structure REQ in LOOP_NODE and LOOP_LINE.
;	  0141	! Pass repsonse pointer instead.
;	  0142	!
;	  0143	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.6 27-May-81 15:03:15, Edit by GUNN
;	  0144	!
;	  0145	! Ident 09.
;	  0146	! Add code to perform loop line/circuit.
;	  0147	!
;	  0148	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.5 31-Mar-81 07:59:24, Edit by GUNN
;	  0149	!
;	  0150	! Release send and receive buffers in LOOP_NODE.
;	  0151	!
;	  0152	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.3 11-Mar-81 08:57:37, Edit by GUNN
;	  0153	!
;	  0154	! Change format of node id string passed to NMU$NETWORK_OPEN in the
;	  0155	! Connect Block CB_HOST field to be same as NODE entity id.
;	  0156	!
								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   4
								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (1)

;	  0157	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.2  9-Mar-81 08:54:21, Edit by GUNN
;	  0158	!
;	  0159	! Change test loop limit so extra loop not taken.
;	  0160	! Change default length to 255.
;	  0161	!
;	  0162	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.7 13-Feb-81 10:06:16, Edit by GUNN
;	  0163	!
;	  0164	! Add CIRCUIT entity in NML$TEST.
;	  0165	!
;	  0166	! NET:<DECNET20-V3P1.NML>NMLLBK.BLI.6 12-Feb-81 15:27:19, Edit by GUNN
;	  0167	!
;	  0168	! Update copyright date.
;	  0169	! Change GET_LOOP_PARAMETERS to return NICE error return code on first
;	  0170	! invalid parameter detected.
;	  0171	! Change GENERATE_LOOP_MESSAGE to return NICE error code if LOOP WITH
;	  0172	! parameter value is invalid.
;	  0173	!
;	  0174	! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMLLBK.BLI.36 10-Feb-81 13:49:06, Edit by JENNESS
;	  0175	!    Make sure that connect data has zero length in connect block!!
;	  0176	! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMLLBK.BLI.35  9-Feb-81 12:43:12, Edit by GUNN
;	  0177	!    Remove check for version skew.
;	  0178	! NET:<DECNET20-V3P1.BASELEVEL-2.SOURCES>NMLLBK.BLI.33  3-Feb-81 10:34:00, Edit by JENNESS
;	  0179	!    Remove literal definition for MIRROR_OBJECT ... now in NMARCH.
								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   5
								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (2)

;	  0180	
;	  0181	module NMLLBK	(
;	  0182			ident = 'X03.32'
;	  0183			) =
;	  0184	begin
;	  0185	
;	  0186	!
;	  0187	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0188	!                    DIGITAL EQUIPMENT CORPORATION
;	  0189	!                        Maynard, Massachusetts
;	  0190	!
;	  0191	!     This software is furnished under a license and may  be  used
;	  0192	!     and copied only in accordance with the terms of such license
;	  0193	!     and with the inclusion of the above copyright notice.   This
;	  0194	!     software  or any other copies thereof may not be provided or
;	  0195	!     otherwise made available to any other person.  No  title  to
;	  0196	!     and ownership of the software is hereby transferred.
;	  0197	!
;	  0198	!     The information  in  this  software  is  subject  to  change
;	  0199	!     without  notice  and should not be construed as a commitment
;	  0200	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0201	!
;	  0202	!     DIGITAL assumes no responsibility for the use or reliability
;	  0203	!     of  its  software  on  equipment  which  is  not supplied by
;	  0204	!     DIGITAL.
;	  0205	!
;	  0206	
;	  0207	!++
;	  0208	! FACILITY:	DECnet-10/20 V3.0 Network Management Layer (NML)
;	  0209	!
;	  0210	! ABSTRACT:
;	  0211	!
;	  0212	!	Performs loopback test function.
;	  0213	!
;	  0214	! ENVIRONMENT:	TOPS-10/20 & MCB/RSX11 User mode under NML
;	  0215	!
;	  0216	! AUTHOR: Dale C. Gunn , CREATION DATE: 12-Nov-80
;	  0217	!
;	  0218	! MODIFIED BY:
;	  0219	!
;	  0220	!	, : VERSION
;	  0221	! 01	-
;	  0222	!--
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   6
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (3)

;	  0223	
;	  0224	!
;	  0225	! INCLUDE FILES:
;	  0226	!
;	  0227	
;	  0228	library 'NMLLIB' ;                      ! All required definitions
;	  0229	
;	  0230	require 'NMLEXT';                       ! External routine declarations
;	  0336	
;	  0337	!
;	  0338	! TABLE OF CONTENTS
;	  0339	!
;	  0340	
;	L 0341	%if %bliss (bliss16)
;	  0342	%then linkage NML_LKG_PB = jsr (register = 5);
;	U 0343	%else macro NML_LKG_PB = bliss36c %;
;	  0344	%fi
;	  0345	
;	  0346	forward routine
;	  0347	         NML$TEST,                         ! Perform loopback test
;	  0348	         GET_LOOP_PARAMETERS: NML_LKG_PB,  ! Get parameters from NICE test msg
;	  0349	         LOOPBACK_ACCESS: NML_LKG_PB,      ! NODE loopback access routine
;	  0350	         LINE_ACCESS: NML_LKG_PB,          ! LINE loopback access routine
;	  0351	         LOOP_NODE: NML_LKG_PB,            ! Perform NODE loop test
;	  0352	         LOOP_LINE: NML_LKG_PB,            ! Perform LINE loop test
;	  0353	         GENERATE_LOOP_MESSAGE: NML_LKG_PB,! Build LOOP data message
;	  0354	         VERIFY_LOOP_MESSAGE: NML_LKG_PB;  ! Check validity of LOOPED message
;	  0355	
;	  0356	!
;	  0357	! MACROS:
;	  0358	!
;	  0359	
;	  0360	!
;	  0361	! EQUATED SYMBOLS:
;	  0362	!
;	  0363	! Loop Request Block
;	  0364	!
;	  0365	$show (fields);                         ! Turn on XPORT field display
;	  0366	$show (literals);                       ! Turn on XPORT literal display
;	  0367	
;	  0368	$field
;	  0369	    PARAMETER_FIELDS =
;	  0370	        set
;	L 0371	        PB_BASE = [$sub_block (0)],
; %PRINT:				  [0,0,0,0]   (+%O'0')
;	L 0372	        PB_RESPONSE_PTR = [$pointer],
; %PRINT:				  [0,0,16,0]   (+%O'0')
;	L 0373	        PB_REQ_ADR = [$address],
; %PRINT:				  [1,0,16,0]   (+%O'2')
;	L 0374	        PB_LINK_HANDLE = [$short_integer],
; %PRINT:				  [2,0,16,1]   (+%O'4')
;	L 0375	        PB_COUNT = [$integer],          ! Node parameter 150
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   7
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (3)

; %PRINT:				  [3,0,16,1]   (+%O'6')
;	L 0376	        PB_LENGTH = [$integer],         ! Node parameter 151
; %PRINT:				  [4,0,16,1]   (+%O'10')
;	L 0377	        PB_WITH = [$integer]            ! Node parameter 152
; %PRINT:				  [5,0,16,1]   (+%O'12')
;	  0378	        tes;
;	  0379	
;	  0380	literal
;	L 0381	    PARAMETER_BLOCK_SIZE = $field_set_size,
; %PRINT:				  6 fullwords
;	L 0382	    PARAMETER_BLOCK_ALLOCATION = $field_set_units;
; %PRINT:				  12 addressable units
;	  0383	
;	  0384	macro
;	  0385	     PARAMETER_BLOCK = block [PARAMETER_BLOCK_SIZE] field (PARAMETER_FIELDS) %;
;	  0386	
;	  0387	$show (none);                           ! Turn off XPORT display
;	  0388	
;	  0389	!
;	  0390	! STATE/SUBSTATE/SERVICE definitions
;	  0391	!
;	  0392	
;	  0393	literal
;	  0394	    CPARM_STATE = 0,
;	  0395	    CPARM_SUBSTATE = 1,
;	  0396	    CPARM_SERVICE = 100,
;	  0397	
;	  0398	    LINK_ON = 0,
;	  0399	    LINK_OFF = 1,
;	  0400	    LINK_SERVICE = 2,
;	  0401	    LINK_CLEARED = 3,
;	  0402	
;	  0403	    LINK_NO_SUBSTATE = -1,
;	  0404	    LINK_STARTING = 0,
;	  0405	    LINK_REFLECTING = 1,
;	  0406	    LINK_LOOPING = 2,
;	  0407	    LINK_LOADING = 3,
;	  0408	    LINK_DUMPING = 4,
;	  0409	    LINK_TRIGGERING = 5,
;	  0410	    LINK_AUTOSERVICE = 6,
;	  0411	    LINK_AUTOLOADING = 7,
;	  0412	    LINK_AUTODUMPING = 8,
;	  0413	    LINK_AUTOTRIGGERING = 9,
;	  0414	    LINK_SYNCHRONIZING = 10,
;	  0415	    LINK_FAILED = 11,
;	  0416	
;	  0417	    LINK_ENABLED = 0,
;	  0418	    LINK_DISABLED = 1;
;	  0419	
;	  0420	literal
;	  0421	       RESPONSE_BUFFER_LENGTH = 76,     ! NICE response buffer in bytes
;	  0422	       RESPONSE_BUFFER_SIZE = ch$allocation (RESPONSE_BUFFER_LENGTH,8),
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   8
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (3)

;	  0423	       RESPONSE_BUFFER_ALLOCATION = RESPONSE_BUFFER_SIZE * %upval ;
;	  0424	
;	  0425	literal                                 ! Defaults for test
;	  0426	       DEFAULT_LENGTH = 127,            ! Length of test data in bytes
;	  0427	       DEFAULT_COUNT = 1,               ! Same as RSX and VAX
;	  0428	       DEFAULT_WITH = 2 ;               ! MIXED ones and zeroes
;	  0429	
;	  0430	!
;	  0431	! OWN STORAGE:
;	  0432	!
;	  0433	
;	  0434	!
;	  0435	! EXTERNAL REFERENCES:
;	  0436	!
;	  0437	
;	  0438	external
;	  0439	        NMLVER,                         ! Network Managment version number
;	  0440	        DECECO,                         ! Digital ECO number
;	  0441	        USRECO ;			! User ECO number
;	  0442	        
;	  0443	external routine
;	  0444	         NML$NICE_RESPONSE,
;	  0445	         NML$CLR_VDB_PARAMETER,
;	  0446	         NML$GET_VDB_PARAMETER,
;	  0447	         NML$SET_VDB_PARAMETER,
;	  0448	         NMU$NETWORK_UTILITIES;
;	  0449	
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page   9
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)

;	  0450	
;	  0451	global routine %unquote NML$TEST (REQ) =
;	  0452	
;	  0453	!++
;	  0454	! FUNCTIONAL DESCRIPTION:
;	  0455	!
;	  0456	!	This routine performs the NICE test request function. Either
;	  0457	!       a NODE or LINE loopback test is performed based on the
;	  0458	!       entity type in the test request message. If the NODE loop test
;	  0459	!       is requested the NICE message may specify optional access
;	  0460	!       control information to be used when connecting to the remote
;	  0461	!       loopback mirror. Optional test parameters may also be included.
;	  0462	!
;	  0463	! FORMAL PARAMETERS
;	  0464	!
;	  0465	!	REQ - The address of the NML Request Block.
;	  0466	!
;	  0467	! IMPLICIT INPUTS
;	  0468	!
;	  0469	!	NONE.
;	  0470	!
;	  0471	! ROUTINE VALUE:
;	  0472	!
;	  0473	!	NICE return code.
;	  0474	!
;	  0475	! SIDE EFFECTS:
;	  0476	!
;	  0477	!	NONE.
;	  0478	!
;	  0479	!--
;	  0480	
;	  0481	    begin
;	  0482	
;	  0483	    map
;	  0484	       REQ: ref REQUEST_BLOCK;          ! NICE RB structure
;	  0485	
;	  0486	    local
;	  0487	         PB: PARAMETER_BLOCK,           ! For centralized data base
;	  0488	         RTN_COD;                       ! NICE return code
;	  0489	
;	  0490	    selectone .REQ[RB_NICE_ENTITY_TYPE] of
;	  0491	        set
;	  0492	        [CIRCUIT_, LINE_]:              ! Too dangerous
;	  0493	
;	  0494	            if not .REQ[RB_PRV_SERVICE] then return NICE$_PRV;
;	  0495	
;	  0496	        [otherwise]:                    ! Okay
;	  0497	            0;
;	  0498	        tes;
;	  0499	
;	  0500	    !
;	  0501	    ! Allocate NICE response buffer.
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  10
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)

;	  0502	    !
;	  0503	
;	  0504	    REQ[RB_RESPONSE_ALLOCATION] = RESPONSE_BUFFER_ALLOCATION;
;	  0505	    REQ[RB_RESPONSE] = NMU$MEMORY_GET (.REQ[RB_RESPONSE_ALLOCATION]);
;	  0506	
;	  0507	    !
;	  0508	    ! Set up the parameter block
;	  0509	    !
;	  0510	
;	  0511	    PB [PB_REQ_ADR] = .REQ;
;	  0512	    PB [PB_RESPONSE_PTR] = ch$ptr (.REQ[RB_RESPONSE],, 8);
;	  0513	
;	  0514	    !
;	  0515	    ! Get the LOOP test parameters from NICE message.
;	  0516	    !
;	  0517	
;	  0518	    if (RTN_COD = GET_LOOP_PARAMETERS (PB[PB_BASE])) lss 0
;	  0519	    then return .RTN_COD ;
;	  0520	
;	  0521	    !
;	  0522	    ! Perform either NODE or LINE loop test based on entity
;	  0523	    !
;	  0524	
;	  0525	    begin
;	  0526	    local PBBASE;
;	  0527	    PBBASE = PB[PB_BASE];
;	  0528	    selectone .REQ[RB_NICE_ENTITY_TYPE] of
;	  0529	        set
;	  0530	        [NODE_E]:                       ! NODE loopback test
;	  0531	            RTN_COD = LOOPBACK_ACCESS (.PBBASE); ! Call loopback access routine
;	  0532	        [CIRCUIT_]:                     ! CIRCUIT loopback test
;	  0533	            RTN_COD = LINE_ACCESS (.PBBASE); ! Call line access routine
;	  0534	        [LINE_]:
;	  0535	            RTN_COD = NICE$_UFO;
;	  0536	        [otherwise]:                    ! Internal error
;	  0537	            RTN_COD = NICE$_MPE;
;	  0538	        tes;
;	  0539	    end;
;	  0540	
;	  0541	    if .RTN_COD lss 0
;	  0542	    then begin
;	  0543	         local EID_PTR, EID_LEN, RSP_PTR;
;	  0544	
;	  0545	         if ch$rchar(.PB[PB_RESPONSE_PTR]) eql 0
;	  0546	         then $RESPONSE (.PB[PB_RESPONSE_PTR], .RTN_COD);
;	  0547	
;	  0548	         RSP_PTR = ch$plus (.PB[PB_RESPONSE_PTR],
;	  0549	                            $RESPONSE_LENGTH (.PB[PB_RESPONSE_PTR]));
;	  0550	
;	  0551	         EID_PTR = .REQ[RB_NICE_ENTITY];      ! include an entity ID
;	  0552	         if .REQ[RB_NICE_ENTITY_TYPE] eql NODE_E
;	  0553	         then				! NODE has special format
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  11
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)

;	  0554	                begin
;	  0555	                local
;	  0556	                    NODE_ID_PTR,
;	  0557	                    LOCAL_NODE_PTR;
;	  0558	
;	  0559	                LOCAL_NODE_PTR = NMU$NETWORK_LOCAL (); ! Local node id
;	  0560	                NODE_ID_PTR = .RSP_PTR; ! Make copy of current pointer
;	  0561	
;	  0562	                EID_LEN = ch$rchar (ch$plus (.EID_PTR,2)) + 3;
;	  0563	                RSP_PTR = ch$move (.EID_LEN, .EID_PTR, .RSP_PTR);
;	  0564	                !
;	  0565	                ! If node addresses are equal this is the executor node,
;	  0566	                ! so set bit 7 in length byte to indicate this fact.
;	  0567	                !
;	  0568	                if GETB (NODE_ID_PTR) eql GETB (LOCAL_NODE_PTR)
;	  0569	                then if GETB (NODE_ID_PTR) eql GETB (LOCAL_NODE_PTR)
;	  0570	                     then ch$wchar ((ch$rchar (.NODE_ID_PTR) or (1 ^ 7)), .NODE_ID_PTR);
;	  0571	
;	  0572	                end
;	  0573	 	else
;	  0574	                begin
;	  0575	                EID_LEN = ch$rchar (.EID_PTR) + 1;
;	  0576	                RSP_PTR = ch$move (.EID_LEN, .EID_PTR, .RSP_PTR);
;	  0577	                end;
;	  0578	
;	  0579		selectone .RTN_COD of			! Include  date field
;	  0580		    set					! for appropriate errors
;	L 0581		    [$NICE$ERR_LCE,
; %PRINT:	Line communication error
;	L 0582		     $NICE$ERR_BLR,
; %PRINT:	Bad loopback response
;	L 0583		     $NICE$ERR_OPF,
; %PRINT:	Operation failure
;	L 0584		     $NICE$ERR_IPV]:
; %PRINT:	Invalid parameter value
;	  0585	
;	  0586			PUTW ((PB[PB_COUNT]),RSP_PTR);
;	  0587	
;	  0588		    [otherwise]:                    	! No data field supplied
;	  0589			0;
;	  0590		    tes;
;	  0591	
;	  0592	         REQ[RB_RESPONSE_LENGTH] = ch$diff (.RSP_PTR, .PB[PB_RESPONSE_PTR]);
;	  0593	         end
;	  0594	    else begin
;	  0595	         $RESPONSE (ch$ptr(.REQ[RB_RESPONSE],,8), NICE$_SUC) ;
;	  0596	         REQ[RB_RESPONSE_LENGTH] = 1 ;
;	  0597	         NML$REQUEST_FINISH (.REQ) ;    ! Queue request for completion
;	  0598	         end;
;	  0599	
;	  0600	    return .RTN_COD 
;	  0601	    end;				!End of NML$TEST
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  12
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)



						.TITLE	NMLLBK
						.IDENT	/X03.32/

						.GLOBL	US.CREATE, US.ABORT, US.FINI, US.COMPLETE
						.GLOBL	US.ERROR, US.INSERT, US.REMOVE
						.GLOBL	US.QRESET, US.QQINS, US.QQREM
						.GLOBL	US.QQSET, US.QQEXT, US.EVENT, US.WAIT
						.GLOBL	US.FLAG, US.SLEEP, US.CURRENT
						.GLOBL	US.DESCHEDULE, UM.RESET, UM.INITIALIZE
						.GLOBL	UM.GET, UM.RELEASE, UQ.RESET, UQ.INSERT
						.GLOBL	UQ.REMOVE, UQ.EXTRACT, UQ.LENGTH
						.GLOBL	UQ.SCAN, UQ.SEXTRACT, NL.INIT
						.GLOBL	NL.RENTER, NL.REMOVE, NL.FINISH
						.GLOBL	NMLVER, DECECO, USRECO, NL.RSP
						.GLOBL	NL.VCP, NL.VGP, NL.VSP, UN.INIT
						.GLOBL	UN.LOCAL, UN.OPEN, UN.ACCEPT, UN.REJECT
						.GLOBL	UN.READ, UN.WRITE, UN.ABORT, UN.CLOSE
						.GLOBL	UN.STATUS, UN.VALIDATE


						.SBTTL	NL.TST
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			NL.TST::JSR	R1,$SAVE5			;					0451
000004	162706  000020 				SUB	#20,SP
000010	016601  000036 				MOV	36(SP),R1			; REQ,*					0490
000014	005000 					CLR	R0
000016	156100  000074 				BISB	74(R1),R0
000022	020027  000001 				CMP	R0,#1
000026	001403 					BEQ	1$
000030	020027  000003 				CMP	R0,#3
000034	001010 					BNE	2$
000036	032761  002000  000076 		1$:	BIT	#2000,76(R1)			;					0494
000044	001004 					BNE	2$
000046	012700  177775 				MOV	#-3,R0
000052	000167  000510 				JMP	16$
000056	012761  000114  000036 		2$:	MOV	#114,36(R1)			;					0504
000064	012746  000114 				MOV	#114,-(SP)			;					0505
000070	004767  000000G				JSR	PC,UM.GET
000074	010061  000026 				MOV	R0,26(R1)
000100	010166  000010 				MOV	R1,10(SP)			; *,PB+2				0511
000104	010003 					MOV	R0,R3				;					0512
000106	010366  000006 				MOV	R3,6(SP)			; *,PB
000112	012705  000006 				MOV	#6,R5				;					0518
000116	060605 					ADD	SP,R5				; PB,*
000120	004767  000000V				JSR	PC,GET.LOOP.PARAMETERS
000124	010004 					MOV	R0,R4				; *,RTN.COD
000126	002576 					BLT	13$				;					0519
000130	012705  000006 				MOV	#6,R5				; *,PBBASE				0527
000134	060605 					ADD	SP,R5				; PB,PBBASE
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  13
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)

000136	005002 					CLR	R2				;					0528
000140	156102  000074 				BISB	74(R1),R2
000144	005702 					TST	R2
000146	001003 					BNE	3$
000150	004767  000000V				JSR	PC,LOOPBACK.ACCESS		;					0531
000154	000405 					BR	4$
000156	020227  000003 			3$:	CMP	R2,#3				;					0528
000162	001004 					BNE	5$
000164	004767  000000V				JSR	PC,LINE.ACCESS			;					0533
000170	010004 				4$:	MOV	R0,R4				; *,RTN.COD
000172	000410 					BR	7$				;					0528
000174	020227  000001 			5$:	CMP	R2,#1
000200	001003 					BNE	6$
000202	012704  177777 				MOV	#-1,R4				; *,RTN.COD				0535
000206	000402 					BR	7$				;					0528
000210	012704  177773 			6$:	MOV	#-5,R4				; *,RTN.COD				0537
000214	002144 				7$:	BGE	14$				;					0541
000216	016666  000006  000004 			MOV	6(SP),4(SP)			; PB,*					0545
000224	105776  000004 				TSTB	@4(SP)
000230	001010 					BNE	8$
000232	016600  000004 				MOV	4(SP),R0			; *,STRPTR				0546
000236	110420 					MOVB	R4,(R0)+			; RTN.COD,STRPTR
000240	112720  000377 				MOVB	#377,(R0)+			; *,STRPTR
000244	116020  177777 				MOVB	-1(R0),(R0)+			; *(STRPTR),STRPTR
000250	105010 					CLRB	(R0)				; STRPTR
000252	012703  000003 			8$:	MOV	#3,R3				;					0549
000256	066603  000004 				ADD	4(SP),R3
000262	010300 					MOV	R3,R0				; *,STRPTR
000264	005005 					CLR	R5
000266	152005 					BISB	(R0)+,R5			; STRPTR,*
000270	066605  000004 				ADD	4(SP),R5
000274	010566  000002 				MOV	R5,2(SP)			; *,RSP.PTR
000300	062766  000004  000002 			ADD	#4,2(SP)			; *,RSP.PTR
000306	016105  000102 				MOV	102(R1),R5			; *,EID.PTR				0551
000312	005702 					TST	R2				;					0552
000314	001033 					BNE	9$
000316	004767  000000G				JSR	PC,UN.LOCAL			;					0559
000322	010002 					MOV	R0,R2				; *,LOCAL.NODE.PTR
000324	016603  000002 				MOV	2(SP),R3			; RSP.PTR,NODE.ID.PTR			0560
000330	005000 					CLR	R0				; EID.LEN				0562
000332	156500  000002 				BISB	2(R5),R0			; *(EID.PTR),EID.LEN
000336	062700  000003 				ADD	#3,R0				; *,EID.LEN
000342	010016 					MOV	R0,(SP)				; EID.LEN,*				0563
000344	010546 					MOV	R5,-(SP)			; EID.PTR,*
000346	010346 					MOV	R3,-(SP)			; RSP.PTR,*
000350	004767  000000G				JSR	PC,BL$MOV
000354	010066  000006 				MOV	R0,6(SP)			; *,RSP.PTR
000360	122322 					CMPB	(R3)+,(R2)+			; NODE.ID.PTR,LOCAL.NODE.PTR		0568
000362	001023 					BNE	10$
000364	122322 					CMPB	(R3)+,(R2)+			; NODE.ID.PTR,LOCAL.NODE.PTR		0569
000366	001021 					BNE	10$
000370	005000 					CLR	R0				;					0570
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  14
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (4)

000372	151300 					BISB	(R3),R0				; NODE.ID.PTR,*
000374	052700  000200 				BIS	#200,R0
000400	110013 					MOVB	R0,(R3)				; *,NODE.ID.PTR
000402	000413 					BR	10$				;					0552
000404	005000 				9$:	CLR	R0				; EID.LEN				0575
000406	151500 					BISB	(R5),R0				; EID.PTR,EID.LEN
000410	005200 					INC	R0				; EID.LEN
000412	010016 					MOV	R0,(SP)				; EID.LEN,*				0576
000414	010546 					MOV	R5,-(SP)			; EID.PTR,*
000416	016646  000004 				MOV	4(SP),-(SP)			; RSP.PTR,*
000422	004767  000000G				JSR	PC,BL$MOV
000426	010066  000006 				MOV	R0,6(SP)			; *,RSP.PTR
000432	020427  177744 			10$:	CMP	R4,#-34				; RTN.COD,*				0579
000436	001411 					BEQ	11$
000440	020427  177747 				CMP	R4,#-31				; RTN.COD,*
000444	001406 					BEQ	11$
000446	020427  177760 				CMP	R4,#-20				; RTN.COD,*
000452	001403 					BEQ	11$
000454	020427  177766 				CMP	R4,#-12				; RTN.COD,*
000460	001012 					BNE	12$
000462	116676  000020  000006 		11$:	MOVB	20(SP),@6(SP)			; PB+6,RSP.PTR				0586
000470	005266  000006 				INC	6(SP)				; RSP.PTR
000474	116676  000021  000006 			MOVB	21(SP),@6(SP)			; PB+6,RSP.PTR
000502	005266  000006 				INC	6(SP)				; RSP.PTR
000506	016600  000006 			12$:	MOV	6(SP),R0			; RSP.PTR,*				0592
000512	166600  000010 				SUB	10(SP),R0
000516	010061  000034 				MOV	R0,34(R1)
000522	022626 					CMP	(SP)+,(SP)+			;					0542
000524	000416 				13$:	BR	15$				;					0541
000526	010300 				14$:	MOV	R3,R0				; *,STRPTR				0595
000530	112720  000001 				MOVB	#1,(R0)+			; *,STRPTR
000534	112720  000377 				MOVB	#377,(R0)+			; *,STRPTR
000540	116020  177777 				MOVB	-1(R0),(R0)+			; *(STRPTR),STRPTR
000544	105020 					CLRB	(R0)+				; STRPTR
000546	012761  000001  000034 			MOV	#1,34(R1)			;					0596
000554	010116 					MOV	R1,(SP)				;					0597
000556	004767  000000G				JSR	PC,NL.FINISH
000562	005726 				15$:	TST	(SP)+				;					0451
000564	010400 					MOV	R4,R0				; RTN.COD,*				0481
000566	062706  000020 			16$:	ADD	#20,SP				;					0451
000572	000207 					RTS	PC
; Routine Size:  190 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  18 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  15
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (5)

;	  0602	
;	  0603	routine GET_LOOP_PARAMETERS (PB) : NML_LKG_PB =
;	  0604	
;	  0605	!++
;	  0606	! FUNCTIONAL DESCRIPTION:
;	  0607	!
;	  0608	!	This routine extracts the three optional parameters, COUNT,
;	  0609	!       LENGTH, and WITH (TYPE) that may be supplied with the NICE
;	  0610	!       test request message. If any of the parameters are not
;	  0611	!       supplied in the test request appropriate defaults are 
;	  0612	!       returned.
;	  0613	!
;	  0614	! FORMAL PARAMETERS
;	  0615	!
;	  0616	!	PB - The address of the parameter block.
;	  0617	!
;	  0618	! IMPLICIT INPUTS
;	  0619	!
;	  0620	!	NONE.
;	  0621	!
;	  0622	! ROUTINE VALUE:
;	  0623	!
;	  0624	!	1, if successful;
;	  0625	!       NICE return code otherwise.
;	  0626	!
;	  0627	! SIDE EFFECTS:
;	  0628	!
;	  0629	!	NONE.
;	  0630	!
;	  0631	!--
;	  0632	
;	  0633	    begin
;	  0634	
;	  0635	    map
;	  0636	       PB : ref PARAMETER_BLOCK;
;	  0637	
;	  0638	    bind
;	  0639	       REQ = .PB[PB_REQ_ADR]: REQUEST_BLOCK; ! NICE RB structure
;	  0640	
;	  0641	    !
;	  0642	    ! Preset the default values.
;	  0643	    !
;	  0644	
;	  0645	    if not NML$GET_VDB_PARAMETER (.REQ [RB_NICE_ENTITY_TYPE],
;	  0646	                                  .REQ [RB_NICE_ENTITY],
;	  0647	                                  150,  ! LOOP COUNT
;	  0648	                                  PB[PB_COUNT])
;	  0649	    then PB[PB_COUNT] = DEFAULT_COUNT;
;	  0650	    if not NML$GET_VDB_PARAMETER (.REQ [RB_NICE_ENTITY_TYPE],
;	  0651	                                  .REQ [RB_NICE_ENTITY],
;	  0652	                                  151,  ! LOOP LENGTH
;	  0653	                                  PB[PB_LENGTH])
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  16
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (5)

;	  0654	    then PB[PB_LENGTH] = DEFAULT_LENGTH;
;	  0655	    if not NML$GET_VDB_PARAMETER (.REQ [RB_NICE_ENTITY_TYPE],
;	  0656	                                  .REQ [RB_NICE_ENTITY],
;	  0657	                                  152,  ! LOOP WITH
;	  0658	                                  PB[PB_WITH])
;	  0659	    then PB[PB_WITH] = DEFAULT_WITH;
;	  0660	
;	  0661	    !
;	  0662	    ! If parameters were provided pick up their values.
;	  0663	    !
;	  0664	
;	  0665	    if .REQ[RB_NICE_PARAMETERS] neq 0
;	  0666	    then begin
;	  0667	         local PARPTR,PAREND;
;	  0668	         PARPTR = .REQ[RB_NICE_PARAMETERS];
;	  0669	         PAREND = ch$plus (ch$ptr(.REQ[RB_NICE],,8), .REQ[RB_NICE_LENGTH]);
;	  0670	
;	  0671	         while ch$diff (.PAREND, .PARPTR) gtr 0
;	  0672	         do begin
;	  0673	            local PAR_NO, PAR_VAL;
;	  0674	            PAR_NO = GETW (PARPTR) ;    ! Get parameters number
;	  0675	            selectone .PAR_NO of
;	  0676	                set
;	  0677	                [150]:                  ! LOOP COUNT
;	  0678	                    selectoneu (PAR_VAL = GETW (PARPTR)) of
;	  0679	                        set
;	  0680	                        [1 to 65535]:
;	  0681	                            PB[PB_COUNT] = .PAR_VAL;
;	  0682	                        [otherwise]:
;	L 0683	                            return $NICE$ERR_IPV;
; %PRINT:	Invalid parameter value
;	  0684	                        tes;
;	  0685	                [151]:                  ! LOOP LENGTH
;	  0686	                    selectoneu (PAR_VAL = GETW (PARPTR)) of
;	  0687	                        set
;	  0688	                        [1 to 65535]:
;	  0689	                            PB[PB_LENGTH] = .PAR_VAL;
;	  0690	                        [otherwise]:
;	L 0691	                            return $NICE$ERR_IPV;
; %PRINT:	Invalid parameter value
;	  0692	                        tes;
;	  0693	                [152]:                  ! LOOP WITH
;	  0694	                    selectoneu (PAR_VAL = GETB (PARPTR)) of
;	  0695	                        set
;	  0696	                        [0, 1, 2]:
;	  0697	                            PB[PB_WITH] = .PAR_VAL;
;	  0698	                        [otherwise]:
;	L 0699	                            return $NICE$ERR_IPV;
; %PRINT:	Invalid parameter value
;	  0700	                        tes;
;	  0701	                [otherwise]:            ! Invalid parameter for LOOP
;	L 0702	                    return $NICE$ERR_UPT ;
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  17
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (5)

; %PRINT:	Unrecognized parameter type
;	  0703	                tes;
;	  0704	            end;
;	  0705	
;	L 0706	         if .PARPTR neq .PAREND then return $NICE$ERR_IMF;
; %PRINT:	Invalid message format
;	  0707	         end;
;	  0708	
;	  0709	    return 1 ;                          ! Return NICE success code
;	  0710	    end;				!End of GET_LOOP_PARAMETERS


						.SBTTL	GET.LOOP.PARAMETERS
000000	004167  000000G			GET.LOOP.PARAMETERS:
						JSR	R1,$SAVE5			;					0603
000004	024646 					CMP	-(SP),-(SP)
000006	016501  000002 				MOV	2(R5),R1			; *(PB),*				0633
000012	005003 					CLR	R3				;					0645
000014	156103  000074 				BISB	74(R1),R3
000020	010346 					MOV	R3,-(SP)
000022	016102  000102 				MOV	102(R1),R2			;					0646
000026	010246 					MOV	R2,-(SP)			;					0645
000030	012746  000226 				MOV	#226,-(SP)
000034	011766  000006 				MOV	(PC),6(SP)			;					0648
000040	060566  000006 				ADD	R5,6(SP)			; PB,*
000044	016646  000006 				MOV	6(SP),-(SP)			;					0645
000050	004767  000000G				JSR	PC,NL.VGP
000054	062706  000010 				ADD	#10,SP
000060	006000 					ROR	R0
000062	103403 					BLO	1$
000064	012776  000001  000000 			MOV	#1,@0(SP)			;					0649
000072	010346 				1$:	MOV	R3,-(SP)			;					0650
000074	010246 					MOV	R2,-(SP)
000076	012746  000227 				MOV	#227,-(SP)
000102	012704  000010 				MOV	#10,R4				;					0653
000106	060504 					ADD	R5,R4				; PB,*
000110	010446 					MOV	R4,-(SP)			;					0650
000112	004767  000000G				JSR	PC,NL.VGP
000116	062706  000010 				ADD	#10,SP
000122	006000 					ROR	R0
000124	103402 					BLO	2$
000126	012714  000177 				MOV	#177,(R4)			;					0654
000132	010346 				2$:	MOV	R3,-(SP)			;					0655
000134	010246 					MOV	R2,-(SP)
000136	012746  000230 				MOV	#230,-(SP)
000142	062705  000012 				ADD	#12,R5				;					0658
000146	010546 					MOV	R5,-(SP)			;					0655
000150	004767  000000G				JSR	PC,NL.VGP
000154	062706  000010 				ADD	#10,SP
000160	006000 					ROR	R0
000162	103402 					BLO	3$
000164	012715  000002 				MOV	#2,(R5)				;					0659
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  18
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (5)

000170	016100  000104 			3$:	MOV	104(R1),R0			;					0665
000174	001472 					BEQ	10$
000176	016103  000024 				MOV	24(R1),R3			; *,PAREND				0669
000202	066103  000030 				ADD	30(R1),R3			; *,PAREND
000206	020300 				4$:	CMP	R3,R0				; PAREND,PARPTR				0671
000210	003457 					BLE	9$
000212	112066  000002 				MOVB	(R0)+,2(SP)			; PARPTR,$$GETB.X			0674
000216	112066  000003 				MOVB	(R0)+,3(SP)			; PARPTR,$$GETB.X
000222	016601  000002 				MOV	2(SP),R1			; $$GETB.X,PAR.NO
000226	020127  000226 				CMP	R1,#226				; PAR.NO,*				0675
000232	001012 					BNE	5$
000234	112066  000002 				MOVB	(R0)+,2(SP)			; PARPTR,$$GETB.X			0678
000240	112066  000003 				MOVB	(R0)+,3(SP)			; PARPTR,$$GETB.X
000244	016601  000002 				MOV	2(SP),R1			; $$GETB.X,PAR.VAL
000250	001431 					BEQ	7$
000252	010176  000000 				MOV	R1,@0(SP)			; PAR.VAL,*				0681
000256	000753 					BR	4$				;					0678
000260	020127  000227 			5$:	CMP	R1,#227				; PAR.NO,*				0675
000264	001011 					BNE	6$
000266	112066  000002 				MOVB	(R0)+,2(SP)			; PARPTR,$$GETB.X			0686
000272	112066  000003 				MOVB	(R0)+,3(SP)			; PARPTR,$$GETB.X
000276	016601  000002 				MOV	2(SP),R1			; $$GETB.X,PAR.VAL
000302	001414 					BEQ	7$
000304	010114 					MOV	R1,(R4)				; PAR.VAL,*				0689
000306	000737 					BR	4$				;					0686
000310	020127  000230 			6$:	CMP	R1,#230				; PAR.NO,*				0675
000314	001012 					BNE	8$
000316	005001 					CLR	R1				; PAR.VAL				0694
000320	152001 					BISB	(R0)+,R1			; PARPTR,PAR.VAL
000322	020127  000002 				CMP	R1,#2				; PAR.VAL,*
000326	101002 					BHI	7$
000330	010115 					MOV	R1,(R5)				; PAR.VAL,*				0697
000332	000725 					BR	4$				;					0694
000334	012700  177760 			7$:	MOV	#-20,R0				;					0699
000340	000412 					BR	11$
000342	012700  177772 			8$:	MOV	#-6,R0				;					0702
000346	000407 					BR	11$
000350	020003 				9$:	CMP	R0,R3				; PARPTR,PAREND				0706
000352	001403 					BEQ	10$
000354	012700  177776 				MOV	#-2,R0
000360	000402 					BR	11$
000362	012700  000001 			10$:	MOV	#1,R0				;					0633
000366	022626 				11$:	CMP	(SP)+,(SP)+			;					0603
000370	000207 					RTS	PC
; Routine Size:  125 words,	Routine Base:  $CODE$ + 0574
; Maximum stack depth per invocation:  13 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  19
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (6)

;	  0711	
;	  0712	routine LOOPBACK_ACCESS (PB) : NML_LKG_PB =
;	  0713	
;	  0714	!++
;	  0715	! FUNCTIONAL DESCRIPTION:
;	  0716	!
;	  0717	!	This is the loopback access routine for the NODE loopback
;	  0718	!       test.
;	  0719	!
;	  0720	! FORMAL PARAMETERS
;	  0721	!
;	  0722	!	PB - The address of the parameter block.
;	  0723	!
;	  0724	! IMPLICIT INPUTS
;	  0725	!
;	  0726	!	NONE.
;	  0727	!
;	  0728	! ROUTINE VALUE:
;	  0729	!
;	  0730	!	NICE return code.
;	  0731	!
;	  0732	! SIDE EFFECTS:
;	  0733	!
;	  0734	!	NONE.
;	  0735	!
;	  0736	!--
;	  0737	
;	  0738	    begin
;	  0739	
;	  0740	    map
;	  0741	       PB: ref PARAMETER_BLOCK;
;	  0742	
;	  0743	    bind
;	  0744	       REQ = .PB[PB_REQ_ADR]: REQUEST_BLOCK ; ! NICE RB structure
;	  0745	
;	  0746	    local
;	  0747	         CBLK: CONNECT_BLOCK,           ! DECnet link connect block
;	  0748	         LSBLK: LINK_STATUS_BLOCK,      ! DECnet link status block
;	  0749	         RTN_COD ;                      ! NICE return
;	  0750	
;	  0751	    !
;	  0752	    ! Set up the DECnet link connect block for loopback mirror
;	  0753	    ! at node specified in NCP command
;	  0754	    !
;	  0755	
;	  0756	    CBLK[CB_OBJECT] = MIRROR_OBJECT ; ! Loopback mirror object number
;	  0757	    CBLK[CB_DESCRIPTOR_LENGTH] = 0 ; ! No descriptor
;	  0758	    CBLK[CB_TASK_LENGTH] = 0 ;  ! No task name
;	  0759	
;	  0760	    !
;	  0761	    ! Entity id specifies the node to mirror the loopback test messages
;	  0762	    !
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  20
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (6)

;	  0763	
;	  0764	    CBLK[CB_HOST] = .REQ[RB_NICE_ENTITY] ;
;	  0765	
;	  0766	    CBLK[CB_HOST_LENGTH] = .REQ[RB_NICE_ENTITY_ID_LENGTH] ;
;	  0767	
;	  0768	    !
;	  0769	    ! Copy access control fields from request block
;	  0770	    !
;	  0771	
;	  0772	    CBLK[CB_USERID_LENGTH] = .REQ[RB_USER_LENGTH] ;
;	  0773	    CBLK[CB_USERID] = .REQ[RB_USER];
;	  0774	
;	  0775	    CBLK[CB_ACCOUNT_LENGTH] = .REQ[RB_ACCOUNT_LENGTH] ;
;	  0776	    CBLK[CB_ACCOUNT] = .REQ[RB_ACCOUNT];
;	  0777	             
;	  0778	
;	  0779	    CBLK[CB_PASSWORD_LENGTH] = .REQ[RB_PASSWORD_LENGTH] ;
;	  0780	    CBLK[CB_PASSWORD] = .REQ[RB_PASSWORD];
;	  0781	    
;	  0782	    CBLK[CB_DATA_LENGTH] = 0;
;	  0783	
;	  0784	    !
;	  0785	    ! Now make network connection to Loopback Mirror
;	  0786	    !
;	  0787	
;	  0788	    REQ[RB_RESPONSE_LENGTH] = RESPONSE_BUFFER_LENGTH;
;	  0789	    if (PB[PB_LINK_HANDLE] = NMU$NETWORK_OPEN (SOURCE_LINK, CBLK,
;	  0790		.PB[PB_RESPONSE_PTR], REQ[RB_RESPONSE_LENGTH], NICE$_MCF))
;	  0791	    gtr 0
;	  0792	    then begin
;	  0793	         local
;	  0794	              MESSAGE_DATA_SIZE ;       ! Maximum data size of mirror
;	  0795	
;	  0796	         !
;	  0797	         ! Check that mirror returned its maximum data buffer length
;	  0798	         ! and get it.
;	  0799	         !
;	  0800	
;	  0801	         if .CBLK[CB_DATA_LENGTH] neq 2
;	L 0802	         then return $NICE$ERR_MPE ;
; %PRINT:	Management program error
;	  0803	
;	  0804	         MESSAGE_DATA_SIZE = GETW (CBLK[CB_DATA]) ; ! Get mirror's data length
;	  0805	
;	  0806	         !
;	  0807	         ! Go ahead and test if our length is not over mirrors maximum.
;	  0808	         !
;	  0809	
;	  0810	         if .PB[PB_LENGTH] leq .MESSAGE_DATA_SIZE
;	  0811	         then RTN_COD = LOOP_NODE (PB[PB_BASE]) ! Loop messages to node
;	  0812	         else begin
;	  0813	              RTN_COD = NICE$_IPV;
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  21
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (6)

;	  0814	              $RESPONSE (.PB[PB_RESPONSE_PTR], .RTN_COD, 151);
;	  0815	              PB[PB_COUNT] = .MESSAGE_DATA_SIZE;
;	  0816	              end;
;	  0817	
;	  0818	         NMU$NETWORK_CLOSE (.PB[PB_LINK_HANDLE], 0, 0);
;	  0819	         end
;	L 0820	    else RTN_COD = $NICE$ERR_MCF;       ! Say mirror connect failed
; %PRINT:	Mirror connect failed
;	  0821	
;	  0822	    return .RTN_COD
;	  0823	    end;				!End of LOOPBACK_ACCESS


						.SBTTL	LOOPBACK.ACCESS
000000	004167  000000G			LOOPBACK.ACCESS:
						JSR	R1,$SAVE3			;					0712
000004	162706  000234 				SUB	#234,SP
000010	016500  000002 				MOV	2(R5),R0			; *(PB),*				0738
000014	012766  000031  000012 			MOV	#31,12(SP)			; *,CBLK+4				0756
000022	005066  000042 				CLR	42(SP)				; CBLK+34				0757
000026	005066  000016 				CLR	16(SP)				; CBLK+10				0758
000032	016066  000102  000006 			MOV	102(R0),6(SP)			; *,CBLK				0764
000040	116066  000076  000010 			MOVB	76(R0),10(SP)			; *,CBLK+2				0766
000046	105066  000011 				CLRB	11(SP)				; CBLK+2
000052	016066  000054  000022 			MOV	54(R0),22(SP)			; *,CBLK+14				0772
000060	016066  000052  000020 			MOV	52(R0),20(SP)			; *,CBLK+12				0773
000066	016066  000064  000032 			MOV	64(R0),32(SP)			; *,CBLK+24				0775
000074	016066  000062  000030 			MOV	62(R0),30(SP)			; *,CBLK+22				0776
000102	016066  000060  000036 			MOV	60(R0),36(SP)			; *,CBLK+30				0779
000110	016066  000056  000034 			MOV	56(R0),34(SP)			; *,CBLK+26				0780
000116	005066  000026 				CLR	26(SP)				; CBLK+20				0782
000122	012760  000114  000034 			MOV	#114,34(R0)			;					0788
000130	012703  000004 				MOV	#4,R3				;					0789
000134	060503 					ADD	R5,R3				; PB,*
000136	012746  000002 				MOV	#2,-(SP)
000142	012746  000012 				MOV	#12,-(SP)
000146	060616 					ADD	SP,(SP)				; CBLK,*
000150	011546 					MOV	(R5),-(SP)			; PB,*
000152	012746  000034 				MOV	#34,-(SP)			;					0790
000156	060016 					ADD	R0,(SP)
000160	012746  177753 				MOV	#-25,-(SP)			;					0789
000164	004767  000000G				JSR	PC,UN.OPEN
000170	062706  000012 				ADD	#12,SP
000174	010013 					MOV	R0,(R3)
000176	003456 					BLE	4$				;					0791
000200	026627  000026  000002 			CMP	26(SP),#2			; CBLK+20,*				0801
000206	001403 					BEQ	1$
000210	012700  177773 				MOV	#-5,R0				;					0802
000214	000452 					BR	6$
000216	005266  000024 			1$:	INC	24(SP)				; CBLK+16				0804
000222	016600  000024 				MOV	24(SP),R0			; CBLK+16,*
000226	116016  177777 				MOVB	-1(R0),(SP)			; *,$$GETB.X
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  22
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (6)

000232	005266  000024 				INC	24(SP)				; CBLK+16
000236	016600  000024 				MOV	24(SP),R0			; CBLK+16,*
000242	116066  177777  000001 			MOVB	-1(R0),1(SP)			; *,$$GETB.X
000250	011601 					MOV	(SP),R1				; $$GETB.X,MESSAGE.DATA.SI
000252	026501  000010 				CMP	10(R5),R1			; *(PB),MESSAGE.DATA.SI			0810
000256	003004 					BGT	2$
000260	004767  000000V				JSR	PC,LOOP.NODE			;					0811
000264	010002 					MOV	R0,R2				; *,RTN.COD
000266	000412 					BR	3$				;					0810
000270	012702  177760 			2$:	MOV	#-20,R2				; *,RTN.COD				0813
000274	011500 					MOV	(R5),R0				; PB,STRPTR				0814
000276	110220 					MOVB	R2,(R0)+			; RTN.COD,STRPTR
000300	112720  000227 				MOVB	#227,(R0)+			; *,STRPTR
000304	105020 					CLRB	(R0)+				; STRPTR
000306	105020 					CLRB	(R0)+				; STRPTR
000310	010165  000006 				MOV	R1,6(R5)			; MESSAGE.DATA.SI,*(PB)			0815
000314	011346 				3$:	MOV	(R3),-(SP)			;					0818
000316	005046 					CLR	-(SP)
000320	005046 					CLR	-(SP)
000322	004767  000000G				JSR	PC,UN.CLOSE
000326	062706  000006 				ADD	#6,SP				;					0792
000332	000402 					BR	5$				;					0789
000334	012702  177753 			4$:	MOV	#-25,R2				; *,RTN.COD				0820
000340	010200 				5$:	MOV	R2,R0				; RTN.COD,*				0738
000342	062706  000234 			6$:	ADD	#234,SP				;					0712
000346	000207 					RTS	PC
; Routine Size:  116 words,	Routine Base:  $CODE$ + 1166
; Maximum stack depth per invocation:  88 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  23
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (7)

;	  0824	
;	  0825	routine LINE_ACCESS (PB) : NML_LKG_PB =
;	  0826	
;	  0827	!++
;	  0828	! FUNCTIONAL DESCRIPTION:
;	  0829	!
;	  0830	!	This is the access routine for the LINE loopback test.
;	  0831	!
;	  0832	! FORMAL PARAMETERS
;	  0833	!
;	  0834	!	PB - The address of the parameter block.
;	  0835	!
;	  0836	! IMPLICIT INPUTS
;	  0837	!
;	  0838	!	NONE.
;	  0839	!
;	  0840	! ROUTINE VALUE:
;	  0841	!
;	  0842	!	NICE return code.
;	  0843	!
;	  0844	! SIDE EFFECTS:
;	  0845	!
;	  0846	!	NONE.
;	  0847	!
;	  0848	!--
;	  0849	
;	  0850	    begin
;	  0851	
;	  0852	    map
;	  0853	       PB: ref PARAMETER_BLOCK;
;	  0854	
;	  0855	    bind
;	  0856	       REQ = .PB[PB_REQ_ADR]: REQUEST_BLOCK; ! NICE RB structure
;	  0857	
;	  0858	    local
;	  0859	         RTN_COD ;                      ! NICE return
;	  0860	
;	  0861	    !
;	  0862	    ! STATE must be ON or SERVICE
;	  0863	    !
;	  0864	    begin
;	  0865	    local CIRCUIT_STATE;
;	  0866	
;	  0867	    if not NML$GET_VDB_PARAMETER (.REQ[RB_NICE_ENTITY_TYPE],
;	  0868	                                  .REQ[RB_NICE_ENTITY],
;	  0869	                                  CPARM_STATE,
;	  0870	                                  CIRCUIT_STATE)
;	  0871	    then CIRCUIT_STATE = LINK_ON;
;	  0872	
;	  0873	    selectone .CIRCUIT_STATE of
;	  0874	        set
;	  0875	        [LINK_ON, LINK_SERVICE]:
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  24
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (7)

;	  0876	            ;
;	  0877	        [otherwise]:
;	  0878	            begin
;	  0879	            RTN_COD = NICE$_CWS;
;	  0880	            $RESPONSE (.PB[PB_RESPONSE_PTR], .RTN_COD, CIRCUIT_);
;	  0881	            return .RTN_COD;
;	  0882	            end;
;	  0883	        tes;
;	  0884	
;	  0885	    end;
;	  0886	    !
;	  0887	    ! SERVICE must be ENABLED
;	  0888	    !
;	  0889	    begin
;	  0890	    local CIRCUIT_SERVICE;
;	  0891	
;	  0892	    if not NML$GET_VDB_PARAMETER (.REQ[RB_NICE_ENTITY_TYPE],
;	  0893	                                  .REQ[RB_NICE_ENTITY],
;	  0894	                                  CPARM_SERVICE,
;	  0895	                                  CIRCUIT_SERVICE)
;	  0896	    then CIRCUIT_SERVICE = LINK_DISABLED;
;	  0897	
;	  0898	    selectone .CIRCUIT_SERVICE of
;	  0899	        set
;	  0900	        [LINK_ENABLED]:
;	  0901	            ;
;	  0902	        [otherwise]:
;	  0903	            begin
;	  0904	            RTN_COD = NICE$_CWS;
;	  0905	            $RESPONSE (.PB[PB_RESPONSE_PTR], .RTN_COD, CIRCUIT_);
;	  0906	            return .RTN_COD;
;	  0907	            end;
;	  0908	        tes;
;	  0909	
;	  0910	    end;
;	  0911	    !
;	  0912	    ! substate must not be set.
;	  0913	    !
;	  0914	    begin
;	  0915	    local CIRCUIT_SUBSTATE;
;	  0916	
;	  0917	    if not NML$GET_VDB_PARAMETER (.REQ[RB_NICE_ENTITY_TYPE],
;	  0918	                                  .REQ[RB_NICE_ENTITY],
;	  0919	                                  CPARM_SUBSTATE,
;	  0920	                                  CIRCUIT_SUBSTATE)
;	  0921	    then CIRCUIT_SUBSTATE = LINK_NO_SUBSTATE;
;	  0922	
;	  0923	    selectone .CIRCUIT_SUBSTATE of
;	  0924	        set
;	  0925	        [LINK_NO_SUBSTATE]:
;	  0926	            ;
;	  0927	        [otherwise]:
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  25
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (7)

;	  0928	            begin
;	  0929	            RTN_COD = NICE$_CWS;
;	  0930	            $RESPONSE (.PB[PB_RESPONSE_PTR], .RTN_COD, CIRCUIT_);
;	  0931	            return .RTN_COD;
;	  0932	            end;
;	  0933	        tes;
;	  0934	
;	  0935	    end;
;	  0936	    !
;	  0937	    ! Open the DLX data link for loopback use.
;	  0938	    !
;	  0939	
;	P 0940	    if (RTN_COD = $NMU_DLX_OPEN (DLX_LOOP,
;	P 0941	                                 .REQ[RB_NICE_ENTITY],
;	  0942	                                 .PB[PB_RESPONSE_PTR])) geq 0
;	  0943	    then begin                          ! DLX open, got DLX link handle
;	  0944	         PB[PB_LINK_HANDLE] = .RTN_COD;
;	  0945	
;	  0946	         !
;	  0947	         ! Set Data Link Substate to LOOPING.
;	  0948	         !
;	  0949	
;	  0950	         NML$SET_VDB_PARAMETER (.REQ[RB_NICE_ENTITY_TYPE],
;	  0951	                                .REQ[RB_NICE_ENTITY],
;	  0952	                                CPARM_SUBSTATE,
;	  0953	                                uplit (LINK_LOOPING)) ;
;	  0954	
;	  0955	         RTN_COD = LOOP_LINE (PB[PB_BASE]);     ! Loop messages to data link
;	  0956	
;	  0957	         NML$CLR_VDB_PARAMETER (.REQ[RB_NICE_ENTITY_TYPE],
;	  0958	                                .REQ[RB_NICE_ENTITY],
;	  0959	                                CPARM_SUBSTATE);
;	  0960	
;	  0961	         $NMU_DLX_CLOSE (.PB[PB_LINK_HANDLE]); ! Close the DLX link
;	  0962	         end;
;	  0963	
;	  0964	    return .RTN_COD
;	  0965	    end;				!End of LINE_ACCESS



000000						.PSECT	$PLIT$,  RO ,  D  
000000	000002 				P.AAA:	.WORD	2


						.GLOBL	UD.OPEN, UD.CLOSE


						.SBTTL	LINE.ACCESS
001536						.PSECT	$CODE$,  RO 

000000	004167  000000G			LINE.ACCESS:
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  26
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (7)

						JSR	R1,$SAVE3			;					0825
000004	162706  000006 				SUB	#6,SP
000010	016500  000002 				MOV	2(R5),R0			; *(PB),*				0850
000014	005003 					CLR	R3				;					0867
000016	156003  000074 				BISB	74(R0),R3
000022	010346 					MOV	R3,-(SP)
000024	016002  000102 				MOV	102(R0),R2			;					0868
000030	010246 					MOV	R2,-(SP)			;					0867
000032	005046 					CLR	-(SP)
000034	012746  000014 				MOV	#14,-(SP)
000040	060616 					ADD	SP,(SP)				; CIRCUIT.STATE,*
000042	004767  000000G				JSR	PC,NL.VGP
000046	062706  000010 				ADD	#10,SP
000052	006000 					ROR	R0
000054	103402 					BLO	1$
000056	005066  000004 				CLR	4(SP)				; CIRCUIT.STATE				0871
000062	016600  000004 			1$:	MOV	4(SP),R0			; CIRCUIT.STATE,*			0873
000066	001403 					BEQ	2$
000070	020027  000002 				CMP	R0,#2
000074	001046 					BNE	5$				;					0879
000076	010346 				2$:	MOV	R3,-(SP)			;					0892
000100	010246 					MOV	R2,-(SP)
000102	012746  000144 				MOV	#144,-(SP)
000106	012746  000012 				MOV	#12,-(SP)
000112	060616 					ADD	SP,(SP)				; CIRCUIT.SERVICE,*
000114	004767  000000G				JSR	PC,NL.VGP
000120	062706  000010 				ADD	#10,SP
000124	006000 					ROR	R0
000126	103403 					BLO	3$
000130	012766  000001  000002 			MOV	#1,2(SP)			; *,CIRCUIT.SERVICE			0896
000136	016600  000002 			3$:	MOV	2(SP),R0			; CIRCUIT.SERVICE,*			0898
000142	001023 					BNE	5$				;					0904
000144	010346 					MOV	R3,-(SP)			;					0917
000146	010246 					MOV	R2,-(SP)
000150	012746  000001 				MOV	#1,-(SP)
000154	012746  000010 				MOV	#10,-(SP)
000160	060616 					ADD	SP,(SP)				; CIRCUIT.SUBSTAT,*
000162	004767  000000G				JSR	PC,NL.VGP
000166	062706  000010 				ADD	#10,SP
000172	006000 					ROR	R0
000174	103402 					BLO	4$
000176	012716  177777 				MOV	#-1,(SP)			; *,CIRCUIT.SUBSTAT			0921
000202	011600 				4$:	MOV	(SP),R0				; CIRCUIT.SUBSTAT,*			0923
000204	020027  177777 				CMP	R0,#-1
000210	001411 					BEQ	6$
000212	012701  177765 			5$:	MOV	#-13,R1				; *,RTN.COD				0929
000216	011500 					MOV	(R5),R0				; PB,STRPTR				0930
000220	110120 					MOVB	R1,(R0)+			; RTN.COD,STRPTR
000222	112720  000003 				MOVB	#3,(R0)+			; *,STRPTR
000226	105020 					CLRB	(R0)+				; STRPTR
000230	105020 					CLRB	(R0)+				; STRPTR
000232	000443 					BR	7$				;					0928
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  27
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (7)

000234	012746  000003 			6$:	MOV	#3,-(SP)			;					0942
000240	010246 					MOV	R2,-(SP)
000242	011546 					MOV	(R5),-(SP)			; PB,*
000244	004767  000000G				JSR	PC,UD.OPEN
000250	062706  000006 				ADD	#6,SP
000254	010001 					MOV	R0,R1				; *,RTN.COD				0940
000256	002431 					BLT	7$				;					0942
000260	010165  000004 				MOV	R1,4(R5)			; RTN.COD,*(PB)				0944
000264	010346 					MOV	R3,-(SP)			;					0950
000266	010246 					MOV	R2,-(SP)
000270	012746  000001 				MOV	#1,-(SP)
000274	012746  000000'				MOV	#P.AAA,-(SP)
000300	004767  000000G				JSR	PC,NL.VSP
000304	004767  000000V				JSR	PC,LOOP.LINE			;					0955
000310	010001 					MOV	R0,R1				; *,RTN.COD
000312	010316 					MOV	R3,(SP)				;					0957
000314	010246 					MOV	R2,-(SP)
000316	012746  000001 				MOV	#1,-(SP)
000322	004767  000000G				JSR	PC,NL.VCP
000326	016516  000004 				MOV	4(R5),(SP)			; *(PB),*				0961
000332	004767  000000G				JSR	PC,UD.CLOSE
000336	062706  000014 				ADD	#14,SP				;					0943
000342	010100 				7$:	MOV	R1,R0				; RTN.COD,*				0850
000344	062706  000006 				ADD	#6,SP				;					0825
000350	000207 					RTS	PC
; Routine Size:  117 words,	Routine Base:  $CODE$ + 1536
; Maximum stack depth per invocation:  14 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  28
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (8)

;	  0966	
;	  0967	routine LOOP_NODE (PB) : NML_LKG_PB =
;	  0968	
;	  0969	!++
;	  0970	! FUNCTIONAL DESCRIPTION:
;	  0971	!
;	  0972	!	Performs the loopback function to the loopback mirror at
;	  0973	!       a remote node.
;	  0974	!
;	  0975	! FORMAL PARAMETERS
;	  0976	!
;	  0977	!	PB - The address of the parameter block.
;	  0978	!
;	  0979	! IMPLICIT INPUTS
;	  0980	!
;	  0981	!	NONE.
;	  0982	!
;	  0983	! ROUTINE VALUE:
;	  0984	!
;	  0985	!       NICE return code.
;	  0986	!
;	  0987	! SIDE EFFECTS:
;	  0988	!
;	  0989	!	NONE.
;	  0990	!
;	  0991	!--
;	  0992	
;	  0993	    begin
;	  0994	
;	  0995	    map
;	  0996	        PB: ref PARAMETER_BLOCK;
;	  0997	
;	  0998	    label
;	  0999	        AND_RETURN_BUFFERS;
;	  1000	
;	  1001	    literal
;	  1002	           EOM = 1 ;                    ! End of message flag
;	  1003	
;	  1004	    local
;	  1005	         BUFFER_ADR,                    ! Address of receive buffer
;	  1006	         BUFFER_PTR,                    ! Pointer to looped test message
;	  1007	         MESSAGE_ADR,                   ! Address of test message buffer
;	  1008	         MESSAGE_PTR,                   ! Pointer to test message
;	  1009	         RTN_COD ;                      ! NICE return code
;	  1010	
;	  1011	    bind
;	  1012	        LOOP_BUFFER_ALLOCATION = ch$allocation((.PB[PB_LENGTH] + 1),8) * %upval ;
;	  1013	
;	  1014	    !
;	  1015	    ! Get buffers for send and receive loop messages
;	  1016	    !
;	  1017	
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  29
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (8)

;	  1018	    BUFFER_ADR = NMU$MEMORY_GET (LOOP_BUFFER_ALLOCATION) ;
;	  1019	    BUFFER_PTR = ch$ptr (.BUFFER_ADR,,8) ; ! Pointer to buffer
;	  1020	    MESSAGE_ADR = NMU$MEMORY_GET (LOOP_BUFFER_ALLOCATION) ;
;	  1021	    MESSAGE_PTR = ch$ptr (.MESSAGE_ADR,,8) ; ! Pointer to buffer
;	  1022	
;	  1023	AND_RETURN_BUFFERS:
;	  1024	    begin                               ! AND_RETURN_BUFFERS
;	  1025	    !
;	  1026	    ! Build a loop message to test with, function code is zero.
;	  1027	    !
;	  1028	
;	  1029	    RTN_COD = GENERATE_LOOP_MESSAGE (PB[PB_BASE], %O'0', .MESSAGE_PTR) ;
;	  1030	
;	  1031	    if .RTN_COD lss 0 then leave AND_RETURN_BUFFERS;
;	  1032	
;	  1033	         until .PB[PB_COUNT] eql 0      ! Loop all messages
;	  1034	             do begin
;	  1035	                if not NMU$NETWORK_WRITE (.PB[PB_LINK_HANDLE],
;	  1036	                                          EOM,
;	  1037	                                          .PB[PB_LENGTH] + 1, ! 1 Overhead byte
;	  1038	                                          .MESSAGE_PTR)
;	  1039	                then begin
;	  1040	                     RTN_COD = NICE$_MLD;
;	  1041	                     $RESPONSE(.PB[PB_RESPONSE_PTR], .RTN_COD, 10);
;	  1042	                     leave AND_RETURN_BUFFERS
;	  1043	                     end;
;	  1044	                RTN_COD = NMU$NETWORK_READ (.PB[PB_LINK_HANDLE],
;	  1045	                                            .PB[PB_LENGTH] + 1,
;	  1046	                                            .BUFFER_PTR);
;	  1047	                if .RTN_COD lss 0 then leave AND_RETURN_BUFFERS;
;	  1048	
;	  1049	                if not VERIFY_LOOP_MESSAGE (PB[PB_BASE], 1, .MESSAGE_PTR, .BUFFER_PTR)
;	  1050	                then begin
;	L 1051	                     RTN_COD = $NICE$ERR_BLR;
; %PRINT:	Bad loopback response
;	  1052	                     leave AND_RETURN_BUFFERS
;	  1053	                     end;
;	  1054	                PB[PB_COUNT] = .PB[PB_COUNT] - 1 ; ! Another message looped
;	  1055	                end;
;	  1056	
;	  1057	    RTN_COD = NICE$_SUC;
;	  1058	    end;                                ! AND_RETURN_BUFFERS
;	  1059	    !
;	  1060	    ! Release buffers
;	  1061	    !
;	  1062	
;	  1063	    NMU$MEMORY_RELEASE (.MESSAGE_ADR,LOOP_BUFFER_ALLOCATION) ;
;	  1064	    NMU$MEMORY_RELEASE (.BUFFER_ADR,LOOP_BUFFER_ALLOCATION) ;
;	  1065	
;	  1066	    return .RTN_COD ;                   ! Return results
;	  1067	    end;				!End of LOOP_NODE
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  30
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (8)


						.SBTTL	LOOP.NODE
000000	004167  000000G			LOOP.NODE:
						JSR	R1,$SAVE4			;					0967
000004	162706  000010 				SUB	#10,SP
000010	016502  000010 				MOV	10(R5),R2			; *(PB),*				1012
000014	062702  000002 				ADD	#2,R2
000020	010201 					MOV	R2,R1
000022	006700 					SXT	R0
000024	071027  000002 				DIV	#2,R0
000030	010002 					MOV	R0,R2
000032	006302 					ASL	R2
000034	010246 					MOV	R2,-(SP)			;					1018
000036	004767  000000G				JSR	PC,UM.GET
000042	010066  000004 				MOV	R0,4(SP)			; *,BUFFER.ADR
000046	010066  000010 				MOV	R0,10(SP)			; BUFFER.ADR,BUFFER.PTR			1019
000052	010216 					MOV	R2,(SP)				;					1020
000054	004767  000000G				JSR	PC,UM.GET
000060	010066  000002 				MOV	R0,2(SP)			; *,MESSAGE.ADR
000064	010066  000006 				MOV	R0,6(SP)			; MESSAGE.ADR,MESSAGE.PTR		1021
000070	005016 					CLR	(SP)				;					1029
000072	010046 					MOV	R0,-(SP)			; MESSAGE.PTR,*
000074	004767  000000V				JSR	PC,GENERATE.LOOP.MESSAGE
000100	010001 					MOV	R0,R1				; *,RTN.COD
000102	002473 					BLT	6$				;					1031
000104	012704  000006 				MOV	#6,R4				;					1033
000110	060504 					ADD	R5,R4				; PB,*
000112	005714 				1$:	TST	(R4)
000114	001464 					BEQ	5$
000116	016516  000004 				MOV	4(R5),(SP)			; *(PB),*				1035
000122	012746  000001 				MOV	#1,-(SP)
000126	016503  000010 				MOV	10(R5),R3			; *(PB),*				1037
000132	061603 					ADD	(SP),R3
000134	010346 					MOV	R3,-(SP)			;					1035
000136	016646  000014 				MOV	14(SP),-(SP)			; MESSAGE.PTR,*
000142	004767  000000G				JSR	PC,UN.WRITE
000146	062706  000006 				ADD	#6,SP
000152	006000 					ROR	R0
000154	103411 					BLO	2$
000156	012701  177755 				MOV	#-23,R1				; *,RTN.COD				1040
000162	011500 					MOV	(R5),R0				; PB,STRPTR				1041
000164	110120 					MOVB	R1,(R0)+			; RTN.COD,STRPTR
000166	112720  000012 				MOVB	#12,(R0)+			; *,STRPTR
000172	105020 					CLRB	(R0)+				; STRPTR
000174	105020 					CLRB	(R0)+				; STRPTR
000176	000435 					BR	6$				;					1042
000200	016516  000004 			2$:	MOV	4(R5),(SP)			; *(PB),*				1044
000204	010346 					MOV	R3,-(SP)
000206	016646  000014 				MOV	14(SP),-(SP)			; BUFFER.PTR,*
000212	004767  000000G				JSR	PC,UN.READ
000216	010001 					MOV	R0,R1				; *,RTN.COD
000220	002415 					BLT	3$				;					1047
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  31
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (8)

000222	012716  000001 				MOV	#1,(SP)				;					1049
000226	016646  000014 				MOV	14(SP),-(SP)			; MESSAGE.PTR,*
000232	016646  000020 				MOV	20(SP),-(SP)			; BUFFER.PTR,*
000236	004767  000000V				JSR	PC,VERIFY.LOOP.MESSAGE
000242	022626 					CMP	(SP)+,(SP)+
000244	006000 					ROR	R0
000246	103404 					BLO	4$
000250	012701  177744 				MOV	#-34,R1				; *,RTN.COD				1051
000254	022626 				3$:	CMP	(SP)+,(SP)+			;					1052
000256	000405 					BR	6$
000260	005314 				4$:	DEC	(R4)				;					1054
000262	022626 					CMP	(SP)+,(SP)+			;					1034
000264	000712 					BR	1$				;					1033
000266	012701  000001 			5$:	MOV	#1,R1				; *,RTN.COD				1057
000272	016616  000004 			6$:	MOV	4(SP),(SP)			; MESSAGE.ADR,*				1063
000276	010246 					MOV	R2,-(SP)
000300	004767  000000G				JSR	PC,UM.RELEASE
000304	016616  000010 				MOV	10(SP),(SP)			; BUFFER.ADR,*				1064
000310	010246 					MOV	R2,-(SP)
000312	004767  000000G				JSR	PC,UM.RELEASE
000316	010100 					MOV	R1,R0				; RTN.COD,*				0993
000320	062706  000020 				ADD	#20,SP				;					0967
000324	000207 					RTS	PC
; Routine Size:  107 words,	Routine Base:  $CODE$ + 2110
; Maximum stack depth per invocation:  16 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  32
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (9)

;	  1068	
;	  1069	routine LOOP_LINE (PB) : NML_LKG_PB =
;	  1070	
;	  1071	!++
;	  1072	! FUNCTIONAL DESCRIPTION:
;	  1073	!
;	  1074	!
;	  1075	! FORMAL PARAMETERS
;	  1076	!
;	  1077	!	PB - The address of the parameter block.
;	  1078	!
;	  1079	! IMPLICIT INPUTS
;	  1080	!
;	  1081	!	NONE.
;	  1082	!
;	  1083	! ROUTINE VALUE:
;	  1084	!
;	  1085	!	NONE.
;	  1086	!
;	  1087	! SIDE EFFECTS:
;	  1088	!
;	  1089	!	NONE.
;	  1090	!
;	  1091	!--
;	  1092	
;	  1093	    begin
;	  1094	
;	  1095	    map
;	  1096	        PB: ref PARAMETER_BLOCK;
;	  1097	
;	  1098	    label
;	  1099	        AND_RETURN_BUFFERS;
;	  1100	
;	  1101	    local
;	  1102	         BUFFER_ADR,                    ! Address of receive buffer
;	  1103	         BUFFER_PTR,                    ! Pointer to looped test message
;	  1104	         MESSAGE_ADR,                   ! Address of test message buffer
;	  1105	         MESSAGE_PTR,                   ! Pointer to test message
;	  1106	         RTN_COD ;                      ! NICE return code
;	  1107	
;	  1108	    bind
;	  1109	        LOOP_BUFFER_ALLOCATION = ch$allocation((.PB[PB_LENGTH] + 1),8) * %upval ;
;	  1110	
;	  1111	    !
;	  1112	    ! Get buffers for send and receive loop messages
;	  1113	    !
;	  1114	
;	  1115	    BUFFER_ADR = NMU$MEMORY_GET (LOOP_BUFFER_ALLOCATION) ;
;	  1116	    BUFFER_PTR = ch$ptr (.BUFFER_ADR,,8) ; ! Pointer to buffer
;	  1117	    MESSAGE_ADR = NMU$MEMORY_GET (LOOP_BUFFER_ALLOCATION) ;
;	  1118	    MESSAGE_PTR = ch$ptr (.MESSAGE_ADR,,8) ; ! Pointer to buffer
;	  1119	
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  33
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (9)

;	  1120	AND_RETURN_BUFFERS:
;	  1121	    begin                               ! AND_RETURN_BUFFERS
;	  1122	    !
;	  1123	    ! Build a loop message to test with, function code LOOPBACK_TEST.
;	  1124	    !
;	  1125	
;	  1126	    RTN_COD = GENERATE_LOOP_MESSAGE (PB[PB_BASE], LOOPBACK_TEST, .MESSAGE_PTR) ;
;	  1127	
;	  1128	    if .RTN_COD lss 0 then leave AND_RETURN_BUFFERS;
;	  1129	
;	  1130	    until .PB[PB_COUNT] eql 0           ! Loop all messages
;	  1131	             do begin
;	  1132	
;	  1133	                decru CNT from NMU$K_MOP_RETRY_LIMIT to 1
;	  1134	                do begin
;	P 1135	                   if not $NMU_DLX_WRITE (.PB[PB_LINK_HANDLE],
;	P 1136	                                         DLX_OTHER, ! Not doing load/dump 
;	P 1137	                                         .MESSAGE_PTR,
;	P 1138	                                         .PB[PB_LENGTH] + 1, ! 1 Overhead byte
;	  1139	                                         .PB[PB_RESPONSE_PTR])
;	  1140	                   then begin
;	  1141	                        ch$wchar(0, .PB[PB_RESPONSE_PTR]);
;	L 1142	                        RTN_COD = $NICE$ERR_LCE;
; %PRINT:	Line communication error
;	  1143	                        leave AND_RETURN_BUFFERS
;	  1144	                        end;
;	P 1145	                   RTN_COD = $NMU_DLX_READ (.PB[PB_LINK_HANDLE],
;	P 1146	                                           DLX_OTHER, ! Not doing load/dump 
;	P 1147	                                           .BUFFER_PTR, .PB[PB_LENGTH] + 1,,
;	  1148	                                           .PB[PB_RESPONSE_PTR]);
;	  1149	                   if .RTN_COD gtr 0 then exitloop;
;	  1150	                   ch$wchar(0, .PB[PB_RESPONSE_PTR]);
;	  1151	                   if .RTN_COD neq -2
;	  1152	                   then begin
;	L 1153	                        RTN_COD = $NICE$ERR_LCE;
; %PRINT:	Line communication error
;	  1154	                        leave AND_RETURN_BUFFERS
;	  1155	                        end;
;	L 1156	                   RTN_COD = $NICE$ERR_LCE;
; %PRINT:	Line communication error
;	  1157	                   end;
;	  1158	
;	  1159	                if .RTN_COD lss 0 then leave AND_RETURN_BUFFERS;
;	  1160	
;	  1161	                selectone ch$rchar (.BUFFER_PTR) of
;	  1162	                    set
;	  1163	                    [LOOPED_DATA, 25, LOOPBACK_TEST]:
;	  1164	                        if VERIFY_LOOP_MESSAGE (PB[PB_BASE],
;	  1165	                                                ch$rchar (.BUFFER_PTR),
;	  1166	                                                .MESSAGE_PTR,
;	  1167	                                                .BUFFER_PTR)
;	  1168	                        then PB[PB_COUNT] = .PB[PB_COUNT] - 1
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  34
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (9)

;	  1169	                        else begin
;	L 1170	                             RTN_COD = $NICE$ERR_BLR;
; %PRINT:	Bad loopback response
;	  1171	                             leave AND_RETURN_BUFFERS
;	  1172	                             end;
;	  1173	                    [MOP_MODE_RUNNING]:
;	  1174	                        if .RTN_COD geq 8
;	  1175	                        then if (ch$rchar (ch$plus (.BUFFER_PTR, 7)) and 1^2) eql 0
;	  1176	                             then begin
;	L 1177	                                  RTN_COD = $NICE$ERR_OPF;
; %PRINT:	Operation failure
;	  1178	                                  leave AND_RETURN_BUFFERS
;	  1179	                                  end;
;	  1180	                    [otherwise]:
;	  1181	                        begin
;	L 1182	                        RTN_COD = $NICE$ERR_BLR;
; %PRINT:	Bad loopback response
;	  1183	                        leave AND_RETURN_BUFFERS
;	  1184	                        end;
;	  1185	                    tes;
;	  1186	                
;	  1187	                end;
;	  1188	
;	  1189	    RTN_COD = NICE$_SUC;
;	  1190	    end;                                ! AND_RETURN_BUFFERS
;	  1191	    !
;	  1192	    ! Release buffers
;	  1193	    !
;	  1194	
;	  1195	    NMU$MEMORY_RELEASE (.MESSAGE_ADR,LOOP_BUFFER_ALLOCATION) ;
;	  1196	    NMU$MEMORY_RELEASE (.BUFFER_ADR,LOOP_BUFFER_ALLOCATION) ;
;	  1197	
;	  1198	    return .RTN_COD ;                   ! Return results
;	  1199	    end;				!End of LOOP_LINE


						.GLOBL	UD.WRITE, UD.TREAD


						.SBTTL	LOOP.LINE
000000	004167  000000G			LOOP.LINE:
						JSR	R1,$SAVE4			;					1069
000004	162706  000012 				SUB	#12,SP
000010	016504  000010 				MOV	10(R5),R4			; *(PB),*				1109
000014	062704  000002 				ADD	#2,R4
000020	010401 					MOV	R4,R1
000022	006700 					SXT	R0
000024	071027  000002 				DIV	#2,R0
000030	010004 					MOV	R0,R4
000032	006304 					ASL	R4
000034	010446 					MOV	R4,-(SP)			;					1115
000036	004767  000000G				JSR	PC,UM.GET
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  35
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (9)

000042	010066  000010 				MOV	R0,10(SP)			; *,BUFFER.ADR
000046	010066  000006 				MOV	R0,6(SP)			; BUFFER.ADR,BUFFER.PTR			1116
000052	010416 					MOV	R4,(SP)				;					1117
000054	004767  000000G				JSR	PC,UM.GET
000060	010066  000004 				MOV	R0,4(SP)			; *,MESSAGE.ADR
000064	010066  000012 				MOV	R0,12(SP)			; MESSAGE.ADR,MESSAGE.PTR		1118
000070	012716  000030 				MOV	#30,(SP)			;					1126
000074	010046 					MOV	R0,-(SP)			; MESSAGE.PTR,*
000076	004767  000000V				JSR	PC,GENERATE.LOOP.MESSAGE
000102	010001 					MOV	R0,R1				; *,RTN.COD
000104	002556 					BLT	11$				;					1128
000106	012766  000006  000004 			MOV	#6,4(SP)			;					1130
000114	060566  000004 				ADD	R5,4(SP)			; PB,*
000120	005776  000004 			1$:	TST	@4(SP)
000124	001544 				2$:	BEQ	10$
000126	012702  000005 				MOV	#5,R2				; *,CNT					1133
000132	016516  000004 			3$:	MOV	4(R5),(SP)			; *(PB),*				1139
000136	012746  000004 				MOV	#4,-(SP)
000142	016646  000016 				MOV	16(SP),-(SP)			; MESSAGE.PTR,*
000146	016503  000010 				MOV	10(R5),R3			; *(PB),*
000152	005203 					INC	R3
000154	010346 					MOV	R3,-(SP)
000156	011546 					MOV	(R5),-(SP)			; PB,*
000160	004767  000000G				JSR	PC,UD.WRITE
000164	062706  000010 				ADD	#10,SP
000170	032700  000001 				BIT	#1,R0
000174	001005 					BNE	4$
000176	105075  000000 				CLRB	@0(R5)				; *(PB)					1141
000202	012701  177766 				MOV	#-12,R1				; *,RTN.COD				1142
000206	000515 					BR	11$				;					1143
000210	016516  000004 			4$:	MOV	4(R5),(SP)			; *(PB),*				1148
000214	012746  000004 				MOV	#4,-(SP)
000220	016646  000012 				MOV	12(SP),-(SP)			; BUFFER.PTR,*
000224	010346 					MOV	R3,-(SP)
000226	005046 					CLR	-(SP)
000230	011546 					MOV	(R5),-(SP)			; PB,*
000232	004767  000000G				JSR	PC,UD.TREAD
000236	010001 					MOV	R0,R1				; *,RTN.COD				1145
000240	003403 					BLE	5$				;					1149
000242	062706  000012 				ADD	#12,SP
000246	000417 					BR	7$
000250	105075  000000 			5$:	CLRB	@0(R5)				; *(PB)					1150
000254	020127  177776 				CMP	R1,#-2				; RTN.COD,*				1151
000260	001405 					BEQ	6$
000262	012701  177766 				MOV	#-12,R1				; *,RTN.COD				1153
000266	062706  000012 				ADD	#12,SP				;					1154
000272	000463 					BR	11$
000274	012701  177766 			6$:	MOV	#-12,R1				; *,RTN.COD				1156
000300	062706  000012 				ADD	#12,SP				;					1134
000304	077266 					SOB	R2,3$				; CNT,*					0000
000306	005701 				7$:	TST	R1				; RTN.COD				1159
000310	002454 					BLT	11$
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  36
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (9)

000312	127627  000010  000030 			CMPB	@10(SP),#30			; BUFFER.PTR,*				1161
000320	103423 					BLO	8$
000322	127627  000010  000032 			CMPB	@10(SP),#32			; BUFFER.PTR,*
000330	101017 					BHI	8$
000332	005016 					CLR	(SP)				;					1164
000334	117616  000010 				MOVB	@10(SP),(SP)			; BUFFER.PTR,*
000340	016646  000014 				MOV	14(SP),-(SP)			; MESSAGE.PTR,*
000344	016646  000012 				MOV	12(SP),-(SP)			; BUFFER.PTR,*
000350	004767  000000V				JSR	PC,VERIFY.LOOP.MESSAGE
000354	022626 					CMP	(SP)+,(SP)+
000356	006000 					ROR	R0
000360	103023 					BCC	9$
000362	005376  000004 				DEC	@4(SP)				;					1168
000366	000656 					BR	2$				;					1164
000370	127627  000010  000014 		8$:	CMPB	@10(SP),#14			; BUFFER.PTR,*				1161
000376	001014 					BNE	9$
000400	020127  000010 				CMP	R1,#10				; RTN.COD,*				1174
000404	002645 					BLT	1$
000406	016600  000010 				MOV	10(SP),R0			; BUFFER.PTR,*				1175
000412	132760  000004  000007 			BITB	#4,7(R0)			; *,*(BUFFER.PTR)
000420	001237 					BNE	1$
000422	012701  177747 				MOV	#-31,R1				; *,RTN.COD				1177
000426	000405 					BR	11$				;					1178
000430	012701  177744 			9$:	MOV	#-34,R1				; *,RTN.COD				1182
000434	000402 					BR	11$				;					1183
000436	012701  000001 			10$:	MOV	#1,R1				; *,RTN.COD				1189
000442	016616  000006 			11$:	MOV	6(SP),(SP)			; MESSAGE.ADR,*				1195
000446	010446 					MOV	R4,-(SP)
000450	004767  000000G				JSR	PC,UM.RELEASE
000454	016616  000014 				MOV	14(SP),(SP)			; BUFFER.ADR,*				1196
000460	010446 					MOV	R4,-(SP)
000462	004767  000000G				JSR	PC,UM.RELEASE
000466	010100 					MOV	R1,R0				; RTN.COD,*				1093
000470	062706  000022 				ADD	#22,SP				;					1069
000474	000207 					RTS	PC
; Routine Size:  159 words,	Routine Base:  $CODE$ + 2436
; Maximum stack depth per invocation:  18 words
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  37
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (10)

;	  1200	
;	  1201	routine GENERATE_LOOP_MESSAGE (PB, FUNC_CODE,MESSAGE_PTR) : NML_LKG_PB =
;	  1202	
;	  1203	!++
;	  1204	! FUNCTIONAL DESCRIPTION:
;	  1205	!
;	  1206	!	Generates a NICE test message of requested length and
;	  1207	!       contents determined by the LOOP WITH parameter value
;	  1208	!       passed as an argument.
;	  1209	!
;	  1210	! FORMAL PARAMETERS
;	  1211	!
;	  1212	!	PB - The address of the parameter block.
;	  1213	!       FUNC_CODE   - A value to be used as the first byte (function code)
;	  1214	!                     of the test message.
;	  1215	!       MESSAGE_PTR - A character sequence pointer to the buffer in which
;	  1216	!                     the NICE test message will be built.
;	  1217	!
;	  1218	! IMPLICIT INPUTS
;	  1219	!
;	  1220	!	NONE.
;	  1221	!
;	  1222	! ROUTINE VALUE:
;	  1223	!
;	  1224	!	1, if successful;
;	  1225	!       NICE return code if failed.
;	  1226	!
;	  1227	! SIDE EFFECTS:
;	  1228	!
;	  1229	!	NONE.
;	  1230	!
;	  1231	!--
;	  1232	
;	  1233	    begin
;	  1234	
;	  1235	    map
;	  1236	        PB: ref PARAMETER_BLOCK;
;	  1237	
;	  1238	    local
;	  1239	         LOOP_CHAR ;
;	  1240	
;	  1241	    !
;	  1242	    ! Set up the data pattern to be used in loop message
;	  1243	    !
;	  1244	
;	  1245	    LOOP_CHAR = (case .PB[PB_WITH] from 0 to 2 of
;	  1246	                     set
;	  1247	                     [0]:                ! All zeroes
;	  1248	                         %B'00000000' ;
;	  1249	                     [1]:                ! All ones
;	  1250	                         %B'11111111' ;
;	  1251	                     [2]:                ! Mixed ones and zeroes
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  38
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (10)

;	  1252	                         %B'10101010' ;
;	  1253	                     [inrange,           ! Default to mixed
;	  1254	                      outrange]:
;	L 1255	                         return $NICE$ERR_IPV ; ! Error return
; %PRINT:	Invalid parameter value
;	  1256	                     tes);
;	  1257	
;	  1258	    !
;	  1259	    ! Write loop function code and fill message with appropriate pattern
;	  1260	    !
;	  1261	
;	  1262	    ch$wchar_a (.FUNC_CODE,MESSAGE_PTR) ; ! Write function code
;	  1263	    ch$fill (.LOOP_CHAR,
;	  1264	             .PB[PB_LENGTH],
;	  1265	             .MESSAGE_PTR) ;
;	  1266	
;	  1267	    return 1 ;                          ! Success
;	  1268	    end;				!End of GENERATE_LOOP_MESSAGE


						.SBTTL	GENERATE.LOOP.MESSAGE
000000	016500  000012 			GENERATE.LOOP.MESSAGE:
						MOV	12(R5),R0			; *(PB),*				1245
000004	020027  000002 				CMP	R0,#2
000010	101003 					BHI	1$
000012	006300 					ASL	R0
000014	066007  000002'				ADD	P.AAB(R0),PC			; Case dispatch
000020	012700  177760 			1$:	MOV	#-20,R0				;					1255
000024	000207 					RTS	PC
000026	005000 				2$:	CLR	R0				; LOOP.CHAR				1245
000030	000405 					BR	5$
000032	012700  000377 			3$:	MOV	#377,R0				; *,LOOP.CHAR
000036	000402 					BR	5$
000040	012700  000252 			4$:	MOV	#252,R0				; *,LOOP.CHAR
000044	116676  000004  000002 		5$:	MOVB	4(SP),@2(SP)			; FUNC.CODE,MESSAGE.PTR			1262
000052	005266  000002 				INC	2(SP)				; MESSAGE.PTR
000056	010046 					MOV	R0,-(SP)			; LOOP.CHAR,*				1265
000060	016546  000010 				MOV	10(R5),-(SP)			; *(PB),*
000064	016646  000006 				MOV	6(SP),-(SP)			; MESSAGE.PTR,*
000070	004767  000000G				JSR	PC,BL$FIL
000074	062706  000006 				ADD	#6,SP				;					1201
000100	012700  000001 				MOV	#1,R0				;					1233
000104	000207 					RTS	PC				;					1201
; Routine Size:  35 words,	Routine Base:  $CODE$ + 3134
; Maximum stack depth per invocation:  4 words


000002						.PSECT	$PLIT$,  RO ,  D  

					P.AAB:						; CASE Table for GENERATE.LOOP.M+0014	1245
000002	000006 					.WORD	6				; [2$]
000004	000012 					.WORD	12				; [3$]
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  39
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (10)

000006	000020 					.WORD	20				; [4$]
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  40
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (11)

;	  1269	
;	  1270	routine VERIFY_LOOP_MESSAGE (PB,FUNC_CODE,TRANSMIT_PTR,RECEIVE_PTR) : NML_LKG_PB =
;	  1271	
;	  1272	!++
;	  1273	! FUNCTIONAL DESCRIPTION:
;	  1274	!
;	  1275	!	Determines the validity of a NICE test message response after
;	  1276	!       being looped to the target node. The first byte of the message
;	  1277	!       must contain the NICE success return code.
;	  1278	!
;	  1279	! FORMAL PARAMETERS
;	  1280	!
;	  1281	!	PB - The address of the parameter block.
;	  1282	!       FUNC_CODE   - A value to be used as the first byte (function code)
;	  1283	!                     of the test message.
;	  1284	!       TRANSMIT_PTR - A character sequence pointer to the NICE test
;	  1285	!                      message sent to the loopback mirror.
;	  1286	!       RECEIVE_PTR  - A character sequence pointer to the NICE test
;	  1287	!                      received from the loopback mirror.
;	  1288	!
;	  1289	! IMPLICIT INPUTS
;	  1290	!
;	  1291	!	NONE.
;	  1292	!
;	  1293	! ROUTINE VALUE:
;	  1294	!
;	  1295	!	TRUE, if the looped message is valid;
;	  1296	!       FALSE, otherwise.
;	  1297	!
;	  1298	! SIDE EFFECTS:
;	  1299	!
;	  1300	!	NONE.
;	  1301	!
;	  1302	!--
;	  1303	
;	  1304	    begin
;	  1305	
;	  1306	    map
;	  1307	        PB: ref PARAMETER_BLOCK;
;	  1308	
;	  1309	    if ch$rchar_a (RECEIVE_PTR) neq .FUNC_CODE
;	  1310	    then $false
;	  1311	    else ch$eql (.PB[PB_LENGTH],
;	  1312	                 .RECEIVE_PTR,
;	  1313	                 .PB[PB_LENGTH],
;	  1314	                 ch$plus (.TRANSMIT_PTR, 1))
;	  1315	
;	  1316	    end;				!End of VERIFY_LOOP_MESSAGE


						.SBTTL	VERIFY.LOOP.MESSAGE
003242						.PSECT	$CODE$,  RO 
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  41
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (11)


000000	010146 				VERIFY.LOOP.MESSAGE:
						MOV	R1,-(SP)			;					1270
000002	005266  000004 				INC	4(SP)				; RECEIVE.PTR				1309
000006	016600  000004 				MOV	4(SP),R0			; RECEIVE.PTR,*
000012	005001 					CLR	R1
000014	156001  177777 				BISB	-1(R0),R1
000020	020166  000010 				CMP	R1,10(SP)			; *,FUNC.CODE
000024	001402 					BEQ	1$
000026	005000 					CLR	R0
000030	000416 					BR	2$
000032	016546  000010 			1$:	MOV	10(R5),-(SP)			; *(PB),*				1314
000036	016646  000006 				MOV	6(SP),-(SP)			; RECEIVE.PTR,*
000042	016546  000010 				MOV	10(R5),-(SP)			; *(PB),*
000046	016646  000014 				MOV	14(SP),-(SP)			; TRANSMIT.PTR,*
000052	005216 					INC	(SP)
000054	005046 					CLR	-(SP)
000056	004767  000000G				JSR	PC,BL$EQL
000062	062706  000012 				ADD	#12,SP
000066	012601 				2$:	MOV	(SP)+,R1			;					1270
000070	000207 					RTS	PC
; Routine Size:  29 words,	Routine Base:  $CODE$ + 3242
; Maximum stack depth per invocation:  7 words


;	  1317	end				!End of Module NMLLBK
;	  1318	eludom



;					OTS external references
						.GLOBL	$SAVE5, $SAVE4, $SAVE3, BL$EQL
						.GLOBL	BL$FIL, BL$MOV


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




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  DNET61:<MCB.NML>NMLLIB.L16.2		      2718       222         8         0
NMLLBK								24-May-1985 13:22:13	TOPS-20 Bliss-16 2A(530)	    Page  42
X03.32								 3-Jan-1983 01:25:44	DNET61:<MCB.NML>NMLLBK.BLI.1 (11)




;	  1319	! Local Modes:
;	  1320	! Mode:BLISS
;	  1321	! Auto Save Mode:2
;	  1322	! Comment Column:40
;	  1323	! Comment Rounding:+1
;	  1324	! End:
; Size:		878 code + 4 data words
; Run Time:	00:19.0
; Elapsed Time:	00:26.5
; Memory Used:	64 pages
; Compilation Complete
AND_RETURN_BUFFERS		 999	1023	1031	1042	1047	1052	1099	1120	1128	1143	1154	1159
				1171	1178	1183
BLISS16				 341
BUFFER_ADR			1005	1018#	1019	1064	1102	1115#	1116	1196
BUFFER_PTR			1006	1019#	1046	1049	1103	1116#	1147	1161	1165	1167	1175
CBLK				 747	 756#	 757#	 758#	 764#	 766#	 772#	 773#	 775#	 776#	 779#	 780#
				 782#	 789	 801	 804
CB_ACCOUNT_LENGTH		 775
CB_ACCOUNT			 776
CB_DATA				 804
CB_DATA_LENGTH			 782	 801
CB_DESCRIPTOR_LENGTH		 757
CB_HOST				 764
CB_HOST_LENGTH			 766
CB_OBJECT			 756
CB_PASSWORD			 780
CB_PASSWORD_LENGTH		 779
CB_TASK_LENGTH			 758
CB_USERID			 773
CB_USERID_LENGTH		 772
CH$WCHAR			 570	1141	1150
CIRCUIT_			 492	 532	 880	 905	 930
CIRCUIT_SERVICE			 890	 895	 896#	 898
CIRCUIT_STATE			 865	 870	 871#	 873
CIRCUIT_SUBSTATE		 915	 920	 921#	 923
CNT				1133
CONNECT_BLOCK			 747
CPARM_SERVICE			 396#	 894
CPARM_STATE			 394#	 869
CPARM_SUBSTATE			 395#	 919	 952	 959
DECECO				 440
DEFAULT_COUNT			 427#	 649
DEFAULT_LENGTH			 426#	 654
DEFAULT_WITH			 428#	 659
DLX_LOOP			 940
DLX_OTHER			1136	1146
DUMMY				 310+	 312+	 313+
EID_LEN				 543	 562#	 563	 575#	 576
EID_PTR				 543	 551#	 562	 563	 575	 576
EOM				1002#	1036
FIELDS				 365
FUNC_CODE			1201	1262	1270	1309
GENERATE_LOOP_MESSAGE		 353	1029	1126	1201*
GETB				 568	 569	 694
GETW				 674	 678	 686	 804
GET_LOOP_PARAMETERS		 348	 518	 603*
LINE_ACCESS			 350	 533	 825*
LINE_				 492	 534
LINK_AUTODUMPING		 412#
LINK_AUTOLOADING		 411#
LINK_AUTOSERVICE		 410#
LINK_AUTOTRIGGERING		 413#
LINK_CLEARED			 401#
LINK_DISABLED			 418#	 896
LINK_DUMPING			 408#
LINK_ENABLED			 417#	 900
LINK_FAILED			 415#
LINK_LOADING			 407#
LINK_LOOPING			 406#	 953
LINK_NO_SUBSTATE		 403#	 921	 925
LINK_OFF			 399#
LINK_ON				 398#	 871	 875
LINK_REFLECTING			 405#
LINK_SERVICE			 400#	 875
LINK_STARTING			 404#
LINK_STATUS_BLOCK		 748
LINK_SYNCHRONIZING		 414#
LINK_TRIGGERING			 409#
LITERALS			 366
LOCAL_NODE_PTR			 557	 559#	 568	 569
LOOPBACK_ACCESS			 349	 531	 712*
LOOPBACK_TEST			1126	1163
LOOPED_DATA			1163
LOOP_BUFFER_ALLOCATION		1012#	1018	1020	1063	1064	1109#	1115	1117	1195	1196
LOOP_CHAR			1239	1245#	1263
LOOP_LINE			 352	 955	1069*
LOOP_NODE			 351	 811	 967*
LSBLK				 748
MESSAGE_ADR			1007	1020#	1021	1063	1104	1117#	1118	1195
MESSAGE_DATA_SIZE		 794	 804#	 810	 815
MESSAGE_PTR			1008	1021#	1029	1038	1049	1105	1118#	1126	1137	1166	1201	1262
				1265
MIRROR_OBJECT			 756
MOP_MODE_RUNNING		1173
NICE$_CWS			 879	 904	 929
NICE$_IPV			 813
NICE$_MCF			 790
NICE$_MLD			1040
NICE$_MPE			 537
NICE$_PRV			 494
NICE$_SUC			 595	1057	1189
NICE$_UFO			 535
NML$CLR_VDB_PARAMETER		 445	 957
NML$GET_VDB_PARAMETER		 446	 645	 650	 655	 867	 892	 917
NML$NICE_RESPONSE		 444*
NML$REQUEST_FINISH		 597
NML$REQUEST_MANAGER		 326+
NML$SET_VDB_PARAMETER		 447	 950
NML$TEST			 347	 451#
NMLLBK				 181#
NMLVER				 439
NML_LKG_PB			 342#	 343#	 348	 349	 350	 351	 352	 353	 354	 603#	 712#	 825#
				 967#	1069#	1201#	1270#
NMU$K_MOP_RETRY_LIMIT		1133
NMU$MEMORY_GET			 505	1018	1020	1115	1117
NMU$MEMORY_MANAGER		 324+
NMU$MEMORY_RELEASE		1063	1064	1195	1196
NMU$NETWORK_CLOSE		 818
NMU$NETWORK_LOCAL		 559
NMU$NETWORK_OPEN		 789
NMU$NETWORK_READ		1044
NMU$NETWORK_UTILITIES		 448
NMU$NETWORK_WRITE		1035
NMU$QUEUE_MANAGER		 325+
NMU$SCHED_MANAGER		 323+*
NODE_E				 530	 552
NODE_ID_PTR			 556	 560#	 568	 569	 570
NONE				 387
PARAMETER_BLOCK_ALLOCATION	 382#
PARAMETER_BLOCK_SIZE		 381#	 385
PARAMETER_BLOCK			 385#	 487	 636	 741	 853	 996	1096	1236	1307
PARAMETER_FIELDS		 369#	 385
PAREND				 667	 669#	 671	 706
PARPTR				 667	 668#	 671	 674	 678	 686	 694	 706
PAR_NO				 673	 674#	 675
PAR_VAL				 673	 678#	 681	 686#	 689	 694#	 697
PB				 487	 511#	 512#	 518	 527	 545	 546	 548	 549	 586	 592	 603
				 636	 639	 648	 649#	 653	 654#	 658	 659#	 681#	 689#	 697#	 712
				 741	 744	 789#	 790	 810	 811	 814	 815#	 818	 825	 853	 856
				 880	 905	 930	 942	 944#	 955	 961	 967	 996	1012	1029	1033
				1035	1037	1041	1044	1045	1049	1054#	1069	1096	1109	1126	1130
				1135	1138	1139	1141	1145	1147	1148	1150	1164	1168#	1201	1236
				1245	1264	1270	1307	1311	1313
PBBASE				 526	 527#	 531	 533
PB_BASE				 371#	 518	 527	 811	 955	1029	1049	1126	1164
PB_COUNT			 375#	 586	 648	 649	 681	 815	1033	1054	1130	1168
PB_LENGTH			 376#	 653	 654	 689	 810	1012	1037	1045	1109	1138	1147	1264
				1311	1313
PB_LINK_HANDLE			 374#	 789	 818	 944	 961	1035	1044	1135	1145
PB_REQ_ADR			 373#	 511	 639	 744	 856
PB_RESPONSE_PTR			 372#	 512	 545	 546	 548	 549	 592	 790	 814	 880	 905	 930
				 942	1041	1139	1141	1148	1150
PB_WITH				 377#	 658	 659	 697	1245
PUTW				 586
RB_ACCOUNT_LENGTH		 775
RB_ACCOUNT			 776
RB_NICE				 669
RB_NICE_ENTITY			 551	 646	 651	 656	 764	 868	 893	 918	 941	 951	 958
RB_NICE_ENTITY_ID_LENGTH	 766
RB_NICE_ENTITY_TYPE		 490	 528	 552	 645	 650	 655	 867	 892	 917	 950	 957
RB_NICE_LENGTH			 669
RB_NICE_PARAMETERS		 665	 668
RB_PASSWORD			 780
RB_PASSWORD_LENGTH		 779
RB_PRV_SERVICE			 494
RB_RESPONSE			 505	 512	 595
RB_RESPONSE_ALLOCATION		 504	 505
RB_RESPONSE_LENGTH		 592	 596	 788	 790
RB_USER				 773
RB_USER_LENGTH			 772
RECEIVE_PTR			1270	1309	1312
REQ				 451	 484	 490	 494	 504#	 505#	 511	 512	 528	 551	 552	 592#
				 595	 596#	 597	 639#	 645	 646	 650	 651	 655	 656	 665	 668
				 669	 744#	 764	 766	 772	 773	 775	 776	 779	 780	 788#	 790
				 856#	 867	 868	 892	 893	 917	 918	 941	 950	 951	 957	 958
REQUEST_BLOCK			 484	 639	 744	 856
RESPONSE_BUFFER_ALLOCATION	 423#	 504
RESPONSE_BUFFER_LENGTH		 421#	 422	 788
RESPONSE_BUFFER_SIZE		 422#	 423
RSP_PTR				 543	 548#	 560	 563#	 576#	 586	 592
RTN_COD				 488	 518#	 519	 531#	 533#	 535#	 537#	 541	 546	 579	 600	 749
				 811#	 813#	 814	 820#	 822	 859	 879#	 880	 881	 904#	 905	 906
				 929#	 930	 931	 940#	 944	 955#	 964	1009	1029#	1031	1040#	1041
				1044#	1047	1051#	1057#	1066	1106	1126#	1128	1142#	1145#	1149	1151
				1153#	1156#	1159	1170#	1174	1177#	1182#	1189#	1198
SOURCE_LINK			 789
TASK_INFO			 298+
TRANSMIT_PTR			1270	1314
USRECO				 441
VERIFY_LOOP_MESSAGE		 354	1049	1164	1270*
$ADDRESS			 373
$FALSE				 299+	1310
$FIELD				 368
$FIELD_SET_SIZE			 381
$FIELD_SET_UNITS		 382
$INCOMPLETE$			 310+#
$INTEGER			 375	 376	 377
$INTERNAL_ERROR$		 295+#
$NICE$ERR_BLR			 582	1051	1170	1182
$NICE$ERR_IMF			 706
$NICE$ERR_IPV			 584	 683	 691	 699	1255
$NICE$ERR_LCE			 581	1142	1153	1156
$NICE$ERR_MCF			 820
$NICE$ERR_MPE			 802
$NICE$ERR_OPF			 315+	 583	1177
$NICE$ERR_UPT			 702
$NMU_DLX_CLOSE			 961
$NMU_DLX_OPEN			 940
$NMU_DLX_READ			1145
$NMU_DLX_WRITE			1135
$POINTER			 372
$RESPONSE			 546	 595	 814	 880	 905	 930	1041
$RESPONSE_LENGTH		 549
$SHORT_INTEGER			 374
$SHOW				 365	 366	 387
$SUB_BLOCK			 371
%REMAINING			 298+