Google
 

Trailing-Edge - PDP-10 Archives - TOPS-20_V6.1_DECnetSrc_7-23-85 - mcb/sc/scxsub.lst
There is 1 other file named scxsub.lst in the archive. Click here to see a list.
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   1
								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (1)

;	  0001	module SCXSUB (
;	  0002			ident = 'X01150'
;	  0003			) =
;	  0004	begin
;	  0005	!
;	  0006	!                    COPYRIGHT (c) 1980, 1981, 1982
;	  0007	!                    DIGITAL EQUIPMENT CORPORATION
;	  0008	!                        Maynard, Massachusetts
;	  0009	!
;	  0010	!     This software is furnished under a license and may  be  used
;	  0011	!     and copied only in accordance with the terms of such license
;	  0012	!     and with the inclusion of the above copyright notice.   This
;	  0013	!     software  or any other copies thereof may not be provided or
;	  0014	!     otherwise made available to any other person.  No  title  to
;	  0015	!     and ownership of the software is hereby transferred.
;	  0016	!
;	  0017	!     The information  in  this  software  is  subject  to  change
;	  0018	!     without  notice  and should not be construed as a commitment
;	  0019	!     by DIGITAL EQUIPMENT CORPORATION.
;	  0020	!
;	  0021	!     DIGITAL assumes no responsibility for the use or reliability
;	  0022	!     of  its  software  on  equipment  which  is  not supplied by
;	  0023	!     DIGITAL.
;	  0024	!
;	  0025	
;	  0026	!++
;	  0027	!
;	  0028	! FACILITY:	Task Session Control
;	  0029	!
;	  0030	! ABSTRACT:	Subroutine support to the task interface SCX
;	  0031	!
;	  0032	! ENVIRONMENT:	MCB (RSX-11 user)
;	  0033	!
;	  0034	! AUTHOR:	Buren Hoffman		CREATION DATE: 5-Aug-80
;	  0035	!
;	  0036	! MODIFIED BY:
;	  0037	!	X01010	Changed code to use $byt_ptr macro in place of the
;	  0038	!		ch$ptr macro.
;	  0039	!	X01020	Fixed SIGNAL_STOP macro to output more info, as required
;	  0040	!	X01030	Fixed redundant coding problem in FNDOBJ.
;	  0041	!	X01040	Use new Comm/Exec to process linkage (.CRDAT for database)
;	  0042	!	X01050	Updated to use library calls, instead of requires.
;	  0043	!	X01060	Modified KOMPLT to put status in C_PRM2
;	  0044	!	X01070	Added AST queueing routine.
;	  0045	!	X01080	Fixed bug in above ast queueing routine.
;	  0046	!	X01090	Fixed DEACB problem.
;	  0047	!	X01100	Fixed link counter problem.
;	  0048	!	X01110	X01060 should have put status in C_STS.
;	  0049	!	X01120	Optimization work.
;	  0050	!	X01130	?
;	  0051	!	X01140	Fixed LCB unlink and deallocation problem.
;	  0052	!	x01150	Ron Platukis 17-aug-81
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   2
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (1)

;	  0053	!		-Set C_CNT to 0 in MBPROC before issueing S$REJ call
;	  0054	!
;	  0055	!
;	  0056	!--
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   3
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (2)

;	  0057	!
;	  0058	! INCLUDE FILES:
;	  0059	!
;	  0060	library 'SCPRM';
;	  0061	library 'MCB:MCBLIB';
;	  0062	library 'MCB:RSXLIB';
;	  0063	library 'MCB:XPORTX';
;	  0064	library 'MCB:SCSYS';
;	  0065	
;	  0066	require 'SCRSX';
;	  0160	
;	  0161	!
;	  0162	! TABLE OF CONTENTS:
;	  0163	!
;	  0164	forward routine
;	  0165	    BUFCHK,				! Validate user buffer
;	  0166	    DO$XME: linkage_ccb novalue,	! Do XME processing
;	  0167	    FNDOBJ,				! Locate specified object
;	  0168	    GETLCB,				! Get LCB and ULA, and init it
;	  0169	    LCBKIL: novalue,			! Unlink and deallocate LCB
;	  0170	    MBPROC: novalue,			! Process mailbox connects
;	  0171	    NOOP: novalue,			! Do nothing; just return
;	  0172	    QUEAST,				! Queue an AST
;	  0173	    STXMAP,				! Map from SC codes to RSX codes
;	  0174	    ULAGET,				! Allocate a ULA to use
;	  0175	    ULARD,				! Read contents of ULA
;	  0176	    ULASET: novalue,			! Set contents of ULA
;	  0177	    $C5TA: novalue,			! Convert rad50 to ascii
;	  0178	    $CAT5,				! Convert ascii to rad50
;	  0179	    $SCQHD: novalue,			! Queue to head of list
;	  0180	    $SCQIN: novalue,			! Queue to tail of list
;	  0181	    $SCQRM;				! Remove from head of list
;	  0182	
;	  0183	!
;	  0184	! MACROS:
;	  0185	!
;	  0186	
;	  0187	!
;	  0188	! EQUATED SYMBOLS:
;	  0189	!
;	  0190	
;	  0191	!
;	  0192	! OWN STORAGE:
;	  0193	!
;	  0194	
;	  0195	!
;	  0196	! EXTERNAL REFERENCES:
;	  0197	!
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   4
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (3)

;	  0198	global routine BUFCHK (USR, SYS, SIZE) =
;	  0199	
;	  0200	!++
;	  0201	! FUNCTIONAL DESCRIPTION:
;	  0202	!	Validate user buffers, and remap for APR6 usage.
;	  0203	!
;	  0204	! FORMAL PARAMETERS:
;	  0205	!	USR	User buffer specification
;	  0206	!	SYS	Output area for system buffer specification
;	  0207	!	SIZE	Maximum buffer size
;	  0208	!
;	  0209	! IMPLICIT INPUTS:
;	  0210	!	USR and SYS areas formatted according to standard
;	  0211	!	USR_BUFF and SYS_BUFF definitions.
;	  0212	!
;	  0213	! IMPLICIT OUTPUTS:
;	  0214	!	None
;	  0215	!
;	  0216	! ROUTINE VALUE:
;	  0217	!	Status code for any error detected.
;	  0218	!
;	  0219	! COMPLETION CODES:
;	  0220	!	None
;	  0221	!
;	  0222	! SIDE EFFECTS:
;	  0223	!	None
;	  0224	!--
;	  0225	
;	  0226	    begin
;	  0227	    map
;	  0228		USR: ref block field (USR_BUFF),
;	  0229		SYS: ref block field (SYS_BUFF);
;	  0230	    local
;	  0231		USR_TMP: block [2] field (USR_BUFF);
;	  0232	
;	  0233	    if (USR_TMP [USR_ADDR] = .USR [USR_ADDR]) eql 0
;	  0234	    then
;	  0235		begin
;	  0236		SYS [SYS_SIZE] = 0;		! No buffer, so
;	  0237		SYS [SYS_BIAS] = 0;		!   set zeroes
;	  0238		SYS [SYS_ADDR] = 0;
;	  0239		end
;	  0240	    else
;	  0241		begin
;	  0242		USR_TMP [USR_SIZE] = .USR [USR_SIZE];
;	  0243		if (.USR_TMP [USR_SIZE] leq 0) or ((.SIZE neq 0) and (.USR_TMP [USR_SIZE] gtr .SIZE))
;	  0244		  then return IE_BAD;			! Bad parameter
;	  0245		SYS [SYS_SIZE] = .USR_TMP [USR_SIZE];
;	  0246		if not ACHKB$ (.USR_TMP [USR_ADDR], .USR_TMP [USR_SIZE])
;	  0247		  then return IE_SPC;			! Invalid buffer parameter
;	  0248		RELOC$ (.USR_TMP [USR_ADDR], SYS [SYS_BIAS], SYS [SYS_ADDR])
;	  0249		end;
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   5
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (3)

;	  0250	
;	  0251	    return IS_SUC
;	  0252	    end;


						.TITLE	SCXSUB
						.IDENT	/X01150/

						.GLOBL	$ACHKB, $RELOC


						.SBTTL	BUFCHK
000000						.PSECT	$CODE$,  RO 

000000	004167  000000G			BUFCHK::JSR	R1,$SAVE3			;					0198
000004	005746 					TST	-(SP)
000006	016603  000016 				MOV	16(SP),R3			; SYS,*					0236
000012	017646  000020 				MOV	@20(SP),-(SP)			; USR,USR.TMP				0233
000016	001006 					BNE	1$
000020	005063  000004 				CLR	4(R3)				;					0236
000024	005013 					CLR	(R3)				;					0237
000026	005063  000002 				CLR	2(R3)				;					0238
000032	000437 					BR	5$				;					0233
000034	016600  000022 			1$:	MOV	22(SP),R0			; USR,*					0242
000040	016066  000002  000002 			MOV	2(R0),2(SP)			; *,USR.TMP+2
000046	016601  000002 				MOV	2(SP),R1			; USR.TMP+2,*				0243
000052	003405 					BLE	2$
000054	016600  000016 				MOV	16(SP),R0			; SIZE,*
000060	001405 					BEQ	3$
000062	020100 					CMP	R1,R0
000064	003403 					BLE	3$
000066	012700  177777 			2$:	MOV	#-1,R0				;					0244
000072	000421 					BR	6$
000074	010163  000004 			3$:	MOV	R1,4(R3)			;					0245
000100	011600 					MOV	(SP),R0				; USR.TMP,*				0246
000102	004767  000000G				JSR	PC,$ACHKB
000106	103003 					BHIS	4$
000110	012700  177772 				MOV	#-6,R0				;					0247
000114	000410 					BR	6$
000116	011600 				4$:	MOV	(SP),R0				; USR.TMP,*				0248
000120	004767  000000G				JSR	PC,$RELOC
000124	010113 					MOV	R1,(R3)				; $RSX$R1,*
000126	010263  000002 				MOV	R2,2(R3)			; $RSX$R2,*
000132	012700  000001 			5$:	MOV	#1,R0				;					0226
000136	022626 				6$:	CMP	(SP)+,(SP)+			;					0198
000140	000207 					RTS	PC

; Routine Size:  49 words,	Routine Base:  $CODE$ + 0000
; Maximum stack depth per invocation:  7 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   6
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (4)

;	  0253	global routine DO$XME (CCB, MDF, IOP, LCB, BUF): linkage_ccb novalue =
;	  0254	
;	  0255	!++
;	  0256	! FUNCTIONAL DESCRIPTION:
;	  0257	!	Do XME processing
;	  0258	!
;	  0259	! FORMAL PARAMETERS:
;	  0260	!	CCB	CCB address
;	  0261	!	MDF	RCP modifier
;	  0262	!	IOP	IOP address
;	  0263	!	LCB	LCB address (may be zero)
;	  0264	!	BUF	3-word buffer-descriptor address
;	  0265	!
;	  0266	! IMPLICIT INPUTS:
;	  0267	!	LLT mapped
;	  0268	!
;	  0269	! IMPLICIT OUTPUTS:
;	  0270	!	CCB scheduled
;	  0271	!
;	  0272	! ROUTINE VALUE:
;	  0273	! COMPLETION CODES:
;	  0274	!	None
;	  0275	!
;	  0276	! SIDE EFFECTS:
;	  0277	!	None
;	  0278	!--
;	  0279	    begin
;	  0280	    $scx_get_data_base (SCXDB);
;	  0281	    map CCB: ref block field (C_FIELDS),
;	  0282		LCB: ref block field (LCB_FIELDS),
;	  0283		BUF: ref vector [3];
;	  0284	
;	  0285	    CCB [C_FNC] = FC_XME;
;	  0286	    CCB [C_MOD] = .MDF;
;	  0287	    CCB [C_PIX] = .SCXDB [SCX_SCPIX];
;	  0288	    CCB [C_PRM5] = .IOP;
;	  0289	
;	  0290	    if .BUF neq 0
;	  0291	    then
;	  0292		begin
;	  0293		CCB [C_BIAS] = .BUF [0];
;	  0294		CCB [C_ADDR] = .BUF [1];
;	  0295		CCB [C_CNT] = .BUF [2]
;	  0296		end;
;	  0297	
;	  0298	    if .LCB neq 0
;	  0299	    then
;	  0300		begin
;	  0301		CCB [C_LIX] = .LCB [LC_LLA];
;	  0302		CCB [$sub_field (C_PRM1, LO_BYTE)] = .LCB [LC_ULA]
;	  0303		end;
;	  0304	
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   7
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (4)

;	  0305	    $MCB_SCHEDULE_CCB (.CCB)
;	  0306	    end;


						.GLOBL	.CRDAT, $SCHED


						.SBTTL	DO$XME
000000	010446 				DO$XME::MOV	R4,-(SP)			;					0253
000002	112764  000002  000012 			MOVB	#2,12(R4)			; *,*(CCB)				0285
000010	116664  000012  000013 			MOVB	12(SP),13(R4)			; MDF,*(CCB)				0286
000016	016700  000002G				MOV	.CRDAT+2,R0			;					0287
000022	116064  000002  000011 			MOVB	2(R0),11(R4)			; *,*(CCB)
000030	016664  000010  000034 			MOV	10(SP),34(R4)			; IOP,*(CCB)				0288
000036	016600  000004 				MOV	4(SP),R0			; BUF,*					0290
000042	001410 					BEQ	1$
000044	011064  000016 				MOV	(R0),16(R4)			; *,*(CCB)				0293
000050	016064  000002  000020 			MOV	2(R0),20(R4)			; *,*(CCB)				0294
000056	016064  000004  000022 			MOV	4(R0),22(R4)			; *,*(CCB)				0295
000064	016600  000006 			1$:	MOV	6(SP),R0			; LCB,*					0298
000070	001406 					BEQ	2$
000072	116064  000021  000010 			MOVB	21(R0),10(R4)			; *,*(CCB)				0301
000100	116064  000020  000024 			MOVB	20(R0),24(R4)			; *,*(CCB)				0302
000106	004767  000000G			2$:	JSR	PC,$SCHED			;					0305
000112	012604 					MOV	(SP)+,R4			;					0253
000114	000207 					RTS	PC

; Routine Size:  39 words,	Routine Base:  $CODE$ + 0142
; Maximum stack depth per invocation:  2 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   8
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (5)

;	  0307	global routine FNDOBJ (DST, TCB) =
;	  0308	
;	  0309	!++
;	  0310	! FUNCTIONAL DESCRIPTION:
;	  0311	!	Locate object type, and return TCB address
;	  0312	!
;	  0313	! FORMAL PARAMETERS:
;	  0314	!	DST	Destination portion of connect block
;	  0315	!	TCB	Address of word to receive TCB address
;	  0316	!
;	  0317	! IMPLICIT INPUTS:
;	  0318	!	The connect block is mapped (i.e., DST).
;	  0319	!
;	  0320	! IMPLICIT OUTPUTS:
;	  0321	!	None
;	  0322	!
;	  0323	! ROUTINE VALUE:
;	  0324	!	True if object found
;	  0325	!	False if object not found
;	  0326	!
;	  0327	! COMPLETION CODES:
;	  0328	!	None
;	  0329	!
;	  0330	! SIDE EFFECTS:
;	  0331	!	None
;	  0332	!--
;	  0333	
;	  0334	    begin
;	  0335	    $scx_get_data_base (SCXDB);
;	  0336	    map DST: ref block field (CBSD_FIELDS);
;	  0337	    local
;	  0338		PROC_NAM,
;	  0339		NAM_LEN,
;	  0340		NAM_PTR,
;	  0341		NAME: vector [byt$allocation (6)],
;	  0342		%if %bliss (bliss36) %then R50_NAME %else R50_NAME: vector [2] %fi;
;	  0343	
;	  0344	    bind
;	  0345		OTN = SCXDB [SCX_OTN_ADDR]: ref blockvector [,OTN_SIZE] field (OTN_FIELDS);
;	  0346	
;	  0347	    case .DST [CB_FMT] from 0 to 2 of
;	  0348		set
;	  0349	
;	  0350		[0]:			! Format 0
;	  0351		    begin
;	  0352		    local
;	  0353			OBJ,
;	  0354			SAV_MAP;
;	  0355	
;	  0356		    SMAP$ (SAV_MAP);			! Save mapping
;	  0357		    OBJ = .DST [CB_OBJ];		! Get obj before changing map
;	  0358		    MAP$ (.SCXDB [SCX_OTN_BIAS]);	! Set to object table map
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page   9
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (5)

;	  0359		    NAM_LEN = 0;			! Be pessimistic
;	  0360		    incr I from 0 to .SCXDB [SCX_OTN_LEN]-1 do
;	  0361			begin
;	  0362			if .OBJ eql .OTN [.I, OTN_TYPE]
;	  0363			then
;	  0364			    begin
;	  0365			    NAM_PTR = byt$ptr (NAME);	! Copy name to local store
;	  0366			    ch$move (6, byt$ptr (OTN [.I, OTN_NAME]), .NAM_PTR);
;	  0367			    NAM_LEN = .OTN [.I, OTN_NLEN];
;	  0368			    exitloop
;	  0369			    end
;	  0370			end;
;	  0371	
;	  0372		    MAP$ (.SAV_MAP);			! Restore mapping
;	  0373		    if .NAM_LEN eql 0 then return false
;	  0374		    end;
;	  0375	
;	  0376		[1]:			! Format 1
;	  0377		    begin
;	  0378		    NAM_PTR = byt$ptr (DST [CB_NAM]);
;	  0379		    NAM_LEN = .DST [CB_LEN]
;	  0380		    end;
;	  0381	
;	  0382		[2]:			! Format 2
;	  0383		    begin
;	  0384		    NAM_PTR = byt$ptr (DST [CB_NM2]);
;	  0385		    NAM_LEN = .DST [CB_LN2]
;	  0386		    end;
;	  0387	
;	  0388		[outrange]:
;	  0389		    return false;
;	  0390		tes;
;	  0391	
;	L 0392	    %if %bliss (bliss36)
;	U 0393	    %then
;	U 0394		R50_NAME = $CAT5 (NAM_PTR, true);
;	  0395	    %else
;	  0396		R50_NAME [0] = $CAT5 (NAM_PTR, true);
;	  0397		R50_NAME [1] = $CAT5 (NAM_PTR, true);
;	  0398	    %fi
;	  0399	
;	  0400	    $rsx_get_tcb( R50_NAME, .TCB)
;	  0401	    end;


						.GLOBL	KISAR6, $SRSTD, $TSKHD


						.SBTTL	FNDOBJ
000000	004167  000000G			FNDOBJ::JSR	R1,$SAVE5			;					0307
000004	162706  000020 				SUB	#20,SP
000010	016704  000002G				MOV	.CRDAT+2,R4			;					0334
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  10
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (5)

000014	016600  000040 				MOV	40(SP),R0			; DST,*					0347
000020	005001 					CLR	R1
000022	151001 					BISB	(R0),R1
000024	020127  000002 				CMP	R1,#2
000030	101073 					BHI	7$
000032	006301 					ASL	R1
000034	066107  000000'				ADD	P.AAA(R1),PC			; Case dispatch
000040	000467 				1$:	BR	7$				;					0389
000042	016716  000000G			2$:	MOV	KISAR6,(SP)			; *,SAV.MAP				0356
000046	116066  000001  000002 			MOVB	1(R0),2(SP)			; *,OBJ					0357
000054	105066  000003 				CLRB	3(SP)				; OBJ
000060	016467  000020  000000G			MOV	20(R4),KISAR6			;					0358
000066	005005 					CLR	R5				; NAM.LEN				0359
000070	005002 					CLR	R2				; I					0360
000072	000443 					BR	5$
000074	010200 				3$:	MOV	R2,R0				; I,*					0362
000076	072027  000003 				ASH	#3,R0
000102	010003 					MOV	R0,R3
000104	066403  000022 				ADD	22(R4),R3
000110	005001 					CLR	R1
000112	151301 					BISB	(R3),R1
000114	026601  000002 				CMP	2(SP),R1			; OBJ,*
000120	001027 					BNE	4$
000122	012766  000012  000004 			MOV	#12,4(SP)			; *,NAM.PTR				0365
000130	060666  000004 				ADD	SP,4(SP)			; NAME,NAM.PTR
000134	012746  000006 				MOV	#6,-(SP)			;					0366
000140	010001 					MOV	R0,R1
000142	066401  000022 				ADD	22(R4),R1
000146	010146 					MOV	R1,-(SP)
000150	062716  000002 				ADD	#2,(SP)
000154	016646  000010 				MOV	10(SP),-(SP)			; NAM.PTR,*
000160	004767  000000G				JSR	PC,BL$MOV
000164	005005 					CLR	R5				; NAM.LEN				0367
000166	156305  000001 				BISB	1(R3),R5			; *,NAM.LEN
000172	062706  000006 				ADD	#6,SP				;					0368
000176	000404 					BR	6$
000200	005202 				4$:	INC	R2				; I					0360
000202	020264  000016 			5$:	CMP	R2,16(R4)			; I,*
000206	002732 					BLT	3$
000210	011667  000000G			6$:	MOV	(SP),KISAR6			; SAV.MAP,*				0372
000214	005705 					TST	R5				; NAM.LEN				0373
000216	001020 					BNE	10$
000220	005000 				7$:	CLR	R0
000222	000464 					BR	14$
000224	011766  000004 			8$:	MOV	(PC),4(SP)			; *,NAM.PTR				0378
000230	060066  000004 				ADD	R0,4(SP)			; *,NAM.PTR
000234	016005  000002 				MOV	2(R0),R5			; *,NAM.LEN				0379
000240	000407 					BR	10$				;					0347
000242	012766  000010  000004 		9$:	MOV	#10,4(SP)			; *,NAM.PTR				0384
000250	060066  000004 				ADD	R0,4(SP)			; *,NAM.PTR
000254	016005  000006 				MOV	6(R0),R5			; *,NAM.LEN				0385
000260	012746  000006 			10$:	MOV	#6,-(SP)			;					0396
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  11
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (5)

000264	060616 					ADD	SP,(SP)				; NAM.PTR,*
000266	012746  000001 				MOV	#1,-(SP)
000272	004767  000000V				JSR	PC,$CAT5
000276	010066  000012 				MOV	R0,12(SP)			; *,R50.NAME
000302	012716  000010 				MOV	#10,(SP)			;					0397
000306	060616 					ADD	SP,(SP)				; NAM.PTR,*
000310	012746  000001 				MOV	#1,-(SP)
000314	004767  000000V				JSR	PC,$CAT5
000320	010066  000016 				MOV	R0,16(SP)			; *,R50.NAME+2
000324	016700  000000G				MOV	$TSKHD,R0			;					0400
000330	005760  000030 				TST	30(R0)
000334	001406 					BEQ	11$
000336	012703  000014 				MOV	#14,R3
000342	060603 					ADD	SP,R3				; R50.NAME,*
000344	004767  000000G				JSR	PC,$SRSTD
000350	103003 					BHIS	12$
000352	012700  000040 			11$:	MOV	#40,R0
000356	000404 					BR	13$
000360	010076  000044 			12$:	MOV	R0,@44(SP)			; $RSX$R0,TCB
000364	012700  000001 				MOV	#1,R0
000370	062706  000006 			13$:	ADD	#6,SP				;					0334
000374	062706  000020 			14$:	ADD	#20,SP				;					0307
000400	000207 					RTS	PC

; Routine Size:  129 words,	Routine Base:  $CODE$ + 0260
; Maximum stack depth per invocation:  18 words


000000						.PSECT	$PLIT$,  RO ,  D  

					P.AAA:						; CASE Table for FNDOBJ+0034		0347
000000	000002 					.WORD	2				; [2$]
000002	000164 					.WORD	164				; [8$]
000004	000202 					.WORD	202				; [9$]
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  12
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (6)

;	  0402	global routine GETLCB (TNBP, LCBP, TKBA) =
;	  0403	
;	  0404	!++
;	  0405	! FUNCTIONAL DESCRIPTION:
;	  0406	!	Get LCB memory and ULA.
;	  0407	!
;	  0408	! FORMAL PARAMETERS:
;	  0409	!	TNBP	Address of word to receive address of TNB
;	  0410	!	LCBP	Address of word to receive address of LCB
;	  0411	!	TKBA	TKB address
;	  0412	!
;	  0413	! IMPLICIT INPUTS:
;	  0414	!	None
;	  0415	!
;	  0416	! IMPLICIT OUTPUTS:
;	  0417	!	LCB initialized
;	  0418	!
;	  0419	! ROUTINE VALUE:
;	  0420	!	True if successful, else false
;	  0421	!
;	  0422	! COMPLETION CODES:
;	  0423	!	None
;	  0424	!
;	  0425	! SIDE EFFECTS:
;	  0426	!	None
;	  0427	!--
;	  0428	
;	  0429	    begin
;	  0430	    $scx_get_data_base (SCXDB);
;	  0431	    local
;	  0432		TNB: ref block field (TNB_FIELDS),
;	  0433		LCB: ref block field (LCB_FIELDS),
;	  0434		ULA;
;	  0435	
;	  0436	    if $MCB_GET_DSR (LCB_SIZE*bytes_word, LCB)
;	  0437	    then
;	  0438		begin
;	  0439		if not ULAGET (ULA)
;	  0440		then
;	  0441		    begin
;	  0442		    $MCB_RETURN_DSR (LCB_SIZE*bytes_word, .LCB);
;	  0443		    return false
;	  0444		    end
;	  0445		end
;	  0446	    else return false;
;	  0447	
;	  0448	    ch$fill (0, LCB_SIZE*bytes_word, .LCB);
;	  0449	    .LCBP = .LCB;
;	  0450	    ULASET (.ULA, .LCB);
;	  0451	    LCB [LC_ULA] = .ULA;
;	  0452	    LCB [LC_TASK] = .TKBA;
;	  0453	    LCB [LC_OQTL] = LCB [LC_OQHD];
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  13
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (6)

;	  0454	    LCB [LC_NQTL] = LCB [LC_NQHD];
;	  0455	
;	  0456	    TNB = SCXDB [SCX_TNB];
;	  0457	    while (TNB = .TNB [TN_LINK]) neq 0 do
;	  0458		begin
;	  0459		if .TNB [TN_TASK] eql .LCB [LC_TASK]
;	  0460		then
;	  0461		    begin
;	  0462		    LCB [LC_TNB] = .TNB;
;	  0463		    exitloop
;	  0464		    end
;	  0465		end;
;	  0466	
;	  0467	    if .TNB eql 0 then SIGNAL_STOP (SCX$_ILE);
;	  0468	    .TNBP = .TNB;
;	  0469	    LCB [LC_LINK] = .TNB [TN_LCB];
;	  0470	    TNB [TN_LCB] = .LCB;
;	  0471	    return true
;	  0472	    end;


						.GLOBL	$DSRGT, $DSRRT


						.SBTTL	GETLCB
000662						.PSECT	$CODE$,  RO 

000000	004167  000000G			GETLCB::JSR	R1,$SAVE3			;					0402
000004	005746 					TST	-(SP)
000006	016703  000002G				MOV	.CRDAT+2,R3			;					0429
000012	012701  000022 				MOV	#22,R1				;					0436
000016	004767  000000G				JSR	PC,$DSRGT
000022	103512 					BCS	5$
000024	010002 					MOV	R0,R2				; $MCB$R0,LCB
000026	012746  000002 				MOV	#2,-(SP)			;					0439
000032	060616 					ADD	SP,(SP)				; ULA,*
000034	004767  000000V				JSR	PC,ULAGET
000040	005726 					TST	(SP)+
000042	006000 					ROR	R0
000044	103406 					BLO	1$
000046	010200 					MOV	R2,R0				; LCB,*					0442
000050	012701  000022 				MOV	#22,R1
000054	004767  000000G				JSR	PC,$DSRRT
000060	000473 					BR	5$				;					0441
000062	005046 				1$:	CLR	-(SP)				;					0448
000064	012746  000022 				MOV	#22,-(SP)
000070	010246 					MOV	R2,-(SP)			; LCB,*
000072	004767  000000G				JSR	PC,BL$FIL
000076	010276  000024 				MOV	R2,@24(SP)			; LCB,LCBP				0449
000102	016616  000006 				MOV	6(SP),(SP)			; ULA,*					0450
000106	010246 					MOV	R2,-(SP)			; LCB,*
000110	004767  000000V				JSR	PC,ULASET
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  14
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (6)

000114	116662  000010  000020 			MOVB	10(SP),20(R2)			; ULA,*(LCB)				0451
000122	016662  000024  000002 			MOV	24(SP),2(R2)			; TKBA,*(LCB)				0452
000130	012762  000006  000010 			MOV	#6,10(R2)			; *,*(LCB)				0453
000136	060262  000010 				ADD	R2,10(R2)			; LCB,*(LCB)
000142	012762  000012  000014 			MOV	#12,14(R2)			; *,*(LCB)				0454
000150	060262  000014 				ADD	R2,14(R2)			; LCB,*(LCB)
000154	010301 					MOV	R3,R1				; *,TNB					0456
000156	062701  000006 				ADD	#6,R1				; *,TNB
000162	011101 				2$:	MOV	(R1),R1				; TNB,TNB				0457
000164	001407 					BEQ	3$
000166	026162  000002  000002 			CMP	2(R1),2(R2)			; *(TNB),*(LCB)				0459
000174	001372 					BNE	2$
000176	010162  000004 				MOV	R1,4(R2)			; TNB,*(LCB)				0462
000202	001007 					BNE	4$				;					0467
000204	012716  100004 			3$:	MOV	#-77774,(SP)
000210	012746  000001 				MOV	#1,-(SP)
000214	004767  000000G				JSR	PC,$STOP
000220	005726 					TST	(SP)+
000222	010176  000030 			4$:	MOV	R1,@30(SP)			; TNB,TNBP				0468
000226	016112  000004 				MOV	4(R1),(R2)			; *(TNB),LCB				0469
000232	010261  000004 				MOV	R2,4(R1)			; LCB,*(TNB)				0470
000236	062706  000010 				ADD	#10,SP				;					0402
000242	012700  000001 				MOV	#1,R0				;					0429
000246	000401 					BR	6$
000250	005000 				5$:	CLR	R0				;					0402
000252	005726 				6$:	TST	(SP)+
000254	000207 					RTS	PC

; Routine Size:  87 words,	Routine Base:  $CODE$ + 0662
; Maximum stack depth per invocation:  11 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  15
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (7)

;	  0473	global routine LCBKIL (LCB): novalue =
;	  0474	
;	  0475	!++
;	  0476	! FUNCTIONAL DESCRIPTION:
;	  0477	!	Unlink and deallocate specified LCB
;	  0478	!
;	  0479	! FORMAL PARAMETERS:
;	  0480	!	LCB	Address of LCB to get rid of
;	  0481	!
;	  0482	! IMPLICIT INPUTS:
;	  0483	!	It is assumed that the link is closed, and the
;	  0484	!	output queue is empty.
;	  0485	!
;	  0486	! IMPLICIT OUTPUTS:
;	  0487	!	None
;	  0488	!
;	  0489	! ROUTINE VALUE:
;	  0490	! COMPLETION CODES:
;	  0491	!	None
;	  0492	!
;	  0493	! SIDE EFFECTS:
;	  0494	!	None
;	  0495	!--
;	  0496	
;	  0497	    begin
;	  0498	    map LCB: ref block field (LCB_FIELDS);
;	  0499	    local
;	  0500		LC: ref block field (LCB_FIELDS),
;	  0501		LC_PREV: ref block field (LCB_FIELDS);
;	  0502	    bind
;	  0503		TNB = LCB [LC_TNB]: ref block field (TNB_FIELDS);
;	  0504	
;	  0505	    LC = TNB [TN_LCB];			! Point to first LCB pointer
;	  0506	    while (LC_PREV = .LC; LC = .LC [LC_LINK]) neq 0 do
;	  0507		begin
;	  0508		if .LC eql .LCB
;	  0509		then
;	  0510		    begin
;	  0511		    LC_PREV [LC_LINK] = .LC [LC_LINK];		! Remove LCB from list
;	  0512		    $MCB_RETURN_DSR (LCB_SIZE*bytes_word, .LC);	! and release memory
;	  0513		    exitloop
;	  0514		    end
;	  0515		end
;	  0516	    end;


						.SBTTL	LCBKIL
000000	004167  000000G			LCBKIL::JSR	R1,$SAVE3			;					0473
000004	016600  000012 				MOV	12(SP),R0			; LCB,*					0503
000010	062700  000004 				ADD	#4,R0
000014	011002 					MOV	(R0),R2				; *,LC					0505
000016	062702  000004 				ADD	#4,R2				; *,LC
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  16
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (7)

000022	010203 				1$:	MOV	R2,R3				; LC,LC.PREV				0506
000024	011202 					MOV	(R2),R2				; LC,LC
000026	001411 					BEQ	2$
000030	020266  000012 				CMP	R2,12(SP)			; LC,LCB				0508
000034	001372 					BNE	1$
000036	011213 					MOV	(R2),(R3)			; LC,LC.PREV				0511
000040	010200 					MOV	R2,R0				; LC,*					0512
000042	012701  000022 				MOV	#22,R1
000046	004767  000000G				JSR	PC,$DSRRT
000052	000207 				2$:	RTS	PC				;					0473

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


;	  0517	
;	  0518	
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  17
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (8)

;	  0519	global routine MBPROC (QUEUE): novalue =
;	  0520	
;	  0521	!++
;	  0522	! FUNCTIONAL DESCRIPTION:
;	  0523	!	Process waiting connect packets on the specified queue
;	  0524	!
;	  0525	! FORMAL PARAMETERS:
;	  0526	!	QUEUE	Address of mailbox queue header
;	  0527	!
;	  0528	! IMPLICIT INPUTS:
;	  0529	!	None
;	  0530	!
;	  0531	! IMPLICIT OUTPUTS:
;	  0532	!	Appropriate packets are dequeued, and rejected.
;	  0533	!
;	  0534	! ROUTINE VALUE:
;	  0535	! COMPLETION CODES:
;	  0536	!	None
;	  0537	!
;	  0538	! SIDE EFFECTS:
;	  0539	!	None
;	  0540	!--
;	  0541	
;	  0542	    begin
;	  0543	    $scx_get_data_base (SCXDB);
;	  0544	    map QUEUE: ref block field (QHD_FIELDS);
;	  0545	    local
;	  0546		CCB: ref block field (C_FIELDS),
;	  0547		MB_PREV: ref block field (MBP_FIELDS),
;	  0548		MB: ref block field (MBP_FIELDS);
;	  0549	
;	  0550	    MB = .QUEUE;			! Initialize queue pointer
;	  0551	    while (MB_PREV = .MB; MB = .MB [MB_LINK]) neq 0 do
;	  0552		begin
;	  0553		if (.MB [MB_FNC] eql MB$CON) or (.MB [MB_FNC] eql MB$CNP)
;	  0554		then
;	  0555		    begin
;	  0556		    if .MB [MBF_REQ] then MB [MBF_REQ] = not TSKRT$ (.MB [MB_TASK], 0);
;	  0557		    if .MB [MB_TIME] neq 0	! Active timer ?
;	  0558		    then
;	  0559			begin				! Yes, check it
;	  0560			if (MB [MB_TIME] = .MB [MB_TIME] - 1) eql 0
;	  0561			then
;	  0562			    begin			! It has expired
;	  0563			    if CCBGT$ (CCB)		! Get a CCB to reject connect
;	  0564			    then
;	  0565				begin
;	  0566				if (MB_PREV [MB_LINK] = .MB [MB_LINK]) eql 0
;	  0567				then QUEUE [Q_TAIL] = .MB_PREV;	! Dequeue the entry
;	  0568				CCB [C_LIX] = .MB [MB_LLA];
;	  0569				ccb [c_cnt] = 0;		! no optional data.
;	  0570				CCB [C_PRM2] = S_ENRO;
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  18
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (8)

;	  0571				CCB [C_PRM4] = .MB [MB_TNB];	! Remember which TNB
;	  0572				$SCX_DO_XME (.CCB, S$REJ, 0, 0, 0);
;	  0573				$MCB_RETURN_DSR (MBP_SIZE*bytes_word + .MB [MB_CNT], .MB);
;	  0574				MB = .MB_PREV
;	  0575				end
;	  0576			    else
;	  0577				MB [MB_TIME] = 1	! Let it blow on next tick
;	  0578			    end
;	  0579			end
;	  0580		    end
;	  0581		end
;	  0582	    end;


						.GLOBL	$TSKRT, $CCBGT


						.SBTTL	MBPROC
000000	004167  000000G			MBPROC::JSR	R1,$SAVE5			;					0519
000004	005746 					TST	-(SP)
000006	016646  000020 				MOV	20(SP),-(SP)			; QUEUE,MB				0550
000012	011666  000002 			1$:	MOV	(SP),2(SP)			; MB,MB.PREV				0551
000016	017616  000000 				MOV	@0(SP),(SP)			; MB,MB
000022	001532 					BEQ	8$
000024	012700  000004 				MOV	#4,R0				;					0553
000030	061600 					ADD	(SP),R0				; MB,*
000032	010004 					MOV	R0,R4
000034	121427  000001 				CMPB	(R4),#1
000040	001402 					BEQ	2$
000042	105714 					TSTB	(R4)
000044	001362 					BNE	1$
000046	032714  000400 			2$:	BIT	#400,(R4)			;					0556
000052	001424 					BEQ	5$
000054	011602 					MOV	(SP),R2				; MB,*
000056	016200  000014 				MOV	14(R2),R0			; *(MB),*
000062	005001 					CLR	R1
000064	004767  000000G				JSR	PC,$TSKRT
000070	103403 					BCS	3$
000072	012700  000001 				MOV	#1,R0
000076	000402 					BR	4$
000100	012700  000040 			3$:	MOV	#40,R0
000104	005100 				4$:	COM	R0
000106	042714  000400 				BIC	#400,(R4)
000112	032700  000001 				BIT	#1,R0
000116	001402 					BEQ	5$
000120	052714  000400 				BIS	#400,(R4)
000124	012701  000012 			5$:	MOV	#12,R1				;					0557
000130	061601 					ADD	(SP),R1				; MB,*
000132	010100 					MOV	R1,R0
000134	005710 					TST	(R0)
000136	001725 					BEQ	1$
000140	005310 					DEC	(R0)				;					0560
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  19
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (8)

000142	001323 					BNE	1$
000144	004767  000000G				JSR	PC,$CCBGT			;					0563
000150	103454 					BCS	7$
000152	010405 					MOV	R4,R5				; $MCB$R4,CCB
000154	017676  000000  000002 			MOV	@0(SP),@2(SP)			; MB,MB.PREV				0566
000162	001005 					BNE	6$
000164	016600  000022 				MOV	22(SP),R0			; QUEUE,*				0567
000170	016660  000002  000002 			MOV	2(SP),2(R0)			; MB.PREV,*
000176	011600 				6$:	MOV	(SP),R0				; MB,*					0568
000200	116065  000006  000010 			MOVB	6(R0),10(R5)			; *(MB),*(CCB)
000206	005065  000022 				CLR	22(R5)				; *(CCB)				0569
000212	012765  177732  000026 			MOV	#-46,26(R5)			; *,*(CCB)				0570
000220	016065  000016  000032 			MOV	16(R0),32(R5)			; *(MB),*(CCB)				0571
000226	012746  000004 				MOV	#4,-(SP)			;					0572
000232	005046 					CLR	-(SP)
000234	005046 					CLR	-(SP)
000236	005046 					CLR	-(SP)
000240	010504 					MOV	R5,R4				; CCB,*
000242	004767  176460 				JSR	PC,DO$XME
000246	016600  000010 				MOV	10(SP),R0			; MB,*					0573
000252	016001  000002 				MOV	2(R0),R1			; *(MB),*
000256	062701  000020 				ADD	#20,R1
000262	004767  000000G				JSR	PC,$DSRRT
000266	016666  000012  000010 			MOV	12(SP),10(SP)			; MB.PREV,MB				0574
000274	062706  000010 				ADD	#10,SP				;					0565
000300	000644 					BR	1$				;					0562
000302	012710  000001 			7$:	MOV	#1,(R0)				;					0577
000306	000641 					BR	1$				;					0559
000310	022626 				8$:	CMP	(SP)+,(SP)+			;					0519
000312	000207 					RTS	PC

; Routine Size:  102 words,	Routine Base:  $CODE$ + 1214
; Maximum stack depth per invocation:  13 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  20
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (9)

;	  0583	global routine NOOP: novalue =
;	  0584	
;	  0585	!++
;	  0586	! FUNCTIONAL DESCRIPTION:
;	  0587	!	This routine simply returns
;	  0588	!
;	  0589	! FORMAL PARAMETERS:
;	  0590	!	None
;	  0591	!
;	  0592	! IMPLICIT INPUTS:
;	  0593	!	None
;	  0594	!
;	  0595	! IMPLICIT OUTPUTS:
;	  0596	!	None
;	  0597	!
;	  0598	! ROUTINE VALUE:
;	  0599	! COMPLETION CODES:
;	  0600	!	None
;	  0601	!
;	  0602	! SIDE EFFECTS:
;	  0603	!	None
;	  0604	!--
;	  0605	
;	  0606	    begin
;	  0607	    return
;	  0608	    end;


						.SBTTL	NOOP
000000	000207 				NOOP::	RTS	PC				;					0583

; Routine Size:  1 word,	Routine Base:  $CODE$ + 1530
; Maximum stack depth per invocation:  0 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  21
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (10)

;	  0609	global routine QUEAST (TNB) =
;	  0610	
;	  0611	!++
;	  0612	! FUNCTIONAL DESCRIPTION:
;	  0613	!	Queue an AST to RSX
;	  0614	!
;	  0615	! FORMAL PARAMETERS:
;	  0616	!	TNB	TNB address for task
;	  0617	!
;	  0618	! IMPLICIT INPUTS:
;	  0619	!	None
;	  0620	!
;	  0621	! IMPLICIT OUTPUTS:
;	  0622	!	None
;	  0623	!
;	  0624	! ROUTINE VALUE:
;	  0625	! COMPLETION CODES:
;	  0626	!	False if memory allocation fails, else true.
;	  0627	!
;	  0628	! SIDE EFFECTS:
;	  0629	!	None
;	  0630	!--
;	  0631	
;	  0632	    begin
;	  0633	    map
;	  0634		TNB: ref block field (TNB_FIELDS);
;	  0635	    local
;	  0636		AST: ref block field (AST_FIELDS);
;	  0637	    literal
;	  0638		AST_SIZE = %fieldexpand (A_PRM, 0) * bytes_word;
;	  0639	
;	  0640	    if .TNB [TN_SPA] eql 0 then return true;
;	  0641	    if not ALOCB$ (AST_SIZE, AST) then return false;
;	  0642	
;	  0643	    AST [A_CBL] = AST_SIZE;
;	  0644	    AST [A_BYT] = 7 * %upval;
;	  0645	    AST [A_AST] = .TNB [TN_SPA];
;	  0646	    AST [A_NPR] = 0;
;	  0647	    QASTT$ (.TNB [TN_TASK], .AST);
;	  0648	    return true
;	  0649	    end;


						.GLOBL	$ALOCB, $QASTT


						.SBTTL	QUEAST
000000	004167  000000G			QUEAST::JSR	R1,$SAVE3			;					0609
000004	016600  000012 				MOV	12(SP),R0			; TNB,*					0640
000010	016003  000024 				MOV	24(R0),R3
000014	001426 					BEQ	1$
000016	012701  000012 				MOV	#12,R1				;					0641
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  22
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (10)

000022	004767  000000G				JSR	PC,$ALOCB
000026	103424 					BCS	2$
000030	010001 					MOV	R0,R1				; $RSX$R0,AST
000032	012761  000012  000002 			MOV	#12,2(R1)			; *,*(AST)				0643
000040	012761  000016  000004 			MOV	#16,4(R1)			; *,*(AST)				0644
000046	010361  000006 				MOV	R3,6(R1)			; *,*(AST)				0645
000052	005061  000010 				CLR	10(R1)				; *(AST)				0646
000056	016602  000012 				MOV	12(SP),R2			; TNB,*					0647
000062	016200  000002 				MOV	2(R2),R0
000066	004767  000000G				JSR	PC,$QASTT
000072	012700  000001 			1$:	MOV	#1,R0				;					0632
000076	000207 					RTS	PC
000100	005000 				2$:	CLR	R0				;					0609
000102	000207 					RTS	PC

; Routine Size:  34 words,	Routine Base:  $CODE$ + 1532
; Maximum stack depth per invocation:  5 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  23
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (11)

;	  0650	global routine STXMAP (CODE) =
;	  0651	
;	  0652	!++
;	  0653	! FUNCTIONAL DESCRIPTION:
;	  0654	!	Map from SC error codes to RSX codes
;	  0655	!
;	  0656	! FORMAL PARAMETERS:
;	  0657	!	CODE	SC error code
;	  0658	!
;	  0659	! IMPLICIT INPUTS:
;	  0660	!	None
;	  0661	!
;	  0662	! IMPLICIT OUTPUTS:
;	  0663	!	None
;	  0664	!
;	  0665	! ROUTINE VALUE:
;	  0666	!	The equivalent RSX error code
;	  0667	!
;	  0668	! COMPLETION CODES:
;	  0669	!	None
;	  0670	!
;	  0671	! SIDE EFFECTS:
;	  0672	!	None
;	  0673	!--
;	  0674	
;	  0675	    begin
;	  0676	
;	  0677	    macro
;	  0678		C (SC_CODE, RSX_CODE) = ((SC_CODE - S_ELO)^1, RSX_CODE) %;
;	  0679	
;	  0680	    bind
;	P 0681		STATUS_MAP = TABLE$ (IE_PRI, (S_EHI - S_ELO)^1,
;	P 0682		    C (S_SSUC, IS_SUC),		! Success
;	P 0683		    C (S_EABL, IE_ABO),		! Abort
;	P 0684		    C (S_EABM, IE_ABO),		! ...
;	P 0685		    C (S_EABO, IE_ABO),		! ...
;	P 0686		    C (S_EABS, IE_ABO),		! ...
;	P 0687		    C (S_ENUR, IE_ABO),		! ...
;	P 0688		    C (S_ERNS, IE_ABO),		! ...
;	P 0689		    C (S_EACR, IE_URJ),		! User reject
;	P 0690		    C (S_EOTB, IE_URJ),		! ...
;	P 0691		    C (S_ERBO, IE_URJ),		! ...
;	P 0692		    C (S_ECBE, IE_BAD),		! Bad parameter
;	P 0693		    C (S_ELST, IS_DAO),		! Data overrun
;	P 0694		    C (S_EMTL, IE_SPC),		! Invalid buffer parameter
;	P 0695		    C (S_ENRO, IE_NNT),		! Not a network task
;	P 0696		    C (S_EURO, IE_NNT),		! ...
;	P 0697		    C (S_ERES, IE_RSU),		! Resources unavailable
;	  0698		    C (S_EUNN, IE_NRJ)): vector; ! Network rejection
;	  0699	
;	  0700	    .STATUS_MAP [.CODE - S_ELO]
;	  0701	    end;
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  24
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (11)




000006						.PSECT	$PLIT$,  RO ,  D  
000006	177761 				P.AAB:	.WORD	-17
000010	177660 					.WORD	-120
000012	177760 					.WORD	-20
000014	177760 					.WORD	-20
000016	177760 					.WORD	-20
000020	177667 					.WORD	-111
000022	177760 					.WORD	-20
000024	177760 					.WORD	-20
000026	177760 					.WORD	-20
000030	177760 					.WORD	-20
000032	177760 					.WORD	-20
000034	177760 					.WORD	-20
000036	177760 					.WORD	-20
000040	177760 					.WORD	-20
000042	177760 					.WORD	-20
000044	177760 					.WORD	-20
000046	177760 					.WORD	-20
000050	177760 					.WORD	-20
000052	177760 					.WORD	-20
000054	177667 					.WORD	-111
000056	177761 					.WORD	-17
000060	177760 					.WORD	-20
000062	177772 					.WORD	-6
000064	177760 					.WORD	-20
000066	000002 					.WORD	2
000070	177760 					.WORD	-20
000072	177760 					.WORD	-20
000074	177777 					.WORD	-1
000076	177760 					.WORD	-20
000100	177760 					.WORD	-20
000102	177761 					.WORD	-17
000104	177761 					.WORD	-17
000106	177761 					.WORD	-17
000110	177667 					.WORD	-111
000112	177760 					.WORD	-20
000114	177660 					.WORD	-120
000116	177761 					.WORD	-17
000120	177666 					.WORD	-112
000122	177757 					.WORD	-21
000124	177760 					.WORD	-20
000126	000001 					.WORD	1


	000006'				STATUS.MAP=	    P.AAB


						.SBTTL	STXMAP
001636						.PSECT	$CODE$,  RO 
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  25
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (11)


000000	016600  000002 			STXMAP::MOV	2(SP),R0			; CODE,*				0700
000004	006300 					ASL	R0
000006	016000  000124'				MOV	STATUS.MAP+116(R0),R0		;					0650
000012	000207 					RTS	PC

; Routine Size:  6 words,	Routine Base:  $CODE$ + 1636
; Maximum stack depth per invocation:  0 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  26
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (12)

;	  0702	global routine ULAGET (ULA) =
;	  0703	
;	  0704	!++
;	  0705	! FUNCTIONAL DESCRIPTION:
;	  0706	!	Locate an available ULA and assign it.
;	  0707	!
;	  0708	! FORMAL PARAMETERS:
;	  0709	!	ULA	Address of word to receive ULA number
;	  0710	!
;	  0711	! IMPLICIT INPUTS:
;	  0712	!	The vector at SCX_ULA is used
;	  0713	!
;	  0714	! IMPLICIT OUTPUTS:
;	  0715	!	The vector entry in SCX_ULA is set to true
;	  0716	!
;	  0717	! ROUTINE VALUE:
;	  0718	!	True if ULA allocated, else false
;	  0719	!
;	  0720	! COMPLETION CODES:
;	  0721	!	None
;	  0722	!
;	  0723	! SIDE EFFECTS:
;	  0724	!	None
;	  0725	!--
;	  0726	
;	  0727	    begin
;	  0728	    $scx_get_data_base (SCXDB);
;	  0729	    local
;	  0730		SAV_MAP;
;	  0731	    bind
;	  0732		ULA_VEC = SCXDB [SCX_ULA_ADDR]: ref vector;
;	  0733	
;	  0734	    SMAP$ (SAV_MAP);
;	  0735	    MAP$ (.SCXDB [SCX_ULA_BIAS]);
;	  0736	
;	  0737	    incr I from 1 to .SCXDB [SCX_LINKS]-1 do	! Don't assign zero
;	  0738		begin
;	  0739		if .ULA_VEC [.I] eql 0
;	  0740		then
;	  0741		    begin
;	  0742		    ULA_VEC [.I] = true;
;	  0743		    .ULA = .I;
;	  0744		    MAP$ (.SAV_MAP);
;	  0745		    return true
;	  0746		    end
;	  0747		end;
;	  0748	
;	  0749	    MAP$ (.SAV_MAP);
;	  0750	    return false
;	  0751	    end;
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  27
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (12)

						.SBTTL	ULAGET
000000	004167  000000G			ULAGET::JSR	R1,$SAVE3			;					0702
000004	016701  000002G				MOV	.CRDAT+2,R1			;					0727
000010	016703  000000G				MOV	KISAR6,R3			; *,SAV.MAP				0734
000014	016167  000024  000000G			MOV	24(R1),KISAR6			;					0735
000022	005002 					CLR	R2				; I					0737
000024	000417 					BR	2$
000026	010200 				1$:	MOV	R2,R0				; I,*					0739
000030	006300 					ASL	R0
000032	066100  000026 				ADD	26(R1),R0
000036	005710 					TST	(R0)
000040	001011 					BNE	2$
000042	012710  000001 				MOV	#1,(R0)				;					0742
000046	010276  000012 				MOV	R2,@12(SP)			; I,ULA					0743
000052	010367  000000G				MOV	R3,KISAR6			; SAV.MAP,*				0744
000056	012700  000001 				MOV	#1,R0				;					0741
000062	000207 					RTS	PC
000064	005202 				2$:	INC	R2				; I					0737
000066	020261  000010 				CMP	R2,10(R1)			; I,*
000072	002755 					BLT	1$
000074	010367  000000G				MOV	R3,KISAR6			; SAV.MAP,*				0749
000100	005000 					CLR	R0				;					0727
000102	000207 					RTS	PC				;					0702

; Routine Size:  34 words,	Routine Base:  $CODE$ + 1652
; Maximum stack depth per invocation:  5 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  28
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (13)

;	  0752	global routine ULARD (ULA) =
;	  0753	
;	  0754	!++
;	  0755	! FUNCTIONAL DESCRIPTION:
;	  0756	!	Return contents of ULA vector entry
;	  0757	!
;	  0758	! FORMAL PARAMETERS:
;	  0759	!	ULA	The ULA
;	  0760	!
;	  0761	! IMPLICIT INPUTS:
;	  0762	!	The vector at SCX_ULA is used
;	  0763	!
;	  0764	! IMPLICIT OUTPUTS:
;	  0765	!	None
;	  0766	!
;	  0767	! ROUTINE VALUE:
;	  0768	!	The ULA vector contents, which is
;	  0769	!		True, if just allocated
;	  0770	!		LCB address when in use
;	  0771	!
;	  0772	! COMPLETION CODES:
;	  0773	!	None
;	  0774	!
;	  0775	! SIDE EFFECTS:
;	  0776	!	None
;	  0777	!--
;	  0778	
;	  0779	    begin
;	  0780	    $scx_get_data_base (SCXDB);
;	  0781	    local
;	  0782		SAV_MAP,
;	  0783		TEMP;
;	  0784	    bind
;	  0785		ULA_VEC = SCXDB [SCX_ULA_ADDR]: ref vector;
;	  0786	
;	  0787	    SMAP$ (SAV_MAP);
;	  0788	    MAP$ (.SCXDB [SCX_ULA_BIAS]);
;	  0789	
;	  0790	    TEMP = .ULA_VEC [.ULA];    
;	  0791	    MAP$ (.SAV_MAP);
;	  0792	    return .TEMP
;	  0793	    end;


						.SBTTL	ULARD
000000	004167  000000G			ULARD:: JSR	R1,$SAVE2			;					0752
000004	016701  000002G				MOV	.CRDAT+2,R1			;					0785
000010	062701  000026 				ADD	#26,R1
000014	016702  000000G				MOV	KISAR6,R2			; *,SAV.MAP				0787
000020	016700  000002G				MOV	.CRDAT+2,R0			;					0788
000024	016067  000024  000000G			MOV	24(R0),KISAR6
000032	016600  000010 				MOV	10(SP),R0			; ULA,*					0790
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  29
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (13)

000036	006300 					ASL	R0
000040	061100 					ADD	(R1),R0
000042	011001 					MOV	(R0),R1				; *,TEMP
000044	010267  000000G				MOV	R2,KISAR6			; SAV.MAP,*				0791
000050	010100 					MOV	R1,R0				; TEMP,*				0779
000052	000207 					RTS	PC				;					0752

; Routine Size:  22 words,	Routine Base:  $CODE$ + 1756
; Maximum stack depth per invocation:  4 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  30
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (14)

;	  0794	global routine ULASET (ULA, VALUE): novalue =
;	  0795	
;	  0796	!++
;	  0797	! FUNCTIONAL DESCRIPTION:
;	  0798	!	Set value into ULA vector.
;	  0799	!
;	  0800	! FORMAL PARAMETERS:
;	  0801	!	ULA	The ULA
;	  0802	!	VALUE	Value to be written into ULA vector
;	  0803	!
;	  0804	! IMPLICIT INPUTS:
;	  0805	!	The vector at SCX_ULA is used
;	  0806	!
;	  0807	! IMPLICIT OUTPUTS:
;	  0808	!	None
;	  0809	!
;	  0810	! ROUTINE VALUE:
;	  0811	! COMPLETION CODES:
;	  0812	!	None
;	  0813	!
;	  0814	! SIDE EFFECTS:
;	  0815	!	None
;	  0816	!--
;	  0817	
;	  0818	    begin
;	  0819	    $scx_get_data_base (SCXDB);
;	  0820	    local
;	  0821		SAV_MAP;
;	  0822	    bind
;	  0823		ULA_VEC = SCXDB [SCX_ULA_ADDR]: ref vector;
;	  0824	
;	  0825	    SMAP$ (SAV_MAP);
;	  0826	    MAP$ (.SCXDB [SCX_ULA_BIAS]);
;	  0827	
;	  0828	    ULA_VEC [.ULA] = .VALUE;
;	  0829	    MAP$ (.SAV_MAP)
;	  0830	    end;


						.SBTTL	ULASET
000000	004167  000000G			ULASET::JSR	R1,$SAVE2			;					0794
000004	016701  000002G				MOV	.CRDAT+2,R1			;					0823
000010	062701  000026 				ADD	#26,R1
000014	016702  000000G				MOV	KISAR6,R2			; *,SAV.MAP				0825
000020	016700  000002G				MOV	.CRDAT+2,R0			;					0826
000024	016067  000024  000000G			MOV	24(R0),KISAR6
000032	016600  000012 				MOV	12(SP),R0			; ULA,*					0828
000036	006300 					ASL	R0
000040	061100 					ADD	(R1),R0
000042	016610  000010 				MOV	10(SP),(R0)			; VALUE,*
000046	010267  000000G				MOV	R2,KISAR6			; SAV.MAP,*				0829
000052	000207 					RTS	PC				;					0794
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  31
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (14)


; Routine Size:  22 words,	Routine Base:  $CODE$ + 2032
; Maximum stack depth per invocation:  4 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  32
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (15)

;	  0831	global routine $C5TA (RAD50_NAME, PTR_ADDR, LNG_ADDR): novalue =
;	  0832	
;	  0833	!++
;	  0834	! FUNCTIONAL DESCRIPTION:
;	  0835	!	Convert RAD50 value to ascii string.
;	  0836	!
;	  0837	! FORMAL PARAMETERS:
;	  0838	!	RAD50_NAME	The RAD50 value to convert
;	  0839	!	PTR_ADDR	Address of pointer to buffer to receive ascii
;	  0840	!	LNG_ADDR	Address of word to receive string length
;	  0841	!
;	  0842	! IMPLICIT INPUTS:
;	  0843	!	None
;	  0844	!
;	  0845	! IMPLICIT OUTPUTS:
;	  0846	!	The buffer pointer is updated to point to next position in buffer
;	  0847	!	following information inserted.
;	  0848	!
;	  0849	! ROUTINE VALUE:
;	  0850	! COMPLETION CODES:
;	  0851	!	None
;	  0852	!
;	  0853	! SIDE EFFECTS:
;	  0854	!	None
;	  0855	!--
;	  0856	
;	  0857	    begin
;	  0858	    local
;	  0859		CH;
;	  0860	
;	  0861	    CH = .RAD50_NAME mod 40;
;	  0862	    RAD50_NAME = .RAD50_NAME / 40;
;	  0863	    if .RAD50_NAME neq 0 then $C5TA (.RAD50_NAME, .PTR_ADDR, .LNG_ADDR);
;	  0864	
;	  0865	    CH = (selectone .CH of
;	  0866		set
;	L 0867		%if %bliss (bliss36)
;	U 0868		%then
;	U 0869		    [0]:	%c' ';
;	U 0870		    [1 to 10]:	%c'0' + .CH - 1;
;	U 0871		    [11 to 36]:	%c'A' + .CH - 11;
;	U 0872		    [37]:	%c'.';
;	U 0873		    [38]:	%c'$';
;	U 0874		    [39]:	%c'%';
;	  0875		%else
;	  0876		    [0]:	%c' ';
;	  0877		    [1 to 26]:	%c'A' + .CH - 1;
;	  0878		    [27]:	%c'$';
;	  0879		    [28]:	%c'.';
;	  0880		    [30 to 39]:	%c'0' + .CH - 30;
;	  0881		    [otherwise]: %c'_';
;	  0882		%fi
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  33
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (15)

;	  0883		tes);
;	  0884	
;	  0885	    .LNG_ADDR = ..LNG_ADDR + 1;			! Count the character
;	  0886	    ch$wchar_a (.CH, .PTR_ADDR)		!   and put it into string
;	  0887	    end;


						.SBTTL	$C5TA
000000	004167  000000G			$C5TA:: JSR	R1,$SAVE2			;					0831
000004	016601  000014 				MOV	14(SP),R1			; RAD50.NAME,*				0861
000010	006700 					SXT	R0
000012	071027  000050 				DIV	#50,R0
000016	010102 					MOV	R1,R2				; *,CH
000020	016601  000014 				MOV	14(SP),R1			; RAD50.NAME,*				0862
000024	006700 					SXT	R0
000026	071027  000050 				DIV	#50,R0
000032	010066  000014 				MOV	R0,14(SP)			; *,RAD50.NAME
000036	001411 					BEQ	1$				;					0863
000040	010046 					MOV	R0,-(SP)
000042	016646  000014 				MOV	14(SP),-(SP)			; PTR.ADDR,*
000046	016646  000014 				MOV	14(SP),-(SP)			; LNG.ADDR,*
000052	004767  177722 				JSR	PC,$C5TA
000056	062706  000006 				ADD	#6,SP
000062	005702 				1$:	TST	R2				; CH					0865
000064	001003 					BNE	2$
000066	012702  000040 				MOV	#40,R2				; *,CH
000072	000436 					BR	7$
000074	003406 				2$:	BLE	3$
000076	020227  000032 				CMP	R2,#32				; CH,*
000102	003003 					BGT	3$
000104	062702  000100 				ADD	#100,R2				; *,CH					0877
000110	000427 					BR	7$				;					0865
000112	020227  000033 			3$:	CMP	R2,#33				; CH,*
000116	001003 					BNE	4$
000120	012702  000044 				MOV	#44,R2				; *,CH
000124	000421 					BR	7$
000126	020227  000034 			4$:	CMP	R2,#34				; CH,*
000132	001003 					BNE	5$
000134	012702  000056 				MOV	#56,R2				; *,CH
000140	000413 					BR	7$
000142	020227  000036 			5$:	CMP	R2,#36				; CH,*
000146	002406 					BLT	6$
000150	020227  000047 				CMP	R2,#47				; CH,*
000154	003003 					BGT	6$
000156	062702  000022 				ADD	#22,R2				; *,CH					0880
000162	000402 					BR	7$				;					0865
000164	012702  000137 			6$:	MOV	#137,R2				; *,CH
000170	005276  000010 			7$:	INC	@10(SP)				; LNG.ADDR				0885
000174	017600  000012 				MOV	@12(SP),R0			; PTR.ADDR,*				0886
000200	110210 					MOVB	R2,(R0)				; CH,*
000202	005276  000012 				INC	@12(SP)				; PTR.ADDR
000206	000207 					RTS	PC				;					0831
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  34
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (15)


; Routine Size:  68 words,	Routine Base:  $CODE$ + 2106
; Maximum stack depth per invocation:  7 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  35
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (16)

;	  0888	global routine $CAT5 (PTR_ADDR, FLAG) =
;	  0889	
;	  0890	!++
;	  0891	! FUNCTIONAL DESCRIPTION:
;	  0892	!	Convert ascii string to RAD50 format
;	  0893	!
;	  0894	! FORMAL PARAMETERS:
;	  0895	!	PTR_ADDR	Address of pointer which contains ascii string
;	  0896	!	FLAG		If nonzero, period is accepted as a character
;	  0897	!
;	  0898	! IMPLICIT INPUTS:
;	  0899	!	None
;	  0900	!
;	  0901	! IMPLICIT OUTPUTS:
;	  0902	!	The pointer addressed by PTR_ADDR is updated past characters converted.
;	  0903	!
;	  0904	! ROUTINE VALUE:
;	  0905	!	The RAD50 equivalent of the characters converted.
;	  0906	!
;	  0907	! COMPLETION CODES:
;	  0908	!	None
;	  0909	!
;	  0910	! SIDE EFFECTS:
;	  0911	!	None
;	  0912	!--
;	  0913	
;	  0914	    begin
;	  0915	    local
;	  0916		R50;
;	  0917	    literal
;	  0918		NCH = %if %bliss (bliss36) %then 5 %else 2 %fi;
;	  0919	
;	  0920	    R50 = 0;
;	  0921	    incr I from 0 to NCH do
;	  0922		begin
;	  0923		R50 = (.R50 * 40) +
;	  0924		    begin
;	  0925		    local CH;
;	  0926		    selectoneu (CH = ch$rchar_a (.PTR_ADDR)) of
;	  0927			set
;	L 0928			%if not %bliss (bliss36)
;	  0929			%then	! (bliss16 or bliss32)
;	  0930			    [%c'A' to %c'Z']: .CH - %c'A' + 1;
;	  0931			    [%c'0' to %c'9']: .CH - %c'0' + 30;
;	  0932			    [%c'$']: 27;
;	  0933			    [%c' ']: 0;
;	  0934			    [%c'.']: if .FLAG neq 0 then 28 else (.PTR_ADDR = ch$plus (..PTR_ADDR, -1); 0);
;	  0935			    [otherwise]: (.PTR_ADDR = ch$plus (..PTR_ADDR, -1); 0);
;	U 0936			%else	! (bliss36)
;	U 0937			    [%c'A' to %c'Z']: .CH - %c'A' + 11;
;	U 0938			    [%c'0' to %c'9']: .CH - %c'0' + 1;
;	U 0939			    [%c'$']: 38;
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  36
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (16)

;	U 0940			    [%c'%']: 39;
;	U 0941			    [%c' ']: 0;
;	U 0942			    [%c'.']: if .FLAG neq 0 then 37 else exitloop;
;	U 0943			    [otherwise]: exitloop;
;	  0944			%fi
;	  0945			tes
;	  0946		    end
;	  0947		end;
;	  0948	
;	  0949	    return .R50
;	  0950	    end;


						.SBTTL	$CAT5
000000	004167  000000G			$CAT5:: JSR	R1,$SAVE5			;					0888
000004	005005 					CLR	R5				; R50					0920
000006	016604  000020 				MOV	20(SP),R4			; PTR.ADDR,*				0926
000012	005003 					CLR	R3				; I					0921
000014	010501 				1$:	MOV	R5,R1				; R50,*					0923
000016	070127  000050 				MUL	#50,R1
000022	005214 					INC	(R4)				;					0926
000024	011400 					MOV	(R4),R0
000026	114000 					MOVB	-(R0),R0			; *,CH
000030	042700  177400 				BIC	#177400,R0			; *,CH
000034	020027  000101 				CMP	R0,#101				; CH,*
000040	103407 					BLO	2$
000042	020027  000132 				CMP	R0,#132				; CH,*
000046	101004 					BHI	2$
000050	010002 					MOV	R0,R2				; CH,*					0930
000052	162702  000100 				SUB	#100,R2
000056	000411 					BR	3$				;					0926
000060	020027  000060 			2$:	CMP	R0,#60				; CH,*
000064	103410 					BLO	4$
000066	020027  000071 				CMP	R0,#71				; CH,*
000072	101005 					BHI	4$
000074	010002 					MOV	R0,R2				; CH,*					0931
000076	162702  000022 				SUB	#22,R2
000102	010200 				3$:	MOV	R2,R0				;					0926
000104	000424 					BR	8$
000106	020027  000044 			4$:	CMP	R0,#44				; CH,*
000112	001003 					BNE	5$
000114	012700  000033 				MOV	#33,R0
000120	000416 					BR	8$
000122	020027  000040 			5$:	CMP	R0,#40				; CH,*
000126	001412 					BEQ	7$
000130	020027  000056 				CMP	R0,#56				; CH,*
000134	001006 					BNE	6$
000136	005766  000016 				TST	16(SP)				; FLAG					0934
000142	001403 					BEQ	6$
000144	012700  000034 				MOV	#34,R0
000150	000402 					BR	8$
000152	005314 				6$:	DEC	(R4)				;					0935
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  37
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (16)

000154	005000 				7$:	CLR	R0				;					0926
000156	060001 				8$:	ADD	R0,R1				;					0923
000160	010105 					MOV	R1,R5				; *,R50					0922
000162	005203 					INC	R3				; I					0921
000164	020327  000002 				CMP	R3,#2				; I,*
000170	003711 					BLE	1$
000172	010500 					MOV	R5,R0				; R50,*					0914
000174	000207 					RTS	PC				;					0888

; Routine Size:  63 words,	Routine Base:  $CODE$ + 2316
; Maximum stack depth per invocation:  7 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  38
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (17)

;	  0951	global routine $SCQHD (QHD, STR): novalue =
;	  0952	
;	  0953	!++
;	  0954	! FUNCTIONAL DESCRIPTION:
;	  0955	!    Queue STR to head of queue defined by QHD.
;	  0956	!
;	  0957	! FORMAL PARAMETERS:
;	  0958	!	QHD	2-word queue header
;	  0959	!	STR	Structure to be queued (link in first word)
;	  0960	!
;	  0961	! IMPLICIT INPUTS:
;	  0962	!	None
;	  0963	!
;	  0964	! IMPLICIT OUTPUTS:
;	  0965	!	None
;	  0966	!
;	  0967	! ROUTINE VALUE:
;	  0968	! COMPLETION CODES:
;	  0969	!	None
;	  0970	!
;	  0971	! SIDE EFFECTS:
;	  0972	!	None
;	  0973	!--
;	  0974	
;	  0975	    begin
;	  0976	    map
;	  0977		QHD: ref block field (QHD_FIELDS),
;	  0978		STR: ref block field (QHD_FIELDS);
;	  0979	
;	  0980	    if (STR [Q_HEAD] = .QHD [Q_HEAD]) eql 0 then QHD [Q_TAIL] = STR [Q_HEAD];
;	  0981	    QHD [Q_HEAD] = STR [Q_HEAD]
;	  0982	    end;


						.SBTTL	$SCQHD
000000	010146 				$SCQHD::MOV	R1,-(SP)			;					0951
000002	016601  000004 				MOV	4(SP),R1			; STR,*					0980
000006	016600  000006 				MOV	6(SP),R0			; QHD,*
000012	011011 					MOV	(R0),(R1)
000014	001002 					BNE	1$
000016	010160  000002 				MOV	R1,2(R0)
000022	010110 				1$:	MOV	R1,(R0)				;					0981
000024	012601 					MOV	(SP)+,R1			;					0951
000026	000207 					RTS	PC

; Routine Size:  12 words,	Routine Base:  $CODE$ + 2514
; Maximum stack depth per invocation:  2 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  39
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (18)

;	  0983	global routine $SCQIN (QHD, STR): novalue =
;	  0984	
;	  0985	!++
;	  0986	! FUNCTIONAL DESCRIPTION:
;	  0987	!    Queue STR to tail of queue defined by QHD.
;	  0988	!
;	  0989	! FORMAL PARAMETERS:
;	  0990	!	QHD	2-word queue header
;	  0991	!	STR	Structure to be queued (link in first word)
;	  0992	!
;	  0993	! IMPLICIT INPUTS:
;	  0994	!	None
;	  0995	!
;	  0996	! IMPLICIT OUTPUTS:
;	  0997	!	None
;	  0998	!
;	  0999	! ROUTINE VALUE:
;	  1000	! COMPLETION CODES:
;	  1001	!	None
;	  1002	!
;	  1003	! SIDE EFFECTS:
;	  1004	!	None
;	  1005	!--
;	  1006	
;	  1007	    begin
;	  1008	    map
;	  1009		QHD: ref block field (QHD_FIELDS),
;	  1010		STR: ref block field (QHD_FIELDS);
;	  1011	    bind
;	  1012		LAST_STR = QHD [Q_TAIL]: ref block field (QHD_FIELDS);
;	  1013	
;	  1014	    STR [Q_HEAD] = 0;
;	  1015	    LAST_STR [Q_HEAD] = STR [Q_HEAD];
;	  1016	    QHD [Q_TAIL] = STR [Q_HEAD]
;	  1017	    end;


						.SBTTL	$SCQIN
000000	010146 				$SCQIN::MOV	R1,-(SP)			;					0983
000002	016600  000006 				MOV	6(SP),R0			; QHD,*					1012
000006	016601  000004 				MOV	4(SP),R1			; STR,*					1014
000012	005011 					CLR	(R1)
000014	010170  000002 				MOV	R1,@2(R0)			;					1015
000020	010160  000002 				MOV	R1,2(R0)			;					1016
000024	012601 					MOV	(SP)+,R1			;					0983
000026	000207 					RTS	PC

; Routine Size:  12 words,	Routine Base:  $CODE$ + 2544
; Maximum stack depth per invocation:  2 words
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  40
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (19)

;	  1018	global routine $SCQRM (QHD, STR) =
;	  1019	
;	  1020	!++
;	  1021	! FUNCTIONAL DESCRIPTION:
;	  1022	!    Remove structure from queue defined by QHD, and return
;	  1023	!    its address in STR.
;	  1024	!
;	  1025	! FORMAL PARAMETERS:
;	  1026	!	QHD	2-word queue header
;	  1027	!	STR	Word to receive structure address
;	  1028	!
;	  1029	! IMPLICIT INPUTS:
;	  1030	!	None
;	  1031	!
;	  1032	! IMPLICIT OUTPUTS:
;	  1033	!	None
;	  1034	!
;	  1035	! ROUTINE VALUE:
;	  1036	! COMPLETION CODES:
;	  1037	!	True if something dequeued
;	  1038	!	False if nothing dequeued
;	  1039	!
;	  1040	! SIDE EFFECTS:
;	  1041	!	None
;	  1042	!--
;	  1043	
;	  1044	    begin
;	  1045	    map QHD: ref block field (QHD_FIELDS);
;	  1046	
;	  1047	    if (.STR = .QHD [Q_HEAD]) eql 0 then return false;
;	  1048	    ..STR = 0;
;	  1049	    if (QHD [Q_HEAD] = .(.QHD [Q_HEAD])) eql 0
;	  1050	    then QHD [Q_TAIL] = QHD [Q_HEAD];
;	  1051	    return true
;	  1052	    end;


						.SBTTL	$SCQRM
000000	010146 				$SCQRM::MOV	R1,-(SP)			;					1018
000002	016601  000004 				MOV	4(SP),R1			; STR,*					1047
000006	016600  000006 				MOV	6(SP),R0			; QHD,*
000012	011011 					MOV	(R0),(R1)
000014	001412 					BEQ	2$
000016	005071  000000 				CLR	@0(R1)				;					1048
000022	017010  000000 				MOV	@0(R0),(R0)			;					1049
000026	001002 					BNE	1$
000030	010060  000002 				MOV	R0,2(R0)			;					1050
000034	012700  000001 			1$:	MOV	#1,R0				;					1044
000040	000401 					BR	3$
000042	005000 				2$:	CLR	R0				;					1018
000044	012601 				3$:	MOV	(SP)+,R1
000046	000207 					RTS	PC
SCXSUB								25-Jan-1983 10:27:23	TOPS-20 Bliss-16 2A(530)	    Page  41
X01150								30-Dec-1982 21:05:08	NETPKG:<SC>SCXSUB.BLI.9 (19)


; Routine Size:  20 words,	Routine Base:  $CODE$ + 2574
; Maximum stack depth per invocation:  2 words


;	  1053	
;	  1054	end
;	  1055	eludom



;					OTS external references
						.GLOBL	$SAVE5, $SAVE3, $SAVE2, $STOP
						.GLOBL	BL$FIL, BL$MOV


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




;				LIBRARY STATISTICS
;
;					     -------- Symbols --------    Blocks
;	File				     Total    Loaded   Percent      Read
;
;  NETPKG:<SC>SCPRM.L16.4		       262       100        38         0
;  NETPKG:<MCB>MCBLIB.L16.15		       372        53        14         0
;  NETPKG:<MCB>RSXLIB.L16.13		       317        18         5         0
;  NETPKG:<MCB>XPORTX.L16.15		       599        31         5         0
;  NETPKG:<MCB>SCSYS.L16.13		       113        30        26         0





; Size:		722 code + 44 data words
; Run Time:	01:08.4
; Elapsed Time:	04:07.4
; Memory Used:	87 pages
; Compilation Complete
ACHKB$				 246
ALL				  94+
ALOCB$				 641
AST				 636	 641	 643#	 644#	 645#	 646#	 647
AST_FIELDS			 636
AST_SIZE			 638#	 641	 643
A_AST				 645
A_BYT				 644
A_CBL				 643
A_NPR				 646
A_PRM				 638
BLISS36				 342	 392	 867	 918	 928
BUF				 253	 283	 290	 293	 294	 295
BUFCHK				 165	 198*
BYT$ALLOCATION			 341
BYT$PTR				 365	 366	 378	 384
BYTES_WORD			 121+	 436	 442	 448	 512	 573	 638
C				 678#	 682	 683	 684	 685	 686	 687	 688	 689	 690	 691	 692
				 693	 694	 695	 696	 697	 698
CBSD_FIELDS			 336
CBU_ACNT			 116+#
CBU_ACTL			 115+#
CBU_DFMT			 105+#
CBU_DOBJ			 106+#
CBU_DST				 107+#
CBU_FIELDS			 101+#
CBU_NODE			 103+#
CBU_PASL			 112+#
CBU_PASW			 113+#
CBU_RQDL			 109+#
CBU_RQID			 110+#
CBU_SIZE			 120+#	 121+
CB_FMT				 347
CB_LEN				 379
CB_LN2				 385
CB_NAM				 378
CB_NM2				 384
CB_OBJ				 357
CCB				 253	 281	 285#	 286#	 287#	 288#	 293#	 294#	 295#	 301#	 302#	 305
				 546	 563	 568#	 569#	 570#	 571#	 572
CCBGT$				 563
CH				 859	 861#	 865#	 870	 871	 877	 880	 886	 925	 926#	 930	 931
				 937	 938
CND_ACNT			 147+#
CND_ACTL			 146+#
CND_DFMT			 130+#
CND_DOBJ			 131+#
CND_DST				 132+#
CND_FIELDS			 125+#
CND_NODE			 134+#
CND_OPDL			 149+#
CND_OPTD			 150+#
CND_PASL			 143+#
CND_PASW			 144+#
CND_RQDL			 140+#
CND_RQID			 141+#
CND_SEG				 128+#
CND_SFMT			 136+#
CND_SIZE			 154+#
CND_SOBJ			 137+#
CND_SRC				 138+#
CND_TLA				 127+#
C_ADDR				 294
C_BIAS				 293
C_CNT				 295	 569
C_FIELDS			 281	 546
C_FNC				 285
C_LIX				 301	 568
C_MOD				 286
C_PIX				 287
C_PRM1				 302
C_PRM2				 570
C_PRM4				 571
C_PRM5				 288
DO$XME				 166	 253*
DST				 307	 336	 347	 357	 378	 379	 384	 385
FALSE				 373	 389	 443	 446	 641	 750	1047
FC_XME				 285
FLAG				 888	 934	 942
FNDOBJ				 167	 307*
GETLCB				 168	 402*
I				 360	 362	 366	 367	 737	 739	 742	 743	 921
IE_ABO				 683	 684	 685	 686	 687	 688
IE_BAD				 244	 692
IE_NNT				 695	 696
IE_NRJ				 698
IE_PRI				 681
IE_RSU				 697
IE_SPC				 247	 694
IE_URJ				 689	 690	 691
IOP				 253	 288
IS_DAO				 693
IS_SUC				 251	 682
LAST_STR			1012#	1015#
LC				 500	 505#	 506#	 508	 511	 512
LCB				 253	 282	 298	 301	 302	 433	 436	 442	 448	 449	 450	 451#
				 452#	 453#	 454#	 459	 462#	 469#	 470	 473	 498	 503	 508
LCBKIL				 169	 473*
LCBP				 402	 449#
LCB_FIELDS			 282	 433	 498	 500	 501
LCB_SIZE			 436	 442	 448	 512
LC_LINK				 469	 506	 511
LC_LLA				 301
LC_NQHD				 454
LC_NQTL				 454
LC_OQHD				 453
LC_OQTL				 453
LC_PREV				 501	 506#	 511#
LC_TASK				 452	 459
LC_TNB				 462	 503
LC_ULA				 302	 451
LINKAGE_CCB			 166	 253#
LNG_ADDR			 831	 863	 885#
LO_BYTE				 302
MAP$				 358	 372	 735	 744	 749	 788	 791	 826	 829
MB				 548	 550#	 551#	 553	 556#	 557	 560#	 566	 568	 571	 573	 574#
				 577#
MB$CNP				 553
MB$CON				 553
MBF_REQ				 556
MBPROC				 170	 519*
MBP_FIELDS			 547	 548
MBP_SIZE			 573
MB_CNT				 573
MB_FNC				 553
MB_LINK				 551	 566
MB_LLA				 568
MB_PREV				 547	 551#	 566#	 567	 574
MB_TASK				 556
MB_TIME				 557	 560	 577
MB_TNB				 571
MDF				 253	 286
NAME				 341	 365
NAM_LEN				 339	 359#	 367#	 373	 379#	 385#
NAM_PTR				 340	 365#	 366	 378#	 384#	 394	 396	 397
NCH				 918#	 921
NOOP				 171	 583*
N_RQL				 121+#
OBJ				 353	 357#	 362
OTN				 345#	 362	 366	 367
OTN_FIELDS			 345
OTN_NAME			 366
OTN_NLEN			 367
OTN_SIZE			 345
OTN_TYPE			 362
PROC_NAM			 338
PTR_ADDR			 831	 863	 886	 888	 926	 934#	 935#
QASTT$				 647
QHD				 951	 977	 980#	 981#	 983	1009	1012	1016#	1018	1045	1047	1049#
				1050#
QHD_FIELDS			 544	 977	 978	1009	1010	1012	1045
QUEAST				 172	 609*
QUEUE				 519	 544	 550	 567#
Q_HEAD				 980	 981	1014	1015	1016	1047	1049	1050
Q_TAIL				 567	 980	1012	1016	1050
R50				 916	 920#	 923#	 949
R50_NAME			 342	 394#	 396#	 397#	 400
RAD50_NAME			 831	 861	 862#	 863
RELOC$				 248
RSX_CODE			 678
S$REJ				 572
SAV_MAP				 354	 356	 372	 730	 734	 744	 749	 782	 787	 791	 821	 825
				 829
SCX$_ILE			 467
SCXDB				 280	 287	 335	 345	 358	 360	 430	 456	 543	 728	 732	 735
				 737	 780	 785	 788	 819	 823	 826
SCXSUB				   1#
SCX_LINKS			 737
SCX_OTN_ADDR			 345
SCX_OTN_BIAS			 358
SCX_OTN_LEN			 360
SCX_SCPIX			 287
SCX_TNB				 456
SCX_ULA_ADDR			 732	 785	 823
SCX_ULA_BIAS			 735	 788	 826
SC_CODE				 678
SIZE				 198	 243
SMAP$				 356	 734	 787	 825
STATUS_MAP			 681#	 700
STR				 951	 978	 980#	 981	 983	1010	1014#	1015	1016	1018	1047#	1048#
STXMAP				 173	 650*
SYS				 198	 229	 236#	 237#	 238#	 245#	 248
SYS_ADDR			 238	 248
SYS_BIAS			 237	 248
SYS_BUFF			 229
SYS_SIZE			 236	 245
S_EABL				 683
S_EABM				 684
S_EABO				 685
S_EABS				 686
S_EACR				 689
S_ECBE				 692
S_EHI				 681
S_ELO				 678	 681	 700
S_ELST				 693
S_EMTL				 694
S_ENRO				 570	 695
S_ENUR				 687
S_EOTB				 690
S_ERBO				 691
S_ERES				 697
S_ERNS				 688
S_EUNN				 698
S_EURO				 696
S_SSUC				 682
TABLE$				 681
TCB				 307	 400
TEMP				 783	 790#	 792
TKBA				 402	 452
TNB				 432	 456#	 457#	 459	 462	 467	 468	 469	 470#	 503#	 505	 609
				 634	 640	 645	 647
TNBP				 402	 468#
TNB_FIELDS			 432	 503	 634
TN_LCB				 469	 470	 505
TN_LINK				 457
TN_SPA				 640	 645
TN_TASK				 459	 647
TRUE				 394	 396	 397	 471	 640	 648	 742	 745	1051
TSKRT$				 556
ULA				 434	 439	 450	 451	 702	 743#	 752	 790	 794	 828
ULAGET				 174	 439	 702*
ULARD				 175	 752*
ULASET				 176	 450	 794*
ULA_VEC				 732#	 739	 742#	 785#	 790	 823#	 828#
USR				 198	 228	 233	 242
USR_ADDR			 233	 246	 248
USR_BUFF			 228	 231
USR_SIZE			 242	 243	 245	 246
USR_TMP				 231	 233#	 242#	 243	 245	 246	 248
VALUE				 794	 828
XPO$K_VERSION			  91+
$ADDRESS			 127+
$BYTE_STRING			 103+	 107+	 110+	 113+	 116+	 132+	 134+	 138+	 141+	 144+	 147+	 150+
$BYTE				 105+	 106+	 130+	 131+	 136+	 137+
$C5TA				 177	 831*	 863
$CAT5				 178	 394	 396	 397	 888*
$FIELD				 101+	 125+
$FIELD_SET_SIZE			 120+	 154+
$MCB_GET_DSR			 436
$MCB_RETURN_DSR			 442	 512	 573
$MCB_SCHEDULE_CCB		 305
$RSX_GET_TCB			 400
$SCQHD				 179	 951*
$SCQIN				 180	 983*
$SCQRM				 181	1018*
$SCX_DO_XME			 572
$SCX_GET_DATA_BASE		 280	 335	 430	 543	 728	 780	 819
$SHORT_INTEGER			 109+	 112+	 115+	 128+	 140+	 143+	 146+	 149+
$SHOW				  94+
$SUB_FIELD			 302